Commit Graph
26 Commits
Author SHA1 Message Date
Zef Hemel 64c4581b0e Initial implementation of experimental Comment support (parsed and custom rendered HTML comments) 2026-08-06 10:15:57 +02:00
henrikxandGitHub 45dd29e3b5 Clarify document sync property description (#2075) 2026-08-01 10:14:51 +02:00
Zef Hemel 6c9c2f7d17 Feature: frontmatter folding 2026-06-29 16:45:16 +02:00
pimartiandGitHub 01cdcfe261 allow operator-pending mode in vim keybindings (#1999) 2026-05-28 15:46:13 +02:00
Zef Hemel 2e8ed7f405 Remove [[CONFIG]] links from std lib, since CONFIG is no longer auto generated 2026-05-14 13:42:36 +02:00
Zef Hemel a28c661d24 refactor: config: rename ui order to priority (consistency with rest of SB), flip sort direction
Also: docs
2026-05-03 16:06:45 +02:00
Zef Hemel 5a9f9ed101 Std Library: remove plug-manager and legacy Library Manager
Drop the old plug-manager plug and the Space-Lua Library Manager, all superseded by the Libraries tab in the configuration manager.

Pass fallback values to config.get(...) in the Std widgets so  TOC / linked mentions / linked tasks keep rendering on a fresh  space where schema defaults haven't been indexed yet.
2026-04-21 16:59:00 +02:00
Zef Hemel d25e98b932 Std Library: wire schema defaults and UI categories
Registers UI categories and moves default values from `config.set` blocks into schema `default` fields, so the configuration manager can drive everything directly from the schema. Only `actionButtons`, whose entries hold function bodies, stays in `config.set`.

Also adds a schema for `github.*` settings so the integration shows  up in the configuration UI (later commit)
2026-04-21 10:06:52 +02:00
Zef Hemel ea2ad9a732 Add actionButton.define "command" attribute
This automatically triggers a command bound to an actionButton, and
notably also shows the keyboard shortcut connected to it (if any)
2026-04-16 14:23:54 +02:00
Zef Hemel 7d4f4312d1 Move home button outside of dropdown as well (default) 2026-03-26 17:39:47 +01:00
Matouš Jan FialkaandGitHub 6d52350640 Fix extended task rendering in widgets (#1882)
* Fix extended task rendering in widgets

This patch addresses several issues.

1. Extended tasks like `[PLANNED]` or `[TODO]` were not rendering
   correctly when generated via widgets. The HTML renderer was producing
   plain text without brackets or proper styling, while simple `[x]`
   tasks worked fine.  The fix produces the same DOM structure as
   CodeMirror producing coherent styling everywhere.

2. Widget checkboxes are not interactive now. Since widget tasks have no
   backing state handler clicking them only caused a misleading visual
   toggle with no effect. The `disabled` attribute prevents this
   confusion and the dimmed appearanceit signals to the user that the
   checkbox is read-only in this context which is the truth.

To see it in action try the following Markdown snippet in SilverBullet:

```
- [x] #foo [att: i]
- [PLANNED] bar #bar [att: i]

${'- [x] #foo [att: i]\n- [PLANNED] bar #bar [att: i]'}
```

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Revert and just prevent widget checkboxes from toggling visually

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Support custom task states in widgets and indexer

Custom task states like `[PLANNED]` or `[IN PROGRESS]` now render
correctly in *widgets*, matching the same DOM structure as CodeMirror
uses in the editor. Widget-rendered tasks that reference a real task
(via `page@pos`) are fully interactive — clicking an extended state
cycles it through the configured states and updates the source task.
Tasks without a reference are disabled to prevent misleading visual
feedback.

The task indexer now respects the `done` flag on custom states defined
via `taskState.define`, so queries like `where not t.done` correctly
exclude tasks in states marked as done. Previously only the built-in
simple tasks (`- [x]` or `- [X]`) states were treated as completed. The
`Task: Remove Completed` command already handled custom done states and
continues to work unchanged.

State cycling now preserves the definition order from `taskState.define`
calls instead of sorting alphabetically. A new `order` field allows
explicit control over the cycle sequence. Without it, states cycle in
definition order. With it, states are sorted by the `order` field value.
This gives users full control over the progression, for example:

    PLANNED --> IN PROGRESS --> FINISHED

The `taskState.define` API now validates its input against a schema:
`name` (string, required), `done` (boolean, optional), and `order`
(number, optional).

The `expandMarkdown` no longer injects "fake" `page@pos` references into
tasks rendered via `widget.markdownBlock` or `widget.new` which was
causing broken links and unwanted interactivity on static task content.

The `task:stateChange` event is dispatched when toggling tasks from
widgets, ensuring Lua listeners (such as some custom completed timestamp
management) fire correctly regardless of where the toggle originates.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2026-03-13 13:32:26 +01:00
Zef Hemel b60496f30e Move forward/backward action buttons to drop-down on mobile 2026-03-13 08:39:20 +01:00
Zef Hemel 1b0ba027b3 Add standalone option to action buttons
When `standalone` is set to true, this action button will only appear in
"standalone PWA" mode (e.g. home-screen mobile apps, or installed PWA on
desktop). Useful to e.g. only show forward and backward buttons. These
forward and backward buttons are now also added to the default action
button config.
2026-03-12 14:51:31 +01:00
Zef Hemel 6bc12bc00f Add support for opting out action buttons from the drop down on mobile
+ by default making the page picker opt out
2026-03-12 14:27:20 +01:00
Zef Hemel 0773df31e2 Add validation and error handling for object indexing
- Introduced a new `validate` callback for `tag.define`
- Added `index.validateObjects` API to validate and transform objects before indexing.
- Updated relevant documentation and examples to reflect these changes.
2026-02-03 15:59:04 +01:00
Zef Hemel bd03a406f0 Renamed postIndex to transform for tag.define API (experimental). 2026-01-27 09:33:00 +01:00
Zef Hemel 9b05beba16 First pass of custom tag behavior (schema and postProcess) support
See API/tag.md for explanations and examples.
2026-01-22 15:32:01 +01:00
Zef Hemel fb10fd65b8 shortWikiLinks config option 2026-01-22 08:42:30 +01:00
Zef Hemel 8acad63565 Reorganized keyboard shortcuts a little bit and documented them. 2026-01-21 11:01:11 +01:00
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 38f411baa3 Disables indexing all paragraphs by default
To enable: `config.set("index.paragraph.all", true)`
2026-01-05 15:36:40 +01:00
Zef Hemel 0f57a03542 Remove full-text search from SB core
Now available as separate library:
https://github.com/silverbulletmd/basic-search/blob/main/PLUG.md
2025-11-24 16:33:17 +01:00
Zef Hemel 13bd2c9082 Exposing MQ to Lua properly 2025-11-07 10:48:40 +01:00
Zef Hemel 26d9d5bdf0 Restructure standard library and improve documentation
Refactor Library/Std into subfolders for APIs, Infrastructure, Editor,
Widgets, etc. Add more documentation and descriptions. Update references
throughout website and docs.
2025-10-01 11:22:31 +02:00
Zef Hemel 7c663ce1df Fixes #1572 2025-09-29 15:39:56 +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