@palmyit/elements 0.1.3 → 0.1.8
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/README.md +2 -2
- package/dist/definitions.d.ts +54 -0
- package/dist/definitions.js +1743 -0
- package/dist/elements/button/definition.d.ts +38 -0
- package/dist/elements/button/template.d.ts +2 -0
- package/dist/elements/checkbox/definition.d.ts +10 -0
- package/dist/elements/checkbox/template.d.ts +2 -0
- package/dist/elements/container/definition.d.ts +39 -0
- package/dist/elements/container/template.d.ts +2 -0
- package/dist/elements/divider/definition.d.ts +10 -0
- package/dist/elements/divider/template.d.ts +2 -0
- package/dist/elements/icon/definition.d.ts +18 -0
- package/dist/elements/icon/template.d.ts +2 -0
- package/dist/elements/image/definition.d.ts +33 -0
- package/dist/elements/image/template.d.ts +2 -0
- package/dist/elements/list/definition.d.ts +11 -0
- package/dist/elements/list/template.d.ts +2 -0
- package/dist/elements/page/definition.d.ts +22 -0
- package/dist/elements/page/template.d.ts +2 -0
- package/dist/elements/radio/definition.d.ts +13 -0
- package/dist/elements/radio/template.d.ts +2 -0
- package/dist/elements/rich-text/definition.d.ts +8 -0
- package/dist/elements/rich-text/richTextMarks.d.ts +4 -0
- package/dist/elements/rich-text/richTextOptions.d.ts +2 -0
- package/dist/elements/rich-text/template.d.ts +2 -0
- package/dist/elements/section/definition.d.ts +39 -0
- package/dist/elements/section/template.d.ts +2 -0
- package/dist/elements/select/definition.d.ts +13 -0
- package/dist/elements/select/template.d.ts +2 -0
- package/dist/elements/table/definition.d.ts +20 -0
- package/dist/elements/table/template.d.ts +2 -0
- package/dist/elements/text/definition.d.ts +46 -0
- package/dist/elements/text/template.d.ts +2 -0
- package/dist/elements/text-area/definition.d.ts +10 -0
- package/dist/elements/text-area/template.d.ts +2 -0
- package/dist/elements/text-field/definition.d.ts +10 -0
- package/dist/elements/text-field/template.d.ts +2 -0
- package/dist/elements/video/definition.d.ts +10 -0
- package/dist/elements/video/template.d.ts +2 -0
- package/dist/manifest.json +3 -3
- package/dist/plmt-elements.css +2 -1
- package/dist/plmt-elements.js +0 -115
- package/dist/registry.d.ts +9 -0
- package/dist/render/renderHtml.d.ts +5 -0
- package/dist/render/styleToClasses.d.ts +35 -0
- package/dist/render/styleToVars.d.ts +2 -0
- package/dist/render/styleTokens.d.ts +57 -0
- package/dist/render/tags.d.ts +42 -0
- package/dist/render/toDom.d.ts +3 -0
- package/dist/render/types.d.ts +20 -0
- package/dist/schema/Fields/BackgroundField/backgroundValue.d.ts +16 -0
- package/dist/schema/Fields/ColorField/color-value.d.ts +6 -0
- package/dist/schema/Fields/ColorField/index.d.ts +1 -0
- package/dist/schema/Fields/FontStyleField.d.ts +2 -0
- package/dist/schema/Fields/IconPicker/iconCatalog.d.ts +3 -0
- package/dist/schema/addressSchema.d.ts +3 -0
- package/dist/schema/backgroundStyleDefinitions.d.ts +10 -0
- package/dist/schema/device/deviceStyle.d.ts +13 -0
- package/dist/schema/device/devices.d.ts +21 -0
- package/dist/schema/deviceSettings.d.ts +13 -0
- package/dist/schema/deviceVisibility.d.ts +19 -0
- package/dist/schema/elementConfiguration.d.ts +38 -0
- package/dist/schema/elementRegistry.d.ts +40 -0
- package/dist/schema/elementStyleDefinitions.d.ts +24 -0
- package/dist/schema/elementTemplates.d.ts +26 -0
- package/dist/schema/layoutChildren.d.ts +2 -0
- package/dist/schema/layoutElementConfiguration.d.ts +17 -0
- package/dist/schema/linkSettings.d.ts +26 -0
- package/dist/schema/style/backgroundStyle.d.ts +5 -0
- package/dist/schema/style/elementStyle.d.ts +62 -0
- package/dist/schema/style/page-styles.d.ts +3 -0
- package/dist/schema/styleItems.d.ts +53 -0
- package/dist/schema/styleTokensSchema.d.ts +274 -0
- package/dist/schema/textItems.d.ts +10 -0
- package/dist/styleToClasses-CZSWp6Ez.js +683 -0
- package/dist/templates/elementSpec.d.ts +10 -0
- package/dist/templates/helpers.d.ts +17 -0
- package/dist/templates.d.ts +13 -0
- package/dist/templates.js +349 -0
- package/package.json +31 -5
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { BackgroundStyle } from '../Fields/BackgroundField/backgroundValue';
|
|
2
|
+
import { StyleColor } from '../../render/styleTokens';
|
|
3
|
+
export declare const BORDER_LINE_STYLES: readonly ["none", "solid", "dashed", "dotted", "double"];
|
|
4
|
+
export type BorderLineStyle = (typeof BORDER_LINE_STYLES)[number];
|
|
5
|
+
export declare const FLEX_DIRECTIONS: readonly ["row", "column", "row-reverse", "column-reverse"];
|
|
6
|
+
export declare const FLEX_WRAPS: readonly ["nowrap", "wrap", "wrap-reverse"];
|
|
7
|
+
export declare const FLEX_JUSTIFY_CONTENTS: readonly ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"];
|
|
8
|
+
export declare const FLEX_ALIGN_ITEMS: readonly ["stretch", "flex-start", "center", "flex-end", "baseline"];
|
|
9
|
+
export declare const FLEX_ALIGN_CONTENTS: readonly ["stretch", "flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"];
|
|
10
|
+
export type FlexDirection = (typeof FLEX_DIRECTIONS)[number];
|
|
11
|
+
export type FlexWrap = (typeof FLEX_WRAPS)[number];
|
|
12
|
+
export type FlexJustifyContent = (typeof FLEX_JUSTIFY_CONTENTS)[number];
|
|
13
|
+
export type FlexAlignItems = (typeof FLEX_ALIGN_ITEMS)[number];
|
|
14
|
+
export type FlexAlignContent = (typeof FLEX_ALIGN_CONTENTS)[number];
|
|
15
|
+
export type ElementLayout = 'block' | 'flex' | 'grid';
|
|
16
|
+
export type ElementOverflow = 'show' | 'hide';
|
|
17
|
+
export type GridColumnCount = 2 | 3 | 4;
|
|
18
|
+
export type ElementStyleKind = 'section' | 'container';
|
|
19
|
+
export type ElementStyle = {
|
|
20
|
+
layout: ElementLayout;
|
|
21
|
+
gridColumns?: GridColumnCount;
|
|
22
|
+
flexDirection: FlexDirection;
|
|
23
|
+
flexWrap: FlexWrap;
|
|
24
|
+
justifyContent: FlexJustifyContent;
|
|
25
|
+
alignItems: FlexAlignItems;
|
|
26
|
+
alignContent: FlexAlignContent;
|
|
27
|
+
rowGap: string;
|
|
28
|
+
columnGap: string;
|
|
29
|
+
overflow: ElementOverflow;
|
|
30
|
+
overflowVertical: boolean;
|
|
31
|
+
overflowHorizontal: boolean;
|
|
32
|
+
width: string;
|
|
33
|
+
height: string;
|
|
34
|
+
minWidth: string;
|
|
35
|
+
minHeight: string;
|
|
36
|
+
maxWidth: string;
|
|
37
|
+
maxHeight: string;
|
|
38
|
+
paddingTop: string;
|
|
39
|
+
paddingBottom: string;
|
|
40
|
+
paddingLeft: string;
|
|
41
|
+
paddingRight: string;
|
|
42
|
+
marginTop: string;
|
|
43
|
+
marginBottom: string;
|
|
44
|
+
marginLeft: string;
|
|
45
|
+
marginRight: string;
|
|
46
|
+
borderRadiusTopLeft: string;
|
|
47
|
+
borderRadiusTopRight: string;
|
|
48
|
+
borderRadiusBottomRight: string;
|
|
49
|
+
borderRadiusBottomLeft: string;
|
|
50
|
+
borderWidth: string;
|
|
51
|
+
borderStyle: BorderLineStyle;
|
|
52
|
+
borderColor: StyleColor;
|
|
53
|
+
} & BackgroundStyle;
|
|
54
|
+
export declare const defaultElementStyle: ElementStyle;
|
|
55
|
+
export declare const LENGTH_PATTERN: RegExp;
|
|
56
|
+
type CssVarMap = Record<string, string | undefined>;
|
|
57
|
+
export declare function sanitizeLength(value: string): string | undefined;
|
|
58
|
+
export declare function sanitizeAutoAsZero(value: string): string | undefined;
|
|
59
|
+
export declare function sanitizeMaxLength(value: string): string | undefined;
|
|
60
|
+
export declare function sanitizeBorderWidth(value: string): string | undefined;
|
|
61
|
+
export declare function elementStyleToCssVariables(storedStyle: ElementStyle, kind: ElementStyleKind): CssVarMap;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type StyleItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
variable?: string;
|
|
5
|
+
variables?: Record<string, string>;
|
|
6
|
+
attribute?: string;
|
|
7
|
+
value: unknown;
|
|
8
|
+
};
|
|
9
|
+
export type StyleDefinition = {
|
|
10
|
+
key: string;
|
|
11
|
+
variable?: string;
|
|
12
|
+
variables?: Record<string, string>;
|
|
13
|
+
attribute?: string;
|
|
14
|
+
value: z.ZodType;
|
|
15
|
+
/** Omit when the key has no default and is left out until set. */
|
|
16
|
+
defaultValue?: unknown;
|
|
17
|
+
/** How the page history names this key. */
|
|
18
|
+
label?: string;
|
|
19
|
+
};
|
|
20
|
+
type StyleValues = Record<string, unknown>;
|
|
21
|
+
export declare function styleItemsSchema(definitions: StyleDefinition[]): z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
variable: z.ZodOptional<z.ZodString>;
|
|
24
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
+
attribute: z.ZodOptional<z.ZodString>;
|
|
26
|
+
value: z.ZodUnknown;
|
|
27
|
+
}, z.core.$strict>>>, z.ZodTransform<StyleValues, {
|
|
28
|
+
key: string;
|
|
29
|
+
value: unknown;
|
|
30
|
+
variable?: string | undefined;
|
|
31
|
+
variables?: Record<string, string> | undefined;
|
|
32
|
+
attribute?: string | undefined;
|
|
33
|
+
}[]>>;
|
|
34
|
+
/** A device override: only the keys the document sets, with no defaults filled in. */
|
|
35
|
+
export declare function styleOverrideItemsSchema(definitions: StyleDefinition[]): z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
36
|
+
key: z.ZodString;
|
|
37
|
+
variable: z.ZodOptional<z.ZodString>;
|
|
38
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
39
|
+
attribute: z.ZodOptional<z.ZodString>;
|
|
40
|
+
value: z.ZodUnknown;
|
|
41
|
+
}, z.core.$strict>>>, z.ZodTransform<StyleValues, {
|
|
42
|
+
key: string;
|
|
43
|
+
value: unknown;
|
|
44
|
+
variable?: string | undefined;
|
|
45
|
+
variables?: Record<string, string> | undefined;
|
|
46
|
+
attribute?: string | undefined;
|
|
47
|
+
}[]>>;
|
|
48
|
+
/** History labels keyed by the prop path that holds each style key. */
|
|
49
|
+
export declare function styleLabels(definitions: StyleDefinition[], pathPrefix?: string): Record<string, string>;
|
|
50
|
+
/** Keys missing from `values` (or an absent `values`) use the definition default. */
|
|
51
|
+
export declare function toStyleItems(values: StyleValues | undefined, definitions: StyleDefinition[]): StyleItem[];
|
|
52
|
+
export declare function toStyleOverrideItems(values: StyleValues | undefined, definitions: StyleDefinition[]): StyleItem[];
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const spacingToken: z.ZodEnum<{
|
|
3
|
+
0: "0";
|
|
4
|
+
px: "px";
|
|
5
|
+
0.5: "0.5";
|
|
6
|
+
1: "1";
|
|
7
|
+
1.5: "1.5";
|
|
8
|
+
2: "2";
|
|
9
|
+
2.5: "2.5";
|
|
10
|
+
3: "3";
|
|
11
|
+
3.5: "3.5";
|
|
12
|
+
4: "4";
|
|
13
|
+
5: "5";
|
|
14
|
+
6: "6";
|
|
15
|
+
7: "7";
|
|
16
|
+
8: "8";
|
|
17
|
+
9: "9";
|
|
18
|
+
10: "10";
|
|
19
|
+
11: "11";
|
|
20
|
+
12: "12";
|
|
21
|
+
14: "14";
|
|
22
|
+
16: "16";
|
|
23
|
+
20: "20";
|
|
24
|
+
24: "24";
|
|
25
|
+
28: "28";
|
|
26
|
+
32: "32";
|
|
27
|
+
36: "36";
|
|
28
|
+
40: "40";
|
|
29
|
+
44: "44";
|
|
30
|
+
48: "48";
|
|
31
|
+
52: "52";
|
|
32
|
+
56: "56";
|
|
33
|
+
60: "60";
|
|
34
|
+
64: "64";
|
|
35
|
+
72: "72";
|
|
36
|
+
80: "80";
|
|
37
|
+
96: "96";
|
|
38
|
+
auto: "auto";
|
|
39
|
+
}>;
|
|
40
|
+
declare const borderWidthToken: z.ZodEnum<{
|
|
41
|
+
0: "0";
|
|
42
|
+
1: "1";
|
|
43
|
+
2: "2";
|
|
44
|
+
4: "4";
|
|
45
|
+
8: "8";
|
|
46
|
+
}>;
|
|
47
|
+
declare const radiusToken: z.ZodEnum<{
|
|
48
|
+
0: "0";
|
|
49
|
+
px: "px";
|
|
50
|
+
0.5: "0.5";
|
|
51
|
+
1: "1";
|
|
52
|
+
1.5: "1.5";
|
|
53
|
+
2: "2";
|
|
54
|
+
2.5: "2.5";
|
|
55
|
+
3: "3";
|
|
56
|
+
3.5: "3.5";
|
|
57
|
+
4: "4";
|
|
58
|
+
5: "5";
|
|
59
|
+
6: "6";
|
|
60
|
+
7: "7";
|
|
61
|
+
8: "8";
|
|
62
|
+
9: "9";
|
|
63
|
+
10: "10";
|
|
64
|
+
11: "11";
|
|
65
|
+
12: "12";
|
|
66
|
+
14: "14";
|
|
67
|
+
16: "16";
|
|
68
|
+
none: "none";
|
|
69
|
+
sm: "sm";
|
|
70
|
+
md: "md";
|
|
71
|
+
lg: "lg";
|
|
72
|
+
xl: "xl";
|
|
73
|
+
"2xl": "2xl";
|
|
74
|
+
"3xl": "3xl";
|
|
75
|
+
full: "full";
|
|
76
|
+
}>;
|
|
77
|
+
declare const textSizeToken: z.ZodEnum<{
|
|
78
|
+
sm: "sm";
|
|
79
|
+
lg: "lg";
|
|
80
|
+
xl: "xl";
|
|
81
|
+
"2xl": "2xl";
|
|
82
|
+
"3xl": "3xl";
|
|
83
|
+
xs: "xs";
|
|
84
|
+
base: "base";
|
|
85
|
+
"4xl": "4xl";
|
|
86
|
+
"5xl": "5xl";
|
|
87
|
+
"6xl": "6xl";
|
|
88
|
+
}>;
|
|
89
|
+
declare const leadingToken: z.ZodEnum<{
|
|
90
|
+
3: "3";
|
|
91
|
+
4: "4";
|
|
92
|
+
5: "5";
|
|
93
|
+
6: "6";
|
|
94
|
+
7: "7";
|
|
95
|
+
8: "8";
|
|
96
|
+
9: "9";
|
|
97
|
+
10: "10";
|
|
98
|
+
none: "none";
|
|
99
|
+
tight: "tight";
|
|
100
|
+
snug: "snug";
|
|
101
|
+
normal: "normal";
|
|
102
|
+
relaxed: "relaxed";
|
|
103
|
+
loose: "loose";
|
|
104
|
+
}>;
|
|
105
|
+
declare const trackingToken: z.ZodEnum<{
|
|
106
|
+
tight: "tight";
|
|
107
|
+
normal: "normal";
|
|
108
|
+
tighter: "tighter";
|
|
109
|
+
wide: "wide";
|
|
110
|
+
wider: "wider";
|
|
111
|
+
widest: "widest";
|
|
112
|
+
}>;
|
|
113
|
+
/** Spacing / size: Tailwind token or a legacy CSS length. */
|
|
114
|
+
export declare const lengthValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
115
|
+
0: "0";
|
|
116
|
+
px: "px";
|
|
117
|
+
0.5: "0.5";
|
|
118
|
+
1: "1";
|
|
119
|
+
1.5: "1.5";
|
|
120
|
+
2: "2";
|
|
121
|
+
2.5: "2.5";
|
|
122
|
+
3: "3";
|
|
123
|
+
3.5: "3.5";
|
|
124
|
+
4: "4";
|
|
125
|
+
5: "5";
|
|
126
|
+
6: "6";
|
|
127
|
+
7: "7";
|
|
128
|
+
8: "8";
|
|
129
|
+
9: "9";
|
|
130
|
+
10: "10";
|
|
131
|
+
11: "11";
|
|
132
|
+
12: "12";
|
|
133
|
+
14: "14";
|
|
134
|
+
16: "16";
|
|
135
|
+
20: "20";
|
|
136
|
+
24: "24";
|
|
137
|
+
28: "28";
|
|
138
|
+
32: "32";
|
|
139
|
+
36: "36";
|
|
140
|
+
40: "40";
|
|
141
|
+
44: "44";
|
|
142
|
+
48: "48";
|
|
143
|
+
52: "52";
|
|
144
|
+
56: "56";
|
|
145
|
+
60: "60";
|
|
146
|
+
64: "64";
|
|
147
|
+
72: "72";
|
|
148
|
+
80: "80";
|
|
149
|
+
96: "96";
|
|
150
|
+
auto: "auto";
|
|
151
|
+
}>, z.ZodEnum<{
|
|
152
|
+
0: "0";
|
|
153
|
+
px: "px";
|
|
154
|
+
0.5: "0.5";
|
|
155
|
+
1: "1";
|
|
156
|
+
1.5: "1.5";
|
|
157
|
+
2: "2";
|
|
158
|
+
2.5: "2.5";
|
|
159
|
+
3: "3";
|
|
160
|
+
3.5: "3.5";
|
|
161
|
+
4: "4";
|
|
162
|
+
5: "5";
|
|
163
|
+
6: "6";
|
|
164
|
+
7: "7";
|
|
165
|
+
8: "8";
|
|
166
|
+
9: "9";
|
|
167
|
+
10: "10";
|
|
168
|
+
11: "11";
|
|
169
|
+
12: "12";
|
|
170
|
+
14: "14";
|
|
171
|
+
16: "16";
|
|
172
|
+
none: "none";
|
|
173
|
+
sm: "sm";
|
|
174
|
+
md: "md";
|
|
175
|
+
lg: "lg";
|
|
176
|
+
xl: "xl";
|
|
177
|
+
"2xl": "2xl";
|
|
178
|
+
"3xl": "3xl";
|
|
179
|
+
full: "full";
|
|
180
|
+
}>, z.ZodString]>;
|
|
181
|
+
/** Border width: Tailwind token or a legacy CSS length. */
|
|
182
|
+
export declare const borderWidthValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
183
|
+
0: "0";
|
|
184
|
+
1: "1";
|
|
185
|
+
2: "2";
|
|
186
|
+
4: "4";
|
|
187
|
+
8: "8";
|
|
188
|
+
}>, z.ZodString]>;
|
|
189
|
+
/** Text size: Tailwind token, legacy pixel number, or CSS length. */
|
|
190
|
+
export declare const textSizeValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
191
|
+
sm: "sm";
|
|
192
|
+
lg: "lg";
|
|
193
|
+
xl: "xl";
|
|
194
|
+
"2xl": "2xl";
|
|
195
|
+
"3xl": "3xl";
|
|
196
|
+
xs: "xs";
|
|
197
|
+
base: "base";
|
|
198
|
+
"4xl": "4xl";
|
|
199
|
+
"5xl": "5xl";
|
|
200
|
+
"6xl": "6xl";
|
|
201
|
+
}>, z.ZodNumber, z.ZodString]>;
|
|
202
|
+
export declare const lineHeightValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
203
|
+
3: "3";
|
|
204
|
+
4: "4";
|
|
205
|
+
5: "5";
|
|
206
|
+
6: "6";
|
|
207
|
+
7: "7";
|
|
208
|
+
8: "8";
|
|
209
|
+
9: "9";
|
|
210
|
+
10: "10";
|
|
211
|
+
none: "none";
|
|
212
|
+
tight: "tight";
|
|
213
|
+
snug: "snug";
|
|
214
|
+
normal: "normal";
|
|
215
|
+
relaxed: "relaxed";
|
|
216
|
+
loose: "loose";
|
|
217
|
+
}>, z.ZodString]>;
|
|
218
|
+
export declare const letterSpacingValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
219
|
+
tight: "tight";
|
|
220
|
+
normal: "normal";
|
|
221
|
+
tighter: "tighter";
|
|
222
|
+
wide: "wide";
|
|
223
|
+
wider: "wider";
|
|
224
|
+
widest: "widest";
|
|
225
|
+
}>, z.ZodString]>;
|
|
226
|
+
declare const hexColor: z.ZodObject<{
|
|
227
|
+
hex: z.ZodString;
|
|
228
|
+
opacity: z.ZodNumber;
|
|
229
|
+
}, z.core.$strict>;
|
|
230
|
+
declare const paletteColor: z.ZodObject<{
|
|
231
|
+
name: z.ZodEnum<{
|
|
232
|
+
accent: "accent";
|
|
233
|
+
transparent: "transparent";
|
|
234
|
+
white: "white";
|
|
235
|
+
black: "black";
|
|
236
|
+
"slate-50": "slate-50";
|
|
237
|
+
"slate-100": "slate-100";
|
|
238
|
+
"slate-200": "slate-200";
|
|
239
|
+
"slate-300": "slate-300";
|
|
240
|
+
"slate-400": "slate-400";
|
|
241
|
+
"slate-500": "slate-500";
|
|
242
|
+
"slate-600": "slate-600";
|
|
243
|
+
"slate-700": "slate-700";
|
|
244
|
+
"slate-800": "slate-800";
|
|
245
|
+
"slate-900": "slate-900";
|
|
246
|
+
"slate-950": "slate-950";
|
|
247
|
+
}>;
|
|
248
|
+
opacity: z.ZodNumber;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
/** Palette token or legacy hex color. */
|
|
251
|
+
export declare const colorValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
252
|
+
name: z.ZodEnum<{
|
|
253
|
+
accent: "accent";
|
|
254
|
+
transparent: "transparent";
|
|
255
|
+
white: "white";
|
|
256
|
+
black: "black";
|
|
257
|
+
"slate-50": "slate-50";
|
|
258
|
+
"slate-100": "slate-100";
|
|
259
|
+
"slate-200": "slate-200";
|
|
260
|
+
"slate-300": "slate-300";
|
|
261
|
+
"slate-400": "slate-400";
|
|
262
|
+
"slate-500": "slate-500";
|
|
263
|
+
"slate-600": "slate-600";
|
|
264
|
+
"slate-700": "slate-700";
|
|
265
|
+
"slate-800": "slate-800";
|
|
266
|
+
"slate-900": "slate-900";
|
|
267
|
+
"slate-950": "slate-950";
|
|
268
|
+
}>;
|
|
269
|
+
opacity: z.ZodNumber;
|
|
270
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
271
|
+
hex: z.ZodString;
|
|
272
|
+
opacity: z.ZodNumber;
|
|
273
|
+
}, z.core.$strict>]>;
|
|
274
|
+
export { spacingToken, borderWidthToken, radiusToken, textSizeToken, leadingToken, trackingToken, hexColor, paletteColor, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One entry of a repeating text value: a list item, an option, or a column heading. */
|
|
3
|
+
export type TextItem = {
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function textItemsSchema(emptyListMessage: string, blankItemMessage: string): z.ZodArray<z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
/** Keeps only `text`, dropping keys the editor adds to array items. */
|
|
10
|
+
export declare function toTextItems(items: readonly TextItem[]): TextItem[];
|