uidl-runtime 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +175 -0
- package/bin/validate.mjs +44 -0
- package/dist/actions/eventBus.d.ts +7 -0
- package/dist/actions/index.d.ts +5 -0
- package/dist/actions/interpreter.d.ts +54 -0
- package/dist/compiler/dashboard.d.ts +10 -0
- package/dist/compiler/form.d.ts +22 -0
- package/dist/compiler/index.d.ts +16 -0
- package/dist/compiler/list.d.ts +20 -0
- package/dist/compiler/report.d.ts +10 -0
- package/dist/compiler/settings.d.ts +10 -0
- package/dist/compiler/tree.d.ts +10 -0
- package/dist/compiler/types.d.ts +315 -0
- package/dist/compiler/wizard.d.ts +10 -0
- package/dist/components/BarcodeAndQRCode.d.ts +29 -0
- package/dist/components/charts.d.ts +66 -0
- package/dist/components/iconPaths.d.ts +5 -0
- package/dist/components/icons.d.ts +31 -0
- package/dist/components/primitives.d.ts +411 -0
- package/dist/data/adapters/http.d.ts +37 -0
- package/dist/data/adapters/inMemory.d.ts +62 -0
- package/dist/data/errors.d.ts +15 -0
- package/dist/data/index.d.ts +7 -0
- package/dist/data/testing/mockHttpServer.d.ts +16 -0
- package/dist/data/types.d.ts +74 -0
- package/dist/editor/Canvas.d.ts +22 -0
- package/dist/editor/Editor.d.ts +18 -0
- package/dist/editor/LayerTree.d.ts +12 -0
- package/dist/editor/PropertyPanel.d.ts +7 -0
- package/dist/editor/StylePanel.d.ts +7 -0
- package/dist/editor/ValidationStatus.d.ts +9 -0
- package/dist/editor/WidgetPalette.d.ts +6 -0
- package/dist/editor/document.d.ts +10 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/store.d.ts +46 -0
- package/dist/expr/evaluate.d.ts +51 -0
- package/dist/hooks/useElementWidth.d.ts +14 -0
- package/dist/index.d.ts +61 -0
- package/dist/registry/defaults.d.ts +2 -0
- package/dist/registry/registry.d.ts +4 -0
- package/dist/renderer/RenderNode.d.ts +16 -0
- package/dist/renderer/UIDocumentRenderer.d.ts +13 -0
- package/dist/renderer/instantiateComponent.d.ts +18 -0
- package/dist/renderer/renderDocument.d.ts +63 -0
- package/dist/schema/action.schema.json +515 -0
- package/dist/schema/design-tokens.schema.json +51 -0
- package/dist/schema/jsonSchema.d.ts +11 -0
- package/dist/schema/theme-presets.schema.json +952 -0
- package/dist/schema/uidl-document.schema.json +187 -0
- package/dist/schemas/actions.d.ts +5 -0
- package/dist/schemas/document.d.ts +35 -0
- package/dist/schemas/theme.d.ts +260 -0
- package/dist/services/aiPromptGenerator.d.ts +11 -0
- package/dist/state/createDocumentState.d.ts +18 -0
- package/dist/state/dataSources.d.ts +58 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/style.css +2 -0
- package/dist/theme/engine.d.ts +9 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/meridianPreset.d.ts +5 -0
- package/dist/theme/presets.d.ts +5 -0
- package/dist/theme/registry.d.ts +15 -0
- package/dist/theme/serialize.d.ts +5 -0
- package/dist/theme/tailwind.d.ts +11 -0
- package/dist/types/actions.d.ts +116 -0
- package/dist/types/editor.d.ts +45 -0
- package/dist/types/index.d.ts +82 -0
- package/dist/types/theme.d.ts +95 -0
- package/dist/uidl-runtime.js +98 -0
- package/dist/uidl-runtime.js.map +1 -0
- package/dist/uidl-runtime.mjs +17779 -0
- package/dist/uidl-runtime.mjs.map +1 -0
- package/dist/utils/chart.d.ts +12 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/formLayout.d.ts +93 -0
- package/dist/utils/i18n.d.ts +132 -0
- package/dist/utils/listCell.d.ts +21 -0
- package/dist/utils/responsive.d.ts +3 -0
- package/dist/utils/tailwind.d.ts +23 -0
- package/dist/validate/validateResponsive.d.ts +7 -0
- package/dist/version.d.ts +10 -0
- package/package.json +109 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"id": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"route": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"theme": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"state": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"propertyNames": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": {}
|
|
29
|
+
},
|
|
30
|
+
"dataSources": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"propertyNames": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": {}
|
|
36
|
+
},
|
|
37
|
+
"definitions": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"propertyNames": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": {
|
|
43
|
+
"$ref": "#/$defs/__schema0"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"root": {
|
|
47
|
+
"$ref": "#/$defs/__schema0"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"version",
|
|
52
|
+
"id",
|
|
53
|
+
"name",
|
|
54
|
+
"root"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"$defs": {
|
|
58
|
+
"__schema0": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"id": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"type": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"name": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"props": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"propertyNames": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": {}
|
|
76
|
+
},
|
|
77
|
+
"style": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"propertyNames": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"additionalProperties": {}
|
|
83
|
+
},
|
|
84
|
+
"children": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"$ref": "#/$defs/__schema0"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"slots": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"propertyNames": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"additionalProperties": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"$ref": "#/$defs/__schema0"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"responsive": {
|
|
103
|
+
"description": "DEPRECATED: responsive overrides are migrating into style values. This field is preserved for backward compatibility only.",
|
|
104
|
+
"type": "object",
|
|
105
|
+
"propertyNames": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"additionalProperties": {}
|
|
109
|
+
},
|
|
110
|
+
"visibility": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"condition": {},
|
|
114
|
+
"breakpoints": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": [
|
|
119
|
+
"mobile",
|
|
120
|
+
"tablet",
|
|
121
|
+
"desktop",
|
|
122
|
+
"wide"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
},
|
|
129
|
+
"bindings": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"propertyNames": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"additionalProperties": {}
|
|
135
|
+
},
|
|
136
|
+
"events": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"propertyNames": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"additionalProperties": {}
|
|
142
|
+
},
|
|
143
|
+
"repeat": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"properties": {
|
|
146
|
+
"dataSource": {
|
|
147
|
+
"anyOf": [
|
|
148
|
+
{
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": {}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "string"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"itemName": {
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"useIndex": {
|
|
161
|
+
"type": "boolean"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"additionalProperties": false
|
|
165
|
+
},
|
|
166
|
+
"ref": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"componentId": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
"themeRef": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"testId": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": [
|
|
180
|
+
"id",
|
|
181
|
+
"type"
|
|
182
|
+
],
|
|
183
|
+
"additionalProperties": false
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"$id": "https://uidl-runtime.local/schema/uidl-document.schema.json"
|
|
187
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Action } from '../types/actions';
|
|
3
|
+
export declare const ActionSchema: z.ZodType<Action>;
|
|
4
|
+
export declare const ActionsSchema: z.ZodArray<z.ZodType<Action, unknown, z.core.$ZodTypeInternals<Action, unknown>>>;
|
|
5
|
+
export type ActionInput = z.input<typeof ActionSchema>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UIDLNode, DesignTokens } from '../types';
|
|
3
|
+
export declare const ResponsiveValueSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
4
|
+
export declare const VisibilitySchema: z.ZodObject<{
|
|
5
|
+
condition: z.ZodOptional<z.ZodUnknown>;
|
|
6
|
+
breakpoints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
7
|
+
mobile: "mobile";
|
|
8
|
+
tablet: "tablet";
|
|
9
|
+
desktop: "desktop";
|
|
10
|
+
wide: "wide";
|
|
11
|
+
}>>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const RepeatSchema: z.ZodObject<{
|
|
14
|
+
dataSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodString]>>;
|
|
15
|
+
itemName: z.ZodOptional<z.ZodString>;
|
|
16
|
+
useIndex: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const NodeSchema: z.ZodType<UIDLNode>;
|
|
19
|
+
export declare const ThemePresetsSchema: z.ZodArray<z.ZodType<import('..').ThemePreset, unknown, z.core.$ZodTypeInternals<import('..').ThemePreset, unknown>>>;
|
|
20
|
+
export declare const DocumentSchema: z.ZodObject<{
|
|
21
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
22
|
+
version: z.ZodString;
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
route: z.ZodOptional<z.ZodString>;
|
|
26
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
27
|
+
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
dataSources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<UIDLNode, unknown, z.core.$ZodTypeInternals<UIDLNode, unknown>>>>;
|
|
30
|
+
root: z.ZodType<UIDLNode, unknown, z.core.$ZodTypeInternals<UIDLNode, unknown>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const DesignTokensSchema: z.ZodType<DesignTokens>;
|
|
33
|
+
export type DocumentInput = z.input<typeof DocumentSchema>;
|
|
34
|
+
export type NodeInput = z.input<typeof NodeSchema>;
|
|
35
|
+
export type ThemePresetsInput = z.input<typeof ThemePresetsSchema>;
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Theme, ThemePreset, PrimitiveTokens, SemanticTokens } from '../types/theme';
|
|
3
|
+
export declare const TypographyTokenSchema: z.ZodObject<{
|
|
4
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
5
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
6
|
+
fontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
7
|
+
lineHeight: z.ZodOptional<z.ZodString>;
|
|
8
|
+
letterSpacing: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const StyleIntentSchema: z.ZodObject<{
|
|
11
|
+
gap: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
12
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
13
|
+
}, z.core.$strip>]>>;
|
|
14
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
15
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
16
|
+
}, z.core.$strip>]>>;
|
|
17
|
+
paddingTop: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
18
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
19
|
+
}, z.core.$strip>]>>;
|
|
20
|
+
paddingRight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
21
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
22
|
+
}, z.core.$strip>]>>;
|
|
23
|
+
paddingBottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
24
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
25
|
+
}, z.core.$strip>]>>;
|
|
26
|
+
paddingLeft: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
27
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
28
|
+
}, z.core.$strip>]>>;
|
|
29
|
+
margin: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
30
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
31
|
+
}, z.core.$strip>]>>;
|
|
32
|
+
marginTop: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
33
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
34
|
+
}, z.core.$strip>]>>;
|
|
35
|
+
marginRight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
36
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
37
|
+
}, z.core.$strip>]>>;
|
|
38
|
+
marginBottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
39
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
40
|
+
}, z.core.$strip>]>>;
|
|
41
|
+
marginLeft: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
42
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
43
|
+
}, z.core.$strip>]>>;
|
|
44
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
45
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
46
|
+
}, z.core.$strip>]>>;
|
|
47
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
48
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
49
|
+
}, z.core.$strip>]>>;
|
|
50
|
+
minWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
51
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
52
|
+
}, z.core.$strip>]>>;
|
|
53
|
+
maxWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
54
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
55
|
+
}, z.core.$strip>]>>;
|
|
56
|
+
minHeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
57
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
58
|
+
}, z.core.$strip>]>>;
|
|
59
|
+
maxHeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
60
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
61
|
+
}, z.core.$strip>]>>;
|
|
62
|
+
flexDirection: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"row" | "column" | "row-reverse" | "column-reverse", unknown, z.core.$ZodTypeInternals<"row" | "column" | "row-reverse" | "column-reverse", unknown>>, z.ZodObject<{
|
|
63
|
+
base: z.ZodOptional<z.ZodType<"row" | "column" | "row-reverse" | "column-reverse", unknown, z.core.$ZodTypeInternals<"row" | "column" | "row-reverse" | "column-reverse", unknown>>>;
|
|
64
|
+
}, z.core.$strip>]>>;
|
|
65
|
+
justifyContent: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown>>, z.ZodObject<{
|
|
66
|
+
base: z.ZodOptional<z.ZodType<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown>>>;
|
|
67
|
+
}, z.core.$strip>]>>;
|
|
68
|
+
alignItems: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"start" | "center" | "end" | "stretch" | "baseline", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "stretch" | "baseline", unknown>>, z.ZodObject<{
|
|
69
|
+
base: z.ZodOptional<z.ZodType<"start" | "center" | "end" | "stretch" | "baseline", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "stretch" | "baseline", unknown>>>;
|
|
70
|
+
}, z.core.$strip>]>>;
|
|
71
|
+
display: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
72
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
73
|
+
}, z.core.$strip>]>>;
|
|
74
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown, z.core.$ZodTypeInternals<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown>>, z.ZodObject<{
|
|
75
|
+
base: z.ZodOptional<z.ZodType<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown, z.core.$ZodTypeInternals<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown>>>;
|
|
76
|
+
}, z.core.$strip>]>>;
|
|
77
|
+
inset: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
78
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
79
|
+
}, z.core.$strip>]>>;
|
|
80
|
+
top: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
81
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
82
|
+
}, z.core.$strip>]>>;
|
|
83
|
+
right: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
84
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
85
|
+
}, z.core.$strip>]>>;
|
|
86
|
+
bottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
87
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
88
|
+
}, z.core.$strip>]>>;
|
|
89
|
+
left: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
90
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
91
|
+
}, z.core.$strip>]>>;
|
|
92
|
+
zIndex: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>, z.ZodObject<{
|
|
93
|
+
base: z.ZodOptional<z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
94
|
+
}, z.core.$strip>]>>;
|
|
95
|
+
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
96
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
97
|
+
}, z.core.$strip>]>>;
|
|
98
|
+
color: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
99
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
100
|
+
}, z.core.$strip>]>>;
|
|
101
|
+
fontSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
102
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
103
|
+
}, z.core.$strip>]>>;
|
|
104
|
+
fontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string | number, unknown, z.core.$ZodTypeInternals<string | number, unknown>>, z.ZodObject<{
|
|
105
|
+
base: z.ZodOptional<z.ZodType<string | number, unknown, z.core.$ZodTypeInternals<string | number, unknown>>>;
|
|
106
|
+
}, z.core.$strip>]>>;
|
|
107
|
+
lineHeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
108
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
109
|
+
}, z.core.$strip>]>>;
|
|
110
|
+
letterSpacing: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
111
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
112
|
+
}, z.core.$strip>]>>;
|
|
113
|
+
borderRadius: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
114
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
115
|
+
}, z.core.$strip>]>>;
|
|
116
|
+
borderWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
117
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
118
|
+
}, z.core.$strip>]>>;
|
|
119
|
+
borderColor: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
120
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
121
|
+
}, z.core.$strip>]>>;
|
|
122
|
+
shadow: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
123
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
124
|
+
}, z.core.$strip>]>>;
|
|
125
|
+
opacity: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>, z.ZodObject<{
|
|
126
|
+
base: z.ZodOptional<z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
127
|
+
}, z.core.$strip>]>>;
|
|
128
|
+
typography: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export declare const ComponentVariantSchema: z.ZodObject<{
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
133
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
gap: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
135
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
136
|
+
}, z.core.$strip>]>>;
|
|
137
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
138
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
139
|
+
}, z.core.$strip>]>>;
|
|
140
|
+
paddingTop: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
141
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
142
|
+
}, z.core.$strip>]>>;
|
|
143
|
+
paddingRight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
144
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
145
|
+
}, z.core.$strip>]>>;
|
|
146
|
+
paddingBottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
147
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
148
|
+
}, z.core.$strip>]>>;
|
|
149
|
+
paddingLeft: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
150
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
151
|
+
}, z.core.$strip>]>>;
|
|
152
|
+
margin: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
153
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
154
|
+
}, z.core.$strip>]>>;
|
|
155
|
+
marginTop: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
156
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
157
|
+
}, z.core.$strip>]>>;
|
|
158
|
+
marginRight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
159
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
160
|
+
}, z.core.$strip>]>>;
|
|
161
|
+
marginBottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
162
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
163
|
+
}, z.core.$strip>]>>;
|
|
164
|
+
marginLeft: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
165
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
166
|
+
}, z.core.$strip>]>>;
|
|
167
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
168
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
169
|
+
}, z.core.$strip>]>>;
|
|
170
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
171
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
172
|
+
}, z.core.$strip>]>>;
|
|
173
|
+
minWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
174
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
175
|
+
}, z.core.$strip>]>>;
|
|
176
|
+
maxWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
177
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
178
|
+
}, z.core.$strip>]>>;
|
|
179
|
+
minHeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
180
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
181
|
+
}, z.core.$strip>]>>;
|
|
182
|
+
maxHeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
183
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
184
|
+
}, z.core.$strip>]>>;
|
|
185
|
+
flexDirection: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"row" | "column" | "row-reverse" | "column-reverse", unknown, z.core.$ZodTypeInternals<"row" | "column" | "row-reverse" | "column-reverse", unknown>>, z.ZodObject<{
|
|
186
|
+
base: z.ZodOptional<z.ZodType<"row" | "column" | "row-reverse" | "column-reverse", unknown, z.core.$ZodTypeInternals<"row" | "column" | "row-reverse" | "column-reverse", unknown>>>;
|
|
187
|
+
}, z.core.$strip>]>>;
|
|
188
|
+
justifyContent: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown>>, z.ZodObject<{
|
|
189
|
+
base: z.ZodOptional<z.ZodType<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "space-between" | "space-around" | "space-evenly", unknown>>>;
|
|
190
|
+
}, z.core.$strip>]>>;
|
|
191
|
+
alignItems: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"start" | "center" | "end" | "stretch" | "baseline", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "stretch" | "baseline", unknown>>, z.ZodObject<{
|
|
192
|
+
base: z.ZodOptional<z.ZodType<"start" | "center" | "end" | "stretch" | "baseline", unknown, z.core.$ZodTypeInternals<"start" | "center" | "end" | "stretch" | "baseline", unknown>>>;
|
|
193
|
+
}, z.core.$strip>]>>;
|
|
194
|
+
display: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
195
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
196
|
+
}, z.core.$strip>]>>;
|
|
197
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown, z.core.$ZodTypeInternals<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown>>, z.ZodObject<{
|
|
198
|
+
base: z.ZodOptional<z.ZodType<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown, z.core.$ZodTypeInternals<"static" | "relative" | "absolute" | "fixed" | "sticky", unknown>>>;
|
|
199
|
+
}, z.core.$strip>]>>;
|
|
200
|
+
inset: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
201
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
202
|
+
}, z.core.$strip>]>>;
|
|
203
|
+
top: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
204
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
205
|
+
}, z.core.$strip>]>>;
|
|
206
|
+
right: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
207
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
208
|
+
}, z.core.$strip>]>>;
|
|
209
|
+
bottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
210
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
211
|
+
}, z.core.$strip>]>>;
|
|
212
|
+
left: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
213
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
214
|
+
}, z.core.$strip>]>>;
|
|
215
|
+
zIndex: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>, z.ZodObject<{
|
|
216
|
+
base: z.ZodOptional<z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
217
|
+
}, z.core.$strip>]>>;
|
|
218
|
+
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
219
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
220
|
+
}, z.core.$strip>]>>;
|
|
221
|
+
color: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
222
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
223
|
+
}, z.core.$strip>]>>;
|
|
224
|
+
fontSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
225
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
226
|
+
}, z.core.$strip>]>>;
|
|
227
|
+
fontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string | number, unknown, z.core.$ZodTypeInternals<string | number, unknown>>, z.ZodObject<{
|
|
228
|
+
base: z.ZodOptional<z.ZodType<string | number, unknown, z.core.$ZodTypeInternals<string | number, unknown>>>;
|
|
229
|
+
}, z.core.$strip>]>>;
|
|
230
|
+
lineHeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
231
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
232
|
+
}, z.core.$strip>]>>;
|
|
233
|
+
letterSpacing: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
234
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
235
|
+
}, z.core.$strip>]>>;
|
|
236
|
+
borderRadius: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
237
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
238
|
+
}, z.core.$strip>]>>;
|
|
239
|
+
borderWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
240
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
241
|
+
}, z.core.$strip>]>>;
|
|
242
|
+
borderColor: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
243
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
244
|
+
}, z.core.$strip>]>>;
|
|
245
|
+
shadow: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>, z.ZodObject<{
|
|
246
|
+
base: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
247
|
+
}, z.core.$strip>]>>;
|
|
248
|
+
opacity: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>, z.ZodObject<{
|
|
249
|
+
base: z.ZodOptional<z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
250
|
+
}, z.core.$strip>]>>;
|
|
251
|
+
typography: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
className: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
export declare const PrimitiveTokensSchema: z.ZodType<PrimitiveTokens>;
|
|
256
|
+
export declare const SemanticTokensSchema: z.ZodType<SemanticTokens>;
|
|
257
|
+
export declare const ThemeSchema: z.ZodType<Theme>;
|
|
258
|
+
export declare const ThemePresetSchema: z.ZodType<ThemePreset>;
|
|
259
|
+
export type ThemeInput = z.input<typeof ThemeSchema>;
|
|
260
|
+
export type ThemePresetInput = z.input<typeof ThemePresetSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UIDLDocument } from '../types';
|
|
2
|
+
export interface AIPromptTemplate {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
category: string;
|
|
6
|
+
document: UIDLDocument;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Service that analyzes natural language prompts and generates schema-compliant UIDL documents.
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateUidlFromPrompt(prompt: string): UIDLDocument;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface DocumentStateStore {
|
|
2
|
+
state: Record<string, unknown>;
|
|
3
|
+
setState: (path: string, value: unknown) => void;
|
|
4
|
+
getValue: (path?: string) => unknown;
|
|
5
|
+
resetState: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Subscribe to state changes (fires after every setState/resetState). Returns an
|
|
8
|
+
* unsubscribe function. Used by UIDocumentRenderer so documents bound to
|
|
9
|
+
* `state.*` re-render when an action (e.g. a `setState` wired to an overlay's
|
|
10
|
+
* `onClose`) mutates the store — without this, state-bound props like
|
|
11
|
+
* `open: { "$bind": "state.overlays.x" }` would render once and never update.
|
|
12
|
+
*/
|
|
13
|
+
subscribe: (listener: () => void) => () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createDocumentState(initialState?: Record<string, unknown>): import('zustand').UseBoundStore<import('zustand').StoreApi<DocumentStateStore>>;
|
|
16
|
+
export type DocumentStateHook = ReturnType<typeof createDocumentState>;
|
|
17
|
+
export declare function getByPath(obj: Record<string, unknown>, path: string): unknown;
|
|
18
|
+
export declare function setByPath(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DataAdapter, Query } from '../data/types';
|
|
2
|
+
import { DocumentStateStore } from './createDocumentState';
|
|
3
|
+
export interface DataSourceResolver {
|
|
4
|
+
resolve(sourceName: string, config: unknown): unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface DataSourceContext {
|
|
7
|
+
sources: Record<string, unknown>;
|
|
8
|
+
resolver: DataSourceResolver;
|
|
9
|
+
}
|
|
10
|
+
export declare function createInlineArrayResolver(): DataSourceResolver;
|
|
11
|
+
export interface QueryDataSource {
|
|
12
|
+
$query: {
|
|
13
|
+
collection: string;
|
|
14
|
+
filters?: Array<{
|
|
15
|
+
field: string;
|
|
16
|
+
op: string;
|
|
17
|
+
value: unknown;
|
|
18
|
+
}>;
|
|
19
|
+
sort?: Array<{
|
|
20
|
+
field: string;
|
|
21
|
+
dir: "asc" | "desc";
|
|
22
|
+
}>;
|
|
23
|
+
page?: {
|
|
24
|
+
number?: unknown;
|
|
25
|
+
size?: unknown;
|
|
26
|
+
};
|
|
27
|
+
search?: unknown;
|
|
28
|
+
fields?: string[];
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export declare function isQueryDataSource(value: unknown): value is QueryDataSource;
|
|
32
|
+
export interface BindScope {
|
|
33
|
+
state?: Record<string, unknown>;
|
|
34
|
+
session?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export declare function resolveQueryDescriptor(descriptor: QueryDataSource, scope: BindScope): Query;
|
|
37
|
+
export type DataSourceStatus = "idle" | "loading" | "success" | "error";
|
|
38
|
+
export interface RunDataSourcesOptions {
|
|
39
|
+
adapter: DataAdapter;
|
|
40
|
+
stateStore: DocumentStateStore;
|
|
41
|
+
session?: Record<string, unknown>;
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Runs every `$query` entry in `dataSources` against `adapter`, writing
|
|
46
|
+
* `state.$data.<name>.{status,rows,total,error}` as each settles. Inline array entries are
|
|
47
|
+
* untouched (they resolve synchronously elsewhere, as they always have). Errors are normalized
|
|
48
|
+
* to `DataError` shape before being written, so a document's `visibility.condition` on
|
|
49
|
+
* `state.$data.<name>.error.code` behaves the same whether the adapter is in-memory or HTTP.
|
|
50
|
+
*
|
|
51
|
+
* A caller that re-invokes this on every state change (as `UIDocumentRenderer` does) must diff
|
|
52
|
+
* the *resolved* query per name against the previous run before calling — this function itself
|
|
53
|
+
* does not debounce or dedupe, so re-running it with an unchanged query re-fetches unconditionally.
|
|
54
|
+
*/
|
|
55
|
+
export declare function runDataSources(dataSources: Record<string, unknown> | undefined, options: RunDataSourcesOptions): Promise<void>;
|
|
56
|
+
/** Serializes the resolved (post-`$bind`) query per `$query` data source, for a caller to diff
|
|
57
|
+
* against the previous run and decide which entries actually need re-fetching. */
|
|
58
|
+
export declare function serializeResolvedQueries(dataSources: Record<string, unknown> | undefined, scope: BindScope): Record<string, string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createDocumentState, getByPath, setByPath } from './createDocumentState';
|
|
2
|
+
export type { DocumentStateStore } from './createDocumentState';
|
|
3
|
+
export { createInlineArrayResolver, isQueryDataSource, resolveQueryDescriptor, runDataSources, serializeResolvedQueries } from './dataSources';
|
|
4
|
+
export type { DataSourceResolver, DataSourceContext, QueryDataSource, BindScope, DataSourceStatus, RunDataSourcesOptions } from './dataSources';
|