Commit Graph
145 Commits
Author SHA1 Message Date
wushenghuaandCodex db73584e2b feat: 完善账号管理与扩展体验
CI / config (push) Canceled after 0s
CI / test-frontend (push) Canceled after 0s
CI / test-rust (push) Canceled after 0s
CI / test-e2e (push) Canceled after 0s
CI / test-e2e-release (push) Canceled after 0s
CI / build (push) Canceled after 0s
CI / release (push) Canceled after 0s
CI / docker (push) Canceled after 0s
CI / docker-website (push) Canceled after 0s
补齐普通用户自助账号、中文设置与快捷键提示,修复大型扩展安装和移动端弹窗,并按服务器能力限制不兼容扩展。

Co-Authored-By: Codex <noreply@anthropic.com>
2026-08-12 22:13:23 +08:00
Zef Hemel 64c4581b0e Initial implementation of experimental Comment support (parsed and custom rendered HTML comments) 2026-08-06 10:15:57 +02:00
henrikxandGitHub 45dd29e3b5 Clarify document sync property description (#2075) 2026-08-01 10:14:51 +02:00
Zef Hemel b667e35fe3 Website docs update 2026-07-23 14:53:28 +02:00
Zef Hemel 75ca3b9c39 Migrate Lua code complete and code navigation to typescript 2026-07-16 12:06:59 +02:00
henrikxandGitHub 59a147f2d4 Fix lost capture groups due to ipairs dropping nil values from table (#2046)
Fixes #2045
2026-07-14 09:53:18 +02:00
Zef Hemel 6c9c2f7d17 Feature: frontmatter folding 2026-06-29 16:45:16 +02:00
Zef Hemel e0e6553b1a Lua widget sandbox: put behind 'sandbox = true' gate 2026-06-22 11:37:23 +02:00
Zef Hemel 84e1475db6 Widget API docs update 2026-06-22 10:18:07 +02:00
Zef Hemel 1e1346c7ef Remove object graph from repo 2026-06-10 09:04:38 +02:00
Zef Hemel 314351e180 index: simplify "relation" kind/type into a single kind 2026-06-09 17:08:22 +02:00
Zef Hemel 7316c1bdd2 /tag-schema slash template 2026-05-31 11:16:10 +02:00
pimartiandGitHub bb93a466d0 add priorities to all space-lua scripts in Std (#1992) 2026-05-28 15:50:26 +02:00
pimartiandGitHub 01cdcfe261 allow operator-pending mode in vim keybindings (#1999) 2026-05-28 15:46:13 +02:00
Zef Hemel 6924a36552 Fix: Cmd/ctrl clicking page links now works again 2026-05-27 14:25:45 +02:00
Zef Hemel eb4e22ba2d Release versions of markdown prettify and object graph 2026-05-26 15:46:11 +02:00
Zef Hemel 574f1d774d Default /query slash template to use contentPages() 2026-05-26 15:05:48 +02:00
Zef Hemel 9dcc4095d9 index.contentPages() now supports an optional tag name 2026-05-26 14:08:34 +02:00
Zef Hemel 6965f0aa12 Add a few more curated libraries to Repositories/Std 2026-05-26 14:08:00 +02:00
Zef Hemel 2b80cf497d Website content updates 2026-05-22 17:05:05 +02:00
Zef Hemel 6d1ddc4aa2 Add 'link' schema 2026-05-22 11:12:42 +02:00
Zef Hemel 5690693843 Remove maturity label from Std lib 2026-05-21 16:50:31 +02:00
Zef Hemel 9134944896 Introduce "relation" indexer, demote "link" to virtual view 2026-05-21 16:49:34 +02:00
Zef Hemel 66c69ec20e Documentation update using new-style index.* APIs 2026-05-19 13:59:58 +02:00
Cody SchroederandGitHub 7c3861345d More journal robustness (#1981) 2026-05-16 09:41:35 +02:00
Zef Hemel 2e8ed7f405 Remove [[CONFIG]] links from std lib, since CONFIG is no longer auto generated 2026-05-14 13:42:36 +02:00
Zef Hemel c93dc03ca7 Journal robustness 2026-05-14 08:30:26 +02:00
Zef Hemel 60bc135479 Initial version of Journal library 2026-05-12 13:47:41 +02:00
Zef Hemel 0569a037b2 fix (hopefully) for video embedding in SB+ 2026-05-12 13:46:58 +02:00
Zef Hemel a76f123d50 Expose page template creation as public API on template.* 2026-05-12 11:20:39 +02:00
Zef Hemel 21e7418db3 Move page and slash page templates to appropriate library page 2026-05-06 16:37:47 +02:00
Zef Hemel b21f2e9352 Fixes #1921 and #1557 2026-05-06 16:22:39 +02:00
Zef Hemel a28c661d24 refactor: config: rename ui order to priority (consistency with rest of SB), flip sort direction
Also: docs
2026-05-03 16:06:45 +02:00
Zef Hemel a2a2960d02 docs tweaks 2026-04-30 19:52:57 +02:00
Zef Hemel 5080cf9b50 anchor documentation 2026-04-30 19:51:49 +02:00
Zef Hemel dc6ee80ec8 anchor-aware refs in taskItem/itemItem/paragraphItem templates 2026-04-30 19:47:47 +02:00
Zef Hemel 8b241f9448 Rebranding LIQ to SLIQ! 2026-04-22 20:54:43 +02:00
Zef Hemel 5a9f9ed101 Std Library: remove plug-manager and legacy Library Manager
Drop the old plug-manager plug and the Space-Lua Library Manager, all superseded by the Libraries tab in the configuration manager.

Pass fallback values to config.get(...) in the Std widgets so  TOC / linked mentions / linked tasks keep rendering on a fresh  space where schema defaults haven't been indexed yet.
2026-04-21 16:59:00 +02:00
Zef Hemel 795c248a0c Set some sensible default (fallback) config options when defaults are not yet available (initial index) 2026-04-21 13:06:36 +02:00
Zef Hemel d25e98b932 Std Library: wire schema defaults and UI categories
Registers UI categories and moves default values from `config.set` blocks into schema `default` fields, so the configuration manager can drive everything directly from the schema. Only `actionButtons`, whose entries hold function bodies, stays in `config.set`.

Also adds a schema for `github.*` settings so the integration shows  up in the configuration UI (later commit)
2026-04-21 10:06:52 +02:00
Zef Hemel ea2ad9a732 Add actionButton.define "command" attribute
This automatically triggers a command bound to an actionButton, and
notably also shows the keyboard shortcut connected to it (if any)
2026-04-16 14:23:54 +02:00
Zef Hemel 338c78f806 Iterating on the CLI
* Renamed 'lua' to 'eval'
* Renamed 'luascript' to 'script'
* Added 'describe' to describe LIQ and lists tags that have defined
  schemas

Tests for all of this
2026-04-16 10:58:20 +02:00
Zef Hemel 2229a11160 Fix tag stripping for page templates 2026-04-08 20:03:46 +02:00
Zef Hemel 49229c1608 Add pageLastModified to item and task, similar to link 2026-03-31 15:43:21 +02:00
Zef Hemel dc4e701ddf syntax.define refinements 2026-03-31 15:01:16 +02:00
Zef Hemel 7d4f4312d1 Move home button outside of dropdown as well (default) 2026-03-26 17:39:47 +01:00
Zef Hemel 03971a462f Fix rendering of TOC when headers contain a numbered list item 2026-03-26 11:35:11 +01:00
Matouš Jan FialkaandGitHub baeb688ddc Fix: template.each returns nil on empty results (#1899)
* Fix: `template.each` returns nil on empty results

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix typo

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2026-03-19 16:26:32 +01:00
Matouš Jan FialkaandGitHub 9170627d27 Add tests for aggregates and few useful aggregates (#1897)
* [LIQ] Add more tests for builtin aggregates

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* [LIQ] Add `first`, `last`, `mode` and `median` aggregates and `group_concat` alias

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2026-03-19 12:34:58 +01:00
Matouš Jan FialkaandGitHub 6cbb61c7db [LIQ] Add new aggregate functions, aliases, and queryable aggregate registry (#1891)
* [LIQ] Add new aggregate functions, aliases, and queryable aggregate registry

* Extend with 13 new built-in aggregates: `product`, `string_agg`,
  `yaml_agg`, `json_agg`, `bit_and`, `bit_or`, `bit_xor`, `bool_and`,
  `bool_or`, `stddev_pop`, `stddev_samp`, `var_pop` and `var_samp`.

* Introduce `aggregate.alias` API allowing users to define custom
  aliases for any aggregate. Standard aliases (`every`, `std`, `stddev`
  and `variance`) are now defined via this API rather than hardcoded.

* Add `index.aggregates` queryable collection so users can discover
  all available aggregates directly from LIQ queries.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix config pass through query path so custom aggregates work

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Preserve `LuaTable`/`LuaFunction` values in aggregate config storage

`config.set` uses `LuaNativeJSFunction` which calls `luaValueToJS` on
all arguments. This converted the aggregate `LuaTable` to a plain JS
object and wrapped `LuaFunction` callbacks in JS functions that also
converted their returned values via `luaValueToJS`. The result was that
state returned by initialize (a `LuaTable`) got converted to a plain JS
object before being passed to `iterate`. Therefor Lua operations like
`table.insert` on that were failing because they expected a `LuaTable`
and not a plain JS array.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix formatting

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Improve aggregate functions descriptions, fix `sum` divergence

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Align `product` with `sum`

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: extract `alias` from `LuaTable` via `rawGet` in `aggregates()` registry

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Rename `alias` in `aggregates()` to `target` for clarity

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Add a null guard at the top of `jsToLuaValue`

This preserves `null`/`undefined` as-is (both map to Lua nil) and
prevents them from falling through to the `typeof` "object" branch.

For this PR it means that null `target` in our `aggregates` entries will
correctly show as empty/`nil` in query results rather than `{}`.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Documentation reflects recent changes

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: make `sum`/`product` return null on empty input; stop `LIQ_NULL` leaks

* `sum(`) and` product(`) now return null when no rows match (matching
  Postgres semantics) instead of returning 0 and 1 respectively.

* Query result columns that hold null are internally preserved using
  a `LIQ_NULL` sentinel so that column keys survive in `LuaTable`
  storage.  This sentinel was leaking into Lua code as "userdata"
  through three read paths:

  * `luaIndexValue`: `rawGet` returned the sentinel directly to Lua when
    accessing table fields,

  * `rawget` (stdlib): the builtin `rawget` function exposed the
    sentinel without converting it back to `nil`,

  * `createAugmentedEnv`: string interpolation unpacked table values via
    `rawGet` into local variables, making the sentinel visible in
    template expressions like `${var}`.

  All three now convert `LIQ_NULL` to `nil` at the read boundary,
  keeping the sentinel internal to table storage where it belongs.

* Update affected test expectations accordingly.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Remove duplicated LIQ_NULL hazard, add guard for all builtin aggregate `iterate`s

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: `array_agg` preserves NULL positions

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Add symbol guard to `json_agg`

`JSON.stringify(Symbol(...))` in an array produces null by accident.
That is a JS implementation detail we **MUST NOT** rely on. Explicit
null push makes intent clear and avoids surprises if the `Symbol`
representation ever changes.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Add symbol guard to `yaml_agg` (ditto)

`js-yaml` has no knowledge of the `LIQ_NULL` symbol. Passing null makes
it emit YAML null (or `~`), which is the correct YAML representation of
a missing value and matches standard `json_agg`/`yaml_agg`
NULL-inclusion semantics.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Add intra-aggregate ordering null guards

Without this, `LIQ_NULL` sort keys would fall through to `valA < valB`
which is always false for `Symbol`s which is breaking the `nulls
first`/`nulls last` contract...

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Ditto, but for `order by` null comparisons

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Guard `luaTypeName`, `luaTypeOf` and `luaToString` against `LIQ_NULL` sentinel

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Guard presentation layer against `LIQ_NULL` sentinel leaking as visible text

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Fix: Evaluate extra args per-item in `executeAggregate`; add new aggregates

Extra arguments (2nd, 3rd, etc.) to aggregate functions were evaluated
against the outer query environment where the object variable is not
bound. This caused multi-argument aggregates like `covar_samp(data.y,
data.x)` to fail with nil reference errors. This commit addresses this
by evaluating extra args per-item inside the iterate loop using the item
environment so all arguments resolve correctly.

We also add few common aggregates:

- `covar_pop`, `covar_samp`, `corr`: population/sample covariance and
  correlation coefficient using online co-moment algorithm.

- `quantile(value, q, method)`: general quantile with interpolation
  methods: lower, higher, nearest, midpoint and default linear.

- `percentile_cont(value, q)`: continuous percentile (linear)

- `percentile_disc(value, q)`: discrete percentile (lower)

Note: `percentile_cont` and `percentile_disc` share the `quantile`
implementation through `ctx.name` at initialize time.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Update docs

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Make the ordering for quantile aggregates explicit

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Update docs

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Improve docs

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2026-03-19 09:37:09 +01:00