@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
@@ -11,11 +11,11 @@ import type { Text, TextList } from "./ui-locale.ts";
11
11
  *
12
12
  * @remarks
13
13
  * Opaque: pass it where the Slint type is `image`, with {@link View.set} or
14
- * {@link View.bind}: the whole value of an `image` property or, from SDK
15
- * 1.5.19 (player 0.5.1), an `image` field at any depth, such as the logo of
16
- * each row of a list. Making the reference does not read the file: the
17
- * player checks and decodes it each time it receives the value (a property
18
- * write, a window opening; {@link Ui.image} has the rules and limits).
14
+ * {@link View.bind}: the whole value of an `image` property or, an `image`
15
+ * field at any depth, such as the logo of each row of a list. Making the
16
+ * reference does not read the file: the player checks and decodes it each time
17
+ * it receives the value (a property write, a window opening; {@link Ui.image}
18
+ * has the rules and limits).
19
19
  *
20
20
  * A reference belongs to the {@link Scope} that created it. Once that scope
21
21
  * is disposed, writing the reference fails with `invalid` (reported to
@@ -37,10 +37,10 @@ import type { Text, TextList } from "./ui-locale.ts";
37
37
  * ```
38
38
  *
39
39
  * @example Show a logo in each row of a list
40
- * Each row of the list draws its own small logo next to its name. An
41
- * `ImageRef` may sit in any field of a property value (SDK 1.5.19, player
42
- * 0.5.1), so the rows carry their icons; `maxSide: 64` decodes each logo
43
- * at most 64 px wide, which keeps the view's image memory small.
40
+ * Each row of the list draws its own small logo next to its name. An `ImageRef`
41
+ * may sit in any field of a property value, so the rows carry their icons;
42
+ * `maxSide: 64` decodes each logo at most 64 px wide, which keeps the view's
43
+ * image memory small.
44
44
  * ```slint
45
45
  * export struct Row { key: string, name: string, icon: image }
46
46
  * ```
@@ -57,7 +57,7 @@ import type { Text, TextList } from "./ui-locale.ts";
57
57
  * }));
58
58
  * ```
59
59
  *
60
- * @see {@link Ui.image}, [Windows, panels, settings pages, dialogs and the OSD](../../../docs/explanation/ui.md)
60
+ * @see {@link Ui.image}, [Example: Markdown](../../../docs/examples/markdown.md)
61
61
  * @since 1.0.0
62
62
  * @category UI
63
63
  */
@@ -81,7 +81,7 @@ export interface ImageOptions {
81
81
  * sharp on high-density screens. It keeps the decoded memory small: a
82
82
  * 1024×1024 icon is 4 MB decoded, 16 KB at `maxSide: 64`.
83
83
  *
84
- * @player 0.5.1; older players refuse the reference (`invalid`).
84
+ * @player 0.5.1
85
85
  */
86
86
  maxSide?: number;
87
87
  }
@@ -92,15 +92,14 @@ export interface ImageOptions {
92
92
  * @remarks
93
93
  * Opaque, like {@link ImageRef}: pass it where the Slint type is
94
94
  * `[MarkdownBlock]`: the whole value of such a property (the `blocks` of
95
- * `MarkdownView` from `@vestra/markdown.slint`) or, from SDK 1.5.4, a
96
- * `[MarkdownBlock]` field at any depth of a property value, such as the
97
- * `body` of each row of a chat's message list. It carries the text, the
98
- * base address and the local copies of its remote images; the player parses
99
- * and draws it. Writing a document whose text did not change (a new
100
- * reference for the same text included) costs the player no parsing, and a
101
- * changed document updates only the blocks that changed. It belongs to the
102
- * scope that created it: once that scope is disposed, writing it fails with
103
- * `invalid`, wherever it is in the value.
95
+ * `MarkdownView` from `@vestra/markdown.slint`) or, a `[MarkdownBlock]` field
96
+ * at any depth of a property value, such as the `body` of each row of a chat's
97
+ * message list. It carries the text, the base address and the local copies of
98
+ * its remote images; the player parses and draws it. Writing a document whose
99
+ * text did not change (a new reference for the same text included) costs the
100
+ * player no parsing, and a changed document updates only the blocks that
101
+ * changed. It belongs to the scope that created it: once that scope is
102
+ * disposed, writing it fails with `invalid`, wherever it is in the value.
104
103
  *
105
104
  * @example Show chat messages, one document per row
106
105
  * The chat window shows a formatted assistant message. `ui.markdown`
@@ -113,7 +112,7 @@ export interface ImageOptions {
113
112
  * chat.set({ messages: [{ id: "m1", role: "assistant", body }] });
114
113
  * ```
115
114
  *
116
- * @player 0.2.0; nested in a value: the player after 0.4.0
115
+ * @player 0.2.0
117
116
  * @see {@link Ui.markdown}, {@link MarkdownOptions}, {@link PropValue}
118
117
  * @since 1.1.0
119
118
  * @category UI
@@ -159,38 +158,32 @@ export interface MarkdownOptions {
159
158
  * is refused (Slint treats `_` and `-` as the same, so use camelCase or
160
159
  * kebab-case).
161
160
  *
162
- * A {@link Text} or {@link TextList} goes where the Slint type is `string`,
163
- * at any depth (SDK 1.5.11, player 0.4.3): the player shows it translated
164
- * with the plugin's catalog, so a `[string]` model (a ComboBox) can mix
165
- * words and data. The limits below count it as the string it becomes.
161
+ * A {@link Text} or {@link TextList} goes where the Slint type is `string`, at
162
+ * any depth: the player shows it translated with the plugin's catalog, so a
163
+ * `[string]` model (a ComboBox) can mix words and data. The limits below count
164
+ * it as the string it becomes.
166
165
  *
167
166
  * A {@link MarkdownRef} goes where the Slint type is `[MarkdownBlock]`: the
168
- * whole value, or a field at any depth (SDK 1.5.4; older players refuse a
169
- * nested one). An {@link ImageRef} goes where the Slint type is `image`: the
170
- * whole value, or a field at any depth (SDK 1.5.19, player 0.5.1; older
171
- * players refuse a nested one with `invalid`). The images nested in the
172
- * values of one view (a window, panel or settings page) may show at most
173
- * 32 MB of decoded pixels together (`IMAGE_LIMITS.viewBytes` in
174
- * `@vestra-player/sdk/runtime`): a write
175
- * that would pass it is refused with `limit`; use
176
- * {@link ImageOptions.maxSide} for small pictures such as logos and
177
- * thumbnails.
178
- *
179
- * Limits per value (`UI_VALUE_LIMITS` in `@vestra-player/sdk/testing`,
180
- * player 0.6.0; players 0.4.3 to 0.5: 16384 values, 4096 rows, 1 MiB of
181
- * text): nesting depth 8, 1,048,576 values in total (every array, object,
182
- * string, number, boolean and null counts, the value itself included; a
183
- * document or an image is one), 100,000 rows per array, 64 KiB per string
184
- * or field name and 32 MiB of text in total, field names and the text of
185
- * its Markdown documents included (256 KB per document). A list of rows
186
- * with 13 fields is 14 values per row, so 50,000 such rows fit. An array
187
- * property larger than one 1 MiB request is sent in parts (SDK 1.5.46, a
188
- * player that takes row patches); only the top-level array is split, so
189
- * any other value, and each row, must fit in one request (a row of more
190
- * than 512 KiB is refused with `limit`). A value over a limit is refused
191
- * with code
192
- * `limit` and the property keeps what it showed (see {@link View.set});
193
- * `TestHost` refuses it the same way.
167
+ * whole value, or a field at any depth. An {@link ImageRef} goes where the
168
+ * Slint type is `image`: the whole value, or a field at any depth. The images
169
+ * nested in the values of one view (a window, panel or settings page) may show
170
+ * at most 32 MB of decoded pixels together (`IMAGE_LIMITS.viewBytes` in
171
+ * `@vestra-player/sdk/runtime`): a write that would pass it is refused with
172
+ * `limit`; use {@link ImageOptions.maxSide} for small pictures such as logos
173
+ * and thumbnails.
174
+ *
175
+ * Limits per value (`UI_VALUE_LIMITS` in `@vestra-player/sdk/testing`): nesting
176
+ * depth 8, 1,048,576 values in total (every array, object, string, number,
177
+ * boolean and null counts, the value itself included; a document or an image is
178
+ * one), 100,000 rows per array, 64 KiB per string or field name and 32 MiB of
179
+ * text in total, field names and the text of its Markdown documents included
180
+ * (256 KB per document). A list of rows with 13 fields is 14 values per row, so
181
+ * 50,000 such rows fit. An array property larger than one 1 MiB request is sent
182
+ * in parts (a player that takes row patches); only the top-level array is
183
+ * split, so any other value, and each row, must fit in one request (a row of
184
+ * more than 512 KiB is refused with `limit`). A value over a limit is refused
185
+ * with code `limit` and the property keeps what it showed (see
186
+ * {@link View.set}); `TestHost` refuses it the same way.
194
187
  *
195
188
  * Bind a whole list and draw it with a Slint `ListView`, which builds only
196
189
  * the rows on screen; the SDK sends what changed (row patches).
@@ -200,8 +193,8 @@ export interface MarkdownOptions {
200
193
  */
201
194
  export type PropValue = PropData | ImageRef;
202
195
  /**
203
- * JSON whose values may also be Markdown documents and (SDK 1.5.19) images,
204
- * at any depth: the part of {@link PropValue} that nests.
196
+ * JSON whose values may also be Markdown documents and images, at any depth:
197
+ * the part of {@link PropValue} that nests.
205
198
  *
206
199
  * @example Type a message list whose rows carry a document
207
200
  * A property value for a chat's message list, typed so that TypeScript
@@ -270,7 +263,7 @@ export type Props = Record<string, PropValue>;
270
263
  *
271
264
  * {@includeCode ../../../examples/markdown/ui/document.slint}
272
265
  *
273
- * @see {@link ImageRef}, {@link MarkdownRef}, [Windows, panels, settings pages, dialogs and the OSD](../../../docs/explanation/ui.md)
266
+ * @see {@link ImageRef}, {@link MarkdownRef}, [Example: Markdown](../../../docs/examples/markdown.md), [Theme](../../../docs/reference/theme.md)
274
267
  * @since 1.0.0
275
268
  * @category UI
276
269
  */
@@ -279,18 +272,18 @@ export interface Ui {
279
272
  * Reference a PNG or JPEG file for an `image` property.
280
273
  *
281
274
  * @remarks
282
- * Returns at once without touching the file. The player checks the file
283
- * each time it receives the reference (a property write, a window or
284
- * settings page opening, the main window being rebuilt): it must be inside this plugin's package
285
- * directory or {@link Plugin.dataDirectory} after following links, at most
286
- * 16 MB and 4096×4096 pixels, and PNG or JPEG by content (the extension
275
+ * Returns at once without touching the file. The player checks the file each
276
+ * time it receives the reference (a property write, a window or settings page
277
+ * opening, the main window being rebuilt): it must be inside this plugin's
278
+ * package directory or {@link Plugin.dataDirectory} after following links, at
279
+ * most 16 MB and 4096×4096 pixels, and PNG or JPEG by content (the extension
287
280
  * does not matter). A failed check of a whole-value image is a failed
288
281
  * property write: `missing` for a file that does not exist, `invalid`
289
282
  * otherwise. It goes to {@link Scope.onError} and the property keeps its
290
283
  * previous image; in the initial properties of a tool window it makes
291
- * {@link Window.show} reject. A nested image (a field of a row, SDK
292
- * 1.5.19) that fails its check is drawn empty instead, and the rest of
293
- * the value is shown, as a Markdown image shows its alt text.
284
+ * {@link Window.show} reject. A nested image (a field of a row) that fails
285
+ * its check is drawn empty instead, and the rest of the value is shown, as a
286
+ * Markdown image shows its alt text.
294
287
  *
295
288
  * The player caches decoded images per plugin (up to 64 MB, least recently
296
289
  * used first) by path, size and modification time, and does not watch
@@ -302,8 +295,8 @@ export interface Ui {
302
295
  *
303
296
  * @param path - Absolute path of the image file, inside the package
304
297
  * directory or the data directory.
305
- * @param options - `maxSide` (SDK 1.5.19, player 0.5.1): decode the image
306
- * scaled down, aspect kept, so that neither side is over it.
298
+ * @param options - `maxSide`: decode the image scaled down, aspect kept, so
299
+ * that neither side is over it.
307
300
  * @returns A new {@link ImageRef}, owned by this scope.
308
301
  *
309
302
  * @throws `invalid` (throws) `path` is not a non-empty string, or
@@ -339,8 +332,6 @@ export interface Ui {
339
332
  * shows the same thumbnails again reads them from disk.
340
333
  *
341
334
  * @capability None (the plugin process has network access).
342
- * @player Any (the reference is an ordinary {@link ImageRef}); nested in a
343
- * value, player 0.5.1.
344
335
  *
345
336
  * @param url - The image's `https:` address.
346
337
  * @param options - As for {@link Ui.image}.
@@ -397,24 +388,23 @@ export interface Ui {
397
388
  * The text is at most 256 KB; very long documents are cut off after 4000
398
389
  * blocks.
399
390
  *
400
- * `MarkdownView` scrolls one document. `MarkdownBlocks` (SDK 1.5.4, players
401
- * after 0.4.0) draws one without scrolling, as tall as its content, for a
402
- * layout of your own or a `ListView` row. For a list of documents, write
403
- * the whole list with one document per row: the player parses only the
404
- * documents that changed and updates the list in place (rows added or
405
- * removed at the end, a growing document's changed blocks), so re-sending
406
- * the list on every streamed chunk keeps the scroll position and costs
407
- * little.
408
- *
409
- * From player 0.7.1 both views take `selectable: true` (default `false`):
410
- * the user can select and copy the text, one block at a time; blocks with
411
- * links keep their clickable links and copy as `text (url)`. Code blocks
412
- * are always selectable. `MarkdownBlock.plain` (the block as plain text)
413
- * and `MarkdownBlock.links` (its link addresses) are readable in Slint.
414
- * See [Reference: theme › Markdown](../../../docs/reference/theme.md#markdown).
391
+ * `MarkdownView` scrolls one document. `MarkdownBlocks` (players after 0.4.0)
392
+ * draws one without scrolling, as tall as its content, for a layout of your
393
+ * own or a `ListView` row. For a list of documents, write the whole list with
394
+ * one document per row: the player parses only the documents that changed and
395
+ * updates the list in place (rows added or removed at the end, a growing
396
+ * document's changed blocks), so re-sending the list on every streamed chunk
397
+ * keeps the scroll position and costs little.
398
+ *
399
+ * Both views take `selectable: true` (default `false`): the user can select
400
+ * and copy the text, one block at a time; blocks with links keep their
401
+ * clickable links and copy as `text (url)`. Code blocks are always
402
+ * selectable. `MarkdownBlock.plain` (the block as plain text) and
403
+ * `MarkdownBlock.links` (its link addresses) are readable in Slint. See
404
+ * [Reference: theme › Markdown](../../../docs/reference/theme.md#markdown).
415
405
  *
416
406
  * @capability None.
417
- * @player 0.2.0 (set `"minPlayerVersion": "0.2.0"` in the manifest)
407
+ * @player 0.2.0
418
408
  *
419
409
  * @param text - The Markdown source (CommonMark with GitHub tables, task
420
410
  * lists and strikethrough), at most 256 KB as UTF-8.
@@ -543,7 +533,7 @@ export interface Ui {
543
533
  *
544
534
  * {@includeCode ../../../examples/bookmark/ui/bookmark.slint}
545
535
  *
546
- * @see {@link Window}, {@link Panel}, {@link SettingsPage}, [Windows, panels, settings pages, dialogs and the OSD](../../../docs/explanation/ui.md), [Keep a slider responsive while dragging](../../../docs/how-to/slider.md)
536
+ * @see {@link Window}, {@link Panel}, {@link SettingsPage}, [Open a tool window and remember its state](../../../docs/guides/windows.md), [Keep a slider responsive while dragging](../../../docs/guides/slider.md)
547
537
  * @since 1.0.0
548
538
  * @category UI
549
539
  */
@@ -615,23 +605,22 @@ export interface View {
615
605
  * Do not `set` a property that a {@link View.bind} function also returns:
616
606
  * the next update pass replaces the set value with the bound one.
617
607
  *
618
- * On a view nothing was bound to, `set` alone writes (SDK 1.7.0): each
619
- * value is sent whole, a large list in parts, one write in flight per
620
- * view; the SDK neither compares nor turns lists into row patches, and
621
- * the view takes no part in update passes. From the view's first
622
- * {@link View.bind} on, `set` values go the bound way: a list that
623
- * differs from the one sent is sent as a row patch where one applies.
624
- *
625
- * A property the plugin writes directly ({@link WireView.write}, SDK
626
- * 1.7.0) cannot be `set`: one track per property. Otherwise it never
627
- * throws. A write that fails is retried with back-off and reported
628
- * to {@link Scope.onError} (the first failure of a run of failures; the
629
- * message names the property). A value over the limits of
630
- * {@link PropValue} fails with `limit`. As an initial property (written
631
- * while the view is not open) it makes {@link Window.show} reject; a
632
- * panel or settings page still opens without it (the property keeps its
633
- * default) and the failure goes to the plugin's `onError` (player 0.4.3;
634
- * older players left it out silently).
608
+ * On a view nothing was bound to, `set` alone writes: each value is sent
609
+ * whole, a large list in parts, one write in flight per view; the SDK neither
610
+ * compares nor turns lists into row patches, and the view takes no part in
611
+ * update passes. From the view's first {@link View.bind} on, `set` values go
612
+ * the bound way: a list that differs from the one sent is sent as a row patch
613
+ * where one applies.
614
+ *
615
+ * A property the plugin writes directly ({@link WireView.write}) cannot be
616
+ * `set`: one track per property. Otherwise it never throws. A write that
617
+ * fails is retried with back-off and reported to {@link Scope.onError} (the
618
+ * first failure of a run of failures; the message names the property). A
619
+ * value over the limits of {@link PropValue} fails with `limit`. As an
620
+ * initial property (written while the view is not open) it makes
621
+ * {@link Window.show} reject; a panel or settings page still opens without it
622
+ * (the property keeps its default) and the failure goes to the plugin's
623
+ * `onError`.
635
624
  *
636
625
  * @capability That of the view: `ui.window`, `ui.mount` or `ui.settings`.
637
626
  *
@@ -663,27 +652,33 @@ export interface View {
663
652
  *
664
653
  * @remarks
665
654
  * The SDK calls `props` in every update pass (and right after `bind`) and
666
- * sends the values that differ from the ones it sent last; a view takes
667
- * part in the update passes from its first `bind` on (SDK 1.7.0). After a
668
- * change of the player state alone it calls `props` only if it read a
669
- * field of `plugin.player.state` (or of a {@link Scope.state} object) that
670
- * changed (SDK 1.5.45); a full pass follows
671
- * after each handler, on {@link Scope.update} and at least once a second
672
- * while the player state keeps changing. Because an
673
- * unchanged value is not sent again, text the user typed into an `in-out`
674
- * property stays until the plugin's value for it changes.
655
+ * sends the values that differ from the ones it sent last; a view takes part
656
+ * in the update passes from its first `bind` on. After a change of the player
657
+ * state alone it calls `props` only if it read a field of
658
+ * `plugin.player.state` (or of a {@link Scope.state} object) that changed; a
659
+ * full pass follows after each handler, on {@link Scope.update} and at least
660
+ * once a second while the player state keeps changing. Because an unchanged
661
+ * value is not sent again, text the user typed into an `in-out` property
662
+ * stays until the plugin's value for it changes.
675
663
  *
676
664
  * Keep the function quick and synchronous: it runs often. An error it
677
665
  * throws is reported to {@link Scope.onError} and the other bindings still
678
666
  * run. A view can have several bindings; when two return the same name,
679
667
  * the one bound later wins.
680
668
  *
681
- * Never throws. Writes that fail are not repeated until the value
682
- * changes, and are reported to {@link Scope.onError} like a failed
683
- * {@link View.set} (a value over the limits of {@link PropValue}: `limit`).
684
- * A property the plugin writes directly ({@link WireView.write}, SDK
685
- * 1.7.0) is left out of what the function returns, reported once to
686
- * `onError` with `invalid`: one track per property.
669
+ * A bound array is sent as row patches: only the rows whose value changed in
670
+ * the plugin. So Slint code must not write into its rows
671
+ * (`rows[i].selected = true`): that row keeps the Slint-side value until the
672
+ * plugin's value for it changes. Send a callback and change the row in the
673
+ * plugin instead. In a long list, return each unchanged row as the same
674
+ * deep-frozen object (`Object.freeze` on it and on every object and array in
675
+ * it): such a row is encoded once, not in every pass.
676
+ *
677
+ * Never throws. Writes that fail are not repeated until the value changes,
678
+ * and are reported to {@link Scope.onError} like a failed {@link View.set} (a
679
+ * value over the limits of {@link PropValue}: `limit`). A property the plugin
680
+ * writes directly ({@link WireView.write}) is left out of what the function
681
+ * returns, reported once to `onError` with `invalid`: one track per property.
687
682
  *
688
683
  * @capability That of the view: `ui.window`, `ui.mount` or `ui.settings`.
689
684
  *
@@ -704,7 +699,7 @@ export interface View {
704
699
  * }));
705
700
  * ```
706
701
  *
707
- * @see [Keep a slider responsive while dragging](../../../docs/how-to/slider.md)
702
+ * @see [Keep a slider responsive while dragging](../../../docs/guides/slider.md)
708
703
  * @since 1.0.0
709
704
  */
710
705
  bind(props: () => Props): Disposable;
@@ -73,7 +73,7 @@ import type { View } from "./ui-content.ts";
73
73
  * });
74
74
  * ```
75
75
  *
76
- * @see {@link Windows.create}, {@link View}, [Windows, panels, settings pages, dialogs and the OSD](../../../docs/explanation/ui.md), [Remember a window's state between runs](../../../docs/how-to/window-state.md)
76
+ * @see {@link Windows.create}, {@link View}, [Open a tool window and remember its state](../../../docs/guides/windows.md)
77
77
  * @since 1.0.0
78
78
  * @category UI
79
79
  */
@@ -229,7 +229,7 @@ export interface Window extends View, Disposable {
229
229
  * notesWindow.onClose(() => store.save({ open: false }));
230
230
  * ```
231
231
  *
232
- * @see [Remember a window's state between runs](../../../docs/how-to/window-state.md)
232
+ * @see [Open a tool window and remember its state](../../../docs/guides/windows.md)
233
233
  * @since 1.0.0
234
234
  */
235
235
  onClose(listener: () => unknown): Disposable;
@@ -255,7 +255,7 @@ export interface Window extends View, Disposable {
255
255
  *
256
256
  * {@includeCode ../../../examples/bookmark/main.ts#window,command}
257
257
  *
258
- * @see {@link Window}, [Windows, panels, settings pages, dialogs and the OSD](../../../docs/explanation/ui.md)
258
+ * @see {@link Window}, [Open a tool window and remember its state](../../../docs/guides/windows.md)
259
259
  * @since 1.0.0
260
260
  * @category UI
261
261
  */
@@ -284,8 +284,7 @@ export interface Windows {
284
284
  * open the same file more than once.
285
285
  * @returns A {@link Window} owned by this scope.
286
286
  *
287
- * @throws `conflict` (throws) This plugin already has a window with this id
288
- * (SDK 1.3.0; before, a plain `Error` without `code`).
287
+ * @throws `conflict` (throws) This plugin already has a window with this id.
289
288
  *
290
289
  * @example Open two windows from one Slint file
291
290
  * Two compare windows open side by side, one labelled A and one B. A
@@ -326,9 +325,8 @@ export interface SlotState {
326
325
  * out when the pointer reaches the right edge; treat it as "on" for a
327
326
  * toggle button;
328
327
  * - `idle`: the bottom bar in fullscreen while the pointer is outside the
329
- * bar's own band at the bottom of the screen (player 0.5.1: keys and
330
- * pointer motion elsewhere do not bring it back; before 0.5.1 it hid after
331
- * 3 seconds without activity).
328
+ * bar's own band at the bottom of the screen (keys and pointer motion
329
+ * elsewhere do not bring it back).
332
330
  */
333
331
  reason: "userHidden" | "space" | "fullscreen" | "idle" | null;
334
332
  /** The sidebar floats in its own window; always `false` for the bottom bar. */
@@ -424,8 +422,7 @@ export interface PanelSlot {
424
422
  readonly state: SlotState | null;
425
423
  /**
426
424
  * The position's panels in tab order: the sidebar's tabs, the bottom
427
- * bar's one panel; `null` while there is none (as `state`), and from
428
- * players without sidebar tabs (0.4.0 and older). Refreshed with `state`.
425
+ * bar's one panel; `null` while there is none (as `state`). Refreshed with `state`.
429
426
  *
430
427
  * @throws Never.
431
428
  *
@@ -499,9 +496,9 @@ export interface PanelSlot {
499
496
  * @remarks
500
497
  * Reads the state from the player first, so it is right even without
501
498
  * `events`. It is a switch, the same in every mode: in fullscreen a column
502
- * switched on is revealed by the pointer at the right edge, and is not
503
- * popped out by the toggle (SDK 1.6.13, player 0.7.6; `setVisible(true)`
504
- * pops it out). Switching it off while it is out slides it in at once.
499
+ * switched on is revealed by the pointer at the right edge, and is not popped
500
+ * out by the toggle (`setVisible(true)` pops it out). Switching it off while
501
+ * it is out slides it in at once.
505
502
  *
506
503
  * @capability ui.mount
507
504
  *
@@ -537,8 +534,7 @@ export interface PanelSlot {
537
534
  * The sidebar holds the panels of several plugins as tabs (see
538
535
  * {@link Panels.mount}); this switches which one it shows, like a click on
539
536
  * its tab. To show this plugin's own panel, use {@link Panel.show}. The
540
- * bottom bar has one panel: activating it changes nothing. Players
541
- * without sidebar tabs (0.4.0 and older) ignore it.
537
+ * bottom bar has one panel: activating it changes nothing.
542
538
  *
543
539
  * @capability ui.mount
544
540
  *
@@ -664,7 +660,7 @@ export interface SidebarSlot extends PanelSlot {
664
660
  *
665
661
  * {@includeCode ../../../examples/panel-menu/ui/panel.slint}
666
662
  *
667
- * @see {@link Panels.mount}, {@link PanelSlot}, [Windows, panels, settings pages, dialogs and the OSD](../../../docs/explanation/ui.md)
663
+ * @see {@link Panels.mount}, {@link PanelSlot}, [Example: Panel menu](../../../docs/examples/panel-menu.md), [Example: Adjust panel](../../../docs/examples/adjust-panel.md)
668
664
  * @since 1.0.0
669
665
  * @category UI
670
666
  */
@@ -676,31 +672,28 @@ export interface Panel extends View, Disposable {
676
672
  * @remarks
677
673
  * Mounts made while `activate` runs must succeed before the plugin is
678
674
  * ready: a rejection fails activation, except `conflict` for a taken
679
- * position (below), which the player (0.4.x after 0.4.0) and `TestHost`
675
+ * position (below), which the player and `TestHost`
680
676
  * do not count: the plugin runs without its panel, its commands and keys
681
677
  * work, and the player shows the refusal (an OSD message,
682
678
  * {@link PluginInfo.warnings} and the text in {@link PluginInfo.error}).
683
679
  * Later failures also go to {@link Scope.onError}.
684
680
  *
685
- * A second sidebar panel is not refused: it resolves as another tab
686
- * (see {@link Panel.state}). Built-in plugins mount first at start-up,
687
- * so the playlist's tab is first and a built-in panel keeps its position.
688
- * Behaviour from player 0.7.3: the sidebar takes any number of tabs; the
689
- * strip shows the tabs that fit and a `»` menu lists all of them.
690
- * Players 0.4.x to 0.7.2 refused a ninth tab with `conflict`. A plugin
691
- * whose sidebar tab is in the background, and that holds nothing else
692
- * that keeps it running, goes to standby when idle; showing the tab
693
- * starts it again (see {@link Panel.state}).
694
- *
695
- * @throws `ui-prepare` (rejects) The Slint file does not compile, or a
696
- * bound property is not declared on the bridge global; `message` has the
697
- * diagnostics. (Players 0.4.0 and older also answer a taken bottom bar
698
- * or sidebar with it.)
699
- * @throws `conflict` (rejects) Another plugin's panel holds the bottom bar
700
- * or the backdrop (shown, or being mounted); `message` names the
701
- * position and the holder (「底栏已被 vestra.playback 使用」). Not an
702
- * activation failure. Never for the sidebar (behaviour from player
703
- * 0.7.3); players 0.4.x to 0.7.2 also refused a ninth sidebar tab.
681
+ * A second sidebar panel is not refused: it resolves as another tab (see
682
+ * {@link Panel.state}). Built-in plugins mount first at start-up, so the
683
+ * playlist's tab is first and a built-in panel keeps its position. The
684
+ * sidebar takes any number of tabs; the strip shows the tabs that fit and a
685
+ * `»` menu lists all of them. A plugin whose sidebar tab is in the
686
+ * background, and that holds nothing else that keeps it running, goes to
687
+ * standby when idle; showing the tab starts it again (see
688
+ * {@link Panel.state}).
689
+ *
690
+ * @throws `ui-prepare` (rejects) The Slint file does not compile, or a bound
691
+ * property is not declared on the bridge global; `message` has the
692
+ * diagnostics.
693
+ * @throws `conflict` (rejects) Another plugin's panel holds the bottom bar or
694
+ * the backdrop (shown, or being mounted); `message` names the position and
695
+ * the holder (「底栏已被 vestra.playback 使用」). Not an activation failure. Never
696
+ * for the sidebar.
704
697
  * @throws `busy` (rejects) The player is still preparing this plugin's
705
698
  * previous mount, or its queue of mounts is full.
706
699
  * @throws `invalid` (rejects) `title` is longer than 128 bytes or has
@@ -721,18 +714,16 @@ export interface Panel extends View, Disposable {
721
714
  * only this plugin's own changes. A sidebar panel in a background tab
722
715
  * has `active: false`, `effective: false` and `reason: "otherTab"`.
723
716
  *
724
- * Behaviour from player 0.7.3: a background tab does not keep the plugin
725
- * running.
726
- * If the panel is all that keeps it running, the plugin goes to standby
727
- * after the idle time (stop reason `idle`): the player keeps its tab, with
728
- * its title, in the strip and the `»` menu. When the user shows the tab,
729
- * the player starts the plugin again; `activate` runs and mounts the same
730
- * panel (same file and component), which takes the tab over, and
731
- * {@link Panel.ready} resolves again. Anything the plugin kept only in
732
- * memory is gone: restore the view from storage (session storage
733
- * survives standby). While it is in the background, the player may also
734
- * drop the panel's component and build it again from the bridge
735
- * properties last written, as it does on any rebuild.
717
+ * A background tab does not keep the plugin running. If the panel is all that
718
+ * keeps it running, the plugin goes to standby after the idle time (stop
719
+ * reason `idle`): the player keeps its tab, with its title, in the strip and
720
+ * the `»` menu. When the user shows the tab, the player starts the plugin
721
+ * again; `activate` runs and mounts the same panel (same file and component),
722
+ * which takes the tab over, and {@link Panel.ready} resolves again. Anything
723
+ * the plugin kept only in memory is gone: restore the view from storage
724
+ * (session storage survives standby). While it is in the background, the
725
+ * player may also drop the panel's component and build it again from the
726
+ * bridge properties last written, as it does on any rebuild.
736
727
  *
737
728
  * @throws Never; `null` stands for "not mounted".
738
729
  *
@@ -773,8 +764,7 @@ export interface Panel extends View, Disposable {
773
764
  *
774
765
  * @remarks
775
766
  * Sets the position's preference like {@link PanelSlot.setVisible}`(true)`
776
- * (remembered; in fullscreen the sidebar overlay pops out). On players
777
- * without sidebar tabs (0.4.0 and older) it is just that. Waits for
767
+ * (remembered; in fullscreen the sidebar overlay pops out). Waits for
778
768
  * {@link Panel.ready} first.
779
769
  *
780
770
  * @capability ui.mount
@@ -808,12 +798,11 @@ export interface Panel extends View, Disposable {
808
798
  * position; otherwise it switches the position on at this panel's tab: a
809
799
  * panel in a background tab comes to the front instead of the sidebar
810
800
  * closing. It is a switch, the same in every mode, like the player's own
811
- * Alt+1…4 and Adjustments and Effects: in fullscreen a column switched on is revealed
812
- * by the pointer at the right edge, not popped out (SDK 1.6.13, player
813
- * 0.7.6; {@link Panel.show} pops it out), and one switched off while out
814
- * slides in at once. A "Show list"
815
- * command checked by `state.preferred && state.active` matches it. Waits
816
- * for {@link Panel.ready} first.
801
+ * Alt+1…4 and Adjustments and Effects: in fullscreen a column switched on is
802
+ * revealed by the pointer at the right edge, not popped out
803
+ * ({@link Panel.show} pops it out), and one switched off while out slides in
804
+ * at once. A "Show list" command checked by `state.preferred && state.active`
805
+ * matches it. Waits for {@link Panel.ready} first.
817
806
  *
818
807
  * @capability ui.mount
819
808
  *
@@ -849,13 +838,13 @@ export interface Panel extends View, Disposable {
849
838
  * @remarks
850
839
  * In fullscreen the bottom bar shows only while the pointer is in the bar's
851
840
  * own band at the bottom of the screen: at once when the pointer enters it,
852
- * hidden 500 ms after it leaves (player 0.5.1; keys and pointer motion
853
- * elsewhere do not reveal it), and the fullscreen sidebar overlay collapses
854
- * when the pointer leaves it. A lock keeps the bar shown. Set a
855
- * lock while a text field has focus, a drag is in progress or a popup is
856
- * open, and clear it afterwards. Locks are merged with the earlier ones;
857
- * the last value of each wins. The player already locks a panel while the
858
- * pointer is over it. No effect on the backdrop.
841
+ * hidden 500 ms after it leaves (keys and pointer motion elsewhere do not
842
+ * reveal it), and the fullscreen sidebar overlay collapses when the pointer
843
+ * leaves it. A lock keeps the bar shown. Set a lock while a text field has
844
+ * focus, a drag is in progress or a popup is open, and clear it afterwards.
845
+ * Locks are merged with the earlier ones; the last value of each wins. The
846
+ * player already locks a panel while the pointer is over it. No effect on the
847
+ * backdrop.
859
848
  *
860
849
  * Never throws: a failed write is reported to {@link Scope.onError}.
861
850
  *