@kubuild/schema 0.8.0 → 0.8.2
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/actions.d.cts +473 -0
- package/dist/actions.d.cts.map +1 -0
- package/dist/breakpoints.d.cts +35 -0
- package/dist/breakpoints.d.cts.map +1 -0
- package/dist/builtin-components.d.cts +17 -0
- package/dist/builtin-components.d.cts.map +1 -0
- package/dist/canonical-props.d.cts +39 -0
- package/dist/canonical-props.d.cts.map +1 -0
- package/dist/chunk-IXTL6BV4.js +1041 -0
- package/dist/chunk-IXTL6BV4.js.map +1 -0
- package/dist/document.d.cts +742 -0
- package/dist/document.d.cts.map +1 -0
- package/dist/document.d.ts +2 -2
- package/dist/document.d.ts.map +1 -1
- package/dist/fixtures.d.cts +3 -0
- package/dist/fixtures.d.cts.map +1 -0
- package/dist/fixtures.d.ts +1 -1
- package/dist/fixtures.d.ts.map +1 -1
- package/dist/form.d.cts +129 -0
- package/dist/form.d.cts.map +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/json-schema.d.cts +2066 -0
- package/dist/json-schema.d.cts.map +1 -0
- package/dist/manifest.d.cts +28 -0
- package/dist/manifest.d.cts.map +1 -0
- package/dist/template.d.cts +213 -0
- package/dist/template.d.cts.map +1 -0
- package/dist/template.d.ts +2 -2
- package/dist/template.d.ts.map +1 -1
- package/dist/theme.d.cts +80 -0
- package/dist/theme.d.cts.map +1 -0
- package/dist/tracking.d.cts +348 -0
- package/dist/tracking.d.cts.map +1 -0
- package/dist/types.d.cts +331 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/validate.cjs.map +1 -1
- package/dist/validate.d.cts +16 -0
- package/dist/validate.d.cts.map +1 -0
- package/dist/validate.d.ts +2 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +1 -1
- package/dist/validate.js.map +1 -1
- package/package.json +26 -11
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Action Trigger Types
|
|
4
|
+
* Events in the DOM or component lifecycle that can trigger an action pipeline.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ActionTriggerTypeSchema: z.ZodEnum<{
|
|
7
|
+
load: "load";
|
|
8
|
+
change: "change";
|
|
9
|
+
blur: "blur";
|
|
10
|
+
click: "click";
|
|
11
|
+
focus: "focus";
|
|
12
|
+
submit: "submit";
|
|
13
|
+
expire: "expire";
|
|
14
|
+
}>;
|
|
15
|
+
export type ActionTriggerType = z.infer<typeof ActionTriggerTypeSchema>;
|
|
16
|
+
export type ActionTrigger = ActionTriggerType;
|
|
17
|
+
export declare const ActionTriggerSchema: z.ZodEnum<{
|
|
18
|
+
load: "load";
|
|
19
|
+
change: "change";
|
|
20
|
+
blur: "blur";
|
|
21
|
+
click: "click";
|
|
22
|
+
focus: "focus";
|
|
23
|
+
submit: "submit";
|
|
24
|
+
expire: "expire";
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Action Step Types
|
|
28
|
+
* Discrete operations executed sequentially or conditionally within an action pipeline.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ActionStepTypeSchema: z.ZodEnum<{
|
|
31
|
+
navigate: "navigate";
|
|
32
|
+
api_request: "api_request";
|
|
33
|
+
set_state: "set_state";
|
|
34
|
+
reset_form: "reset_form";
|
|
35
|
+
show_toast: "show_toast";
|
|
36
|
+
open_modal: "open_modal";
|
|
37
|
+
close_modal: "close_modal";
|
|
38
|
+
toggle_modal: "toggle_modal";
|
|
39
|
+
copy_clipboard: "copy_clipboard";
|
|
40
|
+
custom_event: "custom_event";
|
|
41
|
+
track_event: "track_event";
|
|
42
|
+
}>;
|
|
43
|
+
export type ActionStepType = z.infer<typeof ActionStepTypeSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* Condition Operators for branch & conditional step execution.
|
|
46
|
+
*/
|
|
47
|
+
export declare const ConditionOperatorSchema: z.ZodEnum<{
|
|
48
|
+
contains: "contains";
|
|
49
|
+
regex: "regex";
|
|
50
|
+
equals: "equals";
|
|
51
|
+
not_equals: "not_equals";
|
|
52
|
+
not_contains: "not_contains";
|
|
53
|
+
is_truthy: "is_truthy";
|
|
54
|
+
is_falsy: "is_falsy";
|
|
55
|
+
gt: "gt";
|
|
56
|
+
gte: "gte";
|
|
57
|
+
lt: "lt";
|
|
58
|
+
lte: "lte";
|
|
59
|
+
}>;
|
|
60
|
+
export type ConditionOperator = z.infer<typeof ConditionOperatorSchema>;
|
|
61
|
+
/**
|
|
62
|
+
* Action Step Condition Schema
|
|
63
|
+
* Evaluated before running a step. If condition fails, step is skipped.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ActionStepConditionSchema: z.ZodObject<{
|
|
66
|
+
field: z.ZodString;
|
|
67
|
+
operator: z.ZodEnum<{
|
|
68
|
+
contains: "contains";
|
|
69
|
+
regex: "regex";
|
|
70
|
+
equals: "equals";
|
|
71
|
+
not_equals: "not_equals";
|
|
72
|
+
not_contains: "not_contains";
|
|
73
|
+
is_truthy: "is_truthy";
|
|
74
|
+
is_falsy: "is_falsy";
|
|
75
|
+
gt: "gt";
|
|
76
|
+
gte: "gte";
|
|
77
|
+
lt: "lt";
|
|
78
|
+
lte: "lte";
|
|
79
|
+
}>;
|
|
80
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type ActionStepCondition = z.infer<typeof ActionStepConditionSchema>;
|
|
83
|
+
export declare function isSafeActionUrl(url: string): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 1. API Request Step Payload Schema
|
|
86
|
+
*/
|
|
87
|
+
export declare const ApiRequestStepPayloadSchema: z.ZodObject<{
|
|
88
|
+
url: z.ZodString;
|
|
89
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
90
|
+
GET: "GET";
|
|
91
|
+
POST: "POST";
|
|
92
|
+
PUT: "PUT";
|
|
93
|
+
DELETE: "DELETE";
|
|
94
|
+
PATCH: "PATCH";
|
|
95
|
+
HEAD: "HEAD";
|
|
96
|
+
OPTIONS: "OPTIONS";
|
|
97
|
+
}>>;
|
|
98
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
99
|
+
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
100
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>>;
|
|
101
|
+
bodyFormat: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
raw: "raw";
|
|
103
|
+
formData: "formData";
|
|
104
|
+
text: "text";
|
|
105
|
+
json: "json";
|
|
106
|
+
"form-data": "form-data";
|
|
107
|
+
urlencoded: "urlencoded";
|
|
108
|
+
"url-encoded": "url-encoded";
|
|
109
|
+
}>>;
|
|
110
|
+
bodyType: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
raw: "raw";
|
|
112
|
+
formData: "formData";
|
|
113
|
+
text: "text";
|
|
114
|
+
json: "json";
|
|
115
|
+
"form-data": "form-data";
|
|
116
|
+
urlencoded: "urlencoded";
|
|
117
|
+
"url-encoded": "url-encoded";
|
|
118
|
+
}>>;
|
|
119
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
responseMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type ApiRequestStepPayload = z.infer<typeof ApiRequestStepPayloadSchema>;
|
|
123
|
+
/**
|
|
124
|
+
* 2. Navigate Step Payload Schema
|
|
125
|
+
*/
|
|
126
|
+
export declare const NavigateStepPayloadSchema: z.ZodObject<{
|
|
127
|
+
url: z.ZodString;
|
|
128
|
+
target: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
_self: "_self";
|
|
130
|
+
_blank: "_blank";
|
|
131
|
+
_parent: "_parent";
|
|
132
|
+
_top: "_top";
|
|
133
|
+
}>>>;
|
|
134
|
+
replace: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
scroll: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
behavior: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
auto: "auto";
|
|
138
|
+
smooth: "smooth";
|
|
139
|
+
}>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type NavigateStepPayload = z.infer<typeof NavigateStepPayloadSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* 3. Set State Step Payload Schema
|
|
144
|
+
*/
|
|
145
|
+
export declare const SetStateStepPayloadSchema: z.ZodObject<{
|
|
146
|
+
key: z.ZodString;
|
|
147
|
+
value: z.ZodUnknown;
|
|
148
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
session: "session";
|
|
150
|
+
document: "document";
|
|
151
|
+
local: "local";
|
|
152
|
+
runtime: "runtime";
|
|
153
|
+
}>>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type SetStateStepPayload = z.infer<typeof SetStateStepPayloadSchema>;
|
|
156
|
+
/**
|
|
157
|
+
* 4. Reset Form Step Payload Schema
|
|
158
|
+
*/
|
|
159
|
+
export declare const ResetFormStepPayloadSchema: z.ZodObject<{
|
|
160
|
+
formId: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export type ResetFormStepPayload = z.infer<typeof ResetFormStepPayloadSchema>;
|
|
163
|
+
/**
|
|
164
|
+
* 5. Show Toast Step Payload Schema
|
|
165
|
+
*/
|
|
166
|
+
export declare const ShowToastStepPayloadSchema: z.ZodObject<{
|
|
167
|
+
message: z.ZodString;
|
|
168
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
169
|
+
error: "error";
|
|
170
|
+
info: "info";
|
|
171
|
+
warning: "warning";
|
|
172
|
+
success: "success";
|
|
173
|
+
}>>>;
|
|
174
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
error: "error";
|
|
176
|
+
info: "info";
|
|
177
|
+
warning: "warning";
|
|
178
|
+
success: "success";
|
|
179
|
+
}>>;
|
|
180
|
+
title: z.ZodOptional<z.ZodString>;
|
|
181
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
"top-right": "top-right";
|
|
184
|
+
"top-left": "top-left";
|
|
185
|
+
"bottom-right": "bottom-right";
|
|
186
|
+
"bottom-left": "bottom-left";
|
|
187
|
+
"top-center": "top-center";
|
|
188
|
+
"bottom-center": "bottom-center";
|
|
189
|
+
}>>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
export type ShowToastStepPayload = z.infer<typeof ShowToastStepPayloadSchema>;
|
|
192
|
+
/**
|
|
193
|
+
* 6. Open Modal Step Payload Schema
|
|
194
|
+
*/
|
|
195
|
+
export declare const OpenModalStepPayloadSchema: z.ZodObject<{
|
|
196
|
+
modalId: z.ZodOptional<z.ZodString>;
|
|
197
|
+
modalNodeId: z.ZodOptional<z.ZodString>;
|
|
198
|
+
toggle: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
export type OpenModalStepPayload = z.infer<typeof OpenModalStepPayloadSchema>;
|
|
201
|
+
/**
|
|
202
|
+
* 7. Close Modal Step Payload Schema
|
|
203
|
+
*/
|
|
204
|
+
export declare const CloseModalStepPayloadSchema: z.ZodObject<{
|
|
205
|
+
modalId: z.ZodOptional<z.ZodString>;
|
|
206
|
+
modalNodeId: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export type CloseModalStepPayload = z.infer<typeof CloseModalStepPayloadSchema>;
|
|
209
|
+
/**
|
|
210
|
+
* 7b. Toggle Modal Step Payload Schema
|
|
211
|
+
* Flips a modal/drawer/collapsible between open and closed. The renderer's
|
|
212
|
+
* `toggle_modal` runner resolves the target from the first non-empty of
|
|
213
|
+
* `modalId`, `modalNodeId`, `targetNodeId`, `nodeId`.
|
|
214
|
+
*/
|
|
215
|
+
export declare const ToggleModalStepPayloadSchema: z.ZodObject<{
|
|
216
|
+
modalId: z.ZodOptional<z.ZodString>;
|
|
217
|
+
modalNodeId: z.ZodOptional<z.ZodString>;
|
|
218
|
+
targetNodeId: z.ZodOptional<z.ZodString>;
|
|
219
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
export type ToggleModalStepPayload = z.infer<typeof ToggleModalStepPayloadSchema>;
|
|
222
|
+
/**
|
|
223
|
+
* 8. Copy Clipboard Step Payload Schema
|
|
224
|
+
*/
|
|
225
|
+
export declare const CopyClipboardStepPayloadSchema: z.ZodObject<{
|
|
226
|
+
text: z.ZodOptional<z.ZodString>;
|
|
227
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
228
|
+
notify: z.ZodOptional<z.ZodBoolean>;
|
|
229
|
+
toastMessage: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
export type CopyClipboardStepPayload = z.infer<typeof CopyClipboardStepPayloadSchema>;
|
|
232
|
+
/**
|
|
233
|
+
* 9. Custom Event Step Payload Schema
|
|
234
|
+
*/
|
|
235
|
+
export declare const CustomEventStepPayloadSchema: z.ZodObject<{
|
|
236
|
+
eventName: z.ZodString;
|
|
237
|
+
detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
238
|
+
bubbles: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
239
|
+
cancelable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export type CustomEventStepPayload = z.infer<typeof CustomEventStepPayloadSchema>;
|
|
242
|
+
/**
|
|
243
|
+
* Dictionary of Step Payload Schemas by Step Type
|
|
244
|
+
*/
|
|
245
|
+
export declare const StepPayloadSchemas: {
|
|
246
|
+
readonly api_request: z.ZodObject<{
|
|
247
|
+
url: z.ZodString;
|
|
248
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
249
|
+
GET: "GET";
|
|
250
|
+
POST: "POST";
|
|
251
|
+
PUT: "PUT";
|
|
252
|
+
DELETE: "DELETE";
|
|
253
|
+
PATCH: "PATCH";
|
|
254
|
+
HEAD: "HEAD";
|
|
255
|
+
OPTIONS: "OPTIONS";
|
|
256
|
+
}>>;
|
|
257
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
258
|
+
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
259
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>>;
|
|
260
|
+
bodyFormat: z.ZodOptional<z.ZodEnum<{
|
|
261
|
+
raw: "raw";
|
|
262
|
+
formData: "formData";
|
|
263
|
+
text: "text";
|
|
264
|
+
json: "json";
|
|
265
|
+
"form-data": "form-data";
|
|
266
|
+
urlencoded: "urlencoded";
|
|
267
|
+
"url-encoded": "url-encoded";
|
|
268
|
+
}>>;
|
|
269
|
+
bodyType: z.ZodOptional<z.ZodEnum<{
|
|
270
|
+
raw: "raw";
|
|
271
|
+
formData: "formData";
|
|
272
|
+
text: "text";
|
|
273
|
+
json: "json";
|
|
274
|
+
"form-data": "form-data";
|
|
275
|
+
urlencoded: "urlencoded";
|
|
276
|
+
"url-encoded": "url-encoded";
|
|
277
|
+
}>>;
|
|
278
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
responseMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
readonly navigate: z.ZodObject<{
|
|
282
|
+
url: z.ZodString;
|
|
283
|
+
target: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
284
|
+
_self: "_self";
|
|
285
|
+
_blank: "_blank";
|
|
286
|
+
_parent: "_parent";
|
|
287
|
+
_top: "_top";
|
|
288
|
+
}>>>;
|
|
289
|
+
replace: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
scroll: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
behavior: z.ZodOptional<z.ZodEnum<{
|
|
292
|
+
auto: "auto";
|
|
293
|
+
smooth: "smooth";
|
|
294
|
+
}>>;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
readonly set_state: z.ZodObject<{
|
|
297
|
+
key: z.ZodString;
|
|
298
|
+
value: z.ZodUnknown;
|
|
299
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
300
|
+
session: "session";
|
|
301
|
+
document: "document";
|
|
302
|
+
local: "local";
|
|
303
|
+
runtime: "runtime";
|
|
304
|
+
}>>>;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
readonly reset_form: z.ZodObject<{
|
|
307
|
+
formId: z.ZodOptional<z.ZodString>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
readonly show_toast: z.ZodObject<{
|
|
310
|
+
message: z.ZodString;
|
|
311
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
error: "error";
|
|
313
|
+
info: "info";
|
|
314
|
+
warning: "warning";
|
|
315
|
+
success: "success";
|
|
316
|
+
}>>>;
|
|
317
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
318
|
+
error: "error";
|
|
319
|
+
info: "info";
|
|
320
|
+
warning: "warning";
|
|
321
|
+
success: "success";
|
|
322
|
+
}>>;
|
|
323
|
+
title: z.ZodOptional<z.ZodString>;
|
|
324
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
"top-right": "top-right";
|
|
327
|
+
"top-left": "top-left";
|
|
328
|
+
"bottom-right": "bottom-right";
|
|
329
|
+
"bottom-left": "bottom-left";
|
|
330
|
+
"top-center": "top-center";
|
|
331
|
+
"bottom-center": "bottom-center";
|
|
332
|
+
}>>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
readonly open_modal: z.ZodObject<{
|
|
335
|
+
modalId: z.ZodOptional<z.ZodString>;
|
|
336
|
+
modalNodeId: z.ZodOptional<z.ZodString>;
|
|
337
|
+
toggle: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
readonly close_modal: z.ZodObject<{
|
|
340
|
+
modalId: z.ZodOptional<z.ZodString>;
|
|
341
|
+
modalNodeId: z.ZodOptional<z.ZodString>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
readonly toggle_modal: z.ZodObject<{
|
|
344
|
+
modalId: z.ZodOptional<z.ZodString>;
|
|
345
|
+
modalNodeId: z.ZodOptional<z.ZodString>;
|
|
346
|
+
targetNodeId: z.ZodOptional<z.ZodString>;
|
|
347
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
readonly copy_clipboard: z.ZodObject<{
|
|
350
|
+
text: z.ZodOptional<z.ZodString>;
|
|
351
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
352
|
+
notify: z.ZodOptional<z.ZodBoolean>;
|
|
353
|
+
toastMessage: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
readonly custom_event: z.ZodObject<{
|
|
356
|
+
eventName: z.ZodString;
|
|
357
|
+
detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
358
|
+
bubbles: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
359
|
+
cancelable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
readonly track_event: z.ZodObject<{
|
|
362
|
+
eventName: z.ZodString;
|
|
363
|
+
eventType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
standard: "standard";
|
|
365
|
+
custom: "custom";
|
|
366
|
+
}>>>;
|
|
367
|
+
provider: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
368
|
+
all: "all";
|
|
369
|
+
custom: "custom";
|
|
370
|
+
meta: "meta";
|
|
371
|
+
google: "google";
|
|
372
|
+
gtm: "gtm";
|
|
373
|
+
tiktok: "tiktok";
|
|
374
|
+
}>>>;
|
|
375
|
+
delivery: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
376
|
+
both: "both";
|
|
377
|
+
client_only: "client_only";
|
|
378
|
+
server_only: "server_only";
|
|
379
|
+
}>>>;
|
|
380
|
+
eventId: z.ZodOptional<z.ZodString>;
|
|
381
|
+
params: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
382
|
+
userData: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
383
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Action Step Interface
|
|
388
|
+
* Recursive definition allowing branching (onSuccess, onError).
|
|
389
|
+
*/
|
|
390
|
+
export interface ActionStep {
|
|
391
|
+
id: string;
|
|
392
|
+
type: ActionStepType;
|
|
393
|
+
label?: string;
|
|
394
|
+
payload?: Record<string, unknown>;
|
|
395
|
+
condition?: ActionStepCondition;
|
|
396
|
+
timeout?: number;
|
|
397
|
+
continueOnError?: boolean;
|
|
398
|
+
onSuccess?: ActionStep[];
|
|
399
|
+
onError?: ActionStep[];
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Action Step Schema
|
|
403
|
+
* Validates individual steps in an action pipeline, supporting recursive branching.
|
|
404
|
+
*/
|
|
405
|
+
export declare const ActionStepSchema: z.ZodType<ActionStep>;
|
|
406
|
+
/**
|
|
407
|
+
* Action Pipeline Schema
|
|
408
|
+
* Defines an event trigger and an ordered sequence of action steps to execute.
|
|
409
|
+
*/
|
|
410
|
+
export declare const ActionPipelineSchema: z.ZodObject<{
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
trigger: z.ZodEnum<{
|
|
413
|
+
load: "load";
|
|
414
|
+
change: "change";
|
|
415
|
+
blur: "blur";
|
|
416
|
+
click: "click";
|
|
417
|
+
focus: "focus";
|
|
418
|
+
submit: "submit";
|
|
419
|
+
expire: "expire";
|
|
420
|
+
}>;
|
|
421
|
+
label: z.ZodOptional<z.ZodString>;
|
|
422
|
+
debounceMs: z.ZodOptional<z.ZodNumber>;
|
|
423
|
+
preventDuplicate: z.ZodOptional<z.ZodBoolean>;
|
|
424
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
425
|
+
steps: z.ZodArray<z.ZodType<ActionStep, unknown, z.core.$ZodTypeInternals<ActionStep, unknown>>>;
|
|
426
|
+
}, z.core.$strip>;
|
|
427
|
+
export type ActionPipeline = z.infer<typeof ActionPipelineSchema>;
|
|
428
|
+
/**
|
|
429
|
+
* Type Guards
|
|
430
|
+
*/
|
|
431
|
+
export declare function isActionTriggerType(value: unknown): value is ActionTriggerType;
|
|
432
|
+
export declare function isActionStepType(value: unknown): value is ActionStepType;
|
|
433
|
+
export declare function isConditionOperator(value: unknown): value is ConditionOperator;
|
|
434
|
+
export declare function isActionStepCondition(value: unknown): value is ActionStepCondition;
|
|
435
|
+
export declare function isActionStep(value: unknown): value is ActionStep;
|
|
436
|
+
export declare function isActionPipeline(value: unknown): value is ActionPipeline;
|
|
437
|
+
/**
|
|
438
|
+
* Validates a step's payload specifically according to its step type.
|
|
439
|
+
*/
|
|
440
|
+
export declare function validateActionStepPayload(type: ActionStepType, payload: unknown): {
|
|
441
|
+
success: boolean;
|
|
442
|
+
data?: unknown;
|
|
443
|
+
error?: z.ZodError;
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Sanitization Utilities
|
|
447
|
+
*/
|
|
448
|
+
/**
|
|
449
|
+
* Sanitizes a URL string by checking if it contains dangerous protocols or scripts.
|
|
450
|
+
* Returns the trimmed URL if safe, or a fallback string (default empty string `""`).
|
|
451
|
+
*/
|
|
452
|
+
export declare function sanitizeActionUrl(url: unknown, fallback?: string): string;
|
|
453
|
+
/**
|
|
454
|
+
* Sanitizes a general string value against script tags and dangerous HTML/protocols.
|
|
455
|
+
*/
|
|
456
|
+
export declare function sanitizeActionString(value: unknown, fallback?: string): string;
|
|
457
|
+
/**
|
|
458
|
+
* Recursively sanitizes any arbitrary value (string, object, array, primitive) in an action payload.
|
|
459
|
+
*/
|
|
460
|
+
export declare function sanitizeActionValue(value: unknown): unknown;
|
|
461
|
+
/**
|
|
462
|
+
* Sanitizes an action step payload object, cleaning dangerous URLs and injection strings recursively.
|
|
463
|
+
*/
|
|
464
|
+
export declare function sanitizeActionPayload(payload: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
465
|
+
/**
|
|
466
|
+
* Recursively sanitizes an ActionStep, including its payload, condition, onSuccess, and onError branches.
|
|
467
|
+
*/
|
|
468
|
+
export declare function sanitizeActionStep(step: ActionStep): ActionStep;
|
|
469
|
+
/**
|
|
470
|
+
* Recursively sanitizes an ActionPipeline and all its nested steps.
|
|
471
|
+
*/
|
|
472
|
+
export declare function sanitizeActionPipeline(pipeline: ActionPipeline): ActionPipeline;
|
|
473
|
+
//# sourceMappingURL=actions.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.cts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAA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AAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAA;CAAE,CAmB1D;AAED;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,GAAE,MAAW,GAAG,MAAM,CAO7E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAE,MAAW,GAAG,MAAM,CAMlF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAwB3D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAK3G;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAuB/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAM/E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for responsive breakpoints (STORA-541).
|
|
3
|
+
*
|
|
4
|
+
* Every consumer that maps a screen width to a `ResponsiveStyles` layer — the editor's
|
|
5
|
+
* viewport switcher/resizer, the runtime renderer's `@media` output, the preview adapter
|
|
6
|
+
* and the static code generator — must read these values instead of hard-coding numbers.
|
|
7
|
+
*
|
|
8
|
+
* Ranges are disjoint and mirror the editor's per-viewport preview exactly: a viewport's
|
|
9
|
+
* effective style is `base` merged with *that one* layer (tablet does not cascade into
|
|
10
|
+
* mobile, desktop does not leak into tablet/mobile).
|
|
11
|
+
*
|
|
12
|
+
* mobile : width < 768px
|
|
13
|
+
* tablet : 768 <= width < 1024px
|
|
14
|
+
* desktop : 1024 <= width
|
|
15
|
+
*
|
|
16
|
+
* 768/1024 were chosen over the older 640/1024 code-generator values because they match
|
|
17
|
+
* the published docs, the editor's existing width→viewport logic and its default tablet
|
|
18
|
+
* preview width (768px), so what users see in the editor is what ships.
|
|
19
|
+
*/
|
|
20
|
+
/** Viewport layers that carry breakpoint overrides (`base` applies everywhere). */
|
|
21
|
+
export type BreakpointName = 'desktop' | 'tablet' | 'mobile';
|
|
22
|
+
export interface BreakpointRange {
|
|
23
|
+
/** Inclusive lower bound in CSS px. */
|
|
24
|
+
readonly minWidth: number;
|
|
25
|
+
/** Inclusive upper bound in CSS px, or `null` for unbounded. */
|
|
26
|
+
readonly maxWidth: number | null;
|
|
27
|
+
}
|
|
28
|
+
export declare const BREAKPOINTS: Readonly<Record<BreakpointName, BreakpointRange>>;
|
|
29
|
+
/** Order used for emitting CSS and iterating layers (widest first). */
|
|
30
|
+
export declare const BREAKPOINT_ORDER: readonly BreakpointName[];
|
|
31
|
+
/** CSS media query (without the `@media` keyword) for each breakpoint layer. */
|
|
32
|
+
export declare const BREAKPOINT_MEDIA_QUERIES: Readonly<Record<BreakpointName, string>>;
|
|
33
|
+
/** Resolve which breakpoint layer applies at a given viewport width in CSS px. */
|
|
34
|
+
export declare function getBreakpointForWidth(width: number): BreakpointName;
|
|
35
|
+
//# sourceMappingURL=breakpoints.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.d.cts","sourceRoot":"","sources":["../src/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAIxE,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAIpD,CAAC;AAUH,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAM5E,CAAC;AAEH,kFAAkF;AAClF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAInE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical list of built-in component type names shipped by `@kubuild/components`'
|
|
3
|
+
* `createDefaultComponentRegistry()`.
|
|
4
|
+
*
|
|
5
|
+
* It lives in `@kubuild/schema` (the bottom of the dependency graph) so that
|
|
6
|
+
* `@kubuild/core` can use it — e.g. to tell built-in from custom components in
|
|
7
|
+
* `extractTemplateRequirements` — without depending on `@kubuild/components`, which
|
|
8
|
+
* would invert the `schema → core → components` direction. `@kubuild/components`
|
|
9
|
+
* derives its `CoreComponentType` union from this list and a test there asserts the
|
|
10
|
+
* default registry registers exactly these types, so the two cannot drift apart.
|
|
11
|
+
*
|
|
12
|
+
* When adding a built-in component definition, add its type here as well.
|
|
13
|
+
*/
|
|
14
|
+
export declare const BUILTIN_COMPONENT_TYPES: readonly ["page", "section", "container", "columns", "flex", "grid", "heading", "text", "paragraph", "link", "blockquote", "badge", "code-block", "image", "video", "icon", "html-embed", "button", "button-submit", "form", "input", "textarea", "select", "checkbox", "switch", "radio-group", "radio", "radio-item", "file-upload", "collection", "list", "list-item", "table", "table-row", "table-cell", "modal", "drawer", "collapsible", "countdown", "accordion", "accordion-item", "tabs", "tab-panel", "carousel", "rating", "divider", "spacer"];
|
|
15
|
+
export type BuiltinComponentType = (typeof BUILTIN_COMPONENT_TYPES)[number];
|
|
16
|
+
export declare function isBuiltinComponentType(type: unknown): type is BuiltinComponentType;
|
|
17
|
+
//# sourceMappingURL=builtin-components.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-components.d.cts","sourceRoot":"","sources":["../src/builtin-components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,6hBAuD1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,oBAAoB,CAElF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical prop names for text-bearing components (STORA-550).
|
|
3
|
+
*
|
|
4
|
+
* Historically the renderer accepted several names for the same visible text
|
|
5
|
+
* (`text` / `content`, `text` / `label`, `quote` / `text`, ...). Each component now has
|
|
6
|
+
* exactly one canonical name; the others are deprecated aliases that
|
|
7
|
+
* - the `1.1.0 -> 1.2.0` document migration moves onto the canonical name, and
|
|
8
|
+
* - the renderer still reads (for one minor version) while emitting a
|
|
9
|
+
* `DEPRECATED_PROP` diagnostic.
|
|
10
|
+
*
|
|
11
|
+
* Pure data, no zod — safe to import from any layer.
|
|
12
|
+
*/
|
|
13
|
+
export interface CanonicalTextPropRule {
|
|
14
|
+
/** The one prop name authors, templates and the editor should write. */
|
|
15
|
+
canonical: string;
|
|
16
|
+
/** Deprecated names still read for backwards compatibility. */
|
|
17
|
+
aliases: readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Order in which the pre-1.2.0 renderer resolved the visible value (first defined
|
|
20
|
+
* wins). The migration uses this so a migrated document renders exactly as before.
|
|
21
|
+
*/
|
|
22
|
+
legacyReadOrder: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
export declare const CANONICAL_TEXT_PROPS: Readonly<Record<string, CanonicalTextPropRule>>;
|
|
25
|
+
/** Returns the canonical text prop rule for a component type, if it has one. */
|
|
26
|
+
export declare function getCanonicalTextPropRule(componentType: string): CanonicalTextPropRule | undefined;
|
|
27
|
+
export interface DeprecatedPropUsage {
|
|
28
|
+
/** Alias prop present on the node. */
|
|
29
|
+
propName: string;
|
|
30
|
+
/** Canonical prop name that should be used instead. */
|
|
31
|
+
canonicalName: string;
|
|
32
|
+
/** True when the canonical prop is absent, i.e. the alias is what actually renders. */
|
|
33
|
+
inEffect: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Lists deprecated alias props present on a node's props (does not mutate).
|
|
37
|
+
*/
|
|
38
|
+
export declare function findDeprecatedPropAliases(componentType: string, props: Record<string, unknown> | undefined): DeprecatedPropUsage[];
|
|
39
|
+
//# sourceMappingURL=canonical-props.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-props.d.cts","sourceRoot":"","sources":["../src/canonical-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAgB/E,CAAC;AAEH,gFAAgF;AAChF,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAIjG;AAED,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACzC,mBAAmB,EAAE,CAYvB"}
|