Update editor, themes, menus, backgrounds, and release tooling

This commit is contained in:
Knotty Wyvern
2026-10-14 16:19:51 -07:00
parent f6eaa52949
commit edef2520af
113 changed files with 5722 additions and 386 deletions
+46 -4
View File
@@ -12,7 +12,7 @@ Terminal and Table formulas use the same installed package system as all other p
1. Clone `RuneStone_TableFormulas` beside RuneStone and run `pnpm install --frozen-lockfile` in that checkout.
2. Run `pnpm build:plugins` from the RuneStone repository root for Table formulas.
3. In Settings → Plug-ins, choose Install plugin ZIP.
4. Select the ZIP files in `plugin-packages/`, then choose Install and enable.
4. Select the ZIP files in `../RuneStone_TableFormulas/releases/`, then choose Install and enable.
The build creates `runestone.table-formulas-0.1.0.zip`.
Table formulas is a development package in its [own repository](https://git.knottywyvern.com/kwyvern-gitea/RuneStone_TableFormulas).
@@ -61,7 +61,7 @@ Each package succeeds or fails independently. The result identifies any failures
A changed source requires a new review. Cancelling the review removes its temporary copies.
Try the example with `pnpm package:plugin fixtures/plugins/workspace-overview`.
Install the resulting ZIP from `plugin-packages/`, then choose Install and enable.
Install the resulting ZIP from `releases/`, then choose Install and enable.
Use Open tab or view beside New tab to open Workspace overview.
Use Commands in the toolbar to run Show workspace overview.
@@ -216,7 +216,9 @@ Keep JavaScript readable where practical. Avoid minification and obfuscation tha
3. Install the resulting ZIP in RuneStone and test its features, disable action, and uninstall action.
4. Share that same ZIP as the release file.
Use Node.js 24 or later for the packaging command. The default output folder is `plugin-packages/`.
Use Node.js 24 or later for the packaging command. The default output folder is `releases/` in the project that contains the compiled folder.
Keep plugin release ZIPs in that plugin project, including when the host calls the build.
Explicit output folders are for temporary checks or staging. Move completed releases into the owning project's `releases/` folder.
It checks the manifest, paths, entry module, and size limits before it writes `<id>-<version>.zip`.
It includes every file in the input folder. Keep dependencies, credentials, and unrelated build files outside that folder.
The output folder must be outside the input folder.
@@ -447,7 +449,7 @@ The plugin must stop its mounted controls and native sessions in `onDispose` bef
| `src/lib/plugins/TerminalSlot.svelte` | The host element for terminal controls |
| `../RuneStone_Terminal/src/` | Terminal plugin source in its own repository |
| `../RuneStone_TableFormulas/` | Table formulas source, unit tests, and package build |
| `scripts/buildPlugins.mjs` | Table formulas compilation and ZIP release in `plugin-packages/` |
| `scripts/buildPlugins.mjs` | Table formulas compilation and ZIP release in `../RuneStone_TableFormulas/releases/` |
| `scripts/packagePlugin.mjs` | Shared checks and ZIP creation for plugin authors |
Run `pnpm build:plugins`, `pnpm check`, `pnpm test`, `pnpm build`, and `cargo test --manifest-path src-tauri/Cargo.toml --lib --offline`.
@@ -497,3 +499,43 @@ The Git graph uses graphical commit nodes and parent links. It shows forks, merg
The host returns structured history from `git.graph()`: `{ commits: [{ id, parents, refs, summary, author, date }] }`.
The graph keeps the latest 100 commits. Dashed links mark parents outside that history.
The updated Git package requires the matching host build. An older host shows an update message instead of a graph.
## Temporary background API
RuneStone 0.1.25 adds optional `api.backgrounds` with `version: 1`.
Background Slideshow uses it for local image folders and temporary backgrounds.
Project Management 0.2.29 uses it for board backgrounds.
| Method | Contract |
| --- | --- |
| `chooseFolder()` | Open the native folder picker. Return an absolute path or null on cancellation. |
| `defaultFolder()` | Optional. Create and return Pictures/RuneStone Backgrounds for new settings. |
| `list(folder)` | List PNG, JPEG, GIF, and WebP filenames directly inside the folder. |
| `read(folder, name)` | Read one raster image as bytes, with a 50 MiB limit. |
| `set(target, frame)` | Apply a temporary frame. Pass null to remove this plugin's frame. |
| `get(target)` | Read the active frame or null. |
| `subscribe(listener)` | Receive the changed target. Return a cleanup function. |
Targets are `app`, `pm-all`, and `pm-board:<board UUID>`.
A frame contains `url`, `overlay`, `position`, and `size`.
It can also contain `previous` with those four fields and `transitionMs` from 0 to 5000.
Renderers fade between these frames unless reduced motion is active. Keep both blob URLs valid until replacement or cleanup.
Use a blob URL. The publishing plugin owns the URL and must release it after replacement or cleanup.
Overlay ranges from -1 to 1. Negative values lighten the image, and positive values darken it.
Position and size use the same choices as custom image settings.
Frames belong to the plugin activation in the current window. They do not change saved background settings.
The last published frame wins. Removing it reveals an earlier active frame or the saved background.
Project Management checks a temporary board frame first, then `pm-all`, then the saved board image.
Disable removes the plugin's frames and subscriptions before cleanup.
File access requires an active plugin lease. Pending reads fail after access is revoked.
Image reads reject path traversal, linked files, unsupported formats, and oversized files.
Each window keeps its own sequence. The plugin settings API shares folder and playback settings across windows.
### Per-image background settings
Slideshow stores per-image fit, position, and overlay in .runestone-backgrounds.json beside the images. The sidecar uses schema 1 and an images object. Settings saves compare the previous file text to preserve external changes. The sidecar has a 1 MiB limit.
Portrait images show the full image over a blurred cover layer by default. Each target scales the foreground and blurred layer separately. The image editor shows a preview and lets users save or reset an override. Global settings remain the fallback for other images.
The optional background API adds readImageSettings and writeImageSettings. Temporary frames can supply blurredUrl. The plugin owns all frame URLs and releases them after replacement or shutdown.