Commit Graph
146 Commits
Author SHA1 Message Date
Zef Hemel 175ac40751 Put cursor at end of prompt text by default 2025-09-12 16:00:59 +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
JelenkeeandGitHub f5169916b6 added editable attribute to mini editor (#1509) 2025-08-29 20:35:43 +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 95ee876986 deno fmt 2025-08-02 14:27:22 +02:00
MrMugameandGitHub be2b6bf09e Add a copy button (#1466)
* Add copy button to widgets

* Clean up codeWidget code

* Be more rigorous about choosing html
2025-07-26 20:43:01 +02:00
MrMugameandGitHub f8ce8d08a6 Only scrollIntoView when selection changes (#1470) 2025-07-26 20:38:52 +02:00
Michael Schmidt-KorthandGitHub f0ddb8c631 upd: group commands by category (#1447)
* upd: group commands by category

* fix: remove unused variable
2025-07-09 10:44:38 +02:00
Zef Hemel 450ef50df7 Cleanup: more cleanup and moving stuff around 2025-06-17 16:12:18 +02:00
Zef Hemel 7ded234eb1 Lint issues fix 2025-06-16 17:13:55 +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 b942ebabad Visual indication of initial indexing progress (red circle) 2025-06-12 14:35:16 +02:00
Niels GanserandZef Hemel e0fff9d07c [#481] If user hasn't explicitly set a dark mode pref in Silverbullet, fall back to browser pref 2025-06-10 09:17:19 +02:00
Zef Hemel bf2e0cdb87 Refactor: Merging common/ into web/ 2025-06-04 14:01:59 +02:00
Zef Hemel 85310e915d codemirror-vim mode version bump 2025-04-30 09:18:46 +02:00
Zef Hemel e003e926d2 Progress 2025-03-23 15:56:02 +01:00
Zef Hemel c157e979f0 WIP 2025-03-23 12:48:25 +01:00
Stan Ionitoiu-JanssenandZef Hemel 6b2390badf fix(menu): Move sync progress wrapper outside of actions menu (#1309) 2025-03-22 20:47:37 +01:00
Zef Hemel 672bd97b6e More cleaning 2025-03-21 17:38:43 +01:00
Zef Hemel 1284d15a8b Remove command buttons 2025-03-21 16:12:10 +01:00
Zef Hemel d50ddc2357 First very rough pass of cleanup 2025-03-21 16:12:07 +01:00
Zef Hemel 196c593d34 Fix new page creation 2025-03-20 15:00:55 +01:00
MrMugameandGitHub f3b0c358fd Don't spread page meta in navigator (#1301)
This fixes a bug where page attributes could overwrite internal
variables leading to unwanted behaviour
2025-03-20 09:11:23 +01:00
Stan Ionitoiu-JanssenandGitHub 67b612149b feat(menu): Make menu responsive (#1298)
* feat(menu): Make menu responsive
* feat(menu): make vertical menu opt-out by specifying custom CSS classes
* feat(menu): Add option to style the menu as a bottom-bar on mobile
* fix(settings): rename values for mobileMenuStyle
2025-03-18 18:04:30 +01:00
Zef Hemel 6307ce4242 Lua widget revamp 2025-03-14 15:58:01 +01:00
Zef Hemel fbe145e75b deno task fmt 2025-03-07 12:18:14 +01:00
Zef Hemel fe7dcb65c4 All tags starting with #meta are now considered meta pages 2025-03-07 11:47:40 +01:00
Zef Hemel 1807d7b572 Fix navigating to new pages being broken 2025-03-07 11:40:20 +01:00
Zef Hemel 1975b867ee deno task fmt 2025-03-06 15:14:53 +01:00
MrMugameandGitHub e61a447d98 Implementing #913 (#1230)
Implemented custom editors
2025-03-06 15:11:17 +01:00
Kenneth FitzgeraldandGitHub bd733398b8 Fix href check for action buttons (#1246)
* Fix href check for action buttons
Co-authored-by: Zef Hemel <zef@zef.me>
Co-authored-by: KitAmbraid <128903658+KitAmbraid@users.noreply.github.com>
2025-02-22 12:13:36 +01:00
Zef Hemel 9e0925beff Fix lint issues 2025-02-22 11:50:44 +01:00
Zef Hemel 720154c39a Return -> Enter 2025-02-07 21:07:09 +01:00
Zef Hemel fce78a22f8 More Lua template work 2025-01-22 20:26:37 +01:00
Marek S. ŁukasiewiczandGitHub 1508f6bcbf Correctly extract hashtag content in links and Page Picker filter (fix #1196) (#1199) 2025-01-07 19:57:46 +01:00
Michael KolbandGitHub cfbe8959d0 fix case sensitive property (#1167) 2024-11-24 09:21:34 +01:00
Mufeed AliandGitHub c52e9e71f0 Few dark mode fixes and top bar improvements (#1137)
* fix: Fix progress bar coloring and remove % on indicator

Fixes #1129

* fix: Improve header, action buttons and progress bar spacing

* fix: Fix caret color on sb-mini-editor
2024-11-07 21:28:14 +01:00
Michael KolbandGitHub e83f3ebc66 Enabler to make scripts loaded from CDN more secure (#1127)
* added integrity property to load scripts

* fix contribution
2024-10-25 10:38:37 +02:00
Zef Hemel 2ef43bd56d Fixes #1100 2024-09-29 13:39:08 +02:00
Zef HemelandGitHub 80f9c14b96 Change how attribute indexing and completion works (#1061)
* Creation of separate aspring-page objects for pages linked to, but not created
* Show "No results" instead of broken markdown table for no query results
* Show schema validation errors
* Deno upgrade
* Adds config support to plugs (see examples)
* Moves all builtin schemas to plug config
* Adds core plug just for builtin schemas
* Changes how attributes are indexed and completed, now attempts to derive a JSON schema for ad hoc attributes
2024-08-24 12:35:09 +02:00
770b4b3b59 Added ctrl-p/n keybindings for filters (#1006) (#1036)
Co-authored-by: Ruibin Xing <xingruibin@kanyun.com>
2024-08-15 16:41:15 +02:00
Zef HemelandGitHub 6b69449d05 More JSR (#1027)
* Move all syscalls to JSR-style package naming
* Eliminating some prefixes in import maps
2024-08-06 20:11:38 +02:00
Zef Hemel 47f504f2ce deno fmt 2024-08-02 17:14:40 +02:00
Zef HemelandGitHub 64b6d9e2df Space config (#1011)
Space config + a whole bunch of other tweaks
2024-08-02 16:47:36 +02:00
70cb0fc226 Per-tag page styling (#945)
PageDecorator add cssClasses

---------

Co-authored-by: Zef Hemel <zef@zef.me>
2024-07-31 11:28:31 +02:00
Zef Hemel c111f72e09 Lint error removal 2024-07-30 17:33:33 +02:00
Zef Hemel 64e116f75e lint cleanup 2024-07-30 15:17:34 +02:00
Zef HemelandGitHub 75471fa86b Object decorators (#995)
Implemented objectDecorators to replace pageDecorations in SETTINGS
2024-07-29 21:21:16 +02:00
Joe KrillandGitHub 86bee00e5e Use aliased preact import in Panel (#989) 2024-07-28 17:03:32 +02:00
Zef Hemel 830ae9c83d Fix meta picker breaking with broken links 2024-07-27 11:01:28 +02:00