@vestra-player/sdk 1.7.1 → 1.7.2

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 (88) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -9
  3. package/bin/vestra-plugin.mjs +4 -4
  4. package/dist/api-requests.d.ts +8 -8
  5. package/dist/api-requests.js +8 -8
  6. package/dist/capability-check.d.ts +15 -15
  7. package/dist/capability-check.js +4 -4
  8. package/dist/capability-rules.d.ts +4 -5
  9. package/dist/capability-rules.js +4 -5
  10. package/dist/commands.d.ts +34 -44
  11. package/dist/commands.js +21 -27
  12. package/dist/docs-tree.json.gz +0 -0
  13. package/dist/docs.d.ts +1 -1
  14. package/dist/docs.js +13 -3
  15. package/dist/i18n-tools.js +1 -1
  16. package/dist/i18n.js +1 -1
  17. package/dist/media.d.ts +7 -7
  18. package/dist/palettes.d.ts +5 -5
  19. package/dist/palettes.js +5 -5
  20. package/dist/plugin/appearance.js +1 -1
  21. package/dist/plugin/bindings.d.ts +2 -3
  22. package/dist/plugin/bindings.js +2 -3
  23. package/dist/plugin/commands.js +10 -11
  24. package/dist/plugin/connection.d.ts +18 -19
  25. package/dist/plugin/connection.js +23 -24
  26. package/dist/plugin/index.d.ts +5 -5
  27. package/dist/plugin/index.js +1 -1
  28. package/dist/plugin/osd.d.ts +1 -1
  29. package/dist/plugin/osd.js +1 -1
  30. package/dist/plugin/passes.d.ts +4 -4
  31. package/dist/plugin/passes.js +4 -4
  32. package/dist/plugin/patch.d.ts +8 -8
  33. package/dist/plugin/patch.js +12 -12
  34. package/dist/plugin/player/events.js +5 -5
  35. package/dist/plugin/resolvers.js +3 -3
  36. package/dist/plugin/scope.d.ts +4 -4
  37. package/dist/plugin/scope.js +4 -4
  38. package/dist/plugin/services.d.ts +2 -3
  39. package/dist/plugin/services.js +2 -3
  40. package/dist/plugin/shaders.js +5 -6
  41. package/dist/plugin/state.js +10 -10
  42. package/dist/plugin/testing/commands.d.ts +4 -5
  43. package/dist/plugin/testing/commands.js +4 -5
  44. package/dist/plugin/testing/i18n.d.ts +1 -1
  45. package/dist/plugin/testing/i18n.js +1 -1
  46. package/dist/plugin/testing/index.d.ts +147 -165
  47. package/dist/plugin/testing/index.js +137 -155
  48. package/dist/plugin/testing/internals.d.ts +2 -2
  49. package/dist/plugin/testing/internals.js +2 -2
  50. package/dist/plugin/timeline.d.ts +1 -1
  51. package/dist/plugin/timeline.js +2 -2
  52. package/dist/plugin/types/base.d.ts +90 -111
  53. package/dist/plugin/types/commands.d.ts +142 -174
  54. package/dist/plugin/types/packages.d.ts +48 -63
  55. package/dist/plugin/types/playback.d.ts +45 -59
  56. package/dist/plugin/types/plugin-wire.d.ts +38 -45
  57. package/dist/plugin/types/processing.d.ts +52 -65
  58. package/dist/plugin/types/services.d.ts +18 -25
  59. package/dist/plugin/types/snapshots.d.ts +34 -46
  60. package/dist/plugin/types/sources.d.ts +14 -16
  61. package/dist/plugin/types/subtitles.d.ts +7 -8
  62. package/dist/plugin/types/ui-content.d.ts +111 -116
  63. package/dist/plugin/types/ui-layout.d.ts +52 -63
  64. package/dist/plugin/types/ui-locale.d.ts +41 -45
  65. package/dist/plugin/types/ui-shell.d.ts +69 -87
  66. package/dist/plugin/values.d.ts +15 -18
  67. package/dist/plugin/values.js +16 -19
  68. package/dist/plugin/view/base.d.ts +2 -2
  69. package/dist/plugin/view/base.js +7 -8
  70. package/dist/plugin/view/layout.d.ts +2 -2
  71. package/dist/plugin/view/panel.js +2 -4
  72. package/dist/plugin/view/writer.d.ts +8 -8
  73. package/dist/plugin/view/writer.js +37 -39
  74. package/dist/plugin/when.d.ts +3 -3
  75. package/dist/plugin/wire-facade.js +6 -7
  76. package/dist/processing.d.ts +26 -30
  77. package/dist/processing.js +4 -4
  78. package/dist/source-resolvers.d.ts +2 -2
  79. package/dist/source.d.ts +1 -2
  80. package/dist/subtitles.d.ts +1 -1
  81. package/dist/ts-plugin.d.ts +5 -5
  82. package/dist/wire.d.ts +63 -70
  83. package/dist/wire.js +21 -25
  84. package/llms.txt +7 -10
  85. package/package.json +1 -1
  86. package/slint/vestra/bar-buttons.slint +6 -8
  87. package/slint/vestra/focus.slint +1 -1
  88. package/slint/vestra/widgets.slint +2 -4
package/dist/palettes.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The colours of the player's palettes, by `Theme` colour token (without the
3
- * `Theme.` prefix): `vestra`, the dark default, and `vestra-light` (player
4
- * 0.4.0). The player sets one of them on every view; a plugin reads the
5
- * colours through `Theme` in its Slint files and never needs these values.
6
- * They are here for the documentation (Reference: theme) and for tests that
7
- * check a design against both palettes.
3
+ * `Theme.` prefix): `vestra`, the dark default, and `vestra-light`. The player
4
+ * sets one of them on every view; a plugin reads the colours through `Theme` in
5
+ * its Slint files and never needs these values. They are here for the
6
+ * documentation (Reference: theme) and for tests that check a design against
7
+ * both palettes.
8
8
  *
9
9
  * Current values: a later player may adjust them, a token keeps its
10
10
  * meaning. The `vestra` values are also the defaults of the SDK's copy of
@@ -55,7 +55,7 @@ class AppearanceService {
55
55
  this.#runtime.on("appearance.changed", (data) => {
56
56
  const event = data;
57
57
  const language = preference(event?.language);
58
- // Older players send no language: their events are theme changes.
58
+ // An event without a language is a theme change.
59
59
  const languageChanged = language !== undefined && language !== this.#eventLanguage;
60
60
  if (language)
61
61
  this.#eventLanguage = language;
@@ -68,9 +68,8 @@ export declare const BINDING_INPUTS: Readonly<{
68
68
  /**
69
69
  * Mouse inputs on the video area; the side buttons `Mouse:X1` (back) and
70
70
  * `Mouse:X2` (forward) anywhere in the main window or the floating sidebar
71
- * window, except while a menu is open (player 0.6.0).
72
- * `:LeftHalf` and `:RightHalf` tell the halves of the video apart for a
73
- * double click.
71
+ * window, except while a menu is open. `:LeftHalf` and `:RightHalf` tell the
72
+ * halves of the video apart for a double click.
74
73
  */
75
74
  readonly mouse: readonly ["Mouse:LeftClick", "Mouse:LeftDoubleClick", "Mouse:LeftDoubleClick:LeftHalf", "Mouse:LeftDoubleClick:RightHalf", "Mouse:MiddleClick", "Mouse:X1", "Mouse:X2", "Mouse:WheelUp", "Mouse:WheelDown", "Mouse:WheelLeft", "Mouse:WheelRight"];
76
75
  }>;
@@ -99,9 +99,8 @@ export const BINDING_INPUTS = Object.freeze({
99
99
  /**
100
100
  * Mouse inputs on the video area; the side buttons `Mouse:X1` (back) and
101
101
  * `Mouse:X2` (forward) anywhere in the main window or the floating sidebar
102
- * window, except while a menu is open (player 0.6.0).
103
- * `:LeftHalf` and `:RightHalf` tell the halves of the video apart for a
104
- * double click.
102
+ * window, except while a menu is open. `:LeftHalf` and `:RightHalf` tell the
103
+ * halves of the video apart for a double click.
105
104
  */
106
105
  mouse: [
107
106
  "Mouse:LeftClick",
@@ -9,7 +9,7 @@ import { conditionJson, isCondition } from "./when.js";
9
9
  const value = (item) => typeof item === "function" ? item() : item;
10
10
  /**
11
11
  * A state field given as a function: the command is evaluated in the update
12
- * passes. Constants and `plugin.when` conditions are not (SDK 1.7.0).
12
+ * passes. Constants and `plugin.when` conditions are not.
13
13
  */
14
14
  const tracks = (spec) => Object.values(spec).some((field) => typeof field === "function");
15
15
  /** A field's value, or `fallback` (and its condition noted) for a condition. */
@@ -223,10 +223,10 @@ class CommandHandle {
223
223
  this.#pump.push(state).catch((error) => this.#scope.report(error));
224
224
  }
225
225
  /**
226
- * This command's state alone (SDK 1.7.0; before, a full update pass): a
227
- * bound command is evaluated in the next pass, a command of constants
228
- * sends its new state through its own `Latest` in a microtask (several
229
- * `set()` calls in one turn send one update). A function field binds it.
226
+ * This command's state alone (before, a full update pass): a bound command is
227
+ * evaluated in the next pass, a command of constants sends its new state
228
+ * through its own `Latest` in a microtask (several `set()` calls in one turn
229
+ * send one update). A function field binds it.
230
230
  */
231
231
  set(state) {
232
232
  Object.assign(this.#spec, state);
@@ -277,11 +277,10 @@ const NONE = Object.freeze([]);
277
277
  const KEYS = "commands.keys";
278
278
  /**
279
279
  * One per plugin: the SDK's copy of the key labels of the plugin's own
280
- * commands (player 0.7.6). Started by the first `keys` read or
281
- * `onKeysChange`: it subscribes to `commands.keys` (a mirror, unless a
282
- * listener or a binding holds it), then asks once; the player pushes every
283
- * later change. Answers and events carry the binding table's revision, and
284
- * an older one than what the copy has is dropped.
280
+ * commands. Started by the first `keys` read or `onKeysChange`: it subscribes
281
+ * to `commands.keys` (a mirror, unless a listener or a binding holds it), then
282
+ * asks once; the player pushes every later change. Answers and events carry the
283
+ * binding table's revision, and an older one than what the copy has is dropped.
285
284
  */
286
285
  class KeysService {
287
286
  #runtime;
@@ -303,7 +302,7 @@ class KeysService {
303
302
  runtime.on(KEYS, (data) => this.#accept(data), "commands", true);
304
303
  // Subscribed first: a change after this answer comes as an event.
305
304
  runtime.host.commands.keys().then((answer) => this.#accept(answer),
306
- // An older player (`unsupported`): no keys, as without a binding.
305
+ // `unsupported`: no keys, as without a binding.
307
306
  () => { });
308
307
  }
309
308
  #accept(data) {
@@ -1,15 +1,14 @@
1
1
  import type { Json, LocalServices, Transport, Wire } from "../wire.ts";
2
2
  import type { App, Disposable, Locale, StopReason, SystemInfo } from "./types.ts";
3
3
  /**
4
- * Why something listens, for the player's log line that says why a plugin
5
- * keeps running (`events.subscribe { why }`, player 0.5.21): computed
6
- * only when the player is told.
4
+ * Why something listens, for the player's log line that says why a plugin keeps
5
+ * running (`events.subscribe { why }`): computed only when the player is told.
7
6
  */
8
7
  export type Why = () => string;
9
8
  /**
10
- * Events the player wakes a stopped plugin for (player 0.5.21): a listener
11
- * of one does not keep the plugin running. They follow deliberate changes
12
- * (an install, a key edit, the palette, a resolver), not playback.
9
+ * Events the player wakes a stopped plugin for: a listener of one does not keep
10
+ * the plugin running. They follow deliberate changes (an install, a key edit,
11
+ * the palette, a resolver), not playback.
13
12
  */
14
13
  export declare const WAKE_EVENTS: readonly string[];
15
14
  export interface PluginManifest {
@@ -88,8 +87,8 @@ export declare class Connection {
88
87
  readonly locale: Locale;
89
88
  /**
90
89
  * Protocol additions the player advertises at start-up (`features` in the
91
- * handshake's app data, player 0.6.0): `ui.patch` (row patches of
92
- * property writes). Not part of the plugin API; empty for older players.
90
+ * handshake's app data): `ui.patch` (row patches of property writes). Not
91
+ * part of the plugin API.
93
92
  */
94
93
  readonly features: ReadonlySet<string>;
95
94
  constructor(transport: Transport, manifest: PluginManifest, directory: string, dataDirectory?: string, app?: unknown, options?: RuntimeOptions);
@@ -104,13 +103,13 @@ export declare class Connection {
104
103
  */
105
104
  starting<T>(work: Promise<T>, report: (error: unknown) => void): Promise<T>;
106
105
  /**
107
- * A declaration the player checks on its own (`what`: "command x"),
108
- * started like `starting`. In the player's runner a refusal of it during
109
- * activation (`invalid`, `conflict`, `limit`) does not fail the plugin:
110
- * it is logged, skipped and reported to the scope once activation
111
- * completes, so an `onError` added anywhere in `activate` hears it (SDK
112
- * 1.5.49; VS Code logs a bad contribution and activates the extension).
113
- * Under `strictDeclarations` (TestHost) it fails activation as before.
106
+ * A declaration the player checks on its own (`what`: "command x"), started
107
+ * like `starting`. In the player's runner a refusal of it during activation
108
+ * (`invalid`, `conflict`, `limit`) does not fail the plugin: it is logged,
109
+ * skipped and reported to the scope once activation completes, so an
110
+ * `onError` added anywhere in `activate` hears it (VS Code logs a bad
111
+ * contribution and activates the extension). Under `strictDeclarations`
112
+ * (TestHost) it fails activation as before.
114
113
  */
115
114
  declaring<T>(work: Promise<T>, what: string, report: (error: unknown) => void): Promise<T>;
116
115
  activated(): Promise<void>;
@@ -142,10 +141,10 @@ export declare class Connection {
142
141
  */
143
142
  listening(): Map<string, string[]>;
144
143
  /**
145
- * One request by its method name, as given (`plugin.wire.request`, SDK
146
- * 1.7.0): nothing added, nothing checked here, the player checks the
147
- * capability. Every other part of the SDK uses the typed clients
148
- * (`host`); `scripts/check-layers.mjs` keeps it so.
144
+ * One request by its method name, as given (`plugin.wire.request`): nothing
145
+ * added, nothing checked here, the player checks the capability. Every other
146
+ * part of the SDK uses the typed clients (`host`); `scripts/check-layers.mjs`
147
+ * keeps it so.
149
148
  */
150
149
  request<T>(method: string, params?: Json): Promise<T>;
151
150
  /** Raw transport events the host pushes without a subscription. */
@@ -14,9 +14,9 @@ import { fileURLToPath } from "node:url";
14
14
  /** The SDK's own files (`src/` or `dist/`): left out of a call site. */
15
15
  const SDK_DIRECTORY = fileURLToPath(new URL("..", import.meta.url));
16
16
  /**
17
- * Events the player wakes a stopped plugin for (player 0.5.21): a listener
18
- * of one does not keep the plugin running. They follow deliberate changes
19
- * (an install, a key edit, the palette, a resolver), not playback.
17
+ * Events the player wakes a stopped plugin for: a listener of one does not keep
18
+ * the plugin running. They follow deliberate changes (an install, a key edit,
19
+ * the palette, a resolver), not playback.
20
20
  */
21
21
  export const WAKE_EVENTS = [
22
22
  "packages.changed",
@@ -29,9 +29,9 @@ export const WAKE_EVENTS = [
29
29
  "resolvers.fileTypes",
30
30
  ];
31
31
  /**
32
- * The player's answers to a declaration that refuse that one declaration
33
- * (a command's path, texts or count): during activation they skip it
34
- * instead of failing the plugin (`Connection.declaring`, SDK 1.5.49).
32
+ * The player's answers to a declaration that refuse that one declaration (a
33
+ * command's path, texts or count): during activation they skip it instead of
34
+ * failing the plugin (`Connection.declaring`).
35
35
  */
36
36
  const DECLARATION_REFUSALS = new Set([
37
37
  "invalid",
@@ -112,8 +112,8 @@ export class Connection {
112
112
  locale;
113
113
  /**
114
114
  * Protocol additions the player advertises at start-up (`features` in the
115
- * handshake's app data, player 0.6.0): `ui.patch` (row patches of
116
- * property writes). Not part of the plugin API; empty for older players.
115
+ * handshake's app data): `ui.patch` (row patches of property writes). Not
116
+ * part of the plugin API.
117
117
  */
118
118
  features;
119
119
  constructor(transport, manifest, directory, dataDirectory, app, options = {}) {
@@ -178,13 +178,13 @@ export class Connection {
178
178
  return work;
179
179
  }
180
180
  /**
181
- * A declaration the player checks on its own (`what`: "command x"),
182
- * started like `starting`. In the player's runner a refusal of it during
183
- * activation (`invalid`, `conflict`, `limit`) does not fail the plugin:
184
- * it is logged, skipped and reported to the scope once activation
185
- * completes, so an `onError` added anywhere in `activate` hears it (SDK
186
- * 1.5.49; VS Code logs a bad contribution and activates the extension).
187
- * Under `strictDeclarations` (TestHost) it fails activation as before.
181
+ * A declaration the player checks on its own (`what`: "command x"), started
182
+ * like `starting`. In the player's runner a refusal of it during activation
183
+ * (`invalid`, `conflict`, `limit`) does not fail the plugin: it is logged,
184
+ * skipped and reported to the scope once activation completes, so an
185
+ * `onError` added anywhere in `activate` hears it (VS Code logs a bad
186
+ * contribution and activates the extension). Under `strictDeclarations`
187
+ * (TestHost) it fails activation as before.
188
188
  */
189
189
  declaring(work, what, report) {
190
190
  if (!this.#activating || this.#strict)
@@ -341,11 +341,10 @@ export class Connection {
341
341
  };
342
342
  }
343
343
  /**
344
- * A development warning, once per plugin, no behaviour change (SDK
345
- * 1.6.12): the plugin follows `event` (an `onChange`, a `bind` that reads
346
- * the state) without the `events` capability, so changes made elsewhere
347
- * (the user, the player, another plugin) never reach it; the state moves
348
- * only after its own calls.
344
+ * A development warning, once per plugin, no behaviour change: the plugin
345
+ * follows `event` (an `onChange`, a `bind` that reads the state) without the
346
+ * `events` capability, so changes made elsewhere (the user, the player,
347
+ * another plugin) never reach it; the state moves only after its own calls.
349
348
  */
350
349
  #warnUnheard(event) {
351
350
  if (this.#warnedEvents)
@@ -389,10 +388,10 @@ export class Connection {
389
388
  return result;
390
389
  }
391
390
  /**
392
- * One request by its method name, as given (`plugin.wire.request`, SDK
393
- * 1.7.0): nothing added, nothing checked here, the player checks the
394
- * capability. Every other part of the SDK uses the typed clients
395
- * (`host`); `scripts/check-layers.mjs` keeps it so.
391
+ * One request by its method name, as given (`plugin.wire.request`): nothing
392
+ * added, nothing checked here, the player checks the capability. Every other
393
+ * part of the SDK uses the typed clients (`host`); `scripts/check-layers.mjs`
394
+ * keeps it so.
396
395
  */
397
396
  request(method, params) {
398
397
  return this.#transport.request(method, params);
@@ -21,11 +21,11 @@ export interface PluginInstance {
21
21
  activated(): Promise<void>;
22
22
  /**
23
23
  * Stop the plugin: dispose the root scope, then stop the runtime.
24
- * `info.reason` (SDK 1.5.54) is why: the runner passes `runtime.stop`'s
25
- * `data.reason` (player 0.6.4), or `"host-lost"` when its input closed
26
- * without a `runtime.stop`. It reaches `plugin.stopReason` and every
27
- * `onDispose` cleanup; a reason the SDK does not know reads as
28
- * `undefined`. A second call runs no cleanup again and keeps the first reason.
24
+ * `info.reason` is why: the runner passes `runtime.stop`'s `data.reason`, or
25
+ * `"host-lost"` when its input closed without a `runtime.stop`. It reaches
26
+ * `plugin.stopReason` and every `onDispose` cleanup; a reason the SDK does
27
+ * not know reads as `undefined`. A second call runs no cleanup again and
28
+ * keeps the first reason.
29
29
  */
30
30
  dispose(info?: {
31
31
  reason?: unknown;
@@ -31,7 +31,7 @@ options) {
31
31
  // Failures the plugin did not ask about: a property the player could not
32
32
  // show when it rebuilt a panel or the Options window (an image removed
33
33
  // since), a callback whose arguments it could not convert, a detached
34
- // sidebar that could not be prepared. Older players send no code.
34
+ // sidebar that could not be prepared. A warning may come without a code.
35
35
  root.add(runtime.raw("ui.error", (data) => {
36
36
  const { code, message } = (data ?? {});
37
37
  root.report(failure(code ?? "ui", message ?? "user interface error"));
@@ -46,7 +46,7 @@ export declare const OSD_LIMITS: Readonly<{
46
46
  readonly minColumns: 8;
47
47
  /** The largest `OsdPanelOptions.maxColumns` (1000). */
48
48
  readonly maxColumns: 1000;
49
- /** Action buttons of one `osd.show` message (`OsdShowOptions.actions`; player 0.7.6) (2). */
49
+ /** Action buttons of one `osd.show` message (`OsdShowOptions.actions`) (2). */
50
50
  readonly actions: 2;
51
51
  /** Characters of an action's title, as shown (40; at least 1 that is not white space). */
52
52
  readonly actionChars: 40;
@@ -47,7 +47,7 @@ export const OSD_LIMITS = Object.freeze({
47
47
  minColumns: 8,
48
48
  /** The largest `OsdPanelOptions.maxColumns` (1000). */
49
49
  maxColumns: 1000,
50
- /** Action buttons of one `osd.show` message (`OsdShowOptions.actions`; player 0.7.6) (2). */
50
+ /** Action buttons of one `osd.show` message (`OsdShowOptions.actions`) (2). */
51
51
  actions: 2,
52
52
  /** Characters of an action's title, as shown (40; at least 1 that is not white space). */
53
53
  actionChars: 40,
@@ -77,10 +77,10 @@ export declare class Passes {
77
77
  readonly counts: PassCounts;
78
78
  constructor(connection: Connection);
79
79
  /**
80
- * Register a binding: `evaluate` runs in a full pass now and in every
81
- * pass that concerns it. Only what calls this takes part in the passes:
82
- * a view on its first `bind()`, a command with a function field, a
83
- * sequence provider (SDK 1.7.0; before, every view and command).
80
+ * Register a binding: `evaluate` runs in a full pass now and in every pass
81
+ * that concerns it. Only what calls this takes part in the passes: a view on
82
+ * its first `bind()`, a command with a function field, a sequence provider
83
+ * (before, every view and command).
84
84
  */
85
85
  bind(evaluate: () => void, slot?: number): BindingHandle;
86
86
  /**
@@ -116,10 +116,10 @@ export class Passes {
116
116
  this.#connection = connection;
117
117
  }
118
118
  /**
119
- * Register a binding: `evaluate` runs in a full pass now and in every
120
- * pass that concerns it. Only what calls this takes part in the passes:
121
- * a view on its first `bind()`, a command with a function field, a
122
- * sequence provider (SDK 1.7.0; before, every view and command).
119
+ * Register a binding: `evaluate` runs in a full pass now and in every pass
120
+ * that concerns it. Only what calls this takes part in the passes: a view on
121
+ * its first `bind()`, a command with a function field, a sequence provider
122
+ * (before, every view and command).
123
123
  */
124
124
  bind(evaluate, slot = this.slot()) {
125
125
  const held = new Map();
@@ -3,9 +3,9 @@ export declare const PATCH_FEATURE = "ui.patch";
3
3
  /** The most operations one patch carries (the player's `MAX_PATCH_OPS`). */
4
4
  export declare const PATCH_OPS = 1024;
5
5
  /**
6
- * The most operations one diff plans (SDK 1.5.46): its patch is sent as
7
- * several of at most {@link PATCH_OPS} each (`chunkOps`); more is sent whole
8
- * (in parts, which the player writes at once).
6
+ * The most operations one diff plans: its patch is sent as several of at most
7
+ * {@link PATCH_OPS} each (`chunkOps`); more is sent whole (in parts, which the
8
+ * player writes at once).
9
9
  */
10
10
  export declare const DIFF_OPS: number;
11
11
  /**
@@ -107,11 +107,11 @@ export declare function applyOps<T>(rows: T[], ops: readonly ({
107
107
  to: number;
108
108
  })[]): T[];
109
109
  /**
110
- * The bytes of rows one write carries at most (SDK 1.5.46, player 0.6.0):
111
- * half the 1 MiB protocol line, which leaves room for the request around
112
- * them. A larger whole write is sent as its first rows and `insert`
113
- * patches of the rest; a larger patch as several patches, each applying on
114
- * the one before (the player's doc/architecture/large-lists.md §4).
110
+ * The bytes of rows one write carries at most: half the 1 MiB protocol line,
111
+ * which leaves room for the request around them. A larger whole write is sent
112
+ * as its first rows and `insert` patches of the rest; a larger patch as several
113
+ * patches, each applying on the one before (the player's
114
+ * doc/architecture/large-lists.md §4).
115
115
  */
116
116
  export declare const CHUNK_BYTES: number;
117
117
  /** The bytes a row adds to a write (its JSON and a separator). */
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Row patches of array properties (player 0.6.0, feature `ui.patch`): the
3
- * diff between the rows last sent and the rows bound now, as `set`,
4
- * `insert`, `remove` and `move` operations by index. Internal; plugins see
5
- * none of it (the player's doc/architecture/large-lists.md §2).
2
+ * Row patches of array properties (feature `ui.patch`): the diff between the
3
+ * rows last sent and the rows bound now, as `set`, `insert`, `remove` and
4
+ * `move` operations by index. Internal; plugins see none of it (the player's
5
+ * doc/architecture/large-lists.md §2).
6
6
  */
7
7
  import { UI_VALUE_LIMITS } from "./values.js";
8
8
  /** The player feature that takes row patches. */
@@ -10,9 +10,9 @@ export const PATCH_FEATURE = "ui.patch";
10
10
  /** The most operations one patch carries (the player's `MAX_PATCH_OPS`). */
11
11
  export const PATCH_OPS = 1024;
12
12
  /**
13
- * The most operations one diff plans (SDK 1.5.46): its patch is sent as
14
- * several of at most {@link PATCH_OPS} each (`chunkOps`); more is sent whole
15
- * (in parts, which the player writes at once).
13
+ * The most operations one diff plans: its patch is sent as several of at most
14
+ * {@link PATCH_OPS} each (`chunkOps`); more is sent whole (in parts, which the
15
+ * player writes at once).
16
16
  */
17
17
  export const DIFF_OPS = 16 * PATCH_OPS;
18
18
  /**
@@ -346,11 +346,11 @@ export function applyOps(rows, ops) {
346
346
  return out;
347
347
  }
348
348
  /**
349
- * The bytes of rows one write carries at most (SDK 1.5.46, player 0.6.0):
350
- * half the 1 MiB protocol line, which leaves room for the request around
351
- * them. A larger whole write is sent as its first rows and `insert`
352
- * patches of the rest; a larger patch as several patches, each applying on
353
- * the one before (the player's doc/architecture/large-lists.md §4).
349
+ * The bytes of rows one write carries at most: half the 1 MiB protocol line,
350
+ * which leaves room for the request around them. A larger whole write is sent
351
+ * as its first rows and `insert` patches of the rest; a larger patch as several
352
+ * patches, each applying on the one before (the player's
353
+ * doc/architecture/large-lists.md §4).
354
354
  */
355
355
  export const CHUNK_BYTES = 512 * 1024;
356
356
  /** About what an operation adds to a request besides its rows. */
@@ -1,9 +1,9 @@
1
1
  /**
2
- * `plugin.player.on` (L1, refactor plan §2.2; SDK 1.7.0): one listener of
3
- * one player event, with the event's data as the player sent it. It is a
4
- * plain subscription of the connection (counted as a listener, its `why`
5
- * naming where the plugin added it), never a state copy: nothing is kept,
6
- * nothing is compared.
2
+ * `plugin.player.on` (L1, refactor plan §2.2): one listener of one player
3
+ * event, with the event's data as the player sent it. It is a plain
4
+ * subscription of the connection (counted as a listener, its `why` naming where
5
+ * the plugin added it), never a state copy: nothing is kept, nothing is
6
+ * compared.
7
7
  */
8
8
  import { failure } from "../errors.js";
9
9
  /**
@@ -8,9 +8,9 @@ import { windowOf } from "./window.js";
8
8
  const isFiles = (options) => "extensions" in options;
9
9
  const sameTypes = (a, b) => a.length === b.length && a.every((type, i) => type === b[i]);
10
10
  /**
11
- * One per plugin: the list comes with the `window.state` read before
12
- * activation (`[]` from older players) and is read again when the plugin
13
- * first uses it; with `events`, `resolvers.fileTypes` keeps it current.
11
+ * One per plugin: the list comes with the `window.state` read before activation
12
+ * and is read again when the plugin first uses it; with `events`,
13
+ * `resolvers.fileTypes` keeps it current.
14
14
  */
15
15
  class FileTypesService {
16
16
  #runtime;
@@ -66,10 +66,10 @@ export declare class ScopeImpl implements Plugin {
66
66
  */
67
67
  runOn(change: Change, handler: (...args: never[]) => unknown, ...args: unknown[]): void;
68
68
  /**
69
- * Run a listener that pushes its own values (`player.on`, SDK 1.7.0)
70
- * like `run`, except that no full pass follows it: what it writes to
71
- * `plugin.state` runs the passes for its readers, and for anything else
72
- * the plugin calls `update()`. Its reads are not counted as a binding's.
69
+ * Run a listener that pushes its own values (`player.on`) like `run`, except
70
+ * that no full pass follows it: what it writes to `plugin.state` runs the
71
+ * passes for its readers, and for anything else the plugin calls `update()`.
72
+ * Its reads are not counted as a binding's.
73
73
  */
74
74
  runQuiet(handler: (...args: never[]) => unknown, ...args: unknown[]): void;
75
75
  update(): void;
@@ -184,10 +184,10 @@ export class ScopeImpl {
184
184
  this.update();
185
185
  }
186
186
  /**
187
- * Run a listener that pushes its own values (`player.on`, SDK 1.7.0)
188
- * like `run`, except that no full pass follows it: what it writes to
189
- * `plugin.state` runs the passes for its readers, and for anything else
190
- * the plugin calls `update()`. Its reads are not counted as a binding's.
187
+ * Run a listener that pushes its own values (`player.on`) like `run`, except
188
+ * that no full pass follows it: what it writes to `plugin.state` runs the
189
+ * passes for its readers, and for anything else the plugin calls `update()`.
190
+ * Its reads are not counted as a binding's.
191
191
  */
192
192
  runQuiet(handler, ...args) {
193
193
  if (this.disposed)
@@ -114,8 +114,7 @@ export declare const SECRET_LIMITS: Readonly<{
114
114
  export declare const secrets: (scope: ScopeImpl) => Secrets;
115
115
  export declare const rendering: (scope: ScopeImpl) => Rendering;
116
116
  /**
117
- * `plugin.video.upscaling` (player 0.5.16): both requests need
118
- * `video.upscaling`; the player answers once its GPU check ran (the first
119
- * call starts it).
117
+ * `plugin.video.upscaling`: both requests need `video.upscaling`; the player
118
+ * answers once its GPU check ran (the first call starts it).
120
119
  */
121
120
  export declare const videoUpscaling: (scope: ScopeImpl) => VideoUpscaling;
@@ -498,9 +498,8 @@ export const rendering = (scope) => {
498
498
  };
499
499
  };
500
500
  /**
501
- * `plugin.video.upscaling` (player 0.5.16): both requests need
502
- * `video.upscaling`; the player answers once its GPU check ran (the first
503
- * call starts it).
501
+ * `plugin.video.upscaling`: both requests need `video.upscaling`; the player
502
+ * answers once its GPU check ran (the first call starts it).
504
503
  */
505
504
  export const videoUpscaling = (scope) => {
506
505
  const declared = () => {
@@ -1,10 +1,9 @@
1
1
  /**
2
- * The shader channel `plugin.video.shaders(id)` (SDK 1.5.39, player
3
- * 0.5.20): this plugin's own mpv user shaders, joined by the player with
4
- * every other plugin's in a stable order. Unlike `video.render()` any
5
- * number of plugins hold one at a time; each handle sends its whole list
6
- * (last write wins) and the player answers `applied`, `waiting` (no ready
7
- * media), or a failure.
2
+ * The shader channel `plugin.video.shaders(id)`: this plugin's own mpv user
3
+ * shaders, joined by the player with every other plugin's in a stable order.
4
+ * Unlike `video.render()` any number of plugins hold one at a time; each handle
5
+ * sends its whole list (last write wins) and the player answers `applied`,
6
+ * `waiting` (no ready media), or a failure.
8
7
  */
9
8
  import { isAbsolute } from "node:path";
10
9
  import { Latest } from "./latest.js";
@@ -1,14 +1,14 @@
1
1
  /**
2
- * `plugin.state(initial)` (L2, the framework; refactor plan §3.5, SDK
3
- * 1.7.0): plugin-owned state the update passes follow like the SDK's own
4
- * state copies. A read of a field inside what a pass evaluates records
5
- * `(store, field)` through `Runtime.depends`, the mechanism
6
- * `plugin.player.state` uses; a write of a field that changes it
7
- * (`Object.is`) reports `Runtime.changed(store, [field])`, so the next pass
8
- * is a precise one that evaluates only that field's readers. One level:
9
- * the value of a field is compared by identity, nothing inside it is
10
- * tracked. It belongs to the calling scope: once that scope is disposed
11
- * the object is a plain one, read and written without tracking.
2
+ * `plugin.state(initial)` (L2, the framework; refactor plan §3.5): plugin-owned
3
+ * state the update passes follow like the SDK's own state copies. A read of a
4
+ * field inside what a pass evaluates records `(store, field)` through
5
+ * `Runtime.depends`, the mechanism `plugin.player.state` uses; a write of a
6
+ * field that changes it (`Object.is`) reports
7
+ * `Runtime.changed(store, [field])`, so the next pass is a precise one that
8
+ * evaluates only that field's readers. One level: the value of a field is
9
+ * compared by identity, nothing inside it is tracked. It belongs to the calling
10
+ * scope: once that scope is disposed the object is a plain one, read and
11
+ * written without tracking.
12
12
  */
13
13
  import { failure } from "./errors.js";
14
14
  /** Each store's key in the passes' field tracking (`state:1`, `state:2`…). */
@@ -8,11 +8,10 @@ export declare function bindingClaims(host: TestHost, inner: Internals): Map<str
8
8
  /** `host/<id>` for core commands, `<manifest id>/<id>` for the plugin's. */
9
9
  export declare function bindingKey(host: TestHost, _inner: Internals, id: string): string;
10
10
  /**
11
- * `commands.keys` as the player answers it: each of the plugin's own
12
- * commands, and the player's core commands as `host/<id>` (SDK 1.6.16),
13
- * with the labels of the keys it holds now (the overlay, else its
14
- * defaults; not a key an earlier command holds), as menus write them on
15
- * `systemInfo.os`.
11
+ * `commands.keys` as the player answers it: each of the plugin's own commands,
12
+ * and the player's core commands as `host/<id>`, with the labels of the keys it
13
+ * holds now (the overlay, else its defaults; not a key an earlier command
14
+ * holds), as menus write them on `systemInfo.os`.
16
15
  */
17
16
  export declare function commandKeys(host: TestHost, inner: Internals): {
18
17
  keys: Record<string, string[]>;
@@ -42,11 +42,10 @@ export function bindingKey(host, _inner, id) {
42
42
  return host.coreCommands.has(id) ? id : `${host.manifestId}/${id}`;
43
43
  }
44
44
  /**
45
- * `commands.keys` as the player answers it: each of the plugin's own
46
- * commands, and the player's core commands as `host/<id>` (SDK 1.6.16),
47
- * with the labels of the keys it holds now (the overlay, else its
48
- * defaults; not a key an earlier command holds), as menus write them on
49
- * `systemInfo.os`.
45
+ * `commands.keys` as the player answers it: each of the plugin's own commands,
46
+ * and the player's core commands as `host/<id>`, with the labels of the keys it
47
+ * holds now (the overlay, else its defaults; not a key an earlier command
48
+ * holds), as menus write them on `systemInfo.os`.
50
49
  */
51
50
  export function commandKeys(host, inner) {
52
51
  const claims = bindingClaims(host, inner);
@@ -2,7 +2,7 @@ import type { TemplateArgs, TextValue } from "../types.ts";
2
2
  import type { TextJson } from "../../i18n.ts";
3
3
  import type { TestHost } from "./index.ts";
4
4
  import type { Handler, Internals } from "./internals.ts";
5
- /** Texts only the test host uses, with their Chinese of SDK 1.5.8. */
5
+ /** Texts only the test host uses, with their Chinese. */
6
6
  export declare const TEST_ZH_HANS: Readonly<Record<string, string>>;
7
7
  /**
8
8
  * A text of a request as the player shows it, refused as the player
@@ -9,7 +9,7 @@
9
9
  import { HostError } from "../../wire.js";
10
10
  import { THEMES } from "../appearance.js";
11
11
  import { format as formatTemplate, HOST_GROUPS, HOST_ZH_HANS, LOCALES, isTextValue, menuKeys, renderTemplateArgs, renderText, resolveTexts, textKey, textProblem, } from "../../i18n.js";
12
- /** Texts only the test host uses, with their Chinese of SDK 1.5.8. */
12
+ /** Texts only the test host uses, with their Chinese. */
13
13
  export const TEST_ZH_HANS = {
14
14
  "this site": "这个网站",
15
15
  "External SRT": "外部 SRT",