Commit Graph
721 Commits
Author SHA1 Message Date
Zef Hemel 29570a3760 Allow for custom widgets through hooks:renderBottomWidgets and hooks:renderTopWidgets 2025-03-16 14:35:59 +01:00
Zef Hemel e93bff7fe4 Disable lua directive rendering on any page starting with "meta/template" 2025-03-15 20:57:22 +01:00
Zef Hemel 64be2db120 Small fix 2025-03-14 21:50:06 +01:00
Zef Hemel dde532d1b6 Added silverbullet lua:repl command 2025-03-14 16:43:13 +01:00
Zef Hemel 6307ce4242 Lua widget revamp 2025-03-14 15:58:01 +01:00
Zef Hemel 418138f9c9 Lint fixes 2025-03-14 10:37:30 +01:00
Zef Hemel 98befe3a33 Lua widget event support 2025-03-14 10:36:41 +01:00
Zef Hemel f514ef1b53 Lua: support passing Lua function callbacks to native JS functions 2025-03-14 10:02:25 +01:00
MrMugameandGitHub d3cc3e0d48 Add image viewer (#1289)
* Fix legacy support for navigation

* Fixes timing issue with document editors

If silverbullet was directly loaded into a document editor it would set
the darkmode after loading the editor, causing a wrong value to be
passed

* Add basic `image-viewer`

This add adds a basic image viewer using the panzoom library from Timmy
Willison

* Svgs somehow don't accept 100% width

* Make `internal` a property of a message

* Add `editor.sendMessage` syscall

* Update forgotten internal syscall

* Add small info command to image-viewer

* Change indent to two spaces

* Move zoom in button to the right

* Switch rotation direction

* Display mime type instead of file extension
2025-03-14 09:42:23 +01:00
Zef Hemel 6dfc342594 Fix crash on sync mode first load after update, no longer wait for space scripts to load before starting editor 2025-03-14 09:33:17 +01:00
Zef Hemel 7ff0d17ba1 Fixes #1285 2025-03-10 16:24:06 +01:00
Zef Hemel 64feb6e608 parentNodes added to page:click event 2025-03-08 18:35:08 +01:00
MrMugameandGitHub 51b0fcd819 Combine reload functions in client (#1283) 2025-03-08 17:17:29 +01:00
Zef Hemel 7c68501696 Fix page creation 2025-03-07 21:09:49 +01:00
Zef Hemel 7f666e7481 Add confirmation before deleting document 2025-03-07 20:59:46 +01:00
MrMugameandGitHub 81d3732dd2 Update currentPath on file change (#1282) 2025-03-07 20:31:42 +01:00
Zef Hemel e6884d965a Lint issues 2025-03-07 16:05:59 +01:00
Zef Hemel 3e0cfcc48a Don't double filter file lists based on spaceIgnore 2025-03-07 16:04:52 +01:00
Zef Hemel d33db399c8 Auto complete and lint fixes 2025-03-07 15:13:47 +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 e56ff4ab07 Disable spell check on coding languages 2025-03-07 13:12:31 +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 1dc1103b2a Moved indexPage configuration to SB_INDEX_PAGE env variable instead
Added /.config endpoint to more dynamically influence the configuration
2025-03-07 10:56:45 +01:00
Zef Hemel af93da7c43 Authentication page layout improvements 2025-03-07 09:09:32 +01:00
Zef Hemel 0acd600222 Fix lint 2025-03-06 16:17:12 +01:00
Zef Hemel 605a586ca8 Reduce race condition on individual file sync and slow connection 2025-03-06 16:14:44 +01:00
Zef Hemel 4c58719bde Fix having to reload 3x before new client files are properly loaded 2025-03-06 15:37:43 +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
Allie StephanandGitHub 6190a4ff06 Vim Mode and Read Only Fixes (#1240)
* Vim Mode and Read Only Fixes

- remove client.focus call from global keydown handler. This call causes
  issues with vim mode.  For instance typing j with the editor not
  focused would insert a j before properly going to normal mode instead
  of just moving down a line as expected
- add client.reloadPage call to setUiOption syscall. This appears to fix
  read only mode that is broken without the above focus call.  In
  particular when switching between vim and regular mode read only mode
  was previously broken even with the client.focus call
- add client.focus call to CommandPalette onTrigger if no cmd is
  selected. Without the client.focus call above, the editor is no longer
  selected when exiting the command palette with escape - this call
  fixes that
- add watch-all task to deno.json to run all 3 watches in 1 terminal
  window

* Update watch-all

Fix watch-all order so that arguments get passed to watch-server
2025-03-02 15:22:33 +01:00
Mufeed AliandGitHub c37a2ae0ed fix(editorState): Reset undo history after editor init (#1267) 2025-03-02 15:16:24 +01:00
Zef Hemel f8ebafcbb4 Removed legacy fallback code in index.html as mentioned in #1262 2025-02-25 20:05:38 +01:00
MrMugameandGitHub a6af94b9e3 Remove editor.setText syscall from client (#1263) 2025-02-25 20:02:59 +01:00
Zef Hemel 280fa2cd3c Deno upgrade, lint related fixes 2025-02-25 18:05:58 +01:00
Simon CambierandGitHub 411416fe65 Feature/move lines up down (#1232)
* Move lines up/down
2025-02-23 20:49:52 +01:00
Zef Hemel 6f4b02298c deno task fmt 2025-02-23 20:46:41 +01:00
Zef Hemel 5cc7b47d6a Fix lint 2025-02-22 12:21:07 +01:00
MrMugameandGitHub 606077b98a Uses the correct function map for index navigation (#1257) 2025-02-22 12:19:03 +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
MrMugameandGitHub f553c62950 Fix spell checking for code blocks and inline code (#1244) 2025-02-22 12:06:01 +01:00
numanandGitHub 2a3c926849 add rebuildEditorState function to the syscalls (#1254) 2025-02-22 11:51:37 +01:00
Zef Hemel 9e0925beff Fix lint issues 2025-02-22 11:50:44 +01:00
Zef Hemel 5111b5a380 http.request Lua syscall 2025-02-13 21:12:00 +01:00
Zef Hemel 9d3b9a8a22 Reduce code duplication 2025-02-13 20:11:08 +01:00
Zef Hemel cf81594b02 Fixes #1236 2025-02-13 20:11:08 +01:00
Zef Hemel 7abb096382 Lua: better handle nil, null and undefined values for Lua directives 2025-02-10 20:30:37 +01:00
Zef Hemel 8e8acbb470 Fix service worker proxy 2025-02-10 15:38:14 +01:00
Zef Hemel 5eb2405823 Fixes #1234 2025-02-09 17:57:59 +01:00