@optimizely-opal/opal-tools-sdk 0.1.6-dev → 0.1.9-dev

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/src/proteus.ts ADDED
@@ -0,0 +1,2314 @@
1
+ /**
2
+ * Generated by json-schema-to-typescript
3
+ * DO NOT MODIFY - This file is auto-generated from proteus-document-spec.json
4
+ * Run 'npm run generate:proteus' to regenerate
5
+ */
6
+
7
+ export type OpalProteusDocumentSpecification =
8
+ | ProteusAction
9
+ | ProteusAtomicCondition
10
+ | ProteusBadge
11
+ | ProteusCancelAction
12
+ | ProteusChart
13
+ | ProteusCondition
14
+ | ProteusDataTable
15
+ | ProteusDocument
16
+ | ProteusElement
17
+ | ProteusEventHandler
18
+ | ProteusField
19
+ | ProteusGroup
20
+ | ProteusHeading
21
+ | ProteusImage
22
+ | ProteusInput
23
+ | ProteusLink
24
+ | ProteusMap
25
+ | ProteusNode
26
+ | ProteusRange
27
+ | ProteusSelect
28
+ | ProteusSelectContent
29
+ | ProteusSelectTrigger
30
+ | ProteusSeparator
31
+ | ProteusShow
32
+ | ProteusText
33
+ | ProteusTextarea
34
+ | ProteusValue;
35
+ export interface ProteusAction {
36
+ $type: "Action";
37
+ alignItems?: SprinklePropAlignItems;
38
+ alignSelf?: SprinklePropAlignSelf;
39
+ animation?: SprinklePropAnimation;
40
+ /**
41
+ * Control the appearance by selecting between the different button types.
42
+ */
43
+ appearance?:
44
+ | "danger"
45
+ | "danger-outline"
46
+ | "default"
47
+ | "default-opal"
48
+ | "inverse"
49
+ | "primary"
50
+ | "primary-opal"
51
+ | "subtle";
52
+ backgroundImage?: SprinklePropBackgroundImage;
53
+ bg?: SprinklePropBg;
54
+ border?: SprinklePropBorder;
55
+ borderB?: SprinklePropBorderB;
56
+ borderColor?: SprinklePropBorderColor;
57
+ borderL?: SprinklePropBorderL;
58
+ borderR?: SprinklePropBorderR;
59
+ borderT?: SprinklePropBorderT;
60
+ children?: ProteusNode;
61
+ color?: SprinklePropColor;
62
+ cursor?: SprinklePropCursor;
63
+ display?: SprinklePropDisplay;
64
+ flex?: SprinklePropFlex;
65
+ flexDirection?: SprinklePropFlexDirection;
66
+ flexWrap?: SprinklePropFlexWrap;
67
+ fontFamily?: SprinklePropFontFamily;
68
+ fontSize?: SprinklePropFontSize;
69
+ fontWeight?: SprinklePropFontWeight;
70
+ gap?: SprinklePropGap;
71
+ gridColumn?: SprinklePropGridColumn;
72
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
73
+ h?: SprinklePropH;
74
+ justifyContent?: SprinklePropJustifyContent;
75
+ justifyItems?: SprinklePropJustifyItems;
76
+ m?: SprinklePropM;
77
+ maxH?: SprinklePropMaxH;
78
+ maxW?: SprinklePropMaxW;
79
+ mb?: SprinklePropMb;
80
+ ml?: SprinklePropMl;
81
+ mr?: SprinklePropMr;
82
+ mt?: SprinklePropMt;
83
+ mx?: SprinklePropMx;
84
+ my?: SprinklePropMy;
85
+ objectFit?: SprinklePropObjectFit;
86
+ /**
87
+ * Action triggered when button is clicked
88
+ */
89
+ onClick?:
90
+ | {
91
+ /**
92
+ * Message to send to LLM via sendNewMessage()
93
+ */
94
+ message: string;
95
+ }
96
+ | {
97
+ /**
98
+ * Name of registered tool to call
99
+ */
100
+ tool: string;
101
+ };
102
+ overflow?: SprinklePropOverflow;
103
+ overflowX?: SprinklePropOverflowX;
104
+ overflowY?: SprinklePropOverflowY;
105
+ p?: SprinklePropP;
106
+ pb?: SprinklePropPb;
107
+ pl?: SprinklePropPl;
108
+ placeItems?: SprinklePropPlaceItems;
109
+ pointerEvents?: SprinklePropPointerEvents;
110
+ pr?: SprinklePropPr;
111
+ pt?: SprinklePropPt;
112
+ px?: SprinklePropPx;
113
+ py?: SprinklePropPy;
114
+ rounded?: SprinklePropRounded;
115
+ shadow?: SprinklePropShadow;
116
+ textAlign?: SprinklePropTextAlign;
117
+ textTransform?: SprinklePropTextTransform;
118
+ transition?: SprinklePropTransition;
119
+ w?: SprinklePropW;
120
+ whiteSpace?: SprinklePropWhiteSpace;
121
+ z?: SprinklePropZ;
122
+ }
123
+ /**
124
+ * Simple comparison condition - single operator only (used in OR arrays to avoid recursion)
125
+ */
126
+ export type ProteusAtomicCondition =
127
+ | {
128
+ /**
129
+ * Equality comparison
130
+ *
131
+ * @minItems 2
132
+ * @maxItems 2
133
+ */
134
+ "==": [
135
+ boolean | null | number | ProteusValue | string,
136
+ boolean | null | number | ProteusValue | string,
137
+ ];
138
+ }
139
+ | {
140
+ /**
141
+ * Greater than comparison
142
+ *
143
+ * @minItems 2
144
+ * @maxItems 2
145
+ */
146
+ ">": [
147
+ boolean | null | number | ProteusValue | string,
148
+ boolean | null | number | ProteusValue | string,
149
+ ];
150
+ }
151
+ | {
152
+ /**
153
+ * Greater than or equal comparison
154
+ *
155
+ * @minItems 2
156
+ * @maxItems 2
157
+ */
158
+ ">=": [
159
+ boolean | null | number | ProteusValue | string,
160
+ boolean | null | number | ProteusValue | string,
161
+ ];
162
+ }
163
+ | {
164
+ /**
165
+ * Inequality comparison
166
+ *
167
+ * @minItems 2
168
+ * @maxItems 2
169
+ */
170
+ "!=": [
171
+ boolean | null | number | ProteusValue | string,
172
+ boolean | null | number | ProteusValue | string,
173
+ ];
174
+ }
175
+ | {
176
+ /**
177
+ * Less than comparison
178
+ *
179
+ * @minItems 2
180
+ * @maxItems 2
181
+ */
182
+ "<": [
183
+ boolean | null | number | ProteusValue | string,
184
+ boolean | null | number | ProteusValue | string,
185
+ ];
186
+ }
187
+ | {
188
+ /**
189
+ * Less than or equal comparison
190
+ *
191
+ * @minItems 2
192
+ * @maxItems 2
193
+ */
194
+ "<=": [
195
+ boolean | null | number | ProteusValue | string,
196
+ boolean | null | number | ProteusValue | string,
197
+ ];
198
+ }
199
+ | {
200
+ /**
201
+ * Truthy check - returns true if value is truthy (not null, undefined, false, 0, or empty string)
202
+ */
203
+ "!!": boolean | null | number | ProteusValue | string;
204
+ };
205
+ export interface ProteusBadge {
206
+ $type: "Badge";
207
+ alignItems?: SprinklePropAlignItems;
208
+ alignSelf?: SprinklePropAlignSelf;
209
+ animation?: SprinklePropAnimation;
210
+ backgroundImage?: SprinklePropBackgroundImage;
211
+ bg?: SprinklePropBg;
212
+ border?: SprinklePropBorder;
213
+ borderB?: SprinklePropBorderB;
214
+ borderColor?: SprinklePropBorderColor;
215
+ borderL?: SprinklePropBorderL;
216
+ borderR?: SprinklePropBorderR;
217
+ borderT?: SprinklePropBorderT;
218
+ children?: ProteusNode;
219
+ color?: SprinklePropColor;
220
+ cursor?: SprinklePropCursor;
221
+ display?: SprinklePropDisplay;
222
+ flex?: SprinklePropFlex;
223
+ flexDirection?: SprinklePropFlexDirection;
224
+ flexWrap?: SprinklePropFlexWrap;
225
+ fontFamily?: SprinklePropFontFamily;
226
+ fontSize?: SprinklePropFontSize;
227
+ fontWeight?: SprinklePropFontWeight;
228
+ gap?: SprinklePropGap;
229
+ gridColumn?: SprinklePropGridColumn;
230
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
231
+ h?: SprinklePropH;
232
+ /**
233
+ * Control the appearance by selecting between the different badge types.
234
+ */
235
+ intent?:
236
+ | "danger"
237
+ | "information"
238
+ | "neutral"
239
+ | "primary"
240
+ | "success"
241
+ | "warning";
242
+ justifyContent?: SprinklePropJustifyContent;
243
+ justifyItems?: SprinklePropJustifyItems;
244
+ m?: SprinklePropM;
245
+ maxH?: SprinklePropMaxH;
246
+ maxW?: SprinklePropMaxW;
247
+ mb?: SprinklePropMb;
248
+ ml?: SprinklePropMl;
249
+ mr?: SprinklePropMr;
250
+ mt?: SprinklePropMt;
251
+ mx?: SprinklePropMx;
252
+ my?: SprinklePropMy;
253
+ objectFit?: SprinklePropObjectFit;
254
+ overflow?: SprinklePropOverflow;
255
+ overflowX?: SprinklePropOverflowX;
256
+ overflowY?: SprinklePropOverflowY;
257
+ p?: SprinklePropP;
258
+ pb?: SprinklePropPb;
259
+ pl?: SprinklePropPl;
260
+ placeItems?: SprinklePropPlaceItems;
261
+ pointerEvents?: SprinklePropPointerEvents;
262
+ pr?: SprinklePropPr;
263
+ pt?: SprinklePropPt;
264
+ px?: SprinklePropPx;
265
+ py?: SprinklePropPy;
266
+ rounded?: SprinklePropRounded;
267
+ shadow?: SprinklePropShadow;
268
+ size?: SprinklePropSize;
269
+ textAlign?: SprinklePropTextAlign;
270
+ textTransform?: SprinklePropTextTransform;
271
+ transition?: SprinklePropTransition;
272
+ w?: SprinklePropW;
273
+ whiteSpace?: SprinklePropWhiteSpace;
274
+ z?: SprinklePropZ;
275
+ }
276
+ export interface ProteusCancelAction {
277
+ $type: "CancelAction";
278
+ alignItems?: SprinklePropAlignItems;
279
+ alignSelf?: SprinklePropAlignSelf;
280
+ animation?: SprinklePropAnimation;
281
+ backgroundImage?: SprinklePropBackgroundImage;
282
+ bg?: SprinklePropBg;
283
+ border?: SprinklePropBorder;
284
+ borderB?: SprinklePropBorderB;
285
+ borderColor?: SprinklePropBorderColor;
286
+ borderL?: SprinklePropBorderL;
287
+ borderR?: SprinklePropBorderR;
288
+ borderT?: SprinklePropBorderT;
289
+ children?: ProteusNode;
290
+ color?: SprinklePropColor;
291
+ cursor?: SprinklePropCursor;
292
+ display?: SprinklePropDisplay;
293
+ flex?: SprinklePropFlex;
294
+ flexDirection?: SprinklePropFlexDirection;
295
+ flexWrap?: SprinklePropFlexWrap;
296
+ fontFamily?: SprinklePropFontFamily;
297
+ fontSize?: SprinklePropFontSize;
298
+ fontWeight?: SprinklePropFontWeight;
299
+ gap?: SprinklePropGap;
300
+ gridColumn?: SprinklePropGridColumn;
301
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
302
+ h?: SprinklePropH;
303
+ justifyContent?: SprinklePropJustifyContent;
304
+ justifyItems?: SprinklePropJustifyItems;
305
+ m?: SprinklePropM;
306
+ maxH?: SprinklePropMaxH;
307
+ maxW?: SprinklePropMaxW;
308
+ mb?: SprinklePropMb;
309
+ ml?: SprinklePropMl;
310
+ mr?: SprinklePropMr;
311
+ mt?: SprinklePropMt;
312
+ mx?: SprinklePropMx;
313
+ my?: SprinklePropMy;
314
+ objectFit?: SprinklePropObjectFit;
315
+ overflow?: SprinklePropOverflow;
316
+ overflowX?: SprinklePropOverflowX;
317
+ overflowY?: SprinklePropOverflowY;
318
+ p?: SprinklePropP;
319
+ pb?: SprinklePropPb;
320
+ pl?: SprinklePropPl;
321
+ /**
322
+ * Placeholder text for the text input field
323
+ */
324
+ placeholder?: string;
325
+ placeItems?: SprinklePropPlaceItems;
326
+ pointerEvents?: SprinklePropPointerEvents;
327
+ pr?: SprinklePropPr;
328
+ pt?: SprinklePropPt;
329
+ px?: SprinklePropPx;
330
+ py?: SprinklePropPy;
331
+ rounded?: SprinklePropRounded;
332
+ shadow?: SprinklePropShadow;
333
+ textAlign?: SprinklePropTextAlign;
334
+ textTransform?: SprinklePropTextTransform;
335
+ transition?: SprinklePropTransition;
336
+ w?: SprinklePropW;
337
+ whiteSpace?: SprinklePropWhiteSpace;
338
+ z?: SprinklePropZ;
339
+ }
340
+ export interface ProteusChart {
341
+ $type: "Chart";
342
+ /**
343
+ * Chart data records, either inline or a ProteusValue reference
344
+ */
345
+ data?:
346
+ | ProteusValue
347
+ | {
348
+ [k: string]: undefined | unknown;
349
+ }[];
350
+ /**
351
+ * Data series configuration
352
+ */
353
+ series?: {
354
+ /**
355
+ * Series color
356
+ */
357
+ color?: string;
358
+ /**
359
+ * Key in data records for this series
360
+ */
361
+ dataKey: string;
362
+ /**
363
+ * Key in data records for pre-formatted labels displayed above bars
364
+ */
365
+ labelKey?: string;
366
+ /**
367
+ * Display name for legend
368
+ */
369
+ name?: string;
370
+ }[];
371
+ /**
372
+ * Chart type
373
+ */
374
+ type?: "bar";
375
+ /**
376
+ * Key in data records for x-axis labels
377
+ */
378
+ xAxisKey?: string;
379
+ }
380
+ /**
381
+ * Condition for Show component. Can be a comparison operator, logical AND, or logical OR. Supports nesting.
382
+ */
383
+ export type ProteusCondition =
384
+ | ProteusAtomicCondition
385
+ | {
386
+ /**
387
+ * Logical OR - returns true if any condition is true
388
+ *
389
+ * @minItems 1
390
+ */
391
+ or: [
392
+ (
393
+ | ProteusAtomicCondition
394
+ | {
395
+ /**
396
+ * Logical AND - returns true if all conditions are true
397
+ *
398
+ * @minItems 1
399
+ */
400
+ and: [ProteusAtomicCondition, ...ProteusAtomicCondition[]];
401
+ }
402
+ ),
403
+ ...(
404
+ | ProteusAtomicCondition
405
+ | {
406
+ /**
407
+ * Logical AND - returns true if all conditions are true
408
+ *
409
+ * @minItems 1
410
+ */
411
+ and: [ProteusAtomicCondition, ...ProteusAtomicCondition[]];
412
+ }
413
+ )[],
414
+ ];
415
+ };
416
+ export interface ProteusDataTable {
417
+ $type: "DataTable";
418
+ /**
419
+ * Column definitions
420
+ */
421
+ columns?: {
422
+ /**
423
+ * Key in data objects
424
+ */
425
+ accessorKey: string;
426
+ /**
427
+ * Column header text
428
+ */
429
+ header: string;
430
+ }[];
431
+ data?:
432
+ | ProteusValue
433
+ | {
434
+ [k: string]: undefined | unknown;
435
+ }[];
436
+ }
437
+ export interface ProteusDocument {
438
+ $type: "Document";
439
+ /**
440
+ * Actions available for this document
441
+ */
442
+ actions?:
443
+ | (boolean | null | number | ProteusElement | string)[]
444
+ | boolean
445
+ | null
446
+ | number
447
+ | ProteusElement
448
+ | string;
449
+ /**
450
+ * URL or data URI for the application icon (e.g., 'https://example.com/icon.png' or 'data:image/svg+xml,...'). Rendered as an <img> element.
451
+ */
452
+ appIcon?: string;
453
+ /**
454
+ * The official name of the application
455
+ */
456
+ appName: string;
457
+ /**
458
+ * If true, hides chat prompt and forces user interaction with document. User can press ESC or close to abandon.
459
+ */
460
+ blocking?: boolean;
461
+ /**
462
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
463
+ */
464
+ body:
465
+ | (boolean | null | number | ProteusElement | string)[]
466
+ | boolean
467
+ | null
468
+ | number
469
+ | ProteusElement
470
+ | string;
471
+ /**
472
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
473
+ */
474
+ subtitle?:
475
+ | (boolean | null | number | ProteusElement | string)[]
476
+ | boolean
477
+ | null
478
+ | number
479
+ | ProteusElement
480
+ | string;
481
+ /**
482
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
483
+ */
484
+ title:
485
+ | (boolean | null | number | ProteusElement | string)[]
486
+ | boolean
487
+ | null
488
+ | number
489
+ | ProteusElement
490
+ | string;
491
+ }
492
+ /**
493
+ * A single Proteus UI component element identified by its $type discriminator
494
+ */
495
+ export type ProteusElement =
496
+ | ProteusAction
497
+ | ProteusBadge
498
+ | ProteusCancelAction
499
+ | ProteusChart
500
+ | ProteusDataTable
501
+ | ProteusField
502
+ | ProteusGroup
503
+ | ProteusHeading
504
+ | ProteusImage
505
+ | ProteusInput
506
+ | ProteusLink
507
+ | ProteusMap
508
+ | ProteusRange
509
+ | ProteusSelect
510
+ | ProteusSelectContent
511
+ | ProteusSelectTrigger
512
+ | ProteusSeparator
513
+ | ProteusShow
514
+ | ProteusText
515
+ | ProteusTextarea
516
+ | ProteusValue;
517
+ /**
518
+ * Handler for user interactions - either a server-side tool call or client-side message
519
+ */
520
+ export type ProteusEventHandler =
521
+ | {
522
+ /**
523
+ * Message to send to LLM via sendNewMessage()
524
+ */
525
+ message: string;
526
+ }
527
+ | {
528
+ /**
529
+ * Name of registered tool to call
530
+ */
531
+ tool: string;
532
+ };
533
+ export interface ProteusField {
534
+ $type: "Field";
535
+ alignItems?: SprinklePropAlignItems;
536
+ alignSelf?: SprinklePropAlignSelf;
537
+ animation?: SprinklePropAnimation;
538
+ backgroundImage?: SprinklePropBackgroundImage;
539
+ bg?: SprinklePropBg;
540
+ border?: SprinklePropBorder;
541
+ borderB?: SprinklePropBorderB;
542
+ borderColor?: SprinklePropBorderColor;
543
+ borderL?: SprinklePropBorderL;
544
+ borderR?: SprinklePropBorderR;
545
+ borderT?: SprinklePropBorderT;
546
+ children?: ProteusNode;
547
+ color?: SprinklePropColor;
548
+ cursor?: SprinklePropCursor;
549
+ /**
550
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
551
+ */
552
+ description?:
553
+ | (boolean | null | number | ProteusElement | string)[]
554
+ | boolean
555
+ | null
556
+ | number
557
+ | ProteusElement
558
+ | string;
559
+ display?: SprinklePropDisplay;
560
+ flex?: SprinklePropFlex;
561
+ flexDirection?: SprinklePropFlexDirection;
562
+ flexWrap?: SprinklePropFlexWrap;
563
+ fontFamily?: SprinklePropFontFamily;
564
+ fontSize?: SprinklePropFontSize;
565
+ fontWeight?: SprinklePropFontWeight;
566
+ gap?: SprinklePropGap;
567
+ gridColumn?: SprinklePropGridColumn;
568
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
569
+ h?: SprinklePropH;
570
+ /**
571
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
572
+ */
573
+ info?:
574
+ | (boolean | null | number | ProteusElement | string)[]
575
+ | boolean
576
+ | null
577
+ | number
578
+ | ProteusElement
579
+ | string;
580
+ justifyContent?: SprinklePropJustifyContent;
581
+ justifyItems?: SprinklePropJustifyItems;
582
+ /**
583
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
584
+ */
585
+ label?:
586
+ | (boolean | null | number | ProteusElement | string)[]
587
+ | boolean
588
+ | null
589
+ | number
590
+ | ProteusElement
591
+ | string;
592
+ m?: SprinklePropM;
593
+ maxH?: SprinklePropMaxH;
594
+ maxW?: SprinklePropMaxW;
595
+ mb?: SprinklePropMb;
596
+ ml?: SprinklePropMl;
597
+ mr?: SprinklePropMr;
598
+ mt?: SprinklePropMt;
599
+ mx?: SprinklePropMx;
600
+ my?: SprinklePropMy;
601
+ objectFit?: SprinklePropObjectFit;
602
+ overflow?: SprinklePropOverflow;
603
+ overflowX?: SprinklePropOverflowX;
604
+ overflowY?: SprinklePropOverflowY;
605
+ p?: SprinklePropP;
606
+ pb?: SprinklePropPb;
607
+ pl?: SprinklePropPl;
608
+ placeItems?: SprinklePropPlaceItems;
609
+ pointerEvents?: SprinklePropPointerEvents;
610
+ pr?: SprinklePropPr;
611
+ pt?: SprinklePropPt;
612
+ px?: SprinklePropPx;
613
+ py?: SprinklePropPy;
614
+ /**
615
+ * Display an asterisk for required inputs.
616
+ */
617
+ required?: boolean;
618
+ rounded?: SprinklePropRounded;
619
+ shadow?: SprinklePropShadow;
620
+ size?: SprinklePropSize;
621
+ textAlign?: SprinklePropTextAlign;
622
+ textTransform?: SprinklePropTextTransform;
623
+ transition?: SprinklePropTransition;
624
+ w?: SprinklePropW;
625
+ whiteSpace?: SprinklePropWhiteSpace;
626
+ z?: SprinklePropZ;
627
+ }
628
+ export interface ProteusGroup {
629
+ $type: "Group";
630
+ /**
631
+ * Set the element's `align-items` CSS property. Defaults to `center` when
632
+ * `flexDirection='row'`, and `stretch` when `flexDirection='column'`.
633
+ */
634
+ alignItems?: "center" | "end" | "normal" | "start" | "stretch";
635
+ alignSelf?: SprinklePropAlignSelf;
636
+ animation?: SprinklePropAnimation;
637
+ backgroundImage?: SprinklePropBackgroundImage;
638
+ bg?: SprinklePropBg;
639
+ border?: SprinklePropBorder;
640
+ borderB?: SprinklePropBorderB;
641
+ borderColor?: SprinklePropBorderColor;
642
+ borderL?: SprinklePropBorderL;
643
+ borderR?: SprinklePropBorderR;
644
+ borderT?: SprinklePropBorderT;
645
+ children?: ProteusNode;
646
+ color?: SprinklePropColor;
647
+ cursor?: SprinklePropCursor;
648
+ display?: SprinklePropDisplay;
649
+ flex?: SprinklePropFlex;
650
+ /**
651
+ * Set the element's `flex-direction` CSS property.
652
+ *
653
+ * Default: 'row' (CSS standard)
654
+ */
655
+ flexDirection?: "column" | "column-reverse" | "row" | "row-reverse";
656
+ flexWrap?: SprinklePropFlexWrap;
657
+ fontFamily?: SprinklePropFontFamily;
658
+ fontSize?: SprinklePropFontSize;
659
+ fontWeight?: SprinklePropFontWeight;
660
+ gap?: SprinklePropGap;
661
+ gridColumn?: SprinklePropGridColumn;
662
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
663
+ h?: SprinklePropH;
664
+ justifyContent?: SprinklePropJustifyContent;
665
+ justifyItems?: SprinklePropJustifyItems;
666
+ m?: SprinklePropM;
667
+ maxH?: SprinklePropMaxH;
668
+ maxW?: SprinklePropMaxW;
669
+ mb?: SprinklePropMb;
670
+ ml?: SprinklePropMl;
671
+ mr?: SprinklePropMr;
672
+ mt?: SprinklePropMt;
673
+ mx?: SprinklePropMx;
674
+ my?: SprinklePropMy;
675
+ objectFit?: SprinklePropObjectFit;
676
+ overflow?: SprinklePropOverflow;
677
+ overflowX?: SprinklePropOverflowX;
678
+ overflowY?: SprinklePropOverflowY;
679
+ p?: SprinklePropP;
680
+ pb?: SprinklePropPb;
681
+ pl?: SprinklePropPl;
682
+ placeItems?: SprinklePropPlaceItems;
683
+ pointerEvents?: SprinklePropPointerEvents;
684
+ pr?: SprinklePropPr;
685
+ pt?: SprinklePropPt;
686
+ px?: SprinklePropPx;
687
+ py?: SprinklePropPy;
688
+ rounded?: SprinklePropRounded;
689
+ shadow?: SprinklePropShadow;
690
+ size?: SprinklePropSize;
691
+ textAlign?: SprinklePropTextAlign;
692
+ textTransform?: SprinklePropTextTransform;
693
+ transition?: SprinklePropTransition;
694
+ w?: SprinklePropW;
695
+ whiteSpace?: SprinklePropWhiteSpace;
696
+ z?: SprinklePropZ;
697
+ }
698
+ export interface ProteusHeading {
699
+ $type: "Heading";
700
+ alignItems?: SprinklePropAlignItems;
701
+ alignSelf?: SprinklePropAlignSelf;
702
+ animation?: SprinklePropAnimation;
703
+ backgroundImage?: SprinklePropBackgroundImage;
704
+ bg?: SprinklePropBg;
705
+ border?: SprinklePropBorder;
706
+ borderB?: SprinklePropBorderB;
707
+ borderColor?: SprinklePropBorderColor;
708
+ borderL?: SprinklePropBorderL;
709
+ borderR?: SprinklePropBorderR;
710
+ borderT?: SprinklePropBorderT;
711
+ children?: ProteusNode;
712
+ color?: SprinklePropColor;
713
+ cursor?: SprinklePropCursor;
714
+ display?: SprinklePropDisplay;
715
+ flex?: SprinklePropFlex;
716
+ flexDirection?: SprinklePropFlexDirection;
717
+ flexWrap?: SprinklePropFlexWrap;
718
+ fontFamily?: SprinklePropFontFamily;
719
+ fontSize?: SprinklePropFontSize;
720
+ fontWeight?: SprinklePropFontWeight;
721
+ gap?: SprinklePropGap;
722
+ gridColumn?: SprinklePropGridColumn;
723
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
724
+ h?: SprinklePropH;
725
+ justifyContent?: SprinklePropJustifyContent;
726
+ justifyItems?: SprinklePropJustifyItems;
727
+ /**
728
+ * Heading level (1-4) that controls both the semantic HTML tag and font size.
729
+ * - `level="1"`: renders `<h1>` with `fontSize="4xl"` (default)
730
+ * - `level="2"`: renders `<h2>` with `fontSize="3xl"`
731
+ * - `level="3"`: renders `<h3>` with `fontSize="2xl"`
732
+ * - `level="4"`: renders `<h4>` with `fontSize="xl"`
733
+ *
734
+ * Use `asChild` to decouple the semantic level from visual appearance.
735
+ */
736
+ level?: "1" | "2" | "3" | "4";
737
+ m?: SprinklePropM;
738
+ maxH?: SprinklePropMaxH;
739
+ maxW?: SprinklePropMaxW;
740
+ mb?: SprinklePropMb;
741
+ ml?: SprinklePropMl;
742
+ mr?: SprinklePropMr;
743
+ mt?: SprinklePropMt;
744
+ mx?: SprinklePropMx;
745
+ my?: SprinklePropMy;
746
+ objectFit?: SprinklePropObjectFit;
747
+ overflow?: SprinklePropOverflow;
748
+ overflowX?: SprinklePropOverflowX;
749
+ overflowY?: SprinklePropOverflowY;
750
+ p?: SprinklePropP;
751
+ pb?: SprinklePropPb;
752
+ pl?: SprinklePropPl;
753
+ placeItems?: SprinklePropPlaceItems;
754
+ pointerEvents?: SprinklePropPointerEvents;
755
+ pr?: SprinklePropPr;
756
+ pt?: SprinklePropPt;
757
+ px?: SprinklePropPx;
758
+ py?: SprinklePropPy;
759
+ rounded?: SprinklePropRounded;
760
+ shadow?: SprinklePropShadow;
761
+ size?: SprinklePropSize;
762
+ textAlign?: SprinklePropTextAlign;
763
+ textTransform?: SprinklePropTextTransform;
764
+ transition?: SprinklePropTransition;
765
+ w?: SprinklePropW;
766
+ whiteSpace?: SprinklePropWhiteSpace;
767
+ z?: SprinklePropZ;
768
+ }
769
+ export interface ProteusImage {
770
+ $type: "Image";
771
+ alignItems?: SprinklePropAlignItems;
772
+ alignSelf?: SprinklePropAlignSelf;
773
+ /**
774
+ * Alternative text for the image
775
+ */
776
+ alt?: ProteusValue | string;
777
+ animation?: SprinklePropAnimation;
778
+ backgroundImage?: SprinklePropBackgroundImage;
779
+ bg?: SprinklePropBg;
780
+ border?: SprinklePropBorder;
781
+ borderB?: SprinklePropBorderB;
782
+ borderColor?: SprinklePropBorderColor;
783
+ borderL?: SprinklePropBorderL;
784
+ borderR?: SprinklePropBorderR;
785
+ borderT?: SprinklePropBorderT;
786
+ color?: SprinklePropColor;
787
+ cursor?: SprinklePropCursor;
788
+ display?: SprinklePropDisplay;
789
+ flex?: SprinklePropFlex;
790
+ flexDirection?: SprinklePropFlexDirection;
791
+ flexWrap?: SprinklePropFlexWrap;
792
+ fontFamily?: SprinklePropFontFamily;
793
+ fontSize?: SprinklePropFontSize;
794
+ fontWeight?: SprinklePropFontWeight;
795
+ gap?: SprinklePropGap;
796
+ gridColumn?: SprinklePropGridColumn;
797
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
798
+ h?: SprinklePropH;
799
+ justifyContent?: SprinklePropJustifyContent;
800
+ justifyItems?: SprinklePropJustifyItems;
801
+ m?: SprinklePropM;
802
+ maxH?: SprinklePropMaxH;
803
+ maxW?: SprinklePropMaxW;
804
+ mb?: SprinklePropMb;
805
+ ml?: SprinklePropMl;
806
+ mr?: SprinklePropMr;
807
+ mt?: SprinklePropMt;
808
+ mx?: SprinklePropMx;
809
+ my?: SprinklePropMy;
810
+ objectFit?: SprinklePropObjectFit;
811
+ overflow?: SprinklePropOverflow;
812
+ overflowX?: SprinklePropOverflowX;
813
+ overflowY?: SprinklePropOverflowY;
814
+ p?: SprinklePropP;
815
+ pb?: SprinklePropPb;
816
+ pl?: SprinklePropPl;
817
+ placeItems?: SprinklePropPlaceItems;
818
+ pointerEvents?: SprinklePropPointerEvents;
819
+ pr?: SprinklePropPr;
820
+ pt?: SprinklePropPt;
821
+ px?: SprinklePropPx;
822
+ py?: SprinklePropPy;
823
+ rounded?: SprinklePropRounded;
824
+ shadow?: SprinklePropShadow;
825
+ size?: SprinklePropSize;
826
+ /**
827
+ * The image source URL
828
+ */
829
+ src?: ProteusValue | string;
830
+ textAlign?: SprinklePropTextAlign;
831
+ textTransform?: SprinklePropTextTransform;
832
+ transition?: SprinklePropTransition;
833
+ w?: SprinklePropW;
834
+ whiteSpace?: SprinklePropWhiteSpace;
835
+ z?: SprinklePropZ;
836
+ }
837
+ export interface ProteusInput {
838
+ $type: "Input";
839
+ /**
840
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
841
+ */
842
+ addonAfter?:
843
+ | (boolean | null | number | ProteusElement | string)[]
844
+ | boolean
845
+ | null
846
+ | number
847
+ | ProteusElement
848
+ | string;
849
+ /**
850
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
851
+ */
852
+ addonBefore?:
853
+ | (boolean | null | number | ProteusElement | string)[]
854
+ | boolean
855
+ | null
856
+ | number
857
+ | ProteusElement
858
+ | string;
859
+ alignItems?: SprinklePropAlignItems;
860
+ alignSelf?: SprinklePropAlignSelf;
861
+ animation?: SprinklePropAnimation;
862
+ /**
863
+ * Control the appearance of the input.
864
+ */
865
+ appearance?: "default" | "number";
866
+ backgroundImage?: SprinklePropBackgroundImage;
867
+ bg?: SprinklePropBg;
868
+ border?: SprinklePropBorder;
869
+ borderB?: SprinklePropBorderB;
870
+ borderColor?: SprinklePropBorderColor;
871
+ borderL?: SprinklePropBorderL;
872
+ borderR?: SprinklePropBorderR;
873
+ borderT?: SprinklePropBorderT;
874
+ color?: SprinklePropColor;
875
+ cursor?: SprinklePropCursor;
876
+ display?: SprinklePropDisplay;
877
+ flex?: SprinklePropFlex;
878
+ flexDirection?: SprinklePropFlexDirection;
879
+ flexWrap?: SprinklePropFlexWrap;
880
+ fontFamily?: SprinklePropFontFamily;
881
+ fontSize?: SprinklePropFontSize;
882
+ fontWeight?: SprinklePropFontWeight;
883
+ gap?: SprinklePropGap;
884
+ gridColumn?: SprinklePropGridColumn;
885
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
886
+ h?: SprinklePropH;
887
+ justifyContent?: SprinklePropJustifyContent;
888
+ justifyItems?: SprinklePropJustifyItems;
889
+ m?: SprinklePropM;
890
+ maxH?: SprinklePropMaxH;
891
+ maxW?: SprinklePropMaxW;
892
+ mb?: SprinklePropMb;
893
+ ml?: SprinklePropMl;
894
+ mr?: SprinklePropMr;
895
+ mt?: SprinklePropMt;
896
+ mx?: SprinklePropMx;
897
+ my?: SprinklePropMy;
898
+ /**
899
+ * The name of the form control element.
900
+ */
901
+ name?: string;
902
+ objectFit?: SprinklePropObjectFit;
903
+ overflow?: SprinklePropOverflow;
904
+ overflowX?: SprinklePropOverflowX;
905
+ overflowY?: SprinklePropOverflowY;
906
+ p?: SprinklePropP;
907
+ pb?: SprinklePropPb;
908
+ pl?: SprinklePropPl;
909
+ /**
910
+ * The placeholder text to use when control has no value.
911
+ */
912
+ placeholder?: string;
913
+ placeItems?: SprinklePropPlaceItems;
914
+ pointerEvents?: SprinklePropPointerEvents;
915
+ pr?: SprinklePropPr;
916
+ pt?: SprinklePropPt;
917
+ px?: SprinklePropPx;
918
+ py?: SprinklePropPy;
919
+ rounded?: SprinklePropRounded;
920
+ shadow?: SprinklePropShadow;
921
+ textAlign?: SprinklePropTextAlign;
922
+ textTransform?: SprinklePropTextTransform;
923
+ transition?: SprinklePropTransition;
924
+ /**
925
+ * The input type.
926
+ */
927
+ type?:
928
+ | "button"
929
+ | "checkbox"
930
+ | "color"
931
+ | "date"
932
+ | "datetime-local"
933
+ | "email"
934
+ | "file"
935
+ | "hidden"
936
+ | "image"
937
+ | "month"
938
+ | "number"
939
+ | "password"
940
+ | "radio"
941
+ | "range"
942
+ | "reset"
943
+ | "search"
944
+ | "submit"
945
+ | "tel"
946
+ | "text"
947
+ | "time"
948
+ | "url"
949
+ | "week"
950
+ | string;
951
+ w?: SprinklePropW;
952
+ whiteSpace?: SprinklePropWhiteSpace;
953
+ z?: SprinklePropZ;
954
+ }
955
+ export interface ProteusLink {
956
+ $type: "Link";
957
+ alignItems?: SprinklePropAlignItems;
958
+ alignSelf?: SprinklePropAlignSelf;
959
+ animation?: SprinklePropAnimation;
960
+ backgroundImage?: SprinklePropBackgroundImage;
961
+ bg?: SprinklePropBg;
962
+ border?: SprinklePropBorder;
963
+ borderB?: SprinklePropBorderB;
964
+ borderColor?: SprinklePropBorderColor;
965
+ borderL?: SprinklePropBorderL;
966
+ borderR?: SprinklePropBorderR;
967
+ borderT?: SprinklePropBorderT;
968
+ children?: ProteusNode;
969
+ color?: SprinklePropColor;
970
+ cursor?: SprinklePropCursor;
971
+ display?: SprinklePropDisplay;
972
+ flex?: SprinklePropFlex;
973
+ flexDirection?: SprinklePropFlexDirection;
974
+ flexWrap?: SprinklePropFlexWrap;
975
+ fontFamily?: SprinklePropFontFamily;
976
+ fontSize?: SprinklePropFontSize;
977
+ fontWeight?: SprinklePropFontWeight;
978
+ gap?: SprinklePropGap;
979
+ gridColumn?: SprinklePropGridColumn;
980
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
981
+ h?: SprinklePropH;
982
+ /**
983
+ * The link href.
984
+ */
985
+ href?: string;
986
+ justifyContent?: SprinklePropJustifyContent;
987
+ justifyItems?: SprinklePropJustifyItems;
988
+ m?: SprinklePropM;
989
+ maxH?: SprinklePropMaxH;
990
+ maxW?: SprinklePropMaxW;
991
+ mb?: SprinklePropMb;
992
+ ml?: SprinklePropMl;
993
+ mr?: SprinklePropMr;
994
+ mt?: SprinklePropMt;
995
+ mx?: SprinklePropMx;
996
+ my?: SprinklePropMy;
997
+ objectFit?: SprinklePropObjectFit;
998
+ overflow?: SprinklePropOverflow;
999
+ overflowX?: SprinklePropOverflowX;
1000
+ overflowY?: SprinklePropOverflowY;
1001
+ p?: SprinklePropP;
1002
+ pb?: SprinklePropPb;
1003
+ pl?: SprinklePropPl;
1004
+ placeItems?: SprinklePropPlaceItems;
1005
+ pointerEvents?: SprinklePropPointerEvents;
1006
+ pr?: SprinklePropPr;
1007
+ pt?: SprinklePropPt;
1008
+ px?: SprinklePropPx;
1009
+ py?: SprinklePropPy;
1010
+ rounded?: SprinklePropRounded;
1011
+ shadow?: SprinklePropShadow;
1012
+ size?: SprinklePropSize;
1013
+ textAlign?: SprinklePropTextAlign;
1014
+ textTransform?: SprinklePropTextTransform;
1015
+ transition?: SprinklePropTransition;
1016
+ w?: SprinklePropW;
1017
+ whiteSpace?: SprinklePropWhiteSpace;
1018
+ z?: SprinklePropZ;
1019
+ }
1020
+ export interface ProteusMap {
1021
+ $type: "Map";
1022
+ /**
1023
+ * Template object to render for each item in the array. Value paths inside this template are relative to the current item (e.g., path='title' resolves to each item's 'title' field). Use a leading '/' to reference top-level data (e.g., path='/title' resolves to the root data's 'title').
1024
+ */
1025
+ children?: {
1026
+ [k: string]: undefined | unknown;
1027
+ };
1028
+ /**
1029
+ * JSON pointer path to the source array in the data (e.g., '/results')
1030
+ */
1031
+ path: string;
1032
+ }
1033
+ /**
1034
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
1035
+ */
1036
+ export type ProteusNode =
1037
+ | (boolean | null | number | ProteusElement | string)[]
1038
+ | boolean
1039
+ | null
1040
+ | number
1041
+ | ProteusElement
1042
+ | string;
1043
+ export interface ProteusRange {
1044
+ $type: "Range";
1045
+ alignItems?: SprinklePropAlignItems;
1046
+ alignSelf?: SprinklePropAlignSelf;
1047
+ animation?: SprinklePropAnimation;
1048
+ backgroundImage?: SprinklePropBackgroundImage;
1049
+ bg?: SprinklePropBg;
1050
+ border?: SprinklePropBorder;
1051
+ borderB?: SprinklePropBorderB;
1052
+ borderColor?: SprinklePropBorderColor;
1053
+ borderL?: SprinklePropBorderL;
1054
+ borderR?: SprinklePropBorderR;
1055
+ borderT?: SprinklePropBorderT;
1056
+ color?: SprinklePropColor;
1057
+ cursor?: SprinklePropCursor;
1058
+ display?: SprinklePropDisplay;
1059
+ flex?: SprinklePropFlex;
1060
+ flexDirection?: SprinklePropFlexDirection;
1061
+ flexWrap?: SprinklePropFlexWrap;
1062
+ fontFamily?: SprinklePropFontFamily;
1063
+ fontSize?: SprinklePropFontSize;
1064
+ fontWeight?: SprinklePropFontWeight;
1065
+ gap?: SprinklePropGap;
1066
+ gridColumn?: SprinklePropGridColumn;
1067
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
1068
+ h?: SprinklePropH;
1069
+ justifyContent?: SprinklePropJustifyContent;
1070
+ justifyItems?: SprinklePropJustifyItems;
1071
+ m?: SprinklePropM;
1072
+ /**
1073
+ * The marks to display on the range steps.
1074
+ */
1075
+ marks?: (
1076
+ | number
1077
+ | {
1078
+ /**
1079
+ * The label for the mark
1080
+ */
1081
+ label: string;
1082
+ /**
1083
+ * The value for the mark
1084
+ */
1085
+ value: number;
1086
+ }
1087
+ )[];
1088
+ /**
1089
+ * The maximum value for the range.
1090
+ */
1091
+ max?: number;
1092
+ maxH?: SprinklePropMaxH;
1093
+ maxW?: SprinklePropMaxW;
1094
+ mb?: SprinklePropMb;
1095
+ /**
1096
+ * The minimum value for the range.
1097
+ */
1098
+ min?: number;
1099
+ ml?: SprinklePropMl;
1100
+ mr?: SprinklePropMr;
1101
+ mt?: SprinklePropMt;
1102
+ mx?: SprinklePropMx;
1103
+ my?: SprinklePropMy;
1104
+ objectFit?: SprinklePropObjectFit;
1105
+ overflow?: SprinklePropOverflow;
1106
+ overflowX?: SprinklePropOverflowX;
1107
+ overflowY?: SprinklePropOverflowY;
1108
+ p?: SprinklePropP;
1109
+ pb?: SprinklePropPb;
1110
+ pl?: SprinklePropPl;
1111
+ placeItems?: SprinklePropPlaceItems;
1112
+ pointerEvents?: SprinklePropPointerEvents;
1113
+ pr?: SprinklePropPr;
1114
+ pt?: SprinklePropPt;
1115
+ px?: SprinklePropPx;
1116
+ py?: SprinklePropPy;
1117
+ rounded?: SprinklePropRounded;
1118
+ shadow?: SprinklePropShadow;
1119
+ /**
1120
+ * The stepping interval for the range.
1121
+ */
1122
+ step?: number;
1123
+ textAlign?: SprinklePropTextAlign;
1124
+ textTransform?: SprinklePropTextTransform;
1125
+ transition?: SprinklePropTransition;
1126
+ w?: SprinklePropW;
1127
+ whiteSpace?: SprinklePropWhiteSpace;
1128
+ z?: SprinklePropZ;
1129
+ }
1130
+ export interface ProteusSelect {
1131
+ $type: "Select";
1132
+ children?: ProteusNode;
1133
+ /**
1134
+ * The name of the inner select element.
1135
+ */
1136
+ name?: string;
1137
+ /**
1138
+ * The select items/options we want to render.
1139
+ */
1140
+ options: {
1141
+ /**
1142
+ * String representation of items
1143
+ */
1144
+ label: string;
1145
+ /**
1146
+ * Return a unique key for each item
1147
+ */
1148
+ value: string;
1149
+ }[];
1150
+ }
1151
+ export interface ProteusSelectContent {
1152
+ $type: "SelectContent";
1153
+ alignItems?: SprinklePropAlignItems;
1154
+ alignSelf?: SprinklePropAlignSelf;
1155
+ animation?: SprinklePropAnimation;
1156
+ backgroundImage?: SprinklePropBackgroundImage;
1157
+ bg?: SprinklePropBg;
1158
+ border?: SprinklePropBorder;
1159
+ borderB?: SprinklePropBorderB;
1160
+ borderColor?: SprinklePropBorderColor;
1161
+ borderL?: SprinklePropBorderL;
1162
+ borderR?: SprinklePropBorderR;
1163
+ borderT?: SprinklePropBorderT;
1164
+ color?: SprinklePropColor;
1165
+ cursor?: SprinklePropCursor;
1166
+ display?: SprinklePropDisplay;
1167
+ flex?: SprinklePropFlex;
1168
+ flexDirection?: SprinklePropFlexDirection;
1169
+ flexWrap?: SprinklePropFlexWrap;
1170
+ fontFamily?: SprinklePropFontFamily;
1171
+ fontSize?: SprinklePropFontSize;
1172
+ fontWeight?: SprinklePropFontWeight;
1173
+ gap?: SprinklePropGap;
1174
+ gridColumn?: SprinklePropGridColumn;
1175
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
1176
+ h?: SprinklePropH;
1177
+ justifyContent?: SprinklePropJustifyContent;
1178
+ justifyItems?: SprinklePropJustifyItems;
1179
+ m?: SprinklePropM;
1180
+ maxW?: SprinklePropMaxW;
1181
+ mb?: SprinklePropMb;
1182
+ ml?: SprinklePropMl;
1183
+ mr?: SprinklePropMr;
1184
+ mt?: SprinklePropMt;
1185
+ mx?: SprinklePropMx;
1186
+ my?: SprinklePropMy;
1187
+ objectFit?: SprinklePropObjectFit;
1188
+ overflow?: SprinklePropOverflow;
1189
+ overflowX?: SprinklePropOverflowX;
1190
+ overflowY?: SprinklePropOverflowY;
1191
+ p?: SprinklePropP;
1192
+ pb?: SprinklePropPb;
1193
+ pl?: SprinklePropPl;
1194
+ placeItems?: SprinklePropPlaceItems;
1195
+ pointerEvents?: SprinklePropPointerEvents;
1196
+ pr?: SprinklePropPr;
1197
+ pt?: SprinklePropPt;
1198
+ px?: SprinklePropPx;
1199
+ py?: SprinklePropPy;
1200
+ rounded?: SprinklePropRounded;
1201
+ shadow?: SprinklePropShadow;
1202
+ size?: SprinklePropSize;
1203
+ textAlign?: SprinklePropTextAlign;
1204
+ textTransform?: SprinklePropTextTransform;
1205
+ transition?: SprinklePropTransition;
1206
+ w?: SprinklePropW;
1207
+ whiteSpace?: SprinklePropWhiteSpace;
1208
+ z?: SprinklePropZ;
1209
+ }
1210
+ export interface ProteusSelectTrigger {
1211
+ $type: "SelectTrigger";
1212
+ alignItems?: SprinklePropAlignItems;
1213
+ alignSelf?: SprinklePropAlignSelf;
1214
+ animation?: SprinklePropAnimation;
1215
+ backgroundImage?: SprinklePropBackgroundImage;
1216
+ bg?: SprinklePropBg;
1217
+ border?: SprinklePropBorder;
1218
+ borderB?: SprinklePropBorderB;
1219
+ borderColor?: SprinklePropBorderColor;
1220
+ borderL?: SprinklePropBorderL;
1221
+ borderR?: SprinklePropBorderR;
1222
+ borderT?: SprinklePropBorderT;
1223
+ children?: ProteusNode;
1224
+ color?: SprinklePropColor;
1225
+ cursor?: SprinklePropCursor;
1226
+ display?: SprinklePropDisplay;
1227
+ flex?: SprinklePropFlex;
1228
+ flexDirection?: SprinklePropFlexDirection;
1229
+ flexWrap?: SprinklePropFlexWrap;
1230
+ fontFamily?: SprinklePropFontFamily;
1231
+ fontSize?: SprinklePropFontSize;
1232
+ fontWeight?: SprinklePropFontWeight;
1233
+ gap?: SprinklePropGap;
1234
+ gridColumn?: SprinklePropGridColumn;
1235
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
1236
+ h?: SprinklePropH;
1237
+ justifyContent?: SprinklePropJustifyContent;
1238
+ justifyItems?: SprinklePropJustifyItems;
1239
+ m?: SprinklePropM;
1240
+ maxH?: SprinklePropMaxH;
1241
+ maxW?: SprinklePropMaxW;
1242
+ mb?: SprinklePropMb;
1243
+ ml?: SprinklePropMl;
1244
+ mr?: SprinklePropMr;
1245
+ mt?: SprinklePropMt;
1246
+ mx?: SprinklePropMx;
1247
+ my?: SprinklePropMy;
1248
+ objectFit?: SprinklePropObjectFit;
1249
+ overflow?: SprinklePropOverflow;
1250
+ overflowX?: SprinklePropOverflowX;
1251
+ overflowY?: SprinklePropOverflowY;
1252
+ p?: SprinklePropP;
1253
+ pb?: SprinklePropPb;
1254
+ pl?: SprinklePropPl;
1255
+ placeItems?: SprinklePropPlaceItems;
1256
+ pointerEvents?: SprinklePropPointerEvents;
1257
+ pr?: SprinklePropPr;
1258
+ pt?: SprinklePropPt;
1259
+ px?: SprinklePropPx;
1260
+ py?: SprinklePropPy;
1261
+ rounded?: SprinklePropRounded;
1262
+ shadow?: SprinklePropShadow;
1263
+ textAlign?: SprinklePropTextAlign;
1264
+ textTransform?: SprinklePropTextTransform;
1265
+ transition?: SprinklePropTransition;
1266
+ w?: SprinklePropW;
1267
+ whiteSpace?: SprinklePropWhiteSpace;
1268
+ z?: SprinklePropZ;
1269
+ }
1270
+ export interface ProteusSeparator {
1271
+ $type: "Separator";
1272
+ alignItems?: SprinklePropAlignItems;
1273
+ alignSelf?: SprinklePropAlignSelf;
1274
+ animation?: SprinklePropAnimation;
1275
+ backgroundImage?: SprinklePropBackgroundImage;
1276
+ bg?: SprinklePropBg;
1277
+ border?: SprinklePropBorder;
1278
+ borderB?: SprinklePropBorderB;
1279
+ borderColor?: SprinklePropBorderColor;
1280
+ borderL?: SprinklePropBorderL;
1281
+ borderR?: SprinklePropBorderR;
1282
+ borderT?: SprinklePropBorderT;
1283
+ color?: SprinklePropColor;
1284
+ cursor?: SprinklePropCursor;
1285
+ display?: SprinklePropDisplay;
1286
+ flex?: SprinklePropFlex;
1287
+ flexDirection?: SprinklePropFlexDirection;
1288
+ flexWrap?: SprinklePropFlexWrap;
1289
+ fontFamily?: SprinklePropFontFamily;
1290
+ fontSize?: SprinklePropFontSize;
1291
+ fontWeight?: SprinklePropFontWeight;
1292
+ gap?: SprinklePropGap;
1293
+ gridColumn?: SprinklePropGridColumn;
1294
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
1295
+ h?: SprinklePropH;
1296
+ justifyContent?: SprinklePropJustifyContent;
1297
+ justifyItems?: SprinklePropJustifyItems;
1298
+ m?: SprinklePropM;
1299
+ maxH?: SprinklePropMaxH;
1300
+ maxW?: SprinklePropMaxW;
1301
+ mb?: SprinklePropMb;
1302
+ ml?: SprinklePropMl;
1303
+ mr?: SprinklePropMr;
1304
+ mt?: SprinklePropMt;
1305
+ mx?: SprinklePropMx;
1306
+ my?: SprinklePropMy;
1307
+ objectFit?: SprinklePropObjectFit;
1308
+ overflow?: SprinklePropOverflow;
1309
+ overflowX?: SprinklePropOverflowX;
1310
+ overflowY?: SprinklePropOverflowY;
1311
+ p?: SprinklePropP;
1312
+ pb?: SprinklePropPb;
1313
+ pl?: SprinklePropPl;
1314
+ placeItems?: SprinklePropPlaceItems;
1315
+ pointerEvents?: SprinklePropPointerEvents;
1316
+ pr?: SprinklePropPr;
1317
+ pt?: SprinklePropPt;
1318
+ px?: SprinklePropPx;
1319
+ py?: SprinklePropPy;
1320
+ rounded?: SprinklePropRounded;
1321
+ shadow?: SprinklePropShadow;
1322
+ size?: SprinklePropSize;
1323
+ textAlign?: SprinklePropTextAlign;
1324
+ textTransform?: SprinklePropTextTransform;
1325
+ transition?: SprinklePropTransition;
1326
+ w?: SprinklePropW;
1327
+ whiteSpace?: SprinklePropWhiteSpace;
1328
+ z?: SprinklePropZ;
1329
+ }
1330
+ export interface ProteusShow {
1331
+ $type: "Show";
1332
+ /**
1333
+ * A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
1334
+ */
1335
+ children?:
1336
+ | (boolean | null | number | ProteusElement | string)[]
1337
+ | boolean
1338
+ | null
1339
+ | number
1340
+ | ProteusElement
1341
+ | string;
1342
+ /**
1343
+ * Single condition or array of conditions (AND logic). Each condition is an object with one operator key.
1344
+ */
1345
+ when?: ProteusCondition | ProteusCondition[];
1346
+ }
1347
+ export interface ProteusText {
1348
+ $type: "Text";
1349
+ alignItems?: SprinklePropAlignItems;
1350
+ alignSelf?: SprinklePropAlignSelf;
1351
+ animation?: SprinklePropAnimation;
1352
+ backgroundImage?: SprinklePropBackgroundImage;
1353
+ bg?: SprinklePropBg;
1354
+ border?: SprinklePropBorder;
1355
+ borderB?: SprinklePropBorderB;
1356
+ borderColor?: SprinklePropBorderColor;
1357
+ borderL?: SprinklePropBorderL;
1358
+ borderR?: SprinklePropBorderR;
1359
+ borderT?: SprinklePropBorderT;
1360
+ children?: ProteusNode;
1361
+ color?: SprinklePropColor;
1362
+ cursor?: SprinklePropCursor;
1363
+ display?: SprinklePropDisplay;
1364
+ flex?: SprinklePropFlex;
1365
+ flexDirection?: SprinklePropFlexDirection;
1366
+ flexWrap?: SprinklePropFlexWrap;
1367
+ fontFamily?: SprinklePropFontFamily;
1368
+ fontSize?: SprinklePropFontSize;
1369
+ fontWeight?: SprinklePropFontWeight;
1370
+ gap?: SprinklePropGap;
1371
+ gridColumn?: SprinklePropGridColumn;
1372
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
1373
+ h?: SprinklePropH;
1374
+ justifyContent?: SprinklePropJustifyContent;
1375
+ justifyItems?: SprinklePropJustifyItems;
1376
+ /**
1377
+ * Truncate the text at specific number of lines.
1378
+ */
1379
+ lineClamp?: "1" | "2" | "3" | "4";
1380
+ m?: SprinklePropM;
1381
+ maxH?: SprinklePropMaxH;
1382
+ maxW?: SprinklePropMaxW;
1383
+ mb?: SprinklePropMb;
1384
+ ml?: SprinklePropMl;
1385
+ mr?: SprinklePropMr;
1386
+ mt?: SprinklePropMt;
1387
+ mx?: SprinklePropMx;
1388
+ my?: SprinklePropMy;
1389
+ objectFit?: SprinklePropObjectFit;
1390
+ overflow?: SprinklePropOverflow;
1391
+ overflowX?: SprinklePropOverflowX;
1392
+ overflowY?: SprinklePropOverflowY;
1393
+ p?: SprinklePropP;
1394
+ pb?: SprinklePropPb;
1395
+ pl?: SprinklePropPl;
1396
+ placeItems?: SprinklePropPlaceItems;
1397
+ pointerEvents?: SprinklePropPointerEvents;
1398
+ pr?: SprinklePropPr;
1399
+ pt?: SprinklePropPt;
1400
+ px?: SprinklePropPx;
1401
+ py?: SprinklePropPy;
1402
+ rounded?: SprinklePropRounded;
1403
+ shadow?: SprinklePropShadow;
1404
+ size?: SprinklePropSize;
1405
+ textAlign?: SprinklePropTextAlign;
1406
+ textTransform?: SprinklePropTextTransform;
1407
+ transition?: SprinklePropTransition;
1408
+ /**
1409
+ * Whether to truncate the text and add an ellipsis at the end.
1410
+ */
1411
+ truncate?: boolean;
1412
+ w?: SprinklePropW;
1413
+ whiteSpace?: SprinklePropWhiteSpace;
1414
+ z?: SprinklePropZ;
1415
+ }
1416
+ export interface ProteusTextarea {
1417
+ $type: "Textarea";
1418
+ alignItems?: SprinklePropAlignItems;
1419
+ alignSelf?: SprinklePropAlignSelf;
1420
+ animation?: SprinklePropAnimation;
1421
+ backgroundImage?: SprinklePropBackgroundImage;
1422
+ bg?: SprinklePropBg;
1423
+ border?: SprinklePropBorder;
1424
+ borderB?: SprinklePropBorderB;
1425
+ borderColor?: SprinklePropBorderColor;
1426
+ borderL?: SprinklePropBorderL;
1427
+ borderR?: SprinklePropBorderR;
1428
+ borderT?: SprinklePropBorderT;
1429
+ color?: SprinklePropColor;
1430
+ cursor?: SprinklePropCursor;
1431
+ display?: SprinklePropDisplay;
1432
+ flex?: SprinklePropFlex;
1433
+ flexDirection?: SprinklePropFlexDirection;
1434
+ flexWrap?: SprinklePropFlexWrap;
1435
+ fontFamily?: SprinklePropFontFamily;
1436
+ fontSize?: SprinklePropFontSize;
1437
+ fontWeight?: SprinklePropFontWeight;
1438
+ gap?: SprinklePropGap;
1439
+ gridColumn?: SprinklePropGridColumn;
1440
+ gridTemplateColumns?: SprinklePropGridTemplateColumns;
1441
+ h?: SprinklePropH;
1442
+ justifyContent?: SprinklePropJustifyContent;
1443
+ justifyItems?: SprinklePropJustifyItems;
1444
+ m?: SprinklePropM;
1445
+ maxH?: SprinklePropMaxH;
1446
+ /**
1447
+ * Limits the height of the textarea when `resize=auto` is used.
1448
+ */
1449
+ maxRows?: 1 | 2 | 3 | 4 | 5;
1450
+ maxW?: SprinklePropMaxW;
1451
+ mb?: SprinklePropMb;
1452
+ ml?: SprinklePropMl;
1453
+ mr?: SprinklePropMr;
1454
+ mt?: SprinklePropMt;
1455
+ mx?: SprinklePropMx;
1456
+ my?: SprinklePropMy;
1457
+ /**
1458
+ * The name of the form control element.
1459
+ */
1460
+ name?: string;
1461
+ objectFit?: SprinklePropObjectFit;
1462
+ overflow?: SprinklePropOverflow;
1463
+ overflowX?: SprinklePropOverflowX;
1464
+ overflowY?: SprinklePropOverflowY;
1465
+ p?: SprinklePropP;
1466
+ pb?: SprinklePropPb;
1467
+ pl?: SprinklePropPl;
1468
+ /**
1469
+ * The placeholder text to use when control has no value.
1470
+ */
1471
+ placeholder?: string;
1472
+ placeItems?: SprinklePropPlaceItems;
1473
+ pointerEvents?: SprinklePropPointerEvents;
1474
+ pr?: SprinklePropPr;
1475
+ pt?: SprinklePropPt;
1476
+ px?: SprinklePropPx;
1477
+ py?: SprinklePropPy;
1478
+ /**
1479
+ * Control whether resizing mode is manual, automatic, or disabled.
1480
+ */
1481
+ resize?: "auto" | "none" | "vertical";
1482
+ rounded?: SprinklePropRounded;
1483
+ /**
1484
+ * The number of rows to display.
1485
+ */
1486
+ rows?: number;
1487
+ shadow?: SprinklePropShadow;
1488
+ textAlign?: SprinklePropTextAlign;
1489
+ textTransform?: SprinklePropTextTransform;
1490
+ transition?: SprinklePropTransition;
1491
+ w?: SprinklePropW;
1492
+ whiteSpace?: SprinklePropWhiteSpace;
1493
+ z?: SprinklePropZ;
1494
+ }
1495
+ export interface ProteusValue {
1496
+ $type: "Value";
1497
+ /**
1498
+ * Path to a value in the data. Absolute paths start with '/' and resolve from the root (e.g., '/title', '/options/0/label'). Inside a Map template, paths without a leading '/' are relative to the current item (e.g., 'title' resolves to each item's 'title' field).
1499
+ */
1500
+ path: string;
1501
+ }
1502
+ /**
1503
+ * Set the element's `align-items` CSS property
1504
+ */
1505
+ export type SprinklePropAlignItems =
1506
+ | "center"
1507
+ | "end"
1508
+ | "normal"
1509
+ | "start"
1510
+ | "stretch";
1511
+ /**
1512
+ * Set the element's `align-self` CSS property
1513
+ */
1514
+ export type SprinklePropAlignSelf =
1515
+ | "center"
1516
+ | "end"
1517
+ | "normal"
1518
+ | "start"
1519
+ | "stretch";
1520
+ /**
1521
+ * Animate element with CSS animations
1522
+ */
1523
+ export type SprinklePropAnimation = "ping" | "pulse" | "spin";
1524
+ /**
1525
+ * Set the element's `background-image` CSS property
1526
+ */
1527
+ export type SprinklePropBackgroundImage = "gradient.opal";
1528
+ /**
1529
+ * Set the element's background color. Only accepts predefined color tokens starting with `bg.` (e.g., `bg.default`, `bg.accent`, `bg.error`), or the special values `current` and `transparent`.
1530
+ */
1531
+ export type SprinklePropBg =
1532
+ | "bg.accent"
1533
+ | "bg.accent.hovered"
1534
+ | "bg.accent.light"
1535
+ | "bg.accent.pressed"
1536
+ | "bg.accent.subtle"
1537
+ | "bg.avatar.neutral"
1538
+ | "bg.avatar.purple"
1539
+ | "bg.default"
1540
+ | "bg.default.hovered"
1541
+ | "bg.default.inverse"
1542
+ | "bg.default.inverse.hovered"
1543
+ | "bg.default.inverse.pressed"
1544
+ | "bg.default.pressed"
1545
+ | "bg.error"
1546
+ | "bg.error.hovered"
1547
+ | "bg.error.light"
1548
+ | "bg.error.pressed"
1549
+ | "bg.error.subtle"
1550
+ | "bg.error.subtlest"
1551
+ | "bg.information"
1552
+ | "bg.information.light"
1553
+ | "bg.information.subtle"
1554
+ | "bg.overlay"
1555
+ | "bg.page"
1556
+ | "bg.secondary"
1557
+ | "bg.secondary.hovered"
1558
+ | "bg.spinner.default"
1559
+ | "bg.spinner.inverse"
1560
+ | "bg.success"
1561
+ | "bg.success.hovered"
1562
+ | "bg.success.light"
1563
+ | "bg.success.subtle"
1564
+ | "bg.tertiary"
1565
+ | "bg.tertiary.hovered"
1566
+ | "bg.warning"
1567
+ | "bg.warning.hovered"
1568
+ | "bg.warning.light"
1569
+ | "bg.warning.subtle"
1570
+ | "current"
1571
+ | "transparent";
1572
+ /**
1573
+ * Set the element's `border-width` CSS property
1574
+ */
1575
+ export type SprinklePropBorder = "0" | "1" | "2";
1576
+ /**
1577
+ * Set the element's `border-bottom-width` CSS property
1578
+ */
1579
+ export type SprinklePropBorderB = "0" | "1" | "2";
1580
+ /**
1581
+ * Set the element's border color. Only accepts predefined color tokens starting with `border.` (e.g., `border.default`, `border.accent`, `border.error`), or the special values `current` and `transparent`.
1582
+ */
1583
+ export type SprinklePropBorderColor =
1584
+ | "border.accent"
1585
+ | "border.control"
1586
+ | "border.control.hovered"
1587
+ | "border.default"
1588
+ | "border.disabled"
1589
+ | "border.error"
1590
+ | "border.focus"
1591
+ | "border.focus.error"
1592
+ | "border.secondary"
1593
+ | "border.success"
1594
+ | "border.tertiary"
1595
+ | "border.warning"
1596
+ | "current"
1597
+ | "transparent";
1598
+ /**
1599
+ * Set the element's `border-left-width` CSS property
1600
+ */
1601
+ export type SprinklePropBorderL = "0" | "1" | "2";
1602
+ /**
1603
+ * Set the element's `border-right-width` CSS property
1604
+ */
1605
+ export type SprinklePropBorderR = "0" | "1" | "2";
1606
+ /**
1607
+ * Set the element's `border-top-width` CSS property
1608
+ */
1609
+ export type SprinklePropBorderT = "0" | "1" | "2";
1610
+ /**
1611
+ * Set the element's text color. Only accepts predefined color tokens starting with `fg.` (e.g., `fg.default`, `fg.accent`, `fg.error`), or the special values `current` and `transparent`.
1612
+ */
1613
+ export type SprinklePropColor =
1614
+ | "current"
1615
+ | "fg.accent"
1616
+ | "fg.accent.hovered"
1617
+ | "fg.accent.strong"
1618
+ | "fg.avatar.neutral"
1619
+ | "fg.avatar.purple"
1620
+ | "fg.default"
1621
+ | "fg.default.inverse"
1622
+ | "fg.disabled"
1623
+ | "fg.error"
1624
+ | "fg.error.hovered"
1625
+ | "fg.error.light"
1626
+ | "fg.error.strong"
1627
+ | "fg.information"
1628
+ | "fg.information.light"
1629
+ | "fg.information.strong"
1630
+ | "fg.link.default"
1631
+ | "fg.link.default.hovered"
1632
+ | "fg.link.inverse"
1633
+ | "fg.link.subtle"
1634
+ | "fg.link.visited"
1635
+ | "fg.secondary"
1636
+ | "fg.spinner.default"
1637
+ | "fg.spinner.inverse"
1638
+ | "fg.success"
1639
+ | "fg.success.hovered"
1640
+ | "fg.success.light"
1641
+ | "fg.success.strong"
1642
+ | "fg.tertiary"
1643
+ | "fg.warning"
1644
+ | "fg.warning.hovered"
1645
+ | "fg.warning.inverse"
1646
+ | "fg.warning.light"
1647
+ | "fg.warning.strong"
1648
+ | "fg.white"
1649
+ | "transparent";
1650
+ /**
1651
+ * Set the element's `cursor` CSS property
1652
+ */
1653
+ export type SprinklePropCursor = "default" | "pointer" | "text";
1654
+ /**
1655
+ * Set the element's `display` CSS property
1656
+ */
1657
+ export type SprinklePropDisplay =
1658
+ | "block"
1659
+ | "flex"
1660
+ | "grid"
1661
+ | "inline"
1662
+ | "inline-block"
1663
+ | "inline-flex"
1664
+ | "none"
1665
+ | "table"
1666
+ | "table-cell"
1667
+ | "table-row";
1668
+ /**
1669
+ * Set the element's `flex` CSS property
1670
+ */
1671
+ export type SprinklePropFlex = "1" | "auto" | "initial" | "none";
1672
+ /**
1673
+ * Set the element's `flex-direction` CSS property
1674
+ */
1675
+ export type SprinklePropFlexDirection =
1676
+ | "column"
1677
+ | "column-reverse"
1678
+ | "row"
1679
+ | "row-reverse";
1680
+ /**
1681
+ * Set the element's `flex-wrap` CSS property
1682
+ */
1683
+ export type SprinklePropFlexWrap = "nowrap" | "wrap";
1684
+ /**
1685
+ * Set the element's font family. Only accepts predefined fontFamily tokens.
1686
+ */
1687
+ export type SprinklePropFontFamily = "mono" | "sans";
1688
+ /**
1689
+ * Set the element's font size and line height (both properties are set together). Only accepts predefined fontSize tokens.
1690
+ */
1691
+ export type SprinklePropFontSize =
1692
+ | "2xl"
1693
+ | "3xl"
1694
+ | "4xl"
1695
+ | "inherit"
1696
+ | "lg"
1697
+ | "md"
1698
+ | "sm"
1699
+ | "xl"
1700
+ | "xs";
1701
+ /**
1702
+ * Set the element's `font-weight` CSS property
1703
+ */
1704
+ export type SprinklePropFontWeight = "400" | "500" | "600" | "700" | "inherit";
1705
+ /**
1706
+ * Set the element's `gap` CSS property
1707
+ */
1708
+ export type SprinklePropGap =
1709
+ | "0"
1710
+ | "2"
1711
+ | "4"
1712
+ | "6"
1713
+ | "8"
1714
+ | "10"
1715
+ | "12"
1716
+ | "16"
1717
+ | "20"
1718
+ | "24"
1719
+ | "32"
1720
+ | "40"
1721
+ | "48"
1722
+ | "64"
1723
+ | "80";
1724
+ /**
1725
+ * Set the element's size across grid columns
1726
+ */
1727
+ export type SprinklePropGridColumn = "1" | "2" | "3" | "4";
1728
+ /**
1729
+ * Control number of columns in a grid layout
1730
+ */
1731
+ export type SprinklePropGridTemplateColumns = "1" | "2" | "3" | "4";
1732
+ /**
1733
+ * Set the element's height. Only accepts predefined size tokens.
1734
+ */
1735
+ export type SprinklePropH =
1736
+ | "0"
1737
+ | "1/2"
1738
+ | "1/3"
1739
+ | "1/4"
1740
+ | "2/3"
1741
+ | "2xs"
1742
+ | "3/4"
1743
+ | "3xl"
1744
+ | "10"
1745
+ | "12"
1746
+ | "16"
1747
+ | "20"
1748
+ | "24"
1749
+ | "32"
1750
+ | "40"
1751
+ | "48"
1752
+ | "56"
1753
+ | "64"
1754
+ | "80"
1755
+ | "224"
1756
+ | "384"
1757
+ | "auto"
1758
+ | "fit"
1759
+ | "full"
1760
+ | "lg"
1761
+ | "max"
1762
+ | "md"
1763
+ | "min"
1764
+ | "sm"
1765
+ | "xl"
1766
+ | "xs";
1767
+ /**
1768
+ * Set the element's `justify-content` CSS property
1769
+ */
1770
+ export type SprinklePropJustifyContent =
1771
+ | "center"
1772
+ | "end"
1773
+ | "flex-end"
1774
+ | "flex-start"
1775
+ | "normal"
1776
+ | "space-around"
1777
+ | "space-between"
1778
+ | "space-evenly"
1779
+ | "start"
1780
+ | "stretch";
1781
+ /**
1782
+ * Set the element's `justify-items` CSS property
1783
+ */
1784
+ export type SprinklePropJustifyItems =
1785
+ | "center"
1786
+ | "end"
1787
+ | "normal"
1788
+ | "start"
1789
+ | "stretch";
1790
+ /**
1791
+ * Set the element's margin on all sides. Only accepts predefined spacing tokens.
1792
+ */
1793
+ export type SprinklePropM =
1794
+ | "0"
1795
+ | "2"
1796
+ | "4"
1797
+ | "6"
1798
+ | "8"
1799
+ | "10"
1800
+ | "12"
1801
+ | "16"
1802
+ | "20"
1803
+ | "24"
1804
+ | "32"
1805
+ | "40"
1806
+ | "48"
1807
+ | "64"
1808
+ | "80"
1809
+ | "auto";
1810
+ /**
1811
+ * Set the element's maximum height. Only accepts predefined maxSize tokens.
1812
+ */
1813
+ export type SprinklePropMaxH = "full" | "lg" | "md" | "sm" | "xs";
1814
+ /**
1815
+ * Set the element's maximum width. Only accepts predefined maxSize tokens.
1816
+ */
1817
+ export type SprinklePropMaxW = "full" | "lg" | "md" | "sm" | "xs";
1818
+ /**
1819
+ * Set the element's bottom margin. Only accepts predefined spacing tokens.
1820
+ */
1821
+ export type SprinklePropMb =
1822
+ | "0"
1823
+ | "2"
1824
+ | "4"
1825
+ | "6"
1826
+ | "8"
1827
+ | "10"
1828
+ | "12"
1829
+ | "16"
1830
+ | "20"
1831
+ | "24"
1832
+ | "32"
1833
+ | "40"
1834
+ | "48"
1835
+ | "64"
1836
+ | "80"
1837
+ | "auto";
1838
+ /**
1839
+ * Set the element's left margin. Only accepts predefined spacing tokens.
1840
+ */
1841
+ export type SprinklePropMl =
1842
+ | "0"
1843
+ | "2"
1844
+ | "4"
1845
+ | "6"
1846
+ | "8"
1847
+ | "10"
1848
+ | "12"
1849
+ | "16"
1850
+ | "20"
1851
+ | "24"
1852
+ | "32"
1853
+ | "40"
1854
+ | "48"
1855
+ | "64"
1856
+ | "80"
1857
+ | "auto";
1858
+ /**
1859
+ * Set the element's right margin. Only accepts predefined spacing tokens.
1860
+ */
1861
+ export type SprinklePropMr =
1862
+ | "0"
1863
+ | "2"
1864
+ | "4"
1865
+ | "6"
1866
+ | "8"
1867
+ | "10"
1868
+ | "12"
1869
+ | "16"
1870
+ | "20"
1871
+ | "24"
1872
+ | "32"
1873
+ | "40"
1874
+ | "48"
1875
+ | "64"
1876
+ | "80"
1877
+ | "auto";
1878
+ /**
1879
+ * Set the element's top margin. Only accepts predefined spacing tokens.
1880
+ */
1881
+ export type SprinklePropMt =
1882
+ | "0"
1883
+ | "2"
1884
+ | "4"
1885
+ | "6"
1886
+ | "8"
1887
+ | "10"
1888
+ | "12"
1889
+ | "16"
1890
+ | "20"
1891
+ | "24"
1892
+ | "32"
1893
+ | "40"
1894
+ | "48"
1895
+ | "64"
1896
+ | "80"
1897
+ | "auto";
1898
+ /**
1899
+ * Set the element's left and right margin. Only accepts predefined spacing tokens.
1900
+ */
1901
+ export type SprinklePropMx =
1902
+ | "0"
1903
+ | "2"
1904
+ | "4"
1905
+ | "6"
1906
+ | "8"
1907
+ | "10"
1908
+ | "12"
1909
+ | "16"
1910
+ | "20"
1911
+ | "24"
1912
+ | "32"
1913
+ | "40"
1914
+ | "48"
1915
+ | "64"
1916
+ | "80"
1917
+ | "auto";
1918
+ /**
1919
+ * Set the element's top and bottom margin. Only accepts predefined spacing tokens.
1920
+ */
1921
+ export type SprinklePropMy =
1922
+ | "0"
1923
+ | "2"
1924
+ | "4"
1925
+ | "6"
1926
+ | "8"
1927
+ | "10"
1928
+ | "12"
1929
+ | "16"
1930
+ | "20"
1931
+ | "24"
1932
+ | "32"
1933
+ | "40"
1934
+ | "48"
1935
+ | "64"
1936
+ | "80"
1937
+ | "auto";
1938
+
1939
+ /**
1940
+ * Set the element's `object-fit` CSS property
1941
+ */
1942
+ export type SprinklePropObjectFit = "contain" | "cover" | "fill" | "none";
1943
+ /**
1944
+ * Set the element's `overflow` CSS property
1945
+ */
1946
+ export type SprinklePropOverflow = "auto" | "hidden" | "visible";
1947
+ /**
1948
+ * Set the element's `overflow-x` CSS property
1949
+ */
1950
+ export type SprinklePropOverflowX = "auto" | "hidden" | "visible";
1951
+ /**
1952
+ * Set the element's `overflow-y` CSS property
1953
+ */
1954
+ export type SprinklePropOverflowY = "auto" | "hidden" | "visible";
1955
+ /**
1956
+ * Set the element's padding on all sides. Only accepts predefined spacing tokens.
1957
+ */
1958
+ export type SprinklePropP =
1959
+ | "0"
1960
+ | "2"
1961
+ | "4"
1962
+ | "6"
1963
+ | "8"
1964
+ | "10"
1965
+ | "12"
1966
+ | "16"
1967
+ | "20"
1968
+ | "24"
1969
+ | "32"
1970
+ | "40"
1971
+ | "48"
1972
+ | "64"
1973
+ | "80";
1974
+ /**
1975
+ * Set the element's bottom padding. Only accepts predefined spacing tokens.
1976
+ */
1977
+ export type SprinklePropPb =
1978
+ | "0"
1979
+ | "2"
1980
+ | "4"
1981
+ | "6"
1982
+ | "8"
1983
+ | "10"
1984
+ | "12"
1985
+ | "16"
1986
+ | "20"
1987
+ | "24"
1988
+ | "32"
1989
+ | "40"
1990
+ | "48"
1991
+ | "64"
1992
+ | "80";
1993
+ /**
1994
+ * Set the element's left padding. Only accepts predefined spacing tokens.
1995
+ */
1996
+ export type SprinklePropPl =
1997
+ | "0"
1998
+ | "2"
1999
+ | "4"
2000
+ | "6"
2001
+ | "8"
2002
+ | "10"
2003
+ | "12"
2004
+ | "16"
2005
+ | "20"
2006
+ | "24"
2007
+ | "32"
2008
+ | "40"
2009
+ | "48"
2010
+ | "64"
2011
+ | "80";
2012
+ /**
2013
+ * Set the element's `place-items` CSS property
2014
+ */
2015
+ export type SprinklePropPlaceItems = "center";
2016
+ /**
2017
+ * Set the element's `pointer-events` CSS property
2018
+ */
2019
+ export type SprinklePropPointerEvents = "auto" | "none";
2020
+ /**
2021
+ * Set the element's right padding. Only accepts predefined spacing tokens.
2022
+ */
2023
+ export type SprinklePropPr =
2024
+ | "0"
2025
+ | "2"
2026
+ | "4"
2027
+ | "6"
2028
+ | "8"
2029
+ | "10"
2030
+ | "12"
2031
+ | "16"
2032
+ | "20"
2033
+ | "24"
2034
+ | "32"
2035
+ | "40"
2036
+ | "48"
2037
+ | "64"
2038
+ | "80";
2039
+ /**
2040
+ * Set the element's top padding. Only accepts predefined spacing tokens.
2041
+ */
2042
+ export type SprinklePropPt =
2043
+ | "0"
2044
+ | "2"
2045
+ | "4"
2046
+ | "6"
2047
+ | "8"
2048
+ | "10"
2049
+ | "12"
2050
+ | "16"
2051
+ | "20"
2052
+ | "24"
2053
+ | "32"
2054
+ | "40"
2055
+ | "48"
2056
+ | "64"
2057
+ | "80";
2058
+ /**
2059
+ * Set the element's left and right padding. Only accepts predefined spacing tokens.
2060
+ */
2061
+ export type SprinklePropPx =
2062
+ | "0"
2063
+ | "2"
2064
+ | "4"
2065
+ | "6"
2066
+ | "8"
2067
+ | "10"
2068
+ | "12"
2069
+ | "16"
2070
+ | "20"
2071
+ | "24"
2072
+ | "32"
2073
+ | "40"
2074
+ | "48"
2075
+ | "64"
2076
+ | "80";
2077
+ /**
2078
+ * Set the element's top and bottom padding. Only accepts predefined spacing tokens.
2079
+ */
2080
+ export type SprinklePropPy =
2081
+ | "0"
2082
+ | "2"
2083
+ | "4"
2084
+ | "6"
2085
+ | "8"
2086
+ | "10"
2087
+ | "12"
2088
+ | "16"
2089
+ | "20"
2090
+ | "24"
2091
+ | "32"
2092
+ | "40"
2093
+ | "48"
2094
+ | "64"
2095
+ | "80";
2096
+ /**
2097
+ * Set the element's border radius. Only accepts predefined borderRadius tokens.
2098
+ */
2099
+ export type SprinklePropRounded =
2100
+ | "full"
2101
+ | "inherit"
2102
+ | "lg"
2103
+ | "md"
2104
+ | "none"
2105
+ | "sm"
2106
+ | "xl"
2107
+ | "xs";
2108
+ /**
2109
+ * Set the element's box shadow. Only accepts predefined boxShadow tokens.
2110
+ */
2111
+ export type SprinklePropShadow = "lg" | "md" | "none" | "sm" | "xl";
2112
+ /**
2113
+ * Set the element's width and height. Only accepts predefined size tokens.
2114
+ *
2115
+ * When width and height are the same, use `size` instead of setting both
2116
+ * `w` and `h` separately (e.g., prefer `size="24"` over `w="24" h="24"`).
2117
+ */
2118
+ export type SprinklePropSize =
2119
+ | "0"
2120
+ | "1/2"
2121
+ | "1/3"
2122
+ | "1/4"
2123
+ | "2/3"
2124
+ | "2xs"
2125
+ | "3/4"
2126
+ | "3xl"
2127
+ | "10"
2128
+ | "12"
2129
+ | "16"
2130
+ | "20"
2131
+ | "24"
2132
+ | "32"
2133
+ | "40"
2134
+ | "48"
2135
+ | "56"
2136
+ | "64"
2137
+ | "80"
2138
+ | "224"
2139
+ | "384"
2140
+ | "auto"
2141
+ | "fit"
2142
+ | "full"
2143
+ | "lg"
2144
+ | "max"
2145
+ | "md"
2146
+ | "min"
2147
+ | "sm"
2148
+ | "xl"
2149
+ | "xs";
2150
+ /**
2151
+ * Set the element's `text-align` CSS property
2152
+ */
2153
+ export type SprinklePropTextAlign = "center" | "end" | "justify" | "start";
2154
+ /**
2155
+ * Set the element's `text-transform` CSS property
2156
+ */
2157
+ export type SprinklePropTextTransform = "capitalize" | "none" | "uppercase";
2158
+ /**
2159
+ * Control which CSS properties should transition
2160
+ */
2161
+ export type SprinklePropTransition =
2162
+ | "all"
2163
+ | "colors"
2164
+ | "none"
2165
+ | "opacity"
2166
+ | "transform";
2167
+ /**
2168
+ * Set the element's width. Only accepts predefined size tokens.
2169
+ */
2170
+ export type SprinklePropW =
2171
+ | "0"
2172
+ | "1/2"
2173
+ | "1/3"
2174
+ | "1/4"
2175
+ | "2/3"
2176
+ | "2xs"
2177
+ | "3/4"
2178
+ | "3xl"
2179
+ | "10"
2180
+ | "12"
2181
+ | "16"
2182
+ | "20"
2183
+ | "24"
2184
+ | "32"
2185
+ | "40"
2186
+ | "48"
2187
+ | "56"
2188
+ | "64"
2189
+ | "80"
2190
+ | "224"
2191
+ | "384"
2192
+ | "auto"
2193
+ | "fit"
2194
+ | "full"
2195
+ | "lg"
2196
+ | "max"
2197
+ | "md"
2198
+ | "min"
2199
+ | "sm"
2200
+ | "xl"
2201
+ | "xs";
2202
+ /**
2203
+ * Set the element's `white-space` CSS property
2204
+ */
2205
+ export type SprinklePropWhiteSpace = "nowrap";
2206
+ /**
2207
+ * Set the element's stacking order. Only accepts predefined zIndex tokens (e.g., popover, toast, tooltip) or numeric values (0, 10, 20, 30, auto).
2208
+ */
2209
+ export type SprinklePropZ =
2210
+ | "0"
2211
+ | "10"
2212
+ | "20"
2213
+ | "30"
2214
+ | "auto"
2215
+ | "popover"
2216
+ | "toast"
2217
+ | "tooltip";
2218
+
2219
+ /**
2220
+ * Builder namespace for Adaptive UI Document components.
2221
+ *
2222
+ * Usage:
2223
+ * UI.Document({ children: [...] })
2224
+ * UI.Heading({ children: "Title", level: "2" })
2225
+ * UI.Input({ name: "field_name", placeholder: "Enter..." })
2226
+ */
2227
+ export const UI = {
2228
+ Action: (props: Omit<ProteusAction, "$type">): ProteusAction => ({
2229
+ $type: "Action" as const,
2230
+ ...props,
2231
+ }),
2232
+ Badge: (props: Omit<ProteusBadge, "$type">): ProteusBadge => ({
2233
+ $type: "Badge" as const,
2234
+ ...props,
2235
+ }),
2236
+ CancelAction: (
2237
+ props: Omit<ProteusCancelAction, "$type">,
2238
+ ): ProteusCancelAction => ({ $type: "CancelAction" as const, ...props }),
2239
+ Chart: (props: Omit<ProteusChart, "$type">): ProteusChart => ({
2240
+ $type: "Chart" as const,
2241
+ ...props,
2242
+ }),
2243
+ DataTable: (props: Omit<ProteusDataTable, "$type">): ProteusDataTable => ({
2244
+ $type: "DataTable" as const,
2245
+ ...props,
2246
+ }),
2247
+ Document: (props: Omit<ProteusDocument, "$type">): ProteusDocument => ({
2248
+ $type: "Document" as const,
2249
+ ...props,
2250
+ }),
2251
+ Field: (props: Omit<ProteusField, "$type">): ProteusField => ({
2252
+ $type: "Field" as const,
2253
+ ...props,
2254
+ }),
2255
+ Group: (props: Omit<ProteusGroup, "$type">): ProteusGroup => ({
2256
+ $type: "Group" as const,
2257
+ ...props,
2258
+ }),
2259
+ Heading: (props: Omit<ProteusHeading, "$type">): ProteusHeading => ({
2260
+ $type: "Heading" as const,
2261
+ ...props,
2262
+ }),
2263
+ Image: (props: Omit<ProteusImage, "$type">): ProteusImage => ({
2264
+ $type: "Image" as const,
2265
+ ...props,
2266
+ }),
2267
+ Input: (props: Omit<ProteusInput, "$type">): ProteusInput => ({
2268
+ $type: "Input" as const,
2269
+ ...props,
2270
+ }),
2271
+ Link: (props: Omit<ProteusLink, "$type">): ProteusLink => ({
2272
+ $type: "Link" as const,
2273
+ ...props,
2274
+ }),
2275
+ Map: (props: Omit<ProteusMap, "$type">): ProteusMap => ({
2276
+ $type: "Map" as const,
2277
+ ...props,
2278
+ }),
2279
+ MIME_TYPE: "application/vnd.opal.proteus+json" as const,
2280
+ Range: (props: Omit<ProteusRange, "$type">): ProteusRange => ({
2281
+ $type: "Range" as const,
2282
+ ...props,
2283
+ }),
2284
+ Select: (props: Omit<ProteusSelect, "$type">): ProteusSelect => ({
2285
+ $type: "Select" as const,
2286
+ ...props,
2287
+ }),
2288
+ SelectContent: (
2289
+ props: Omit<ProteusSelectContent, "$type">,
2290
+ ): ProteusSelectContent => ({ $type: "SelectContent" as const, ...props }),
2291
+ SelectTrigger: (
2292
+ props: Omit<ProteusSelectTrigger, "$type">,
2293
+ ): ProteusSelectTrigger => ({ $type: "SelectTrigger" as const, ...props }),
2294
+ Separator: (props: Omit<ProteusSeparator, "$type">): ProteusSeparator => ({
2295
+ $type: "Separator" as const,
2296
+ ...props,
2297
+ }),
2298
+ Show: (props: Omit<ProteusShow, "$type">): ProteusShow => ({
2299
+ $type: "Show" as const,
2300
+ ...props,
2301
+ }),
2302
+ Text: (props: Omit<ProteusText, "$type">): ProteusText => ({
2303
+ $type: "Text" as const,
2304
+ ...props,
2305
+ }),
2306
+ Textarea: (props: Omit<ProteusTextarea, "$type">): ProteusTextarea => ({
2307
+ $type: "Textarea" as const,
2308
+ ...props,
2309
+ }),
2310
+ Value: (props: Omit<ProteusValue, "$type">): ProteusValue => ({
2311
+ $type: "Value" as const,
2312
+ ...props,
2313
+ }),
2314
+ };