Commit Graph
42 Commits
Author SHA1 Message Date
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 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
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 fbe145e75b deno task fmt 2025-03-07 12:18:14 +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
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
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
Marek S. ŁukasiewiczandGitHub 1fc061ac6a Auto complete folder in Page Picker (#961) 2024-07-19 17:10:39 +02:00
Daniel MichelandGitHub cb6ee137f2 Improve modals (#840)
* Adjust picker input to take up all remaining space

* Improve modals and buttons

* Remove confusing focus of scrollable result list in Firefox

* Adjust css for dark themes, add background for text field in prompt

Seperate accent color for text to increase contrast in dark theme
Set css color-scheme to dark for dark theme

* Fix buggy when entering very long text in picker

* Prevent key events from propagating outside of modals

* Always show focus on button

* Add the keydown event listener directly to the mini editor

* Do not refocus the mini editor when it loses focus and refactoring of the AlwaysShownModal.

* Fix reference to button and mini editor focus in chrome

* Fix selected option index capping in filter when using page down
2024-04-20 16:22:02 +02:00
MaksandGitHub 8a3782e946 improve dependency management (#770)
* use import_map.json instead of per-file import

* remove test_deps.ts in favor of import_map

* remove common/deps.ts in favor of import_map

* use import_map instead of server/deps.ts

* make all plug-api files usable without an import_map

* make all lib files usable without an import_map

* remove web/deps.ts in favor of import_map

* fix plug build

* remove plug-api/deps.ts in favor of lib/deps.ts

* fix server deps bundled in client deps
2024-03-16 15:29:24 +01:00
Zef Hemel e919aa82e9 0.7.4 2024-02-29 15:23:05 +01:00
Zef Hemel bb1e49a11e More moving stuff around 2024-02-08 21:12:23 +01:00
Zef HemelandGitHub 60d3199d64 Giant code reorganization (#690)
Code restructure
2024-02-08 21:00:45 +01:00
Zef HemelandGitHub f30b1d3418 Templates 2.0 (#636)
Templates 2.0 and a whole bunch of other refactoring
2024-01-20 19:16:07 +01:00
Zef HemelandGitHub a2dbf7b3db PlugOS refactor and other tweaks (#631)
* Prep for in-process plug loading (e.g. for CF workers, Deno Deploy)
* Prototype of fixed in-process loading plugs
* Fix: buttons not to scroll with content
* Better positioning of modal especially on mobile
* Move query caching outside query
* Fix annoying mouse behavior when filter box appears
* Page navigator search tweaks
2024-01-15 16:43:12 +01:00
Zef Hemel 8577fb95db Filter pages on tags 2023-12-21 19:49:25 +01:00
Zef Hemel 70ef6ed9da Work on #587: revamped templates 2023-12-21 18:38:02 +01:00
Zef Hemel 2a10d50094 Fixes #193: Allowing plug overrides 2023-08-20 19:54:31 +02:00
Zef Hemel 136682ebd3 Fixes #504 2023-08-20 18:02:13 +02:00
Zef Hemel 2c8e1f1809 Shift-Enter in the page navigator now takes the input literally 2023-08-01 21:37:52 +02:00
Zef Hemel 6510f06e0e Replacing fuzzy search with fuse.js 2023-07-25 17:33:07 +02:00
Zef Hemel 7cd88eca14 Fixes #475 2023-07-24 09:36:10 +02:00
Zef Hemel a116b7aadd Fixes #422 2023-07-02 14:10:03 +02:00
Zef HemelandGitHub 5f484bed57 SilverBullet pivot to become an offline-first PWA (#403) 2023-05-23 20:53:53 +02:00
c3d5f4275e better up / down handling in FilterList (#232)
Better up/down handling in FilterList; fixes #230

Co-authored-by: Zef Hemel <zef@zef.me>
2023-01-03 21:27:46 +01:00
Zef Hemel 52f0c14c78 Fixes #207 2022-12-21 16:08:51 +01:00
Zef HemelandGitHub 3545d00d46 Major mini editor refactoring (#225)
Replaces most editing components with CM components, enabling vim mode and completions everywhere

Fixes #205 
Fixes #221 
Fixes #222 
Fixes #223
2022-12-21 14:55:24 +01:00
Zef Hemel f08d52a098 Fixes #209 2022-12-17 09:07:09 +01:00
Zef HemelandGitHub 2d6a24dc49 Switch to feather icons (#175)
Switch to feather icons
2022-12-08 17:04:07 +01:00
Zef Hemel be6d98ba1a Fix JS error when clicking an item in a filter list 2022-11-19 15:22:33 +01:00
Zef HemelandGitHub 24c17a793f Live Preview (#119)
Live preview mode is here
2022-11-18 16:04:37 +01:00
Zef Hemel b6050fea3b Always make "Create" option appear as second item in filter list 2022-10-29 09:27:18 +02:00
Zef HemelandGitHub 561aa6891f Migrate to Deno (#86)
Big bang migration to Deno 🤯
2022-10-10 14:50:21 +02:00