@vestra-player/sdk 1.5.40 → 1.5.41
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.
- package/CHANGELOG.md +7 -0
- package/dist/plugin/testing.d.ts +1 -1
- package/dist/plugin/types.d.ts +3 -3
- package/llms-full.txt +6 -6
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/slint/vestra/bar-buttons.slint +23 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.41
|
|
4
|
+
|
|
5
|
+
**Who must change: nobody.** No API changes, `apiVersion` stays `vestra/1`, no player version needed. Only how the player draws the bottom bar's strip of command buttons changes (player 0.5.22); a plugin's declarations and a bar that places `BarButtons` stay as they are.
|
|
6
|
+
|
|
7
|
+
- **`@vestra/bar-buttons.slint`** (the read-only copy of the player's widget library): every enabled button of the strip draws its icon in the accent colour (`Theme.accent`, `Theme.accent-press` while pressed; `Theme.icon-disabled` when disabled), plugin images (`plugin.ui.image`) included. Before, icons were in the text colour and only a checked toggle in the accent. A checked command (`checked: true`, the sidebar toggle while the sidebar is on) now shows a 4px dot in the icon's colour centred under the icon, as the macOS Dock marks a running app; the accessibility checked state is unchanged.
|
|
8
|
+
- _Commands_ (reference), `CommandOptions.button` and `TestHost.barButtons[].checked` describe the new look.
|
|
9
|
+
|
|
3
10
|
## 1.5.40
|
|
4
11
|
|
|
5
12
|
**Who must change: nobody.** Additions only, `apiVersion` stays `vestra/1`. `plugin.when` needs player 0.5.21 (`"minPlayerVersion": "0.5.21"`); older players have no `plugin.when`. A plugin that does not use it sees no difference. What changes with the player's lazy activation (off by default; `VESTRA_LAZY=1`): a listener of `packages.changed`, `bindings.changed`, `appearance.changed` or `resolvers.fileTypes` no longer keeps a plugin running; the player stops it while idle and starts it again to deliver the event. `bindings.changed` (`plugin.bindings.onChange`) now fires only when the binding list changes, no longer when a plugin starts again with the same commands; nobody must change (the event carries no data, and the list is what it stands for).
|
package/dist/plugin/testing.d.ts
CHANGED
|
@@ -370,7 +370,7 @@ export interface FakeBarButton {
|
|
|
370
370
|
readonly order: number;
|
|
371
371
|
/** Clickable: the command is enabled and not busy. */
|
|
372
372
|
readonly enabled: boolean;
|
|
373
|
-
/**
|
|
373
|
+
/** Shown with the on dot under its icon: the command is checked. */
|
|
374
374
|
readonly checked: boolean;
|
|
375
375
|
/**
|
|
376
376
|
* The tooltip without the key: the command's shown title (trailing "…"
|
package/dist/plugin/types.d.ts
CHANGED
|
@@ -838,9 +838,9 @@ export type BarButtonIcon = "play" | "pause" | "stop" | "back" | "forward" | "op
|
|
|
838
838
|
* "…" removed) and its first key as the tooltip ("Plugin Store (F9)"),
|
|
839
839
|
* `enabled`, `busy` and `reason` as the menu item has them: a disabled or
|
|
840
840
|
* busy command's button is drawn disabled, its tooltip adds the reason, and
|
|
841
|
-
* a click runs nothing.
|
|
842
|
-
*
|
|
843
|
-
* click on its menu item.
|
|
841
|
+
* a click runs nothing. Every button's icon is drawn in the accent colour;
|
|
842
|
+
* a command with `checked` shows a small dot under its icon while checked.
|
|
843
|
+
* A click runs the command exactly like a click on its menu item.
|
|
844
844
|
*
|
|
845
845
|
* **Limits.** One button per plugin and eight in the player
|
|
846
846
|
* (`BAR_BUTTON_LIMITS`): a button past them is left out (its command and
|
package/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @vestra-player/sdk 1.5.
|
|
1
|
+
# @vestra-player/sdk 1.5.41: full reference
|
|
2
2
|
|
|
3
3
|
> Everything needed to write a Vestra Player plugin (plugin API `vestra/1`): the guides, every public declaration of `@vestra-player/sdk` and `@vestra-player/sdk/testing` with its documentation, and the complete source of the example plugins. Generated from the SDK's sources by scripts/llms.mjs; the short index is llms.txt.
|
|
4
4
|
|
|
@@ -3330,7 +3330,7 @@ Every command the player (`host`) and its built-in plugins register when the pla
|
|
|
3330
3330
|
| `order` | Integer 0–999, left to right ascending; equal orders by plugin id, then declaration order. The built-in plugins use 100 (Vestra Player AI) and 200 (Plugin Store). |
|
|
3331
3331
|
| `path` | Required: a button without a menu path is `invalid`. |
|
|
3332
3332
|
|
|
3333
|
-
- **Shown**: the icon; the tooltip is the command's shown title without a trailing "…" and its first active key ("Plugin Store (F9)"), plus the reason on a second line while the command is disabled or busy. Disabled or busy: drawn disabled, a click runs nothing. `checked: true`: the icon in the accent colour. Accessibility: a button named by the title, with its enabled and checked state and a default action.
|
|
3333
|
+
- **Shown**: the icon; the tooltip is the command's shown title without a trailing "…" and its first active key ("Plugin Store (F9)"), plus the reason on a second line while the command is disabled or busy. The icon is drawn in the accent colour (player 0.5.22; the text colour before), darker while pressed. Disabled or busy: drawn disabled, a click runs nothing. `checked: true`: a small dot in the icon's colour under the icon (before player 0.5.22: the icon in the accent colour, the others in the text colour). Accessibility: a button named by the title, with its enabled and checked state and a default action.
|
|
3334
3334
|
- **Click**: runs the command exactly as a click on its menu item does.
|
|
3335
3335
|
- **Order and room**: left to right by `order`, the player's **Toggle Sidebar** rightmost; in a narrow window the strip loses cells from its outer (left) end inward: the lowest order goes first, the sidebar toggle last. `order` is position only: low is further left and goes first.
|
|
3336
3336
|
- **Limits** (Limits): one button per plugin (its first declared), eight in the player (the highest orders; the lowest go first, ties: the smaller plugin id, then the earlier declaration). A button past them is left out and logged with `limit`; the command and its menu entry stay.
|
|
@@ -4469,9 +4469,9 @@ Writing a bottom bar.
|
|
|
4469
4469
|
"…" removed) and its first key as the tooltip ("Plugin Store (F9)"),
|
|
4470
4470
|
`enabled`, `busy` and `reason` as the menu item has them: a disabled or
|
|
4471
4471
|
busy command's button is drawn disabled, its tooltip adds the reason, and
|
|
4472
|
-
a click runs nothing.
|
|
4473
|
-
|
|
4474
|
-
click on its menu item.
|
|
4472
|
+
a click runs nothing. Every button's icon is drawn in the accent colour;
|
|
4473
|
+
a command with `checked` shows a small dot under its icon while checked.
|
|
4474
|
+
A click runs the command exactly like a click on its menu item.
|
|
4475
4475
|
|
|
4476
4476
|
**Limits.** One button per plugin and eight in the player
|
|
4477
4477
|
(`BAR_BUTTON_LIMITS`): a button past them is left out (its command and
|
|
@@ -13068,7 +13068,7 @@ interface FakeBarButton {
|
|
|
13068
13068
|
readonly order: number;
|
|
13069
13069
|
/** Clickable: the command is enabled and not busy. */
|
|
13070
13070
|
readonly enabled: boolean;
|
|
13071
|
-
/**
|
|
13071
|
+
/** Shown with the on dot under its icon: the command is checked. */
|
|
13072
13072
|
readonly checked: boolean;
|
|
13073
13073
|
/** The tooltip without the key: the command's shown title (trailing "…" removed), then, while it cannot run, its reason on a second line. */
|
|
13074
13074
|
readonly tooltip: string;
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vestra Player SDK
|
|
2
2
|
|
|
3
|
-
> @vestra-player/sdk 1.5.
|
|
3
|
+
> @vestra-player/sdk 1.5.41: 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; it runs in its own Node.js process. Everything a plugin creates (commands, windows, panels, filters, listeners…) is a handle that is released automatically when the plugin stops. L<n>: a line of llms-full.txt (next to this file), which has every page, declaration and example.
|
|
4
4
|
|
|
5
5
|
**Rules**
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -12,9 +12,13 @@
|
|
|
12
12
|
// entries stay; the player logs which buttons are hidden).
|
|
13
13
|
//
|
|
14
14
|
// The cells look like the bar's own icon buttons: a 32×32 plate on hover
|
|
15
|
-
// and press, the
|
|
16
|
-
//
|
|
17
|
-
//
|
|
15
|
+
// and press, the bar's tooltip (ToolTipArea). Every enabled cell draws its
|
|
16
|
+
// icon in the accent (accent-press while pressed; icon-disabled when
|
|
17
|
+
// disabled), so the strip reads as one group. A toggle that is on shows a
|
|
18
|
+
// small dot in the icon's colour centred under the icon, like a running app
|
|
19
|
+
// in the macOS Dock (player 0.5.22, SDK 1.5.41; before, icons were in the
|
|
20
|
+
// text colour and only an on toggle in the accent). They are persistent
|
|
21
|
+
// elements shown with `visible:`; nothing is created on hover or resize.
|
|
18
22
|
import { Theme } from "theme.slint";
|
|
19
23
|
import { Icon } from "icons.slint";
|
|
20
24
|
import { ToolTipArea } from "widgets.slint";
|
|
@@ -32,7 +36,7 @@ export struct BarButtonItem {
|
|
|
32
36
|
// The tooltip: the title and its key, the reason it is unavailable.
|
|
33
37
|
tip: string,
|
|
34
38
|
enabled: bool,
|
|
35
|
-
// The command has a checked state; `checked`
|
|
39
|
+
// The command has a checked state; `checked` shows the dot under the icon.
|
|
36
40
|
checkable: bool,
|
|
37
41
|
checked: bool,
|
|
38
42
|
// At half opacity: on, but not shown for want of room (the sidebar).
|
|
@@ -58,8 +62,11 @@ component Cell inherits Rectangle {
|
|
|
58
62
|
in property <bool> shown;
|
|
59
63
|
private property <bool> live: root.shown && root.item.enabled;
|
|
60
64
|
private property <brush> tint: !root.item.enabled ? Theme.icon-disabled
|
|
61
|
-
:
|
|
62
|
-
|
|
65
|
+
: touch.pressed ? Theme.accent-press : Theme.accent;
|
|
66
|
+
// The on dot: its diameter and top edge, between the icon box (y 14–26)
|
|
67
|
+
// and the hover plate's lower edge (y 36).
|
|
68
|
+
private property <length> dot-size: 4px;
|
|
69
|
+
private property <length> dot-y: 29px;
|
|
63
70
|
width: 41px;
|
|
64
71
|
height: 40px;
|
|
65
72
|
visible: root.shown;
|
|
@@ -99,6 +106,16 @@ component Cell inherits Rectangle {
|
|
|
99
106
|
image-fit: contain;
|
|
100
107
|
colorize: root.tint;
|
|
101
108
|
}
|
|
109
|
+
// On (`checked`): the dot under the icon, in the icon's colour.
|
|
110
|
+
Rectangle {
|
|
111
|
+
visible: root.item.checked;
|
|
112
|
+
x: (root.width - 1px - self.width) / 2;
|
|
113
|
+
y: root.dot-y;
|
|
114
|
+
width: root.dot-size;
|
|
115
|
+
height: root.dot-size;
|
|
116
|
+
border-radius: self.width / 2;
|
|
117
|
+
background: root.tint;
|
|
118
|
+
}
|
|
102
119
|
ToolTipArea {
|
|
103
120
|
width: 100%;
|
|
104
121
|
height: 100%;
|