@vestra-player/sdk 1.5.27 → 1.5.28

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.28
4
+
5
+ **Who must change: nobody.** No API changes, `apiVersion` stays `vestra/1`. Only the SDK's copy of what the player ships changes; a plugin that read `BUILTIN_COMMANDS` or `BUILTIN_SUBMENUS` to avoid a key or a menu path simply finds those entries free now.
6
+
7
+ - **`BUILTIN_COMMANDS` and `BUILTIN_SUBMENUS` follow the player** (its agreement test failed on them):
8
+ - Subtitles 0.4.6: `vestra.subtitles` **Move Up** and **Move Down** have no default keys any more (they were `Alt+ArrowUp` / `Alt+ArrowDown`, which pan the video).
9
+ - The NES emulator is no longer a built-in plugin (it moved to the plugin repository as VestraNES, under **Games ▸ VestraNES**): its three commands (`nes.open`, `nes.stop`, `nes.window`) and the built-in **Emulator** submenu are gone. The player has no built-in Games item.
10
+ - Docs: *Built-in commands* regenerated; *Menu guidelines* names a domain submenu **Games** for an emulator and no longer lists Emulator at the top level. `TestHost.otherResolvers` examples use a neutral id (`example.emulator`). `llms.txt` and `llms-full.txt` regenerated.
11
+
3
12
  ## 1.5.27
4
13
 
5
14
  **Who must change: nobody.** No API changes, `apiVersion` stays `vestra/1`, no player version needed. Plugins pick the fix up with the player's next SDK upgrade (the player builds the `plugin` object with its own copy); nothing in a plugin changes.
package/dist/commands.js CHANGED
@@ -123,7 +123,6 @@ export const BUILTIN_SUBMENUS = Object.freeze([
123
123
  },
124
124
  { path: ["Settings", "Language"], plugins: ["vestra.preferences"] },
125
125
  { path: ["Copy to Clipboard"], plugins: ["vestra.playback"] },
126
- { path: ["Emulator"], plugins: ["vestra.nes"] },
127
126
  ]);
128
127
  /** owner | id | key path, or (title) outside the menu | bindings | panel */
129
128
  const BUILTIN_COMMAND_TABLE = `
@@ -228,8 +227,8 @@ vestra.subtitles | second-position-aboveMain | Subtitles ▸ Secondary Subtitle
228
227
  vestra.subtitles | bold | Subtitles ▸ Subtitle Style ▸ Bold | Alt+B
229
228
  vestra.subtitles | size-up | Subtitles ▸ Subtitle Style ▸ Size + | Alt+PageUp
230
229
  vestra.subtitles | size-down | Subtitles ▸ Subtitle Style ▸ Size − | Alt+PageDown
231
- vestra.subtitles | move-up | Subtitles ▸ Subtitle Style ▸ Move Up | Alt+ArrowUp
232
- vestra.subtitles | move-down | Subtitles ▸ Subtitle Style ▸ Move Down | Alt+ArrowDown
230
+ vestra.subtitles | move-up | Subtitles ▸ Subtitle Style ▸ Move Up
231
+ vestra.subtitles | move-down | Subtitles ▸ Subtitle Style ▸ Move Down
233
232
  vestra.subtitles | move-reset | Subtitles ▸ Subtitle Style ▸ Reset Position | Alt+Home
234
233
  vestra.subtitles | shadow | Subtitles ▸ Subtitle Style ▸ Shadow
235
234
  vestra.subtitles | box | Subtitles ▸ Subtitle Style ▸ Opaque Box
@@ -369,9 +368,6 @@ vestra.audio | audio.normalize | Audio ▸ Processing ▸ Normalize | Shift+N
369
368
  vestra.audio | audio.clarity | Audio ▸ Processing ▸ Crystalizer | Shift+C
370
369
  vestra.audio | audio.reset | Audio ▸ Reset
371
370
  vestra.visualizer | audio-cover | Audio ▸ Show Album Cover for Audio Only
372
- vestra.nes | nes.open | Emulator ▸ Open NES ROM…
373
- vestra.nes | nes.stop | Emulator ▸ Stop NES
374
- vestra.nes | nes.window | Emulator ▸ NES Tools…
375
371
  host | fullscreen | Toggle Fullscreen | Enter, Alt+Enter, F11
376
372
  vestra.window | pip | Screen ▸ Picture-in-Picture
377
373
  vestra.window | mini | Screen ▸ Mini Size | \`
@@ -962,7 +962,7 @@ export declare class TestHost implements Transport {
962
962
  * @example
963
963
  * ```ts
964
964
  * const host = new TestHost();
965
- * host.otherResolvers.push({ owner: "vestra.nes", extensions: ["nes"] });
965
+ * host.otherResolvers.push({ owner: "example.emulator", extensions: ["nes"] });
966
966
  * ```
967
967
  */
968
968
  readonly otherResolvers: {
@@ -989,7 +989,7 @@ export declare class TestHost implements Transport {
989
989
  *
990
990
  * @example
991
991
  * ```ts
992
- * host.otherResolvers.push({ owner: "vestra.nes", extensions: ["nes"] });
992
+ * host.otherResolvers.push({ owner: "example.emulator", extensions: ["nes"] });
993
993
  * host.updateFileTypes();
994
994
  * await host.settle();
995
995
  * assert.deepEqual(plugin.resolvers.fileTypes, ["nes"]);
@@ -1079,7 +1079,7 @@ export class TestHost {
1079
1079
  * @example
1080
1080
  * ```ts
1081
1081
  * const host = new TestHost();
1082
- * host.otherResolvers.push({ owner: "vestra.nes", extensions: ["nes"] });
1082
+ * host.otherResolvers.push({ owner: "example.emulator", extensions: ["nes"] });
1083
1083
  * ```
1084
1084
  */
1085
1085
  otherResolvers = [];
@@ -1107,7 +1107,7 @@ export class TestHost {
1107
1107
  *
1108
1108
  * @example
1109
1109
  * ```ts
1110
- * host.otherResolvers.push({ owner: "vestra.nes", extensions: ["nes"] });
1110
+ * host.otherResolvers.push({ owner: "example.emulator", extensions: ["nes"] });
1111
1111
  * host.updateFileTypes();
1112
1112
  * await host.settle();
1113
1113
  * assert.deepEqual(plugin.resolvers.fileTypes, ["nes"]);
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @vestra-player/sdk 1.5.27: full reference
1
+ # @vestra-player/sdk 1.5.28: full reference
2
2
 
3
3
  > Everything needed to write a Vestra Player plugin (plugin API `vestra/1`): the guides, every public declaration of `@vestra-player/sdk` and `@vestra-player/sdk/testing` with its documentation, and the complete source of the example plugins. Generated from the SDK's sources by scripts/llms.mjs; the short index is llms.txt.
4
4
 
@@ -2102,7 +2102,7 @@ How paths merge, how `order` and `group` sort items and how a key finds its comm
2102
2102
 
2103
2103
  #### Organize by what the user does
2104
2104
 
2105
- - **Put a command where its subject is, not under your plugin's name.** A video filter goes into Video, a subtitle tool into Subtitles, an open-something command into Open. A plugin that brings a domain of its own gets a submenu named after the domain, not after the plugin (the NES plugin's Emulator).
2105
+ - **Put a command where its subject is, not under your plugin's name.** A video filter goes into Video, a subtitle tool into Subtitles, an open-something command into Open. A plugin that brings a domain of its own gets a submenu named after the domain, not after the plugin (Games for an emulator, not the emulator's name).
2106
2106
  - **Before adding an item, look for an existing one.** Every command the player and its built-in plugins add, with its menu path and default key, is listed in Built-in commands. Do not add a second entry for something the player already does, and do not scatter one feature over several menus.
2107
2107
  - **Top level is for frequent, direct commands**: opening files, closing, fullscreen and the entries that show a window or panel. Everything else goes into a submenu of its domain.
2108
2108
  - **No "File" or "View" menu.** Commands that open something go into Open ▸; commands that show a window or panel sit directly at the top level.
@@ -2122,7 +2122,6 @@ Playback ▸ group domain
2122
2122
  Subtitles ▸
2123
2123
  Video ▸
2124
2124
  Audio ▸
2125
- Emulator ▸
2126
2125
  ────────────────────────────────────────
2127
2126
  Toggle Fullscreen Enter group screen
2128
2127
  Screen ▸
@@ -2491,7 +2490,6 @@ The submenus that exist already, by key path. Write the same keys to add a comma
2491
2490
  | Settings ▸ Appearance | `vestra.preferences`, `vestra.visualizer` |
2492
2491
  | Settings ▸ Language | `vestra.preferences` |
2493
2492
  | Copy to Clipboard | `vestra.playback` |
2494
- | Emulator | `vestra.nes` |
2495
2493
 
2496
2494
  #### Built-in commands
2497
2495
 
@@ -2600,8 +2598,8 @@ Every command the player (`host`) and its built-in plugins register when the pla
2600
2598
  | Subtitles ▸ Subtitle Style ▸ Bold | `Alt+B` | `vestra.subtitles/bold` |
2601
2599
  | Subtitles ▸ Subtitle Style ▸ Size + | `Alt+PageUp` | `vestra.subtitles/size-up` |
2602
2600
  | Subtitles ▸ Subtitle Style ▸ Size − | `Alt+PageDown` | `vestra.subtitles/size-down` |
2603
- | Subtitles ▸ Subtitle Style ▸ Move Up | `Alt+ArrowUp` | `vestra.subtitles/move-up` |
2604
- | Subtitles ▸ Subtitle Style ▸ Move Down | `Alt+ArrowDown` | `vestra.subtitles/move-down` |
2601
+ | Subtitles ▸ Subtitle Style ▸ Move Up | | `vestra.subtitles/move-up` |
2602
+ | Subtitles ▸ Subtitle Style ▸ Move Down | | `vestra.subtitles/move-down` |
2605
2603
  | Subtitles ▸ Subtitle Style ▸ Reset Position | `Alt+Home` | `vestra.subtitles/move-reset` |
2606
2604
  | Subtitles ▸ Subtitle Style ▸ Shadow | | `vestra.subtitles/shadow` |
2607
2605
  | Subtitles ▸ Subtitle Style ▸ Opaque Box | | `vestra.subtitles/box` |
@@ -2741,9 +2739,6 @@ Every command the player (`host`) and its built-in plugins register when the pla
2741
2739
  | Audio ▸ Processing ▸ Crystalizer | `Shift+C` | `vestra.audio/audio.clarity` |
2742
2740
  | Audio ▸ Reset | | `vestra.audio/audio.reset` |
2743
2741
  | Audio ▸ Show Album Cover for Audio Only | | `vestra.visualizer/audio-cover` |
2744
- | Emulator ▸ Open NES ROM… | | `vestra.nes/nes.open` |
2745
- | Emulator ▸ Stop NES | | `vestra.nes/nes.stop` |
2746
- | Emulator ▸ NES Tools… | | `vestra.nes/nes.window` |
2747
2742
  | Toggle Fullscreen | `Enter`, `Alt+Enter`, `F11` | `host/fullscreen` |
2748
2743
  | Screen ▸ Picture-in-Picture | | `vestra.window/pip` |
2749
2744
  | Screen ▸ Mini Size | ``` | `vestra.window/mini` |
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.5.27: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls; it runs in its own Node.js process. Everything a plugin creates (commands, windows, panels, filters, listeners…) is a handle that is released automatically when the plugin stops. L<n> are line numbers in llms-full.txt, next to this file: every page, declaration and example.
3
+ > @vestra-player/sdk 1.5.28: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls; it runs in its own Node.js process. Everything a plugin creates (commands, windows, panels, filters, listeners…) is a handle that is released automatically when the plugin stops. L<n> are line numbers in llms-full.txt, next to this file: every page, declaration and example.
4
4
 
5
5
  **Rules**
6
6
 
@@ -33,7 +33,7 @@ my-plugin/
33
33
  }
34
34
  ```
35
35
 
36
- Fields: `id`, `version`, `apiVersion`, `entry`, `capabilities`, `name`, `author`, `punchline`, `description`, `tags`, `icon`, `readme`, `changelog`, `sourceUrl`, `license`, `minPlayerVersion`; unknown fields and capabilities are rejected. Rules and limits: L2195–2261.
36
+ Fields: `id`, `version`, `apiVersion`, `entry`, `capabilities`, `name`, `author`, `punchline`, `description`, `tags`, `icon`, `readme`, `changelog`, `sourceUrl`, `license`, `minPlayerVersion`; unknown fields and capabilities are rejected. Rules and limits: L2194–2260.
37
37
 
38
38
  **main.ts**
39
39
 
@@ -76,9 +76,9 @@ export default async function activate(plugin: Plugin) {
76
76
  - `ui.settings`: Settings.page/show
77
77
  - `ui.theme`: Appearance.set/setLanguage
78
78
  - `secrets`: Secrets.get/set/delete
79
- - No capability: `tools`, `storage`, `system`, `app`, `ui` (images and Markdown), `i18n`, reading window.state, appearance.theme and packages.list. Details: L2262–2320.
79
+ - No capability: `tools`, `storage`, `system`, `app`, `ui` (images and Markdown), `i18n`, reading window.state, appearance.theme and packages.list. Details: L2261–2319.
80
80
 
81
- **Test**: `tests/*.test.ts` with `node:test`, run by `vestra-plugin test`. `startPlugin(activate, { directory: new URL("..", import.meta.url) })` from `@vestra-player/sdk/testing` returns `{ host, stop }`; `host` is a TestHost (an in-memory player): `host.setSource(…)`, `host.command(id).run()`, `host.press(key)`, `await host.settle()`, then assert on `host.osd`, `host.window(id).props`… Guide: L1658–1846; TestHost: L7061.
81
+ **Test**: `tests/*.test.ts` with `node:test`, run by `vestra-plugin test`. `startPlugin(activate, { directory: new URL("..", import.meta.url) })` from `@vestra-player/sdk/testing` returns `{ host, stop }`; `host` is a TestHost (an in-memory player): `host.setSource(…)`, `host.command(id).run()`, `host.press(key)`, `await host.settle()`, then assert on `host.osd`, `host.window(id).props`… Guide: L1658–1846; TestHost: L7056.
82
82
 
83
83
  **Command line**
84
84
 
@@ -106,7 +106,7 @@ export default async function activate(plugin: Plugin) {
106
106
  - `limit`: A player-wide limit was reached, a property value is over the limits of PropValue
107
107
  - `reserved`: The id is `vestra` or starts with `vestra.`
108
108
  - `versionMismatch`: The package needs a newer player or another `apiVersion`
109
- - Others: PluginError, llms-full.txt L3231.
109
+ - Others: PluginError, llms-full.txt L3226.
110
110
 
111
111
  ## Reference
112
112
 
@@ -114,31 +114,31 @@ export default async function activate(plugin: Plugin) {
114
114
  - Tutorials: Getting started L9–237
115
115
  - Concepts: How a plugin runs L238–408; Commands, menus and key bindings L409–506; Playback state, controls and sources L507–652; Video and audio processing L653–731; Windows, panels, settings pages, dialogs and the OSD L732–1020
116
116
  - How-to: Keep a slider responsive while dragging L1021–1195; Remember a window's state between runs L1196–1325; Translate a plugin L1326–1509; Migrate a plugin to English source text L1510–1657; Test a plugin L1658–1846; Publish a plugin L1847–1935; Migrating off package rollback (1.5.16, removed in 1.5.17) L1936–2011
117
- - Guidelines: Interface guidelines L2012–2096; Menu guidelines L2097–2194
118
- - Reference: Manifest L2195–2261; Capabilities L2262–2320; Limits L2321–2425; Commands, menus and bindings L2426–2894; Platforms L2895–2923; Theme L2924–3130; Command line L3131–3188
119
- - [API: @vestra-player/sdk](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk.html): L3189–6896
120
- - [API: @vestra-player/sdk/testing](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk_testing.html): L6897–8302
117
+ - Guidelines: Interface guidelines L2012–2096; Menu guidelines L2097–2193
118
+ - Reference: Manifest L2194–2260; Capabilities L2261–2319; Limits L2320–2424; Commands, menus and bindings L2425–2889; Platforms L2890–2918; Theme L2919–3125; Command line L3126–3183
119
+ - [API: @vestra-player/sdk](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk.html): L3184–6891
120
+ - [API: @vestra-player/sdk/testing](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk_testing.html): L6892–8297
121
121
 
122
122
  ## API
123
123
 
124
124
  Where each module of `plugin` (`plugin.<module>`) is declared:
125
125
 
126
- - Plugin L3423, Scope L3292, PluginError L3231, Disposable L3204
127
- - Commands L3635; Windows L3865; Panels L4508; Dialogs L4794; Player L5261; video: VideoFilter L5568, VideoView L5631, RenderOptions L5673; audio: AudioFilter L5592; Subtitles L5771; media: MediaCapture L5932; Resolvers L6037; Packages L6279; Osd L5504; Host L5435; Clipboard L6411; Power L6431; Tools L6464; Storage L6507; System L6594; Secrets L6612; window: MainWindow L4631; App L4712; Bindings L6381; Ui L3740; Timeline L4588; Drops L4164; Appearance L4193; I18n L4335; Settings L4441.
126
+ - Plugin L3418, Scope L3287, PluginError L3226, Disposable L3199
127
+ - Commands L3630; Windows L3860; Panels L4503; Dialogs L4789; Player L5256; video: VideoFilter L5563, VideoView L5626, RenderOptions L5668; audio: AudioFilter L5587; Subtitles L5766; media: MediaCapture L5927; Resolvers L6032; Packages L6274; Osd L5499; Host L5430; Clipboard L6406; Power L6426; Tools L6459; Storage L6502; System L6589; Secrets L6607; window: MainWindow L4626; App L4707; Bindings L6376; Ui L3735; Timeline L4583; Drops L4159; Appearance L4188; I18n L4330; Settings L4436.
128
128
 
129
129
  ## Examples
130
130
 
131
131
  Tested plugins in [examples/](https://github.com/vestrasys/vestra-player-sdk/tree/main/examples):
132
132
 
133
- - hello: The README Quick start: one menu command and an on-screen message. L8726–8815
134
- - blur: A tool window with one slider that blurs the playing video. L8816–9077
135
- - signal-generator: Generates its own video and audio: colour bars and a 1 kHz tone. L9078–9410
136
- - bookmark: A tool window bound to the playback state: remember the position and jump back to it. L9411–9595
137
- - panel-menu: A sidebar panel with its own right-click menu. L9596–9801
138
- - menus: Radio menu items, separator groups and a menu item whose title changes. L9802–9961
139
- - theme-widgets: A tool window drawn with the player's theme and widgets. L9962–10125
140
- - markdown: A window that shows a Markdown document. L10126–10320
141
- - i18n: A plugin in the player's language: English source text, a Chinese translation. L10321–10488
133
+ - hello: The README Quick start: one menu command and an on-screen message. L8721–8810
134
+ - blur: A tool window with one slider that blurs the playing video. L8811–9072
135
+ - signal-generator: Generates its own video and audio: colour bars and a 1 kHz tone. L9073–9405
136
+ - bookmark: A tool window bound to the playback state: remember the position and jump back to it. L9406–9590
137
+ - panel-menu: A sidebar panel with its own right-click menu. L9591–9796
138
+ - menus: Radio menu items, separator groups and a menu item whose title changes. L9797–9956
139
+ - theme-widgets: A tool window drawn with the player's theme and widgets. L9957–10120
140
+ - markdown: A window that shows a Markdown document. L10121–10315
141
+ - i18n: A plugin in the player's language: English source text, a Chinese translation. L10316–10483
142
142
 
143
143
  ## Optional
144
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.5.27",
3
+ "version": "1.5.28",
4
4
  "description": "Plugin API types, test host and plugin CLI for Vestra Player (apiVersion vestra/1)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {