@vestra-player/sdk 1.7.8 → 1.7.10

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 (43) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/api-requests.js +3 -0
  3. package/dist/capabilities.d.ts +9 -0
  4. package/dist/capabilities.js +1 -0
  5. package/dist/capability-rules.d.ts +3 -0
  6. package/dist/capability-rules.js +6 -1
  7. package/dist/commands.d.ts +15 -2
  8. package/dist/commands.js +7 -1
  9. package/dist/docs-tree.json.gz +0 -0
  10. package/dist/host-capabilities.js +53 -0
  11. package/dist/manifest.js +12 -1
  12. package/dist/player-runtime.d.ts +1 -0
  13. package/dist/player-runtime.js +1 -0
  14. package/dist/plugin/commands.d.ts +2 -1
  15. package/dist/plugin/commands.js +131 -4
  16. package/dist/plugin/connection.d.ts +7 -1
  17. package/dist/plugin/connection.js +16 -3
  18. package/dist/plugin/errors.d.ts +5 -1
  19. package/dist/plugin/errors.js +8 -2
  20. package/dist/plugin/index.js +4 -0
  21. package/dist/plugin/player.js +1 -1
  22. package/dist/plugin/scope.d.ts +1 -0
  23. package/dist/plugin/scope.js +2 -1
  24. package/dist/plugin/subtitles.js +2 -2
  25. package/dist/plugin/testing/commands.d.ts +7 -0
  26. package/dist/plugin/testing/commands.js +211 -0
  27. package/dist/plugin/testing/index.d.ts +70 -0
  28. package/dist/plugin/testing/index.js +66 -1
  29. package/dist/plugin/testing/internals.d.ts +14 -0
  30. package/dist/plugin/testing/internals.js +14 -1
  31. package/dist/plugin/types/base.d.ts +8 -5
  32. package/dist/plugin/types/commands.d.ts +412 -1
  33. package/dist/request-queue.d.ts +66 -0
  34. package/dist/request-queue.js +209 -0
  35. package/dist/source.d.ts +2 -1
  36. package/dist/source.js +3 -5
  37. package/dist/subtitles.d.ts +4 -2
  38. package/dist/subtitles.js +4 -10
  39. package/dist/wire.d.ts +25 -4
  40. package/dist/wire.js +6 -0
  41. package/llms.txt +2 -2
  42. package/package.json +1 -1
  43. package/slint/vestra/icons.slint +4 -0
@@ -0,0 +1,66 @@
1
+ import type { Json, Transport } from "./wire.ts";
2
+ /**
3
+ * How much of the plugin's traffic the SDK keeps in flight, documented in
4
+ * the limits reference. Exported from `./runtime` only, for the player's
5
+ * agreement test: a plugin never meets these figures as an error, only as
6
+ * a delay.
7
+ *
8
+ * @internal
9
+ */
10
+ export declare const REQUEST_LIMITS: Readonly<{
11
+ /**
12
+ * Requests one plugin has sent the player and not yet had answered; the
13
+ * next waits in the plugin's queue until an answer comes, under the
14
+ * player's backstop of 320 lines (256).
15
+ */
16
+ readonly inFlight: 256;
17
+ /**
18
+ * UTF-8 bytes of those requests' lines together; the next waits unless
19
+ * nothing is in flight. One `MESSAGE_LIMIT` line more stays under the
20
+ * player's backstop of 4 MiB, for the replies that never wait (3 MiB).
21
+ */
22
+ readonly inFlightBytes: number;
23
+ }>;
24
+ /**
25
+ * Requests that answer the player's own calls (a resolution, a producer's
26
+ * control): sent at once, never behind the queue. The player may hold one
27
+ * of the plugin's requests until such an answer comes (an open waits for
28
+ * the plugin's resolver), so waiting behind it could never end.
29
+ * `palette.lead.done` is not one: the player waits for nothing on it, and
30
+ * unqueued it could pass a waiting `commands.run` of the same ticket. They count while in flight; their number is the player's, so
31
+ * the backstop's margin over `inFlight` covers them.
32
+ */
33
+ export declare const UNQUEUED_METHODS: ReadonlySet<string>;
34
+ /** A request's options on the plugin's side; nothing of them is sent. */
35
+ export interface RequestOptions {
36
+ /**
37
+ * Aborting it while the request still waits takes the request out of the
38
+ * queue, unsent, and rejects it with `aborted` (`AbortError`). Once sent,
39
+ * it runs to its answer, as before.
40
+ */
41
+ signal?: AbortSignal;
42
+ }
43
+ /** The transport behind a per-plugin limit of requests in flight. */
44
+ export declare class RequestQueue {
45
+ #private;
46
+ /** The most in flight at once (the SDK's own tests). */
47
+ peak: number;
48
+ constructor(transport: Transport, limits?: {
49
+ inFlight: number;
50
+ inFlightBytes: number;
51
+ });
52
+ /** Requests sent and not yet answered, and their bytes. */
53
+ get inFlight(): {
54
+ requests: number;
55
+ bytes: number;
56
+ };
57
+ /** Requests waiting to be sent. */
58
+ get waiting(): number;
59
+ request<T>(method: string, params?: Json, options?: RequestOptions): Promise<T>;
60
+ /**
61
+ * The plugin stops: every waiting request rejects with `error` (the one
62
+ * the runner gives the requests in flight), and later ones go to the
63
+ * transport as they come, which refuses them while stopping.
64
+ */
65
+ close(error?: Error): void;
66
+ }
@@ -0,0 +1,209 @@
1
+ /**
2
+ * The plugin's side of the player's request backstop (L0): at most
3
+ * `REQUEST_LIMITS.inFlight` requests, and `REQUEST_LIMITS.inFlightBytes` of
4
+ * them, sent and not yet answered; the rest wait here in the order they were
5
+ * made and go out as answers come in. Nothing fails and nothing is
6
+ * reordered: a request that waits is only late. The player answers
7
+ * `limit` to a request past 320 unanswered lines or 4 MiB of them per plugin
8
+ * (its backstop; it does not stop the plugin), which a plugin on the SDK so
9
+ * never reaches: only a client that bypasses the SDK meets it.
10
+ *
11
+ * One queue per plugin, made by its `Connection` over the runner's
12
+ * transport: in the shared runner every member has its own `boot`, its own
13
+ * `createPlugin` and so its own queue, so one member's flood never delays
14
+ * another's. `TestHost` is the transport of a plugin under test, behind the
15
+ * same queue: tests see the same waiting.
16
+ */
17
+ import { HostError } from "./wire.js";
18
+ import { MESSAGE_LIMIT } from "./capabilities.js";
19
+ import { abortError } from "./plugin/errors.js";
20
+ /**
21
+ * How much of the plugin's traffic the SDK keeps in flight, documented in
22
+ * the limits reference. Exported from `./runtime` only, for the player's
23
+ * agreement test: a plugin never meets these figures as an error, only as
24
+ * a delay.
25
+ *
26
+ * @internal
27
+ */
28
+ export const REQUEST_LIMITS = Object.freeze({
29
+ /**
30
+ * Requests one plugin has sent the player and not yet had answered; the
31
+ * next waits in the plugin's queue until an answer comes, under the
32
+ * player's backstop of 320 lines (256).
33
+ */
34
+ inFlight: 256,
35
+ /**
36
+ * UTF-8 bytes of those requests' lines together; the next waits unless
37
+ * nothing is in flight. One `MESSAGE_LIMIT` line more stays under the
38
+ * player's backstop of 4 MiB, for the replies that never wait (3 MiB).
39
+ */
40
+ inFlightBytes: 3 * 1024 * 1024,
41
+ });
42
+ /**
43
+ * Requests that answer the player's own calls (a resolution, a producer's
44
+ * control): sent at once, never behind the queue. The player may hold one
45
+ * of the plugin's requests until such an answer comes (an open waits for
46
+ * the plugin's resolver), so waiting behind it could never end.
47
+ * `palette.lead.done` is not one: the player waits for nothing on it, and
48
+ * unqueued it could pass a waiting `commands.run` of the same ticket. They count while in flight; their number is the player's, so
49
+ * the backstop's margin over `inFlight` covers them.
50
+ */
51
+ export const UNQUEUED_METHODS = new Set([
52
+ "sourceResolvers.respond",
53
+ "producer.ack",
54
+ "producer.ackInput",
55
+ ]);
56
+ /**
57
+ * What the player counts of a line beyond the SDK's estimate: the id's
58
+ * digits past one and the shared runner's `"g":<n>,` envelope (about 10–20
59
+ * bytes), rounded up. With it, `inFlightBytes` plus one unqueued line of
60
+ * `MESSAGE_LIMIT` stays under the player's 4 MiB.
61
+ */
62
+ const LINE_MARGIN = 32;
63
+ /**
64
+ * UTF-8 bytes of the request's line as the runner writes it, with a
65
+ * one-digit id and the newline (without {@link LINE_MARGIN});
66
+ * `undefined` when it cannot be written (the transport says why).
67
+ */
68
+ function lineBytes(method, params) {
69
+ try {
70
+ return (Buffer.byteLength(JSON.stringify({ id: 0, method, params: params ?? {} })) + 1);
71
+ }
72
+ catch {
73
+ return undefined;
74
+ }
75
+ }
76
+ /** The transport behind a per-plugin limit of requests in flight. */
77
+ export class RequestQueue {
78
+ #transport;
79
+ #limit;
80
+ #byteLimit;
81
+ #inFlight = 0;
82
+ #bytes = 0;
83
+ /** Waiting requests in order; `#head` is the first still in it. */
84
+ #waiting = [];
85
+ #head = 0;
86
+ #count = 0;
87
+ /** Set by `close`: later requests go to the transport as they come. */
88
+ #closed = false;
89
+ /** The most in flight at once (the SDK's own tests). */
90
+ peak = 0;
91
+ constructor(transport, limits = REQUEST_LIMITS) {
92
+ this.#transport = transport;
93
+ this.#limit = limits.inFlight;
94
+ this.#byteLimit = limits.inFlightBytes;
95
+ }
96
+ /** Requests sent and not yet answered, and their bytes. */
97
+ get inFlight() {
98
+ return { requests: this.#inFlight, bytes: this.#bytes };
99
+ }
100
+ /** Requests waiting to be sent. */
101
+ get waiting() {
102
+ return this.#count;
103
+ }
104
+ request(method, params, options) {
105
+ const signal = options?.signal;
106
+ if (this.#closed)
107
+ return this.#transport.request(method, params);
108
+ if (signal?.aborted)
109
+ return Promise.reject(abortError());
110
+ const line = lineBytes(method, params);
111
+ // Not writable, or longer than a line: the transport refuses it
112
+ // without writing it, at once as before.
113
+ if (line === undefined || line > MESSAGE_LIMIT)
114
+ return this.#transport.request(method, params);
115
+ const bytes = line + LINE_MARGIN;
116
+ if (UNQUEUED_METHODS.has(method) || (!this.#count && this.#fits(bytes)))
117
+ return this.#send(method, params, bytes);
118
+ return new Promise((resolve, reject) => {
119
+ const entry = {
120
+ method,
121
+ params,
122
+ bytes,
123
+ resolve: resolve,
124
+ reject,
125
+ signal,
126
+ abort: undefined,
127
+ };
128
+ const index = this.#waiting.length;
129
+ if (signal) {
130
+ entry.abort = () => {
131
+ if (this.#waiting[index] !== entry)
132
+ return;
133
+ this.#waiting[index] = undefined;
134
+ this.#count--;
135
+ reject(abortError());
136
+ };
137
+ signal.addEventListener("abort", entry.abort, { once: true });
138
+ }
139
+ this.#waiting.push(entry);
140
+ this.#count++;
141
+ });
142
+ }
143
+ /**
144
+ * The plugin stops: every waiting request rejects with `error` (the one
145
+ * the runner gives the requests in flight), and later ones go to the
146
+ * transport as they come, which refuses them while stopping.
147
+ */
148
+ close(error = new HostError("disabled", "plugin stopped")) {
149
+ if (this.#closed)
150
+ return;
151
+ this.#closed = true;
152
+ const waiting = this.#waiting.slice(this.#head);
153
+ this.#waiting = [];
154
+ this.#head = 0;
155
+ this.#count = 0;
156
+ for (const entry of waiting) {
157
+ if (!entry)
158
+ continue;
159
+ entry.signal?.removeEventListener("abort", entry.abort);
160
+ entry.reject(error);
161
+ }
162
+ }
163
+ #fits(bytes) {
164
+ return (this.#inFlight < this.#limit &&
165
+ (this.#inFlight === 0 || this.#bytes + bytes <= this.#byteLimit));
166
+ }
167
+ #send(method, params, bytes) {
168
+ let reply;
169
+ try {
170
+ reply = this.#transport.request(method, params);
171
+ }
172
+ catch (error) {
173
+ // Thrown, not rejected: nothing went out.
174
+ return Promise.reject(error);
175
+ }
176
+ this.#inFlight++;
177
+ this.#bytes += bytes;
178
+ if (this.#inFlight > this.peak)
179
+ this.peak = this.#inFlight;
180
+ // Registered before the caller's own reaction, so the next request goes
181
+ // out before the caller's code runs on (no extra tick for it).
182
+ const done = () => {
183
+ this.#inFlight--;
184
+ this.#bytes -= bytes;
185
+ this.#pump();
186
+ };
187
+ reply.then(done, done);
188
+ return reply;
189
+ }
190
+ #pump() {
191
+ while (this.#count && !this.#closed) {
192
+ let entry = this.#waiting[this.#head];
193
+ while (!entry)
194
+ entry = this.#waiting[++this.#head];
195
+ if (!this.#fits(entry.bytes))
196
+ return;
197
+ this.#waiting[this.#head++] = undefined;
198
+ this.#count--;
199
+ if (entry.abort)
200
+ entry.signal.removeEventListener("abort", entry.abort);
201
+ entry.resolve(this.#send(entry.method, entry.params, entry.bytes));
202
+ }
203
+ // Drained: start the array again rather than let it grow.
204
+ if (!this.#count) {
205
+ this.#waiting = [];
206
+ this.#head = 0;
207
+ }
208
+ }
209
+ }
package/dist/source.d.ts CHANGED
@@ -124,6 +124,7 @@ export type SourceOperation = {
124
124
  };
125
125
  export declare function sourceClient(transport: Transport): {
126
126
  state: () => Promise<SourceState>;
127
- submit: (intent: SourceIntent, operationId?: number) => Promise<SourceOperation>;
127
+ /** `signal`: aborted while the submit still waits to be sent, it is not sent. */
128
+ submit: (intent: SourceIntent, operationId?: number, signal?: AbortSignal) => Promise<SourceOperation>;
128
129
  operation: (operationId: number) => Promise<SourceOperation>;
129
130
  };
package/dist/source.js CHANGED
@@ -2,16 +2,14 @@ export function sourceClient(transport) {
2
2
  let next = 0;
3
3
  return {
4
4
  state: () => transport.request("source.state"),
5
- submit: (intent, operationId) => {
5
+ /** `signal`: aborted while the submit still waits to be sent, it is not sent. */
6
+ submit: (intent, operationId, signal) => {
6
7
  operationId ??= next + 1;
7
8
  if (!Number.isSafeInteger(operationId) || operationId <= 0) {
8
9
  return Promise.reject(Object.assign(new TypeError("operationId must be a positive safe integer"), { code: "invalid" }));
9
10
  }
10
11
  next = Math.max(next, operationId);
11
- return transport.request("source.submit", {
12
- operationId,
13
- intent,
14
- });
12
+ return transport.request("source.submit", { operationId, intent }, { signal });
15
13
  },
16
14
  operation: (operationId) => transport.request("source.operation", { operationId }),
17
15
  };
@@ -174,8 +174,10 @@ export declare function subtitleClient(transport: Transport): {
174
174
  expected: SubtitleStamp;
175
175
  style: SubtitleStyle | null;
176
176
  }) => Promise<SubtitleState>;
177
- begin: (uploadId: number, generation: number, expectedBytes: number) => Promise<SubtitleUpload>;
178
- append: (uploadId: number, offset: number, base64: string) => Promise<SubtitleUpload>;
177
+ /** `signal`: aborted while the request still waits to be sent, it is not sent. */
178
+ begin: (uploadId: number, generation: number, expectedBytes: number, signal?: AbortSignal) => Promise<SubtitleUpload>;
179
+ /** `signal`: as for `begin`. */
180
+ append: (uploadId: number, offset: number, base64: string, signal?: AbortSignal) => Promise<SubtitleUpload>;
179
181
  discard: (uploadId: number) => Promise<void>;
180
182
  /** Atomic registration plus selection. inputOrigin guards a translation's original content revision. */
181
183
  commit: (options: {
package/dist/subtitles.js CHANGED
@@ -4,16 +4,10 @@ export function subtitleClient(transport) {
4
4
  state: () => transport.request("subtitles.state"),
5
5
  /** Property application is not a visible-frame or exact-font identity fence. */
6
6
  style: (options) => transport.request("subtitles.style", options),
7
- begin: (uploadId, generation, expectedBytes) => transport.request("subtitles.upload.begin", {
8
- uploadId,
9
- generation,
10
- expectedBytes,
11
- }),
12
- append: (uploadId, offset, base64) => transport.request("subtitles.upload.append", {
13
- uploadId,
14
- offset,
15
- base64,
16
- }),
7
+ /** `signal`: aborted while the request still waits to be sent, it is not sent. */
8
+ begin: (uploadId, generation, expectedBytes, signal) => transport.request("subtitles.upload.begin", { uploadId, generation, expectedBytes }, { signal }),
9
+ /** `signal`: as for `begin`. */
10
+ append: (uploadId, offset, base64, signal) => transport.request("subtitles.upload.append", { uploadId, offset, base64 }, { signal }),
17
11
  discard: (uploadId) => transport.request("subtitles.upload.discard", { uploadId }),
18
12
  /** Atomic registration plus selection. inputOrigin guards a translation's original content revision. */
19
13
  commit: (options) => transport.request("subtitles.commit", options),
package/dist/wire.d.ts CHANGED
@@ -655,7 +655,13 @@ export type TemplateArgsJson = ArgJson[] | {
655
655
  /** A text the player shows: source text, or a text value. */
656
656
  export type TextValueJson = string | TextJson | ListJson;
657
657
  export interface Transport {
658
- request<T>(method: string, params?: Json): Promise<T>;
658
+ /**
659
+ * One request. `options` belong to the plugin's side (the SDK's request
660
+ * queue, `request-queue.ts`) and are never sent; a runner ignores them.
661
+ */
662
+ request<T>(method: string, params?: Json, options?: {
663
+ signal?: AbortSignal;
664
+ }): Promise<T>;
659
665
  on(event: string, listener: (data: unknown) => void): () => void;
660
666
  /** Replaces the real local services (test host). */
661
667
  local?: LocalServices;
@@ -685,6 +691,21 @@ export declare function createWire(transport: Transport): {
685
691
  update: (id: string, revision: number, state: import("./commands.ts").CommandState, when?: import("./commands.ts").CommandWhen) => Promise<{
686
692
  revision: number;
687
693
  }>;
694
+ list: () => Promise<import("./index.ts").CommandList>;
695
+ run: (params: {
696
+ id: string;
697
+ ticket: string;
698
+ step?: number;
699
+ of?: number;
700
+ }) => Promise<import("./index.ts").CommandRunResult>;
701
+ };
702
+ /** The command palette's lead row (`palette.lead`). */
703
+ palette: {
704
+ set: (options: {
705
+ [key: string]: Json;
706
+ }) => Promise<void>;
707
+ clear: () => Promise<void>;
708
+ done: (ticket: string) => Promise<void>;
688
709
  };
689
710
  dialogs: {
690
711
  open: (options: {
@@ -1067,7 +1088,7 @@ export declare function createWire(transport: Transport): {
1067
1088
  };
1068
1089
  source: {
1069
1090
  state: () => Promise<import("./source.ts").SourceState>;
1070
- submit: (intent: import("./source.ts").SourceIntent, operationId?: number) => Promise<import("./source.ts").SourceOperation>;
1091
+ submit: (intent: import("./source.ts").SourceIntent, operationId?: number, signal?: AbortSignal) => Promise<import("./source.ts").SourceOperation>;
1071
1092
  operation: (operationId: number) => Promise<import("./source.ts").SourceOperation>;
1072
1093
  };
1073
1094
  sourceResolvers: {
@@ -1120,8 +1141,8 @@ export declare function createWire(transport: Transport): {
1120
1141
  expected: import("./subtitles.ts").SubtitleStamp;
1121
1142
  style: import("./subtitles.ts").SubtitleStyle | null;
1122
1143
  }) => Promise<import("./subtitles.ts").SubtitleState>;
1123
- begin: (uploadId: number, generation: number, expectedBytes: number) => Promise<import("./subtitles.ts").SubtitleUpload>;
1124
- append: (uploadId: number, offset: number, base64: string) => Promise<import("./subtitles.ts").SubtitleUpload>;
1144
+ begin: (uploadId: number, generation: number, expectedBytes: number, signal?: AbortSignal) => Promise<import("./subtitles.ts").SubtitleUpload>;
1145
+ append: (uploadId: number, offset: number, base64: string, signal?: AbortSignal) => Promise<import("./subtitles.ts").SubtitleUpload>;
1125
1146
  discard: (uploadId: number) => Promise<void>;
1126
1147
  commit: (options: {
1127
1148
  operationId: number;
package/dist/wire.js CHANGED
@@ -86,6 +86,12 @@ export function createWire(transport) {
86
86
  ...mediaClients(transport),
87
87
  processing: processingClient(transport),
88
88
  commands: commandClient(transport),
89
+ /** The command palette's lead row (`palette.lead`). */
90
+ palette: {
91
+ set: (options) => transport.request("palette.lead.set", options),
92
+ clear: () => transport.request("palette.lead.clear", {}),
93
+ done: (ticket) => transport.request("palette.lead.done", { ticket }),
94
+ },
89
95
  dialogs: {
90
96
  open: (options) => transport.request("dialogs.open", options),
91
97
  /** Message and detail are templates formatted with `args`. */
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.7.8: 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.10: 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,7 +25,7 @@
25
25
 
26
26
  ## API
27
27
 
28
- - `/API/Commands`: 15 entries: CommandState, Bindable, Condition, When, MenuId, BarButtonIcon, CommandButton, CommandOptions, Command, Commands, HostAction, Host, BindingRef, BindingInfo, Bindings
28
+ - `/API/Commands`: 23 entries: CommandState, Bindable, Condition, When, MenuId, BarButtonIcon, CommandButton, CommandOptions, Command, Commands, CommandRunOptions, CommandRunResult, CommandList, CommandInfo, Palette,…
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
31
  - `/API/Playback`: 33 entries: CommandKeys, MarkKind, TimelineMark, RangeStyle, TimelineRange, TimelineLayer, Timeline, AudioTrack, PlayerState, AudioDevice, Chapter, Conditional, Media, Scrub, StreamFrame,…
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.7.8",
3
+ "version": "1.7.10",
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": {
@@ -55,6 +55,10 @@ export global Icons {
55
55
  // Three sliders with their knobs (the adjust column, `host/adjust`),
56
56
  // the default 14 × 12 box.
57
57
  if name == "sliders" { return "M 1.5 2.5 H 7.6 M 10.4 2.5 H 12.5 M 10.4 2.5 A 1.4 1.4 0 1 1 7.6 2.5 A 1.4 1.4 0 1 1 10.4 2.5 Z M 1.5 6 H 3.1 M 5.9 6 H 12.5 M 5.9 6 A 1.4 1.4 0 1 1 3.1 6 A 1.4 1.4 0 1 1 5.9 6 Z M 1.5 9.5 H 6.6 M 9.4 9.5 H 12.5 M 9.4 9.5 A 1.4 1.4 0 1 1 6.6 9.5 A 1.4 1.4 0 1 1 9.4 9.5 Z"; }
58
+ // The magnifier with the AI icon's small cross at the same place (the
59
+ // palette's strip cell while a plugin holds its first row,
60
+ // `palette.lead`), the default 14 × 12 box.
61
+ if name == "search-ai" { return "M 8.5 5.75 A 3.75 3.75 0 1 1 1 5.75 A 3.75 3.75 0 1 1 8.5 5.75 Z M 7.5 8.5 L 10.75 11.25 M 11.5 1.2 V 3.8 M 10.2 2.5 H 12.8"; }
58
62
  return "";
59
63
  }
60
64
  // Line width.