@vestra-player/sdk 1.7.20 → 1.8.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.
- package/CHANGELOG.md +32 -0
- package/bin/vestra-plugin.mjs +128 -0
- package/capability-scan.json +367 -0
- package/dist/api-requests.js +4 -0
- package/dist/capability-check.d.ts +43 -0
- package/dist/capability-check.js +90 -0
- package/dist/capability-scan.d.ts +95 -0
- package/dist/capability-scan.js +250 -0
- package/dist/commands.d.ts +35 -0
- package/dist/commands.js +42 -1
- package/dist/docs-tree.json.gz +0 -0
- package/dist/host-capabilities.js +15 -0
- package/dist/mpv.d.ts +139 -0
- package/dist/mpv.js +496 -0
- package/dist/player-runtime.d.ts +2 -1
- package/dist/player-runtime.js +2 -1
- package/dist/plugin/commands.js +5 -2
- package/dist/plugin/mpv.d.ts +3 -0
- package/dist/plugin/mpv.js +98 -0
- package/dist/plugin/scope.d.ts +1 -0
- package/dist/plugin/scope.js +2 -0
- package/dist/plugin/testing/commands.js +37 -9
- package/dist/plugin/testing/index.d.ts +51 -0
- package/dist/plugin/testing/index.js +55 -0
- package/dist/plugin/testing/mpv.d.ts +7 -0
- package/dist/plugin/testing/mpv.js +90 -0
- package/dist/plugin/types/base.d.ts +9 -2
- package/dist/plugin/types/commands.d.ts +34 -10
- package/dist/plugin/types/playback.d.ts +185 -0
- package/dist/wire.d.ts +15 -0
- package/dist/wire.js +11 -0
- package/llms.txt +2 -2
- package/package.json +4 -2
- package/slint/vestra/widgets.slint +12 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
**Who must change: nobody.** Pure additions and a product-data sync (user rulings 2026-11-13, plan A): the 31 existing capabilities, their members, what each needs and every existing behaviour of the SDK and of `TestHost` are as in 1.7.20; the existing tests and golden traces pass unchanged. A plugin that does nothing keeps working on every player. A plugin that uses an addition needs the player released with this SDK (`minPlayerVersion`); `apiVersion` stays `vestra/1`.
|
|
6
|
+
|
|
7
|
+
**mpv pass-through** (a new capability and member). `plugin.mpv` sends mpv's own commands and properties to the player's mpv. Intended users: a GPU vendor's motion-smoothing or upscaling plugin (a filter and its options, without a new player method per feature, as 1.7.19 needed), a shader or scaler pack that sets renderer options, a statistics panel that observes mpv's measurements.
|
|
8
|
+
|
|
9
|
+
- **Capability `mpv`** (new, the 32nd; **risky**: the store highlights it; not built-in only; residency `live`), shown as "Control the playback engine (mpv) directly: send its commands and change its options". It crosses a boundary (§1.6): what it sets is the user's player beyond the plugin's own contributions and stays after the plugin stops. It is the last row of the player's table; no existing capability changes.
|
|
10
|
+
- **`Mpv`** (`plugin.mpv`): `command(args)` (the command's name and its arguments as an array; resolves with mpv's result), `get(name)`, `set(name, value)`, `observe(name, listener)` (the current value first, then each change, at most every 100 ms; a `Disposable`). Values are `MpvValue` (JSON). Messages: `mpv.command`, `mpv.get`, `mpv.set`, `mpv.observe`, `mpv.unobserve`, and the event `mpv.property`, sent to the observer without a subscription. The channel is the contract; the names and what they do are mpv's and can change with a player version.
|
|
11
|
+
- **Refused** with the new error code **`refused`** (the message names the command or property and why), by a closed rule: what starts a program, loads scripts or configuration, opens a control channel or talks to mpv's other clients, makes the player write or delete files, ends the player, drives its keyboard and mouse, reaches the clipboard, or changes what the player manages itself (the source and the playlist, the position, the tracks, the output and the window, the subtitle style, the renderer options of `plugin.video`, the filter chains as a whole). Reading is not refused, except the clipboard. It is not a sandbox: a plugin does the first four with Node. The table is data shared with the player (`MPV_RULES`, `MPV_LIMITS`, exported from `./runtime` for its agreement test) and printed in the new reference page [mpv](docs/reference/mpv.md). mpv's own errors arrive as `backend` with mpv's words ("mpv: property not found").
|
|
12
|
+
- **Ownership**: a filter is added as `["vf", "add", "@label:…"]` (`af`; `add`, `pre`, `toggle`, `remove`) with a label of the plugin's own, not starting with `vestra-`. The label has one owner (`conflict` for another plugin), the player removes a plugin's filters and observers when it stops, and keeps a plugin that has one running. The player's own filters (the typed chains, the upscaler, motion smoothing) stay beside it; a pass-through filter does not reach snapshots and exports, which the typed chains do. A property a plugin set stays set until the player quits.
|
|
13
|
+
- **`TestHost.mpv`** and **`TestHost.setMpvProperty()`** (new members; nothing existing changes): the commands sent, a map of property values, the owners of filter labels and the observed properties, with the player's refusals from the same table; no mpv runs. Test: `test/mpv.test.ts`.
|
|
14
|
+
|
|
15
|
+
**Palette lead status** (additions). For a plugin that holds the palette's lead row and reports a request's progress (Ask Vestra today; a calculator or a search that answers in the strip, an assistant that the user can stop). An older player refuses each of them with `invalid`.
|
|
16
|
+
|
|
17
|
+
- **An end state's `status.text` may have 160 characters** (`done`, `failed`, `note`, `stopped`), still on one line: the strip shows it on up to two lines. A working text stays at 80 (one line of the row and of the strip).
|
|
18
|
+
- **`status.state: "stopped"`**: a new end state for the text shown after the user stopped the work, which was sent as `note` and looked like an answer. The player shows it plain with its icon dimmed, for about 2 s.
|
|
19
|
+
- **`status.strip`**: an optional text the strip shows instead of `text` while working (1–80 characters on one line), so the row can read "Vestra is working · Planning…" and the strip "Planning…". Sent only when set; with an end state it is `invalid` (an end state shows in the strip alone, so its `text` is the strip's).
|
|
20
|
+
- **`TestHost`** accepts the new values and nothing else changes: its checks keep their order (texts, icon, state), a wrong state keeps the 80-character limit, and `strip` is checked last and kept in `host.paletteLead.status`. The refusal of a wrong state lists the fifth name ("status.state is one of working, done, failed, note, stopped"). The limits and the state names are `PALETTE_LEAD_LIMITS` and `PALETTE_LEAD_STATES`, exported from `./runtime` for the player's agreement test. Test: `test/lead-status.test.ts`.
|
|
21
|
+
|
|
22
|
+
**Capability scan** (new tooling; user's design, 2026-11-13). `vestra-plugin scan [plugin-dir...]` reads a plugin's source and prints, as JSON, which boundary categories its code uses: `player`, `plugins`, `clipboard`, `credentials`, `camera`, `microphone`, `screen`, `notifications` (the last four reserved: no member reaches them today). Used by the plugin repository's index (stored per package) and by the store's install and update dialogs; also for an author who wants to see what the store will say. It gates nothing: the capabilities, what each needs, every `capability` refusal and `TestHost` are untouched, and `vestra-plugin check` is as before.
|
|
23
|
+
|
|
24
|
+
- **`capability-scan.json`** (the package's root, exported as `@vestra-player/sdk/capability-scan.json`; written by hand, nothing generates it): per category and for `none`, the API's methods (`Interface.member`) and the methods of the player's protocol (for requests by name). The rule: a member is in a category when it changes the user's own settings or the player beyond the plugin's own contributions (`player`), acts on other plugins (`plugins`) or reaches a resource the system protects; what only reads is `none`, the clipboard and the keychain excepted. `test/capability-scan.test.ts` fails when a method of the API surface snapshot or of the capability table is in no list or in two.
|
|
25
|
+
- **The scan**: TypeScript by type, with the capability checker's resolution (aliases, destructuring, a parameter's type, `plugin.wire.request` with a literal method) against this SDK's own declarations, so the plugin's dependencies need not be installed; JavaScript, and TypeScript that imports no SDK types, by name (best effort; `method` and `notes` of the output say so). A request whose method it cannot read is `unchecked`, not in `uses`. No type check, no build, nothing written.
|
|
26
|
+
- **Output**: `{ scan: 1, sdk, plugin, version, uses, method, files, evidence, unchecked, notes }`; `uses` is the list of categories, in the table's order. One object for one directory, an array (each with `directory`) for several. Reference: [Capability scan](docs/reference/scan.md); maintainers: `docs/maintaining.md`.
|
|
27
|
+
|
|
28
|
+
**Product data** (player f54a87d3).
|
|
29
|
+
|
|
30
|
+
- **Slint widget copy**: `slint/vestra/widgets.slint` gains `Button`'s `key` property (the key that presses it, shown as a key cap after the text; empty by default, which draws nothing).
|
|
31
|
+
- **`BUILTIN_COMMANDS`**: the playlist's `playlist.reveal` is titled "Show in Folder" (playlist 0.2.7; it said "Show in Finder"). Its id, key and focus are unchanged; the table in [Reference: commands](docs/reference/commands.md#built-in-commands) follows.
|
|
32
|
+
|
|
33
|
+
The API surface snapshot gains `Mpv`, `MpvValue`, `Scope.mpv`, `TestHost.mpv`, `TestHost.setMpvProperty`, and `strip` and `"stopped"` in `PaletteLeadOptions.status`; nothing is removed. `test/constants.test.ts` gains the name `mpv` in its two lists of capabilities (one added line each).
|
|
34
|
+
|
|
3
35
|
## 1.7.20
|
|
4
36
|
|
|
5
37
|
**Who must change: nobody.** A docs-only patch (a review follow-up of motion smoothing): no API change, `apiVersion` stays `vestra/1`, the API surface snapshot is unchanged.
|
package/bin/vestra-plugin.mjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* keep its translations up to date.
|
|
5
5
|
*
|
|
6
6
|
* vestra-plugin <check|build|test|pack> [plugin-dir...] [--version x.y.z] [--out dir]
|
|
7
|
+
* vestra-plugin scan [plugin-dir...]
|
|
7
8
|
* vestra-plugin i18n extract [plugin-dir...] [--locale <lang>]...
|
|
8
9
|
* vestra-plugin i18n check [plugin-dir...]
|
|
9
10
|
* vestra-plugin docs [path] [--page N]
|
|
@@ -23,6 +24,11 @@
|
|
|
23
24
|
* test node --test on tests/*.test.{ts,mjs}
|
|
24
25
|
* pack build, then dist/ → <out>/<id>-<version>.vxp (a zip; default
|
|
25
26
|
* out: the current directory) with its sha256 and size
|
|
27
|
+
* scan the boundary categories the plugin's code uses (player,
|
|
28
|
+
* plugins, clipboard, credentials, camera, microphone, screen,
|
|
29
|
+
* notifications), as JSON: by type for TypeScript, by name
|
|
30
|
+
* (best effort, said in the output) for JavaScript; reads the
|
|
31
|
+
* source only, checks and changes nothing
|
|
26
32
|
* docs the SDK's documentation by path, for coding agents: `/` lists
|
|
27
33
|
* Overview, Guides and API, `/API/Media/Snapshot/dispose` is
|
|
28
34
|
* one member's whole documentation; --search <query> lists
|
|
@@ -871,9 +877,127 @@ async function pack(target, flag, outDirectory) {
|
|
|
871
877
|
);
|
|
872
878
|
}
|
|
873
879
|
|
|
880
|
+
/**
|
|
881
|
+
* `vestra-plugin scan`: the boundary categories a plugin's code uses
|
|
882
|
+
* (src/capability-scan.ts, capability-scan.json), as JSON on standard
|
|
883
|
+
* output: one object for one directory, an array for several. It reads the
|
|
884
|
+
* source and the manifest's id and version; it runs no type check and no
|
|
885
|
+
* build, and changes nothing.
|
|
886
|
+
*
|
|
887
|
+
* TypeScript files are scanned by type, against this SDK's own
|
|
888
|
+
* declarations (whatever the project has installed); JavaScript files, and
|
|
889
|
+
* TypeScript files of a plugin that imports no SDK types, by name. A
|
|
890
|
+
* directory with no source outside dist/ (a built package) is scanned in
|
|
891
|
+
* dist/.
|
|
892
|
+
*/
|
|
893
|
+
async function scanPlugin(directory) {
|
|
894
|
+
const ts = await typescript();
|
|
895
|
+
const scanner = await import(
|
|
896
|
+
pathToFileURL(join(sdkRoot, "dist/capability-scan.js")).href
|
|
897
|
+
);
|
|
898
|
+
const root = resolve(directory);
|
|
899
|
+
if (!present(join(root, "manifest.json")))
|
|
900
|
+
fail(`${directory}: no manifest.json in ${root}`);
|
|
901
|
+
const manifest = await json(join(root, "manifest.json"));
|
|
902
|
+
const isScript = (file) => /\.[mc]?js$/.test(file);
|
|
903
|
+
const isTyped = (file) => /\.[mc]?tsx?$/.test(file) && !isDeclaration(file);
|
|
904
|
+
let all = (await files(root)).filter(
|
|
905
|
+
(file) => isScript(file) || isTyped(file),
|
|
906
|
+
);
|
|
907
|
+
// A built package: its code is dist/ alone.
|
|
908
|
+
if (!all.length && present(join(root, "dist")))
|
|
909
|
+
all = (await files(join(root, "dist")))
|
|
910
|
+
.filter(isScript)
|
|
911
|
+
.map((file) => join("dist", file));
|
|
912
|
+
all.sort();
|
|
913
|
+
let typed = all.filter(isTyped).map((file) => join(root, file));
|
|
914
|
+
const read = async (file) => ({
|
|
915
|
+
file,
|
|
916
|
+
text: await readFile(file, "utf8"),
|
|
917
|
+
});
|
|
918
|
+
const named = await Promise.all(
|
|
919
|
+
all.filter(isScript).map((file) => read(join(root, file))),
|
|
920
|
+
);
|
|
921
|
+
const relativeTo = (file) =>
|
|
922
|
+
relative(root, resolve(file)).split(sep).join("/");
|
|
923
|
+
const program = typed.length
|
|
924
|
+
? ts.createProgram(typed, {
|
|
925
|
+
target: ts.ScriptTarget.ES2023,
|
|
926
|
+
module: ts.ModuleKind.NodeNext,
|
|
927
|
+
moduleResolution: ts.ModuleResolutionKind.NodeNext,
|
|
928
|
+
allowImportingTsExtensions: true,
|
|
929
|
+
noEmit: true,
|
|
930
|
+
skipLibCheck: true,
|
|
931
|
+
types: [],
|
|
932
|
+
// This SDK's declarations, wherever the plugin's own copy is.
|
|
933
|
+
paths: { [SDK]: [join(sdkRoot, "dist/index.d.ts")] },
|
|
934
|
+
})
|
|
935
|
+
: undefined;
|
|
936
|
+
let found = scanner.scan(ts, program, {
|
|
937
|
+
typed,
|
|
938
|
+
named,
|
|
939
|
+
relative: relativeTo,
|
|
940
|
+
});
|
|
941
|
+
const notes = [];
|
|
942
|
+
if (!found.resolved) {
|
|
943
|
+
// No SDK types to go by: read the TypeScript by name too.
|
|
944
|
+
notes.push(
|
|
945
|
+
"The TypeScript files import no types of @vestra-player/sdk; they were scanned by name (best effort).",
|
|
946
|
+
);
|
|
947
|
+
named.push(...(await Promise.all(typed.map(read))));
|
|
948
|
+
typed = [];
|
|
949
|
+
found = scanner.scan(ts, undefined, {
|
|
950
|
+
typed,
|
|
951
|
+
named,
|
|
952
|
+
relative: relativeTo,
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
if (named.length)
|
|
956
|
+
notes.push(
|
|
957
|
+
"Files scanned by name have no types: a member counts when it is used on something named as its module of plugin (plugin.clipboard.readText, clipboard.readText). A use under another name is missed, and a name that only looks like one is counted.",
|
|
958
|
+
);
|
|
959
|
+
if (!typed.length && !named.length)
|
|
960
|
+
notes.push("No TypeScript or JavaScript files were found.");
|
|
961
|
+
if (found.unchecked.length)
|
|
962
|
+
notes.push(
|
|
963
|
+
"Some requests by name could not be placed (unchecked): what they ask for is not in uses.",
|
|
964
|
+
);
|
|
965
|
+
return {
|
|
966
|
+
scan: scanner.SCAN_FORMAT,
|
|
967
|
+
sdk: (await json(join(sdkRoot, "package.json"))).version,
|
|
968
|
+
plugin: typeof manifest.id === "string" ? manifest.id : null,
|
|
969
|
+
version: typeof manifest.version === "string" ? manifest.version : null,
|
|
970
|
+
uses: found.uses,
|
|
971
|
+
method:
|
|
972
|
+
typed.length && named.length
|
|
973
|
+
? "mixed"
|
|
974
|
+
: typed.length
|
|
975
|
+
? "types"
|
|
976
|
+
: named.length
|
|
977
|
+
? "names"
|
|
978
|
+
: "none",
|
|
979
|
+
files: { types: typed.length, names: named.length },
|
|
980
|
+
evidence: found.evidence,
|
|
981
|
+
unchecked: found.unchecked,
|
|
982
|
+
notes,
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
/** `vestra-plugin scan [plugin-dir...]`. */
|
|
987
|
+
async function scanCommand(args) {
|
|
988
|
+
const directories = args.length ? args : ["."];
|
|
989
|
+
const results = [];
|
|
990
|
+
for (const directory of directories)
|
|
991
|
+
results.push({ directory, ...(await scanPlugin(directory)) });
|
|
992
|
+
const [only] = results;
|
|
993
|
+
if (results.length === 1) delete only.directory;
|
|
994
|
+
console.log(JSON.stringify(results.length === 1 ? only : results, null, 2));
|
|
995
|
+
}
|
|
996
|
+
|
|
874
997
|
const USAGE = [
|
|
875
998
|
"usage: vestra-plugin <check|build|test|pack> [plugin-dir...] [--version x.y.z] [--out dir]",
|
|
876
999
|
" vestra-plugin check [plugin-dir...] --json",
|
|
1000
|
+
" vestra-plugin scan [plugin-dir...]",
|
|
877
1001
|
" vestra-plugin i18n extract [plugin-dir...] [--locale <lang>]...",
|
|
878
1002
|
" vestra-plugin i18n check [plugin-dir...]",
|
|
879
1003
|
" vestra-plugin docs [path] [--page N]",
|
|
@@ -932,6 +1056,10 @@ async function main() {
|
|
|
932
1056
|
await docsCommand(args);
|
|
933
1057
|
return;
|
|
934
1058
|
}
|
|
1059
|
+
if (command === "scan") {
|
|
1060
|
+
await scanCommand(args);
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
935
1063
|
let subcommand = null;
|
|
936
1064
|
if (command === "i18n") {
|
|
937
1065
|
subcommand = args.shift();
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
{
|
|
2
|
+
"about": "The capability scan's table (docs/reference/scan.md): which API members and which requests of the player's protocol cross a boundary the user should know about, by category. Hand-maintained: every method of the public API and every method of the player's capability table is in exactly one list, a category's or none's (test/capability-scan.test.ts). `vestra-plugin scan` reports the categories a plugin uses. It changes nothing at run time: the manifest's capabilities gate the API as before.",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"categories": {
|
|
5
|
+
"player": {
|
|
6
|
+
"about": "Changes the user's own player settings, or the player beyond what the plugin itself contributes: shortcuts, theme, language, rendering mode, a restart, mpv driven directly.",
|
|
7
|
+
"members": [
|
|
8
|
+
"Appearance.set",
|
|
9
|
+
"Appearance.setLanguage",
|
|
10
|
+
"Bindings.reset",
|
|
11
|
+
"Bindings.set",
|
|
12
|
+
"Mpv.command",
|
|
13
|
+
"Mpv.set",
|
|
14
|
+
"Rendering.restartPlayer",
|
|
15
|
+
"Rendering.setPreference"
|
|
16
|
+
],
|
|
17
|
+
"requests": [
|
|
18
|
+
"appearance.set",
|
|
19
|
+
"appearance.setLanguage",
|
|
20
|
+
"bindings.reset",
|
|
21
|
+
"bindings.set",
|
|
22
|
+
"mpv.command",
|
|
23
|
+
"mpv.set",
|
|
24
|
+
"rendering.restart",
|
|
25
|
+
"rendering.setPreference"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"plugins": {
|
|
29
|
+
"about": "Acts on other plugins: installs, uninstalls, disables or reloads them, or runs any command, theirs included.",
|
|
30
|
+
"members": [
|
|
31
|
+
"Commands.run",
|
|
32
|
+
"PackageCandidate.install",
|
|
33
|
+
"Packages.reload",
|
|
34
|
+
"Packages.setEnabled",
|
|
35
|
+
"Packages.uninstall",
|
|
36
|
+
"Packages.validate",
|
|
37
|
+
"Packages.validateArchive"
|
|
38
|
+
],
|
|
39
|
+
"requests": ["commands.run", "packages.*"]
|
|
40
|
+
},
|
|
41
|
+
"clipboard": {
|
|
42
|
+
"about": "Reads or writes the system clipboard.",
|
|
43
|
+
"members": [
|
|
44
|
+
"Clipboard.readText",
|
|
45
|
+
"Clipboard.writeImage",
|
|
46
|
+
"Clipboard.writeText"
|
|
47
|
+
],
|
|
48
|
+
"requests": [
|
|
49
|
+
"clipboard.readText",
|
|
50
|
+
"clipboard.writeImage",
|
|
51
|
+
"clipboard.writeText"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"credentials": {
|
|
55
|
+
"about": "Reads or writes sign-in details in the system keychain.",
|
|
56
|
+
"members": ["Secrets.delete", "Secrets.get", "Secrets.set"],
|
|
57
|
+
"requests": ["secrets.delete", "secrets.get", "secrets.set"]
|
|
58
|
+
},
|
|
59
|
+
"camera": {
|
|
60
|
+
"about": "Uses a camera. No member of the API does today.",
|
|
61
|
+
"members": [],
|
|
62
|
+
"requests": []
|
|
63
|
+
},
|
|
64
|
+
"microphone": {
|
|
65
|
+
"about": "Records from a microphone. No member of the API does today.",
|
|
66
|
+
"members": [],
|
|
67
|
+
"requests": []
|
|
68
|
+
},
|
|
69
|
+
"screen": {
|
|
70
|
+
"about": "Captures the screen or other windows. No member of the API does today (a snapshot or an export is of the playing video).",
|
|
71
|
+
"members": [],
|
|
72
|
+
"requests": []
|
|
73
|
+
},
|
|
74
|
+
"notifications": {
|
|
75
|
+
"about": "Shows system notifications. No member of the API does today (a message on the video is the plugin's own).",
|
|
76
|
+
"members": [],
|
|
77
|
+
"requests": []
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"none": {
|
|
81
|
+
"about": "Crosses no such boundary: the plugin's own contributions, the playback session, reading state.",
|
|
82
|
+
"members": [
|
|
83
|
+
"App.system",
|
|
84
|
+
"BackdropSlot.onChange",
|
|
85
|
+
"Bindings.list",
|
|
86
|
+
"Bindings.onChange",
|
|
87
|
+
"Command.set",
|
|
88
|
+
"CommandOptions.run",
|
|
89
|
+
"Commands.add",
|
|
90
|
+
"Commands.keys",
|
|
91
|
+
"Commands.list",
|
|
92
|
+
"Condition.and",
|
|
93
|
+
"Condition.not",
|
|
94
|
+
"Condition.or",
|
|
95
|
+
"Dialogs.confirm",
|
|
96
|
+
"Dialogs.openDirectory",
|
|
97
|
+
"Dialogs.openFile",
|
|
98
|
+
"Dialogs.openFiles",
|
|
99
|
+
"Dialogs.saveFile",
|
|
100
|
+
"Disposable.dispose",
|
|
101
|
+
"DropHandler.drop",
|
|
102
|
+
"Drops.provide",
|
|
103
|
+
"ExportJob.cancel",
|
|
104
|
+
"ExportJob.onChange",
|
|
105
|
+
"ExportJob.refresh",
|
|
106
|
+
"FileResolverOptions.resolve",
|
|
107
|
+
"Host.run",
|
|
108
|
+
"I18n.error",
|
|
109
|
+
"I18n.list",
|
|
110
|
+
"I18n.resolve",
|
|
111
|
+
"I18n.text",
|
|
112
|
+
"JsonStore.flush",
|
|
113
|
+
"JsonStore.save",
|
|
114
|
+
"MainWindow.onChange",
|
|
115
|
+
"MainWindow.setAlwaysOnTop",
|
|
116
|
+
"MainWindow.setCursorAutoHide",
|
|
117
|
+
"MainWindow.setPictureInPicture",
|
|
118
|
+
"MainWindow.setVideoArea",
|
|
119
|
+
"Media.close",
|
|
120
|
+
"Media.onEnd",
|
|
121
|
+
"Media.ready",
|
|
122
|
+
"MediaCapture.capture",
|
|
123
|
+
"MediaCapture.export",
|
|
124
|
+
"MediaCapture.exportCheck",
|
|
125
|
+
"MediaSources.forget",
|
|
126
|
+
"MediaSources.get",
|
|
127
|
+
"MediaSources.list",
|
|
128
|
+
"MediaSources.locate",
|
|
129
|
+
"MediaSources.open",
|
|
130
|
+
"MediaSources.remember",
|
|
131
|
+
"Mpv.get",
|
|
132
|
+
"Mpv.observe",
|
|
133
|
+
"Osd.panel",
|
|
134
|
+
"Osd.show",
|
|
135
|
+
"OsdPanel.set",
|
|
136
|
+
"PackageChange.cancel",
|
|
137
|
+
"PackageChange.onChange",
|
|
138
|
+
"Packages.list",
|
|
139
|
+
"Packages.onChange",
|
|
140
|
+
"Palette.lead",
|
|
141
|
+
"PaletteLead.done",
|
|
142
|
+
"PaletteLead.onRun",
|
|
143
|
+
"PaletteLead.update",
|
|
144
|
+
"Panel.onChange",
|
|
145
|
+
"Panel.onDrop",
|
|
146
|
+
"Panel.setInteraction",
|
|
147
|
+
"Panel.show",
|
|
148
|
+
"Panel.showMenu",
|
|
149
|
+
"Panel.toggle",
|
|
150
|
+
"PanelSlot.activate",
|
|
151
|
+
"PanelSlot.onChange",
|
|
152
|
+
"PanelSlot.setVisible",
|
|
153
|
+
"PanelSlot.toggle",
|
|
154
|
+
"Panels.mount",
|
|
155
|
+
"Player.addAudioTrack",
|
|
156
|
+
"Player.audioDevices",
|
|
157
|
+
"Player.chapters",
|
|
158
|
+
"Player.close",
|
|
159
|
+
"Player.isCurrent",
|
|
160
|
+
"Player.next",
|
|
161
|
+
"Player.on",
|
|
162
|
+
"Player.onChange",
|
|
163
|
+
"Player.open",
|
|
164
|
+
"Player.openStream",
|
|
165
|
+
"Player.previous",
|
|
166
|
+
"Player.provideSequence",
|
|
167
|
+
"Player.refresh",
|
|
168
|
+
"Player.restart",
|
|
169
|
+
"Player.scrub",
|
|
170
|
+
"Player.seek",
|
|
171
|
+
"Player.selectAudioTrack",
|
|
172
|
+
"Player.setAudioDevice",
|
|
173
|
+
"Player.setLoop",
|
|
174
|
+
"Player.setOutput",
|
|
175
|
+
"Player.setPaused",
|
|
176
|
+
"Player.setRate",
|
|
177
|
+
"Player.setStepSeek",
|
|
178
|
+
"Player.stats",
|
|
179
|
+
"Player.step",
|
|
180
|
+
"Power.preventSleep",
|
|
181
|
+
"RenderOptions.onStatus",
|
|
182
|
+
"RenderOptions.set",
|
|
183
|
+
"Rendering.state",
|
|
184
|
+
"ResolvedStream.frame",
|
|
185
|
+
"ResolvedStream.started",
|
|
186
|
+
"Resolvers.add",
|
|
187
|
+
"Scope.add",
|
|
188
|
+
"Scope.audio.filter",
|
|
189
|
+
"Scope.onDispose",
|
|
190
|
+
"Scope.onError",
|
|
191
|
+
"Scope.scope",
|
|
192
|
+
"Scope.state",
|
|
193
|
+
"Scope.update",
|
|
194
|
+
"Scope.video.filter",
|
|
195
|
+
"Scope.video.motion",
|
|
196
|
+
"Scope.video.render",
|
|
197
|
+
"Scope.video.shaders",
|
|
198
|
+
"Scope.video.view",
|
|
199
|
+
"Scrub.end",
|
|
200
|
+
"Scrub.seek",
|
|
201
|
+
"SequenceProvider.next",
|
|
202
|
+
"SequenceProvider.previous",
|
|
203
|
+
"SessionStorage.delete",
|
|
204
|
+
"SessionStorage.get",
|
|
205
|
+
"SessionStorage.keys",
|
|
206
|
+
"SessionStorage.set",
|
|
207
|
+
"Settings.page",
|
|
208
|
+
"Settings.show",
|
|
209
|
+
"SidebarSlot.setDetached",
|
|
210
|
+
"Snapshot.export",
|
|
211
|
+
"Storage.json",
|
|
212
|
+
"Stream.onStop",
|
|
213
|
+
"Stream.stop",
|
|
214
|
+
"StreamOptions.frame",
|
|
215
|
+
"Subtitles.load",
|
|
216
|
+
"Subtitles.onChange",
|
|
217
|
+
"Subtitles.refresh",
|
|
218
|
+
"Subtitles.remove",
|
|
219
|
+
"Subtitles.select",
|
|
220
|
+
"Subtitles.setStyle",
|
|
221
|
+
"System.openPath",
|
|
222
|
+
"System.openUrl",
|
|
223
|
+
"System.reveal",
|
|
224
|
+
"Timeline.layer",
|
|
225
|
+
"TimelineLayer.set",
|
|
226
|
+
"TimelineLayer.setRanges",
|
|
227
|
+
"Tools.available",
|
|
228
|
+
"Tools.run",
|
|
229
|
+
"Ui.image",
|
|
230
|
+
"Ui.markdown",
|
|
231
|
+
"Ui.remoteImage",
|
|
232
|
+
"VideoMotion.onChange",
|
|
233
|
+
"VideoMotion.set",
|
|
234
|
+
"VideoMotion.state",
|
|
235
|
+
"VideoShaders.clear",
|
|
236
|
+
"VideoShaders.onStatus",
|
|
237
|
+
"VideoShaders.set",
|
|
238
|
+
"VideoUpscaling.onChange",
|
|
239
|
+
"VideoUpscaling.set",
|
|
240
|
+
"VideoUpscaling.state",
|
|
241
|
+
"VideoView.onStatus",
|
|
242
|
+
"VideoView.set",
|
|
243
|
+
"View.bind",
|
|
244
|
+
"View.on",
|
|
245
|
+
"View.set",
|
|
246
|
+
"WebResolverOptions.resolve",
|
|
247
|
+
"When.can",
|
|
248
|
+
"When.language",
|
|
249
|
+
"When.phase",
|
|
250
|
+
"When.theme",
|
|
251
|
+
"Window.close",
|
|
252
|
+
"Window.hide",
|
|
253
|
+
"Window.onClose",
|
|
254
|
+
"Window.show",
|
|
255
|
+
"Windows.create",
|
|
256
|
+
"Wire.on",
|
|
257
|
+
"Wire.request",
|
|
258
|
+
"Wire.view",
|
|
259
|
+
"WireCommand.update",
|
|
260
|
+
"WireCommands.register",
|
|
261
|
+
"WireView.write",
|
|
262
|
+
"WireView.writeRows"
|
|
263
|
+
],
|
|
264
|
+
"requests": [
|
|
265
|
+
"app.system",
|
|
266
|
+
"audio.addTrack",
|
|
267
|
+
"audio.selectTrack",
|
|
268
|
+
"bindings.list",
|
|
269
|
+
"commands.keys",
|
|
270
|
+
"commands.list",
|
|
271
|
+
"commands.register",
|
|
272
|
+
"commands.unregister",
|
|
273
|
+
"commands.update",
|
|
274
|
+
"dialogs.confirm",
|
|
275
|
+
"dialogs.open",
|
|
276
|
+
"drops.listen",
|
|
277
|
+
"drops.provide",
|
|
278
|
+
"drops.withdraw",
|
|
279
|
+
"events.subscribe",
|
|
280
|
+
"events.unsubscribe",
|
|
281
|
+
"host.run",
|
|
282
|
+
"jobs.*",
|
|
283
|
+
"jobs.operation",
|
|
284
|
+
"jobs.state",
|
|
285
|
+
"layout.set",
|
|
286
|
+
"layout.state",
|
|
287
|
+
"media.sources.*",
|
|
288
|
+
"media.sources.open",
|
|
289
|
+
"mpv.get",
|
|
290
|
+
"mpv.observe",
|
|
291
|
+
"mpv.unobserve",
|
|
292
|
+
"osd.panel",
|
|
293
|
+
"osd.show",
|
|
294
|
+
"packages.list",
|
|
295
|
+
"palette.lead.clear",
|
|
296
|
+
"palette.lead.done",
|
|
297
|
+
"palette.lead.set",
|
|
298
|
+
"playback.set",
|
|
299
|
+
"playback.stats",
|
|
300
|
+
"player.audioDevices",
|
|
301
|
+
"player.chapters",
|
|
302
|
+
"player.setAudioDevice",
|
|
303
|
+
"player.setLoop",
|
|
304
|
+
"player.setStepSeek",
|
|
305
|
+
"player.step",
|
|
306
|
+
"power.preventSleep",
|
|
307
|
+
"processing.operation",
|
|
308
|
+
"processing.replace",
|
|
309
|
+
"processing.state",
|
|
310
|
+
"producer.ack",
|
|
311
|
+
"producer.ackInput",
|
|
312
|
+
"producer.declareInput",
|
|
313
|
+
"producer.prepare",
|
|
314
|
+
"producer.release",
|
|
315
|
+
"producer.state",
|
|
316
|
+
"rendering.state",
|
|
317
|
+
"sequence.set",
|
|
318
|
+
"sequence.step",
|
|
319
|
+
"settings.*",
|
|
320
|
+
"snapshot.*",
|
|
321
|
+
"snapshot.state",
|
|
322
|
+
"source.operation",
|
|
323
|
+
"source.state",
|
|
324
|
+
"source.submit",
|
|
325
|
+
"sourceResolvers.*",
|
|
326
|
+
"sourceResolvers.register",
|
|
327
|
+
"sourceResolvers.respond",
|
|
328
|
+
"sourceResolvers.unregister",
|
|
329
|
+
"storage.session.delete",
|
|
330
|
+
"storage.session.get",
|
|
331
|
+
"storage.session.keys",
|
|
332
|
+
"storage.session.set",
|
|
333
|
+
"subtitles.*",
|
|
334
|
+
"subtitles.state",
|
|
335
|
+
"system.openPath",
|
|
336
|
+
"system.openUrl",
|
|
337
|
+
"system.reveal",
|
|
338
|
+
"timeline.marks",
|
|
339
|
+
"timeline.set",
|
|
340
|
+
"timeline.setRanges",
|
|
341
|
+
"ui.close",
|
|
342
|
+
"ui.interaction",
|
|
343
|
+
"ui.markdownScan",
|
|
344
|
+
"ui.menu",
|
|
345
|
+
"ui.mount",
|
|
346
|
+
"ui.open",
|
|
347
|
+
"ui.set",
|
|
348
|
+
"ui.setMount",
|
|
349
|
+
"ui.show",
|
|
350
|
+
"ui.unmount",
|
|
351
|
+
"video.motion.set",
|
|
352
|
+
"video.motion.state",
|
|
353
|
+
"video.render.release",
|
|
354
|
+
"video.render.set",
|
|
355
|
+
"video.shaders.set",
|
|
356
|
+
"video.upscaling.set",
|
|
357
|
+
"video.upscaling.state",
|
|
358
|
+
"video.view.release",
|
|
359
|
+
"video.view.set",
|
|
360
|
+
"window.setAlwaysOnTop",
|
|
361
|
+
"window.setCursorAutoHide",
|
|
362
|
+
"window.setPictureInPicture",
|
|
363
|
+
"window.setVideoArea",
|
|
364
|
+
"window.state"
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
}
|
package/dist/api-requests.js
CHANGED
|
@@ -171,6 +171,10 @@ export const API_REQUESTS = Object.freeze({
|
|
|
171
171
|
"VideoMotion.set": [{ method: "video.motion.set" }],
|
|
172
172
|
"VideoMotion.onChange": [listen("video.motion.changed")],
|
|
173
173
|
"WireCommands.register": [{ method: "commands.register" }],
|
|
174
|
+
"Mpv.command": [{ method: "mpv.command" }],
|
|
175
|
+
"Mpv.get": [{ method: "mpv.get" }],
|
|
176
|
+
"Mpv.set": [{ method: "mpv.set" }],
|
|
177
|
+
"Mpv.observe": [{ method: "mpv.observe" }],
|
|
174
178
|
});
|
|
175
179
|
/**
|
|
176
180
|
* The events whose listener subscribes (`events.subscribe` with the event
|
|
@@ -131,3 +131,46 @@ export declare function addCapabilityEdit(ts: typeof TS, text: string, capabilit
|
|
|
131
131
|
length: number;
|
|
132
132
|
newText: string;
|
|
133
133
|
} | undefined;
|
|
134
|
+
/** @internal One use of an SDK member, where {@link findMemberUses} found it. */
|
|
135
|
+
export interface MemberUse {
|
|
136
|
+
readonly file: string;
|
|
137
|
+
/** 1-based line and column of the member's name. */
|
|
138
|
+
readonly line: number;
|
|
139
|
+
readonly column: number;
|
|
140
|
+
/** The member, as it was asked for (`Clipboard.readText`). */
|
|
141
|
+
readonly api: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @internal A request sent by name (`plugin.wire.request("clipboard.readText")`):
|
|
145
|
+
* the method when the types fix it to one string, else `undefined` (a
|
|
146
|
+
* computed name, a union of several, the member taken as a value).
|
|
147
|
+
*/
|
|
148
|
+
export interface RequestUse {
|
|
149
|
+
readonly file: string;
|
|
150
|
+
readonly line: number;
|
|
151
|
+
readonly column: number;
|
|
152
|
+
readonly method: string | undefined;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Every use, in `files`, of the SDK members named by `apis`
|
|
156
|
+
* (`Interface.member`), and every request sent by name
|
|
157
|
+
* (`ARGUMENT_APIS`' `method` members: `Wire.request`), in file and position
|
|
158
|
+
* order. The same type-aware resolution as {@link checkCapabilities}, for
|
|
159
|
+
* any list of members: a use is a property access, an element access with
|
|
160
|
+
* a literal name or a destructured property whose symbol is the SDK's
|
|
161
|
+
* declaration of the member. It reads no manifest and no capability rule
|
|
162
|
+
* (the capability scan, `capability-scan.ts`, gives it its own lists).
|
|
163
|
+
*
|
|
164
|
+
* `resolved` is `false` when the program has no import of
|
|
165
|
+
* `@vestra-player/sdk` that resolves: nothing can be found by type then.
|
|
166
|
+
*
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
export declare function findMemberUses(ts: typeof TS, program: TS.Program, options: {
|
|
170
|
+
readonly files: readonly string[];
|
|
171
|
+
readonly apis: Iterable<string>;
|
|
172
|
+
}): {
|
|
173
|
+
resolved: boolean;
|
|
174
|
+
uses: MemberUse[];
|
|
175
|
+
requests: RequestUse[];
|
|
176
|
+
};
|