@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
@@ -244,7 +244,7 @@ export { LOCALES };
244
244
  * recorded.
245
245
  *
246
246
  * @capability None.
247
- * @see [Test a plugin](../../../docs/how-to/testing.md)
247
+ * @see [Test a plugin](../../../docs/guides/testing.md)
248
248
  * @since 1.0.0
249
249
  * @category Testing
250
250
  */
@@ -286,8 +286,8 @@ export class TestHost {
286
286
  /** Tool windows by id (see {@link TestHost.window}). */
287
287
  windows = new Map();
288
288
  /**
289
- * The plugin's mounted panels by slot, in mount order (SDK 1.6.15: one
290
- * panel per slot). See {@link TestHost.mounted}.
289
+ * The plugin's mounted panels by slot, in mount order (one panel per slot).
290
+ * See {@link TestHost.mounted}.
291
291
  */
292
292
  panels = new Map();
293
293
  /**
@@ -333,15 +333,15 @@ export class TestHost {
333
333
  */
334
334
  osd = [];
335
335
  /**
336
- * The action buttons of each `osd.show` message, in step with `osd`
337
- * (index for index): each button's title as shown and its command; `[]`
338
- * for a message without actions (SDK 1.6.9).
336
+ * The action buttons of each `osd.show` message, in step with `osd` (index
337
+ * for index): each button's title as shown and its command; `[]` for a
338
+ * message without actions.
339
339
  */
340
340
  osdActions = [];
341
341
  /**
342
- * Press button `index` of the newest OSD message, as the user does
343
- * (player 0.7.6): its command runs as if picked from a menu, and settles.
344
- * A disabled or busy command does nothing, as in the player.
342
+ * Press button `index` of the newest OSD message, as the user does: its
343
+ * command runs as if picked from a menu, and settles. A disabled or busy
344
+ * command does nothing, as in the player.
345
345
  *
346
346
  * @param index - 0 or 1.
347
347
  *
@@ -382,11 +382,10 @@ export class TestHost {
382
382
  * messages, dialog texts, settings page and panel titles show its
383
383
  * translations, the way the player shows them.
384
384
  *
385
- * The player's own texts (core actions' messages and menus, its
386
- * refusals) are English, or the player's Simplified Chinese for
387
- * `"zh-Hans"`. While `locale` was never set they stay in Chinese, as
388
- * players up to 0.4.2 showed them, so tests written for SDK 1.5.8 keep
389
- * passing; set `locale` to test what a user sees now.
385
+ * The player's own texts (core actions' messages and menus, its refusals) are
386
+ * English, or the player's Simplified Chinese for `"zh-Hans"`. While `locale`
387
+ * was never set they stay in Chinese; set `locale` to test what a user sees
388
+ * now.
390
389
  *
391
390
  * @example Check a menu path in Simplified Chinese
392
391
  * The test starts the plugin with a Chinese interface and checks the
@@ -668,8 +667,7 @@ export class TestHost {
668
667
  .sort((a, b) => a.time - b.time);
669
668
  },
670
669
  /**
671
- * Each plugin's ranges by plugin id; layers without ranges are absent
672
- * (SDK 1.6.9).
670
+ * Each plugin's ranges by plugin id; layers without ranges are absent.
673
671
  */
674
672
  rangeLayers: new Map(),
675
673
  /** Every layer's ranges merged, sorted by start, with the plugin's id. */
@@ -744,10 +742,10 @@ export class TestHost {
744
742
  }
745
743
  /**
746
744
  * Runtime images written to views (`plugin.ui.image`,
747
- * `plugin.ui.remoteImage`), whole values and (SDK 1.5.19) images nested
748
- * in rows, newest last. The SDK refuses images of released scopes before
749
- * anything is sent. The test host does not read the files, so it does not
750
- * check the player's per-view budget (`IMAGE_LIMITS.viewBytes`).
745
+ * `plugin.ui.remoteImage`), whole values and images nested in rows, newest
746
+ * last. The SDK refuses images of released scopes before anything is sent.
747
+ * The test host does not read the files, so it does not check the player's
748
+ * per-view budget (`IMAGE_LIMITS.viewBytes`).
751
749
  */
752
750
  images = [];
753
751
  /**
@@ -1080,14 +1078,13 @@ export class TestHost {
1080
1078
  this.videoRender.values = { ...RENDER_DEFAULTS, shaders: [] };
1081
1079
  }
1082
1080
  /**
1083
- * What the player pushes when mpv cannot compile a shader (code `failed`)
1084
- * or switches to software rendering (`unsupported`, which also sets
1085
- * `videoRender.gpu` to false and `rendering.reason` to `window-fallback`
1086
- * with `message`). Pushed only when this plugin is the owner.
1087
- * `previous-crash` (SDK 1.5.54) is a shortcut that only sets the handle's
1088
- * status and reaches `onError`: the real player never pushes it, it
1089
- * refuses the `set` request itself. To test that, set
1090
- * {@link TestHost.previousCrash}.
1081
+ * What the player pushes when mpv cannot compile a shader (code `failed`) or
1082
+ * switches to software rendering (`unsupported`, which also sets
1083
+ * `videoRender.gpu` to false and `rendering.reason` to `window-fallback` with
1084
+ * `message`). Pushed only when this plugin is the owner. `previous-crash` is
1085
+ * a shortcut that only sets the handle's status and reaches `onError`: the
1086
+ * real player never pushes it, it refuses the `set` request itself. To test
1087
+ * that, set {@link TestHost.previousCrash}.
1091
1088
  *
1092
1089
  * @example Make a shader fail to compile
1093
1090
  * The plugin's render options report `failed`, as when mpv rejects a
@@ -1113,11 +1110,11 @@ export class TestHost {
1113
1110
  return failVideoRender(this, this.#inner, code, message);
1114
1111
  }
1115
1112
  /**
1116
- * The shader channel (`plugin.video.shaders(id)`, SDK 1.5.39): the lists
1117
- * the player holds for this plugin's handles by id (the real paths, after
1118
- * following links), and how many shaders other plugins hold, which count
1119
- * against {@link VIDEO_PROCESSING_LIMITS}`.shaders` (`limit`). Files must
1120
- * be under {@link TestHost.fileRoots}; under software rendering
1113
+ * The shader channel (`plugin.video.shaders(id)`): the lists the player holds
1114
+ * for this plugin's handles by id (the real paths, after following links),
1115
+ * and how many shaders other plugins hold, which count against
1116
+ * {@link VIDEO_PROCESSING_LIMITS}`.shaders` (`limit`). Files must be under
1117
+ * {@link TestHost.fileRoots}; under software rendering
1121
1118
  * (`videoRender.gpu = false`) a non-empty list fails with `unsupported`.
1122
1119
  *
1123
1120
  * @since 1.5.39
@@ -1139,11 +1136,10 @@ export class TestHost {
1139
1136
  * rendering (`unsupported`; use {@link TestHost.failVideoRender}, which
1140
1137
  * also tells the handles). Pushed only to a handle that holds shaders.
1141
1138
  *
1142
- * `code` (SDK 1.5.54, default `failed`) is the error code pushed.
1143
- * `previous-crash` is a shortcut that only sets the handle's status and
1144
- * reaches `onError`: the real player (0.6.3) never pushes it, it refuses
1145
- * the `set` request itself after an abnormal end. To test that, set
1146
- * {@link TestHost.previousCrash}.
1139
+ * `code` (default `failed`) is the error code pushed. `previous-crash` is a
1140
+ * shortcut that only sets the handle's status and reaches `onError`: the real
1141
+ * player never pushes it, it refuses the `set` request itself after
1142
+ * an abnormal end. To test that, set {@link TestHost.previousCrash}.
1147
1143
  *
1148
1144
  * @capability None.
1149
1145
  *
@@ -1174,11 +1170,10 @@ export class TestHost {
1174
1170
  return failVideoShaders(this, this.#inner, id, message, code);
1175
1171
  }
1176
1172
  /**
1177
- * Play a run after an abnormal end with plugin shaders on (player 0.6.3):
1178
- * while set, a non-empty `video.shaders` list and a render options
1179
- * `set` with a non-empty `shaders` list are refused with
1180
- * `previous-crash` and this message; clearing still works. `null`
1181
- * (default): shaders apply.
1173
+ * Play a run after an abnormal end with plugin shaders on: while set, a
1174
+ * non-empty `video.shaders` list and a render options `set` with a non-empty
1175
+ * `shaders` list are refused with `previous-crash` and this message; clearing
1176
+ * still works. `null` (default): shaders apply.
1182
1177
  *
1183
1178
  * @example Check that the plugin stops retrying while shaders are off
1184
1179
  * The plugin's shader handle turns `failed` with `previous-crash`, as
@@ -1487,10 +1482,10 @@ export class TestHost {
1487
1482
  },
1488
1483
  };
1489
1484
  /**
1490
- * The player's rendering choice behind `plugin.rendering` (player
1491
- * 0.5.13). The mode drawing now is {@link TestHost.videoRender |
1492
- * videoRender.gpu}, as for `plugin.app.system()`; the rest is preset here
1493
- * and changed by the plugin's calls, as the player would:
1485
+ * The player's rendering choice behind `plugin.rendering`. The mode drawing
1486
+ * now is {@link TestHost.videoRender | videoRender.gpu}, as for
1487
+ * `plugin.app.system()`; the rest is preset here and changed by the plugin's
1488
+ * calls, as the player would:
1494
1489
  *
1495
1490
  * - `setPreference` saves `preference` and never changes the mode. It
1496
1491
  * refuses `"gpu"` while `gpu.available` is false: with `unsupported`
@@ -1545,8 +1540,8 @@ export class TestHost {
1545
1540
  restarts: 0,
1546
1541
  };
1547
1542
  /**
1548
- * The GPU's video upscaler behind `plugin.video.upscaling` (player
1549
- * 0.5.16), answered as the player would:
1543
+ * The GPU's video upscaler behind `plugin.video.upscaling`, answered as the
1544
+ * player would:
1550
1545
  *
1551
1546
  * - `state()` and `set(true)` set `checked` (the player's one GPU check; a
1552
1547
  * plugin that should not wake the GPU while it starts can assert it is
@@ -1609,10 +1604,10 @@ export class TestHost {
1609
1604
  };
1610
1605
  /**
1611
1606
  * Make the upscaler's reason `decoding` with `cause`, with the player's
1612
- * message (player 0.5.25), and set `upscaling.hwdecCurrent` to match
1613
- * (`d3d11va-copy`, `no`, `nvdec`). `plugins` are named for `copy-back`
1614
- * only, as the player does. Returns the reason; call
1615
- * {@link TestHost.upscalingChanged} to tell a listening plugin.
1607
+ * message, and set `upscaling.hwdecCurrent` to match (`d3d11va-copy`, `no`,
1608
+ * `nvdec`). `plugins` are named for `copy-back` only, as the player does.
1609
+ * Returns the reason; call {@link TestHost.upscalingChanged} to tell a
1610
+ * listening plugin.
1616
1611
  *
1617
1612
  * @example Test the window's advice for each cause
1618
1613
  * The plugin's window explains why upscaling waits. The test fakes the
@@ -1636,10 +1631,9 @@ export class TestHost {
1636
1631
  }
1637
1632
  /**
1638
1633
  * Send `video.upscaling.changed` with the state {@link TestHost.upscaling}
1639
- * describes now (without `enabled`), as the player does when it changes
1640
- * (player 0.5.25); a plugin listening with
1641
- * `plugin.video.upscaling.onChange` receives it. Nothing reaches a plugin
1642
- * that does not listen.
1634
+ * describes now (without `enabled`), as the player does when it changes; a
1635
+ * plugin listening with `plugin.video.upscaling.onChange` receives it.
1636
+ * Nothing reaches a plugin that does not listen.
1643
1637
  *
1644
1638
  * @capability None.
1645
1639
  *
@@ -1733,7 +1727,7 @@ export class TestHost {
1733
1727
  // ------------------------------------------------------------ core actions
1734
1728
  /** The `player.setStepSeek` value in effect (default 5). */
1735
1729
  stepSeek = 5;
1736
- /** The `player.setStepSeek` `keyframes` in effect (default `false`, SDK 1.5.19). */
1730
+ /** The `player.setStepSeek` `keyframes` in effect (default `false`). */
1737
1731
  stepSeekKeyframes = false;
1738
1732
  /**
1739
1733
  * Test data: the keyframe times (seconds, ascending) of the current
@@ -1976,10 +1970,10 @@ export class TestHost {
1976
1970
  /**
1977
1971
  * Simulate the user changing the main window (resizing, maximizing or
1978
1972
  * restoring it, entering or leaving fullscreen, closing the
1979
- * picture-in-picture window) and broadcast it. `maximized` (SDK 1.5.52)
1980
- * reads `false` while fullscreen, as player 0.6.3 reports it. Like the player, entering fullscreen collapses an attached, visible
1981
- * sidebar (`effective: false`, `reason: "fullscreen"`) and leaving
1982
- * fullscreen docks it again.
1973
+ * picture-in-picture window) and broadcast it. `maximized` reads `false`
1974
+ * while fullscreen. Like the player, entering fullscreen collapses an
1975
+ * attached, visible sidebar (`effective: false`, `reason: "fullscreen"`) and
1976
+ * leaving fullscreen docks it again.
1983
1977
  *
1984
1978
  * @example Go fullscreen, report picture-in-picture support, maximize
1985
1979
  * The plugin sees the main window fullscreen at 1920×1080, then learns
@@ -2010,9 +2004,9 @@ export class TestHost {
2010
2004
  }
2011
2005
  /**
2012
2006
  * The pointer reached the right edge in fullscreen (`true`) or left the
2013
- * popped-out columns (`false`): the attached sidebar and the adjust column
2014
- * (SDK 1.6.13), those switched on, pop out or collapse (reference §6.3). No
2015
- * effect outside fullscreen, or on a column switched off or floating.
2007
+ * popped-out columns (`false`): the attached sidebar and the adjust column,
2008
+ * those switched on, pop out or collapse (reference §6.3). No effect outside
2009
+ * fullscreen, or on a column switched off or floating.
2016
2010
  *
2017
2011
  * @capability None.
2018
2012
  *
@@ -2108,18 +2102,18 @@ export class TestHost {
2108
2102
  /**
2109
2103
  * Press a binding like the host's table would: panel-focus bindings first
2110
2104
  * when `panel` is true, then global ones; within a scope the earliest
2111
- * registration first (the player's own commands before the plugin's), as
2112
- * the conflict rule orders them. A disabled command lets the key pass to
2113
- * the next command bound to it (SDK 1.5.12, as player 0.4.3): the one it
2114
- * shadowed, then the global scope. The first enabled one runs; `press`
2115
- * resolves after it ran (`"ran"`). When only disabled commands hold the
2116
- * key, the first of them decides, as in the player: with a `reason` it
2117
- * shows the reason on the OSD and eats the key (`"reason"`, see
2118
- * `host.osd`); without one the key goes on to the focused control
2119
- * (`"passed"`, nothing runs). Unlike the player, which only logs a key
2120
- * that reaches a busy command, `press` then rejects, so a test notices. Rejects when nothing is bound. Bindings use the
2121
- * reference syntax (`"Space"`, `"Ctrl+O"`, `"Mouse:WheelUp"`), and user
2122
- * overrides in `bindings.overlay` apply.
2105
+ * registration first (the player's own commands before the plugin's), as the
2106
+ * conflict rule orders them. A disabled command lets the key pass to the next
2107
+ * command bound to it: the one it shadowed, then the global
2108
+ * scope. The first enabled one runs; `press` resolves after it ran (`"ran"`).
2109
+ * When only disabled commands hold the key, the first of them decides, as in
2110
+ * the player: with a `reason` it shows the reason on the OSD and eats the key
2111
+ * (`"reason"`, see `host.osd`); without one the key goes on to the focused
2112
+ * control (`"passed"`, nothing runs). Unlike the player, which only logs a
2113
+ * key that reaches a busy command, `press` then rejects, so a test notices.
2114
+ * Rejects when nothing is bound. Bindings use the reference syntax
2115
+ * (`"Space"`, `"Ctrl+O"`, `"Mouse:WheelUp"`), and user overrides in
2116
+ * `bindings.overlay` apply.
2123
2117
  *
2124
2118
  * @returns What the key did: `"ran"`, `"reason"` or `"passed"`.
2125
2119
  *
@@ -2166,14 +2160,13 @@ export class TestHost {
2166
2160
  .map(([key, ids]) => [key.split(" ")[1], ...ids]);
2167
2161
  }
2168
2162
  /**
2169
- * Change the keys of one of the plugin's commands, or of one of the
2170
- * player's core commands by its `host/<id>` (SDK 1.6.16), as the user
2171
- * does in Keyboard Shortcuts (SDK 1.6.6): `inputs` replaces its keys (`[]`
2172
- * clears them, as Ignore Default Shortcuts does for every default),
2173
- * `null` gives it its own defaults back. It writes
2174
- * {@link TestHost.bindings | bindings.overlay}, and the plugin hears it
2175
- * as from the player: `bindings.changed` and, when what
2176
- * `plugin.commands.keys` reads changed, `commands.keys`.
2163
+ * Change the keys of one of the plugin's commands, or of one of the player's
2164
+ * core commands by its `host/<id>`, as the user does in Keyboard Shortcuts:
2165
+ * `inputs` replaces its keys (`[]` clears them, as Ignore Default Shortcuts
2166
+ * does for every default), `null` gives it its own defaults back. It writes
2167
+ * {@link TestHost.bindings | bindings.overlay}, and the plugin hears it as
2168
+ * from the player: `bindings.changed` and, when what `plugin.commands.keys`
2169
+ * reads changed, `commands.keys`.
2177
2170
  *
2178
2171
  * @example Check that a key hint follows a rebinding
2179
2172
  * The view showed W for Brightness −; after the user moves it to
@@ -2222,17 +2215,15 @@ export class TestHost {
2222
2215
  /** Every `packages.setEnabled` / `uninstall` / `install`, newest last. */
2223
2216
  packageCalls = [];
2224
2217
  /**
2225
- * Packages `validate` and `validateArchive` accept: path (directory or
2226
- * `.vxp` file) → its manifest. Other paths fail with `missing`. `install`
2227
- * adds or upgrades the entry in {@link TestHost.packages} following the
2228
- * player's source rules: the same source upgrades, another source needs
2229
- * `replace` (`conflict` otherwise), a built-in id is `unsupported`. As
2230
- * player 0.6.4 and later, the installed entry's `state` follows
2231
- * {@link "@vestra-player/sdk"!InstallOptions.enabled}: a first install
2232
- * runs, an update of a `disabled` entry stays `disabled` unless `enabled`
2233
- * is `true`, and `enabled: false` installs it `disabled`. Set
2234
- * {@link TestHost.installKeepsDisabled} to `false` for the older players'
2235
- * rule (every install runs).
2218
+ * Packages `validate` and `validateArchive` accept: path (directory or `.vxp`
2219
+ * file) → its manifest. Other paths fail with `missing`. `install` adds or
2220
+ * upgrades the entry in {@link TestHost.packages} following the player's
2221
+ * source rules: the same source upgrades, another source needs `replace`
2222
+ * (`conflict` otherwise), a built-in id is `unsupported`. The installed
2223
+ * entry's `state` follows
2224
+ * {@link "@vestra-player/sdk"!InstallOptions.enabled}: a first install runs,
2225
+ * an update of a `disabled` entry stays `disabled` unless `enabled` is
2226
+ * `true`, and `enabled: false` installs it `disabled`.
2236
2227
  *
2237
2228
  * @example Offer a package file the plugin can install
2238
2229
  * The plugin can validate and install `/downloads/someone.demo-1.0.0.vxp`
@@ -2250,25 +2241,20 @@ export class TestHost {
2250
2241
  */
2251
2242
  candidates = new Map();
2252
2243
  /**
2253
- * Which player's install rule `packages.install` plays. `true` (default,
2254
- * SDK 1.5.55): player 0.6.4 and later, where an update or reinstall
2255
- * keeps a `disabled` plugin disabled unless the plugin passes
2256
- * {@link "@vestra-player/sdk"!InstallOptions.enabled}. `false`: players
2257
- * up to 0.6.3, where every install runs the plugin and `enabled` is
2258
- * ignored (it is still checked and recorded in
2259
- * {@link TestHost.packageCalls}). A test written for the older rule that
2260
- * updates a disabled plugin sets it to `false`; one that keeps testing
2261
- * both runs once with each.
2262
- *
2263
- * @example Keep a test written for players up to 0.6.3
2244
+ * Which install rule `packages.install` plays. `true` (default): an update
2245
+ * or reinstall keeps a `disabled` plugin disabled unless the plugin passes
2246
+ * {@link "@vestra-player/sdk"!InstallOptions.enabled}. `false`: every
2247
+ * install runs the plugin and `enabled` is ignored (it is still checked and
2248
+ * recorded in {@link TestHost.packageCalls}).
2249
+ *
2250
+ * @example Every install runs
2264
2251
  * The plugin under test installs an update over a plugin the user
2265
- * disabled and expects it to run afterwards, as players up to 0.6.3 do.
2266
- * With `false` the host plays that rule; the default plays player 0.6.4,
2267
- * where the update stays disabled.
2252
+ * disabled and expects it to run afterwards. With `false` the host plays
2253
+ * that rule; the default keeps the update disabled.
2268
2254
  * ```ts
2269
2255
  * declare const host: TestHost;
2270
2256
  * // ---cut---
2271
- * host.installKeepsDisabled = false; // every install runs, as before 0.6.4
2257
+ * host.installKeepsDisabled = false; // every install runs
2272
2258
  * ```
2273
2259
  *
2274
2260
  * @capability None.
@@ -2450,10 +2436,10 @@ export class TestHost {
2450
2436
  }
2451
2437
  /**
2452
2438
  * The plugin's mounted panel (bottom bar, sidebar, adjust column or
2453
- * backdrop): the one in `slot`, or without it the only one (SDK 1.6.15: a
2454
- * plugin mounts one panel per slot; with several, name the slot). Throws
2455
- * when there is none. Its `props` use Slint (kebab-case) names; `emit`
2456
- * fires a callback on the panel's global.
2439
+ * backdrop): the one in `slot`, or without it the only one (a plugin mounts
2440
+ * one panel per slot; with several, name the slot). Throws when there is
2441
+ * none. Its `props` use Slint (kebab-case) names; `emit` fires a callback on
2442
+ * the panel's global.
2457
2443
  *
2458
2444
  * @example Select a row in the plugin's sidebar panel
2459
2445
  * The test checks the panel sits in the sidebar and selects its third
@@ -2508,12 +2494,12 @@ export class TestHost {
2508
2494
  * for: on a loaded machine it can finish after `settle()` returns. Poll
2509
2495
  * the result you assert on instead (second example).
2510
2496
  *
2511
- * `settle()` does not wait for the SDK's once-a-second full update pass
2512
- * (SDK 1.5.45). After `setSource` (or another player state change) only
2513
- * the bindings that read a changed field of `plugin.player.state` run
2514
- * again; state the plugin changed outside a handler without
2515
- * `plugin.update()` shows only in the next full pass. Have the plugin
2516
- * call `plugin.update()` after such a change, or wait `settle(1000)`.
2497
+ * `settle()` does not wait for the SDK's once-a-second full update pass.
2498
+ * After `setSource` (or another player state change) only the bindings that
2499
+ * read a changed field of `plugin.player.state` run again; state the plugin
2500
+ * changed outside a handler without `plugin.update()` shows only in the next
2501
+ * full pass. Have the plugin call `plugin.update()` after such a change, or
2502
+ * wait `settle(1000)`.
2517
2503
  *
2518
2504
  * @param ms - Extra time to wait, for debounces and timers (default 0).
2519
2505
  *
@@ -2581,19 +2567,17 @@ export class TestHost {
2581
2567
  }
2582
2568
  // ------------------------------------------------------------ simulated host
2583
2569
  /**
2584
- * Why the player would keep this plugin running while nothing uses it
2585
- * (lazy activation, player 0.5.21), one line per reason: an event it
2586
- * listens to that is not one the player wakes it for (with what listens
2587
- * and where it was added), its panel in the bottom bar or the backdrop,
2588
- * its open windows (these as the player's log says them), and, from
2589
- * player 0.7.3, its sidebar tab while that is the current tab. The
2590
- * player counts the current tab as busy work, not as something live: it
2591
- * keeps the plugin running only while the tab is shown, and a sidebar
2592
- * panel in a background tab is no reason at all (the plugin may go to
2593
- * standby; showing the tab starts it again). Empty: the player may stop
2594
- * it while idle and start it again on its next use. Filter chains,
2595
- * streams, jobs and the like (which also keep a plugin running) are not
2596
- * listed.
2570
+ * Why the player would keep this plugin running while nothing uses it (lazy
2571
+ * activation), one line per reason: an event it listens to that is not one
2572
+ * the player wakes it for (with what listens and where it was added), its
2573
+ * panel in the bottom bar or the backdrop, its open windows (these as the
2574
+ * player's log says them), and its sidebar tab while that is the current tab.
2575
+ * The player counts the current tab as busy work, not as something live: it
2576
+ * keeps the plugin running only while the tab is shown, and a sidebar panel
2577
+ * in a background tab is no reason at all (the plugin may go to standby;
2578
+ * showing the tab starts it again). Empty: the player may stop it while idle
2579
+ * and start it again on its next use. Filter chains, streams, jobs and the
2580
+ * like (which also keep a plugin running) are not listed.
2597
2581
  *
2598
2582
  * @capability None.
2599
2583
  * @since 1.5.40
@@ -2641,21 +2625,19 @@ export class TestHost {
2641
2625
  * Rejects when `manifest.json` cannot be read or parsed, when `activate`
2642
2626
  * throws, or when a registration made during activation fails (for example
2643
2627
  * `limit`, `conflict`, `invalid`). Stricter than the player's runner for
2644
- * commands (SDK 1.5.49): there the SDK logs a command declaration the
2645
- * player refuses during activation, skips it and activates the rest of the
2646
- * plugin (`onError` hears it); `startPlugin` fails, so a test shows the
2647
- * bad declaration.
2628
+ * commands: there the SDK logs a command declaration the player refuses during
2629
+ * activation, skips it and activates the rest of the plugin (`onError` hears
2630
+ * it); `startPlugin` fails, so a test shows the bad declaration.
2648
2631
  *
2649
2632
  * @param activate - The plugin's default-exported `activate` function.
2650
2633
  * @param options - Where the plugin lives and how to start it.
2651
2634
  * @returns `host`: the {@link TestHost}; `plugin`: the object passed to
2652
- * `activate` (call the plugin API on it directly); `stop()`: dispose the
2653
- * plugin like the player stopping it (scopes released, stores flushed),
2654
- * wait until the host is idle and remove the host's temporary files;
2655
- * `stop({ reason })` (SDK 1.5.54): `reason` is the `StopReason` the player
2656
- * sends; `disconnect()` (SDK 1.5.54) stops it as when the player is lost
2657
- * (`host-lost`, requests refused with `disabled`). Removing the
2658
- * temporary files never fails a test.
2635
+ * `activate` (call the plugin API on it directly); `stop()`: dispose the plugin
2636
+ * like the player stopping it (scopes released, stores flushed), wait until the
2637
+ * host is idle and remove the host's temporary files; `stop({ reason })`:
2638
+ * `reason` is the `StopReason` the player sends; `disconnect()` stops it as
2639
+ * when the player is lost (`host-lost`, requests refused with `disabled`).
2640
+ * Removing the temporary files never fails a test.
2659
2641
  *
2660
2642
  * @example Test that a setting survives a restart
2661
2643
  * The test turns on the 10-step option, stops the plugin, starts it again
@@ -2703,7 +2685,7 @@ export class TestHost {
2703
2685
  * to call directly, and `stop` to end it like the player.
2704
2686
  *
2705
2687
  * @capability None.
2706
- * @see [Test a plugin](../../../docs/how-to/testing.md)
2688
+ * @see [Test a plugin](../../../docs/guides/testing.md)
2707
2689
  * @since 1.0.0
2708
2690
  * @category Testing
2709
2691
  */
@@ -2773,18 +2755,18 @@ export async function startPlugin(activate, options = {}) {
2773
2755
  plugin: instance.plugin,
2774
2756
  /**
2775
2757
  * Stop the plugin, wait for the host, and remove temporary files.
2776
- * `stop({ reason })` (SDK 1.5.54): `reason` is the reason the player
2777
- * gives (`plugin.stopReason`, the `onDispose` cleanups'
2778
- * `info.reason`); `stop()`: none (`undefined`), as with players up to
2779
- * 0.6.3. It still takes no declared parameter, so it can be passed as
2780
- * a callback (`t.after(stop)`, `promise.then(stop)`).
2758
+ * `stop({ reason })`: `reason` is the reason the player gives
2759
+ * (`plugin.stopReason`, the `onDispose` cleanups' `info.reason`); `stop()`:
2760
+ * none (`undefined`). It still
2761
+ * takes no declared parameter, so it can be passed as a callback
2762
+ * (`t.after(stop)`, `promise.then(stop)`).
2781
2763
  */
2782
2764
  stop,
2783
2765
  /**
2784
- * Lose the player (SDK 1.5.54): as when it crashes or is killed, the
2785
- * runner stops the plugin with reason `host-lost`; requests still
2786
- * waiting for their answer and every later request are refused with
2787
- * `disabled`. Then waits and removes the temporary files like `stop`.
2766
+ * Lose the player: as when it crashes or is killed, the runner stops the
2767
+ * plugin with reason `host-lost`; requests still waiting for their answer
2768
+ * and every later request are refused with `disabled`. Then waits and
2769
+ * removes the temporary files like `stop`.
2788
2770
  */
2789
2771
  async disconnect() {
2790
2772
  host.loseConnection();
@@ -11,8 +11,8 @@ export declare class Internals {
11
11
  /** The plugin's translations for `locale` (see `loadCatalog`). */
12
12
  catalog: Catalog;
13
13
  /**
14
- * Row patches (player 0.6.0): the `seq` of each property's last write, by
15
- * view and property (none: 0, the initial properties).
14
+ * Row patches: the `seq` of each property's last write, by view and property
15
+ * (none: 0, the initial properties).
16
16
  */
17
17
  readonly writes: Map<string, number>;
18
18
  /** The parts of a whole value held until its last part, by view and property. */
@@ -14,8 +14,8 @@ export class Internals {
14
14
  /** The plugin's translations for `locale` (see `loadCatalog`). */
15
15
  catalog = new Catalog();
16
16
  /**
17
- * Row patches (player 0.6.0): the `seq` of each property's last write, by
18
- * view and property (none: 0, the initial properties).
17
+ * Row patches: the `seq` of each property's last write, by view and property
18
+ * (none: 0, the initial properties).
19
19
  */
20
20
  writes = new Map();
21
21
  /** The parts of a whole value held until its last part, by view and property. */
@@ -33,7 +33,7 @@ import type { Timeline, TimelineMark, TimelineRange } from "./types.ts";
33
33
  export declare const TIMELINE_LIMITS: Readonly<{
34
34
  /** Marks in one layer (`TimelineLayer.set`) (1000). */
35
35
  readonly marks: 1000;
36
- /** Ranges in one layer (`TimelineLayer.setRanges`; player 0.7.6) (100). */
36
+ /** Ranges in one layer (`TimelineLayer.setRanges`) (100). */
37
37
  readonly ranges: 100;
38
38
  /** Characters of a mark's or a range's title, as shown (100). */
39
39
  readonly titleChars: 100;
@@ -32,7 +32,7 @@ import { failure, quiet } from "./errors.js";
32
32
  export const TIMELINE_LIMITS = Object.freeze({
33
33
  /** Marks in one layer (`TimelineLayer.set`) (1000). */
34
34
  marks: 1000,
35
- /** Ranges in one layer (`TimelineLayer.setRanges`; player 0.7.6) (100). */
35
+ /** Ranges in one layer (`TimelineLayer.setRanges`) (100). */
36
36
  ranges: 100,
37
37
  /** Characters of a mark's or a range's title, as shown (100). */
38
38
  titleChars: 100,
@@ -219,7 +219,7 @@ class Layer {
219
219
  this.#latestRanges.stop();
220
220
  timelineOf(this.#scope.runtime).layer = false;
221
221
  await this.#scope.runtime.host.timeline.set([]).catch(() => { });
222
- // Only a layer that sent ranges: an older player refuses the method.
222
+ // Only a layer that sent ranges.
223
223
  if (this.#ranged)
224
224
  await this.#scope.runtime.host.timeline.setRanges([]).catch(() => { });
225
225
  }