@stina/extension-api 1.17.0 → 1.18.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/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.cts +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/schemas/index.cjs +529 -524
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +230 -222
- package/dist/schemas/index.d.ts +230 -222
- package/dist/schemas/index.js +529 -524
- package/dist/schemas/index.js.map +1 -1
- package/dist/{types.tools-DswDxtun.d.cts → types.tools-D_srSS_m.d.cts} +46 -46
- package/dist/{types.tools-DswDxtun.d.ts → types.tools-D_srSS_m.d.ts} +46 -46
- package/package.json +1 -1
- package/schema/extension-manifest.schema.json +42 -21
- package/src/schemas/card.schema.ts +14 -13
- package/src/schemas/components.schema.ts +42 -41
- package/src/schemas/contributions.schema.ts +7 -14
- package/src/schemas/localization.schema.ts +15 -0
- package/src/types.components.ts +43 -41
- package/src/types.contributions.ts +5 -5
package/dist/schemas/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-DGUM43GV.js";
|
|
2
2
|
|
|
3
3
|
// src/schemas/manifest.schema.ts
|
|
4
|
-
import { z as
|
|
4
|
+
import { z as z5 } from "zod";
|
|
5
5
|
|
|
6
6
|
// src/schemas/permissions.schema.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -88,11 +88,17 @@ function isValidPermission(permission) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// src/schemas/contributions.schema.ts
|
|
91
|
-
import { z as
|
|
91
|
+
import { z as z4 } from "zod";
|
|
92
92
|
|
|
93
93
|
// src/schemas/components.schema.ts
|
|
94
|
+
import { z as z3 } from "zod";
|
|
95
|
+
|
|
96
|
+
// src/schemas/localization.schema.ts
|
|
94
97
|
import { z as z2 } from "zod";
|
|
95
|
-
var
|
|
98
|
+
var LocalizedStringSchema = z2.union([z2.string(), z2.record(z2.string())]).describe("String or localized string map");
|
|
99
|
+
|
|
100
|
+
// src/schemas/components.schema.ts
|
|
101
|
+
var AllowedCSSPropertySchema = z3.enum([
|
|
96
102
|
// Colors
|
|
97
103
|
"color",
|
|
98
104
|
"background-color",
|
|
@@ -164,252 +170,252 @@ var AllowedCSSPropertySchema = z2.enum([
|
|
|
164
170
|
"border-collapse",
|
|
165
171
|
"border-spacing"
|
|
166
172
|
]);
|
|
167
|
-
var ExtensionComponentStyleSchema =
|
|
168
|
-
var ExtensionComponentDataSchema =
|
|
169
|
-
() =>
|
|
170
|
-
component:
|
|
173
|
+
var ExtensionComponentStyleSchema = z3.record(AllowedCSSPropertySchema, z3.string()).describe("Safe CSS styles for the component");
|
|
174
|
+
var ExtensionComponentDataSchema = z3.lazy(
|
|
175
|
+
() => z3.object({
|
|
176
|
+
component: z3.string().describe("Component type name"),
|
|
171
177
|
style: ExtensionComponentStyleSchema.optional()
|
|
172
178
|
}).passthrough().describe("Extension component definition")
|
|
173
179
|
);
|
|
174
|
-
var ExtensionActionCallSchema =
|
|
175
|
-
action:
|
|
176
|
-
params:
|
|
180
|
+
var ExtensionActionCallSchema = z3.object({
|
|
181
|
+
action: z3.string().describe("Name of the registered action"),
|
|
182
|
+
params: z3.record(z3.unknown()).optional().describe("Parameters to pass")
|
|
177
183
|
}).describe("Action call with parameters");
|
|
178
|
-
var ExtensionActionRefSchema =
|
|
179
|
-
var ExtensionComponentIteratorSchema =
|
|
180
|
-
each:
|
|
181
|
-
as:
|
|
182
|
-
items:
|
|
184
|
+
var ExtensionActionRefSchema = z3.union([z3.string(), ExtensionActionCallSchema]).describe("Action reference");
|
|
185
|
+
var ExtensionComponentIteratorSchema = z3.object({
|
|
186
|
+
each: z3.union([z3.string(), z3.array(z3.unknown())]).describe("Data source to iterate over"),
|
|
187
|
+
as: z3.string().describe("Variable name for current item in scope"),
|
|
188
|
+
items: z3.array(ExtensionComponentDataSchema).describe("Components to render for each item")
|
|
183
189
|
}).describe("Iterator for rendering lists");
|
|
184
|
-
var ExtensionComponentChildrenSchema =
|
|
185
|
-
var ExtensionDataSourceSchema =
|
|
186
|
-
action:
|
|
187
|
-
params:
|
|
188
|
-
refreshOn:
|
|
190
|
+
var ExtensionComponentChildrenSchema = z3.union([z3.array(ExtensionComponentDataSchema), ExtensionComponentIteratorSchema]).describe("Child components or iterator");
|
|
191
|
+
var ExtensionDataSourceSchema = z3.object({
|
|
192
|
+
action: z3.string().describe("Action to call for fetching data"),
|
|
193
|
+
params: z3.record(z3.unknown()).optional().describe("Parameters to pass to the action"),
|
|
194
|
+
refreshOn: z3.array(z3.string()).optional().describe("Event names that trigger a refresh")
|
|
189
195
|
}).describe("Data source definition");
|
|
190
|
-
var HeaderPropsSchema =
|
|
191
|
-
component:
|
|
192
|
-
level:
|
|
193
|
-
title:
|
|
194
|
-
description:
|
|
195
|
-
icon:
|
|
196
|
+
var HeaderPropsSchema = z3.object({
|
|
197
|
+
component: z3.literal("Header"),
|
|
198
|
+
level: z3.number().min(1).max(6).describe("Heading level (1-6)"),
|
|
199
|
+
title: LocalizedStringSchema.describe("Header title"),
|
|
200
|
+
description: z3.union([LocalizedStringSchema, z3.array(LocalizedStringSchema)]).optional().describe("Description text"),
|
|
201
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
196
202
|
style: ExtensionComponentStyleSchema.optional()
|
|
197
203
|
}).passthrough().describe("Header component");
|
|
198
|
-
var LabelPropsSchema =
|
|
199
|
-
component:
|
|
200
|
-
text:
|
|
204
|
+
var LabelPropsSchema = z3.object({
|
|
205
|
+
component: z3.literal("Label"),
|
|
206
|
+
text: LocalizedStringSchema.describe("Label text"),
|
|
201
207
|
style: ExtensionComponentStyleSchema.optional()
|
|
202
208
|
}).passthrough().describe("Label component");
|
|
203
|
-
var ClockPropsSchema =
|
|
204
|
-
component:
|
|
209
|
+
var ClockPropsSchema = z3.object({
|
|
210
|
+
component: z3.literal("Clock"),
|
|
205
211
|
style: ExtensionComponentStyleSchema.optional()
|
|
206
212
|
}).passthrough().describe("Clock component: the current date and time where the user is");
|
|
207
|
-
var ParagraphPropsSchema =
|
|
208
|
-
component:
|
|
209
|
-
text:
|
|
213
|
+
var ParagraphPropsSchema = z3.object({
|
|
214
|
+
component: z3.literal("Paragraph"),
|
|
215
|
+
text: LocalizedStringSchema.describe("Paragraph text"),
|
|
210
216
|
style: ExtensionComponentStyleSchema.optional()
|
|
211
217
|
}).passthrough().describe("Paragraph component");
|
|
212
|
-
var ButtonPropsSchema =
|
|
213
|
-
component:
|
|
214
|
-
text:
|
|
215
|
-
type:
|
|
216
|
-
title:
|
|
217
|
-
disabled:
|
|
218
|
+
var ButtonPropsSchema = z3.object({
|
|
219
|
+
component: z3.literal("Button"),
|
|
220
|
+
text: LocalizedStringSchema.describe("Button text"),
|
|
221
|
+
type: z3.enum(["normal", "primary", "danger", "accent"]).optional().describe("Visual style"),
|
|
222
|
+
title: LocalizedStringSchema.optional().describe("Tooltip shown on hover"),
|
|
223
|
+
disabled: z3.boolean().optional().describe("Disable the button"),
|
|
218
224
|
onClickAction: ExtensionActionRefSchema.describe("Action to call on click"),
|
|
219
225
|
style: ExtensionComponentStyleSchema.optional()
|
|
220
226
|
}).passthrough().describe("Button component");
|
|
221
|
-
var TextInputPropsSchema =
|
|
222
|
-
component:
|
|
223
|
-
label:
|
|
224
|
-
placeholder:
|
|
225
|
-
value:
|
|
227
|
+
var TextInputPropsSchema = z3.object({
|
|
228
|
+
component: z3.literal("TextInput"),
|
|
229
|
+
label: LocalizedStringSchema.describe("Input label"),
|
|
230
|
+
placeholder: LocalizedStringSchema.optional().describe("Placeholder text"),
|
|
231
|
+
value: z3.string().optional().describe("Current value"),
|
|
226
232
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
227
233
|
style: ExtensionComponentStyleSchema.optional()
|
|
228
234
|
}).passthrough().describe("TextInput component");
|
|
229
|
-
var PasswordInputPropsSchema =
|
|
230
|
-
component:
|
|
231
|
-
label:
|
|
232
|
-
placeholder:
|
|
233
|
-
value:
|
|
235
|
+
var PasswordInputPropsSchema = z3.object({
|
|
236
|
+
component: z3.literal("PasswordInput"),
|
|
237
|
+
label: LocalizedStringSchema.describe("Input label"),
|
|
238
|
+
placeholder: LocalizedStringSchema.optional().describe("Placeholder text"),
|
|
239
|
+
value: z3.string().optional().describe("Current value"),
|
|
234
240
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
235
241
|
style: ExtensionComponentStyleSchema.optional()
|
|
236
242
|
}).passthrough().describe("Password input component (text is masked)");
|
|
237
|
-
var NumberInputPropsSchema =
|
|
238
|
-
component:
|
|
239
|
-
label:
|
|
240
|
-
placeholder:
|
|
241
|
-
value:
|
|
242
|
-
min:
|
|
243
|
-
max:
|
|
244
|
-
step:
|
|
243
|
+
var NumberInputPropsSchema = z3.object({
|
|
244
|
+
component: z3.literal("NumberInput"),
|
|
245
|
+
label: LocalizedStringSchema.describe("Input label"),
|
|
246
|
+
placeholder: LocalizedStringSchema.optional().describe("Placeholder text"),
|
|
247
|
+
value: z3.union([z3.string(), z3.number()]).optional().describe("Current value"),
|
|
248
|
+
min: z3.number().optional().describe("Minimum value"),
|
|
249
|
+
max: z3.number().optional().describe("Maximum value"),
|
|
250
|
+
step: z3.number().optional().describe("Step"),
|
|
245
251
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
246
252
|
style: ExtensionComponentStyleSchema.optional()
|
|
247
253
|
}).passthrough().describe("Numeric input component");
|
|
248
|
-
var TextAreaPropsSchema =
|
|
249
|
-
component:
|
|
250
|
-
label:
|
|
251
|
-
placeholder:
|
|
252
|
-
value:
|
|
253
|
-
rows:
|
|
254
|
+
var TextAreaPropsSchema = z3.object({
|
|
255
|
+
component: z3.literal("TextArea"),
|
|
256
|
+
label: LocalizedStringSchema.describe("Input label"),
|
|
257
|
+
placeholder: LocalizedStringSchema.optional().describe("Placeholder text"),
|
|
258
|
+
value: z3.string().optional().describe("Current value"),
|
|
259
|
+
rows: z3.number().int().positive().optional().describe("Number of visible text rows"),
|
|
254
260
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
255
261
|
style: ExtensionComponentStyleSchema.optional()
|
|
256
262
|
}).passthrough().describe("TextArea component for multi-line text input");
|
|
257
|
-
var DateTimeInputPropsSchema =
|
|
258
|
-
component:
|
|
259
|
-
label:
|
|
260
|
-
value:
|
|
263
|
+
var DateTimeInputPropsSchema = z3.object({
|
|
264
|
+
component: z3.literal("DateTimeInput"),
|
|
265
|
+
label: LocalizedStringSchema.describe("Input label"),
|
|
266
|
+
value: z3.string().optional().describe("Current value"),
|
|
261
267
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
262
268
|
style: ExtensionComponentStyleSchema.optional()
|
|
263
269
|
}).passthrough().describe("DateTimeInput component");
|
|
264
|
-
var SelectPropsSchema =
|
|
265
|
-
component:
|
|
266
|
-
label:
|
|
267
|
-
options:
|
|
268
|
-
selectedValue:
|
|
270
|
+
var SelectPropsSchema = z3.object({
|
|
271
|
+
component: z3.literal("Select"),
|
|
272
|
+
label: LocalizedStringSchema.describe("Select label"),
|
|
273
|
+
options: z3.array(z3.object({ label: LocalizedStringSchema, value: z3.string() })).describe("Available options"),
|
|
274
|
+
selectedValue: z3.string().optional().describe("Currently selected value"),
|
|
269
275
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
270
276
|
style: ExtensionComponentStyleSchema.optional()
|
|
271
277
|
}).passthrough().describe("Select component");
|
|
272
|
-
var IconPickerPropsSchema =
|
|
273
|
-
component:
|
|
274
|
-
label:
|
|
275
|
-
value:
|
|
278
|
+
var IconPickerPropsSchema = z3.object({
|
|
279
|
+
component: z3.literal("IconPicker"),
|
|
280
|
+
label: LocalizedStringSchema.optional().describe("Picker label"),
|
|
281
|
+
value: z3.string().optional().describe("Currently selected icon name"),
|
|
276
282
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
277
283
|
style: ExtensionComponentStyleSchema.optional()
|
|
278
284
|
}).passthrough().describe("IconPicker component");
|
|
279
|
-
var VerticalStackPropsSchema =
|
|
280
|
-
component:
|
|
281
|
-
gap:
|
|
285
|
+
var VerticalStackPropsSchema = z3.object({
|
|
286
|
+
component: z3.literal("VerticalStack"),
|
|
287
|
+
gap: z3.number().optional().describe("Gap between children"),
|
|
282
288
|
children: ExtensionComponentChildrenSchema.describe("Child components"),
|
|
283
289
|
style: ExtensionComponentStyleSchema.optional()
|
|
284
290
|
}).passthrough().describe("VerticalStack layout component");
|
|
285
|
-
var HorizontalStackPropsSchema =
|
|
286
|
-
component:
|
|
287
|
-
gap:
|
|
291
|
+
var HorizontalStackPropsSchema = z3.object({
|
|
292
|
+
component: z3.literal("HorizontalStack"),
|
|
293
|
+
gap: z3.number().optional().describe("Gap between children"),
|
|
288
294
|
children: ExtensionComponentChildrenSchema.describe("Child components"),
|
|
289
295
|
style: ExtensionComponentStyleSchema.optional()
|
|
290
296
|
}).passthrough().describe("HorizontalStack layout component");
|
|
291
|
-
var GridPropsSchema =
|
|
292
|
-
component:
|
|
293
|
-
columns:
|
|
294
|
-
gap:
|
|
297
|
+
var GridPropsSchema = z3.object({
|
|
298
|
+
component: z3.literal("Grid"),
|
|
299
|
+
columns: z3.number().describe("Number of columns"),
|
|
300
|
+
gap: z3.number().optional().describe("Gap between items"),
|
|
295
301
|
children: ExtensionComponentChildrenSchema.describe("Child components"),
|
|
296
302
|
style: ExtensionComponentStyleSchema.optional()
|
|
297
303
|
}).passthrough().describe("Grid layout component");
|
|
298
|
-
var DividerPropsSchema =
|
|
299
|
-
component:
|
|
304
|
+
var DividerPropsSchema = z3.object({
|
|
305
|
+
component: z3.literal("Divider"),
|
|
300
306
|
style: ExtensionComponentStyleSchema.optional()
|
|
301
307
|
}).passthrough().describe("Divider component");
|
|
302
|
-
var IconPropsSchema =
|
|
303
|
-
component:
|
|
304
|
-
name:
|
|
305
|
-
title:
|
|
308
|
+
var IconPropsSchema = z3.object({
|
|
309
|
+
component: z3.literal("Icon"),
|
|
310
|
+
name: z3.string().describe("Icon name"),
|
|
311
|
+
title: LocalizedStringSchema.optional().describe("Icon title"),
|
|
306
312
|
style: ExtensionComponentStyleSchema.optional()
|
|
307
313
|
}).passthrough().describe("Icon component");
|
|
308
|
-
var IconButtonTypeSchema =
|
|
309
|
-
var IconButtonPropsSchema =
|
|
310
|
-
component:
|
|
311
|
-
icon:
|
|
312
|
-
tooltip:
|
|
313
|
-
active:
|
|
314
|
-
disabled:
|
|
314
|
+
var IconButtonTypeSchema = z3.enum(["normal", "primary", "danger", "accent"]).describe("Button type");
|
|
315
|
+
var IconButtonPropsSchema = z3.object({
|
|
316
|
+
component: z3.literal("IconButton"),
|
|
317
|
+
icon: z3.string().describe("Icon name"),
|
|
318
|
+
tooltip: LocalizedStringSchema.describe("Tooltip text"),
|
|
319
|
+
active: z3.boolean().optional().describe("Whether the button is active"),
|
|
320
|
+
disabled: z3.boolean().optional().describe("Whether the button is disabled"),
|
|
315
321
|
type: IconButtonTypeSchema.optional().describe("Button style type"),
|
|
316
322
|
onClickAction: ExtensionActionRefSchema.describe("Action to call on click"),
|
|
317
323
|
style: ExtensionComponentStyleSchema.optional()
|
|
318
324
|
}).passthrough().describe("IconButton component");
|
|
319
|
-
var PanelActionSchema =
|
|
320
|
-
icon:
|
|
321
|
-
tooltip:
|
|
325
|
+
var PanelActionSchema = z3.object({
|
|
326
|
+
icon: z3.string().describe("Icon name"),
|
|
327
|
+
tooltip: LocalizedStringSchema.describe("Tooltip text"),
|
|
322
328
|
action: ExtensionActionRefSchema.describe("Action to call"),
|
|
323
329
|
type: IconButtonTypeSchema.optional().describe("Button style type")
|
|
324
330
|
}).describe("Panel action button");
|
|
325
|
-
var PanelPropsSchema =
|
|
326
|
-
component:
|
|
327
|
-
title:
|
|
328
|
-
description:
|
|
329
|
-
icon:
|
|
330
|
-
actions:
|
|
331
|
+
var PanelPropsSchema = z3.object({
|
|
332
|
+
component: z3.literal("Panel"),
|
|
333
|
+
title: LocalizedStringSchema.describe("Panel title"),
|
|
334
|
+
description: z3.union([LocalizedStringSchema, z3.array(LocalizedStringSchema)]).optional().describe("Description text"),
|
|
335
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
336
|
+
actions: z3.array(PanelActionSchema).optional().describe("Action buttons"),
|
|
331
337
|
content: ExtensionComponentDataSchema.optional().describe("Panel content"),
|
|
332
338
|
style: ExtensionComponentStyleSchema.optional()
|
|
333
339
|
}).passthrough().describe("Panel component");
|
|
334
|
-
var TogglePropsSchema =
|
|
335
|
-
component:
|
|
336
|
-
label:
|
|
337
|
-
description:
|
|
338
|
-
checked:
|
|
339
|
-
disabled:
|
|
340
|
+
var TogglePropsSchema = z3.object({
|
|
341
|
+
component: z3.literal("Toggle"),
|
|
342
|
+
label: LocalizedStringSchema.optional().describe("Toggle label"),
|
|
343
|
+
description: LocalizedStringSchema.optional().describe("Description text"),
|
|
344
|
+
checked: z3.boolean().optional().describe("Whether the toggle is checked"),
|
|
345
|
+
disabled: z3.boolean().optional().describe("Whether the toggle is disabled"),
|
|
340
346
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
341
347
|
style: ExtensionComponentStyleSchema.optional()
|
|
342
348
|
}).passthrough().describe("Toggle component");
|
|
343
|
-
var CollapsiblePropsSchema =
|
|
344
|
-
component:
|
|
345
|
-
title:
|
|
346
|
-
description:
|
|
347
|
-
icon:
|
|
348
|
-
defaultExpanded:
|
|
349
|
+
var CollapsiblePropsSchema = z3.object({
|
|
350
|
+
component: z3.literal("Collapsible"),
|
|
351
|
+
title: LocalizedStringSchema.describe("Title displayed in the header"),
|
|
352
|
+
description: z3.union([LocalizedStringSchema, z3.array(LocalizedStringSchema)]).optional().describe("Description text"),
|
|
353
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
354
|
+
defaultExpanded: z3.boolean().optional().describe("Whether expanded by default"),
|
|
349
355
|
content: ExtensionComponentDataSchema.optional().describe("Content when expanded"),
|
|
350
356
|
style: ExtensionComponentStyleSchema.optional()
|
|
351
357
|
}).passthrough().describe("Collapsible component");
|
|
352
|
-
var PillVariantSchema =
|
|
353
|
-
var PillPropsSchema =
|
|
354
|
-
component:
|
|
355
|
-
text:
|
|
356
|
-
icon:
|
|
358
|
+
var PillVariantSchema = z3.enum(["default", "primary", "success", "warning", "danger", "accent"]).describe("Pill color variant");
|
|
359
|
+
var PillPropsSchema = z3.object({
|
|
360
|
+
component: z3.literal("Pill"),
|
|
361
|
+
text: LocalizedStringSchema.describe("Pill text"),
|
|
362
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
357
363
|
variant: PillVariantSchema.optional().describe("Color variant"),
|
|
358
364
|
style: ExtensionComponentStyleSchema.optional()
|
|
359
365
|
}).passthrough().describe("Pill component");
|
|
360
|
-
var CheckboxPropsSchema =
|
|
361
|
-
component:
|
|
362
|
-
label:
|
|
363
|
-
checked:
|
|
364
|
-
disabled:
|
|
365
|
-
strikethrough:
|
|
366
|
+
var CheckboxPropsSchema = z3.object({
|
|
367
|
+
component: z3.literal("Checkbox"),
|
|
368
|
+
label: LocalizedStringSchema.describe("Checkbox label"),
|
|
369
|
+
checked: z3.boolean().optional().describe("Whether the checkbox is checked"),
|
|
370
|
+
disabled: z3.boolean().optional().describe("Whether the checkbox is disabled"),
|
|
371
|
+
strikethrough: z3.boolean().optional().describe("Strike through label when checked"),
|
|
366
372
|
onChangeAction: ExtensionActionRefSchema.optional().describe("Action to call on change"),
|
|
367
373
|
style: ExtensionComponentStyleSchema.optional()
|
|
368
374
|
}).passthrough().describe("Checkbox component");
|
|
369
|
-
var MarkdownPropsSchema =
|
|
370
|
-
component:
|
|
371
|
-
content:
|
|
375
|
+
var MarkdownPropsSchema = z3.object({
|
|
376
|
+
component: z3.literal("Markdown"),
|
|
377
|
+
content: LocalizedStringSchema.describe("Markdown content"),
|
|
372
378
|
style: ExtensionComponentStyleSchema.optional()
|
|
373
379
|
}).passthrough().describe("Markdown component");
|
|
374
|
-
var TextPreviewPropsSchema =
|
|
375
|
-
component:
|
|
376
|
-
content:
|
|
377
|
-
maxLines:
|
|
380
|
+
var TextPreviewPropsSchema = z3.object({
|
|
381
|
+
component: z3.literal("TextPreview"),
|
|
382
|
+
content: z3.string().describe("Markdown content"),
|
|
383
|
+
maxLines: z3.number().optional().describe("Max visible lines before truncating (default 5)"),
|
|
378
384
|
style: ExtensionComponentStyleSchema.optional()
|
|
379
385
|
}).passthrough().describe("TextPreview component");
|
|
380
|
-
var ModalPropsSchema =
|
|
381
|
-
component:
|
|
382
|
-
title:
|
|
383
|
-
open:
|
|
384
|
-
maxWidth:
|
|
386
|
+
var ModalPropsSchema = z3.object({
|
|
387
|
+
component: z3.literal("Modal"),
|
|
388
|
+
title: LocalizedStringSchema.describe("Modal title"),
|
|
389
|
+
open: z3.boolean().optional().describe("Whether the modal is open"),
|
|
390
|
+
maxWidth: z3.string().optional().describe("Max width of the modal"),
|
|
385
391
|
body: ExtensionComponentDataSchema.optional().describe("Modal body content"),
|
|
386
392
|
footer: ExtensionComponentDataSchema.optional().describe("Modal footer content"),
|
|
387
393
|
onCloseAction: ExtensionActionRefSchema.optional().describe("Action to call on close"),
|
|
388
394
|
style: ExtensionComponentStyleSchema.optional()
|
|
389
395
|
}).passthrough().describe("Modal component");
|
|
390
|
-
var ConditionalGroupPropsSchema =
|
|
391
|
-
component:
|
|
392
|
-
condition:
|
|
396
|
+
var ConditionalGroupPropsSchema = z3.object({
|
|
397
|
+
component: z3.literal("ConditionalGroup"),
|
|
398
|
+
condition: z3.string().describe("Condition expression to evaluate"),
|
|
393
399
|
children: ExtensionComponentChildrenSchema.describe("Children to render when condition is true"),
|
|
394
400
|
style: ExtensionComponentStyleSchema.optional()
|
|
395
401
|
}).passthrough().describe("ConditionalGroup component");
|
|
396
|
-
var FrameVariantSchema =
|
|
397
|
-
var FramePropsSchema =
|
|
398
|
-
component:
|
|
399
|
-
title:
|
|
400
|
-
icon:
|
|
401
|
-
collapsible:
|
|
402
|
-
defaultExpanded:
|
|
402
|
+
var FrameVariantSchema = z3.enum(["border", "solid"]).describe("Frame visual variant");
|
|
403
|
+
var FramePropsSchema = z3.object({
|
|
404
|
+
component: z3.literal("Frame"),
|
|
405
|
+
title: z3.union([LocalizedStringSchema, ExtensionComponentChildrenSchema]).optional().describe("Optional title (string or components)"),
|
|
406
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
407
|
+
collapsible: z3.boolean().optional().describe("Whether content can be toggled"),
|
|
408
|
+
defaultExpanded: z3.boolean().optional().describe("Whether expanded by default"),
|
|
403
409
|
variant: FrameVariantSchema.optional().describe("Visual variant"),
|
|
404
410
|
children: ExtensionComponentChildrenSchema.describe("Child components"),
|
|
405
411
|
style: ExtensionComponentStyleSchema.optional()
|
|
406
412
|
}).passthrough().describe("Frame container component");
|
|
407
|
-
var ListPropsSchema =
|
|
408
|
-
component:
|
|
413
|
+
var ListPropsSchema = z3.object({
|
|
414
|
+
component: z3.literal("List"),
|
|
409
415
|
children: ExtensionComponentChildrenSchema.describe("Child components rendered as list items"),
|
|
410
416
|
style: ExtensionComponentStyleSchema.optional()
|
|
411
417
|
}).passthrough().describe("List component");
|
|
412
|
-
var WeatherConditionSchema =
|
|
418
|
+
var WeatherConditionSchema = z3.enum([
|
|
413
419
|
"clear",
|
|
414
420
|
"partly-cloudy",
|
|
415
421
|
"cloudy",
|
|
@@ -426,164 +432,164 @@ var WeatherConditionSchema = z2.enum([
|
|
|
426
432
|
"hail",
|
|
427
433
|
"windy"
|
|
428
434
|
]).describe("Weather condition");
|
|
429
|
-
var WeatherWindSchema =
|
|
430
|
-
speed:
|
|
431
|
-
unit:
|
|
432
|
-
direction:
|
|
433
|
-
gust:
|
|
435
|
+
var WeatherWindSchema = z3.object({
|
|
436
|
+
speed: z3.number().describe("Sustained wind speed"),
|
|
437
|
+
unit: z3.string().optional().describe("Unit written after the speed. Defaults to m/s"),
|
|
438
|
+
direction: z3.string().optional().describe("Compass direction, in the caller's own words"),
|
|
439
|
+
gust: z3.number().optional().describe("Gust speed, in the same unit")
|
|
434
440
|
}).passthrough().describe("Wind reading");
|
|
435
|
-
var WeatherNowPropsSchema =
|
|
436
|
-
component:
|
|
437
|
-
place:
|
|
441
|
+
var WeatherNowPropsSchema = z3.object({
|
|
442
|
+
component: z3.literal("WeatherNow"),
|
|
443
|
+
place: z3.string().describe("Where the reading is from"),
|
|
438
444
|
condition: WeatherConditionSchema,
|
|
439
|
-
conditionLabel:
|
|
440
|
-
temperature:
|
|
441
|
-
feelsLike:
|
|
442
|
-
unit:
|
|
445
|
+
conditionLabel: z3.string().optional().describe("The condition in the user's own language"),
|
|
446
|
+
temperature: z3.number().describe("Current temperature"),
|
|
447
|
+
feelsLike: z3.number().optional().describe("Apparent temperature"),
|
|
448
|
+
unit: z3.string().optional().describe("Written after every temperature. Defaults to \xB0"),
|
|
443
449
|
wind: WeatherWindSchema.optional(),
|
|
444
|
-
night:
|
|
445
|
-
summary:
|
|
450
|
+
night: z3.boolean().optional().describe("Draw the night variant of the icon"),
|
|
451
|
+
summary: z3.string().optional().describe("One line of context under the numbers"),
|
|
446
452
|
style: ExtensionComponentStyleSchema.optional()
|
|
447
453
|
}).passthrough().describe("Current weather component");
|
|
448
|
-
var WeatherForecastStepSchema =
|
|
449
|
-
label:
|
|
454
|
+
var WeatherForecastStepSchema = z3.object({
|
|
455
|
+
label: z3.string().describe("Short step label, e.g. 14 or Tors"),
|
|
450
456
|
condition: WeatherConditionSchema,
|
|
451
|
-
conditionLabel:
|
|
452
|
-
high:
|
|
453
|
-
low:
|
|
454
|
-
night:
|
|
455
|
-
precipitation:
|
|
456
|
-
current:
|
|
457
|
+
conditionLabel: z3.string().optional(),
|
|
458
|
+
high: z3.number().describe("The warmer temperature, or the only one"),
|
|
459
|
+
low: z3.number().optional().describe("The colder temperature"),
|
|
460
|
+
night: z3.boolean().optional(),
|
|
461
|
+
precipitation: z3.number().min(0).max(100).optional().describe("Chance of precipitation, 0-100"),
|
|
462
|
+
current: z3.boolean().optional().describe("The step the reader is at; drawn larger")
|
|
457
463
|
}).passthrough().describe("One forecast step");
|
|
458
|
-
var WeatherForecastPropsSchema =
|
|
459
|
-
component:
|
|
460
|
-
title:
|
|
461
|
-
icon:
|
|
462
|
-
unit:
|
|
463
|
-
steps:
|
|
464
|
+
var WeatherForecastPropsSchema = z3.object({
|
|
465
|
+
component: z3.literal("WeatherForecast"),
|
|
466
|
+
title: LocalizedStringSchema.optional().describe("Heading above the row"),
|
|
467
|
+
icon: z3.string().optional().describe("Icon shown to the left of the title"),
|
|
468
|
+
unit: z3.string().optional().describe("Written after every temperature. Defaults to \xB0"),
|
|
469
|
+
steps: z3.array(WeatherForecastStepSchema).min(1).describe("Steps, hourly or daily"),
|
|
464
470
|
style: ExtensionComponentStyleSchema.optional()
|
|
465
471
|
}).passthrough().describe("Weather forecast component");
|
|
466
|
-
var ChartKindSchema =
|
|
467
|
-
var ChartSeriesSchema =
|
|
468
|
-
name:
|
|
469
|
-
points:
|
|
472
|
+
var ChartKindSchema = z3.enum(["line", "bar", "area"]).describe("How the chart draws");
|
|
473
|
+
var ChartSeriesSchema = z3.object({
|
|
474
|
+
name: z3.string().optional().describe("Named in the legend"),
|
|
475
|
+
points: z3.array(z3.number().nullable()).describe("One value per label. null is a gap, drawn as one")
|
|
470
476
|
}).passthrough().describe("One chart series");
|
|
471
|
-
var ChartPropsSchema =
|
|
472
|
-
component:
|
|
477
|
+
var ChartPropsSchema = z3.object({
|
|
478
|
+
component: z3.literal("Chart"),
|
|
473
479
|
chart: ChartKindSchema.optional().describe("Defaults to line"),
|
|
474
|
-
series:
|
|
475
|
-
labels:
|
|
476
|
-
title:
|
|
477
|
-
icon:
|
|
478
|
-
unit:
|
|
479
|
-
zeroBaseline:
|
|
480
|
-
height:
|
|
480
|
+
series: z3.array(ChartSeriesSchema).min(1).max(8).describe("At most eight series"),
|
|
481
|
+
labels: z3.array(z3.string()).optional().describe("One per point, along the horizontal axis"),
|
|
482
|
+
title: LocalizedStringSchema.optional().describe("Heading above the plot"),
|
|
483
|
+
icon: z3.string().optional().describe("Icon shown to the left of the title"),
|
|
484
|
+
unit: z3.string().optional().describe("Written after every value"),
|
|
485
|
+
zeroBaseline: z3.boolean().optional().describe("Force the value axis to include zero"),
|
|
486
|
+
height: z3.number().min(4).max(24).optional().describe("Plot height in rem. Defaults to 9"),
|
|
481
487
|
style: ExtensionComponentStyleSchema.optional()
|
|
482
488
|
}).passthrough().describe("Chart component");
|
|
483
|
-
var StatTrendSchema =
|
|
484
|
-
var StatTilePropsSchema =
|
|
485
|
-
component:
|
|
486
|
-
label:
|
|
487
|
-
value:
|
|
488
|
-
unit:
|
|
489
|
-
caption:
|
|
490
|
-
icon:
|
|
489
|
+
var StatTrendSchema = z3.enum(["up", "down", "flat"]).describe("Direction of change");
|
|
490
|
+
var StatTilePropsSchema = z3.object({
|
|
491
|
+
component: z3.literal("StatTile"),
|
|
492
|
+
label: LocalizedStringSchema.describe("What the number is"),
|
|
493
|
+
value: z3.union([z3.string(), z3.number()]).describe("The number itself"),
|
|
494
|
+
unit: z3.string().optional().describe("Written after the value in smaller type"),
|
|
495
|
+
caption: LocalizedStringSchema.optional().describe("One quiet line under the number"),
|
|
496
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
491
497
|
trend: StatTrendSchema.optional(),
|
|
492
|
-
trendLabel:
|
|
493
|
-
trendIsGood:
|
|
498
|
+
trendLabel: z3.string().optional().describe("The change in words"),
|
|
499
|
+
trendIsGood: z3.boolean().optional().describe("Whether up is the good direction. Defaults to true"),
|
|
494
500
|
style: ExtensionComponentStyleSchema.optional()
|
|
495
501
|
}).passthrough().describe("Single-number stat tile component");
|
|
496
|
-
var ProgressShapeSchema =
|
|
497
|
-
var ProgressColorSchema =
|
|
498
|
-
var ProgressBarPropsSchema =
|
|
499
|
-
component:
|
|
500
|
-
label:
|
|
501
|
-
value:
|
|
502
|
-
min:
|
|
503
|
-
max:
|
|
502
|
+
var ProgressShapeSchema = z3.enum(["bar", "circle"]).describe("Drawn as a rail or as a ring");
|
|
503
|
+
var ProgressColorSchema = z3.enum(["accent", "success", "warning", "danger", "info", "neutral"]).describe("One of the theme colours");
|
|
504
|
+
var ProgressBarPropsSchema = z3.object({
|
|
505
|
+
component: z3.literal("ProgressBar"),
|
|
506
|
+
label: LocalizedStringSchema.describe("What is being measured"),
|
|
507
|
+
value: z3.number().describe("Where the reading sits. Clamped to the range"),
|
|
508
|
+
min: z3.number().optional().describe("Bottom of the range. Defaults to 0"),
|
|
509
|
+
max: z3.number().optional().describe("Top of the range. Defaults to 100"),
|
|
504
510
|
shape: ProgressShapeSchema.optional().describe("Defaults to bar"),
|
|
505
511
|
color: ProgressColorSchema.optional().describe("Defaults to accent"),
|
|
506
|
-
unit:
|
|
507
|
-
valueLabel:
|
|
508
|
-
caption:
|
|
509
|
-
icon:
|
|
512
|
+
unit: z3.string().optional().describe("Written after the value"),
|
|
513
|
+
valueLabel: z3.string().optional().describe("The readout in words, replacing value and unit"),
|
|
514
|
+
caption: LocalizedStringSchema.optional().describe("One quiet line under the reading"),
|
|
515
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
510
516
|
style: ExtensionComponentStyleSchema.optional()
|
|
511
517
|
}).passthrough().describe("Progress component");
|
|
512
|
-
var KeyValueRowSchema =
|
|
513
|
-
label:
|
|
514
|
-
value:
|
|
515
|
-
icon:
|
|
518
|
+
var KeyValueRowSchema = z3.object({
|
|
519
|
+
label: z3.string(),
|
|
520
|
+
value: z3.string(),
|
|
521
|
+
icon: z3.string().optional().describe("Icon name")
|
|
516
522
|
}).passthrough().describe("One key/value row");
|
|
517
|
-
var KeyValueListPropsSchema =
|
|
518
|
-
component:
|
|
519
|
-
rows:
|
|
523
|
+
var KeyValueListPropsSchema = z3.object({
|
|
524
|
+
component: z3.literal("KeyValueList"),
|
|
525
|
+
rows: z3.array(KeyValueRowSchema).min(1).describe("Facts in two aligned columns"),
|
|
520
526
|
style: ExtensionComponentStyleSchema.optional()
|
|
521
527
|
}).passthrough().describe("Key/value list component");
|
|
522
|
-
var TimelineVariantSchema =
|
|
523
|
-
var TimelineEntrySchema =
|
|
524
|
-
time:
|
|
525
|
-
title:
|
|
526
|
-
description:
|
|
527
|
-
icon:
|
|
528
|
-
duration:
|
|
529
|
-
badge:
|
|
530
|
-
current:
|
|
531
|
-
past:
|
|
528
|
+
var TimelineVariantSchema = z3.enum(["default", "accent", "success", "warning", "danger"]).describe("How much a timeline entry stands out");
|
|
529
|
+
var TimelineEntrySchema = z3.object({
|
|
530
|
+
time: z3.string().describe("When it happens, worded as it should be read"),
|
|
531
|
+
title: z3.string(),
|
|
532
|
+
description: z3.string().optional().describe("A line under the title"),
|
|
533
|
+
icon: z3.string().optional().describe("Icon name"),
|
|
534
|
+
duration: z3.string().optional().describe("How long it lasts, in words"),
|
|
535
|
+
badge: z3.string().optional().describe("Trailing badge"),
|
|
536
|
+
current: z3.boolean().optional().describe("The entry the reader is at"),
|
|
537
|
+
past: z3.boolean().optional().describe("Already behind us; drawn recessive"),
|
|
532
538
|
variant: TimelineVariantSchema.optional()
|
|
533
539
|
}).passthrough().describe("One timeline entry");
|
|
534
|
-
var TimelinePropsSchema =
|
|
535
|
-
component:
|
|
536
|
-
title:
|
|
537
|
-
icon:
|
|
538
|
-
entries:
|
|
540
|
+
var TimelinePropsSchema = z3.object({
|
|
541
|
+
component: z3.literal("Timeline"),
|
|
542
|
+
title: LocalizedStringSchema.optional().describe("Heading above the rail"),
|
|
543
|
+
icon: z3.string().optional().describe("Icon shown to the left of the title"),
|
|
544
|
+
entries: z3.array(TimelineEntrySchema).min(1).describe("Entries, in the order they happen"),
|
|
539
545
|
style: ExtensionComponentStyleSchema.optional()
|
|
540
546
|
}).passthrough().describe("Vertical timeline component");
|
|
541
|
-
var NoteVariantSchema =
|
|
542
|
-
var NotePropsSchema =
|
|
543
|
-
component:
|
|
544
|
-
title:
|
|
545
|
-
icon:
|
|
546
|
-
badge:
|
|
547
|
-
content:
|
|
548
|
-
footer:
|
|
547
|
+
var NoteVariantSchema = z3.enum(["default", "accent", "success", "warning", "danger"]).describe("How much a note stands out");
|
|
548
|
+
var NotePropsSchema = z3.object({
|
|
549
|
+
component: z3.literal("Note"),
|
|
550
|
+
title: LocalizedStringSchema.optional(),
|
|
551
|
+
icon: z3.string().optional().describe("Icon shown to the left of the title"),
|
|
552
|
+
badge: z3.string().optional().describe("Trailing badge next to the title"),
|
|
553
|
+
content: z3.string().describe("The body, as markdown"),
|
|
554
|
+
footer: z3.string().optional().describe("One quiet line at the bottom"),
|
|
549
555
|
variant: NoteVariantSchema.optional(),
|
|
550
556
|
style: ExtensionComponentStyleSchema.optional()
|
|
551
557
|
}).passthrough().describe("Titled block of prose component");
|
|
552
|
-
var CalendarEventStatusSchema =
|
|
553
|
-
var CalendarEventPropsSchema =
|
|
554
|
-
component:
|
|
555
|
-
title:
|
|
556
|
-
start:
|
|
557
|
-
end:
|
|
558
|
-
allDay:
|
|
559
|
-
location:
|
|
560
|
-
organizer:
|
|
561
|
-
attendees:
|
|
562
|
-
calendar:
|
|
558
|
+
var CalendarEventStatusSchema = z3.enum(["confirmed", "tentative", "cancelled"]).describe("Whether an event is going ahead");
|
|
559
|
+
var CalendarEventPropsSchema = z3.object({
|
|
560
|
+
component: z3.literal("CalendarEvent"),
|
|
561
|
+
title: z3.string(),
|
|
562
|
+
start: z3.string().describe("ISO 8601 with an offset"),
|
|
563
|
+
end: z3.string().optional().describe("ISO 8601 with an offset"),
|
|
564
|
+
allDay: z3.boolean().optional(),
|
|
565
|
+
location: z3.string().optional(),
|
|
566
|
+
organizer: z3.string().optional(),
|
|
567
|
+
attendees: z3.array(z3.string()).optional(),
|
|
568
|
+
calendar: z3.string().optional().describe("Which calendar it sits in; shown as a badge"),
|
|
563
569
|
status: CalendarEventStatusSchema.optional(),
|
|
564
|
-
recurrence:
|
|
565
|
-
notes:
|
|
570
|
+
recurrence: z3.string().optional().describe("How it repeats, in words"),
|
|
571
|
+
notes: z3.string().optional(),
|
|
566
572
|
style: ExtensionComponentStyleSchema.optional()
|
|
567
573
|
}).passthrough().describe("Single calendar event component");
|
|
568
|
-
var AgendaEventSchema =
|
|
569
|
-
id:
|
|
570
|
-
title:
|
|
571
|
-
start:
|
|
572
|
-
end:
|
|
573
|
-
allDay:
|
|
574
|
-
detail:
|
|
574
|
+
var AgendaEventSchema = z3.object({
|
|
575
|
+
id: z3.string().optional().describe("Handed back to onEventClickAction as $event.id"),
|
|
576
|
+
title: z3.string(),
|
|
577
|
+
start: z3.string().describe("ISO 8601 with an offset"),
|
|
578
|
+
end: z3.string().optional().describe("ISO 8601 with an offset"),
|
|
579
|
+
allDay: z3.boolean().optional(),
|
|
580
|
+
detail: z3.string().optional().describe("One quiet line under the title")
|
|
575
581
|
}).passthrough().describe("One agenda event");
|
|
576
|
-
var AgendaDaySchema =
|
|
577
|
-
label:
|
|
578
|
-
date:
|
|
579
|
-
events:
|
|
582
|
+
var AgendaDaySchema = z3.object({
|
|
583
|
+
label: z3.string().describe("The day heading"),
|
|
584
|
+
date: z3.string().optional().describe("A quieter line beside the heading"),
|
|
585
|
+
events: z3.array(AgendaEventSchema)
|
|
580
586
|
}).passthrough().describe("One agenda day");
|
|
581
|
-
var AgendaPropsSchema =
|
|
582
|
-
component:
|
|
583
|
-
title:
|
|
584
|
-
icon:
|
|
585
|
-
days:
|
|
586
|
-
warnOverlaps:
|
|
587
|
+
var AgendaPropsSchema = z3.object({
|
|
588
|
+
component: z3.literal("Agenda"),
|
|
589
|
+
title: LocalizedStringSchema.optional(),
|
|
590
|
+
icon: z3.string().optional().describe("Icon shown to the left of the title"),
|
|
591
|
+
days: z3.array(AgendaDaySchema),
|
|
592
|
+
warnOverlaps: z3.boolean().optional().describe("Word clashes between events"),
|
|
587
593
|
onEventClickAction: ExtensionActionRefSchema.optional().describe(
|
|
588
594
|
"Action to call when an event is clicked, with the event as $event"
|
|
589
595
|
),
|
|
@@ -591,370 +597,369 @@ var AgendaPropsSchema = z2.object({
|
|
|
591
597
|
}).passthrough().describe("Schedule component that tracks the current time");
|
|
592
598
|
|
|
593
599
|
// src/schemas/contributions.schema.ts
|
|
594
|
-
var
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
secondaryKey: z3.string().optional().describe("Key for secondary label")
|
|
600
|
+
var ToolSettingsListMappingSchema = z4.object({
|
|
601
|
+
itemsKey: z4.string().describe("Key for items array in tool result data"),
|
|
602
|
+
countKey: z4.string().optional().describe("Key for total count"),
|
|
603
|
+
idKey: z4.string().describe("Key for item ID"),
|
|
604
|
+
labelKey: z4.string().describe("Key for item label"),
|
|
605
|
+
descriptionKey: z4.string().optional().describe("Key for item description"),
|
|
606
|
+
secondaryKey: z4.string().optional().describe("Key for secondary label")
|
|
602
607
|
}).describe("Mapping from tool list data to UI fields");
|
|
603
|
-
var ToolSettingsActionDataSourceSchema =
|
|
604
|
-
action:
|
|
605
|
-
params:
|
|
606
|
-
refreshOn:
|
|
608
|
+
var ToolSettingsActionDataSourceSchema = z4.object({
|
|
609
|
+
action: z4.string().describe("Action ID to call for fetching data"),
|
|
610
|
+
params: z4.record(z4.unknown()).optional().describe("Parameters to pass to the action"),
|
|
611
|
+
refreshOn: z4.array(z4.string()).optional().describe("Event names that trigger refresh")
|
|
607
612
|
}).describe("Action-based data source");
|
|
608
|
-
var ToolSettingsListGroupBySchema =
|
|
609
|
-
key:
|
|
610
|
-
order:
|
|
611
|
-
labels:
|
|
613
|
+
var ToolSettingsListGroupBySchema = z4.object({
|
|
614
|
+
key: z4.string().describe("Key in each item used to determine group membership"),
|
|
615
|
+
order: z4.array(z4.string()).optional().describe("Explicit ordering of group values; unlisted groups appear afterwards alphabetically"),
|
|
616
|
+
labels: z4.record(LocalizedStringSchema).optional().describe("Human-friendly labels per group value (rendered as section headers)")
|
|
612
617
|
}).describe("List view grouping configuration");
|
|
613
|
-
var ToolSettingsListViewSchema =
|
|
614
|
-
kind:
|
|
615
|
-
listToolId:
|
|
616
|
-
getToolId:
|
|
617
|
-
upsertToolId:
|
|
618
|
-
deleteToolId:
|
|
618
|
+
var ToolSettingsListViewSchema = z4.object({
|
|
619
|
+
kind: z4.literal("list").describe("View kind"),
|
|
620
|
+
listToolId: z4.string().describe("Tool ID for listing items"),
|
|
621
|
+
getToolId: z4.string().optional().describe("Tool ID for fetching details"),
|
|
622
|
+
upsertToolId: z4.string().optional().describe("Tool ID for creating/updating items"),
|
|
623
|
+
deleteToolId: z4.string().optional().describe("Tool ID for deleting items"),
|
|
619
624
|
mapping: ToolSettingsListMappingSchema.describe("Mapping from tool data to UI"),
|
|
620
|
-
searchParam:
|
|
621
|
-
limitParam:
|
|
622
|
-
idParam:
|
|
623
|
-
listParams:
|
|
624
|
-
editView:
|
|
625
|
+
searchParam: z4.string().optional().describe("Param name for search query"),
|
|
626
|
+
limitParam: z4.string().optional().describe("Param name for limit"),
|
|
627
|
+
idParam: z4.string().optional().describe("Param name for get/delete ID"),
|
|
628
|
+
listParams: z4.record(z4.unknown()).optional().describe("Static params for list tool"),
|
|
629
|
+
editView: z4.object({
|
|
625
630
|
content: ExtensionComponentDataSchema.describe("Root component for the create/edit modal")
|
|
626
631
|
}).optional().describe("Component-tree create/edit form bound to $item.<key>"),
|
|
627
632
|
groupBy: ToolSettingsListGroupBySchema.optional().describe(
|
|
628
633
|
"Optional grouping configuration; when set, items are visually grouped by this field"
|
|
629
634
|
)
|
|
630
635
|
}).describe("List view backed by tools");
|
|
631
|
-
var ToolSettingsComponentViewSchema =
|
|
632
|
-
kind:
|
|
633
|
-
data:
|
|
636
|
+
var ToolSettingsComponentViewSchema = z4.object({
|
|
637
|
+
kind: z4.literal("component").describe("View kind"),
|
|
638
|
+
data: z4.record(ToolSettingsActionDataSourceSchema).optional().describe("Data sources"),
|
|
634
639
|
content: ExtensionComponentDataSchema.describe("Root component to render")
|
|
635
640
|
}).describe("Component-based tool settings view");
|
|
636
|
-
var ToolSettingsViewSchema =
|
|
637
|
-
var ToolSettingsViewDefinitionSchema =
|
|
638
|
-
id:
|
|
639
|
-
title:
|
|
640
|
-
description:
|
|
641
|
+
var ToolSettingsViewSchema = z4.union([ToolSettingsListViewSchema, ToolSettingsComponentViewSchema]).describe("Tool settings view");
|
|
642
|
+
var ToolSettingsViewDefinitionSchema = z4.object({
|
|
643
|
+
id: z4.string().describe("Unique view ID within the extension"),
|
|
644
|
+
title: LocalizedStringSchema.describe("Display title"),
|
|
645
|
+
description: LocalizedStringSchema.optional().describe("Help text"),
|
|
641
646
|
// A string rather than the known topics: one this host does not know yet must not stop
|
|
642
647
|
// the extension installing, it only lands on the extension's own page.
|
|
643
|
-
topic:
|
|
648
|
+
topic: z4.string().optional().describe(
|
|
644
649
|
"What the view is about, which decides where Stina shows it: accounts, notifications, personal or tracking. Without one, or with one Stina does not know, the view is shown on the extension's own page."
|
|
645
650
|
),
|
|
646
651
|
view: ToolSettingsViewSchema.describe("View configuration")
|
|
647
652
|
}).describe("Tool settings view definition");
|
|
648
|
-
var PanelActionDataSourceSchema =
|
|
649
|
-
action:
|
|
650
|
-
params:
|
|
651
|
-
refreshOn:
|
|
653
|
+
var PanelActionDataSourceSchema = z4.object({
|
|
654
|
+
action: z4.string().describe("Action ID to call for fetching data"),
|
|
655
|
+
params: z4.record(z4.unknown()).optional().describe("Parameters to pass to the action"),
|
|
656
|
+
refreshOn: z4.array(z4.string()).optional().describe("Event names that trigger refresh")
|
|
652
657
|
}).describe("Panel data source");
|
|
653
|
-
var PanelComponentViewSchema =
|
|
654
|
-
kind:
|
|
655
|
-
data:
|
|
658
|
+
var PanelComponentViewSchema = z4.object({
|
|
659
|
+
kind: z4.literal("component").describe("View kind"),
|
|
660
|
+
data: z4.record(PanelActionDataSourceSchema).optional().describe("Data sources"),
|
|
656
661
|
content: ExtensionComponentDataSchema.describe("Root component to render")
|
|
657
662
|
}).describe("Component-based panel view");
|
|
658
|
-
var PanelUnknownViewSchema =
|
|
659
|
-
kind:
|
|
663
|
+
var PanelUnknownViewSchema = z4.object({
|
|
664
|
+
kind: z4.string().describe("View kind")
|
|
660
665
|
}).passthrough().describe("Unknown panel view");
|
|
661
|
-
var PanelViewSchema =
|
|
662
|
-
var PanelDefinitionSchema =
|
|
663
|
-
id:
|
|
664
|
-
title:
|
|
665
|
-
icon:
|
|
666
|
+
var PanelViewSchema = z4.union([PanelComponentViewSchema, PanelUnknownViewSchema]).describe("Panel view");
|
|
667
|
+
var PanelDefinitionSchema = z4.object({
|
|
668
|
+
id: z4.string().describe("Unique panel ID within the extension"),
|
|
669
|
+
title: LocalizedStringSchema.describe("Display title"),
|
|
670
|
+
icon: z4.string().optional().describe("Icon name (from huge-icons)"),
|
|
666
671
|
view: PanelViewSchema.describe("Panel view schema")
|
|
667
672
|
}).describe("Panel definition");
|
|
668
|
-
var StatusCardDefinitionSchema =
|
|
669
|
-
id:
|
|
670
|
-
title:
|
|
671
|
-
icon:
|
|
672
|
-
size:
|
|
673
|
+
var StatusCardDefinitionSchema = z4.object({
|
|
674
|
+
id: z4.string().describe("Unique card ID within the extension"),
|
|
675
|
+
title: LocalizedStringSchema.describe("What it is called where the user picks it"),
|
|
676
|
+
icon: z4.string().optional().describe("Icon name (from huge-icons)"),
|
|
677
|
+
size: z4.enum(["line", "block"]).describe("How much room it may take: one row, or up to three"),
|
|
673
678
|
view: PanelComponentViewSchema.describe("What it draws, and where the data comes from")
|
|
674
679
|
}).describe("Status card definition");
|
|
675
|
-
var ProviderConfigViewSchema =
|
|
680
|
+
var ProviderConfigViewSchema = z4.object({
|
|
676
681
|
content: ExtensionComponentDataSchema.describe("Root component to render")
|
|
677
682
|
}).describe("Provider configuration view (component tree)");
|
|
678
|
-
var ProviderDefinitionSchema =
|
|
679
|
-
id:
|
|
680
|
-
name:
|
|
681
|
-
description:
|
|
682
|
-
suggestedDefaultModel:
|
|
683
|
-
defaultSettings:
|
|
683
|
+
var ProviderDefinitionSchema = z4.object({
|
|
684
|
+
id: z4.string().describe("Provider ID"),
|
|
685
|
+
name: z4.string().describe("Display name"),
|
|
686
|
+
description: z4.string().optional().describe("Description"),
|
|
687
|
+
suggestedDefaultModel: z4.string().optional().describe("Suggested default model"),
|
|
688
|
+
defaultSettings: z4.record(z4.unknown()).optional().describe("Default settings"),
|
|
684
689
|
configView: ProviderConfigViewSchema.optional().describe("Component-tree configuration view")
|
|
685
690
|
}).describe("Provider definition");
|
|
686
|
-
var ToolDefinitionSchema =
|
|
687
|
-
id:
|
|
691
|
+
var ToolDefinitionSchema = z4.object({
|
|
692
|
+
id: z4.string().describe("Tool ID"),
|
|
688
693
|
name: LocalizedStringSchema.describe("Display name"),
|
|
689
694
|
description: LocalizedStringSchema.describe("Description for Stina"),
|
|
690
|
-
parameters:
|
|
691
|
-
requiresConfirmation:
|
|
695
|
+
parameters: z4.record(z4.unknown()).optional().describe("Parameter schema (JSON Schema)"),
|
|
696
|
+
requiresConfirmation: z4.boolean().optional().describe("Whether this tool requires user confirmation before execution (default: true)"),
|
|
692
697
|
confirmationPrompt: LocalizedStringSchema.optional().describe("Custom confirmation prompt")
|
|
693
698
|
}).describe("Tool definition");
|
|
694
|
-
var CommandDefinitionSchema =
|
|
695
|
-
id:
|
|
696
|
-
name:
|
|
697
|
-
description:
|
|
699
|
+
var CommandDefinitionSchema = z4.object({
|
|
700
|
+
id: z4.string().describe('Command ID (e.g., "weather" for /weather)'),
|
|
701
|
+
name: z4.string().describe("Display name"),
|
|
702
|
+
description: z4.string().describe("Description")
|
|
698
703
|
}).describe("Command definition");
|
|
699
|
-
var PromptSectionSchema =
|
|
700
|
-
var PromptContributionSchema =
|
|
701
|
-
id:
|
|
702
|
-
title:
|
|
704
|
+
var PromptSectionSchema = z4.enum(["system", "behavior", "tools"]).describe("Prompt section placement");
|
|
705
|
+
var PromptContributionSchema = z4.object({
|
|
706
|
+
id: z4.string().describe("Unique ID within the extension"),
|
|
707
|
+
title: z4.string().optional().describe("Optional title for the prompt chunk"),
|
|
703
708
|
section: PromptSectionSchema.optional().describe("Prompt section placement"),
|
|
704
|
-
text:
|
|
705
|
-
i18n:
|
|
706
|
-
order:
|
|
709
|
+
text: z4.string().optional().describe("Plain text prompt content"),
|
|
710
|
+
i18n: z4.record(z4.string()).optional().describe("Localized prompt content"),
|
|
711
|
+
order: z4.number().optional().describe("Ordering hint (lower comes first)")
|
|
707
712
|
}).describe("Prompt contribution");
|
|
708
|
-
var StorageCollectionConfigSchema =
|
|
709
|
-
indexes:
|
|
713
|
+
var StorageCollectionConfigSchema = z4.object({
|
|
714
|
+
indexes: z4.array(z4.string()).optional().describe("Fields to index for fast queries")
|
|
710
715
|
}).describe("Collection configuration");
|
|
711
|
-
var StorageContributionsSchema =
|
|
712
|
-
collections:
|
|
716
|
+
var StorageContributionsSchema = z4.object({
|
|
717
|
+
collections: z4.record(StorageCollectionConfigSchema).describe("Collection definitions")
|
|
713
718
|
}).describe("Storage contributions");
|
|
714
719
|
var GRAPH_SCOPE_PATTERN = /^[A-Za-z]+(\.[A-Za-z]+)+$/;
|
|
715
720
|
var HOST_ACCOUNT_SCOPES = ["offline_access", "User.Read", "openid", "profile", "email"];
|
|
716
|
-
var AccountProviderSchema =
|
|
717
|
-
var AccountContributionSchema =
|
|
721
|
+
var AccountProviderSchema = z4.enum(["microsoft"]).describe("External account provider");
|
|
722
|
+
var AccountContributionSchema = z4.object({
|
|
718
723
|
provider: AccountProviderSchema,
|
|
719
|
-
scopes:
|
|
720
|
-
|
|
724
|
+
scopes: z4.array(
|
|
725
|
+
z4.string().regex(GRAPH_SCOPE_PATTERN, 'Must be a Microsoft Graph permission name, such as "Mail.Read"').refine(
|
|
721
726
|
(scope) => !HOST_ACCOUNT_SCOPES.some((hostScope) => hostScope.toLowerCase() === scope.toLowerCase()),
|
|
722
727
|
{ message: "Requested by the host already; leave it out" }
|
|
723
728
|
)
|
|
724
729
|
).min(1).describe("Microsoft Graph delegated permissions"),
|
|
725
730
|
reason: LocalizedStringSchema.optional().describe("Why the extension needs them")
|
|
726
731
|
}).describe("An external account the extension works through");
|
|
727
|
-
var ExtensionContributionsSchema =
|
|
728
|
-
toolSettings:
|
|
729
|
-
panels:
|
|
730
|
-
statusCards:
|
|
731
|
-
providers:
|
|
732
|
-
tools:
|
|
733
|
-
commands:
|
|
734
|
-
prompts:
|
|
732
|
+
var ExtensionContributionsSchema = z4.object({
|
|
733
|
+
toolSettings: z4.array(ToolSettingsViewDefinitionSchema).optional().describe("Tool settings views"),
|
|
734
|
+
panels: z4.array(PanelDefinitionSchema).optional().describe("Right panel contributions"),
|
|
735
|
+
statusCards: z4.array(StatusCardDefinitionSchema).optional().describe("Cards for the strip above the conversation list"),
|
|
736
|
+
providers: z4.array(ProviderDefinitionSchema).optional().describe("AI providers"),
|
|
737
|
+
tools: z4.array(ToolDefinitionSchema).optional().describe("Tools for Stina to use"),
|
|
738
|
+
commands: z4.array(CommandDefinitionSchema).optional().describe("Slash commands"),
|
|
739
|
+
prompts: z4.array(PromptContributionSchema).optional().describe("Prompt contributions"),
|
|
735
740
|
storage: StorageContributionsSchema.optional().describe("Storage collection declarations"),
|
|
736
|
-
accounts:
|
|
741
|
+
accounts: z4.array(AccountContributionSchema).optional().describe("External accounts the extension works through, signed in once in Stina's settings")
|
|
737
742
|
}).describe("What an extension can contribute to Stina");
|
|
738
743
|
|
|
739
744
|
// src/schemas/manifest.schema.ts
|
|
740
|
-
var PlatformSchema =
|
|
741
|
-
var AuthorSchema =
|
|
742
|
-
name:
|
|
743
|
-
url:
|
|
745
|
+
var PlatformSchema = z5.enum(["web", "electron", "tui"]).describe("Supported platform");
|
|
746
|
+
var AuthorSchema = z5.object({
|
|
747
|
+
name: z5.string().min(1).describe("Author name"),
|
|
748
|
+
url: z5.string().url().optional().describe("Author URL")
|
|
744
749
|
}).describe("Author information");
|
|
745
|
-
var EnginesSchema =
|
|
746
|
-
stina:
|
|
750
|
+
var EnginesSchema = z5.object({
|
|
751
|
+
stina: z5.string().describe("Minimum Stina version required")
|
|
747
752
|
}).describe("Engine requirements");
|
|
748
|
-
var ExtensionManifestSchema =
|
|
749
|
-
id:
|
|
750
|
-
name:
|
|
751
|
-
version:
|
|
752
|
-
description:
|
|
753
|
+
var ExtensionManifestSchema = z5.object({
|
|
754
|
+
id: z5.string().regex(/^[a-z0-9-]+$/, "ID must be lowercase alphanumeric with hyphens").describe('Unique identifier (e.g., "ollama-provider")'),
|
|
755
|
+
name: z5.string().min(1).describe("Human-readable name"),
|
|
756
|
+
version: z5.string().regex(/^\d+\.\d+\.\d+/, 'Must be semver format (e.g., "1.0.0")').describe("Version string (semver)"),
|
|
757
|
+
description: z5.string().min(1).describe("Short description"),
|
|
753
758
|
// Optional icon (Hugeicons name) used as the default icon for proactive
|
|
754
759
|
// conversation list entries this extension triggers. Kept optional so the
|
|
755
760
|
// field is preserved (not stripped) when a manifest is parsed at load time.
|
|
756
|
-
icon:
|
|
761
|
+
icon: z5.string().optional().describe("Icon (Hugeicons name) representing the extension"),
|
|
757
762
|
author: AuthorSchema.describe("Author information"),
|
|
758
|
-
repository:
|
|
759
|
-
license:
|
|
763
|
+
repository: z5.string().url().optional().describe("Repository URL"),
|
|
764
|
+
license: z5.string().optional().describe("License identifier"),
|
|
760
765
|
engines: EnginesSchema.optional().describe("Minimum Stina version required"),
|
|
761
|
-
platforms:
|
|
762
|
-
main:
|
|
763
|
-
permissions:
|
|
766
|
+
platforms: z5.array(PlatformSchema).optional().describe("Supported platforms"),
|
|
767
|
+
main: z5.string().describe("Entry point file (relative to extension root)"),
|
|
768
|
+
permissions: z5.array(PermissionSchema).describe("Required permissions"),
|
|
764
769
|
contributes: ExtensionContributionsSchema.optional().describe("What the extension contributes")
|
|
765
770
|
}).describe("Extension manifest format");
|
|
766
771
|
|
|
767
772
|
// src/schemas/card.schema.ts
|
|
768
|
-
import { z as
|
|
773
|
+
import { z as z6 } from "zod";
|
|
769
774
|
var style = ExtensionComponentStyleSchema.optional();
|
|
770
|
-
var children =
|
|
771
|
-
() =>
|
|
775
|
+
var children = z6.lazy(
|
|
776
|
+
() => z6.array(ChatCardComponentSchema).max(40)
|
|
772
777
|
);
|
|
773
|
-
var VerticalStackCardSchema =
|
|
774
|
-
component:
|
|
778
|
+
var VerticalStackCardSchema = z6.object({
|
|
779
|
+
component: z6.literal("VerticalStack"),
|
|
775
780
|
children,
|
|
776
781
|
style
|
|
777
782
|
}).strict();
|
|
778
|
-
var HorizontalStackCardSchema =
|
|
779
|
-
component:
|
|
783
|
+
var HorizontalStackCardSchema = z6.object({
|
|
784
|
+
component: z6.literal("HorizontalStack"),
|
|
780
785
|
children,
|
|
781
786
|
style
|
|
782
787
|
}).strict();
|
|
783
|
-
var GridCardSchema =
|
|
784
|
-
component:
|
|
785
|
-
columns:
|
|
788
|
+
var GridCardSchema = z6.object({
|
|
789
|
+
component: z6.literal("Grid"),
|
|
790
|
+
columns: z6.number().min(1).max(6),
|
|
786
791
|
children,
|
|
787
792
|
style
|
|
788
793
|
}).strict();
|
|
789
|
-
var FrameCardSchema =
|
|
790
|
-
component:
|
|
794
|
+
var FrameCardSchema = z6.object({
|
|
795
|
+
component: z6.literal("Frame"),
|
|
791
796
|
// Only the string form: the components form of a title is for panels that
|
|
792
797
|
// put controls in their header, which a card has no business doing.
|
|
793
|
-
title:
|
|
794
|
-
collapsible:
|
|
795
|
-
defaultExpanded:
|
|
798
|
+
title: LocalizedStringSchema.optional(),
|
|
799
|
+
collapsible: z6.boolean().optional(),
|
|
800
|
+
defaultExpanded: z6.boolean().optional(),
|
|
796
801
|
variant: FrameVariantSchema.optional(),
|
|
797
802
|
children,
|
|
798
803
|
style
|
|
799
804
|
}).strict();
|
|
800
|
-
var ListCardSchema =
|
|
801
|
-
var DividerCardSchema =
|
|
802
|
-
var HeaderCardSchema =
|
|
803
|
-
component:
|
|
804
|
-
level:
|
|
805
|
-
title:
|
|
806
|
-
description:
|
|
807
|
-
icon:
|
|
805
|
+
var ListCardSchema = z6.object({ component: z6.literal("List"), children, style }).strict();
|
|
806
|
+
var DividerCardSchema = z6.object({ component: z6.literal("Divider"), style }).strict();
|
|
807
|
+
var HeaderCardSchema = z6.object({
|
|
808
|
+
component: z6.literal("Header"),
|
|
809
|
+
level: z6.number().min(1).max(6),
|
|
810
|
+
title: LocalizedStringSchema,
|
|
811
|
+
description: z6.union([LocalizedStringSchema, z6.array(LocalizedStringSchema)]).optional(),
|
|
812
|
+
icon: z6.string().optional(),
|
|
808
813
|
style
|
|
809
814
|
}).strict();
|
|
810
|
-
var LabelCardSchema =
|
|
811
|
-
var ParagraphCardSchema =
|
|
812
|
-
var MarkdownCardSchema =
|
|
813
|
-
var IconCardSchema =
|
|
814
|
-
component:
|
|
815
|
-
name:
|
|
816
|
-
title:
|
|
815
|
+
var LabelCardSchema = z6.object({ component: z6.literal("Label"), text: z6.string(), style }).strict();
|
|
816
|
+
var ParagraphCardSchema = z6.object({ component: z6.literal("Paragraph"), text: z6.string(), style }).strict();
|
|
817
|
+
var MarkdownCardSchema = z6.object({ component: z6.literal("Markdown"), content: z6.string(), style }).strict();
|
|
818
|
+
var IconCardSchema = z6.object({
|
|
819
|
+
component: z6.literal("Icon"),
|
|
820
|
+
name: z6.string(),
|
|
821
|
+
title: LocalizedStringSchema.optional(),
|
|
817
822
|
style
|
|
818
823
|
}).strict();
|
|
819
|
-
var PillCardSchema =
|
|
820
|
-
component:
|
|
821
|
-
text:
|
|
822
|
-
icon:
|
|
824
|
+
var PillCardSchema = z6.object({
|
|
825
|
+
component: z6.literal("Pill"),
|
|
826
|
+
text: LocalizedStringSchema,
|
|
827
|
+
icon: z6.string().optional(),
|
|
823
828
|
variant: PillVariantSchema.optional(),
|
|
824
829
|
style
|
|
825
830
|
}).strict();
|
|
826
|
-
var WeatherNowCardSchema =
|
|
827
|
-
component:
|
|
828
|
-
place:
|
|
831
|
+
var WeatherNowCardSchema = z6.object({
|
|
832
|
+
component: z6.literal("WeatherNow"),
|
|
833
|
+
place: z6.string(),
|
|
829
834
|
condition: WeatherConditionSchema,
|
|
830
|
-
conditionLabel:
|
|
831
|
-
temperature:
|
|
832
|
-
feelsLike:
|
|
833
|
-
unit:
|
|
835
|
+
conditionLabel: z6.string().optional(),
|
|
836
|
+
temperature: z6.number(),
|
|
837
|
+
feelsLike: z6.number().optional(),
|
|
838
|
+
unit: z6.string().optional(),
|
|
834
839
|
wind: WeatherWindSchema.optional(),
|
|
835
|
-
night:
|
|
836
|
-
summary:
|
|
840
|
+
night: z6.boolean().optional(),
|
|
841
|
+
summary: z6.string().optional(),
|
|
837
842
|
style
|
|
838
843
|
}).strict();
|
|
839
|
-
var WeatherForecastCardSchema =
|
|
840
|
-
component:
|
|
841
|
-
title:
|
|
842
|
-
icon:
|
|
843
|
-
unit:
|
|
844
|
-
steps:
|
|
845
|
-
|
|
846
|
-
label:
|
|
844
|
+
var WeatherForecastCardSchema = z6.object({
|
|
845
|
+
component: z6.literal("WeatherForecast"),
|
|
846
|
+
title: LocalizedStringSchema.optional(),
|
|
847
|
+
icon: z6.string().optional(),
|
|
848
|
+
unit: z6.string().optional(),
|
|
849
|
+
steps: z6.array(
|
|
850
|
+
z6.object({
|
|
851
|
+
label: z6.string(),
|
|
847
852
|
condition: WeatherConditionSchema,
|
|
848
|
-
conditionLabel:
|
|
849
|
-
high:
|
|
850
|
-
low:
|
|
851
|
-
night:
|
|
852
|
-
precipitation:
|
|
853
|
-
current:
|
|
853
|
+
conditionLabel: z6.string().optional(),
|
|
854
|
+
high: z6.number(),
|
|
855
|
+
low: z6.number().optional(),
|
|
856
|
+
night: z6.boolean().optional(),
|
|
857
|
+
precipitation: z6.number().min(0).max(100).optional(),
|
|
858
|
+
current: z6.boolean().optional()
|
|
854
859
|
}).strict()
|
|
855
860
|
).min(1).max(24),
|
|
856
861
|
style
|
|
857
862
|
}).strict();
|
|
858
|
-
var ChartCardSchema =
|
|
859
|
-
component:
|
|
863
|
+
var ChartCardSchema = z6.object({
|
|
864
|
+
component: z6.literal("Chart"),
|
|
860
865
|
chart: ChartKindSchema.optional(),
|
|
861
|
-
series:
|
|
862
|
-
|
|
863
|
-
name:
|
|
864
|
-
points:
|
|
866
|
+
series: z6.array(
|
|
867
|
+
z6.object({
|
|
868
|
+
name: z6.string().optional(),
|
|
869
|
+
points: z6.array(z6.number().nullable()).min(1).max(200)
|
|
865
870
|
}).strict()
|
|
866
871
|
).min(1).max(8),
|
|
867
|
-
labels:
|
|
868
|
-
title:
|
|
869
|
-
icon:
|
|
870
|
-
unit:
|
|
871
|
-
zeroBaseline:
|
|
872
|
-
height:
|
|
872
|
+
labels: z6.array(z6.string()).max(200).optional(),
|
|
873
|
+
title: LocalizedStringSchema.optional(),
|
|
874
|
+
icon: z6.string().optional(),
|
|
875
|
+
unit: z6.string().optional(),
|
|
876
|
+
zeroBaseline: z6.boolean().optional(),
|
|
877
|
+
height: z6.number().min(4).max(24).optional(),
|
|
873
878
|
style
|
|
874
879
|
}).strict();
|
|
875
|
-
var StatTileCardSchema =
|
|
876
|
-
component:
|
|
877
|
-
label:
|
|
878
|
-
value:
|
|
879
|
-
unit:
|
|
880
|
-
caption:
|
|
881
|
-
icon:
|
|
880
|
+
var StatTileCardSchema = z6.object({
|
|
881
|
+
component: z6.literal("StatTile"),
|
|
882
|
+
label: LocalizedStringSchema,
|
|
883
|
+
value: z6.union([z6.string(), z6.number()]),
|
|
884
|
+
unit: z6.string().optional(),
|
|
885
|
+
caption: LocalizedStringSchema.optional(),
|
|
886
|
+
icon: z6.string().optional(),
|
|
882
887
|
trend: StatTrendSchema.optional(),
|
|
883
|
-
trendLabel:
|
|
884
|
-
trendIsGood:
|
|
888
|
+
trendLabel: z6.string().optional(),
|
|
889
|
+
trendIsGood: z6.boolean().optional(),
|
|
885
890
|
style
|
|
886
891
|
}).strict();
|
|
887
|
-
var ProgressBarCardSchema =
|
|
888
|
-
component:
|
|
889
|
-
label:
|
|
890
|
-
value:
|
|
891
|
-
min:
|
|
892
|
-
max:
|
|
892
|
+
var ProgressBarCardSchema = z6.object({
|
|
893
|
+
component: z6.literal("ProgressBar"),
|
|
894
|
+
label: LocalizedStringSchema,
|
|
895
|
+
value: z6.number(),
|
|
896
|
+
min: z6.number().optional(),
|
|
897
|
+
max: z6.number().optional(),
|
|
893
898
|
shape: ProgressShapeSchema.optional(),
|
|
894
899
|
color: ProgressColorSchema.optional(),
|
|
895
|
-
unit:
|
|
896
|
-
valueLabel:
|
|
897
|
-
caption:
|
|
898
|
-
icon:
|
|
900
|
+
unit: z6.string().optional(),
|
|
901
|
+
valueLabel: z6.string().optional(),
|
|
902
|
+
caption: LocalizedStringSchema.optional(),
|
|
903
|
+
icon: z6.string().optional(),
|
|
899
904
|
style
|
|
900
905
|
}).strict();
|
|
901
|
-
var KeyValueListCardSchema =
|
|
902
|
-
component:
|
|
903
|
-
rows:
|
|
904
|
-
|
|
906
|
+
var KeyValueListCardSchema = z6.object({
|
|
907
|
+
component: z6.literal("KeyValueList"),
|
|
908
|
+
rows: z6.array(
|
|
909
|
+
z6.object({ label: z6.string(), value: z6.string(), icon: z6.string().optional() }).strict()
|
|
905
910
|
).min(1).max(40),
|
|
906
911
|
style
|
|
907
912
|
}).strict();
|
|
908
|
-
var TimelineCardSchema =
|
|
909
|
-
component:
|
|
910
|
-
title:
|
|
911
|
-
icon:
|
|
912
|
-
entries:
|
|
913
|
-
|
|
914
|
-
time:
|
|
915
|
-
title:
|
|
916
|
-
description:
|
|
917
|
-
icon:
|
|
918
|
-
duration:
|
|
919
|
-
badge:
|
|
920
|
-
current:
|
|
921
|
-
past:
|
|
913
|
+
var TimelineCardSchema = z6.object({
|
|
914
|
+
component: z6.literal("Timeline"),
|
|
915
|
+
title: LocalizedStringSchema.optional(),
|
|
916
|
+
icon: z6.string().optional(),
|
|
917
|
+
entries: z6.array(
|
|
918
|
+
z6.object({
|
|
919
|
+
time: z6.string(),
|
|
920
|
+
title: z6.string(),
|
|
921
|
+
description: z6.string().optional(),
|
|
922
|
+
icon: z6.string().optional(),
|
|
923
|
+
duration: z6.string().optional(),
|
|
924
|
+
badge: z6.string().optional(),
|
|
925
|
+
current: z6.boolean().optional(),
|
|
926
|
+
past: z6.boolean().optional(),
|
|
922
927
|
variant: TimelineVariantSchema.optional()
|
|
923
928
|
}).strict()
|
|
924
929
|
).min(1).max(40),
|
|
925
930
|
style
|
|
926
931
|
}).strict();
|
|
927
|
-
var NoteCardSchema =
|
|
928
|
-
component:
|
|
929
|
-
title:
|
|
930
|
-
icon:
|
|
931
|
-
badge:
|
|
932
|
-
content:
|
|
933
|
-
footer:
|
|
932
|
+
var NoteCardSchema = z6.object({
|
|
933
|
+
component: z6.literal("Note"),
|
|
934
|
+
title: LocalizedStringSchema.optional(),
|
|
935
|
+
icon: z6.string().optional(),
|
|
936
|
+
badge: z6.string().optional(),
|
|
937
|
+
content: z6.string(),
|
|
938
|
+
footer: z6.string().optional(),
|
|
934
939
|
variant: NoteVariantSchema.optional(),
|
|
935
940
|
style
|
|
936
941
|
}).strict();
|
|
937
|
-
var QuoteCardSchema =
|
|
938
|
-
component:
|
|
939
|
-
text:
|
|
940
|
-
source:
|
|
941
|
-
context:
|
|
942
|
-
footer:
|
|
942
|
+
var QuoteCardSchema = z6.object({
|
|
943
|
+
component: z6.literal("Quote"),
|
|
944
|
+
text: z6.string(),
|
|
945
|
+
source: z6.string().optional(),
|
|
946
|
+
context: z6.string().optional(),
|
|
947
|
+
footer: z6.string().optional(),
|
|
943
948
|
style
|
|
944
949
|
}).strict();
|
|
945
|
-
var CalendarEventCardSchema =
|
|
946
|
-
component:
|
|
947
|
-
title:
|
|
948
|
-
start:
|
|
949
|
-
end:
|
|
950
|
-
allDay:
|
|
951
|
-
location:
|
|
952
|
-
organizer:
|
|
953
|
-
attendees:
|
|
954
|
-
calendar:
|
|
950
|
+
var CalendarEventCardSchema = z6.object({
|
|
951
|
+
component: z6.literal("CalendarEvent"),
|
|
952
|
+
title: z6.string(),
|
|
953
|
+
start: z6.string(),
|
|
954
|
+
end: z6.string().optional(),
|
|
955
|
+
allDay: z6.boolean().optional(),
|
|
956
|
+
location: z6.string().optional(),
|
|
957
|
+
organizer: z6.string().optional(),
|
|
958
|
+
attendees: z6.array(z6.string()).max(40).optional(),
|
|
959
|
+
calendar: z6.string().optional(),
|
|
955
960
|
status: CalendarEventStatusSchema.optional(),
|
|
956
|
-
recurrence:
|
|
957
|
-
notes:
|
|
961
|
+
recurrence: z6.string().optional(),
|
|
962
|
+
notes: z6.string().optional(),
|
|
958
963
|
style
|
|
959
964
|
}).strict();
|
|
960
965
|
var CHAT_CARD_COMPONENTS = [
|
|
@@ -1014,8 +1019,8 @@ var CHAT_CARD_PROPS = Object.freeze(
|
|
|
1014
1019
|
})
|
|
1015
1020
|
)
|
|
1016
1021
|
);
|
|
1017
|
-
var ChatCardComponentSchema =
|
|
1018
|
-
() =>
|
|
1022
|
+
var ChatCardComponentSchema = z6.lazy(
|
|
1023
|
+
() => z6.discriminatedUnion(
|
|
1019
1024
|
"component",
|
|
1020
1025
|
CARD_MEMBERS
|
|
1021
1026
|
)
|