Move isMacLike and prettifyShortcut out of command_palette into plug-api/lib/shortcut so the configuration manager's shortcuts UI can render identical key notation.
Track the source path on each Plug and rename the sandbox-factory "cacheKey" to "path" to reflect what it actually is. Fold the one-liner web_worker_sandbox helper into a WorkerSandbox.forPath factory and add system.loadPlug / system.unloadPlug syscalls so individual plugs can be (re)loaded by path — foundation for the upcoming configuration-manager libraries UI.
Cursor motions, selection, delete, undo/redo, completion, and the various navigator/palette openers are registered directly on the CommandHook from client code, eliminating the async plug round-trip that was racing Enter/Backspace handling in some cases (especially e2e tests).
CommandHook gains `registerCommand` and a shared `mergeCommand` helper so built-ins, plug commands.
Adds an optional `build:` section to plug manifests, running esbuild, sass, or copy transforms before asset bundling. Enables plugs to ship bundled TSX/SCSS UIs (used by the upcoming configuration-manager plug).
`config.define` now propagates schema `default` values, so features like smart quotes no longer need their own fallback constants.
Adds `defineCategory` / `getCategories` for the upcoming configuration manager UI.
Extracts almost all codemirror keyboard shortcuts into proper SB
commands so they can be rebound
Bonus: renders prettier versions of keyboard shortcuts on Mac
The service worker's proxy fallback only matched the wrapped "Offline"
error from HttpSpacePrimitives, but raw fetch() throws browser-native
errors like
"Failed to fetch" (Chrome), "NetworkError..." (Firefox), or "Load
failed"
(Safari). This caused a hard 503 instead of falling through to serve
local
data. Additionally, the `fullSyncConfirmed` flag reset on every service
worker
restart, forcing unnecessary proxying even when synced data existed in
IndexedDB.
In this commit:
- Use `isNetworkError()` in proxy_router.ts to catch all browser network
errors
and fall through to local serving instead of returning 503
* Recover `fullSyncConfirmed` from persisted sync snapshot on SW
restart, so
previously synced spaces serve locally immediately
* Adds e2e tests trying to emulate this behavior and prevent regressions
Currently when an inintial index takes a long time, navigation will
basically be blocked until it's finished which isn't great. This
special-cases that scenario and doesn't block (at the cost of possibly
not showing up to date widgets on the target page).
No longer cache widget HTML content just widget heights, either way the
widgets will briefly flash as the widget is recalculated and this saves
storage space and reduces issues in Webkit
* [LIQ] Fix: Coerce values to plain numbers in numeric aggregate functions
All numeric aggregate iterate functions (`sum`, `product`, `avg`,
`stddev`, variance, covariance, correlation, bitwise, quantile, ...)
used TypeScript as number type assertions which have no effect at
runtime. When a value was a string (e.g., YAML `rs: '3000.0'`) or
a `LuaTaggedFloat` object JS arithmetic operators like `+=` would
silently perform string concatenation or produce `[object Object]`
nonsense instead of numeric addition.
The fix introduces a small helper wrapping the `coerceToNumber` that
correctly unwraps plain numbers, `LuaTaggedFloat` objects and numeric
strings to plain JS numbers, and applies it at every numeric aggregate
intake point.
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
* [LIQ] Fix: Unwrap `LuaTaggedFloat` before passing values iterate function
`executeAggregate` now unwraps `LuaTaggedFloat` boxing before passing
values to any iterate function ensuring user-defined aggregates also
receive plain JS numbers instead of opaque internal objects.
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
* Remove forgotten trivial wrapper `aggNum`
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
---------
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
Now produce "markdown" (or <table> tags for tables) instead of pure
HTML. Hopefully doesn't introduce regressions. Added a test suite for
future iterations.
* Fine tunes a few behaviors (like not adding extra newlines, ever
(should fix#1629))
* When a list item ends with :, it automaticaly indents the next item
* Adds an extensive test suite with various cases
This needs some more testing, but should be a good starting point for
adding more tweaks later.
* 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.
Even though the service worker will proactively cache them in the
browser, the browser will not have to load them, parse them, interpret
them unless these languages are actually used. Less JS to load, less
waiting.