@vestra-player/sdk 1.7.0 → 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 +16 -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 +32 -38
  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
@@ -2,8 +2,7 @@ import type { Plugin } from "./base.ts";
2
2
  import type { Disposable } from "./base.ts";
3
3
  /**
4
4
  * The manifest of a package, as validated. The display fields and
5
- * `minPlayerVersion` are optional (player 0.2.0); see the API reference for
6
- * their rules.
5
+ * `minPlayerVersion` are optional; see the API reference for their rules.
7
6
  *
8
7
  * @since 1.0.0
9
8
  * @category Packages
@@ -91,24 +90,18 @@ export interface InstallOptions {
91
90
  */
92
91
  replace?: boolean;
93
92
  /**
94
- * Whether the plugin runs once installed (SDK 1.5.55). Left out, a first
95
- * install runs and an update or reinstall (from any source, `replace`
96
- * included) keeps the installed plugin's state: one the user or a store
97
- * disabled stays disabled, and only its files are installed (nothing
98
- * starts it, so the change commits without an `activating` step). `true`
99
- * enables and starts it, for example a version the store disabled that
100
- * an update fixes; if it fails to start, the old version is restored,
101
- * still disabled. `false` installs it disabled: a running version is
102
- * stopped and its session values go, as with {@link Packages.setEnabled}.
103
- * Built-in plugins always run (and cannot be installed over). A value
104
- * that is not a boolean is `invalid`.
105
- *
106
- * Player 0.6.4 and later: older players ignore it and an install there
107
- * always runs the plugin, so after a committed install call
108
- * {@link Packages.setEnabled} when the state matters.
109
- *
110
- * @player 0.6.4; older players ignore it (an install always
111
- * enables the plugin).
93
+ * Whether the plugin runs once installed. Left out, a first install runs and
94
+ * an update or reinstall (from any source, `replace` included) keeps the
95
+ * installed plugin's state: one the user or a store disabled stays disabled,
96
+ * and only its files are installed (nothing starts it, so the change commits
97
+ * without an `activating` step). `true` enables and starts it, for example a
98
+ * version the store disabled that an update fixes; if it fails to start, the
99
+ * old version is restored, still disabled. `false` installs it disabled: a
100
+ * running version is stopped and its session values go, as with
101
+ * {@link Packages.setEnabled}. Built-in plugins always run (and cannot be
102
+ * installed over). A value that is not a boolean is `invalid`.
103
+ *
104
+ * @player 0.6.4
112
105
  */
113
106
  enabled?: boolean;
114
107
  }
@@ -150,14 +143,13 @@ export interface PackageCandidate {
150
143
  /** The checks the player ran. */
151
144
  readonly checks: string[];
152
145
  /**
153
- * Install it. The same source upgrades the installed plugin (its data
154
- * stays); another source fails with `conflict` unless `replace` is set;
155
- * a built-in id fails with `unsupported` (built-ins update with the
156
- * player). A reserved id (`vestra` or `vestra.*`, which every built-in
157
- * uses) fails with `reserved` (player 0.4.1; already when validated), as
158
- * only the player installs built-in plugins. An update keeps a disabled
159
- * plugin disabled unless `enabled` says otherwise (player 0.6.4; see
160
- * {@link InstallOptions.enabled}).
146
+ * Install it. The same source upgrades the installed plugin (its data stays);
147
+ * another source fails with `conflict` unless `replace` is set; a built-in id
148
+ * fails with `unsupported` (built-ins update with the player). A reserved id
149
+ * (`vestra` or `vestra.*`, which every built-in uses) fails with `reserved`
150
+ * (already when validated), as only the player installs built-in plugins. An
151
+ * update keeps a disabled plugin disabled unless `enabled` says otherwise
152
+ * (see {@link InstallOptions.enabled}).
161
153
  *
162
154
  * @capability plugins.manage
163
155
  * @throws `invalid` (rejects) An option is malformed: a `source` the
@@ -189,10 +181,9 @@ export interface PackageCandidate {
189
181
  * ```
190
182
  *
191
183
  * @example Enable a fixed version of a plugin the store disabled
192
- * A store disabled a version it revoked; the update that fixes it
193
- * should run again. Without `enabled` the update keeps the plugin
194
- * disabled (player 0.6.4); `true` enables it once installed. Older
195
- * players ignore the option and enable every install.
184
+ * A store disabled a version it revoked; the update that fixes it should run
185
+ * again. Without `enabled` the update keeps the plugin disabled; `true`
186
+ * enables it once installed.
196
187
  * ```ts
197
188
  * declare const candidate: PackageCandidate;
198
189
  * // ---cut---
@@ -326,9 +317,8 @@ export interface PluginInfo {
326
317
  */
327
318
  directory: string;
328
319
  /**
329
- * Shipped with the player: it always runs; it cannot be disabled,
330
- * uninstalled or replaced (older players, before SDK 1.5.18, let it be disabled).
331
- * `false` from players before 0.2.0.
320
+ * Shipped with the player: it always runs; it cannot be disabled, uninstalled
321
+ * or replaced.
332
322
  */
333
323
  builtin: boolean;
334
324
  /** Where an installed plugin came from; `null` for development loads. */
@@ -342,7 +332,7 @@ export interface PluginInfo {
342
332
  * What a running plugin was refused because another plugin holds it: a
343
333
  * panel position (`slot-occupied`, with `slot`) or the next/previous
344
334
  * sequence (`sequence-taken`). Neither fails activation; `error` has the
345
- * same as text. Empty from players before 0.4.x (after 0.4.0).
335
+ * same as text.
346
336
  * Always set by the SDK; optional so that code building `PluginInfo`
347
337
  * values itself (tests) keeps compiling.
348
338
  *
@@ -358,19 +348,17 @@ export interface PluginInfo {
358
348
  */
359
349
  display?: PluginDisplay;
360
350
  /**
361
- * For `state: "running"`: `"running"` while its process runs, `"idle"`
362
- * while the plugin is switched on but has no process. That is standby
363
- * with on-demand start (lazy activation): nothing used it for the idle
364
- * time, or the player's limit on third-party processes or low system
365
- * memory stopped it early (player 0.7.1); it starts again on its next
366
- * use, and its menu items, keys, settings pages, resolvers and drop
367
- * targets stay. From player 0.7.1 it is also the pause after a crash: a
368
- * built-in or resident plugin waiting to start again by itself, or a
369
- * plugin that has run before whose commands are shown disabled with the
370
- * reason until the pause ends. Absent in other states and from players
371
- * before 0.5.18. A change between the two alone does not fire
372
- * {@link Packages.onChange}; a plugin stopped by the start limit (five
373
- * crashes within 10 minutes) is `state: "failed"` with that in
351
+ * For `state: "running"`: `"running"` while its process runs, `"idle"` while
352
+ * the plugin is switched on but has no process. That is standby with
353
+ * on-demand start (lazy activation): nothing used it for the idle time, or
354
+ * the player's limit on third-party processes or low system memory stopped it
355
+ * early; it starts again on its next use, and its menu items, keys, settings
356
+ * pages, resolvers and drop targets stay. It is also the pause after a crash:
357
+ * a built-in or resident plugin waiting to start again by itself, or a plugin
358
+ * that has run before whose commands are shown disabled with the reason until
359
+ * the pause ends. Absent in other states. A change between the two alone does
360
+ * not fire {@link Packages.onChange}; a plugin stopped by the start limit
361
+ * (five crashes within 10 minutes) is `state: "failed"` with that in
374
362
  * {@link PluginInfo.error}.
375
363
  *
376
364
  * @since 1.5.38
@@ -404,8 +392,8 @@ export interface PluginDisplay {
404
392
  */
405
393
  export interface PluginWarning {
406
394
  /**
407
- * `"slot-occupied"`, `"sequence-taken"` or `"resolver-taken"` (player
408
- * 0.4.1); a newer player may add codes.
395
+ * `"slot-occupied"`, `"sequence-taken"` or `"resolver-taken"`; a newer player
396
+ * may add codes.
409
397
  */
410
398
  code: string;
411
399
  /** The panel position (`"bottom"`, `"backdrop"`; the sidebar and the adjust column hold any number of tabs) for `slot-occupied`. */
@@ -453,11 +441,10 @@ export interface Packages {
453
441
  /**
454
442
  * Validate a package directory (`plugins.manage`). A package whose id is
455
443
  * reserved for the built-in plugins (`vestra` or `vestra.*`) fails with
456
- * `reserved` (player 0.4.1).
444
+ * `reserved`.
457
445
  *
458
- * The player keeps the 32 most recent candidates of all plugins; an
459
- * older one's `install` fails with `stale` (validate again). Before
460
- * player 0.4.2 the 33rd validation of a run failed with `busy` instead.
446
+ * The player keeps the 32 most recent candidates of all plugins; an older
447
+ * one's `install` fails with `stale` (validate again).
461
448
  *
462
449
  * @capability plugins.manage
463
450
  * @throws `host` (rejects) Not a package directory, or a manifest that
@@ -492,10 +479,10 @@ export interface Packages {
492
479
  */
493
480
  validate(directory: string): Promise<PackageCandidate>;
494
481
  /**
495
- * Validate a `.vxp` package file (`plugins.manage`, player 0.2.0): the
496
- * same checks as {@link Packages.validate} after unpacking. Check the
497
- * file's sha256 yourself before calling when you know it. A reserved id
498
- * fails with `reserved`, as in {@link Packages.validate}.
482
+ * Validate a `.vxp` package file (`plugins.manage`): the same checks as
483
+ * {@link Packages.validate} after unpacking. Check the file's sha256 yourself
484
+ * before calling when you know it. A reserved id fails with `reserved`, as in
485
+ * {@link Packages.validate}.
499
486
  *
500
487
  * @capability plugins.manage
501
488
  * @throws `invalid` (rejects) The path does not end in `.vxp`, or the
@@ -567,8 +554,7 @@ export interface Packages {
567
554
  * disabled across launches; a development load only for this run.
568
555
  * `invalid` to disable oneself, `missing` unknown.
569
556
  * `busy` while it is being installed or reloaded. `unsupported` to disable a built-in
570
- * ({@link PluginInfo.builtin}): users manage third-party plugins only
571
- * (players released with SDK 1.5.18 on; older ones disabled built-ins too).
557
+ * ({@link PluginInfo.builtin}): users manage third-party plugins only.
572
558
  *
573
559
  * @capability plugins.manage
574
560
  * @throws `invalid` (rejects) Disabling the calling plugin itself.
@@ -604,8 +590,7 @@ export interface Packages {
604
590
  * `invalid` for oneself or a disabled plugin (enable it instead),
605
591
  * `missing` unknown, `busy` while it is being installed or reloaded.
606
592
  *
607
- * @player 0.5.1; older players reject it as an unknown request
608
- * (`unsupported`).
593
+ * @player 0.5.1
609
594
  * @since 1.5.19
610
595
  *
611
596
  * @capability plugins.manage
@@ -46,7 +46,7 @@ export interface TimelineMark {
46
46
  */
47
47
  export type RangeStyle = "selection" | "region";
48
48
  /**
49
- * One range on the seek bar (player 0.7.6).
49
+ * One range on the seek bar.
50
50
  *
51
51
  * @since 1.6.9
52
52
  * @category Playback
@@ -89,10 +89,10 @@ export interface TimelineLayer extends Disposable {
89
89
  /**
90
90
  * Replace the layer (last write wins; `[]` clears it). At most 1000 marks,
91
91
  * titles ≤ 100 characters, times within the media. Failures go to `onError`;
92
- * with `ifCurrent`, a write for another source is dropped silently.
93
- * A title is data (a chapter's or bookmark's own name), or a {@link Text}
94
- * the player translates (`text("Chapter {}", [n])`, SDK 1.5.11); other
95
- * plugins read the shown string.
92
+ * with `ifCurrent`, a write for another source is dropped silently. A title
93
+ * is data (a chapter's or bookmark's own name), or a {@link Text} the player
94
+ * translates (`text("Chapter {}", [n])`); other plugins read the shown
95
+ * string.
96
96
  *
97
97
  * @example Show the file's bookmarks on the timeline
98
98
  * Bookmark marks appear on the seek bar at their times, titled with the
@@ -122,10 +122,10 @@ export interface TimelineLayer extends Disposable {
122
122
  }): void;
123
123
  /**
124
124
  * Replace the layer's ranges (last write wins; `[]` clears them), spans of
125
- * the media drawn on the seek bar (player 0.7.6). The marks and the ranges
126
- * of a layer are replaced on their own: `set` keeps the ranges and
127
- * `setRanges` keeps the marks. Disposing the layer, its scope or stopping
128
- * the plugin removes both, and a new source clears every layer.
125
+ * the media drawn on the seek bar. The marks and the ranges of a layer are
126
+ * replaced on their own: `set` keeps the ranges and `setRanges` keeps the
127
+ * marks. Disposing the layer, its scope or stopping the plugin removes both,
128
+ * and a new source clears every layer.
129
129
  *
130
130
  * At most 100 ranges (`TIMELINE_LIMITS.ranges`), `0 ≤ start < end`, `end`
131
131
  * within the media while its duration is known, titles ≤ 100 characters.
@@ -133,10 +133,6 @@ export interface TimelineLayer extends Disposable {
133
133
  * write for another source is dropped silently. A title is data or a
134
134
  * {@link Text} the player translates, as in `set`.
135
135
  *
136
- * Players before 0.7.6 build `plugin` from an SDK without `setRanges`, so
137
- * the call throws a `TypeError` there: declare
138
- * `"minPlayerVersion": "0.7.6"`.
139
- *
140
136
  * @example Show the clip range on the seek bar while a panel is open
141
137
  * The span the user picked shows on the seek bar in the accent colour
142
138
  * while the plugin's tab is showing, and goes when it is not. Two point
@@ -199,11 +195,10 @@ export interface Timeline {
199
195
  /** Every layer merged, by time (`playback.read`). Empty on a new source. */
200
196
  readonly marks: readonly TimelineMark[];
201
197
  /**
202
- * Every layer's ranges merged, by start (`playback.read`; player 0.7.6:
203
- * on older players `ranges` does not exist and reads `undefined`). Empty
204
- * on a new source. Kept current like `marks` (with `events`): read it in
205
- * a {@link View.bind} function and the view follows it. `onChange` runs
206
- * only when the marks change.
198
+ * Every layer's ranges merged, by start (`playback.read`). Empty on a new
199
+ * source. Kept current like `marks` (with `events`): read it in a
200
+ * {@link View.bind} function and the view follows it. `onChange` runs only
201
+ * when the marks change.
207
202
  *
208
203
  * @example Draw the published ranges in a seek bar of your own
209
204
  * A bottom bar draws a band for every range on the seek bar, whoever
@@ -298,7 +293,7 @@ export interface AudioTrack {
298
293
  * Without `events`, {@link Player.state} only updates at start and after
299
294
  * this plugin's own operations.
300
295
  *
301
- * @see {@link Player.state}, [Playback state, controls and sources](../../../docs/explanation/playback.md)
296
+ * @see {@link Player.state}, [Control playback](../../../docs/guides/control-playback.md)
302
297
  * @since 1.0.0
303
298
  * @category Playback
304
299
  */
@@ -431,7 +426,7 @@ export interface Chapter {
431
426
  * });
432
427
  * ```
433
428
  *
434
- * @see [Playback state, controls and sources](../../../docs/explanation/playback.md)
429
+ * @see [Control playback](../../../docs/guides/control-playback.md)
435
430
  * @since 1.0.0
436
431
  * @category Playback
437
432
  */
@@ -574,7 +569,7 @@ export interface Media {
574
569
  * seeks resolve `false`.
575
570
  *
576
571
  * @capability playback.control
577
- * @see [Keep a slider responsive while dragging](../../../docs/how-to/slider.md)
572
+ * @see [Keep a slider responsive while dragging](../../../docs/guides/slider.md)
578
573
  * @since 1.0.0
579
574
  * @category Playback
580
575
  */
@@ -584,18 +579,16 @@ export interface Scrub {
584
579
  * `false` when a newer target superseded it or the gesture ended. Rejects
585
580
  * on a host failure.
586
581
  *
587
- * `keyframes: true` (player 0.5.3, SDK 1.5.22): land on the last keyframe
588
- * at or before `seconds` instead of decoding up to that exact frame. The
589
- * picture appears at once on any file (tens of milliseconds instead of
590
- * seconds on 4K video with keyframes far apart), up to one keyframe
591
- * interval before the target; the position the player reports is the
592
- * keyframe's. Use it when the user chose keyframe seeks (the same switch
593
- * as {@link Player.setStepSeek}), and the exact seek otherwise. The player
594
- * sends a repeated target of the same gesture only once while the seek is
595
- * still running (a click is a press and a release), but an exact seek to
596
- * the target of a keyframe seek is always sent. Omitted or `false`: exact,
597
- * as before. Older players ignore the option and seek exactly: set
598
- * `"minPlayerVersion": "0.5.3"` when you rely on it.
582
+ * `keyframes: true`: land on the last keyframe at or before `seconds` instead
583
+ * of decoding up to that exact frame. The picture appears at once on any file
584
+ * (tens of milliseconds instead of seconds on 4K video with keyframes far
585
+ * apart), up to one keyframe interval before the target; the position the
586
+ * player reports is the keyframe's. Use it when the user chose keyframe seeks
587
+ * (the same switch as {@link Player.setStepSeek}), and the exact seek
588
+ * otherwise. The player sends a repeated target of the same gesture only once
589
+ * while the seek is still running (a click is a press and a release), but an
590
+ * exact seek to the target of a keyframe seek is always sent. Omitted or
591
+ * `false`: exact, as before.
599
592
  *
600
593
  * @example Scrub on keyframes for a fast picture
601
594
  * While dragging, the picture jumps to the nearest earlier keyframe at
@@ -843,8 +836,7 @@ export interface PlaybackStats {
843
836
  * a new picture on screen. Lower than `video.fps` when frames are lost
844
837
  * after decoding and rendering (the window could not keep up with the
845
838
  * source, or the display refreshes slower); `0` while paused. `null` when
846
- * the player cannot measure it (no window, the first second, players
847
- * before 0.5.1).
839
+ * the player cannot measure it (no window, the first second).
848
840
  *
849
841
  * @player 0.5.1
850
842
  * @since 1.5.15
@@ -950,7 +942,7 @@ export interface PlaybackStats {
950
942
  * `events` to follow changes made elsewhere; `producer.av` for
951
943
  * {@link Player.openStream}.
952
944
  *
953
- * @see [Playback state, controls and sources](../../../docs/explanation/playback.md), [Control playback](../../../docs/how-to/control-playback.md)
945
+ * @see [Control playback](../../../docs/guides/control-playback.md)
954
946
  * @since 1.0.0
955
947
  * @category Playback
956
948
  */
@@ -1010,13 +1002,11 @@ export interface Player {
1010
1002
  * {@link Scope.state} field re-runs only its readers, and
1011
1003
  * {@link Scope.update} re-runs everything.
1012
1004
  *
1013
- * Each event needs a capability: `events` for most, `bindings.manage`
1014
- * for `bindings.changed`, `commands` for `commands.keys`,
1015
- * `video.upscaling` for `video.upscaling.changed`, none for
1016
- * `packages.changed`. Without it the listener never runs (for `events`,
1017
- * a warning in the log says so). An event an older player does not know
1018
- * yet (`commands.keys`, `video.upscaling.changed`) is refused with
1019
- * `unsupported`; added during `activate`, that fails the activation.
1005
+ * Each event needs a capability: `events` for most, `bindings.manage` for
1006
+ * `bindings.changed`, `commands` for `commands.keys`, `video.upscaling` for
1007
+ * `video.upscaling.changed`, none for `packages.changed`. Without it the
1008
+ * listener never runs (for `events`, a warning in the log says so). Added
1009
+ * during `activate`, that fails the activation.
1020
1010
  *
1021
1011
  * @param event - The event's name.
1022
1012
  * @param listener - Receives each event's data.
@@ -1037,7 +1027,7 @@ export interface Player {
1037
1027
  * plugin.player.on("source.state", (s) => bar.set({ rate: `${s.rate.toFixed(2)}×` }));
1038
1028
  * ```
1039
1029
  *
1040
- * @see [Three ways to write a plugin](../../../docs/explanation/three-ways.md)
1030
+ * @see [Tutorial](../../../docs/tutorial/index.md)
1041
1031
  * @since 1.7.0
1042
1032
  */
1043
1033
  on<E extends HostEvent>(event: E, listener: (data: EventPayload<E>) => void): Disposable;
@@ -1331,7 +1321,7 @@ export interface Player {
1331
1321
  * bar.on("dragEnd", () => scrub?.end());
1332
1322
  * ```
1333
1323
  *
1334
- * @see [Keep a slider responsive while dragging](../../../docs/how-to/slider.md)
1324
+ * @see [Keep a slider responsive while dragging](../../../docs/guides/slider.md)
1335
1325
  * @since 1.0.0
1336
1326
  */
1337
1327
  scrub(): Scrub;
@@ -1566,21 +1556,17 @@ export interface Player {
1566
1556
  * ← / →): 0.1–3600 seconds in tenths, default 5. The newest call of any
1567
1557
  * plugin wins; it reverts when that plugin stops.
1568
1558
  *
1569
- * `keyframes: true` (player 0.5.1, SDK 1.5.19): the step seeks
1570
- * (`seek-backward` / `seek-forward`, including {@link Host.run} with
1571
- * `seconds` and the picture-in-picture skips) land on a keyframe instead
1572
- * of the exact time: forward on the first keyframe at or after position +
1573
- * step, backward on the last at or before position − step, and they
1574
- * always move. Presses during a seek add up and continue from where it
1575
- * landed; the on-screen text shows the landed time. Sources without moving
1576
- * video seek exactly. {@link Player.seek}, chapters, loops and
1559
+ * `keyframes: true`: the step seeks (`seek-backward` / `seek-forward`,
1560
+ * including {@link Host.run} with `seconds` and the picture-in-picture skips)
1561
+ * land on a keyframe instead of the exact time: forward on the first keyframe
1562
+ * at or after position + step, backward on the last at or before position −
1563
+ * step, and they always move. Presses during a seek add up and continue from
1564
+ * where it landed; the on-screen text shows the landed time. Sources without
1565
+ * moving video seek exactly. {@link Player.seek}, chapters, loops and
1577
1566
  * {@link Player.step} are unaffected, and so is a scrub unless it asks for
1578
- * keyframes itself ({@link Scrub.seek} with `keyframes: true`, SDK 1.5.22).
1579
- * Omitted or `false`: exact seeks, as before. `seconds` and `keyframes`
1580
- * are written as a pair: the newest call sets both.
1581
- *
1582
- * Older players ignore `keyframes`: set `"minPlayerVersion": "0.5.1"` in
1583
- * the manifest when you rely on it.
1567
+ * keyframes itself ({@link Scrub.seek} with `keyframes: true`). Omitted or
1568
+ * `false`: exact seeks, as before. `seconds` and `keyframes` are written as a
1569
+ * pair: the newest call sets both.
1584
1570
  *
1585
1571
  * @capability playback.control
1586
1572
  * @throws `invalid` (rejects) `seconds` outside 0.1–3600 or not in tenths,
@@ -34,10 +34,9 @@ import type { View } from "./ui-content.ts";
34
34
  * name and says which one; a method name it cannot read is reported as
35
35
  * unchecked).
36
36
  *
37
- * [Three ways to write a plugin](../../../docs/explanation/three-ways.md)
38
- * compares `bind()` (the default), {@link Player.on} with
39
- * {@link View.set}, and `plugin.wire` on four scenarios; the method and
40
- * event names are in [Messages](../../../docs/reference/messages.md) and
37
+ * The [Tutorial](../../../docs/tutorial/index.md) shows `bind()` (the
38
+ * default), {@link Player.on} with {@link View.set}, and `plugin.wire`
39
+ * side by side, from examples/three-ways; the method and event names are in [Messages](../../../docs/reference/messages.md) and
41
40
  * [Events](../../../docs/reference/events.md).
42
41
  *
43
42
  * @example Show the speed with direct messages
@@ -65,14 +64,12 @@ export interface Wire {
65
64
  * Send one request to the player by its method name and get its answer.
66
65
  *
67
66
  * @remarks
68
- * Experimental: the wire protocol is not semver; this member changes
69
- * with versions. `method` and `params` go to the player as given; the
70
- * answer is the player's result, typed by the caller (`T`). The player
71
- * checks the capability the method needs and refuses with `capability`
72
- * when the manifest does not declare it; its other refusals arrive with
73
- * their own codes (`invalid`, `missing`, `stale`…). A method an older
74
- * player does not know is refused with `unsupported` or `invalid`: compare
75
- * `plugin.app.version` with the player that added it.
67
+ * Experimental: the wire protocol is not semver; this member changes with
68
+ * versions. `method` and `params` go to the player as given; the answer is
69
+ * the player's result, typed by the caller (`T`). The player checks the
70
+ * capability the method needs and refuses with `capability` when the manifest
71
+ * does not declare it; its other refusals arrive with their own codes
72
+ * (`invalid`, `missing`, `stale`…).
76
73
  *
77
74
  * Nothing of the SDK's sits between: no value limits, no `seq` or
78
75
  * revision, no retry after a lost reply, no wait during activation. A
@@ -220,16 +217,15 @@ export interface Wire {
220
217
  * correct for the properties it compares.
221
218
  *
222
219
  * What the SDK does for these writes: one write in flight per property, in
223
- * order (a whole value drops the writes still waiting before it, which
224
- * resolve `false`); with a player that takes row patches (behaviour from
225
- * player 0.6.0) a whole value without `seq` gets one, a list larger than
226
- * one request
227
- * (512 KB of rows) goes in parts, and row operations are numbered and split
228
- * the same way. What it leaves to the plugin: the value limits (the player
229
- * refuses a value over them with `limit`), Markdown documents and images in
230
- * wire form, and a `stale` refusal of row operations (the player shows
231
- * something else than they apply on: write the whole value). Property
232
- * names are written in camelCase or as in Slint, as for {@link View.set}.
220
+ * order (a whole value drops the writes still waiting before it, which resolve
221
+ * `false`); with a player that takes row patches a whole value without `seq`
222
+ * gets one, a list larger than one request (512 KB of rows) goes in parts, and
223
+ * row operations are numbered and split the same way. What it leaves to the
224
+ * plugin: the value limits (the player refuses a value over them with `limit`),
225
+ * Markdown documents and images in wire form, and a `stale` refusal of row
226
+ * operations (the player shows something else than they apply on: write the
227
+ * whole value). Property names are written in camelCase or as in Slint, as for
228
+ * {@link View.set}.
233
229
  *
234
230
  * While the view does not show (a window before `show()`, a panel or
235
231
  * settings page before `ready`, a closed one) a write is refused with
@@ -264,14 +260,13 @@ export interface WireView {
264
260
  * Write one property: a whole value, or a row patch of the plugin's own.
265
261
  *
266
262
  * @remarks
267
- * Experimental: the wire protocol is not semver; this member changes
268
- * with versions. `{ value }` replaces the property; a player that takes
269
- * row patches (behaviour from player 0.6.0) gets it with a `seq` (the
270
- * SDK numbers it unless given) and a list over one request's size in
271
- * parts with `more`.
272
- * `{ patch: { base, seq, ops } }` is sent as given: `base` is the `seq`
273
- * of the write it applies on. {@link WireView.writeRows} numbers patches
274
- * for you.
263
+ * Experimental: the wire protocol is not semver; this member changes with
264
+ * versions. `{ value }` replaces the property; a player that takes row
265
+ * patches gets it with a `seq` (the SDK numbers it unless given) and a list
266
+ * over one request's size in parts with `more`.
267
+ * `{ patch: { base, seq, ops } }` is sent as given: `base` is the `seq` of
268
+ * the write it applies on. {@link WireView.writeRows} numbers patches for
269
+ * you.
275
270
  *
276
271
  * @param property - The Slint property's name.
277
272
  * @param write - The write, as the player takes it.
@@ -309,17 +304,16 @@ export interface WireView {
309
304
  * Change a list property by row operations, numbered by the SDK.
310
305
  *
311
306
  * @remarks
312
- * Experimental: the wire protocol is not semver; this member changes
313
- * with versions. The operations apply, in order, on what the player shows
314
- * for the property after this view's last direct write of it since the
315
- * view showed its initial properties: `set` one row, `insert` rows,
316
- * `remove` or `move` a run of rows, by index. Without such a write (the
317
- * property was never written directly, or the window was shown again
318
- * since) the player has no rows of the plugin's for it: write the whole
319
- * value with {@link WireView.write} first. They go as one patch, or
320
- * several applying on each other when they exceed one request (1024
321
- * operations or 512 KB of rows). Needs a player that takes row patches
322
- * (player 0.6.0).
307
+ * Experimental: the wire protocol is not semver; this member changes with
308
+ * versions. The operations apply, in order, on what the player shows for the
309
+ * property after this view's last direct write of it since the view showed
310
+ * its initial properties: `set` one row, `insert` rows, `remove` or `move` a
311
+ * run of rows, by index. Without such a write (the property was never written
312
+ * directly, or the window was shown again since) the player has no rows of
313
+ * the plugin's for it: write the whole value with {@link WireView.write}
314
+ * first. They go as one patch, or several applying on each other when they
315
+ * exceed one request (1024 operations or 512 KB of rows). Needs a player that
316
+ * takes row patches.
323
317
  *
324
318
  * @param property - The Slint property's name.
325
319
  * @param ops - The operations, applied in order.
@@ -403,9 +397,8 @@ export interface WireCommands {
403
397
  * @remarks
404
398
  * Experimental: the wire protocol is not semver; this member changes
405
399
  * with versions. `declaration` is `commands.register`'s: `title`, `path`,
406
- * `order`, `group`, `radio`, `bindings`, `focus`, `repeat`, and the
407
- * fields newer players added (`button`, `category`, `home`: see
408
- * {@link CommandOptions} for the player each needs). The SDK adds the id,
400
+ * `order`, `group`, `radio`, `bindings`, `focus`, `repeat`, `button`,
401
+ * `category` and `home` (as in {@link CommandOptions}). The SDK adds the id,
409
402
  * the revision and the state and checks nothing in it: bindings must
410
403
  * already be in the player's canonical form (`Ctrl+H`).
411
404
  *
@@ -471,7 +464,7 @@ export interface WireCommandOptions {
471
464
  * busy, no reason.
472
465
  */
473
466
  readonly state?: WireCommandState;
474
- /** The player's conditions for `enabled` and `checked`, in wire form (player 0.5.21). */
467
+ /** The player's conditions for `enabled` and `checked`, in wire form. */
475
468
  readonly when?: Json;
476
469
  /** Runs when the user picks the command or presses its key. */
477
470
  readonly run?: () => unknown;