Commit Graph
52 Commits
Author SHA1 Message Date
numanandGitHub afebdcf64c fix: bottom search bar dark mode styles (#1614) 2025-10-11 20:12:11 +02:00
Zef Hemel 3fa9c82add Fixes #1598
Lua: Implements %u in os.date()
2025-10-10 09:11:14 +02:00
Zef Hemel 5c4c71df8e Fixes #1608
Status code is now passed via x-proxy-status-code header
2025-10-10 08:51:24 +02:00
MrMugameandGitHub 00af994d69 Fix navigation for Autolinks and clean up code (#1607) 2025-10-10 08:42:25 +02:00
Zef Hemel 18e78e5006 Lua: fix key deletion in tables 2025-10-09 09:19:58 +02:00
Zef Hemel 83aa5bc349 Fix in content type handling of http.request 2025-10-08 08:59:28 +02:00
Zef Hemel b126320c5a Better readOnly checking, making sure that tag pages are never saved,
for instance
2025-10-07 14:33:54 +02:00
Zef Hemel f9527c8238 Lua: allow passing in a number to tonumber 2025-10-07 09:07:12 +02:00
Zef Hemel ad94c95c18 Lint 2025-10-06 17:22:49 +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 51e1eaf817 /.proxy enhancements
Now cleanly separates request and response headers for the request and
response of the http request from the ones that SB needs/serves itself.
2025-10-06 14:38:00 +02:00
Zef Hemel fff65f9094 Fixes #1593
Lua widget output can now be selected
2025-10-06 10:35:05 +02:00
Matouš Jan FialkaandGitHub e91bec71c0 Fix Lua arithmetic model (#1587)
This patch fixes the Lua arithmetic model at parser level only. Runtime
level fixtures are left for future work.

MOTIVATION

Space Lua treats all numbers as IEEE-754 doubles (JS semantics), so it
preserves negative zero. Lua uses integers and floats. The literal "-0"
in Lua is parsed as unary minus applied to the integer literal "0",
which yields the integer "0" (no sign). This difference flips the sign
of the divisor in "1/-0" and "-1/-0". Although it could be fixed without
touching the parser by changing only unary minus evaluation, this commit
goes a little further and provides integer vs float differenciating at
the parser level as well uses it to fix the unary minus evaluation.

Extensive tests are added to test this exact change works and the Space
Lua arithmetic model is aligned with Lua. Note that things like `-(expr)`
in general may still produce results inconsistent with Lua. This cannot
be fixed at parser level and must be fixed at runtime level which will
need far more complex change to the Space Lua interpreter code. Therefor
these cases we omitted from the tests.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-10-03 16:31:00 +02:00
Matouš Jan FialkaandGitHub 9967cf1fd1 Space Lua: Remove unary plus (#1585)
* Improve documentation on string to number conversion (plus minor fixes of typos)
* Update Lua grammar to disallow unary plus

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-10-03 08:28:36 +02:00
Zef Hemel df7eff1e3d make fmt 2025-10-01 17:14:54 +02:00
Zef Hemel b333d4ac36 Remove redundant disk_space_primitives 2025-10-01 17:14:46 +02:00
Matouš Jan FialkaandGitHub 80f31da16b Fix arithmetic coercion - refactored and enhanced (#1576)
The Lua 5.4 compatible `tonumber` implementation completely reworked

- custom char-by-char parser (no regexes)
- proper Lua space handling
- support for heximal integers and floats
- support for scientific float notation
- extended tests
- updated website docs

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-10-01 11:30:58 +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 Hemel 6ca64f1e3f Bring back the page:saved event 2025-10-01 08:36:16 +02:00
Noah StanleyandGitHub 81989042b6 Show an error alert on Clipboard API write exceptions (#1575)
* Show alert on Clipboard API write exceptions

* Change Clipboard API error to flashNotification
2025-09-30 13:24:21 +02:00
Zef Hemel d63c7e49a7 Disable js.import tests for now 2025-09-29 15:56:41 +02:00
Zef Hemel a2a784ddfe Fixes #1561
Last openen page information is now kept in the datastore and therefore
persistent even across tabs. This seems to also have fixed ther andom
behavior when deleting a page -> you always go back to your last opened
page (before the one you deleted).
2025-09-29 15:30:38 +02:00
Zef Hemel ea08c85202 Fixes #928
Command runs are now persisted to datastore
2025-09-29 15:20:14 +02:00
Zef Hemel dd1990cc8f More dead code elimination 2025-09-29 11:32:12 +02:00
Zef Hemel 2f6f0a5897 Dead code 2025-09-29 11:21:35 +02:00
Zef Hemel d6190b7c05 Moving more files around 2025-09-29 11:17:55 +02:00
Zef Hemel bb602dd9e8 Moved some more code around
Mostly just shuffling files to different folders, but also: renamed
PagePicker to AnythingPicker
2025-09-29 11:03:06 +02:00
Zef Hemel b4cec7ae81 Stop triggering file:deleted event on getFileMeta checks
Not sure why that happened...
2025-09-29 10:29:41 +02:00
Zef Hemel a334100eec Actually honor read only mode (system.getEnv) 2025-09-26 15:52:25 +02:00
Zef Hemel d0a54b54e5 Config implementation cleanup 2025-09-26 15:17:58 +02:00
Zef Hemel 739769b8c9 Nested schema support for config.* 2025-09-26 15:09:56 +02:00
Zef Hemel 6509bf4ad5 Possibly fixes #1554
Auth proxies may send a redirect header and any status code
2025-09-26 14:10:23 +02:00
Zef Hemel 2ea626d7f5 Removed attempt at cleverness to serve getFileMeta from a cache for non-synced files
This leads to a situation where getFileMeta succeeds (e.g. used for checking for file existence) whereas readFile would fail. This may lead to unexpected behavior in some plugs (specifically excalidraw).
2025-09-26 13:38:15 +02:00
Zef Hemel 5984aedda1 Fix lint 2025-09-26 13:25:10 +02:00
Zef Hemel 0e37d0aa05 More robust ping 2025-09-26 13:21:06 +02:00
Zef Hemel eec54fdb93 handle space.fileExists less on vibes, more on reality 2025-09-26 13:20:30 +02:00
Zef Hemel bb62127517 Online/offline handling tweaks 2025-09-26 13:03:46 +02:00
Zef Hemel 8a39b93657 Fixes auth being broken on Safari
alwaysProxy paths in service worker are now prefixes.
2025-09-26 08:03:24 +02:00
MrMugameandGitHub b343fe6baf Fix tag links in rendered markdown (#1565)
* Fix tag links in rendered markdown

* Remove unused import
2025-09-25 15:56:48 +02:00
Zef Hemel e39c5d8136 lint 2025-09-25 12:20:18 +02:00
Zef Hemel 2877d619a7 Disable hot reloading plugs (need to use an explicit Plugs: Reload command now)
This was resulting in a nasty race condition where plugs would sometimes reload (e.g. during an upgrade) while also indexing content, which would then fail.
2025-09-25 12:19:12 +02:00
Zef Hemel 18d198d486 Don't set lastModified for created in datastore_space_primitives.ts 2025-09-25 12:18:07 +02:00
Zef Hemel df108afdd1 Type fix 2025-09-25 11:11:07 +02:00
Zef Hemel 4ef1a934c9 Switch back to loading worker_runtime from deno.land/x again 2025-09-25 11:09:30 +02:00
Zef Hemel 0e830d3575 Fix worker_runtime location 2025-09-25 10:34:14 +02:00
Zef Hemel dcafb5c5ff Lint 2025-09-24 12:58:33 +02:00
Zef Hemel ee3896ee75 Further code restructuring and fix detection of space path change 2025-09-24 12:57:56 +02:00
Zef Hemel 9d6e26dfd2 Delete unused code 2025-09-23 17:02:26 +02:00
Zef Hemel f4336bf09f Code restructuring: eliminated the top-level lib/ directory 2025-09-23 17:00:34 +02:00
Zef Hemel fdd8899b33 Fix SB_URL_PREFIX handling, added SB_LOG_PUSH to ask clients to push
client logs to the server
2025-09-19 16:10:14 +02:00