@vestra-player/sdk 1.6.4 → 1.6.5

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.5
4
+
5
+ **Who must change: nobody, but run `vestra-plugin i18n extract` again if a command sets a `category`.** A fix in the plugin CLI only: no change to the TypeScript API, the wire or `TestHost`, `apiVersion` stays `vestra/1`, no new capability, no player version needed. A plugin whose commands set `category` as a string literal that is not already a message now has those texts in `locales/messages.pot`, so its next `vestra-plugin i18n check` fails with "messages.pot is out of date" until `i18n extract` runs. A category written with `plugin.i18n.text(…)` was already extracted, and a plugin that sets no category sees no change.
6
+
7
+ - **`vestra-plugin i18n extract` finds `CommandOptions.category`** (added in 1.6.4). It reads a command's `category` wherever it reads its `title`, with the same rules: a string literal, both branches of a `?:`, an `as const` table, a field spread into the options or an options object built elsewhere (through its type), a `plugin.i18n.text(…)` source, and a `TRANSLATORS:` note on the property. A category it cannot read is reported like a title (`category of Commands.add is not a literal`, `not English`, `i18n-ignore` to quiet it). In 1.6.4 a category never reached `messages.pot`, so it stayed English in every language and `i18n check` did not notice. `home` is a command id, not text, and is not extracted. [Reference: translations](docs/reference/i18n.md) lists `category` with the other command texts.
8
+
3
9
  ## 1.6.4
4
10
 
5
11
  **Who must change: nobody, but check tests that compare whole `bindings.list()` entries.** Additions only: two optional `CommandOptions` fields, one optional `BindingInfo` field, a `COMMAND_LIMITS` entry and a new built-in command. `apiVersion` stays `vestra/1`, no new capability. A plugin that does not set the new fields sends exactly what it sent before; one that sets them needs player 0.7.6 (`"minPlayerVersion": "0.7.6"`), because older players refuse a declaration with fields they do not know (`invalid`).
Binary file
@@ -15,7 +15,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
15
15
  *
16
16
  * Translatable texts are the `@tr` calls of the plugin's `.slint` files, the
17
17
  * declaration fields and sentences it hands the player (`commands.add`
18
- * title, path and reason, `Command.set` reason, `settings.page` and
18
+ * title, category, path and reason, `Command.set` reason, `settings.page` and
19
19
  * `panels.mount` titles, `osd.show`, `OsdPanel.set`, `dialogs.*` texts) and
20
20
  * the manifest's display fields. Plugins write no translation code: the
21
21
  * player translates these with the plugin's catalog.
@@ -47,7 +47,11 @@ const CJK = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hang
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
49
  const SITES = {
50
- "Commands.add": { object: 0, fields: ["title", "reason"], path: true },
50
+ "Commands.add": {
51
+ object: 0,
52
+ fields: ["title", "category", "reason"],
53
+ path: true,
54
+ },
51
55
  "Command.set": { object: 0, fields: ["reason"] },
52
56
  "Settings.page": { object: 1, fields: ["title"] },
53
57
  "Panels.mount": { object: 2, fields: ["title"] },
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.6.4: 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. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
3
+ > @vestra-player/sdk 1.6.5: 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. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
4
4
 
5
5
  ## Read the documentation
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
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": {