@vestra-player/sdk 1.6.19 → 1.6.21

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/commands.js +19 -18
  3. package/dist/docs-tree.json.gz +0 -0
  4. package/dist/i18n-tools.js +7 -2
  5. package/dist/plugin/runtime.d.ts +1 -0
  6. package/dist/plugin/runtime.js +3 -0
  7. package/dist/plugin/types/base.d.ts +1097 -0
  8. package/dist/plugin/types/base.js +1 -0
  9. package/dist/plugin/types/commands.d.ts +1189 -0
  10. package/dist/plugin/types/commands.js +1 -0
  11. package/dist/plugin/types/packages.d.ts +661 -0
  12. package/dist/plugin/types/packages.js +1 -0
  13. package/dist/plugin/types/playback.d.ts +1654 -0
  14. package/dist/plugin/types/playback.js +1 -0
  15. package/dist/plugin/types/processing.d.ts +974 -0
  16. package/dist/plugin/types/processing.js +1 -0
  17. package/dist/plugin/types/services.d.ts +1132 -0
  18. package/dist/plugin/types/services.js +1 -0
  19. package/dist/plugin/types/snapshots.d.ts +491 -0
  20. package/dist/plugin/types/snapshots.js +1 -0
  21. package/dist/plugin/types/sources.d.ts +302 -0
  22. package/dist/plugin/types/sources.js +1 -0
  23. package/dist/plugin/types/subtitles.d.ts +327 -0
  24. package/dist/plugin/types/subtitles.js +1 -0
  25. package/dist/plugin/types/ui-content.d.ts +692 -0
  26. package/dist/plugin/types/ui-content.js +1 -0
  27. package/dist/plugin/types/ui-layout.d.ts +1079 -0
  28. package/dist/plugin/types/ui-layout.js +1 -0
  29. package/dist/plugin/types/ui-locale.d.ts +490 -0
  30. package/dist/plugin/types/ui-locale.js +1 -0
  31. package/dist/plugin/types/ui-shell.d.ts +1072 -0
  32. package/dist/plugin/types/ui-shell.js +1 -0
  33. package/dist/plugin/types.d.ts +18 -11072
  34. package/llms.txt +1 -1
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.21
4
+
5
+ **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).
6
+
7
+ - **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).
8
+ - **`{@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.
9
+ - **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.
10
+ - **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.
11
+ - **`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`.
12
+ - 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.
13
+
14
+ ## 1.6.20
15
+
16
+ **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.
17
+
18
+ - **`BUILTIN_COMMANDS`**: the 18 A-B Loop commands (`ab.set-a` … `ab.count.10`) are now owned by the playback plugin (`vestra.playback/ab.*`, formerly `vestra.marks/ab.*`), with their ids, titles, keys and categories unchanged and still outside the menu (command palette). The marks plugin, now named "Chapters and Bookmarks", keeps Chapter and Bookmark List… and its chapter and bookmark commands. `BUILTIN_SUBMENUS` is unchanged. The table in [Reference: commands](docs/reference/commands.md) follows.
19
+ - **`BUILTIN_COMMANDS`** also lists the Picture Adjustments plugin's palette command **AI Upscaling** (`vestra.video/video.upscaling`, no default key, next to GPU Rendering), which the player registers since its Picture panel gained the AI Upscaling switch.
20
+ - `WAKE_EVENTS` (internal) is exported from `dist/plugin/runtime.js` again, as before the 1.6.19 split moved it to `connection.ts`; the player's host-agreement test reads it there.
21
+
3
22
  ## 1.6.19
4
23
 
5
24
  **Who must change: nobody.** Step 1 of the SDK refactor, batches B and C (`doc/specs/sdk-refactor.md` §4 in the player repository): `src/plugin/runtime.ts` and `src/plugin/ui.ts` are split by layer; no API, behaviour or wire change, `apiVersion` stays `vestra/1`.
package/dist/commands.js CHANGED
@@ -323,6 +323,24 @@ vestra.playback | copy-path | (Full Path)
323
323
  vestra.playback | prevent-sleep | (Disable Screen Saver While Playing)
324
324
  vestra.playback | hover-time | (Show Time on Seek Bar Hover)
325
325
  vestra.playback | hover-thumbnail | (Show Thumbnail on Seek Bar Hover)
326
+ vestra.playback | ab.set-a | (Set Start Point) | [
327
+ vestra.playback | ab.clear-a | (Clear Start Point) | {
328
+ vestra.playback | ab.a-back | (Start Point Back 0.1 s) | Ctrl+[
329
+ vestra.playback | ab.a-forward | (Start Point Forward 0.1 s) | Alt+[
330
+ vestra.playback | ab.set-b | (Set End Point) | ]
331
+ vestra.playback | ab.clear-b | (Clear End Point) | }
332
+ vestra.playback | ab.b-back | (End Point Back 0.1 s) | Ctrl+]
333
+ vestra.playback | ab.b-forward | (End Point Forward 0.1 s) | Alt+]
334
+ vestra.playback | ab.back | (Move Range Back 0.1 s) | Ctrl+Alt+[
335
+ vestra.playback | ab.forward | (Move Range Forward 0.1 s) | Ctrl+Alt+]
336
+ vestra.playback | ab.segment | (Loop Current Chapter or Bookmark Range) | Alt+\\
337
+ vestra.playback | ab.toggle | (A-B Loop On/Off) | \\
338
+ vestra.playback | ab.count.endless | (Endless)
339
+ vestra.playback | ab.count.1 | (Once)
340
+ vestra.playback | ab.count.2 | (2 Times)
341
+ vestra.playback | ab.count.3 | (3 Times)
342
+ vestra.playback | ab.count.5 | (5 Times)
343
+ vestra.playback | ab.count.10 | (10 Times)
326
344
  vestra.window | hide-cursor | (Hide Pointer While Playing)
327
345
  vestra.window | pip | (Picture-in-Picture)
328
346
  vestra.window | mini | (Mini Size) | \`
@@ -369,24 +387,6 @@ vestra.marks | marks.next | (Next Bookmark or Chapter) | Shift+PageDown
369
387
  vestra.marks | marks.previous-chapter | (Previous Chapter) | Ctrl+PageUp
370
388
  vestra.marks | marks.next-chapter | (Next Chapter) | Ctrl+PageDown
371
389
  vestra.marks | marks.seekbar | (Show Marks on Seek Bar)
372
- vestra.marks | ab.set-a | (Set Start Point) | [
373
- vestra.marks | ab.clear-a | (Clear Start Point) | {
374
- vestra.marks | ab.a-back | (Start Point Back 0.1 s) | Ctrl+[
375
- vestra.marks | ab.a-forward | (Start Point Forward 0.1 s) | Alt+[
376
- vestra.marks | ab.set-b | (Set End Point) | ]
377
- vestra.marks | ab.clear-b | (Clear End Point) | }
378
- vestra.marks | ab.b-back | (End Point Back 0.1 s) | Ctrl+]
379
- vestra.marks | ab.b-forward | (End Point Forward 0.1 s) | Alt+]
380
- vestra.marks | ab.back | (Move Range Back 0.1 s) | Ctrl+Alt+[
381
- vestra.marks | ab.forward | (Move Range Forward 0.1 s) | Ctrl+Alt+]
382
- vestra.marks | ab.segment | (Loop Current Chapter or Bookmark Range) | Alt+\\
383
- vestra.marks | ab.toggle | (A-B Loop On/Off) | \\
384
- vestra.marks | ab.count.endless | (Endless)
385
- vestra.marks | ab.count.1 | (Once)
386
- vestra.marks | ab.count.2 | (2 Times)
387
- vestra.marks | ab.count.3 | (3 Times)
388
- vestra.marks | ab.count.5 | (5 Times)
389
- vestra.marks | ab.count.10 | (10 Times)
390
390
  vestra.subtitle-online | settings | (Online Subtitle Settings…)
391
391
  vestra.visualizer | audio-cover | (Show Album Cover for Audio Only)
392
392
  vestra.visualizer | idle-logo | (Show Logo When Idle)
@@ -603,6 +603,7 @@ vestra.video | video.saturation.up | (Saturation +1%) | U
603
603
  vestra.video | video.hue.down | (Hue -1%) | I
604
604
  vestra.video | video.hue.up | (Hue +1%) | O
605
605
  vestra.video | video.gpu-rendering | (GPU Rendering (Experimental))
606
+ vestra.video | video.upscaling | (AI Upscaling)
606
607
  `;
607
608
  /**
608
609
  * The commands the player and its built-in plugins register when the
Binary file
@@ -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
- /\/plugin\/types\.(d\.)?ts$/.test(slash(declaration.getSourceFile().fileName))) {
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 (/\/plugin\/types\.(d\.)?ts$/.test(file)) {
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
  }
@@ -10,6 +10,7 @@ import { Passes } from "./passes.ts";
10
10
  import type { Change, Deps, PassCounts } from "./passes.ts";
11
11
  import type { Transport } from "../wire.ts";
12
12
  import type { Disposable } from "./types.ts";
13
+ export { WAKE_EVENTS } from "./connection.ts";
13
14
  /** Per-plugin services: the connection, and the update passes over it. */
14
15
  export declare class Runtime extends Connection {
15
16
  /** The update pass scheduler. */
@@ -6,6 +6,9 @@
6
6
  */
7
7
  import { Connection } from "./connection.js";
8
8
  import { Passes } from "./passes.js";
9
+ // Internal, kept where it was before 1.6.19: the player's host-agreement test
10
+ // reads WAKE_EVENTS from dist/plugin/runtime.js.
11
+ export { WAKE_EVENTS } from "./connection.js";
9
12
  /** Per-plugin services: the connection, and the update passes over it. */
10
13
  export class Runtime extends Connection {
11
14
  /** The update pass scheduler. */