@vestra-player/sdk 1.5.9 → 1.5.12

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/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.5.9: 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. llms-full.txt, next to this file, has every declaration, the guides and the examples; L<n> below are its line numbers.
3
+ > @vestra-player/sdk 1.5.12: 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. llms-full.txt, next to this file, has every declaration, the guides and the examples; L<n> below are its line numbers.
4
4
 
5
5
  **How plugins run**
6
6
 
@@ -121,7 +121,7 @@ test("shows the position", async () => {
121
121
  - `vestra-plugin build [dir...] [--version x.y.z]`: Writes `dist/`: types stripped, files copied, manifest versioned.
122
122
  - `vestra-plugin pack [dir...] [--version x.y.z] [--out dir]`: Builds, then packs `dist/` as `<id>-<version>.vxp`.
123
123
  - `vestra-plugin i18n extract [dir...] [--locale lang]`: Collects the texts to translate into `locales/`, keeping translations.
124
- - `vestra-plugin i18n check [dir...]`: Translation coverage and untranslatable text (warnings only).
124
+ - `vestra-plugin i18n check [dir...]`: Translation coverage and untranslatable text; fails on stale catalogs.
125
125
  - `vestra-player --plugin <dir>` runs a plugin from source, no build needed.
126
126
 
127
127
  **Error codes** (`error.code`; branch on it, never on `message`)
@@ -137,7 +137,7 @@ test("shows the position", async () => {
137
137
  - `failed`: The operation ran and failed
138
138
  - `aborted`: An `AbortSignal` fired
139
139
  - `timeout`: A time limit ran out
140
- - `limit`: A player-wide limit was reached
140
+ - `limit`: A player-wide limit was reached, a property value is over the limits of PropValue, or a request is longer than the player's 1 MiB message
141
141
  - `reserved`: Packages.validate, PackageCandidate.install: the id is `vestra` or starts with `vestra.`, which only the player's built-in plugins use
142
142
  - `versionMismatch`: The package needs a newer player or another `apiVersion`
143
143
  - `ui-prepare`: The player could not prepare a mounted panel or a settings page
@@ -152,56 +152,56 @@ test("shows the position", async () => {
152
152
  - [Concept: Windows, panels, settings pages, dialogs and the OSD](https://vestrasys.github.io/vestra-player-sdk/documents/Windows__panels__settings_pages__dialogs_and_the_OSD.html): L281–626
153
153
  - [How-to: Keep a slider responsive while dragging](https://vestrasys.github.io/vestra-player-sdk/documents/Keep_a_slider_responsive_while_dragging.html): L627–801
154
154
  - [How-to: Remember a window's state between runs](https://vestrasys.github.io/vestra-player-sdk/documents/Remember_a_window_s_state_between_runs.html): L802–931
155
- - [API: @vestra-player/sdk](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk.html): L932–4268
156
- - [API: @vestra-player/sdk/testing](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk_testing.html) (TestHost, startPlugin): L4269–5290
155
+ - [API: @vestra-player/sdk](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk.html): L932–4427
156
+ - [API: @vestra-player/sdk/testing](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk_testing.html) (TestHost, startPlugin): L4428–5538
157
157
 
158
158
  ## API
159
159
 
160
160
  Where each module of `plugin` is declared:
161
161
 
162
162
  - Plugin L1153, Scope L1022, PluginError L974, Disposable L947
163
- - plugin.commands: Commands L1356
164
- - plugin.windows: Windows L1561
165
- - plugin.panels: Panels L2070
166
- - plugin.dialogs: Dialogs L2356
167
- - plugin.player: Player L2795
168
- - plugin.video: VideoFilter L3046, VideoView L3109, RenderOptions L3151
169
- - plugin.audio: AudioFilter L3070
170
- - plugin.subtitles: Subtitles L3249
171
- - plugin.media: MediaCapture L3407
172
- - plugin.resolvers: Resolvers L3512
173
- - plugin.packages: Packages L3752
174
- - plugin.osd: Osd L2982
175
- - plugin.host: Host L2944
176
- - plugin.clipboard: Clipboard L3865
177
- - plugin.power: Power L3885
178
- - plugin.tools: Tools L3918
179
- - plugin.storage: Storage L3961
180
- - plugin.system: System L3984
181
- - plugin.secrets: Secrets L4002
182
- - plugin.window: MainWindow L2193
183
- - plugin.app: App L2274
184
- - plugin.bindings: Bindings L3835
185
- - plugin.ui: Ui L1448
186
- - plugin.timeline: Timeline L2150
187
- - plugin.drops: Drops L1858
188
- - plugin.appearance: Appearance L1887
189
- - plugin.i18n: I18n L1959
190
- - plugin.settings: Settings L2003
163
+ - plugin.commands: Commands L1361
164
+ - plugin.windows: Windows L1566
165
+ - plugin.panels: Panels L2207
166
+ - plugin.dialogs: Dialogs L2493
167
+ - plugin.player: Player L2934
168
+ - plugin.video: VideoFilter L3199, VideoView L3262, RenderOptions L3304
169
+ - plugin.audio: AudioFilter L3223
170
+ - plugin.subtitles: Subtitles L3402
171
+ - plugin.media: MediaCapture L3562
172
+ - plugin.resolvers: Resolvers L3667
173
+ - plugin.packages: Packages L3907
174
+ - plugin.osd: Osd L3135
175
+ - plugin.host: Host L3083
176
+ - plugin.clipboard: Clipboard L4024
177
+ - plugin.power: Power L4044
178
+ - plugin.tools: Tools L4077
179
+ - plugin.storage: Storage L4120
180
+ - plugin.system: System L4143
181
+ - plugin.secrets: Secrets L4161
182
+ - plugin.window: MainWindow L2330
183
+ - plugin.app: App L2411
184
+ - plugin.bindings: Bindings L3994
185
+ - plugin.ui: Ui L1453
186
+ - plugin.timeline: Timeline L2287
187
+ - plugin.drops: Drops L1863
188
+ - plugin.appearance: Appearance L1892
189
+ - plugin.i18n: I18n L2034
190
+ - plugin.settings: Settings L2140
191
191
 
192
192
  ## Examples
193
193
 
194
194
  Complete plugins with tests, in [examples/](https://github.com/vestrasys/vestra-player-sdk/tree/main/examples) and in llms-full.txt:
195
195
 
196
- - hello: The README Quick start: one menu command and an on-screen message. L5706–5795
197
- - blur: A tool window with one slider that blurs the playing video. L5796–6057
198
- - signal-generator: Generates its own video and audio: colour bars and a 1 kHz tone. L6058–6390
199
- - bookmark: A tool window bound to the playback state: remember the position and jump back to it. L6391–6575
200
- - panel-menu: A sidebar panel with its own right-click menu. L6576–6781
201
- - menus: Radio menu items, separator groups and a menu item whose title changes. L6782–6941
202
- - theme-widgets: A tool window drawn with the player's theme and widgets. L6942–7105
203
- - markdown: A window that shows a Markdown document. L7106–7299
204
- - i18n: A plugin in the player's language: English source text, a Chinese translation. L7300–7467
196
+ - hello: The README Quick start: one menu command and an on-screen message. L5955–6044
197
+ - blur: A tool window with one slider that blurs the playing video. L6045–6306
198
+ - signal-generator: Generates its own video and audio: colour bars and a 1 kHz tone. L6307–6639
199
+ - bookmark: A tool window bound to the playback state: remember the position and jump back to it. L6640–6824
200
+ - panel-menu: A sidebar panel with its own right-click menu. L6825–7030
201
+ - menus: Radio menu items, separator groups and a menu item whose title changes. L7031–7190
202
+ - theme-widgets: A tool window drawn with the player's theme and widgets. L7191–7354
203
+ - markdown: A window that shows a Markdown document. L7355–7548
204
+ - i18n: A plugin in the player's language: English source text, a Chinese translation. L7549–7716
205
205
 
206
206
  ## Optional
207
207
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.5.9",
3
+ "version": "1.5.12",
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": {
@@ -81,13 +81,17 @@ export component Button {
81
81
  min-height: root.icon-only ? root.icon-height : root.small ? Theme.button-small-height : Theme.button-height;
82
82
  min-width: root.icon-only ? root.icon-width : root.small ? Theme.button-small-min-width : Theme.button-min-width;
83
83
  preferred-height: self.min-height;
84
+ // A longer (translated) label widens the button instead of overflowing it.
85
+ preferred-width: root.icon-only ? self.min-width
86
+ : max(self.min-width, label.preferred-width + 2 * Theme.button-padding);
84
87
  accessible-role: button;
85
88
  accessible-label: root.text;
86
89
  accessible-enabled: root.enabled;
87
90
  accessible-checkable: root.icon-only;
88
91
  accessible-checked: root.checked;
89
92
  accessible-action-default => { if root.enabled { root.clicked(); } }
90
- if !root.icon-only: Rectangle {
93
+ Rectangle {
94
+ visible: !root.icon-only;
91
95
  border-radius: Theme.radius-control;
92
96
  background: !root.enabled ? Theme.button-disabled
93
97
  : touch.pressed ? Theme.button-press
@@ -96,7 +100,7 @@ export component Button {
96
100
  padding-left: Theme.button-padding;
97
101
  padding-right: Theme.button-padding;
98
102
  alignment: center;
99
- Text {
103
+ label := Text {
100
104
  text: root.text;
101
105
  color: root.enabled ? Theme.text-list : Theme.text-dim;
102
106
  font-size: Theme.font-body;