Commit Graph
72 Commits
Author SHA1 Message Date
Zef Hemel e670c71849 Rename index.text API to index.markdown 2026-01-16 08:10:28 +01:00
Zef Hemel c15119a2c8 CHANGELOG updates and API docs 2026-01-15 11:50:06 +01:00
Zef Hemel 27c67878e5 CHANGELOG 2026-01-13 19:24:41 +01:00
Zef Hemel 43bd9efaf7 * Add "view" button to transclusions, jumping to ref
* Tweaks to markdown.expandMarkdown syscall
2026-01-12 17:19:23 +01:00
Zef Hemel a14b2af3c6 Docs work 2026-01-12 17:19:23 +01:00
MrMugameandGitHub 4cd12c8ae7 Set base inside of iframes (#1766)
* Set base inside of iframes

* Add `system.getURLPrefix` syscall
2026-01-09 15:30:34 +01:00
Zef Hemel 757896d502 Fixes #1730 Introduces editor:fold and editor:unfold event, also
documents some other events while at it.
2026-01-08 09:30:40 +01:00
Michael WeichertandGitHub 1743fe4464 Fix documentation: rename net.proxyRequest to net.proxyFetch (#1718) 2025-12-06 12:21:55 +01:00
Zef Hemel 28cc8787b3 URIs -> URI 2025-11-24 10:57:13 +01:00
Zef Hemel e7b03045e5 More page renames 2025-11-24 10:55:49 +01:00
Zef Hemel d5fbbbdaac Website content refactor (mostly pluralized page names to singular ones) 2025-11-24 10:47:10 +01:00
Zef Hemel f62a861762 Website: API classification 2025-11-14 15:33:01 +01:00
Mihai MaruseacandGitHub 30daf45f3b Fix: add a missing triple-backtick to close env (#1680) 2025-11-10 19:44:02 +01:00
Arnav JainandGitHub 7d9f8a41f9 Https note for editor.copyToCliboard (#1659) 2025-11-08 12:18:04 +01:00
Zef Hemel 4e32f1802f Service API docs fixes 2025-11-07 17:24:54 +01:00
Zef Hemel 7cec9b6121 Lua: introduce net.* APIs and deprecate http.request in favor of new
net.proxyFetch API

Introduces foundation support for URIs (net.readURI, net.writeURI).
2025-11-07 10:51:17 +01:00
Zef Hemel 13bd2c9082 Exposing MQ to Lua properly 2025-11-07 10:48:40 +01:00
Zef Hemel 63bb23f8fb Service bus (services API) implementation 2025-11-07 10:46:14 +01:00
onespacemanandGitHub c797273028 Expose codemirror's toggleComment command (#1635) 2025-10-16 08:18:46 +02:00
Nico S.andGitHub c7d9bd29f8 Update space.md: addded "space.pageExists()" (#1594) 2025-10-06 18:22:04 +02:00
Zef Hemel dde3433b87 Some tag page improvements:
* More efficient
* Now also exposes data objects

New markdown.objectToTable syscall to turn a list of objects into a
markdown table.
2025-10-06 17:22:10 +02:00
Zef Hemel 26d9d5bdf0 Restructure standard library and improve documentation
Refactor Library/Std into subfolders for APIs, Infrastructure, Editor,
Widgets, etc. Add more documentation and descriptions. Update references
throughout website and docs.
2025-10-01 11:22:31 +02:00
Zef HemelandGitHub dc2987a3f9 Sync engine rearchitecture (#1516)
* Don't require auth for .ping
* Finally introducing loggers
* Remove file list caching from disk_space_primitives
I don't think this is required anymore with the sync model
* Simplification of space primitives and more tests
* More reliable online status
* Add .zed settings
* Remove selfUpdate argument from `writeFile` no longer used
- Add `sync` config schema and document sync options
- Move sync config handling to client boot logic
- Move BootConfig type to ui_types.ts
- Remove sync env vars from server
- Update documentation for sync and architecture
* Improve sync logic and proxy routing for full sync state
* Add BoxProxy for late-bound client and improve Lua boot
- Add isMobile syscall for editor
* Add concurrency to sync process and log indexing duration
* Better service worker lifecycle management
2025-09-12 14:43:57 +02:00
Alex DobinandGitHub 956b7a947f document editor.getCurrentLine() function (#1531) 2025-09-11 08:31:44 +02:00
Zef Hemel b85b090c30 Adding back slashCommand with different casing... 2025-09-03 08:15:42 +02:00
Zef Hemel 32ac93cd34 Delete old slashcommand to be replace 2025-09-03 08:15:26 +02:00
Zef Hemel a7b284938f Revert back slashcommand to slashCommand 2025-09-03 08:14:39 +02:00
Zef HemelandGitHub 554744c794 Update slashcommand.md 2025-09-02 20:34:05 +02:00
Zef HemelandGitHub 4ebea149dc Update slashcommand.md 2025-09-02 20:33:45 +02:00
Zef Hemel c74e878897 Shell command whitelisting and stdin support 2025-08-27 11:14:21 +02:00
aa0b95b31d The one about refs (#1496)
* [Major] Introduce a new `Ref` and `Path` type

This introduces a new `Ref` and `Path` type, which try to be as lightweight and rigorous as possible. More description in the PR

* [Minor] Updated Syntax

* [Minor] Updated Type

* [Minor] Renamed file

* [Minor] Updated type

* [Minor] Updated Syntax

* [Major] Rename css classes for wiki links

Previously all the parts of a wiki link were tagged with `sb-wiki-link-page`. This didn't make a whole lot of sense. Also the tag `sb-wiki-link` was could never render, because of the way `HighlightStyle` works. Now every part of a wiki link will be tagged with `sb-wiki-link` (i.e. the link, the alias, the dimensions). Invalid and missing links will be styled separately in a later commit.

* [Minor] Adjust to new API

* [Minor] Small changes

* [Minor] Function and file renames

* [Major] Syscall adjusments

Change behavior of `getCurrentPath` to actually return what's now considered a `Path`. `getCurrentPage(Meta)` now also correctly returns for documents. We could consider a rename to get rid of the `page` association

* [Major] Rework `Client`

Mostly minor adjustments for the new API. Some major changes in `navigateWithinPage` and some unecessary checks removed now

* [Major] Errors on navigate

This now throws an error when the user tries to navigate to a link that is invalid

* [Major] Minor adjustments and remove some old bulk

This does the typicall adjustments to the new API. A thing to consider is that invalid links aren't indexed. Also removed old code about template and query stuff. And reused a regex instead of copy pasting it.

* [Minor] Cleanup editor ui

* [Minor] Adjust to new API

* [Minor] Adjust to new API and reduce ugly regex

* [Minor] New API

* [Minor] Rework link cm plugin

* [Major] Rework wiki links

A lot of code cleanup, reworked for new APIs and also introduces "invalid links"

* [Minor] Part of the editor ui rework

* [Major] Adjust to new API

This also removes the `looksLikePathWithExtension` check. I don't think it was necessary.

* [Minor] PArt of editor ui rewrite

* [Minor] Adjust to new API

* [Major] Adjust renderer to new API

Invalid links now link to `#`

* [Major] Rewrite navigator

This still needs major rework, currently in a "got it working" state

* [Minor] Adjust file name

* [Minor] Mistake during rebase

* [Minor] Navigate to end of header

* [Minor] Remove `tweakEditorDOM` and use proper CM extensions

* [Major] Heavily clean up the navigation code

* [Minor] Make `PageNavigator` closable again

* [Minor] Small fixes to reduce errors bubbling up

* [Minor] Show error message if navigate fails

* [Major] Remove legacy `navigate({ kind = ` syntax

This removes the old navigation syntax. It's still supported but the user will be warned then using it. I also added some validation to editor.navigate for user provided refs.

* [Minor] Make notifications errors

* [Minor] Don't fail if header isn't found

* [Minor] Typo

* [Major] Remove cleanPageRef

* [Minor] Small bug

* [Minor] Align behavior between render and editor

* [Major] Remove `PageRef`. Pretty sure it's obsolete

* [Major] Remove pos from header as it's an invalid ref

* [Minor] Align with original behavior

* [Minor] Get tests working again

* [Minor] check that indexPage is valid

* [Major] Rewrite `resolve.ts` file

* [Minor] More tests, more fixes

* [Minor] Don't just append .md this is weird

* [Minor] More edge cases

* [Minor] Version bumping hono somehow fixes the `/` case

* [Minor] Smaller TODOs

* [Major] We can be a littler looser on the restrictions

* [Major] Change header indexing, to index with pos

* [Minor] More fixes for headers

* [Minor] Rename for clarity

* [Minor] Change more regexes to named groups

* [Major] Inline content rewrite

* [Minor] Fix TODO

* [Minor] Bump index version

* [Major] New Space Primitive to check paths

* [Minor] Fix #1214

* [Minor] Fix #1169

* [Minor] Remove TODO

This check is probably not needed anymore. Unsure. May look into it later

* [Minor] small bug

* [Minor] Not a good rebase without me needing to fix it afterwards

* [Minor] Improve fallback for file upload

* [Minor] Some fixes on the for resolving

* [Minor] Removed doubled test case

* [Minor] Resolve #860

* [Minor] Turn flash notification into an error

* [Minor] Change handling of `.` paths

* [Minor] Show empty URL for index page

* [Minor] Push correct ref to history

* [Major] Capture mini editor events in capture phase

This fixes the issue were when pressing arrowup or arrowdown changed the cursor position inside the editor

* [Major] Add prefix to `FilterList`

This now fixes issues were if you had a prefixed page you  con't properly search for it, because the search considered the prefix as part of the name

* [Minor] A little rigor for empty headers

* [Major] Fix #1404

* [Minor] `parseInt` returns `NaN` handle that

* [Minor] Use `fileName`

* [Minor] Fix comment

* [Minor] Fixes

* [Major] disallow `foo.png.md` and `/../`, etc. cases

* [Major] Change name of conflicted pages

* [Minor] Remove unecessary check

* [Minor] Remove some split code

* [Minor] Allow deletion of invalid files

* [Minor] Bug in the regex

* [Minor] Give some possibility of fixing incorrect names

* [Minor] Tiny bug with header completion

* [Major] Docs

* [Minor] Ignore errors for navigation inside of a page

This could be a problem when SB e.g. cached a scrollTop for a page, which, because e.g. the file is now deleted, doesn't exist anymore and thus CM throws an error, when trying to navigate

* Update conflicted copy regex in Maintenance.md

---------

Co-authored-by: Zef Hemel <zef@zef.me>
2025-08-24 16:16:19 +02:00
Zef Hemel c16dbc12fb [Lua] Adds some useful encoding APIs for Lua (base64 encoding and decoding and such). 2025-08-20 13:39:34 +02:00
Zef Hemel a321339e9a Fixes #1495
Renames sync.* syscalls to be more accurate, specifically that this is not about scheduling a sync but actually performing the sync.
2025-08-20 10:58:30 +02:00
MrMugameandGitHub 98cff15235 Make stripIndent an option for template.new (#1473) 2025-07-26 20:34:32 +02:00
MrMugameandGitHub 6a7a9ebc85 Adds missing doc for syscalls (#1452)
* Add missing syscall documentation

* Add missing space lua documentation
2025-07-09 10:37:34 +02:00
Zef Hemel e98b27c830 Content improvements 2025-06-17 18:46:15 +02:00
Zef Hemel fbf2e4bc45 Rename system.invokeCommand syscall to editor.invokeCommand 2025-06-17 10:55:51 +02:00
Zef Hemel aff178bd78 Fix index.defineTag after refactor 2025-06-17 10:46:38 +02:00
Zef Hemel 10f6efe0ad Significant refactor of command, slashcommand and config handling, removal of "shortcuts" 2025-06-16 17:08:04 +02:00
Zef Hemel 1910ffce3e Index handling refinements 2025-06-12 13:52:13 +02:00
Marek S. ŁukasiewiczandGitHub f2f4937854 Utility function to handle empty query results and templates (#1386)
* Add global Lua function 'some'

Moved documentation for 'each' function to non-standard section.

* Revert "Add optional argument to template.each for empty collection output (#1359)"

This reverts commit b73dadec67.

* Reimplement #1359 using 'some' function
2025-05-12 07:33:49 +02:00
wbhoustonandGitHub c0f68f0906 Add notes on Space Lua Pattern Matching (#1366) 2025-05-02 07:36:04 +02:00
Marek S. ŁukasiewiczandGitHub b73dadec67 Add optional argument to template.each for empty collection output (#1359)
When omitted, the function outputs empty string for empty table as before.
The feature was motivated by the Maintenance page in v1 that showed messages
instead of just empty blocks (ported over).
2025-04-30 11:01:39 +02:00
Marek S. ŁukasiewiczandGitHub b9488b45c8 Fix table constructor in editor.filterBox example (close #1344) (#1360)
Also added description field from FilterOption, others didn't seem relevant
2025-04-30 11:01:00 +02:00
Marek S. ŁukasiewiczandGitHub 971e19f591 Add Lua features for integers (#1363)
* Parse hexadecimal numeric constants in Lua

Fix lua grammar to not require a "+" after "e" in numbers.
Add tests for parsing correct number value.

* Implement bitwise operators in Lua

They throw an error when called on fractional values,
like Lua 5.4 but with a hint to round them manually.
2025-04-30 10:58:45 +02:00
Zef Hemel 3356a3bc5f Update Datastore API documentation to reflect key format changes from string to list for keys in set, get, and delete operations. 2025-04-28 18:52:09 +02:00
Zef Hemel 34557e0575 Update documentation for consistency and clarity
- Revised multiple documentation files to correct references and improve clarity, including updates to the Command Palette, Document Editor, and various Markdown files.
- Removed outdated references to "Slash Templatese" and replaced them with "Slash Templates" for consistency.
- Enhanced explanations regarding meta pages and shortcuts, ensuring accurate guidance for users.
2025-04-17 12:04:20 +02:00
Zef Hemel 2ac30edb2f Update configuration documentation and remove deprecated templates
- Enhanced the `Config.md` documentation to clarify built-in configuration options and the use of the `config.set` API.
- Removed outdated `Page Template.md` and `Slash Template.md` files to streamline documentation and avoid confusion.
- Updated references in various documentation files to reflect the removal of deprecated templates and ensure consistency across the site.
2025-04-17 11:55:09 +02:00
Zef Hemel e1a6643d9a Website documentation work 2025-04-06 21:49:15 +02:00
Zef Hemel 4b52da3d86 Missing API docs 2025-04-03 18:09:51 +02:00