@optimizely-opal/opal-tools-sdk 0.1.9-dev → 0.1.10-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/dist/proteus.d.ts +176 -87
- package/dist/proteus.js +4 -0
- package/package.json +1 -1
- package/src/proteus.ts +277 -85
package/src/proteus.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type OpalProteusDocumentSpecification =
|
|
|
31
31
|
| ProteusShow
|
|
32
32
|
| ProteusText
|
|
33
33
|
| ProteusTextarea
|
|
34
|
+
| ProteusTime
|
|
34
35
|
| ProteusValue;
|
|
35
36
|
export interface ProteusAction {
|
|
36
37
|
$type: "Action";
|
|
@@ -48,7 +49,8 @@ export interface ProteusAction {
|
|
|
48
49
|
| "inverse"
|
|
49
50
|
| "primary"
|
|
50
51
|
| "primary-opal"
|
|
51
|
-
| "subtle"
|
|
52
|
+
| "subtle"
|
|
53
|
+
| ProteusValue;
|
|
52
54
|
backgroundImage?: SprinklePropBackgroundImage;
|
|
53
55
|
bg?: SprinklePropBg;
|
|
54
56
|
border?: SprinklePropBorder;
|
|
@@ -98,6 +100,16 @@ export interface ProteusAction {
|
|
|
98
100
|
* Name of registered tool to call
|
|
99
101
|
*/
|
|
100
102
|
tool: string;
|
|
103
|
+
}
|
|
104
|
+
| {
|
|
105
|
+
/**
|
|
106
|
+
* The action type
|
|
107
|
+
*/
|
|
108
|
+
action: "download";
|
|
109
|
+
/**
|
|
110
|
+
* URL to download
|
|
111
|
+
*/
|
|
112
|
+
url: string;
|
|
101
113
|
};
|
|
102
114
|
overflow?: SprinklePropOverflow;
|
|
103
115
|
overflowX?: SprinklePropOverflowX;
|
|
@@ -238,7 +250,8 @@ export interface ProteusBadge {
|
|
|
238
250
|
| "neutral"
|
|
239
251
|
| "primary"
|
|
240
252
|
| "success"
|
|
241
|
-
| "warning"
|
|
253
|
+
| "warning"
|
|
254
|
+
| ProteusValue;
|
|
242
255
|
justifyContent?: SprinklePropJustifyContent;
|
|
243
256
|
justifyItems?: SprinklePropJustifyItems;
|
|
244
257
|
m?: SprinklePropM;
|
|
@@ -453,7 +466,7 @@ export interface ProteusDocument {
|
|
|
453
466
|
/**
|
|
454
467
|
* The official name of the application
|
|
455
468
|
*/
|
|
456
|
-
appName
|
|
469
|
+
appName?: string;
|
|
457
470
|
/**
|
|
458
471
|
* If true, hides chat prompt and forces user interaction with document. User can press ESC or close to abandon.
|
|
459
472
|
*/
|
|
@@ -513,9 +526,10 @@ export type ProteusElement =
|
|
|
513
526
|
| ProteusShow
|
|
514
527
|
| ProteusText
|
|
515
528
|
| ProteusTextarea
|
|
529
|
+
| ProteusTime
|
|
516
530
|
| ProteusValue;
|
|
517
531
|
/**
|
|
518
|
-
* Handler for user interactions -
|
|
532
|
+
* Handler for user interactions - a server-side tool call, client-side message, or client-side component action
|
|
519
533
|
*/
|
|
520
534
|
export type ProteusEventHandler =
|
|
521
535
|
| {
|
|
@@ -529,6 +543,16 @@ export type ProteusEventHandler =
|
|
|
529
543
|
* Name of registered tool to call
|
|
530
544
|
*/
|
|
531
545
|
tool: string;
|
|
546
|
+
}
|
|
547
|
+
| {
|
|
548
|
+
/**
|
|
549
|
+
* The action type
|
|
550
|
+
*/
|
|
551
|
+
action: "download";
|
|
552
|
+
/**
|
|
553
|
+
* URL to download
|
|
554
|
+
*/
|
|
555
|
+
url: string;
|
|
532
556
|
};
|
|
533
557
|
export interface ProteusField {
|
|
534
558
|
$type: "Field";
|
|
@@ -614,7 +638,7 @@ export interface ProteusField {
|
|
|
614
638
|
/**
|
|
615
639
|
* Display an asterisk for required inputs.
|
|
616
640
|
*/
|
|
617
|
-
required?: boolean;
|
|
641
|
+
required?: boolean | ProteusValue;
|
|
618
642
|
rounded?: SprinklePropRounded;
|
|
619
643
|
shadow?: SprinklePropShadow;
|
|
620
644
|
size?: SprinklePropSize;
|
|
@@ -631,7 +655,7 @@ export interface ProteusGroup {
|
|
|
631
655
|
* Set the element's `align-items` CSS property. Defaults to `center` when
|
|
632
656
|
* `flexDirection='row'`, and `stretch` when `flexDirection='column'`.
|
|
633
657
|
*/
|
|
634
|
-
alignItems?: "center" | "end" | "normal" | "start" | "stretch";
|
|
658
|
+
alignItems?: "center" | "end" | "normal" | "start" | "stretch" | ProteusValue;
|
|
635
659
|
alignSelf?: SprinklePropAlignSelf;
|
|
636
660
|
animation?: SprinklePropAnimation;
|
|
637
661
|
backgroundImage?: SprinklePropBackgroundImage;
|
|
@@ -652,7 +676,12 @@ export interface ProteusGroup {
|
|
|
652
676
|
*
|
|
653
677
|
* Default: 'row' (CSS standard)
|
|
654
678
|
*/
|
|
655
|
-
flexDirection?:
|
|
679
|
+
flexDirection?:
|
|
680
|
+
| "column"
|
|
681
|
+
| "column-reverse"
|
|
682
|
+
| "row"
|
|
683
|
+
| "row-reverse"
|
|
684
|
+
| ProteusValue;
|
|
656
685
|
flexWrap?: SprinklePropFlexWrap;
|
|
657
686
|
fontFamily?: SprinklePropFontFamily;
|
|
658
687
|
fontSize?: SprinklePropFontSize;
|
|
@@ -733,7 +762,7 @@ export interface ProteusHeading {
|
|
|
733
762
|
*
|
|
734
763
|
* Use `asChild` to decouple the semantic level from visual appearance.
|
|
735
764
|
*/
|
|
736
|
-
level?: "1" | "2" | "3" | "4";
|
|
765
|
+
level?: "1" | "2" | "3" | "4" | ProteusValue;
|
|
737
766
|
m?: SprinklePropM;
|
|
738
767
|
maxH?: SprinklePropMaxH;
|
|
739
768
|
maxW?: SprinklePropMaxW;
|
|
@@ -862,7 +891,7 @@ export interface ProteusInput {
|
|
|
862
891
|
/**
|
|
863
892
|
* Control the appearance of the input.
|
|
864
893
|
*/
|
|
865
|
-
appearance?: "default" | "number";
|
|
894
|
+
appearance?: "default" | "number" | ProteusValue;
|
|
866
895
|
backgroundImage?: SprinklePropBackgroundImage;
|
|
867
896
|
bg?: SprinklePropBg;
|
|
868
897
|
border?: SprinklePropBorder;
|
|
@@ -898,7 +927,7 @@ export interface ProteusInput {
|
|
|
898
927
|
/**
|
|
899
928
|
* The name of the form control element.
|
|
900
929
|
*/
|
|
901
|
-
name?: string;
|
|
930
|
+
name?: ProteusValue | string;
|
|
902
931
|
objectFit?: SprinklePropObjectFit;
|
|
903
932
|
overflow?: SprinklePropOverflow;
|
|
904
933
|
overflowX?: SprinklePropOverflowX;
|
|
@@ -909,7 +938,7 @@ export interface ProteusInput {
|
|
|
909
938
|
/**
|
|
910
939
|
* The placeholder text to use when control has no value.
|
|
911
940
|
*/
|
|
912
|
-
placeholder?: string;
|
|
941
|
+
placeholder?: ProteusValue | string;
|
|
913
942
|
placeItems?: SprinklePropPlaceItems;
|
|
914
943
|
pointerEvents?: SprinklePropPointerEvents;
|
|
915
944
|
pr?: SprinklePropPr;
|
|
@@ -947,6 +976,7 @@ export interface ProteusInput {
|
|
|
947
976
|
| "time"
|
|
948
977
|
| "url"
|
|
949
978
|
| "week"
|
|
979
|
+
| ProteusValue
|
|
950
980
|
| string;
|
|
951
981
|
w?: SprinklePropW;
|
|
952
982
|
whiteSpace?: SprinklePropWhiteSpace;
|
|
@@ -982,7 +1012,7 @@ export interface ProteusLink {
|
|
|
982
1012
|
/**
|
|
983
1013
|
* The link href.
|
|
984
1014
|
*/
|
|
985
|
-
href?: string;
|
|
1015
|
+
href?: ProteusValue | string;
|
|
986
1016
|
justifyContent?: SprinklePropJustifyContent;
|
|
987
1017
|
justifyItems?: SprinklePropJustifyItems;
|
|
988
1018
|
m?: SprinklePropM;
|
|
@@ -1020,11 +1050,15 @@ export interface ProteusLink {
|
|
|
1020
1050
|
export interface ProteusMap {
|
|
1021
1051
|
$type: "Map";
|
|
1022
1052
|
/**
|
|
1023
|
-
*
|
|
1053
|
+
* A Proteus node can be a string, number, boolean, null, a single element, or an array of these types (similar to ReactNode)
|
|
1024
1054
|
*/
|
|
1025
|
-
children?:
|
|
1026
|
-
|
|
1027
|
-
|
|
1055
|
+
children?:
|
|
1056
|
+
| (boolean | null | number | ProteusElement | string)[]
|
|
1057
|
+
| boolean
|
|
1058
|
+
| null
|
|
1059
|
+
| number
|
|
1060
|
+
| ProteusElement
|
|
1061
|
+
| string;
|
|
1028
1062
|
/**
|
|
1029
1063
|
* JSON pointer path to the source array in the data (e.g., '/results')
|
|
1030
1064
|
*/
|
|
@@ -1088,14 +1122,14 @@ export interface ProteusRange {
|
|
|
1088
1122
|
/**
|
|
1089
1123
|
* The maximum value for the range.
|
|
1090
1124
|
*/
|
|
1091
|
-
max?: number;
|
|
1125
|
+
max?: number | ProteusValue;
|
|
1092
1126
|
maxH?: SprinklePropMaxH;
|
|
1093
1127
|
maxW?: SprinklePropMaxW;
|
|
1094
1128
|
mb?: SprinklePropMb;
|
|
1095
1129
|
/**
|
|
1096
1130
|
* The minimum value for the range.
|
|
1097
1131
|
*/
|
|
1098
|
-
min?: number;
|
|
1132
|
+
min?: number | ProteusValue;
|
|
1099
1133
|
ml?: SprinklePropMl;
|
|
1100
1134
|
mr?: SprinklePropMr;
|
|
1101
1135
|
mt?: SprinklePropMt;
|
|
@@ -1119,7 +1153,7 @@ export interface ProteusRange {
|
|
|
1119
1153
|
/**
|
|
1120
1154
|
* The stepping interval for the range.
|
|
1121
1155
|
*/
|
|
1122
|
-
step?: number;
|
|
1156
|
+
step?: number | ProteusValue;
|
|
1123
1157
|
textAlign?: SprinklePropTextAlign;
|
|
1124
1158
|
textTransform?: SprinklePropTextTransform;
|
|
1125
1159
|
transition?: SprinklePropTransition;
|
|
@@ -1133,7 +1167,7 @@ export interface ProteusSelect {
|
|
|
1133
1167
|
/**
|
|
1134
1168
|
* The name of the inner select element.
|
|
1135
1169
|
*/
|
|
1136
|
-
name?: string;
|
|
1170
|
+
name?: ProteusValue | string;
|
|
1137
1171
|
/**
|
|
1138
1172
|
* The select items/options we want to render.
|
|
1139
1173
|
*/
|
|
@@ -1376,7 +1410,7 @@ export interface ProteusText {
|
|
|
1376
1410
|
/**
|
|
1377
1411
|
* Truncate the text at specific number of lines.
|
|
1378
1412
|
*/
|
|
1379
|
-
lineClamp?: "1" | "2" | "3" | "4";
|
|
1413
|
+
lineClamp?: "1" | "2" | "3" | "4" | ProteusValue;
|
|
1380
1414
|
m?: SprinklePropM;
|
|
1381
1415
|
maxH?: SprinklePropMaxH;
|
|
1382
1416
|
maxW?: SprinklePropMaxW;
|
|
@@ -1408,7 +1442,7 @@ export interface ProteusText {
|
|
|
1408
1442
|
/**
|
|
1409
1443
|
* Whether to truncate the text and add an ellipsis at the end.
|
|
1410
1444
|
*/
|
|
1411
|
-
truncate?: boolean;
|
|
1445
|
+
truncate?: boolean | ProteusValue;
|
|
1412
1446
|
w?: SprinklePropW;
|
|
1413
1447
|
whiteSpace?: SprinklePropWhiteSpace;
|
|
1414
1448
|
z?: SprinklePropZ;
|
|
@@ -1446,7 +1480,7 @@ export interface ProteusTextarea {
|
|
|
1446
1480
|
/**
|
|
1447
1481
|
* Limits the height of the textarea when `resize=auto` is used.
|
|
1448
1482
|
*/
|
|
1449
|
-
maxRows?: 1 | 2 | 3 | 4 | 5;
|
|
1483
|
+
maxRows?: 1 | 2 | 3 | 4 | 5 | ProteusValue;
|
|
1450
1484
|
maxW?: SprinklePropMaxW;
|
|
1451
1485
|
mb?: SprinklePropMb;
|
|
1452
1486
|
ml?: SprinklePropMl;
|
|
@@ -1457,7 +1491,7 @@ export interface ProteusTextarea {
|
|
|
1457
1491
|
/**
|
|
1458
1492
|
* The name of the form control element.
|
|
1459
1493
|
*/
|
|
1460
|
-
name?: string;
|
|
1494
|
+
name?: ProteusValue | string;
|
|
1461
1495
|
objectFit?: SprinklePropObjectFit;
|
|
1462
1496
|
overflow?: SprinklePropOverflow;
|
|
1463
1497
|
overflowX?: SprinklePropOverflowX;
|
|
@@ -1468,7 +1502,7 @@ export interface ProteusTextarea {
|
|
|
1468
1502
|
/**
|
|
1469
1503
|
* The placeholder text to use when control has no value.
|
|
1470
1504
|
*/
|
|
1471
|
-
placeholder?: string;
|
|
1505
|
+
placeholder?: ProteusValue | string;
|
|
1472
1506
|
placeItems?: SprinklePropPlaceItems;
|
|
1473
1507
|
pointerEvents?: SprinklePropPointerEvents;
|
|
1474
1508
|
pr?: SprinklePropPr;
|
|
@@ -1478,12 +1512,12 @@ export interface ProteusTextarea {
|
|
|
1478
1512
|
/**
|
|
1479
1513
|
* Control whether resizing mode is manual, automatic, or disabled.
|
|
1480
1514
|
*/
|
|
1481
|
-
resize?: "auto" | "none" | "vertical";
|
|
1515
|
+
resize?: "auto" | "none" | "vertical" | ProteusValue;
|
|
1482
1516
|
rounded?: SprinklePropRounded;
|
|
1483
1517
|
/**
|
|
1484
1518
|
* The number of rows to display.
|
|
1485
1519
|
*/
|
|
1486
|
-
rows?: number;
|
|
1520
|
+
rows?: number | ProteusValue;
|
|
1487
1521
|
shadow?: SprinklePropShadow;
|
|
1488
1522
|
textAlign?: SprinklePropTextAlign;
|
|
1489
1523
|
textTransform?: SprinklePropTextTransform;
|
|
@@ -1492,6 +1526,78 @@ export interface ProteusTextarea {
|
|
|
1492
1526
|
whiteSpace?: SprinklePropWhiteSpace;
|
|
1493
1527
|
z?: SprinklePropZ;
|
|
1494
1528
|
}
|
|
1529
|
+
export interface ProteusTime {
|
|
1530
|
+
$type: "Time";
|
|
1531
|
+
alignItems?: SprinklePropAlignItems;
|
|
1532
|
+
alignSelf?: SprinklePropAlignSelf;
|
|
1533
|
+
animation?: SprinklePropAnimation;
|
|
1534
|
+
backgroundImage?: SprinklePropBackgroundImage;
|
|
1535
|
+
bg?: SprinklePropBg;
|
|
1536
|
+
border?: SprinklePropBorder;
|
|
1537
|
+
borderB?: SprinklePropBorderB;
|
|
1538
|
+
borderColor?: SprinklePropBorderColor;
|
|
1539
|
+
borderL?: SprinklePropBorderL;
|
|
1540
|
+
borderR?: SprinklePropBorderR;
|
|
1541
|
+
borderT?: SprinklePropBorderT;
|
|
1542
|
+
color?: SprinklePropColor;
|
|
1543
|
+
cursor?: SprinklePropCursor;
|
|
1544
|
+
/**
|
|
1545
|
+
* The date to display. Can be a `Date` object or an ISO 8601 string.
|
|
1546
|
+
*/
|
|
1547
|
+
date: ProteusValue | string;
|
|
1548
|
+
display?: SprinklePropDisplay;
|
|
1549
|
+
flex?: SprinklePropFlex;
|
|
1550
|
+
flexDirection?: SprinklePropFlexDirection;
|
|
1551
|
+
flexWrap?: SprinklePropFlexWrap;
|
|
1552
|
+
fontFamily?: SprinklePropFontFamily;
|
|
1553
|
+
fontSize?: SprinklePropFontSize;
|
|
1554
|
+
fontWeight?: SprinklePropFontWeight;
|
|
1555
|
+
gap?: SprinklePropGap;
|
|
1556
|
+
gridColumn?: SprinklePropGridColumn;
|
|
1557
|
+
gridTemplateColumns?: SprinklePropGridTemplateColumns;
|
|
1558
|
+
h?: SprinklePropH;
|
|
1559
|
+
justifyContent?: SprinklePropJustifyContent;
|
|
1560
|
+
justifyItems?: SprinklePropJustifyItems;
|
|
1561
|
+
m?: SprinklePropM;
|
|
1562
|
+
maxH?: SprinklePropMaxH;
|
|
1563
|
+
maxW?: SprinklePropMaxW;
|
|
1564
|
+
mb?: SprinklePropMb;
|
|
1565
|
+
ml?: SprinklePropMl;
|
|
1566
|
+
mr?: SprinklePropMr;
|
|
1567
|
+
mt?: SprinklePropMt;
|
|
1568
|
+
mx?: SprinklePropMx;
|
|
1569
|
+
my?: SprinklePropMy;
|
|
1570
|
+
objectFit?: SprinklePropObjectFit;
|
|
1571
|
+
overflow?: SprinklePropOverflow;
|
|
1572
|
+
overflowX?: SprinklePropOverflowX;
|
|
1573
|
+
overflowY?: SprinklePropOverflowY;
|
|
1574
|
+
p?: SprinklePropP;
|
|
1575
|
+
pb?: SprinklePropPb;
|
|
1576
|
+
pl?: SprinklePropPl;
|
|
1577
|
+
placeItems?: SprinklePropPlaceItems;
|
|
1578
|
+
pointerEvents?: SprinklePropPointerEvents;
|
|
1579
|
+
pr?: SprinklePropPr;
|
|
1580
|
+
pt?: SprinklePropPt;
|
|
1581
|
+
px?: SprinklePropPx;
|
|
1582
|
+
py?: SprinklePropPy;
|
|
1583
|
+
rounded?: SprinklePropRounded;
|
|
1584
|
+
shadow?: SprinklePropShadow;
|
|
1585
|
+
/**
|
|
1586
|
+
* Whether to show the date part of the value. Defaults to `true`.
|
|
1587
|
+
*/
|
|
1588
|
+
showDate?: boolean | ProteusValue;
|
|
1589
|
+
/**
|
|
1590
|
+
* Whether to show the time part of the value. Defaults to `false`.
|
|
1591
|
+
*/
|
|
1592
|
+
showTime?: boolean | ProteusValue;
|
|
1593
|
+
size?: SprinklePropSize;
|
|
1594
|
+
textAlign?: SprinklePropTextAlign;
|
|
1595
|
+
textTransform?: SprinklePropTextTransform;
|
|
1596
|
+
transition?: SprinklePropTransition;
|
|
1597
|
+
w?: SprinklePropW;
|
|
1598
|
+
whiteSpace?: SprinklePropWhiteSpace;
|
|
1599
|
+
z?: SprinklePropZ;
|
|
1600
|
+
}
|
|
1495
1601
|
export interface ProteusValue {
|
|
1496
1602
|
$type: "Value";
|
|
1497
1603
|
/**
|
|
@@ -1507,7 +1613,8 @@ export type SprinklePropAlignItems =
|
|
|
1507
1613
|
| "end"
|
|
1508
1614
|
| "normal"
|
|
1509
1615
|
| "start"
|
|
1510
|
-
| "stretch"
|
|
1616
|
+
| "stretch"
|
|
1617
|
+
| ProteusValue;
|
|
1511
1618
|
/**
|
|
1512
1619
|
* Set the element's `align-self` CSS property
|
|
1513
1620
|
*/
|
|
@@ -1516,15 +1623,16 @@ export type SprinklePropAlignSelf =
|
|
|
1516
1623
|
| "end"
|
|
1517
1624
|
| "normal"
|
|
1518
1625
|
| "start"
|
|
1519
|
-
| "stretch"
|
|
1626
|
+
| "stretch"
|
|
1627
|
+
| ProteusValue;
|
|
1520
1628
|
/**
|
|
1521
1629
|
* Animate element with CSS animations
|
|
1522
1630
|
*/
|
|
1523
|
-
export type SprinklePropAnimation = "ping" | "pulse" | "spin";
|
|
1631
|
+
export type SprinklePropAnimation = "ping" | "pulse" | "spin" | ProteusValue;
|
|
1524
1632
|
/**
|
|
1525
1633
|
* Set the element's `background-image` CSS property
|
|
1526
1634
|
*/
|
|
1527
|
-
export type SprinklePropBackgroundImage = "gradient.opal";
|
|
1635
|
+
export type SprinklePropBackgroundImage = "gradient.opal" | ProteusValue;
|
|
1528
1636
|
/**
|
|
1529
1637
|
* 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
1638
|
*/
|
|
@@ -1568,15 +1676,16 @@ export type SprinklePropBg =
|
|
|
1568
1676
|
| "bg.warning.light"
|
|
1569
1677
|
| "bg.warning.subtle"
|
|
1570
1678
|
| "current"
|
|
1571
|
-
| "transparent"
|
|
1679
|
+
| "transparent"
|
|
1680
|
+
| ProteusValue;
|
|
1572
1681
|
/**
|
|
1573
1682
|
* Set the element's `border-width` CSS property
|
|
1574
1683
|
*/
|
|
1575
|
-
export type SprinklePropBorder = "0" | "1" | "2";
|
|
1684
|
+
export type SprinklePropBorder = "0" | "1" | "2" | ProteusValue;
|
|
1576
1685
|
/**
|
|
1577
1686
|
* Set the element's `border-bottom-width` CSS property
|
|
1578
1687
|
*/
|
|
1579
|
-
export type SprinklePropBorderB = "0" | "1" | "2";
|
|
1688
|
+
export type SprinklePropBorderB = "0" | "1" | "2" | ProteusValue;
|
|
1580
1689
|
/**
|
|
1581
1690
|
* 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
1691
|
*/
|
|
@@ -1594,19 +1703,20 @@ export type SprinklePropBorderColor =
|
|
|
1594
1703
|
| "border.tertiary"
|
|
1595
1704
|
| "border.warning"
|
|
1596
1705
|
| "current"
|
|
1597
|
-
| "transparent"
|
|
1706
|
+
| "transparent"
|
|
1707
|
+
| ProteusValue;
|
|
1598
1708
|
/**
|
|
1599
1709
|
* Set the element's `border-left-width` CSS property
|
|
1600
1710
|
*/
|
|
1601
|
-
export type SprinklePropBorderL = "0" | "1" | "2";
|
|
1711
|
+
export type SprinklePropBorderL = "0" | "1" | "2" | ProteusValue;
|
|
1602
1712
|
/**
|
|
1603
1713
|
* Set the element's `border-right-width` CSS property
|
|
1604
1714
|
*/
|
|
1605
|
-
export type SprinklePropBorderR = "0" | "1" | "2";
|
|
1715
|
+
export type SprinklePropBorderR = "0" | "1" | "2" | ProteusValue;
|
|
1606
1716
|
/**
|
|
1607
1717
|
* Set the element's `border-top-width` CSS property
|
|
1608
1718
|
*/
|
|
1609
|
-
export type SprinklePropBorderT = "0" | "1" | "2";
|
|
1719
|
+
export type SprinklePropBorderT = "0" | "1" | "2" | ProteusValue;
|
|
1610
1720
|
/**
|
|
1611
1721
|
* 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
1722
|
*/
|
|
@@ -1646,11 +1756,12 @@ export type SprinklePropColor =
|
|
|
1646
1756
|
| "fg.warning.light"
|
|
1647
1757
|
| "fg.warning.strong"
|
|
1648
1758
|
| "fg.white"
|
|
1649
|
-
| "transparent"
|
|
1759
|
+
| "transparent"
|
|
1760
|
+
| ProteusValue;
|
|
1650
1761
|
/**
|
|
1651
1762
|
* Set the element's `cursor` CSS property
|
|
1652
1763
|
*/
|
|
1653
|
-
export type SprinklePropCursor = "default" | "pointer" | "text";
|
|
1764
|
+
export type SprinklePropCursor = "default" | "pointer" | "text" | ProteusValue;
|
|
1654
1765
|
/**
|
|
1655
1766
|
* Set the element's `display` CSS property
|
|
1656
1767
|
*/
|
|
@@ -1664,11 +1775,12 @@ export type SprinklePropDisplay =
|
|
|
1664
1775
|
| "none"
|
|
1665
1776
|
| "table"
|
|
1666
1777
|
| "table-cell"
|
|
1667
|
-
| "table-row"
|
|
1778
|
+
| "table-row"
|
|
1779
|
+
| ProteusValue;
|
|
1668
1780
|
/**
|
|
1669
1781
|
* Set the element's `flex` CSS property
|
|
1670
1782
|
*/
|
|
1671
|
-
export type SprinklePropFlex = "1" | "auto" | "initial" | "none";
|
|
1783
|
+
export type SprinklePropFlex = "1" | "auto" | "initial" | "none" | ProteusValue;
|
|
1672
1784
|
/**
|
|
1673
1785
|
* Set the element's `flex-direction` CSS property
|
|
1674
1786
|
*/
|
|
@@ -1676,15 +1788,16 @@ export type SprinklePropFlexDirection =
|
|
|
1676
1788
|
| "column"
|
|
1677
1789
|
| "column-reverse"
|
|
1678
1790
|
| "row"
|
|
1679
|
-
| "row-reverse"
|
|
1791
|
+
| "row-reverse"
|
|
1792
|
+
| ProteusValue;
|
|
1680
1793
|
/**
|
|
1681
1794
|
* Set the element's `flex-wrap` CSS property
|
|
1682
1795
|
*/
|
|
1683
|
-
export type SprinklePropFlexWrap = "nowrap" | "wrap";
|
|
1796
|
+
export type SprinklePropFlexWrap = "nowrap" | "wrap" | ProteusValue;
|
|
1684
1797
|
/**
|
|
1685
1798
|
* Set the element's font family. Only accepts predefined fontFamily tokens.
|
|
1686
1799
|
*/
|
|
1687
|
-
export type SprinklePropFontFamily = "mono" | "sans";
|
|
1800
|
+
export type SprinklePropFontFamily = "mono" | "sans" | ProteusValue;
|
|
1688
1801
|
/**
|
|
1689
1802
|
* Set the element's font size and line height (both properties are set together). Only accepts predefined fontSize tokens.
|
|
1690
1803
|
*/
|
|
@@ -1697,11 +1810,18 @@ export type SprinklePropFontSize =
|
|
|
1697
1810
|
| "md"
|
|
1698
1811
|
| "sm"
|
|
1699
1812
|
| "xl"
|
|
1700
|
-
| "xs"
|
|
1813
|
+
| "xs"
|
|
1814
|
+
| ProteusValue;
|
|
1701
1815
|
/**
|
|
1702
1816
|
* Set the element's `font-weight` CSS property
|
|
1703
1817
|
*/
|
|
1704
|
-
export type SprinklePropFontWeight =
|
|
1818
|
+
export type SprinklePropFontWeight =
|
|
1819
|
+
| "400"
|
|
1820
|
+
| "500"
|
|
1821
|
+
| "600"
|
|
1822
|
+
| "700"
|
|
1823
|
+
| "inherit"
|
|
1824
|
+
| ProteusValue;
|
|
1705
1825
|
/**
|
|
1706
1826
|
* Set the element's `gap` CSS property
|
|
1707
1827
|
*/
|
|
@@ -1720,15 +1840,21 @@ export type SprinklePropGap =
|
|
|
1720
1840
|
| "40"
|
|
1721
1841
|
| "48"
|
|
1722
1842
|
| "64"
|
|
1723
|
-
| "80"
|
|
1843
|
+
| "80"
|
|
1844
|
+
| ProteusValue;
|
|
1724
1845
|
/**
|
|
1725
1846
|
* Set the element's size across grid columns
|
|
1726
1847
|
*/
|
|
1727
|
-
export type SprinklePropGridColumn = "1" | "2" | "3" | "4";
|
|
1848
|
+
export type SprinklePropGridColumn = "1" | "2" | "3" | "4" | ProteusValue;
|
|
1728
1849
|
/**
|
|
1729
1850
|
* Control number of columns in a grid layout
|
|
1730
1851
|
*/
|
|
1731
|
-
export type SprinklePropGridTemplateColumns =
|
|
1852
|
+
export type SprinklePropGridTemplateColumns =
|
|
1853
|
+
| "1"
|
|
1854
|
+
| "2"
|
|
1855
|
+
| "3"
|
|
1856
|
+
| "4"
|
|
1857
|
+
| ProteusValue;
|
|
1732
1858
|
/**
|
|
1733
1859
|
* Set the element's height. Only accepts predefined size tokens.
|
|
1734
1860
|
*/
|
|
@@ -1763,7 +1889,8 @@ export type SprinklePropH =
|
|
|
1763
1889
|
| "min"
|
|
1764
1890
|
| "sm"
|
|
1765
1891
|
| "xl"
|
|
1766
|
-
| "xs"
|
|
1892
|
+
| "xs"
|
|
1893
|
+
| ProteusValue;
|
|
1767
1894
|
/**
|
|
1768
1895
|
* Set the element's `justify-content` CSS property
|
|
1769
1896
|
*/
|
|
@@ -1777,7 +1904,8 @@ export type SprinklePropJustifyContent =
|
|
|
1777
1904
|
| "space-between"
|
|
1778
1905
|
| "space-evenly"
|
|
1779
1906
|
| "start"
|
|
1780
|
-
| "stretch"
|
|
1907
|
+
| "stretch"
|
|
1908
|
+
| ProteusValue;
|
|
1781
1909
|
/**
|
|
1782
1910
|
* Set the element's `justify-items` CSS property
|
|
1783
1911
|
*/
|
|
@@ -1786,7 +1914,8 @@ export type SprinklePropJustifyItems =
|
|
|
1786
1914
|
| "end"
|
|
1787
1915
|
| "normal"
|
|
1788
1916
|
| "start"
|
|
1789
|
-
| "stretch"
|
|
1917
|
+
| "stretch"
|
|
1918
|
+
| ProteusValue;
|
|
1790
1919
|
/**
|
|
1791
1920
|
* Set the element's margin on all sides. Only accepts predefined spacing tokens.
|
|
1792
1921
|
*/
|
|
@@ -1806,15 +1935,28 @@ export type SprinklePropM =
|
|
|
1806
1935
|
| "48"
|
|
1807
1936
|
| "64"
|
|
1808
1937
|
| "80"
|
|
1809
|
-
| "auto"
|
|
1938
|
+
| "auto"
|
|
1939
|
+
| ProteusValue;
|
|
1810
1940
|
/**
|
|
1811
1941
|
* Set the element's maximum height. Only accepts predefined maxSize tokens.
|
|
1812
1942
|
*/
|
|
1813
|
-
export type SprinklePropMaxH =
|
|
1943
|
+
export type SprinklePropMaxH =
|
|
1944
|
+
| "full"
|
|
1945
|
+
| "lg"
|
|
1946
|
+
| "md"
|
|
1947
|
+
| "sm"
|
|
1948
|
+
| "xs"
|
|
1949
|
+
| ProteusValue;
|
|
1814
1950
|
/**
|
|
1815
1951
|
* Set the element's maximum width. Only accepts predefined maxSize tokens.
|
|
1816
1952
|
*/
|
|
1817
|
-
export type SprinklePropMaxW =
|
|
1953
|
+
export type SprinklePropMaxW =
|
|
1954
|
+
| "full"
|
|
1955
|
+
| "lg"
|
|
1956
|
+
| "md"
|
|
1957
|
+
| "sm"
|
|
1958
|
+
| "xs"
|
|
1959
|
+
| ProteusValue;
|
|
1818
1960
|
/**
|
|
1819
1961
|
* Set the element's bottom margin. Only accepts predefined spacing tokens.
|
|
1820
1962
|
*/
|
|
@@ -1834,7 +1976,8 @@ export type SprinklePropMb =
|
|
|
1834
1976
|
| "48"
|
|
1835
1977
|
| "64"
|
|
1836
1978
|
| "80"
|
|
1837
|
-
| "auto"
|
|
1979
|
+
| "auto"
|
|
1980
|
+
| ProteusValue;
|
|
1838
1981
|
/**
|
|
1839
1982
|
* Set the element's left margin. Only accepts predefined spacing tokens.
|
|
1840
1983
|
*/
|
|
@@ -1854,7 +1997,8 @@ export type SprinklePropMl =
|
|
|
1854
1997
|
| "48"
|
|
1855
1998
|
| "64"
|
|
1856
1999
|
| "80"
|
|
1857
|
-
| "auto"
|
|
2000
|
+
| "auto"
|
|
2001
|
+
| ProteusValue;
|
|
1858
2002
|
/**
|
|
1859
2003
|
* Set the element's right margin. Only accepts predefined spacing tokens.
|
|
1860
2004
|
*/
|
|
@@ -1874,7 +2018,8 @@ export type SprinklePropMr =
|
|
|
1874
2018
|
| "48"
|
|
1875
2019
|
| "64"
|
|
1876
2020
|
| "80"
|
|
1877
|
-
| "auto"
|
|
2021
|
+
| "auto"
|
|
2022
|
+
| ProteusValue;
|
|
1878
2023
|
/**
|
|
1879
2024
|
* Set the element's top margin. Only accepts predefined spacing tokens.
|
|
1880
2025
|
*/
|
|
@@ -1894,7 +2039,8 @@ export type SprinklePropMt =
|
|
|
1894
2039
|
| "48"
|
|
1895
2040
|
| "64"
|
|
1896
2041
|
| "80"
|
|
1897
|
-
| "auto"
|
|
2042
|
+
| "auto"
|
|
2043
|
+
| ProteusValue;
|
|
1898
2044
|
/**
|
|
1899
2045
|
* Set the element's left and right margin. Only accepts predefined spacing tokens.
|
|
1900
2046
|
*/
|
|
@@ -1914,7 +2060,9 @@ export type SprinklePropMx =
|
|
|
1914
2060
|
| "48"
|
|
1915
2061
|
| "64"
|
|
1916
2062
|
| "80"
|
|
1917
|
-
| "auto"
|
|
2063
|
+
| "auto"
|
|
2064
|
+
| ProteusValue;
|
|
2065
|
+
|
|
1918
2066
|
/**
|
|
1919
2067
|
* Set the element's top and bottom margin. Only accepts predefined spacing tokens.
|
|
1920
2068
|
*/
|
|
@@ -1934,24 +2082,37 @@ export type SprinklePropMy =
|
|
|
1934
2082
|
| "48"
|
|
1935
2083
|
| "64"
|
|
1936
2084
|
| "80"
|
|
1937
|
-
| "auto"
|
|
1938
|
-
|
|
2085
|
+
| "auto"
|
|
2086
|
+
| ProteusValue;
|
|
1939
2087
|
/**
|
|
1940
2088
|
* Set the element's `object-fit` CSS property
|
|
1941
2089
|
*/
|
|
1942
|
-
export type SprinklePropObjectFit =
|
|
2090
|
+
export type SprinklePropObjectFit =
|
|
2091
|
+
| "contain"
|
|
2092
|
+
| "cover"
|
|
2093
|
+
| "fill"
|
|
2094
|
+
| "none"
|
|
2095
|
+
| ProteusValue;
|
|
1943
2096
|
/**
|
|
1944
2097
|
* Set the element's `overflow` CSS property
|
|
1945
2098
|
*/
|
|
1946
|
-
export type SprinklePropOverflow = "auto" | "hidden" | "visible";
|
|
2099
|
+
export type SprinklePropOverflow = "auto" | "hidden" | "visible" | ProteusValue;
|
|
1947
2100
|
/**
|
|
1948
2101
|
* Set the element's `overflow-x` CSS property
|
|
1949
2102
|
*/
|
|
1950
|
-
export type SprinklePropOverflowX =
|
|
2103
|
+
export type SprinklePropOverflowX =
|
|
2104
|
+
| "auto"
|
|
2105
|
+
| "hidden"
|
|
2106
|
+
| "visible"
|
|
2107
|
+
| ProteusValue;
|
|
1951
2108
|
/**
|
|
1952
2109
|
* Set the element's `overflow-y` CSS property
|
|
1953
2110
|
*/
|
|
1954
|
-
export type SprinklePropOverflowY =
|
|
2111
|
+
export type SprinklePropOverflowY =
|
|
2112
|
+
| "auto"
|
|
2113
|
+
| "hidden"
|
|
2114
|
+
| "visible"
|
|
2115
|
+
| ProteusValue;
|
|
1955
2116
|
/**
|
|
1956
2117
|
* Set the element's padding on all sides. Only accepts predefined spacing tokens.
|
|
1957
2118
|
*/
|
|
@@ -1970,7 +2131,8 @@ export type SprinklePropP =
|
|
|
1970
2131
|
| "40"
|
|
1971
2132
|
| "48"
|
|
1972
2133
|
| "64"
|
|
1973
|
-
| "80"
|
|
2134
|
+
| "80"
|
|
2135
|
+
| ProteusValue;
|
|
1974
2136
|
/**
|
|
1975
2137
|
* Set the element's bottom padding. Only accepts predefined spacing tokens.
|
|
1976
2138
|
*/
|
|
@@ -1989,7 +2151,8 @@ export type SprinklePropPb =
|
|
|
1989
2151
|
| "40"
|
|
1990
2152
|
| "48"
|
|
1991
2153
|
| "64"
|
|
1992
|
-
| "80"
|
|
2154
|
+
| "80"
|
|
2155
|
+
| ProteusValue;
|
|
1993
2156
|
/**
|
|
1994
2157
|
* Set the element's left padding. Only accepts predefined spacing tokens.
|
|
1995
2158
|
*/
|
|
@@ -2008,15 +2171,16 @@ export type SprinklePropPl =
|
|
|
2008
2171
|
| "40"
|
|
2009
2172
|
| "48"
|
|
2010
2173
|
| "64"
|
|
2011
|
-
| "80"
|
|
2174
|
+
| "80"
|
|
2175
|
+
| ProteusValue;
|
|
2012
2176
|
/**
|
|
2013
2177
|
* Set the element's `place-items` CSS property
|
|
2014
2178
|
*/
|
|
2015
|
-
export type SprinklePropPlaceItems = "center";
|
|
2179
|
+
export type SprinklePropPlaceItems = "center" | ProteusValue;
|
|
2016
2180
|
/**
|
|
2017
2181
|
* Set the element's `pointer-events` CSS property
|
|
2018
2182
|
*/
|
|
2019
|
-
export type SprinklePropPointerEvents = "auto" | "none";
|
|
2183
|
+
export type SprinklePropPointerEvents = "auto" | "none" | ProteusValue;
|
|
2020
2184
|
/**
|
|
2021
2185
|
* Set the element's right padding. Only accepts predefined spacing tokens.
|
|
2022
2186
|
*/
|
|
@@ -2035,7 +2199,8 @@ export type SprinklePropPr =
|
|
|
2035
2199
|
| "40"
|
|
2036
2200
|
| "48"
|
|
2037
2201
|
| "64"
|
|
2038
|
-
| "80"
|
|
2202
|
+
| "80"
|
|
2203
|
+
| ProteusValue;
|
|
2039
2204
|
/**
|
|
2040
2205
|
* Set the element's top padding. Only accepts predefined spacing tokens.
|
|
2041
2206
|
*/
|
|
@@ -2054,7 +2219,8 @@ export type SprinklePropPt =
|
|
|
2054
2219
|
| "40"
|
|
2055
2220
|
| "48"
|
|
2056
2221
|
| "64"
|
|
2057
|
-
| "80"
|
|
2222
|
+
| "80"
|
|
2223
|
+
| ProteusValue;
|
|
2058
2224
|
/**
|
|
2059
2225
|
* Set the element's left and right padding. Only accepts predefined spacing tokens.
|
|
2060
2226
|
*/
|
|
@@ -2073,7 +2239,8 @@ export type SprinklePropPx =
|
|
|
2073
2239
|
| "40"
|
|
2074
2240
|
| "48"
|
|
2075
2241
|
| "64"
|
|
2076
|
-
| "80"
|
|
2242
|
+
| "80"
|
|
2243
|
+
| ProteusValue;
|
|
2077
2244
|
/**
|
|
2078
2245
|
* Set the element's top and bottom padding. Only accepts predefined spacing tokens.
|
|
2079
2246
|
*/
|
|
@@ -2092,7 +2259,8 @@ export type SprinklePropPy =
|
|
|
2092
2259
|
| "40"
|
|
2093
2260
|
| "48"
|
|
2094
2261
|
| "64"
|
|
2095
|
-
| "80"
|
|
2262
|
+
| "80"
|
|
2263
|
+
| ProteusValue;
|
|
2096
2264
|
/**
|
|
2097
2265
|
* Set the element's border radius. Only accepts predefined borderRadius tokens.
|
|
2098
2266
|
*/
|
|
@@ -2104,11 +2272,18 @@ export type SprinklePropRounded =
|
|
|
2104
2272
|
| "none"
|
|
2105
2273
|
| "sm"
|
|
2106
2274
|
| "xl"
|
|
2107
|
-
| "xs"
|
|
2275
|
+
| "xs"
|
|
2276
|
+
| ProteusValue;
|
|
2108
2277
|
/**
|
|
2109
2278
|
* Set the element's box shadow. Only accepts predefined boxShadow tokens.
|
|
2110
2279
|
*/
|
|
2111
|
-
export type SprinklePropShadow =
|
|
2280
|
+
export type SprinklePropShadow =
|
|
2281
|
+
| "lg"
|
|
2282
|
+
| "md"
|
|
2283
|
+
| "none"
|
|
2284
|
+
| "sm"
|
|
2285
|
+
| "xl"
|
|
2286
|
+
| ProteusValue;
|
|
2112
2287
|
/**
|
|
2113
2288
|
* Set the element's width and height. Only accepts predefined size tokens.
|
|
2114
2289
|
*
|
|
@@ -2146,15 +2321,25 @@ export type SprinklePropSize =
|
|
|
2146
2321
|
| "min"
|
|
2147
2322
|
| "sm"
|
|
2148
2323
|
| "xl"
|
|
2149
|
-
| "xs"
|
|
2324
|
+
| "xs"
|
|
2325
|
+
| ProteusValue;
|
|
2150
2326
|
/**
|
|
2151
2327
|
* Set the element's `text-align` CSS property
|
|
2152
2328
|
*/
|
|
2153
|
-
export type SprinklePropTextAlign =
|
|
2329
|
+
export type SprinklePropTextAlign =
|
|
2330
|
+
| "center"
|
|
2331
|
+
| "end"
|
|
2332
|
+
| "justify"
|
|
2333
|
+
| "start"
|
|
2334
|
+
| ProteusValue;
|
|
2154
2335
|
/**
|
|
2155
2336
|
* Set the element's `text-transform` CSS property
|
|
2156
2337
|
*/
|
|
2157
|
-
export type SprinklePropTextTransform =
|
|
2338
|
+
export type SprinklePropTextTransform =
|
|
2339
|
+
| "capitalize"
|
|
2340
|
+
| "none"
|
|
2341
|
+
| "uppercase"
|
|
2342
|
+
| ProteusValue;
|
|
2158
2343
|
/**
|
|
2159
2344
|
* Control which CSS properties should transition
|
|
2160
2345
|
*/
|
|
@@ -2163,7 +2348,8 @@ export type SprinklePropTransition =
|
|
|
2163
2348
|
| "colors"
|
|
2164
2349
|
| "none"
|
|
2165
2350
|
| "opacity"
|
|
2166
|
-
| "transform"
|
|
2351
|
+
| "transform"
|
|
2352
|
+
| ProteusValue;
|
|
2167
2353
|
/**
|
|
2168
2354
|
* Set the element's width. Only accepts predefined size tokens.
|
|
2169
2355
|
*/
|
|
@@ -2198,11 +2384,12 @@ export type SprinklePropW =
|
|
|
2198
2384
|
| "min"
|
|
2199
2385
|
| "sm"
|
|
2200
2386
|
| "xl"
|
|
2201
|
-
| "xs"
|
|
2387
|
+
| "xs"
|
|
2388
|
+
| ProteusValue;
|
|
2202
2389
|
/**
|
|
2203
2390
|
* Set the element's `white-space` CSS property
|
|
2204
2391
|
*/
|
|
2205
|
-
export type SprinklePropWhiteSpace = "nowrap";
|
|
2392
|
+
export type SprinklePropWhiteSpace = "nowrap" | ProteusValue;
|
|
2206
2393
|
/**
|
|
2207
2394
|
* 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
2395
|
*/
|
|
@@ -2214,7 +2401,8 @@ export type SprinklePropZ =
|
|
|
2214
2401
|
| "auto"
|
|
2215
2402
|
| "popover"
|
|
2216
2403
|
| "toast"
|
|
2217
|
-
| "tooltip"
|
|
2404
|
+
| "tooltip"
|
|
2405
|
+
| ProteusValue;
|
|
2218
2406
|
|
|
2219
2407
|
/**
|
|
2220
2408
|
* Builder namespace for Adaptive UI Document components.
|
|
@@ -2307,6 +2495,10 @@ export const UI = {
|
|
|
2307
2495
|
$type: "Textarea" as const,
|
|
2308
2496
|
...props,
|
|
2309
2497
|
}),
|
|
2498
|
+
Time: (props: Omit<ProteusTime, "$type">): ProteusTime => ({
|
|
2499
|
+
$type: "Time" as const,
|
|
2500
|
+
...props,
|
|
2501
|
+
}),
|
|
2310
2502
|
Value: (props: Omit<ProteusValue, "$type">): ProteusValue => ({
|
|
2311
2503
|
$type: "Value" as const,
|
|
2312
2504
|
...props,
|