Commit Graph
144 Commits
Author SHA1 Message Date
Zef Hemel c93d656ac6 Significant refactor of index
* Moved YAML library import to index plug (so no async syscalls anymore)
  should speed things up
* Merged task and item indexing
* Merged tasks plug into index (questionable)
* taskstate is now no longer a tag, but needs to be configured via
  configs
2026-01-07 11:00:32 +01:00
Zef Hemel 2470bea0b5 Start of rudementary refactoring of indexing Making index logic actually
testable. Three indexers migrated:
* page
* data
* item
2026-01-06 12:21:02 +01:00
Zef Hemel f65abb4704 Lua: start of crypto.* API 2025-11-07 10:49:13 +01:00
Zef Hemel 44a9ae6c0e Support deletion of keys in YAML patch library 2025-11-07 10:47:11 +01:00
Zef Hemel f44f00f4c2 2.2.1 2025-11-03 07:56:44 +01:00
Zef HemelandGitHub 272f293ddb Optional client encryption (#1640)
Implements #1268
2025-10-22 15:35:37 +02:00
Zef Hemel c3a6d7aaaf Add data to itags for data objects to be able to distinguish them. 2025-10-06 16:50:12 +02:00
Zef Hemel b530d99dd6 No longer accept < and > in page names to avoid potential exploints 2025-10-03 09:00:38 +02:00
Zef Hemel 1a650dedd3 deno publish fixes 2025-09-25 09:56:29 +02:00
Zef Hemel f4336bf09f Code restructuring: eliminated the top-level lib/ directory 2025-09-23 17:00:34 +02:00
Zef HemelandGitHub a524c64884 Go backend (#1555)
* Replaces old Deno server with a Go implementation
* Restructured the code base accordingly
2025-09-19 13:23:20 +02:00
MrMugameandGitHub 9faee069a9 Some fixes for #1496 (#1501)
* Fix navigate

When two navigations happen in quick succession (e.g. when using the index page navigation hack), one navigation could get stuck

* Fix headers with `from == 0`

Javascript things ahahah

* Fix `#boot` property for PWAs
2025-08-25 17:22:41 +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 450ef50df7 Cleanup: more cleanup and moving stuff around 2025-06-17 16:12:18 +02:00
Zef Hemel 839860ade8 Fixes #1222 2025-06-05 11:50:33 +02:00
Zef Hemel 0bb30648ab Fix: completely broke resolving, facepalm 2025-06-04 16:03:22 +02:00
Zef Hemel d316657c58 Fixes #1396 2025-06-04 15:42:14 +02:00
Zef Hemel e217f64d36 Improves #1312 by rendering Lua expressions (but not widgets) 2025-06-04 14:57:53 +02:00
Zef Hemel bf2e0cdb87 Refactor: Merging common/ into web/ 2025-06-04 14:01:59 +02:00
wbhoustonandGitHub 3b56740f9e Use UTC year, month, and date for strings lacking time components (#1403) 2025-05-26 20:04:47 +02:00
Zef Hemel 2787c40ebe Better Lua parse error reporting 2025-03-28 12:50:35 +01:00
Zef Hemel dbfc5995f3 More thorough removal of federation 2025-03-21 16:12:10 +01:00
Zef Hemel 1284d15a8b Remove command buttons 2025-03-21 16:12:10 +01:00
Zef Hemel fa8f07a123 Kinda working 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 dde532d1b6 Added silverbullet lua:repl command 2025-03-14 16:43:13 +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 e96a220e1a Meta page completion fix 2025-03-07 11:54:22 +01:00
MrMugameandGitHub e61a447d98 Implementing #913 (#1230)
Implemented custom editors
2025-03-06 15:11:17 +01:00
Zef HemelandGitHub 61f82869e9 Lua integrated query work (#1205)
* Lua query embeddings
2025-01-12 16:54:04 +01:00
Peter WestonandGitHub 83646eba37 recognise tel: uri scheme as a non-local path (#1139) 2024-11-02 22:34:26 +01:00
Zef Hemel 64c98678bc Adjust import for tagRegex 2024-10-20 12:40:43 +02:00
Marek S. ŁukasiewiczandGitHub 010e2b23f4 Allow tags to start with a number and be escaped with angle brackets (#1116)
Includes tests and Markdown/Hashtags page for website. Closes #1072
2024-10-20 12:39:58 +02:00
Zef Hemel 5c8332a109 Cleaning some dependencies 2024-10-11 15:52:37 +02:00
Zef Hemel 6c71862641 Lua: multi-line string literals 2024-10-07 09:08:36 +02:00
Zef Hemel 3cf7b72ebb First integration of Lua into the core (via space-lua code blocks) 2024-10-03 17:55:51 +02:00
Zef Hemel a5c4bcc43b Lua AST refactor 2024-09-29 15:09:13 +02:00
MrMugameandGitHub f7cfe328b8 Fixes #1101 (#1102)
* Make all keywords use @specialize

* Rebuild the grammar

* Making it work in the later parsers
2024-09-29 13:26:44 +02:00
Zef Hemel aa712ed8f4 More work on Lua 2024-09-27 09:11:06 +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
Zef Hemel b1c46a17cf Redoing item and task indexing 2024-08-21 21:31:07 +02:00
Zef Hemel 600e3ce48b lint fix 2024-08-20 09:41:28 +02:00
Zef Hemel b8081d970c Fixes #1049 centralizes page URL encoding and decoding 2024-08-20 09:38:56 +02:00
Zef Hemel 9dd589fcfe lint fix 2024-08-18 13:09:06 +02:00
Zef Hemel 8b811f11c9 Test fixes 2024-08-18 13:08:52 +02:00
Zef Hemel 3ac21498f3 Fixes #680 all times and dates are now local (to the environment) 2024-08-18 13:04:51 +02:00
Zef Hemel cafd001214 Added a ton of JS Doc 2024-08-07 13:27:25 +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 51f756ec60 Fallback for readSetting for old SB versions 2024-08-05 16:34:48 +02:00
Zef Hemel 102e6d10eb Fix deepObjectMerge edge cases 2024-08-03 14:09:12 +02:00