Commit Graph
64 Commits
Author SHA1 Message Date
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
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 f6edc3edd9 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 11:00:49 +02:00
Zef Hemel 95ee876986 deno fmt 2025-08-02 14:27:22 +02:00
Michael Schmidt-KorthandGitHub 5f596fc24f upd: task cycle state to remove task (#1446)
* upd: task cycle add removal

* fix: cursor at start of line

* fix: cycle behavior for numbered list
2025-07-09 10:39:37 +02:00
Zef Hemel 450ef50df7 Cleanup: more cleanup and moving stuff around 2025-06-17 16:12:18 +02:00
Zef Hemel c3672056fb Eliminate $lib 2025-06-16 18:53:21 +02:00
Zef Hemel 8d3dc4cc4e Refactor, cleanup 2025-06-12 20:30:01 +02:00
Zef Hemel fa8f07a123 Kinda working 2025-03-21 16:12:10 +01:00
Zef Hemel 0a80c5c537 Collapse PageRef, DocumentRef and LocationRef into a single Ref type 2025-03-07 13:49:20 +01:00
Zef Hemel 3b1378717c Use a bullet instead of a dash for the task 2024-09-29 13:30:39 +02:00
Abin SimonandGitHub fca5d2a903 Convert bullet to task when Task: Cycle State is called (#1099)
Fixes #1074
2024-09-29 13:30:11 +02:00
Zef Hemel b1c46a17cf Redoing item and task indexing 2024-08-21 21:31:07 +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 c111f72e09 Lint error removal 2024-07-30 17:33:33 +02:00
Marek S. ŁukasiewiczandGitHub a0f3f7ef41 Support linking to and moving to line number in pages (#988)
Support linking to and moving to line number in pages
2024-07-28 20:31:37 +02:00
Zef Hemel 6d8149d747 Fixes #845 2024-07-06 20:52:27 +02:00
Zef Hemel e919aa82e9 0.7.4 2024-02-29 15:23:05 +01:00
Zef Hemel 59ab0cbaff Emit task:stateChange event 2024-02-28 10:55:08 +01:00
Zef HemelandGitHub de2d1089d4 New space script APIs (#761)
New space script APIs: registerEventListener and registerAttributeExtractor
2024-02-27 20:05:12 +01:00
Zef HemelandGitHub 60d3199d64 Giant code reorganization (#690)
Code restructure
2024-02-08 21:00:45 +01:00
Zef Hemel 43adb13fb2 Fixes #330 2024-01-26 11:10:35 +01:00
Zef HemelandGitHub aaacec6d61 Navigator refactor (#648)
Navigation refactor
2024-01-24 11:58:33 +01:00
Zef HemelandGitHub 848211120c Tags redo (#624)
Introduction of `tag` and `itags`
2024-01-11 13:20:50 +01:00
Zef HemelandGitHub 8a2e081672 Fixes #529 by removing directives (#613)
* Fixes #529 by removing directives
* Load builtin tags on space reindex
2024-01-02 14:47:02 +01:00
Zef Hemel cc5c2ee316 staskstate meta data 2023-10-13 17:10:57 +02:00
Zef Hemel 72453bac88 Fixes #521 2023-10-13 17:03:20 +02:00
Zef HemelandGitHub 0313565610 Complete redo of content indexing and querying (#517)
Complete redo of data store
Introduces live queries and live templates
2023-10-03 14:16:33 +02:00
Zef Hemel 2ee20af5c8 Custom task statuses plus various fixes 2023-09-01 16:57:29 +02:00
Zef Hemel 5ff1a8bae3 Refactor all the things 2023-08-28 17:12:15 +02:00
Zef Hemel 4af7afa4aa Instantly sync updated pages when ticking off a task in a directive 2023-08-05 21:09:41 +02:00
Zef Hemel b097750fe8 Make 'pos' a number in tasks 2023-08-02 08:57:25 +02:00
Zef Hemel 701a567c95 Attribute indexing and code completion 2023-08-01 21:35:19 +02:00
Zef Hemel 6929a7beb5 Federation: rewrite page references in federated content 2023-07-30 19:31:04 +02:00
Zef Hemel f24fbbb472 Fixes #433 2023-07-28 13:54:31 +02:00
Zef Hemel 7b8d8af2c1 Attributes now have YAML values 2023-07-26 17:12:56 +02:00
Zef Hemel 2b494f263e Work on inline attributes 2023-07-24 19:54:31 +02:00
Zef HemelandGitHub 7c825348b2 Big refactors and fixes
* Query regen
* Fix anchor completion
* Dependency fixes
* Changelog update
2023-07-02 11:25:32 +02:00
b256269897 Fix date calculation in Task: Postpone command (#406)
* Fix date calculation in `Task: Postpone` command

Create new postponed date as a "naive" date to prevent it from being
converted to UTC.

* Convert types to satisfy deno linter

---------

Co-authored-by: Bob Gibson <rjg@rjgibson.org>
2023-05-22 11:54:25 +02:00
Zef Hemel 53bf098579 deno fmt 2023-01-22 18:53:14 +01:00
Zef HemelandGitHub aaebea5e54 Major directive refactor (#195)
Fixes #188 #144 #76: major refactor of directive parsing, rendering, styling
2022-12-14 20:04:20 +01:00
Zef Hemel 15263a8dc6 Nicer hash tag CSS 2022-11-30 15:59:28 +01:00
Zef Hemel 7a627c2f35 Fixes #124 2022-11-20 10:24:24 +01:00
Zef HemelandGitHub 24c17a793f Live Preview (#119)
Live preview mode is here
2022-11-18 16:04:37 +01:00
Zef Hemel 3d671e8195 Fixes #100 implements a custom Markdown renderer 2022-11-01 15:01:28 +01:00
Zef Hemel c1a78e0105 Fixes #97: SQLite is now async, optimized, tests 2022-10-21 10:00:43 +02:00
Zef Hemel 574014a8be Reduce lint errors 2022-10-15 19:02:56 +02:00
Zef Hemel 7d28b53b75 Massive restructure of plugin API 2022-10-14 15:11:33 +02:00
Zef HemelandGitHub 561aa6891f Migrate to Deno (#86)
Big bang migration to Deno 🤯
2022-10-10 14:50:21 +02:00
Zef Hemel 1f842ec1d6 Monorepo with yarn workspaces requires yarn 3.2 2022-04-21 13:57:45 +02:00