Commit Graph
2649 Commits
Author SHA1 Message Date
Zef Hemel 178cf2d01f Fix in error propagation during boot 2025-12-10 16:43:16 +01:00
Zef Hemel 2772cd408f Switch silversearch to edge build 2025-12-10 10:11:26 +01:00
Zef Hemel 992d83f015 Fixes #1720
Stop intercepting exceptions during single file sync so they become
visible in the UI
2025-12-10 10:05:07 +01:00
Zef Hemel 2efeb93b47 Implements #1707
This splits indexing into two phases:

* preindex (where only pages, space lua, space styles are indexed)
* index (where everything else is indexed)

The goal is to get to more-or-less operational state quicker this way,
because probably most functionality can already be enabled after the
pre-index phase.
2025-12-10 09:48:09 +01:00
Zef Hemel 5d9caacc30 Add source for change to URL decoding 2025-12-10 09:48:02 +01:00
Thomas JostandGitHub bd132dacb2 Include sourcemaps in production builds (#1717)
This makes it easier to debug issues, but also to understand SilverBullet
internals while developing new features in Space Lua.

Fixes #1699.
2025-12-10 09:30:32 +01:00
Zef Hemel 4473164c96 Merge branch 'main' of github.com:silverbulletmd/silverbullet 2025-12-10 09:28:08 +01:00
Michael WeichertandGitHub 78b0b3ae9f feat: Add linkName attribute support for wiki link autocomplete (#1712)
Add support for a linkName frontmatter attribute that controls the alias
text inserted during wiki link autocomplete. The precedence order is:
linkName > displayName > page name.

This allows users to have separate link text from display name. For example,
a page for "Randy Mario Poffo" can have linkName: "Randy Savage" and
displayName: "Macho Man", resulting in [[Randy Mario Poffo|Randy Savage]]
when selected from autocomplete.
2025-12-10 08:39:45 +01:00
Laurence TanandGitHub 30ecaa3985 Fix HEIC/HEIF image MIME type detection (#1709)
* fix content types

* PR feedback
2025-12-10 08:37:14 +01:00
Ohad LutzkyandGitHub f45fcdeb68 Handle error 530 (#1719) 2025-12-06 18:44:22 +01:00
Zef Hemel 8c07783460 Only show offline error for offline errors 2025-12-06 17:17:32 +01:00
Michael WeichertandGitHub 1743fe4464 Fix documentation: rename net.proxyRequest to net.proxyFetch (#1718) 2025-12-06 12:21:55 +01:00
Zef Hemel b4f8a0ce8b Fixes #1091 In case an auth proxy (such as CF Zero Trust) attempts a
redirect, SB now kills the service worker and reloads in the hope that
the redirect will actually kick in.
2025-12-05 15:27:50 +01:00
Matouš Jan FialkaandGitHub 5b03ed872c Space Lua: Add <const> attribute (#1715)
* Space Lua: Implement <const> attribute

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

* Space Lua: Implement <const> attribute

- Add Lua attributes with parse time validation
- Add `<const>` attribute semantic tests

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

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-12-03 15:44:15 +01:00
Zef HemelandGitHub ff02481ede Add Patreon funding option 2025-12-01 19:01:13 +01:00
Michael WeichertandGitHub ba7d8ce5a6 feat: Improve Lua go-to-definition with Ctrl-click support and user feedback (#1713)
- Accept Ctrl-click (Linux) in addition to Cmd-click (Mac) for navigation
- Show flash notification when definition cannot be found (built-in or non-Lua)
2025-12-01 14:13:11 +01:00
Tomasz GorochowikandGitHub ca76e880d7 Improve links in frontmatter (#1711) 2025-11-28 14:43:24 +01:00
MrMugameandGitHub eb6b232444 Fix document editors on safari (#1710)
* Revert document editors to old model

Safari had issues with the previous "hacky" way

* Cleaup panel code
2025-11-28 14:40:05 +01:00
Zef Hemel 683a7d6747 Fix URL parsing in Chrome and other browsers 2025-11-26 09:55:02 +01:00
Zef Hemel dcd7230084 Fixes #1694 2025-11-25 14:17:02 +01:00
Zef Hemel b6e08e8fc7 Fixes #1705
Performing (implicitly) async actions in a `where` filter wasn't
supported. Fixed now.
2025-11-25 13:51:53 +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 80b554a155 Fixes #1703 2025-11-24 16:01:12 +01:00
Zef Hemel 182fe4cc32 Add link to SilverBullet website in README 2025-11-24 13:23:55 +01:00
Zef Hemel 3ee1eb519c README update 2025-11-24 13:22:51 +01:00
Zef Hemel bfba987b2e Additional updates to changelog 2025-11-24 11:16:27 +01:00
Zef Hemel 28cc8787b3 URIs -> URI 2025-11-24 10:57:13 +01:00
Zef Hemel e7b03045e5 More page renames 2025-11-24 10:55:49 +01:00
Zef Hemel 0b028e4436 Library development page rename 2025-11-24 10:53:46 +01:00
Zef Hemel 21ddcb462e 2.3.0 2025-11-24 10:48:00 +01:00
Zef Hemel d5fbbbdaac Website content refactor (mostly pluralized page names to singular ones) 2025-11-24 10:47:10 +01:00
Zef Hemel 96fb9f8a03 Changelog and manual updates 2025-11-24 10:24:09 +01:00
Zef Hemel 2ced6de1ee Using topWidget to render beta-level on website 2025-11-24 10:24:02 +01:00
Zef Hemel 9e8e717ea3 Fixes #1352 2025-11-24 09:57:02 +01:00
Laurence TanandGitHub 0e9a6015e9 handle invalid-path errors (#1701) 2025-11-24 08:52:55 +01:00
Lelouch HeandGitHub 7afda4aa37 Follow the system theme automatically when dark mode toggle was not set before (#1696)
* follow browser theme unless darkmode was set before

* trigger workflow
2025-11-21 15:46:25 +01:00
Matouš Jan FialkaandGitHub c50bb49205 Space Lua: Add support for \t in strings (#1698)
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-11-21 09:36:45 +01:00
Zef Hemel e837059501 Update TreeView URL to official repo 2025-11-19 17:00:52 +01:00
Zef Hemel 80ab0151cc CHANGELOG updates 2025-11-19 17:00:13 +01:00
Zef Hemel 34210b9a52 Rename LaTeX library to Math 2025-11-19 15:01:59 +01:00
Zef Hemel 8117342c2c Better URI to name translations for repo URIs 2025-11-19 14:57:45 +01:00
Zef Hemel 8395d2ab63 Propagate errors (e.g. when disabled) for proxy fetch 2025-11-19 14:57:32 +01:00
Zef Hemel b0f6b9a33d Add permission check before write/delete operations This avoids
accidentally writing to a read-only file and only finding out about it
after a sync.

Also removes redundant space primitive implementations that weren't used
2025-11-19 14:57:10 +01:00
Zef Hemel ce25cc9d9e Adding more libraries to the Std repo 2025-11-18 17:08:49 +01:00
Zef Hemel 5d0bcbd913 Update Excalidraw to official repo 2025-11-18 16:44:01 +01:00
Matouš Jan FialkaandGitHub 7912f05949 Space Lua: Add goto and labels support (#1686)
* Space Lua: Add AST block type label/goto and duplicated label bools
* Space Lua: Add label/goto resolution and evaluation

Add per block map of labels metadata, per function block metadata cache
and `processBlock` to track AST blocks (`If`, `While`, `Repeat`, `For`
and `ForIn`, and `Do`) while recording labels and their positions.

Align with Lua scoping rules (_e.g._, a `goto` can not jump into the
scope of a local). Also allow the super-special "safe" end of block
cases (except inside `Repeat`). Duplicated labels are detected (error
`label 'foo' is already defined` etc.). The AST context for error
reporting is preserved. The `WeakMap` caches map any block to its
function's metadata.

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

* Space Lua: The `goto` parse flags and eval path

At parser mark each block with `hasLabel`/`hasGoto` and record the first
duplicated label. Flags then propagate through blocks and control flow.

If no `goto`, run the block in a simple loop and raise duplicate label
error if any is present. If `goto` exists, jump via a label map.

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

* Space Lua: Add labels and `goto` statement test suite

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

* Space Lua: Minor `goto`/labels improvement and test hotfix

- The `getBlockGotoMeta` now called only when a block has either
  `hasGoto` or `hasLabel`.

- Add `BlocksFlags` type to get rid of some `(... as any)`s by view.

- Add `blockMetaOrThrow` helper.

- Fix test to reflect standard Lua semantics.

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

* Space Lua: Goto: Add missing Lua semantics checks

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

* Space Lua: Goto: Add Lua semantics checks also covered in Lua tests

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

* Space Lua: Goto: Fix semantic divergence revealed by fixing unfinished test

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

* Fix typo

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

* Space Lua: Optimize block env creation and cache goto metadata

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

* Avoid using the venomous snake case

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

* Add comment for WeakMap use

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

* Space Lua: Block Label Fast-path Optimization

Add block flag `hasLabelHere` during parsing and use it in eval to skip
expensive metadata generation for blocks and entire functions without
label or goto.

Refactor eval logic:
- early fast path when a function is known to have no label/goto,
- later fast path for blocks in functions with goto.

Fetch metadata only when needed.

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

* Space Lua: Remove `BlockFlags` indirection from eval

- Add `hasLabelHere` flag to `LuaBlock`.
- Remove `BlockFlags` indirection from eval.
- Set `hasLabelHere` directly.
- Add some "guards".
- Improve consistency of child filtering.

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

* Remove redundant return statement

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

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-11-18 16:35:08 +01:00
Zef Hemel 6d81aeb4c2 Fixes #1687 2025-11-17 15:50:12 +01:00
Zef Hemel 79df63bd79 Add Silversearch to silverbullet.md
Alternative implementation of #1689
2025-11-17 14:54:50 +01:00
Zef Hemel 90473bd3b9 Website updates 2025-11-17 14:45:52 +01:00
Zef Hemel aae9805e32 Add a few more libraries to Std 2025-11-17 14:45:45 +01:00