@vestra-player/sdk 1.6.20 → 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.
- package/CHANGELOG.md +11 -0
- package/dist/docs-tree.json.gz +0 -0
- package/dist/i18n-tools.js +7 -2
- 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,16 @@
|
|
|
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
|
+
|
|
3
14
|
## 1.6.20
|
|
4
15
|
|
|
5
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.
|
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
|
}
|