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