@vestra-player/sdk 1.9.0 → 1.10.0

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 (48) hide show
  1. package/CHANGELOG.md +29 -7
  2. package/bin/vestra-plugin.mjs +89 -8
  3. package/capability-scan.json +18 -0
  4. package/dist/api-requests.d.ts +4 -3
  5. package/dist/api-requests.js +10 -3
  6. package/dist/condition-table.d.ts +1889 -0
  7. package/dist/condition-table.js +562 -0
  8. package/dist/docs-tree.json.gz +0 -0
  9. package/dist/i18n-tools.d.ts +7 -0
  10. package/dist/i18n-tools.js +66 -3
  11. package/dist/player-runtime.d.ts +3 -0
  12. package/dist/player-runtime.js +3 -0
  13. package/dist/plugin/connection.d.ts +12 -1
  14. package/dist/plugin/connection.js +58 -1
  15. package/dist/plugin/index.d.ts +7 -0
  16. package/dist/plugin/index.js +13 -0
  17. package/dist/plugin/mpv.js +39 -5
  18. package/dist/plugin/player/events.d.ts +14 -5
  19. package/dist/plugin/player/events.js +19 -3
  20. package/dist/plugin/player.d.ts +16 -0
  21. package/dist/plugin/player.js +77 -1
  22. package/dist/plugin/scope.d.ts +4 -1
  23. package/dist/plugin/scope.js +8 -0
  24. package/dist/plugin/testing/commands.js +18 -22
  25. package/dist/plugin/testing/index.d.ts +107 -0
  26. package/dist/plugin/testing/index.js +168 -21
  27. package/dist/plugin/testing/media.d.ts +6 -0
  28. package/dist/plugin/testing/media.js +15 -2
  29. package/dist/plugin/testing/source-events.d.ts +28 -0
  30. package/dist/plugin/testing/source-events.js +66 -0
  31. package/dist/plugin/testing/transport.js +5 -0
  32. package/dist/plugin/testing/triggers.d.ts +82 -0
  33. package/dist/plugin/testing/triggers.js +448 -0
  34. package/dist/plugin/timeline.d.ts +3 -3
  35. package/dist/plugin/timeline.js +3 -3
  36. package/dist/plugin/triggers.d.ts +55 -0
  37. package/dist/plugin/triggers.js +233 -0
  38. package/dist/plugin/types/base.d.ts +37 -1
  39. package/dist/plugin/types/commands.d.ts +374 -1
  40. package/dist/plugin/types/playback.d.ts +257 -9
  41. package/dist/plugin/when.d.ts +78 -4
  42. package/dist/plugin/when.js +182 -14
  43. package/dist/slint-version.d.ts +7 -0
  44. package/dist/slint-version.js +7 -0
  45. package/dist/wire.d.ts +15 -0
  46. package/dist/wire.js +11 -0
  47. package/llms.txt +4 -4
  48. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The Slint version the player links (its `Cargo.toml` pins `=1.18.1`): the
3
+ * compiler that `vestra-plugin check` asks of an installed `slint-ui` package,
4
+ * and `TestHost`'s `app.components.slint`. Changes with a player that
5
+ * upgrades Slint.
6
+ */
7
+ export const PLAYER_SLINT = "1.18.1";
package/dist/wire.d.ts CHANGED
@@ -931,6 +931,21 @@ export declare function createWire(transport: Transport): {
931
931
  observeProperty: (name: string) => Promise<void>;
932
932
  unobserveProperty: (name: string) => Promise<void>;
933
933
  };
934
+ /**
935
+ * Trigger conditions (1.10.0, `plugin.trigger`): `set` hands one over
936
+ * (or replaces it), `off` removes it, `declare` names what `activate()`
937
+ * declared. Each `set` and `off` answers the condition's sequence
938
+ * number; the flips arrive as `triggers.fired` events.
939
+ */
940
+ triggers: {
941
+ set: (trigger: number | string, when: Json) => Promise<{
942
+ seq: number;
943
+ }>;
944
+ off: (trigger: number | string, unhandled?: boolean) => Promise<{
945
+ seq: number;
946
+ }>;
947
+ declare: (names: string[], unnamed: number) => Promise<null>;
948
+ };
934
949
  /** The system's secret store, per plugin (`secrets`). */
935
950
  secrets: {
936
951
  get: (name: string) => Promise<string | null>;
package/dist/wire.js CHANGED
@@ -232,6 +232,17 @@ export function createWire(transport) {
232
232
  observeProperty: (name) => transport.request("mpv.observe", { name }),
233
233
  unobserveProperty: (name) => transport.request("mpv.unobserve", { name }),
234
234
  },
235
+ /**
236
+ * Trigger conditions (1.10.0, `plugin.trigger`): `set` hands one over
237
+ * (or replaces it), `off` removes it, `declare` names what `activate()`
238
+ * declared. Each `set` and `off` answers the condition's sequence
239
+ * number; the flips arrive as `triggers.fired` events.
240
+ */
241
+ triggers: {
242
+ set: (trigger, when) => transport.request("triggers.set", { trigger, when }),
243
+ off: (trigger, unhandled = false) => transport.request("triggers.off", unhandled ? { trigger, unhandled } : { trigger }),
244
+ declare: (names, unnamed) => transport.request("triggers.declare", { names, unnamed }),
245
+ },
235
246
  /** The system's secret store, per plugin (`secrets`). */
236
247
  secrets: {
237
248
  get: (name) => transport.request("secrets.get", { name }),
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.9.0: 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.10.0: 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
 
@@ -25,15 +25,15 @@
25
25
 
26
26
  ## API
27
27
 
28
- - `/API/Commands`: 23 entries: CommandState, Bindable, Condition, When, MenuId, BarButtonIcon, CommandButton, CommandOptions, Command, Commands, CommandRunOptions, CommandRunResult, CommandList, CommandInfo, Palette,…
28
+ - `/API/Commands`: 26 entries: CommandState, Bindable, Condition, When, PositionRange, TriggerEvent, Trigger, MenuId, BarButtonIcon, CommandButton, CommandOptions, Command, Commands, CommandRunOptions,…
29
29
  - `/API/Media`: 12 entries: CaptureOptions, Snapshot, ExportOptions, ExportEncoding, JobState, ExportJob, MediaCapture, SourceReference, MediaSources, ExportPart, PartsExportOptions, ExportCheck
30
30
  - `/API/Packages`: 10 entries: PackageManifest, PackageSource, InstallOptions, PackageCandidate, PackageChangeStatus, PackageChange, PluginInfo, PluginDisplay, PluginWarning, Packages
31
- - `/API/Playback`: 36 entries: CommandKeys, MarkKind, TimelineMark, RangeStyle, TimelineRange, TimelineLayer, Timeline, AudioTrack, PlayerState, AudioDevice, Chapter, Conditional, Media, Scrub, StreamFrame,…
31
+ - `/API/Playback`: 39 entries: CommandKeys, MarkKind, TimelineMark, RangeStyle, TimelineRange, TimelineLayer, Timeline, AudioTrack, PlayerState, AudioDevice, Chapter, Conditional, Media, Scrub, StreamFrame,…
32
32
  - `/API/Plugin`: 21 entries: Disposable, PluginError, Scope, Plugin, StopReason, DisposeInfo, WindowState, MainWindow, AppInfo, App, SystemInfo, DisplayInfo, Wire, WireView, WireCommands, WireCommandOptions,…
33
33
  - `/API/Processing`: 24 entries: FilterStatus, VideoFilter, AudioFilter, ViewSettings, VideoView, RenderSettings, RenderOptions, VideoShaders, UpscalingReasonCode, UpscalingReason, UpscalingDecodingCause,…
34
34
  - `/API/Services`: 15 entries: Clipboard, Power, ToolResult, Tools, JsonStore, Storage, SessionStorage, System, Secrets, RenderingMode, RenderingPreference, RenderingReasonCode, RenderingReason, RenderingState,…
35
35
  - `/API/Sources`: 7 entries: ResolverOptions, WebResolverOptions, FileResolverOptions, ResolvedStream, Resolver, Resolvers, ResolvedMedia
36
36
  - `/API/Subtitles`: 5 entries: SubtitleTrack, SubtitlesState, SubtitleConditional, Subtitles, SubtitleStyle
37
37
  - `/API/UI`: 44 entries: ImageRef, ImageOptions, MarkdownRef, MarkdownOptions, PropValue, PropData, Props, Ui, View, Window, Windows, SlotState, SlotPanel, PanelState, PanelSlot, SidebarSlot, Panel,…
38
- - `/API/Testing`: 32 entries: COMMAND_LIMITS, MENU_IDS, BAR_BUTTON_ICONS, BAR_BUTTON_LIMITS, BuiltinSubmenu, BUILTIN_SUBMENUS, BuiltinCommand, BUILTIN_COMMANDS, LOCALES, LIST_SEPARATORS, TEXT_LIMITS, THEME_PALETTES,…
38
+ - `/API/Testing`: 34 entries: COMMAND_LIMITS, MENU_IDS, BAR_BUTTON_ICONS, BAR_BUTTON_LIMITS, BuiltinSubmenu, BUILTIN_SUBMENUS, BuiltinCommand, BUILTIN_COMMANDS, LOCALES, LIST_SEPARATORS, TEXT_LIMITS, THEME_PALETTES,…
39
39
  - `/API/Docs`: 4 entries: DOCS_PAGE_BYTES, DocsOptions, docs, searchDocs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
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": {