@vestra-player/sdk 1.6.21 → 1.7.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 (59) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/bin/vestra-plugin.mjs +34 -12
  3. package/dist/api-requests.d.ts +22 -0
  4. package/dist/api-requests.js +38 -0
  5. package/dist/capability-check.d.ts +48 -0
  6. package/dist/capability-check.js +219 -51
  7. package/dist/capability-rules.d.ts +21 -0
  8. package/dist/capability-rules.js +32 -1
  9. package/dist/commands.d.ts +9 -1
  10. package/dist/commands.js +8 -8
  11. package/dist/docs-tree.json.gz +0 -0
  12. package/dist/plugin/commands.js +43 -13
  13. package/dist/plugin/connection.d.ts +37 -0
  14. package/dist/plugin/connection.js +34 -0
  15. package/dist/plugin/index.js +12 -2
  16. package/dist/plugin/media.js +3 -1
  17. package/dist/plugin/packages.js +3 -1
  18. package/dist/plugin/passes.d.ts +38 -1
  19. package/dist/plugin/passes.js +89 -5
  20. package/dist/plugin/player/events.d.ts +9 -0
  21. package/dist/plugin/player/events.js +43 -0
  22. package/dist/plugin/player/rules.d.ts +7 -0
  23. package/dist/plugin/player/rules.js +11 -0
  24. package/dist/plugin/player.d.ts +37 -4
  25. package/dist/plugin/player.js +85 -12
  26. package/dist/plugin/resolvers.js +2 -3
  27. package/dist/plugin/runtime.d.ts +2 -3
  28. package/dist/plugin/runtime.js +8 -2
  29. package/dist/plugin/scope.d.ts +9 -0
  30. package/dist/plugin/scope.js +24 -0
  31. package/dist/plugin/services.js +4 -5
  32. package/dist/plugin/state.d.ts +3 -0
  33. package/dist/plugin/state.js +81 -0
  34. package/dist/plugin/stream.d.ts +27 -3
  35. package/dist/plugin/testing/commands.js +3 -3
  36. package/dist/plugin/testing/core-actions.js +1 -1
  37. package/dist/plugin/testing/services.js +1 -1
  38. package/dist/plugin/types/base.d.ts +78 -2
  39. package/dist/plugin/types/commands.d.ts +17 -1
  40. package/dist/plugin/types/playback.d.ts +156 -1
  41. package/dist/plugin/types/plugin-wire.d.ts +589 -0
  42. package/dist/plugin/types/plugin-wire.js +1 -0
  43. package/dist/plugin/types/ui-content.d.ts +23 -4
  44. package/dist/plugin/types/ui-layout.d.ts +1 -1
  45. package/dist/plugin/types/ui-shell.d.ts +4 -3
  46. package/dist/plugin/types.d.ts +4 -2
  47. package/dist/plugin/view/base.d.ts +10 -3
  48. package/dist/plugin/view/base.js +30 -6
  49. package/dist/plugin/view/binder.js +8 -1
  50. package/dist/plugin/view/writer.d.ts +49 -4
  51. package/dist/plugin/view/writer.js +383 -17
  52. package/dist/plugin/wire-facade.d.ts +4 -0
  53. package/dist/plugin/wire-facade.js +190 -0
  54. package/dist/ts-plugin.d.ts +3 -0
  55. package/dist/ts-plugin.js +18 -6
  56. package/dist/wire.d.ts +233 -20
  57. package/llms.txt +3 -3
  58. package/package.json +1 -1
  59. package/slint/vestra/focus.slint +33 -0
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.6.21: 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.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
 
@@ -31,8 +31,8 @@
31
31
  - `/API/Commands`: 15 entries: CommandState, Bindable, Condition, When, MenuId, BarButtonIcon, CommandButton, CommandOptions, Command, Commands, HostAction, Host, BindingRef, BindingInfo, Bindings
32
32
  - `/API/Media`: 7 entries: CaptureOptions, Snapshot, ExportOptions, ExportEncoding, JobState, ExportJob, MediaCapture
33
33
  - `/API/Packages`: 10 entries: PackageManifest, PackageSource, InstallOptions, PackageCandidate, PackageChangeStatus, PackageChange, PluginInfo, PluginDisplay, PluginWarning, Packages
34
- - `/API/Playback`: 20 entries: MarkKind, TimelineMark, RangeStyle, TimelineRange, TimelineLayer, Timeline, AudioTrack, PlayerState, AudioDevice, Chapter, Conditional, Media, Scrub, StreamFrame, StreamOptions,…
35
- - `/API/Plugin`: 13 entries: Disposable, PluginError, Scope, Plugin, StopReason, DisposeInfo, WindowState, MainWindow, AppInfo, App, SystemInfo, DisplayInfo, Json
34
+ - `/API/Playback`: 33 entries: CommandKeys, MarkKind, TimelineMark, RangeStyle, TimelineRange, TimelineLayer, Timeline, AudioTrack, PlayerState, AudioDevice, Chapter, Conditional, Media, Scrub, StreamFrame,…
35
+ - `/API/Plugin`: 21 entries: Disposable, PluginError, Scope, Plugin, StopReason, DisposeInfo, WindowState, MainWindow, AppInfo, App, SystemInfo, DisplayInfo, Wire, WireView, WireCommands, WireCommandOptions,…
36
36
  - `/API/Processing`: 18 entries: FilterStatus, VideoFilter, AudioFilter, ViewSettings, VideoView, RenderSettings, RenderOptions, VideoShaders, UpscalingReasonCode, UpscalingReason, UpscalingDecodingCause,…
37
37
  - `/API/Services`: 15 entries: Clipboard, Power, ToolResult, Tools, JsonStore, Storage, SessionStorage, System, Secrets, RenderingMode, RenderingPreference, RenderingReasonCode, RenderingReason, RenderingState,…
38
38
  - `/API/Sources`: 7 entries: ResolverOptions, WebResolverOptions, FileResolverOptions, ResolvedStream, Resolver, Resolvers, ResolvedMedia
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.6.21",
3
+ "version": "1.7.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": {
@@ -0,0 +1,33 @@
1
+ // Keyboard focus between a panel and the video (SDK 1.7.0).
2
+ // import { VestraFocus } from "@vestra/focus.slint";
3
+ //
4
+ // The player's shortcuts (Space, the arrows, …) fire when the video has
5
+ // the keyboard focus, or when a key bubbles up unaccepted from a panel. A
6
+ // panel that takes the focus itself (a list with keyboard navigation, a
7
+ // text field) keeps the keys it accepts until the focus moves elsewhere.
8
+ // `VestraFocus.release()` gives it back to the video, as desktop players
9
+ // do after a list item is played: call it after the user played or opened
10
+ // an item from the keyboard or by double click (Enter, a double click), or
11
+ // on Esc in the list, so the arrows control the player again:
12
+ // key-pressed(event) => {
13
+ // if event.text == Key.Return { Bridge.play(root.current); VestraFocus.release(); return accept; }
14
+ // if event.text == Key.Escape { VestraFocus.release(); return accept; }
15
+ // ...
16
+ // }
17
+ //
18
+ // It acts at once, inside the handler: the video area takes the focus in
19
+ // the main window (from the sidebar, the adjust column, the bottom bar or
20
+ // their fullscreen overlays); in the detached sidebar window, which has no
21
+ // video, the window's own key scope takes it, so unaccepted keys reach the
22
+ // player's shortcuts there. Elsewhere (the Options window, tool windows) it
23
+ // does nothing.
24
+ //
25
+ // A click on an empty part of a panel (one that none of its controls
26
+ // takes) gives the panel the focus, so its `focus: "panel"` key bindings
27
+ // apply; a click on a button or a row's TouchArea leaves the focus where
28
+ // it was. A panel that wants a click on its empty parts to leave the focus
29
+ // with the video puts a `TouchArea {}` under its content to take them.
30
+ export global VestraFocus {
31
+ // Give the keyboard focus back to the video. Filled by the player.
32
+ callback release();
33
+ }