@vestra-player/sdk 1.7.1 → 1.7.3

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 (93) hide show
  1. package/CHANGELOG.md +20 -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 +141 -155
  48. package/dist/plugin/testing/internals.d.ts +9 -2
  49. package/dist/plugin/testing/internals.js +9 -2
  50. package/dist/plugin/testing/layout.d.ts +46 -3
  51. package/dist/plugin/testing/layout.js +102 -7
  52. package/dist/plugin/testing/services.js +10 -2
  53. package/dist/plugin/testing/slint-types.d.ts +75 -0
  54. package/dist/plugin/testing/slint-types.js +974 -0
  55. package/dist/plugin/timeline.d.ts +1 -1
  56. package/dist/plugin/timeline.js +2 -2
  57. package/dist/plugin/types/base.d.ts +90 -111
  58. package/dist/plugin/types/commands.d.ts +142 -174
  59. package/dist/plugin/types/packages.d.ts +48 -63
  60. package/dist/plugin/types/playback.d.ts +45 -59
  61. package/dist/plugin/types/plugin-wire.d.ts +38 -45
  62. package/dist/plugin/types/processing.d.ts +52 -65
  63. package/dist/plugin/types/services.d.ts +18 -25
  64. package/dist/plugin/types/snapshots.d.ts +34 -46
  65. package/dist/plugin/types/sources.d.ts +14 -16
  66. package/dist/plugin/types/subtitles.d.ts +7 -8
  67. package/dist/plugin/types/ui-content.d.ts +111 -116
  68. package/dist/plugin/types/ui-layout.d.ts +52 -63
  69. package/dist/plugin/types/ui-locale.d.ts +41 -45
  70. package/dist/plugin/types/ui-shell.d.ts +69 -87
  71. package/dist/plugin/values.d.ts +15 -18
  72. package/dist/plugin/values.js +16 -19
  73. package/dist/plugin/view/base.d.ts +2 -2
  74. package/dist/plugin/view/base.js +7 -8
  75. package/dist/plugin/view/layout.d.ts +2 -2
  76. package/dist/plugin/view/panel.js +2 -4
  77. package/dist/plugin/view/writer.d.ts +8 -8
  78. package/dist/plugin/view/writer.js +37 -39
  79. package/dist/plugin/when.d.ts +3 -3
  80. package/dist/plugin/wire-facade.js +6 -7
  81. package/dist/processing.d.ts +26 -30
  82. package/dist/processing.js +4 -4
  83. package/dist/source-resolvers.d.ts +2 -2
  84. package/dist/source.d.ts +1 -2
  85. package/dist/subtitles.d.ts +1 -1
  86. package/dist/ts-plugin.d.ts +5 -5
  87. package/dist/wire.d.ts +63 -70
  88. package/dist/wire.js +21 -25
  89. package/llms.txt +7 -10
  90. package/package.json +1 -1
  91. package/slint/vestra/bar-buttons.slint +6 -8
  92. package/slint/vestra/focus.slint +1 -1
  93. package/slint/vestra/widgets.slint +2 -4
package/dist/wire.d.ts CHANGED
@@ -57,8 +57,8 @@ export interface UiCallback {
57
57
  args: Json[];
58
58
  }
59
59
  /**
60
- * One row operation of a list property's patch, by index, applied to the
61
- * result of the ones before (player 0.6.0, feature `ui.patch`).
60
+ * One row operation of a list property's patch, by index, applied to the result
61
+ * of the ones before (feature `ui.patch`).
62
62
  *
63
63
  * @remarks
64
64
  * Part of the wire protocol, which is not semver: this type changes with
@@ -118,14 +118,13 @@ export type RowOp = {
118
118
  * @remarks
119
119
  * Part of the wire protocol, which is not semver: this type changes with
120
120
  * versions. `{ value }` replaces the property; to a player that takes row
121
- * patches (player 0.6.0) it carries a `seq` that later patches apply on.
122
- * `{ patch: { base, seq, ops } }` applies `ops` on the write numbered
123
- * `base` (0: the view's initial properties) and is numbered `seq` itself;
124
- * the player refuses it with `stale` when the property changed since
125
- * `base`. `more` marks a part of a whole value sent in several, not the
126
- * last: the player shows the value at the last part. The SDK writes these
127
- * for `set()` and `bind()`; a plugin writes them with
128
- * {@link WireView.write}.
121
+ * patches it carries a `seq` that later patches apply on.
122
+ * `{ patch: { base, seq, ops } }` applies `ops` on the write numbered `base`
123
+ * (0: the view's initial properties) and is numbered `seq` itself; the player
124
+ * refuses it with `stale` when the property changed since `base`. `more` marks
125
+ * a part of a whole value sent in several, not the last: the player shows the
126
+ * value at the last part. The SDK writes these for `set()` and `bind()`; a
127
+ * plugin writes them with {@link WireView.write}.
129
128
  *
130
129
  * @example Write a whole list, numbered
131
130
  * The property `items` becomes a list of two rows; a later patch with
@@ -143,7 +142,7 @@ export type PropertyWrite = {
143
142
  value: Json;
144
143
  /** This write's number, which later patches name as their `base`. */
145
144
  seq?: number;
146
- /** A part of a whole value sent in parts, not the last (player 0.6.0). */
145
+ /** A part of a whole value sent in parts, not the last. */
147
146
  more?: boolean;
148
147
  } | {
149
148
  /** Row operations on a list property. */
@@ -155,7 +154,7 @@ export type PropertyWrite = {
155
154
  /** The operations, applied in order. */
156
155
  ops: RowOp[];
157
156
  };
158
- /** A part of a whole value sent in parts, not the last (player 0.6.0). */
157
+ /** A part of a whole value sent in parts, not the last. */
159
158
  more?: boolean;
160
159
  };
161
160
  /**
@@ -243,13 +242,13 @@ export interface PackageInfo {
243
242
  capabilities: string[];
244
243
  /** Its directory on disk. */
245
244
  directory: string;
246
- /** One of the player's built-in plugins (player 0.2.0; absent from older players). */
245
+ /** One of the player's built-in plugins. */
247
246
  builtin?: boolean;
248
247
  /** Where an installed package came from; `null` for a development directory. */
249
248
  source?: WireSource | null;
250
249
  /** Its data directory, `null` when it has none. */
251
250
  dataDirectory?: string | null;
252
- /** What the plugin was refused because another plugin holds it (player 0.4.x, after 0.4.0). */
251
+ /** What the plugin was refused because another plugin holds it. */
253
252
  warnings?: {
254
253
  /** Why: `slot-occupied`, `sequence-taken` or `resolver-taken`; a newer player may add codes. */
255
254
  code: string;
@@ -258,7 +257,7 @@ export interface PackageInfo {
258
257
  /** The manifest id of the plugin holding it, if any. */
259
258
  owner?: string;
260
259
  }[];
261
- /** The manifest's display texts in the interface language (player 0.4.3). */
260
+ /** The manifest's display texts in the interface language. */
262
261
  display?: {
263
262
  /** The display name, or `null`. */
264
263
  name: string | null;
@@ -269,7 +268,7 @@ export interface PackageInfo {
269
268
  /** The store tags. */
270
269
  tags: string[];
271
270
  };
272
- /** Whether it has a process now (player 0.5.18, `state: "running"`). */
271
+ /** Whether it has a process now (`state: "running"`). */
273
272
  process?: "running" | "idle";
274
273
  }
275
274
  /**
@@ -310,9 +309,9 @@ export interface BindingTable {
310
309
  command: string;
311
310
  title: string;
312
311
  path: string[] | null;
313
- /** The path's keys (player 0.4.3). */
312
+ /** The path's keys. */
314
313
  key?: string[] | null;
315
- /** The shown category (player 0.7.6). */
314
+ /** The shown category. */
316
315
  category?: string | null;
317
316
  scope: "global" | "panel";
318
317
  defaults: string[];
@@ -351,7 +350,7 @@ export interface BindingTable {
351
350
  export interface WindowFacts {
352
351
  /** The main window is fullscreen. */
353
352
  fullscreen: boolean;
354
- /** The main window is maximized, `false` in fullscreen (player 0.6.3; absent from older players: `false`). */
353
+ /** The main window is maximized, `false` in fullscreen. */
355
354
  maximized?: boolean;
356
355
  /** The video area's size. */
357
356
  videoArea: {
@@ -360,7 +359,7 @@ export interface WindowFacts {
360
359
  /** Height in logical points. */
361
360
  height: number;
362
361
  };
363
- /** System picture-in-picture (absent from older players: unsupported). */
362
+ /** System picture-in-picture. */
364
363
  pictureInPicture?: {
365
364
  /** The system offers it. */
366
365
  supported: boolean;
@@ -369,11 +368,11 @@ export interface WindowFacts {
369
368
  };
370
369
  /** The palette (`plugin.appearance`), with the `window.state` reply; a newer player may name a palette this SDK does not list. */
371
370
  appearance?: string;
372
- /** The file resolvers' extensions (`plugin.resolvers.fileTypes`; player 0.4.2). */
371
+ /** The file resolvers' extensions (`plugin.resolvers.fileTypes`). */
373
372
  fileTypes?: string[];
374
- /** The saved interface language, `"system"` or a locale (player 0.4.3). */
373
+ /** The saved interface language, `"system"` or a locale. */
375
374
  language?: string;
376
- /** The interface language of this run (player 0.4.3). */
375
+ /** The interface language of this run. */
377
376
  locale?: string;
378
377
  }
379
378
  /**
@@ -398,8 +397,8 @@ export interface WireMark {
398
397
  plugin: string;
399
398
  }
400
399
  /**
401
- * One timeline range as the player merges them (player 0.7.6): what
402
- * `TimelineRange` is made from.
400
+ * One timeline range as the player merges them: what `TimelineRange` is made
401
+ * from.
403
402
  *
404
403
  * @remarks
405
404
  * The player's wire shape (`timeline.marks`, `timeline.changed`), part of the protocol, which is not
@@ -434,7 +433,7 @@ export interface WireRange {
434
433
  export interface WireTimeline {
435
434
  /** The marks, in time order. */
436
435
  marks: WireMark[];
437
- /** The ranges (from player 0.7.6; absent from older players). */
436
+ /** The ranges. */
438
437
  ranges?: WireRange[];
439
438
  }
440
439
  /** A panel position (`ui.mount`'s `slot`). */
@@ -453,8 +452,8 @@ export interface LayoutPanel {
453
452
  title: string;
454
453
  }
455
454
  /**
456
- * One position (the bottom bar, the sidebar or, from player 0.7.6, the
457
- * adjust column) as `layout.state` reports it.
455
+ * One position (the bottom bar, the sidebar or, the adjust column) as
456
+ * `layout.state` reports it.
458
457
  */
459
458
  export interface LayoutSlot {
460
459
  /** The current tab's panel (the only panel of the bottom bar). */
@@ -463,7 +462,7 @@ export interface LayoutSlot {
463
462
  effective: boolean;
464
463
  reason: "userHidden" | "space" | "fullscreen" | "idle" | null;
465
464
  detached: boolean;
466
- /** The position's panels in tab order; absent from players without sidebar tabs (0.4.0 and older). */
465
+ /** The position's panels in tab order. */
467
466
  panels?: LayoutPanel[];
468
467
  }
469
468
  export interface PlaybackStats {
@@ -471,7 +470,7 @@ export interface PlaybackStats {
471
470
  session: number;
472
471
  framesShown: number;
473
472
  framesDropped: number | null;
474
- /** Player 0.5.1 and newer; the SDK fills in `null`. */
473
+ /** Frames presented per second; the SDK fills in `null` when absent. */
475
474
  presentedFps?: number | null;
476
475
  video: {
477
476
  codec: string | null;
@@ -541,9 +540,9 @@ export interface WireSystemInfo {
541
540
  refreshRate: number | null;
542
541
  primary: boolean;
543
542
  }[];
544
- /** Player 0.5.12; older players leave it out. */
543
+ /** The renderer drawing now. */
545
544
  rendering?: "gpu" | "software";
546
- /** Why `rendering` is what it is (player 0.5.13; older players leave it out). */
545
+ /** Why `rendering` is what it is. */
547
546
  renderingReason?: WireRenderingReason;
548
547
  }
549
548
  /**
@@ -562,7 +561,7 @@ export interface WireRenderingReason {
562
561
  /** English text, to show. */
563
562
  message: string;
564
563
  }
565
- /** `rendering.state` and `rendering.setPreference` (player 0.5.13). */
564
+ /** `rendering.state` and `rendering.setPreference`. */
566
565
  export interface WireRenderingState {
567
566
  mode: "gpu" | "software";
568
567
  reason: WireRenderingReason;
@@ -577,8 +576,8 @@ export interface WireRenderingState {
577
576
  }
578
577
  /**
579
578
  * An upscaling reason: `{ code, message }` as a rendering reason; with
580
- * `decoding` a `cause`, with cause `copy-back` the `plugins` (player 0.5.25).
581
- * What `UpscalingReason` is made from.
579
+ * `decoding` a `cause`, with cause `copy-back` the `plugins`. What
580
+ * `UpscalingReason` is made from.
582
581
  *
583
582
  * @remarks
584
583
  * The player's wire shape (`video.upscaling.state`, `video.upscaling.changed`), part of the protocol, which is not
@@ -600,8 +599,7 @@ export interface WireUpscalingReason extends WireRenderingReason {
600
599
  }
601
600
  /**
602
601
  * The GPU video upscaler's state as `video.upscaling.state` and
603
- * `video.upscaling.set` answer it (player 0.5.16; the monitoring fields
604
- * from player 0.5.25, which also sends it without `enabled` as the event
602
+ * `video.upscaling.set` answer it (also sent without `enabled` as the event
605
603
  * `video.upscaling.changed`): what `UpscalingState` is made from.
606
604
  *
607
605
  * @remarks
@@ -648,13 +646,13 @@ export interface WireUpscalingState {
648
646
  inChain?: boolean;
649
647
  }
650
648
  /**
651
- * Template arguments on the wire (`osd.show`, `osd.panel`, `dialogs.confirm`,
652
- * a text's `args`): data, or text values (player 0.4.3).
649
+ * Template arguments on the wire (`osd.show`, `osd.panel`, `dialogs.confirm`, a
650
+ * text's `args`): data, or text values.
653
651
  */
654
652
  export type TemplateArgsJson = ArgJson[] | {
655
653
  [name: string]: ArgJson;
656
654
  };
657
- /** A text the player shows: source text, or a text value (player 0.4.3). */
655
+ /** A text the player shows: source text, or a text value. */
658
656
  export type TextValueJson = string | TextJson | ListJson;
659
657
  export interface Transport {
660
658
  request<T>(method: string, params?: Json): Promise<T>;
@@ -668,9 +666,8 @@ export interface Transport {
668
666
  locale?: string;
669
667
  }
670
668
  /**
671
- * The events a plugin subscribes to (`events.subscribe`). The plugin API
672
- * names the same list `HostEvent` (`plugin.player.on`, SDK 1.7.0); a test
673
- * keeps the two equal.
669
+ * The events a plugin subscribes to (`events.subscribe`). The plugin API names
670
+ * the same list `HostEvent` (`plugin.player.on`); a test keeps the two equal.
674
671
  */
675
672
  export type HostEvent = "source.state" | "playback.backend" | "window.state" | "packages.changed" | "bindings.changed" | "commands.keys" | "timeline.changed" | "appearance.changed" | "resolvers.fileTypes" | "video.upscaling.changed";
676
673
  export declare function createWire(transport: Transport): {
@@ -698,7 +695,7 @@ export declare function createWire(transport: Transport): {
698
695
  cancelled: boolean;
699
696
  paths: string[];
700
697
  }>;
701
- /** Message and detail are templates formatted with `args` (player 0.4.3). */
698
+ /** Message and detail are templates formatted with `args`. */
702
699
  confirm: (options: {
703
700
  [key: string]: Json;
704
701
  }) => Promise<{
@@ -744,7 +741,7 @@ export declare function createWire(transport: Transport): {
744
741
  /** The palette (`ui.theme` to change it). */
745
742
  appearance: {
746
743
  set: (theme: string) => Promise<void>;
747
- /** The interface language for the next start (player 0.4.3). */
744
+ /** The interface language for the next start. */
748
745
  setLanguage: (language: string) => Promise<void>;
749
746
  };
750
747
  /** Settings pages in the player's options window (`ui.settings`). */
@@ -787,13 +784,13 @@ export declare function createWire(transport: Transport): {
787
784
  }>;
788
785
  renderRelease: () => Promise<void>;
789
786
  /**
790
- * One shader channel handle's list (`plugin.video.shaders(id)`, player
791
- * 0.5.20); `[]` removes it.
787
+ * One shader channel handle's list (`plugin.video.shaders(id)`); `[]`
788
+ * removes it.
792
789
  */
793
790
  shadersSet: (id: string, paths: string[]) => Promise<{
794
791
  state: "applied" | "waiting";
795
792
  }>;
796
- /** The GPU's video upscaler (`plugin.video.upscaling`, player 0.5.16). */
793
+ /** The GPU's video upscaler (`plugin.video.upscaling`). */
797
794
  upscalingState: () => Promise<WireUpscalingState>;
798
795
  upscalingSet: (enabled: boolean) => Promise<WireUpscalingState>;
799
796
  };
@@ -807,7 +804,7 @@ export declare function createWire(transport: Transport): {
807
804
  }[], sourceId?: number) => Promise<{
808
805
  applied: boolean;
809
806
  }>;
810
- /** Player 0.7.6. */
807
+ /** Replace this layer's ranges. */
811
808
  setRanges: (ranges: {
812
809
  start: number;
813
810
  end: number;
@@ -868,8 +865,8 @@ export declare function createWire(transport: Transport): {
868
865
  delete: (name: string) => Promise<void>;
869
866
  };
870
867
  /**
871
- * JSON values the player keeps per plugin until it quits (SDK 1.5.25,
872
- * player 0.5.5). `get` answers `{}` for a missing key.
868
+ * JSON values the player keeps per plugin until it quits. `get` answers
869
+ * `{}` for a missing key.
873
870
  */
874
871
  storageSession: {
875
872
  get: (key: string) => Promise<{
@@ -883,8 +880,8 @@ export declare function createWire(transport: Transport): {
883
880
  system: () => Promise<WireSystemInfo>;
884
881
  };
885
882
  /**
886
- * The rendering choice (player 0.5.13): `state` needs no capability,
887
- * `setPreference` and `restart` need `rendering.manage`.
883
+ * The rendering choice: `state` needs no capability, `setPreference` and
884
+ * `restart` need `rendering.manage`.
888
885
  */
889
886
  rendering: {
890
887
  state: () => Promise<WireRenderingState>;
@@ -902,7 +899,7 @@ export declare function createWire(transport: Transport): {
902
899
  } | null) => Promise<void>;
903
900
  step: (direction: "next" | "previous") => Promise<void>;
904
901
  };
905
- /** `text` is a template in the plugin's catalog, formatted with `args` (player 0.4.3). */
902
+ /** `text` is a template in the plugin's catalog, formatted with `args`. */
906
903
  osd: {
907
904
  show: (text: TextValueJson, args?: TemplateArgsJson, actions?: {
908
905
  title: TextValueJson;
@@ -914,12 +911,12 @@ export declare function createWire(transport: Transport): {
914
911
  state: () => Promise<{
915
912
  bottom: LayoutSlot | null;
916
913
  sidebar: LayoutSlot | null;
917
- /** Player 0.7.6 (absent from older players). */
914
+ /** The adjust column. */
918
915
  adjust?: LayoutSlot | null;
919
916
  backdrop?: LayoutBackdrop | null;
920
917
  }>;
921
918
  set: (options: {
922
- /** `"adjust"`: player 0.7.6 (older players refuse it with `invalid`). */
919
+ /** The panel's position. */
923
920
  slot: "bottom" | "sidebar" | "adjust";
924
921
  visible?: boolean;
925
922
  detached?: boolean;
@@ -927,35 +924,32 @@ export declare function createWire(transport: Transport): {
927
924
  active?: string;
928
925
  /**
929
926
  * With `visible: true`: `false` switches the position on without
930
- * popping a column out in fullscreen (`toggle()`, SDK 1.6.13; player
931
- * 0.7.6). Absent: reveal, as `show()` and `setVisible` do. Older
932
- * players ignore it.
927
+ * popping a column out in fullscreen (`toggle()`). Absent: reveal, as
928
+ * `show()` and `setVisible` do.
933
929
  */
934
930
  reveal?: boolean;
935
931
  }) => Promise<void>;
936
932
  };
937
933
  events: {
938
934
  /**
939
- * One `events.subscribe` per name however many listeners. `mirror`:
940
- * only the SDK keeps a copy of the state (player 0.5.18; older
941
- * players ignore it); `listen` changes it.
935
+ * One `events.subscribe` per name however many listeners. `mirror`: only
936
+ * the SDK keeps a copy of the state; `listen` changes it.
942
937
  */
943
938
  subscribe(event: HostEvent, listener: (data: unknown) => void, mirror?: boolean, why?: string[]): Promise<() => Promise<void>>;
944
939
  /**
945
940
  * Tell the player whether a subscribed event has a real listener
946
941
  * (`active`) or only the SDK's copy of the state: `events.subscribe`
947
- * again, which replaces the mark (player 0.5.18; older players keep
948
- * one subscription per name and ignore the mark).
942
+ * again, which replaces the mark.
949
943
  */
950
944
  listen: (event: HostEvent, active: boolean, why?: string[]) => Promise<void>;
951
945
  };
952
946
  ui: {
953
- /** Player 0.2.0: the remote images a Markdown document shows. */
947
+ /** The remote images a Markdown document shows. */
954
948
  markdownScan: (text: string, base: string | null) => Promise<{
955
949
  images: string[];
956
950
  }>;
957
951
  mount: (options: {
958
- /** `"adjust"`: player 0.7.6 (older players refuse it with `invalid`). */
952
+ /** The panel's position. */
959
953
  slot: "bottom" | "sidebar" | "backdrop" | "adjust";
960
954
  file: string;
961
955
  component: string;
@@ -983,13 +977,12 @@ export declare function createWire(transport: Transport): {
983
977
  /** Executes trusted package code. Validation checks production JS and Slint. */
984
978
  packages: {
985
979
  validate: (directory: string, apiVersion?: string) => Promise<PackageValidation>;
986
- /** Player 0.2.0: a `.vxp` file. */
980
+ /** A `.vxp` file. */
987
981
  validateArchive: (file: string) => Promise<PackageValidation>;
988
982
  installed: (id: string) => Promise<InstalledPackage>;
989
983
  /**
990
- * `source` and `replace` are sent only when given (player 0.2.0);
991
- * `enabled` only when given (player 0.6.4; older players
992
- * ignore it).
984
+ * `source` and `replace` are sent only when given; `enabled` only when
985
+ * given.
993
986
  */
994
987
  install: (token: string, expectedRevision: number, requestId: string, options?: {
995
988
  source?: WireSource;
package/dist/wire.js CHANGED
@@ -88,7 +88,7 @@ export function createWire(transport) {
88
88
  commands: commandClient(transport),
89
89
  dialogs: {
90
90
  open: (options) => transport.request("dialogs.open", options),
91
- /** Message and detail are templates formatted with `args` (player 0.4.3). */
91
+ /** Message and detail are templates formatted with `args`. */
92
92
  confirm: (options) => transport.request("dialogs.confirm", options),
93
93
  },
94
94
  /** The main window: its state, size, level, pointer hiding and picture-in-picture. */
@@ -119,7 +119,7 @@ export function createWire(transport) {
119
119
  /** The palette (`ui.theme` to change it). */
120
120
  appearance: {
121
121
  set: (theme) => transport.request("appearance.set", { theme }),
122
- /** The interface language for the next start (player 0.4.3). */
122
+ /** The interface language for the next start. */
123
123
  setLanguage: (language) => transport.request("appearance.setLanguage", { language }),
124
124
  },
125
125
  /** Settings pages in the player's options window (`ui.settings`). */
@@ -139,11 +139,11 @@ export function createWire(transport) {
139
139
  renderSet: (values) => transport.request("video.render.set", { values }),
140
140
  renderRelease: () => transport.request("video.render.release"),
141
141
  /**
142
- * One shader channel handle's list (`plugin.video.shaders(id)`, player
143
- * 0.5.20); `[]` removes it.
142
+ * One shader channel handle's list (`plugin.video.shaders(id)`); `[]`
143
+ * removes it.
144
144
  */
145
145
  shadersSet: (id, paths) => transport.request("video.shaders.set", { id, paths }),
146
- /** The GPU's video upscaler (`plugin.video.upscaling`, player 0.5.16). */
146
+ /** The GPU's video upscaler (`plugin.video.upscaling`). */
147
147
  upscalingState: () => transport.request("video.upscaling.state"),
148
148
  upscalingSet: (enabled) => transport.request("video.upscaling.set", {
149
149
  enabled,
@@ -156,7 +156,7 @@ export function createWire(transport) {
156
156
  marks,
157
157
  ...(sourceId === undefined ? {} : { sourceId }),
158
158
  }),
159
- /** Player 0.7.6. */
159
+ /** Replace this layer's ranges. */
160
160
  setRanges: (ranges, sourceId) => transport.request("timeline.setRanges", {
161
161
  ranges,
162
162
  ...(sourceId === undefined ? {} : { sourceId }),
@@ -217,8 +217,8 @@ export function createWire(transport) {
217
217
  delete: (name) => transport.request("secrets.delete", { name }),
218
218
  },
219
219
  /**
220
- * JSON values the player keeps per plugin until it quits (SDK 1.5.25,
221
- * player 0.5.5). `get` answers `{}` for a missing key.
220
+ * JSON values the player keeps per plugin until it quits. `get` answers
221
+ * `{}` for a missing key.
222
222
  */
223
223
  storageSession: {
224
224
  get: (key) => transport.request("storage.session.get", { key }),
@@ -230,8 +230,8 @@ export function createWire(transport) {
230
230
  system: () => transport.request("app.system"),
231
231
  },
232
232
  /**
233
- * The rendering choice (player 0.5.13): `state` needs no capability,
234
- * `setPreference` and `restart` need `rendering.manage`.
233
+ * The rendering choice: `state` needs no capability, `setPreference` and
234
+ * `restart` need `rendering.manage`.
235
235
  */
236
236
  rendering: {
237
237
  state: () => transport.request("rendering.state"),
@@ -248,12 +248,12 @@ export function createWire(transport) {
248
248
  set: (flags) => transport.request("sequence.set", { flags }),
249
249
  step: (direction) => transport.request("sequence.step", { direction }),
250
250
  },
251
- /** `text` is a template in the plugin's catalog, formatted with `args` (player 0.4.3). */
251
+ /** `text` is a template in the plugin's catalog, formatted with `args`. */
252
252
  osd: {
253
253
  show: (text, args, actions) => transport.request("osd.show", {
254
254
  text,
255
255
  ...(args === undefined ? {} : { args }),
256
- // Player 0.7.6; older players ignore it.
256
+ // Sent only when given.
257
257
  ...(actions === undefined ? {} : { actions }),
258
258
  }),
259
259
  panel: (text, args, maxColumns) => transport.request("osd.panel", {
@@ -268,12 +268,11 @@ export function createWire(transport) {
268
268
  },
269
269
  events: {
270
270
  /**
271
- * One `events.subscribe` per name however many listeners. `mirror`:
272
- * only the SDK keeps a copy of the state (player 0.5.18; older
273
- * players ignore it); `listen` changes it.
271
+ * One `events.subscribe` per name however many listeners. `mirror`: only
272
+ * the SDK keeps a copy of the state; `listen` changes it.
274
273
  */
275
274
  async subscribe(event, listener, mirror = false,
276
- /** What listens (player 0.5.21 logs it; older players ignore it). */
275
+ /** What listens (the player logs it). */
277
276
  why) {
278
277
  const off = transport.on(event, listener);
279
278
  let subscription = subscriptions.get(event);
@@ -312,8 +311,7 @@ export function createWire(transport) {
312
311
  /**
313
312
  * Tell the player whether a subscribed event has a real listener
314
313
  * (`active`) or only the SDK's copy of the state: `events.subscribe`
315
- * again, which replaces the mark (player 0.5.18; older players keep
316
- * one subscription per name and ignore the mark).
314
+ * again, which replaces the mark.
317
315
  */
318
316
  listen: (event, active, why) => transport.request("events.subscribe", active
319
317
  ? why?.length
@@ -322,14 +320,13 @@ export function createWire(transport) {
322
320
  : { event, mirror: true }),
323
321
  },
324
322
  ui: {
325
- /** Player 0.2.0: the remote images a Markdown document shows. */
323
+ /** The remote images a Markdown document shows. */
326
324
  markdownScan: (text, base) => transport.request("ui.markdownScan", {
327
325
  text,
328
326
  base,
329
327
  }),
330
328
  mount: (options) => transport.request("ui.mount", options),
331
- // `slot`: which of the plugin's panels (player 0.7.6: one per slot;
332
- // older players have one and ignore it).
329
+ // `slot`: which of the plugin's panels (one per slot).
333
330
  setMount: (property, write, slot) => transport.request("ui.setMount", {
334
331
  property,
335
332
  ...write,
@@ -357,15 +354,14 @@ export function createWire(transport) {
357
354
  directory,
358
355
  apiVersion,
359
356
  }),
360
- /** Player 0.2.0: a `.vxp` file. */
357
+ /** A `.vxp` file. */
361
358
  validateArchive: (file) => transport.request("packages.validateArchive", {
362
359
  file,
363
360
  }),
364
361
  installed: (id) => transport.request("packages.installed", { id }),
365
362
  /**
366
- * `source` and `replace` are sent only when given (player 0.2.0);
367
- * `enabled` only when given (player 0.6.4; older players
368
- * ignore it).
363
+ * `source` and `replace` are sent only when given; `enabled` only when
364
+ * given.
369
365
  */
370
366
  install: (token, expectedRevision, requestId, options = {}) => transport.request("packages.install", {
371
367
  token,
package/llms.txt CHANGED
@@ -1,30 +1,27 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.7.1: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
3
+ > @vestra-player/sdk 1.7.3: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
4
4
 
5
5
  ## Read the documentation
6
6
 
7
7
  - **Command line** (any coding agent): `npx -p @vestra-player/sdk vestra-plugin docs [path] [--page N]` prints one node of the tree; `npx -p @vestra-player/sdk vestra-plugin docs --search <words>` lists the matching paths. In a project that depends on the SDK, `npx vestra-plugin docs` is enough.
8
8
  - **In a Node.js program**: `import { docs, searchDocs } from "@vestra-player/sdk/docs"`; `docs(path, { page })` and `searchDocs(query, { page })` return the same text.
9
- - **Paths**: `/` lists the top level; every answer lists the paths one level down with a one-line summary. `/API/<category>/<symbol>/<member>` is one declaration with its signature, parameters, return value, errors, capability, player version and examples, for example `/API/Media/Snapshot/dispose`. `/Guides/<group>/<page>` is a page of the site, for example `/Guides/How-to/Test a plugin` (the file name works too: `/Guides/How-to/testing`). Case, spaces and punctuation do not matter, the leading `/` is optional, `.` works like `/`, a name alone finds its declaration (`TestHost`, `Snapshot.export`, `plugin.player`), and `#heading` opens the page of a long answer that has that section.
9
+ - **Paths**: `/` lists the top level; every answer lists the paths one level down with a one-line summary. `/API/<category>/<symbol>/<member>` is one declaration with its signature, parameters, return value, errors, capability, player version and examples, for example `/API/Media/Snapshot/dispose`. `/Guides/<group>/<page>` is a page of the site, for example `/Guides/Guides/Test a plugin` (the file name works too: `/Guides/Guides/testing`). Case, spaces and punctuation do not matter, the leading `/` is optional, `.` works like `/`, a name alone finds its declaration (`TestHost`, `Snapshot.export`, `plugin.player`), and `#heading` opens the page of a long answer that has that section.
10
10
  - **Size**: every answer is at most 8 KB; a longer one ends with the number of its next page (`--page 2`).
11
- - **Before writing code**, read `/Guides/Tutorials/Getting started` and `/Guides/Guidelines`, then the API of what you use. Test with `/Guides/How-to/Test a plugin`.
11
+ - **Before writing code**, read `/Guides/Tutorial` and `/Guides/Guides/Design rules`, then the API of what you use. Test with `/Guides/Guides/Test a plugin`.
12
12
 
13
13
  ## Top level
14
14
 
15
15
  - `/Overview`: The package's README: what the SDK is, installing it and where to start.
16
- - `/Guides`: The documentation pages, by group: tutorials, how-to guides, reference, explanation, guidelines, examples, upgrading.
16
+ - `/Guides`: The documentation pages, by group: the tutorial, the guides, the reference and the examples.
17
17
  - `/API`: Every type and value of @vestra-player/sdk (the plugin API), @vestra-player/sdk/testing (the test host) and @vestra-player/sdk/docs (this tree), by category.
18
18
 
19
19
  ## Guides
20
20
 
21
- - `/Guides/Tutorials`: Step-by-step lessons; the first four build one plugin, from an empty folder to a tested package in the plugin store.
22
- - `/Guides/How-to`: Short guides that each answer one practical question about writing, translating, testing or publishing a plugin.
23
- - `/Guides/Reference`: Lookup tables that span many symbols (capabilities, manifest fields and player versions, limits, menu and binding names, platform differences, theme, command line), generated from the SDK's code.
24
- - `/Guides/Explanation`: What each part of the player and its plugins is, why it works the way it does and how the parts fit together.
25
- - `/Guides/Guidelines`: The rules a plugin follows so that its windows, panels, messages and menu items look and behave like the rest of Vestra Player.
21
+ - `/Guides/Tutorial`: Write a first plugin for Vestra Player: a menu item that shows the playback position, then the three styles a plugin can use, and how to test and publish it.
22
+ - `/Guides/Guides`: One page per task, from adding a window to publishing a plugin, plus the design rules and troubleshooting.
23
+ - `/Guides/Reference`: Lookup tables that span many symbols, from manifest fields and capabilities to the test host, mostly generated from the SDK's code.
26
24
  - `/Guides/Examples`: Complete, tested example plugins with a screenshot each and a step-by-step walkthrough of their code.
27
- - `/Guides/Upgrading`: What to change in a plugin when an SDK or player release deprecates, removes or changes something it uses.
28
25
 
29
26
  ## API
30
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "Plugin API types, test host and plugin CLI for Vestra Player (apiVersion vestra/1)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
- // Command buttons of the bottom bar (player 0.5.10, SDK 1.5.29): the buttons
1
+ // Command buttons of the bottom bar: the buttons
2
2
  // that plugins' commands contribute (`commands.add({ button })`) and the
3
- // player's own. Since SDK 1.6.8 (menu redesign step 3a) the player draws
3
+ // player's own. The player draws
4
4
  // the strip itself, at the right end of the bottom slot, its 40px cells on
5
5
  // the slot's bottom edge (a bar's 40px button row), and also when no plugin
6
6
  // mounts a bottom bar: `[plugin buttons…][»][Command Palette][Adjust]
@@ -19,16 +19,14 @@
19
19
  // menu, in the same order: the lowest order stays longest. `»` shows only
20
20
  // while something is in it; the player's own cells always show.
21
21
  //
22
- // `BarButtons` (below) is deprecated: the strip a bar placed itself before
23
- // SDK 1.6.8. While a bar still places it, the player draws no second strip.
22
+ // `BarButtons` (below) is deprecated: the strip a bar placed itself. While a bar still places it, the player draws no second strip.
24
23
  //
25
24
  // The cells look like the bar's own icon buttons: a 32×32 plate on hover
26
25
  // and press, the bar's tooltip (ToolTipArea). Every enabled cell draws its
27
26
  // icon in the accent (accent-press while pressed; icon-disabled when
28
27
  // disabled), so the strip reads as one group. A toggle that is on shows a
29
28
  // small dot in the icon's colour centred under the icon, like a running app
30
- // in the macOS Dock (player 0.5.22, SDK 1.5.41; before, icons were in the
31
- // text colour and only an on toggle in the accent). They are persistent
29
+ // in the macOS Dock. They are persistent
32
30
  // elements shown with `visible:`; nothing is created on hover or resize.
33
31
  import { Theme } from "theme.slint";
34
32
  import { Icon } from "icons.slint";
@@ -65,7 +63,7 @@ export global BarButtonsHost {
65
63
  in property <BarButtonItem> toggle;
66
64
  // The command palette (`host/palette`; `token` "" while there is none).
67
65
  in property <BarButtonItem> palette;
68
- // The adjust column's toggle (`host/adjust`, player 0.7.6; `token` ""
66
+ // The adjust column's toggle (`host/adjust`; `token` ""
69
67
  // while there is none).
70
68
  in property <BarButtonItem> adjust;
71
69
  // Set when a (deprecated) `BarButtons` exists in this window.
@@ -184,7 +182,7 @@ component Cell inherits Rectangle {
184
182
  }
185
183
  }
186
184
 
187
- // Deprecated (SDK 1.6.8; the player places its strip): the strip a bar
185
+ // Deprecated (the player places its strip): the strip a bar
188
186
  // placed at its right end with the width it could spare. A bar that still
189
187
  // places it shows this one instead of the player's (no palette cell, no
190
188
  // `»`): the cells that fit in `room`, lost from its outer (left) end
@@ -1,4 +1,4 @@
1
- // Keyboard focus between a panel and the video (SDK 1.7.0).
1
+ // Keyboard focus between a panel and the video.
2
2
  // import { VestraFocus } from "@vestra/focus.slint";
3
3
  //
4
4
  // The player's shortcuts (Space, the arrows, …) fire when the video has
@@ -55,10 +55,8 @@ export struct ToolTipKey {
55
55
  // closes when the pointer leaves, or presses on content that does not take
56
56
  // the press itself; it shows again on the next hover. It is Slint's
57
57
  // input-transparent tooltip: every press reaches the control under the
58
- // pointer, and the tip does not take the keyboard focus. (Up to SDK 1.5.20 the tip was a
59
- // PopupWindow, which swallowed the first press after it showed and took the
60
- // focus while it was open.)
61
- // With `keys` (SDK 1.6.6) the tip names the control's keys after its title,
58
+ // pointer, and the tip does not take the keyboard focus.
59
+ // With `keys` the tip names the control's keys after its title,
62
60
  // each as a key cap and what it does: "Brightness [W] − [E] +"; `detail`
63
61
  // follows dimmed ("· double-click: Default"). Changing `keys` or `detail`
64
62
  // changes the tip's text, never which elements exist while hovering.