@vestra-player/sdk 1.6.20 → 1.6.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/commands.d.ts +1 -1
- package/dist/commands.js +8 -8
- package/dist/docs-tree.json.gz +0 -0
- package/dist/i18n-tools.js +7 -2
- package/dist/plugin/testing/commands.js +3 -3
- package/dist/plugin/types/base.d.ts +1097 -0
- package/dist/plugin/types/base.js +1 -0
- package/dist/plugin/types/commands.d.ts +1189 -0
- package/dist/plugin/types/commands.js +1 -0
- package/dist/plugin/types/packages.d.ts +661 -0
- package/dist/plugin/types/packages.js +1 -0
- package/dist/plugin/types/playback.d.ts +1654 -0
- package/dist/plugin/types/playback.js +1 -0
- package/dist/plugin/types/processing.d.ts +974 -0
- package/dist/plugin/types/processing.js +1 -0
- package/dist/plugin/types/services.d.ts +1132 -0
- package/dist/plugin/types/services.js +1 -0
- package/dist/plugin/types/snapshots.d.ts +491 -0
- package/dist/plugin/types/snapshots.js +1 -0
- package/dist/plugin/types/sources.d.ts +302 -0
- package/dist/plugin/types/sources.js +1 -0
- package/dist/plugin/types/subtitles.d.ts +327 -0
- package/dist/plugin/types/subtitles.js +1 -0
- package/dist/plugin/types/ui-content.d.ts +692 -0
- package/dist/plugin/types/ui-content.js +1 -0
- package/dist/plugin/types/ui-layout.d.ts +1079 -0
- package/dist/plugin/types/ui-layout.js +1 -0
- package/dist/plugin/types/ui-locale.d.ts +490 -0
- package/dist/plugin/types/ui-locale.js +1 -0
- package/dist/plugin/types/ui-shell.d.ts +1072 -0
- package/dist/plugin/types/ui-shell.js +1 -0
- package/dist/plugin/types.d.ts +18 -11072
- package/llms.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.22
|
|
4
|
+
|
|
5
|
+
**Who must change: nobody.** Tables follow the menu's Adjustments and Effects and Sidebar items: a data refresh of `BUILTIN_COMMANDS`; no API change, `apiVersion` stays `vestra/1`. A plugin whose tests compare a title or path against the table sees the player's current one.
|
|
6
|
+
|
|
7
|
+
- **`BUILTIN_COMMANDS`**: the player's `host/adjust` is titled **Adjustments and Effects** (was Adjust) and `host/sidebar` **Sidebar** (was Toggle Sidebar), both now top-level menu items in the `windows` group (orders 791 and 800, no default key), named like their bottom-bar buttons (user ruling 2026-11-08). The items they replace, Picture… (`vestra.video/video.picture`, Alt+1), Audio… (`vestra.audio/audio.workbench`, Alt+2), Subtitles… (`vestra.subtitles/tune`, Alt+3), Playback… (`vestra.playback/panel`, Alt+4) and Playlist (`vestra.playlist/playlist.visibility`, F6), are now outside the menu (command palette), with their ids, titles, keys and categories unchanged. `BUILTIN_SUBMENUS` is unchanged. The tables and the top-level tree in [Reference: commands](docs/reference/commands.md) follow.
|
|
8
|
+
- **`TestHost`** refuses a plugin item on or under the player's new Adjustments and Effects and Sidebar items with `conflict`, as the player does (it reads the player's own items from `BUILTIN_COMMANDS`).
|
|
9
|
+
- The guides that named the bottom bar's Adjust and Toggle Sidebar buttons use the new names.
|
|
10
|
+
|
|
11
|
+
## 1.6.21
|
|
12
|
+
|
|
13
|
+
**Who must change: nobody.** Step 1 of the SDK refactor, batch G (`doc/specs/sdk-refactor.md` §4 in the player repository): `src/plugin/types.ts` is split by domain; no API, behaviour or wire change, `apiVersion` stays `vestra/1`. A tool that reads `dist/plugin/types.d.ts` by path must now read `dist/plugin/types/*.d.ts` as well, since that file only re-exports them (the player's host-agreement test and the Workshop prompt follow with the player's upgrade).
|
|
14
|
+
|
|
15
|
+
- **The plugin API types are in `src/plugin/types/*.ts`**, one file per documentation category: `base` (Plugin: `Disposable`, `Scope`, `Plugin`, errors, stop reasons, the app and main window), `commands` (with host actions and key bindings), `ui-content`, `ui-layout`, `ui-locale` and `ui-shell` (UI in four parts), `playback` (timeline and player), `processing`, `subtitles`, `snapshots` (Media), `sources`, `packages` and `services`, each below 2,000 lines (the 11,400-line file was one). `src/plugin/types.ts` keeps its re-exports of the wire types and re-exports every file with `export type *`, so `@vestra-player/sdk` exports the same names with the same declarations and doc comments; the only change inside a comment is one more `../` in its relative links (`../../../docs/…`, `{@includeCode ../../../examples/…}`). The files are named so that the reference keeps its order: every category, the inherited members of every interface and every type's hierarchy appear as before; `test/types-layout.test.ts` keeps it so (one category per file, a parent's file sorting and re-exported before its child's).
|
|
16
|
+
- **`{@link}` targets resolve in the published declarations.** tsc drops imports used only in doc comments; `npm run build` puts them back into `dist/plugin/types/*.d.ts`, so an editor resolves `{@link Scope.onError}` or `{@link Window}` to the SDK's declaration, not to nothing or to the DOM's `Window`. `test/dist-links.test.ts` checks every link.
|
|
17
|
+
- **The layer check knows the type files** (`scripts/check-layers.mjs`, rule 5): `types.ts` and `types/*.ts` hold interfaces and type aliases only and every import or re-export, relative or not, is `import type` / `export type`, so the cycles among them are type-only and allowed.
|
|
18
|
+
- **The documentation scripts find a declaration by name**, not by file (`typeFile()` in `scripts/doc-tables/lib/source.mjs`, used by `doc-lint` and the error-code, core-action, limit and player-version tables). The player-version table in [Reference: manifest](docs/reference/manifest.md) lists the same API per player version, each row now sorted by name.
|
|
19
|
+
- **`vestra-plugin i18n`** recognises the SDK's call sites (`text`, `commands.add`…) in the new declaration files (`dist/plugin/types/*.d.ts`) as it did in `dist/plugin/types.d.ts`.
|
|
20
|
+
- The entry declaration files (`dist/index.d.ts`, `dist/plugin/testing/index.d.ts`, `dist/player-runtime.d.ts`) are byte-identical and every declaration they export reads the same, doc comment included, apart from relative paths; the declarations now live in `dist/plugin/types/*.d.ts`; the API surface snapshot, golden wire traces, pass counts, `docs:check`, `doc-lint` output and `llms.txt` are identical, and the documentation site has the same pages.
|
|
21
|
+
|
|
3
22
|
## 1.6.20
|
|
4
23
|
|
|
5
24
|
**Who must change: nobody.** Tables follow the A-B Loop's move to the Playback panel: a data refresh of `BUILTIN_COMMANDS`; no API change, `apiVersion` stays `vestra/1`. A plugin whose tests compare an owner against the table sees the player's current one.
|
package/dist/commands.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ export declare const MENU_IDS: readonly ["open", "playback", "subtitles", "video
|
|
|
137
137
|
* every icon of the player's V-Line set, `@vestra/icons.slint` (draw one
|
|
138
138
|
* in your own Slint with `Icon { name: "store"; }`). The player's tests check
|
|
139
139
|
* that this list is its icon set. `"sliders"` (three sliders, the player's
|
|
140
|
-
*
|
|
140
|
+
* Adjustments and Effects button) is new in player 0.7.6 (SDK 1.6.11); older players refuse
|
|
141
141
|
* it as a button icon with `invalid`.
|
|
142
142
|
*
|
|
143
143
|
* @example Check in a test that the button's icon exists
|
package/dist/commands.js
CHANGED
|
@@ -142,7 +142,7 @@ export const MENU_IDS = [
|
|
|
142
142
|
* every icon of the player's V-Line set, `@vestra/icons.slint` (draw one
|
|
143
143
|
* in your own Slint with `Icon { name: "store"; }`). The player's tests check
|
|
144
144
|
* that this list is its icon set. `"sliders"` (three sliders, the player's
|
|
145
|
-
*
|
|
145
|
+
* Adjustments and Effects button) is new in player 0.7.6 (SDK 1.6.11); older players refuse
|
|
146
146
|
* it as a button icon with `invalid`.
|
|
147
147
|
*
|
|
148
148
|
* @example Check in a test that the button's icon exists
|
|
@@ -287,11 +287,8 @@ vestra.capture | capture.copy | Snapshot ▸ Copy Current Frame | Ctrl+C
|
|
|
287
287
|
vestra.capture | capture.burst | Snapshot ▸ Burst… | Ctrl+G
|
|
288
288
|
vestra.capture | capture.clip | Snapshot ▸ Export Clip…
|
|
289
289
|
vestra.capture | capture.panel | Snapshot ▸ Capture… | Alt+S
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
vestra.subtitles | tune | Subtitles… | Alt+3
|
|
293
|
-
vestra.playback | panel | Playback… | Alt+4
|
|
294
|
-
vestra.playlist | playlist.visibility | Playlist | F6
|
|
290
|
+
host | adjust | Adjustments and Effects
|
|
291
|
+
host | sidebar | Sidebar
|
|
295
292
|
vestra.marks | marks.list | Chapter and Bookmark List… | H
|
|
296
293
|
host | fullscreen | Toggle Fullscreen | Escape
|
|
297
294
|
vestra.workshop | workshop.open | Vestra Player AI…
|
|
@@ -304,8 +301,6 @@ host | previous | (Previous) | PageUp, Mouse:X2
|
|
|
304
301
|
host | next | (Next) | PageDown, Mouse:X1
|
|
305
302
|
host | enter-fullscreen | (Enter Fullscreen)
|
|
306
303
|
host | exit-fullscreen | (Leave Fullscreen)
|
|
307
|
-
host | sidebar | (Toggle Sidebar)
|
|
308
|
-
host | adjust | (Adjust)
|
|
309
304
|
host | volume-up | (Volume +) | ArrowUp, Mouse:WheelUp
|
|
310
305
|
host | volume-down | (Volume −) | ArrowDown, Mouse:WheelDown
|
|
311
306
|
host | mute | (Mute) | M
|
|
@@ -316,6 +311,11 @@ host | seek-forward | (Forward 5 s) | ArrowRight
|
|
|
316
311
|
host | rate-normal | (Normal) | Z
|
|
317
312
|
host | rate-down | (Slower 0.1) | X
|
|
318
313
|
host | rate-up | (Faster 0.1) | C
|
|
314
|
+
vestra.video | video.picture | (Picture…) | Alt+1
|
|
315
|
+
vestra.audio | audio.workbench | (Audio…) | Alt+2
|
|
316
|
+
vestra.subtitles | tune | (Subtitles…) | Alt+3
|
|
317
|
+
vestra.playback | panel | (Playback…) | Alt+4
|
|
318
|
+
vestra.playlist | playlist.visibility | (Playlist) | F6
|
|
319
319
|
vestra.playback | reopen | (Reopen Current/Last File) | Ctrl+Y
|
|
320
320
|
vestra.playback | copy-name | (File Name)
|
|
321
321
|
vestra.playback | copy-folder | (Folder Path)
|
package/dist/docs-tree.json.gz
CHANGED
|
Binary file
|
package/dist/i18n-tools.js
CHANGED
|
@@ -46,6 +46,11 @@ const slash = (path) => path.split(sep).join("/");
|
|
|
46
46
|
const CJK = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;
|
|
47
47
|
const COMPOSED = 'user-visible text composed in TypeScript: pass a template with args (osd.show("Speed {}×", [rate]), plugin.i18n.text("Track {}", [n])) or move it into Slint';
|
|
48
48
|
const DYNAMIC = (what) => `${what} is not a literal; its text cannot be extracted (use a string literal or an \`as const\` table)`;
|
|
49
|
+
/**
|
|
50
|
+
* The files of the SDK's plugin API declarations: `plugin/types.ts` and the
|
|
51
|
+
* domain files it re-exports, `plugin/types/*.ts` (`.d.ts` when installed).
|
|
52
|
+
*/
|
|
53
|
+
const SDK_TYPES = /\/plugin\/types(\/[\w-]+)?\.(d\.)?ts$/;
|
|
49
54
|
const SITES = {
|
|
50
55
|
"Commands.add": {
|
|
51
56
|
object: 0,
|
|
@@ -324,7 +329,7 @@ class Extractor {
|
|
|
324
329
|
ts.isInterfaceDeclaration(declaration.parent) &&
|
|
325
330
|
declaration.name &&
|
|
326
331
|
ts.isIdentifier(declaration.name) &&
|
|
327
|
-
|
|
332
|
+
SDK_TYPES.test(slash(declaration.getSourceFile().fileName))) {
|
|
328
333
|
const name = `${declaration.parent.name.text}.${declaration.name.text}`;
|
|
329
334
|
return name in SITES ? name : undefined;
|
|
330
335
|
}
|
|
@@ -336,7 +341,7 @@ class Extractor {
|
|
|
336
341
|
declaration.parent &&
|
|
337
342
|
ts.isInterfaceDeclaration(declaration.parent)) {
|
|
338
343
|
const file = slash(declaration.getSourceFile().fileName);
|
|
339
|
-
if (
|
|
344
|
+
if (SDK_TYPES.test(file)) {
|
|
340
345
|
const name = `${declaration.parent.name.text}.${method}`;
|
|
341
346
|
return name in SITES ? name : undefined;
|
|
342
347
|
}
|
|
@@ -303,9 +303,9 @@ export function commandsHandlers(host, inner) {
|
|
|
303
303
|
if (host.commands.has(id))
|
|
304
304
|
throw commandConflict("owner/localId already registered");
|
|
305
305
|
// The player's own commands beside the core actions (host/actions.rs
|
|
306
|
-
// `host_declarations`:
|
|
307
|
-
//
|
|
308
|
-
// like any other.
|
|
306
|
+
// `host_declarations`: Adjustments and Effects, Sidebar, Toggle
|
|
307
|
+
// Fullscreen, Command Palette…, Quit and two outside the menu), which
|
|
308
|
+
// take part in conflicts and the total like any other.
|
|
309
309
|
const hostOnly = BUILTIN_COMMANDS.filter((row) => row.owner === "host" && !host.coreCommands.has(`host/${row.id}`));
|
|
310
310
|
// A path may not repeat another command's (the player's own
|
|
311
311
|
// included) nor be a submenu of one, or one of its submenus.
|