Commit Graph
898 Commits
Author SHA1 Message Date
Zef Hemel 06dfb01582 Add SB_DISABLE_SERVICE_WORKER mode 2026-05-12 10:08:59 +02:00
Zef Hemel 0ca442eb12 Fix: transform order on object indexing 2026-05-12 09:40:21 +02:00
Zef Hemel 32d0ee8f64 Merge branch 'main' of github.com:silverbulletmd/silverbullet 2026-05-11 16:55:41 +02:00
Zef Hemel 3532638612 'sb' auth encryption changed to no longer depend on hostname (which can
change)
2026-05-11 16:55:33 +02:00
Mr SnakeandGitHub 2bf105a1f0 Add UNIX socket support for server (#1975) 2026-05-11 05:40:21 +02:00
Zef Hemel cecd56c267 Fix index range for data, space-lua and space-style blocks 2026-05-09 13:05:08 +02:00
Zef Hemel 8222d47549 X-Ray docs 2026-05-09 12:32:44 +02:00
Zef Hemel 3b22827aaf Removed note about mac signing (binaries are signed now) 2026-05-07 11:24:22 +02:00
Zef Hemel 0abd582200 Added change of "Navigate: Home" default keybinding to changelog 2026-05-07 07:41:39 +02:00
Zef Hemel b21f2e9352 Fixes #1921 and #1557 2026-05-06 16:22:39 +02:00
Zef Hemel ba3910c702 Fixed docs typo 2026-05-06 15:13:26 +02:00
Zef Hemel ec2df68944 2.7.0 2026-05-06 13:20:25 +02:00
MrMugameandGitHub a7c6b288fe Fix incorrect tag on docs page for lua api (#1964) 2026-05-03 21:53:41 +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
laikqandGitHub ab8a790a02 Update Authelia documentation (#1951) 2026-04-27 18:59:53 +02:00
Zef Hemel a7c18cfa78 Renamed silverbullet-cli -> sb
+ CHANGELOG updates
2026-04-27 16:56:21 +02:00
Zef Hemel 8b241f9448 Rebranding LIQ to SLIQ! 2026-04-22 20:54:43 +02:00
Zef Hemel aca71e2621 Fix: re-enable some features on the website
Accidentally disabled this why testing the configuration manager, whoopsies.
2026-04-22 08:58:33 +02:00
Zef Hemel 4f8dbe209f Remove unnecessary comment in configuration manager website copy 2026-04-21 21:00:03 +02:00
Zef Hemel 8ccd6b2add Docs: configuration manager + CHANGELOG
Documents the Configuration Manager and Libraries tab, removes Library Manager page, rewrites the plug-installation section of the v1 migration guide, tighten the Plugs manifest reference, and updates in the Edge changelog.
2026-04-21 17:00:06 +02:00
Zef Hemel 8d8bb46649 Expanded plug dev guide
Split the Plug Development page into a quick-start with more subtopics: Architecture (loading, sandboxing, execution), Reference (manifests, hooks, syscalls), and Distribution and Testing.

Swap the Excalidraw architecture embed for a Mermaid diagram, and update the website Dockerfile to ship the Mermaid plug instead of Excalidraw.
2026-04-21 10:11:24 +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 6cb80f4ba3 SilverBullet+ links 2026-04-14 19:02:34 +02:00
Zef Hemel 35f267c4b6 Update CHANGELOG.md 2026-04-13 08:03:01 +02:00
Zef Hemel 9f54b3a719 2.6.1 2026-04-11 14:33:26 +02:00
Zef Hemel 95438849e0 2.6.0 2026-04-11 14:30:22 +02:00
Zef Hemel cca2bc6392 Typo in Journaling.md 2026-04-08 20:04:27 +02:00
Zef Hemel d93a551e88 Footnote website docs 2026-04-07 11:30:45 +02:00
Zef Hemel 5751d5b64f HTML tag Live Preview (second attempt) 2026-04-07 11:30:38 +02:00
Zef Hemel c12e0af422 More template.each rewrites 2026-04-06 20:15:58 +02:00
Zef Hemel 37891b2668 Replaced template.each with select template(...) pattern, much cleaner
and now possible
2026-04-06 20:13:54 +02:00
Zef Hemel 2ad3172568 Revert HTML tags live preview, too many edge cases 2026-04-02 14:36:54 +02:00
Zef Hemel e5f188e59e Tag enhancements
* tag.define now supports a `tagPage` attribute, allowing what page to
  send the user to when clicking on a hash tag in the editor
* index.contentPages() and index.metaPages() are convenience wrappers
  around the index.tag("page") collection that filter on content and
  meta pages respectively.
2026-04-01 08:44:50 +02:00
Zef Hemel dc4e701ddf syntax.define refinements 2026-03-31 15:01:16 +02:00
Zef Hemel a6ba2b9de7 Update CHANGELOG.md 2026-03-31 11:42:23 +02:00
Zef Hemel 50ab07c964 CHANGELOG update + CLI docus 2026-03-30 09:19:42 +02:00
Zef Hemel 2337f23f1e Fix #1913: maturity label color in dark mode on website 2026-03-28 14:26:43 +01:00
Zef Hemel e2dfb0be29 Fix #1904
32-bit ARM builds
2026-03-28 13:56:55 +01:00
Zef Hemel a17c48c567 CHANGELOG updates 2026-03-26 14:45:33 +01:00
Zef Hemel 03971a462f Fix rendering of TOC when headers contain a numbered list item 2026-03-26 11:35:11 +01:00
MrMugameandGitHub ba40b0c5a8 Updated document editor documentation (#1910) 2026-03-25 20:30:22 +01:00
Matouš Jan FialkaandGitHub 80cc5605da [LIQ] Implement implicit single group for aggregates without group by (#1907)
* Allow aggregate functions in `select`/`having` without an explicit
  `group by` clause. The entire result set is treated as one group.

  Note: Uses a `Symbol` as the map key for the implicit single group to
  avoid any collision with string keys from `generateKey`.

* Extend documentation.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2026-03-24 12:12:52 +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
Zef Hemel 18f4806aca Fix SB_READ_ONLY docs 2026-03-19 07:34:19 +01:00
Zef Hemel c04d7c332f First pass at "Remote API" (see docs)
Note: this is highly experimental and will likely change in the future.
2026-03-17 09:57:08 +01:00
Zef Hemel 702c75cc9c CHANGELOG updates 2026-03-13 09:17:43 +01:00
Zef Hemel e841d1f24d CHANGELOG updates 2026-03-13 08:36:28 +01:00
Zef Hemel 1a5c7fdfc6 Update website CONFIG with individual actionButton.define calls 2026-03-12 14:57:13 +01:00