@shoplix-ai/sdui-schema 1.0.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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/dist/action.d.ts +26 -0
  3. package/dist/action.d.ts.map +1 -0
  4. package/dist/action.js +27 -0
  5. package/dist/action.js.map +1 -0
  6. package/dist/assets.d.ts +80 -0
  7. package/dist/assets.d.ts.map +1 -0
  8. package/dist/assets.js +101 -0
  9. package/dist/assets.js.map +1 -0
  10. package/dist/binding.d.ts +144 -0
  11. package/dist/binding.d.ts.map +1 -0
  12. package/dist/binding.js +80 -0
  13. package/dist/binding.js.map +1 -0
  14. package/dist/block-definition.d.ts +1639 -0
  15. package/dist/block-definition.d.ts.map +1 -0
  16. package/dist/block-definition.js +527 -0
  17. package/dist/block-definition.js.map +1 -0
  18. package/dist/block-type-id.d.ts +15 -0
  19. package/dist/block-type-id.d.ts.map +1 -0
  20. package/dist/block-type-id.js +43 -0
  21. package/dist/block-type-id.js.map +1 -0
  22. package/dist/block-type.d.ts +21 -0
  23. package/dist/block-type.d.ts.map +1 -0
  24. package/dist/block-type.js +24 -0
  25. package/dist/block-type.js.map +1 -0
  26. package/dist/blocks.d.ts +922 -0
  27. package/dist/blocks.d.ts.map +1 -0
  28. package/dist/blocks.js +353 -0
  29. package/dist/blocks.js.map +1 -0
  30. package/dist/definition-validator.d.ts +47 -0
  31. package/dist/definition-validator.d.ts.map +1 -0
  32. package/dist/definition-validator.js +340 -0
  33. package/dist/definition-validator.js.map +1 -0
  34. package/dist/display.d.ts +139 -0
  35. package/dist/display.d.ts.map +1 -0
  36. package/dist/display.js +118 -0
  37. package/dist/display.js.map +1 -0
  38. package/dist/envelope.d.ts +2721 -0
  39. package/dist/envelope.d.ts.map +1 -0
  40. package/dist/envelope.js +116 -0
  41. package/dist/envelope.js.map +1 -0
  42. package/dist/icons.d.ts +10 -0
  43. package/dist/icons.d.ts.map +1 -0
  44. package/dist/icons.js +49 -0
  45. package/dist/icons.js.map +1 -0
  46. package/dist/index.d.ts +38 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +20 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/locale.d.ts +11 -0
  51. package/dist/locale.d.ts.map +1 -0
  52. package/dist/locale.js +15 -0
  53. package/dist/locale.js.map +1 -0
  54. package/dist/manifest.d.ts +28 -0
  55. package/dist/manifest.d.ts.map +1 -0
  56. package/dist/manifest.js +242 -0
  57. package/dist/manifest.js.map +1 -0
  58. package/dist/parse.d.ts +33 -0
  59. package/dist/parse.d.ts.map +1 -0
  60. package/dist/parse.js +61 -0
  61. package/dist/parse.js.map +1 -0
  62. package/dist/path.d.ts +3 -0
  63. package/dist/path.d.ts.map +1 -0
  64. package/dist/path.js +14 -0
  65. package/dist/path.js.map +1 -0
  66. package/dist/primitives.d.ts +1206 -0
  67. package/dist/primitives.d.ts.map +1 -0
  68. package/dist/primitives.js +631 -0
  69. package/dist/primitives.js.map +1 -0
  70. package/dist/props.d.ts +9 -0
  71. package/dist/props.d.ts.map +1 -0
  72. package/dist/props.js +12 -0
  73. package/dist/props.js.map +1 -0
  74. package/dist/screen.d.ts +57 -0
  75. package/dist/screen.d.ts.map +1 -0
  76. package/dist/screen.js +76 -0
  77. package/dist/screen.js.map +1 -0
  78. package/dist/starters/electronics.d.ts +3 -0
  79. package/dist/starters/electronics.d.ts.map +1 -0
  80. package/dist/starters/electronics.js +235 -0
  81. package/dist/starters/electronics.js.map +1 -0
  82. package/dist/starters/fashion.d.ts +3 -0
  83. package/dist/starters/fashion.d.ts.map +1 -0
  84. package/dist/starters/fashion.js +232 -0
  85. package/dist/starters/fashion.js.map +1 -0
  86. package/dist/starters/index.d.ts +5 -0
  87. package/dist/starters/index.d.ts.map +1 -0
  88. package/dist/starters/index.js +10 -0
  89. package/dist/starters/index.js.map +1 -0
  90. package/dist/starters/minimal.d.ts +3 -0
  91. package/dist/starters/minimal.d.ts.map +1 -0
  92. package/dist/starters/minimal.js +232 -0
  93. package/dist/starters/minimal.js.map +1 -0
  94. package/dist/starters/starter-seed.d.ts +17 -0
  95. package/dist/starters/starter-seed.d.ts.map +1 -0
  96. package/dist/starters/starter-seed.js +2 -0
  97. package/dist/starters/starter-seed.js.map +1 -0
  98. package/dist/theme.d.ts +54 -0
  99. package/dist/theme.d.ts.map +1 -0
  100. package/dist/theme.js +68 -0
  101. package/dist/theme.js.map +1 -0
  102. package/dist/tokens.d.ts +115 -0
  103. package/dist/tokens.d.ts.map +1 -0
  104. package/dist/tokens.js +349 -0
  105. package/dist/tokens.js.map +1 -0
  106. package/dist/version.d.ts +11 -0
  107. package/dist/version.d.ts.map +1 -0
  108. package/dist/version.js +10 -0
  109. package/dist/version.js.map +1 -0
  110. package/package.json +50 -0
@@ -0,0 +1,1206 @@
1
+ import { z } from 'zod';
2
+ import { type SemanticTokenKey, type ThemeStyle } from './tokens.js';
3
+ /** The closed vocabulary a Composed Block may use. */
4
+ export declare const PRIMITIVE_TYPES: readonly ["stack", "row", "grid", "spacer", "divider", "text", "image", "icon", "badge", "button", "repeater", "price", "availability"];
5
+ export type PrimitiveType = (typeof PRIMITIVE_TYPES)[number];
6
+ export declare const SETTING_KEY_PATTERN: RegExp;
7
+ export declare const settingKeySchema: z.ZodString;
8
+ export declare const HEX_COLOR_PATTERN: RegExp;
9
+ export declare const hexColorSchema: z.ZodString;
10
+ /** A reference to one of the Shop's semantic token roles, by role name. */
11
+ export declare const tokenReferenceSchema: z.ZodObject<{
12
+ token: z.ZodString;
13
+ }, z.core.$strict>;
14
+ export type TokenReference = z.infer<typeof tokenReferenceSchema>;
15
+ /** The fields of the repeater's current item a text value may read. */
16
+ export declare const ITEM_TEXT_FIELDS: readonly ["title", "handle", "vendor", "product_type", "description"];
17
+ export type ItemTextField = (typeof ITEM_TEXT_FIELDS)[number];
18
+ /** The one field of the current item an image value may read. */
19
+ export declare const ITEM_IMAGE_FIELD = "image";
20
+ export type ValueSlot = 'text' | 'color' | 'dimension' | 'number' | 'count' | 'boolean' | 'enum' | 'asset' | 'action';
21
+ /**
22
+ * Every attribute of a Primitive is a tagged value: a literal, one of the
23
+ * block's settings, one of the Shop's token roles, or a field of the
24
+ * repeater's current item. Which of the four a slot takes depends on the
25
+ * slot; the body never carries a bare value.
26
+ */
27
+ interface ValueForms {
28
+ readonly setting: boolean;
29
+ readonly token: boolean;
30
+ readonly item?: readonly [string, ...string[]];
31
+ }
32
+ /** The tagged value a slot accepts, as its forms allow: the type says exactly what the schema takes. */
33
+ type TaggedValue<T extends z.ZodType, F extends ValueForms> = {
34
+ literal: z.infer<T>;
35
+ } | (F['setting'] extends true ? {
36
+ setting: string;
37
+ } : never) | (F['token'] extends true ? {
38
+ token: string;
39
+ } : never) | (F['item'] extends readonly string[] ? {
40
+ item: F['item'][number];
41
+ } : never);
42
+ /**
43
+ * "show when" on any node: one member of a closed condition union, never an
44
+ * expression. A node whose condition is false draws nothing, and neither do
45
+ * its children.
46
+ */
47
+ export declare const SHOW_WHEN_CONDITIONS: readonly ["setting_on", "item_has_image", "item_available", "language_is"];
48
+ export type ShowWhenConditionName = (typeof SHOW_WHEN_CONDITIONS)[number];
49
+ export declare const showWhenSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
50
+ condition: z.ZodLiteral<"setting_on">;
51
+ setting: z.ZodString;
52
+ }, z.core.$strict>, z.ZodObject<{
53
+ condition: z.ZodLiteral<"item_has_image">;
54
+ }, z.core.$strict>, z.ZodObject<{
55
+ condition: z.ZodLiteral<"item_available">;
56
+ }, z.core.$strict>, z.ZodObject<{
57
+ condition: z.ZodLiteral<"language_is">;
58
+ language: z.ZodString;
59
+ }, z.core.$strict>], "condition">;
60
+ export type ShowWhen = z.infer<typeof showWhenSchema>;
61
+ /** The two conditions that read the repeater's current item. */
62
+ export declare function readsItem(condition: ShowWhen): boolean;
63
+ export declare const LAYOUT_ALIGNMENTS: readonly ["start", "center", "end", "stretch"];
64
+ export declare const TEXT_SIZES: readonly ["sm", "md", "lg", "xl"];
65
+ export declare const TEXT_WEIGHTS: readonly ["regular", "medium", "bold"];
66
+ export declare const TEXT_ALIGNMENTS: readonly ["start", "center", "end"];
67
+ export declare const IMAGE_SHAPES: readonly ["square", "rounded", "circle"];
68
+ /** How many columns a grid lays out; named as text so a select setting can feed it. */
69
+ export declare const GRID_COLUMNS: readonly ["2", "3"];
70
+ export declare const BUTTON_STYLES: readonly ["solid", "outline", "ghost"];
71
+ /** Padding, gap, alignment, background, radius and border: what every layout Primitive takes. */
72
+ declare const layoutAttributes: {
73
+ padding: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
74
+ readonly setting: true;
75
+ readonly token: true;
76
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
77
+ readonly setting: true;
78
+ readonly token: true;
79
+ }>, unknown>>>;
80
+ gap: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
81
+ readonly setting: true;
82
+ readonly token: true;
83
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
84
+ readonly setting: true;
85
+ readonly token: true;
86
+ }>, unknown>>>;
87
+ width: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
88
+ readonly setting: true;
89
+ readonly token: true;
90
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
91
+ readonly setting: true;
92
+ readonly token: true;
93
+ }>, unknown>>>;
94
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
95
+ start: "start";
96
+ center: "center";
97
+ end: "end";
98
+ stretch: "stretch";
99
+ }>, {
100
+ readonly setting: true;
101
+ readonly token: false;
102
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
103
+ start: "start";
104
+ center: "center";
105
+ end: "end";
106
+ stretch: "stretch";
107
+ }>, {
108
+ readonly setting: true;
109
+ readonly token: false;
110
+ }>, unknown>>>;
111
+ background: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
112
+ readonly setting: true;
113
+ readonly token: true;
114
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
115
+ readonly setting: true;
116
+ readonly token: true;
117
+ }>, unknown>>>;
118
+ radius: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
119
+ readonly setting: true;
120
+ readonly token: true;
121
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
122
+ readonly setting: true;
123
+ readonly token: true;
124
+ }>, unknown>>>;
125
+ border: z.ZodOptional<z.ZodObject<{
126
+ width: z.ZodType<TaggedValue<z.ZodNumber, {
127
+ readonly setting: true;
128
+ readonly token: true;
129
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
130
+ readonly setting: true;
131
+ readonly token: true;
132
+ }>, unknown>>;
133
+ color: z.ZodType<TaggedValue<z.ZodString, {
134
+ readonly setting: true;
135
+ readonly token: true;
136
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
137
+ readonly setting: true;
138
+ readonly token: true;
139
+ }>, unknown>>;
140
+ }, z.core.$strict>>;
141
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
142
+ condition: z.ZodLiteral<"setting_on">;
143
+ setting: z.ZodString;
144
+ }, z.core.$strict>, z.ZodObject<{
145
+ condition: z.ZodLiteral<"item_has_image">;
146
+ }, z.core.$strict>, z.ZodObject<{
147
+ condition: z.ZodLiteral<"item_available">;
148
+ }, z.core.$strict>, z.ZodObject<{
149
+ condition: z.ZodLiteral<"language_is">;
150
+ language: z.ZodString;
151
+ }, z.core.$strict>], "condition">>;
152
+ };
153
+ /** A row may run off the side; with snap on, each child settles under the finger. */
154
+ declare const rowAttributes: {
155
+ scroll: z.ZodOptional<z.ZodType<TaggedValue<z.ZodBoolean, {
156
+ readonly setting: true;
157
+ readonly token: false;
158
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodBoolean, {
159
+ readonly setting: true;
160
+ readonly token: false;
161
+ }>, unknown>>>;
162
+ snap: z.ZodOptional<z.ZodType<TaggedValue<z.ZodBoolean, {
163
+ readonly setting: true;
164
+ readonly token: false;
165
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodBoolean, {
166
+ readonly setting: true;
167
+ readonly token: false;
168
+ }>, unknown>>>;
169
+ padding: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
170
+ readonly setting: true;
171
+ readonly token: true;
172
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
173
+ readonly setting: true;
174
+ readonly token: true;
175
+ }>, unknown>>>;
176
+ gap: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
177
+ readonly setting: true;
178
+ readonly token: true;
179
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
180
+ readonly setting: true;
181
+ readonly token: true;
182
+ }>, unknown>>>;
183
+ width: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
184
+ readonly setting: true;
185
+ readonly token: true;
186
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
187
+ readonly setting: true;
188
+ readonly token: true;
189
+ }>, unknown>>>;
190
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
191
+ start: "start";
192
+ center: "center";
193
+ end: "end";
194
+ stretch: "stretch";
195
+ }>, {
196
+ readonly setting: true;
197
+ readonly token: false;
198
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
199
+ start: "start";
200
+ center: "center";
201
+ end: "end";
202
+ stretch: "stretch";
203
+ }>, {
204
+ readonly setting: true;
205
+ readonly token: false;
206
+ }>, unknown>>>;
207
+ background: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
208
+ readonly setting: true;
209
+ readonly token: true;
210
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
211
+ readonly setting: true;
212
+ readonly token: true;
213
+ }>, unknown>>>;
214
+ radius: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
215
+ readonly setting: true;
216
+ readonly token: true;
217
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
218
+ readonly setting: true;
219
+ readonly token: true;
220
+ }>, unknown>>>;
221
+ border: z.ZodOptional<z.ZodObject<{
222
+ width: z.ZodType<TaggedValue<z.ZodNumber, {
223
+ readonly setting: true;
224
+ readonly token: true;
225
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
226
+ readonly setting: true;
227
+ readonly token: true;
228
+ }>, unknown>>;
229
+ color: z.ZodType<TaggedValue<z.ZodString, {
230
+ readonly setting: true;
231
+ readonly token: true;
232
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
233
+ readonly setting: true;
234
+ readonly token: true;
235
+ }>, unknown>>;
236
+ }, z.core.$strict>>;
237
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
238
+ condition: z.ZodLiteral<"setting_on">;
239
+ setting: z.ZodString;
240
+ }, z.core.$strict>, z.ZodObject<{
241
+ condition: z.ZodLiteral<"item_has_image">;
242
+ }, z.core.$strict>, z.ZodObject<{
243
+ condition: z.ZodLiteral<"item_available">;
244
+ }, z.core.$strict>, z.ZodObject<{
245
+ condition: z.ZodLiteral<"language_is">;
246
+ language: z.ZodString;
247
+ }, z.core.$strict>], "condition">>;
248
+ };
249
+ declare const gridAttributes: {
250
+ columns: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
251
+ 2: "2";
252
+ 3: "3";
253
+ }>, {
254
+ readonly setting: true;
255
+ readonly token: false;
256
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
257
+ 2: "2";
258
+ 3: "3";
259
+ }>, {
260
+ readonly setting: true;
261
+ readonly token: false;
262
+ }>, unknown>>>;
263
+ padding: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
264
+ readonly setting: true;
265
+ readonly token: true;
266
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
267
+ readonly setting: true;
268
+ readonly token: true;
269
+ }>, unknown>>>;
270
+ gap: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
271
+ readonly setting: true;
272
+ readonly token: true;
273
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
274
+ readonly setting: true;
275
+ readonly token: true;
276
+ }>, unknown>>>;
277
+ width: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
278
+ readonly setting: true;
279
+ readonly token: true;
280
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
281
+ readonly setting: true;
282
+ readonly token: true;
283
+ }>, unknown>>>;
284
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
285
+ start: "start";
286
+ center: "center";
287
+ end: "end";
288
+ stretch: "stretch";
289
+ }>, {
290
+ readonly setting: true;
291
+ readonly token: false;
292
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
293
+ start: "start";
294
+ center: "center";
295
+ end: "end";
296
+ stretch: "stretch";
297
+ }>, {
298
+ readonly setting: true;
299
+ readonly token: false;
300
+ }>, unknown>>>;
301
+ background: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
302
+ readonly setting: true;
303
+ readonly token: true;
304
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
305
+ readonly setting: true;
306
+ readonly token: true;
307
+ }>, unknown>>>;
308
+ radius: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
309
+ readonly setting: true;
310
+ readonly token: true;
311
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
312
+ readonly setting: true;
313
+ readonly token: true;
314
+ }>, unknown>>>;
315
+ border: z.ZodOptional<z.ZodObject<{
316
+ width: z.ZodType<TaggedValue<z.ZodNumber, {
317
+ readonly setting: true;
318
+ readonly token: true;
319
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
320
+ readonly setting: true;
321
+ readonly token: true;
322
+ }>, unknown>>;
323
+ color: z.ZodType<TaggedValue<z.ZodString, {
324
+ readonly setting: true;
325
+ readonly token: true;
326
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
327
+ readonly setting: true;
328
+ readonly token: true;
329
+ }>, unknown>>;
330
+ }, z.core.$strict>>;
331
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
332
+ condition: z.ZodLiteral<"setting_on">;
333
+ setting: z.ZodString;
334
+ }, z.core.$strict>, z.ZodObject<{
335
+ condition: z.ZodLiteral<"item_has_image">;
336
+ }, z.core.$strict>, z.ZodObject<{
337
+ condition: z.ZodLiteral<"item_available">;
338
+ }, z.core.$strict>, z.ZodObject<{
339
+ condition: z.ZodLiteral<"language_is">;
340
+ language: z.ZodString;
341
+ }, z.core.$strict>], "condition">>;
342
+ };
343
+ export declare const spacerPrimitiveSchema: z.ZodObject<{
344
+ primitive: z.ZodLiteral<"spacer">;
345
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
346
+ readonly setting: true;
347
+ readonly token: true;
348
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
349
+ readonly setting: true;
350
+ readonly token: true;
351
+ }>, unknown>>>;
352
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
353
+ condition: z.ZodLiteral<"setting_on">;
354
+ setting: z.ZodString;
355
+ }, z.core.$strict>, z.ZodObject<{
356
+ condition: z.ZodLiteral<"item_has_image">;
357
+ }, z.core.$strict>, z.ZodObject<{
358
+ condition: z.ZodLiteral<"item_available">;
359
+ }, z.core.$strict>, z.ZodObject<{
360
+ condition: z.ZodLiteral<"language_is">;
361
+ language: z.ZodString;
362
+ }, z.core.$strict>], "condition">>;
363
+ }, z.core.$strict>;
364
+ /** A hairline across the parent's width; thickness and color, nothing else. */
365
+ export declare const dividerPrimitiveSchema: z.ZodObject<{
366
+ primitive: z.ZodLiteral<"divider">;
367
+ thickness: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
368
+ readonly setting: true;
369
+ readonly token: true;
370
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
371
+ readonly setting: true;
372
+ readonly token: true;
373
+ }>, unknown>>>;
374
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
375
+ readonly setting: true;
376
+ readonly token: true;
377
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
378
+ readonly setting: true;
379
+ readonly token: true;
380
+ }>, unknown>>>;
381
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
382
+ condition: z.ZodLiteral<"setting_on">;
383
+ setting: z.ZodString;
384
+ }, z.core.$strict>, z.ZodObject<{
385
+ condition: z.ZodLiteral<"item_has_image">;
386
+ }, z.core.$strict>, z.ZodObject<{
387
+ condition: z.ZodLiteral<"item_available">;
388
+ }, z.core.$strict>, z.ZodObject<{
389
+ condition: z.ZodLiteral<"language_is">;
390
+ language: z.ZodString;
391
+ }, z.core.$strict>], "condition">>;
392
+ }, z.core.$strict>;
393
+ /** One glyph out of the app's icon set, sized and tinted like the text beside it. */
394
+ export declare const iconPrimitiveSchema: z.ZodObject<{
395
+ primitive: z.ZodLiteral<"icon">;
396
+ name: z.ZodType<TaggedValue<z.ZodEnum<{
397
+ image: "image";
398
+ search: "search";
399
+ home: "home";
400
+ leaf: "leaf";
401
+ bell: "bell";
402
+ "book-open": "book-open";
403
+ camera: "camera";
404
+ compass: "compass";
405
+ "credit-card": "credit-card";
406
+ gem: "gem";
407
+ gift: "gift";
408
+ globe: "globe";
409
+ headphones: "headphones";
410
+ heart: "heart";
411
+ info: "info";
412
+ "layout-grid": "layout-grid";
413
+ "life-buoy": "life-buoy";
414
+ lock: "lock";
415
+ "map-pin": "map-pin";
416
+ menu: "menu";
417
+ "message-circle": "message-circle";
418
+ newspaper: "newspaper";
419
+ package: "package";
420
+ percent: "percent";
421
+ phone: "phone";
422
+ "refresh-cw": "refresh-cw";
423
+ shield: "shield";
424
+ shirt: "shirt";
425
+ "shopping-bag": "shopping-bag";
426
+ sparkles: "sparkles";
427
+ star: "star";
428
+ store: "store";
429
+ tag: "tag";
430
+ truck: "truck";
431
+ user: "user";
432
+ zap: "zap";
433
+ }>, {
434
+ readonly setting: true;
435
+ readonly token: false;
436
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
437
+ image: "image";
438
+ search: "search";
439
+ home: "home";
440
+ leaf: "leaf";
441
+ bell: "bell";
442
+ "book-open": "book-open";
443
+ camera: "camera";
444
+ compass: "compass";
445
+ "credit-card": "credit-card";
446
+ gem: "gem";
447
+ gift: "gift";
448
+ globe: "globe";
449
+ headphones: "headphones";
450
+ heart: "heart";
451
+ info: "info";
452
+ "layout-grid": "layout-grid";
453
+ "life-buoy": "life-buoy";
454
+ lock: "lock";
455
+ "map-pin": "map-pin";
456
+ menu: "menu";
457
+ "message-circle": "message-circle";
458
+ newspaper: "newspaper";
459
+ package: "package";
460
+ percent: "percent";
461
+ phone: "phone";
462
+ "refresh-cw": "refresh-cw";
463
+ shield: "shield";
464
+ shirt: "shirt";
465
+ "shopping-bag": "shopping-bag";
466
+ sparkles: "sparkles";
467
+ star: "star";
468
+ store: "store";
469
+ tag: "tag";
470
+ truck: "truck";
471
+ user: "user";
472
+ zap: "zap";
473
+ }>, {
474
+ readonly setting: true;
475
+ readonly token: false;
476
+ }>, unknown>>;
477
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
478
+ readonly setting: true;
479
+ readonly token: true;
480
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
481
+ readonly setting: true;
482
+ readonly token: true;
483
+ }>, unknown>>>;
484
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
485
+ readonly setting: true;
486
+ readonly token: true;
487
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
488
+ readonly setting: true;
489
+ readonly token: true;
490
+ }>, unknown>>>;
491
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
492
+ condition: z.ZodLiteral<"setting_on">;
493
+ setting: z.ZodString;
494
+ }, z.core.$strict>, z.ZodObject<{
495
+ condition: z.ZodLiteral<"item_has_image">;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ condition: z.ZodLiteral<"item_available">;
498
+ }, z.core.$strict>, z.ZodObject<{
499
+ condition: z.ZodLiteral<"language_is">;
500
+ language: z.ZodString;
501
+ }, z.core.$strict>], "condition">>;
502
+ }, z.core.$strict>;
503
+ /** Text over a background: the small pill a card carries for "new" or "-20%". */
504
+ export declare const badgePrimitiveSchema: z.ZodObject<{
505
+ uppercase: z.ZodOptional<z.ZodType<TaggedValue<z.ZodBoolean, {
506
+ readonly setting: true;
507
+ readonly token: false;
508
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodBoolean, {
509
+ readonly setting: true;
510
+ readonly token: false;
511
+ }>, unknown>>>;
512
+ background: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
513
+ readonly setting: true;
514
+ readonly token: true;
515
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
516
+ readonly setting: true;
517
+ readonly token: true;
518
+ }>, unknown>>>;
519
+ padding: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
520
+ readonly setting: true;
521
+ readonly token: true;
522
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
523
+ readonly setting: true;
524
+ readonly token: true;
525
+ }>, unknown>>>;
526
+ radius: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
527
+ readonly setting: true;
528
+ readonly token: true;
529
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
530
+ readonly setting: true;
531
+ readonly token: true;
532
+ }>, unknown>>>;
533
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
534
+ condition: z.ZodLiteral<"setting_on">;
535
+ setting: z.ZodString;
536
+ }, z.core.$strict>, z.ZodObject<{
537
+ condition: z.ZodLiteral<"item_has_image">;
538
+ }, z.core.$strict>, z.ZodObject<{
539
+ condition: z.ZodLiteral<"item_available">;
540
+ }, z.core.$strict>, z.ZodObject<{
541
+ condition: z.ZodLiteral<"language_is">;
542
+ language: z.ZodString;
543
+ }, z.core.$strict>], "condition">>;
544
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
545
+ sm: "sm";
546
+ md: "md";
547
+ lg: "lg";
548
+ xl: "xl";
549
+ }>, {
550
+ readonly setting: true;
551
+ readonly token: false;
552
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
553
+ sm: "sm";
554
+ md: "md";
555
+ lg: "lg";
556
+ xl: "xl";
557
+ }>, {
558
+ readonly setting: true;
559
+ readonly token: false;
560
+ }>, unknown>>>;
561
+ weight: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
562
+ regular: "regular";
563
+ medium: "medium";
564
+ bold: "bold";
565
+ }>, {
566
+ readonly setting: true;
567
+ readonly token: false;
568
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
569
+ regular: "regular";
570
+ medium: "medium";
571
+ bold: "bold";
572
+ }>, {
573
+ readonly setting: true;
574
+ readonly token: false;
575
+ }>, unknown>>>;
576
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
577
+ start: "start";
578
+ center: "center";
579
+ end: "end";
580
+ }>, {
581
+ readonly setting: true;
582
+ readonly token: false;
583
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
584
+ start: "start";
585
+ center: "center";
586
+ end: "end";
587
+ }>, {
588
+ readonly setting: true;
589
+ readonly token: false;
590
+ }>, unknown>>>;
591
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
592
+ readonly setting: true;
593
+ readonly token: true;
594
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
595
+ readonly setting: true;
596
+ readonly token: true;
597
+ }>, unknown>>>;
598
+ primitive: z.ZodLiteral<"badge">;
599
+ text: z.ZodType<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
600
+ readonly setting: true;
601
+ readonly token: false;
602
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
603
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
604
+ readonly setting: true;
605
+ readonly token: false;
606
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
607
+ }>, unknown>>;
608
+ }, z.core.$strict>;
609
+ /**
610
+ * A label the buyer taps, dressed from the Shop's tokens, carrying one member
611
+ * of the closed action set. The runtime hands the action to the same router a
612
+ * platform block's action goes through, so a button opens a screen, the cart
613
+ * or a link and nothing else.
614
+ */
615
+ export declare const buttonPrimitiveSchema: z.ZodObject<{
616
+ primitive: z.ZodLiteral<"button">;
617
+ label: z.ZodType<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
618
+ readonly setting: true;
619
+ readonly token: false;
620
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
621
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
622
+ readonly setting: true;
623
+ readonly token: false;
624
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
625
+ }>, unknown>>;
626
+ action: z.ZodType<TaggedValue<z.ZodDiscriminatedUnion<[z.ZodObject<{
627
+ type: z.ZodLiteral<"open_screen">;
628
+ screenId: z.ZodUUID;
629
+ }, z.core.$strip>, z.ZodObject<{
630
+ type: z.ZodLiteral<"open_cart">;
631
+ }, z.core.$strip>, z.ZodObject<{
632
+ type: z.ZodLiteral<"open_url">;
633
+ url: z.ZodURL;
634
+ }, z.core.$strip>, z.ZodObject<{
635
+ type: z.ZodLiteral<"none">;
636
+ }, z.core.$strip>], "type">, {
637
+ readonly setting: true;
638
+ readonly token: false;
639
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodDiscriminatedUnion<[z.ZodObject<{
640
+ type: z.ZodLiteral<"open_screen">;
641
+ screenId: z.ZodUUID;
642
+ }, z.core.$strip>, z.ZodObject<{
643
+ type: z.ZodLiteral<"open_cart">;
644
+ }, z.core.$strip>, z.ZodObject<{
645
+ type: z.ZodLiteral<"open_url">;
646
+ url: z.ZodURL;
647
+ }, z.core.$strip>, z.ZodObject<{
648
+ type: z.ZodLiteral<"none">;
649
+ }, z.core.$strip>], "type">, {
650
+ readonly setting: true;
651
+ readonly token: false;
652
+ }>, unknown>>;
653
+ style: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
654
+ solid: "solid";
655
+ outline: "outline";
656
+ ghost: "ghost";
657
+ }>, {
658
+ readonly setting: true;
659
+ readonly token: false;
660
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
661
+ solid: "solid";
662
+ outline: "outline";
663
+ ghost: "ghost";
664
+ }>, {
665
+ readonly setting: true;
666
+ readonly token: false;
667
+ }>, unknown>>>;
668
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
669
+ sm: "sm";
670
+ md: "md";
671
+ lg: "lg";
672
+ xl: "xl";
673
+ }>, {
674
+ readonly setting: true;
675
+ readonly token: false;
676
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
677
+ sm: "sm";
678
+ md: "md";
679
+ lg: "lg";
680
+ xl: "xl";
681
+ }>, {
682
+ readonly setting: true;
683
+ readonly token: false;
684
+ }>, unknown>>>;
685
+ background: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
686
+ readonly setting: true;
687
+ readonly token: true;
688
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
689
+ readonly setting: true;
690
+ readonly token: true;
691
+ }>, unknown>>>;
692
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
693
+ readonly setting: true;
694
+ readonly token: true;
695
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
696
+ readonly setting: true;
697
+ readonly token: true;
698
+ }>, unknown>>>;
699
+ padding: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
700
+ readonly setting: true;
701
+ readonly token: true;
702
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
703
+ readonly setting: true;
704
+ readonly token: true;
705
+ }>, unknown>>>;
706
+ radius: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
707
+ readonly setting: true;
708
+ readonly token: true;
709
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
710
+ readonly setting: true;
711
+ readonly token: true;
712
+ }>, unknown>>>;
713
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
714
+ condition: z.ZodLiteral<"setting_on">;
715
+ setting: z.ZodString;
716
+ }, z.core.$strict>, z.ZodObject<{
717
+ condition: z.ZodLiteral<"item_has_image">;
718
+ }, z.core.$strict>, z.ZodObject<{
719
+ condition: z.ZodLiteral<"item_available">;
720
+ }, z.core.$strict>, z.ZodObject<{
721
+ condition: z.ZodLiteral<"language_is">;
722
+ language: z.ZodString;
723
+ }, z.core.$strict>], "condition">>;
724
+ }, z.core.$strict>;
725
+ export declare const textPrimitiveSchema: z.ZodObject<{
726
+ uppercase: z.ZodOptional<z.ZodType<TaggedValue<z.ZodBoolean, {
727
+ readonly setting: true;
728
+ readonly token: false;
729
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodBoolean, {
730
+ readonly setting: true;
731
+ readonly token: false;
732
+ }>, unknown>>>;
733
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
734
+ condition: z.ZodLiteral<"setting_on">;
735
+ setting: z.ZodString;
736
+ }, z.core.$strict>, z.ZodObject<{
737
+ condition: z.ZodLiteral<"item_has_image">;
738
+ }, z.core.$strict>, z.ZodObject<{
739
+ condition: z.ZodLiteral<"item_available">;
740
+ }, z.core.$strict>, z.ZodObject<{
741
+ condition: z.ZodLiteral<"language_is">;
742
+ language: z.ZodString;
743
+ }, z.core.$strict>], "condition">>;
744
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
745
+ sm: "sm";
746
+ md: "md";
747
+ lg: "lg";
748
+ xl: "xl";
749
+ }>, {
750
+ readonly setting: true;
751
+ readonly token: false;
752
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
753
+ sm: "sm";
754
+ md: "md";
755
+ lg: "lg";
756
+ xl: "xl";
757
+ }>, {
758
+ readonly setting: true;
759
+ readonly token: false;
760
+ }>, unknown>>>;
761
+ weight: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
762
+ regular: "regular";
763
+ medium: "medium";
764
+ bold: "bold";
765
+ }>, {
766
+ readonly setting: true;
767
+ readonly token: false;
768
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
769
+ regular: "regular";
770
+ medium: "medium";
771
+ bold: "bold";
772
+ }>, {
773
+ readonly setting: true;
774
+ readonly token: false;
775
+ }>, unknown>>>;
776
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
777
+ start: "start";
778
+ center: "center";
779
+ end: "end";
780
+ }>, {
781
+ readonly setting: true;
782
+ readonly token: false;
783
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
784
+ start: "start";
785
+ center: "center";
786
+ end: "end";
787
+ }>, {
788
+ readonly setting: true;
789
+ readonly token: false;
790
+ }>, unknown>>>;
791
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
792
+ readonly setting: true;
793
+ readonly token: true;
794
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
795
+ readonly setting: true;
796
+ readonly token: true;
797
+ }>, unknown>>>;
798
+ primitive: z.ZodLiteral<"text">;
799
+ text: z.ZodType<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
800
+ readonly setting: true;
801
+ readonly token: false;
802
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
803
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
804
+ readonly setting: true;
805
+ readonly token: false;
806
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
807
+ }>, unknown>>;
808
+ }, z.core.$strict>;
809
+ export declare const imagePrimitiveSchema: z.ZodObject<{
810
+ primitive: z.ZodLiteral<"image">;
811
+ asset: z.ZodType<TaggedValue<z.ZodUUID, {
812
+ readonly setting: true;
813
+ readonly token: false;
814
+ readonly item: readonly ["image"];
815
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodUUID, {
816
+ readonly setting: true;
817
+ readonly token: false;
818
+ readonly item: readonly ["image"];
819
+ }>, unknown>>;
820
+ shape: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
821
+ square: "square";
822
+ rounded: "rounded";
823
+ circle: "circle";
824
+ }>, {
825
+ readonly setting: true;
826
+ readonly token: false;
827
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
828
+ square: "square";
829
+ rounded: "rounded";
830
+ circle: "circle";
831
+ }>, {
832
+ readonly setting: true;
833
+ readonly token: false;
834
+ }>, unknown>>>;
835
+ aspectRatio: z.ZodOptional<z.ZodType<TaggedValue<z.ZodNumber, {
836
+ readonly setting: true;
837
+ readonly token: false;
838
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodNumber, {
839
+ readonly setting: true;
840
+ readonly token: false;
841
+ }>, unknown>>>;
842
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
843
+ condition: z.ZodLiteral<"setting_on">;
844
+ setting: z.ZodString;
845
+ }, z.core.$strict>, z.ZodObject<{
846
+ condition: z.ZodLiteral<"item_has_image">;
847
+ }, z.core.$strict>, z.ZodObject<{
848
+ condition: z.ZodLiteral<"item_available">;
849
+ }, z.core.$strict>, z.ZodObject<{
850
+ condition: z.ZodLiteral<"language_is">;
851
+ language: z.ZodString;
852
+ }, z.core.$strict>], "condition">>;
853
+ }, z.core.$strict>;
854
+ /**
855
+ * The current item's price as the Provider formatted it, in the buyer's
856
+ * country and language. The compare-at price rides alongside when the item
857
+ * carries one and the body asks for it.
858
+ */
859
+ export declare const pricePrimitiveSchema: z.ZodObject<{
860
+ compareAt: z.ZodOptional<z.ZodType<TaggedValue<z.ZodBoolean, {
861
+ readonly setting: true;
862
+ readonly token: false;
863
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodBoolean, {
864
+ readonly setting: true;
865
+ readonly token: false;
866
+ }>, unknown>>>;
867
+ compareAtColor: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
868
+ readonly setting: true;
869
+ readonly token: true;
870
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
871
+ readonly setting: true;
872
+ readonly token: true;
873
+ }>, unknown>>>;
874
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
875
+ condition: z.ZodLiteral<"setting_on">;
876
+ setting: z.ZodString;
877
+ }, z.core.$strict>, z.ZodObject<{
878
+ condition: z.ZodLiteral<"item_has_image">;
879
+ }, z.core.$strict>, z.ZodObject<{
880
+ condition: z.ZodLiteral<"item_available">;
881
+ }, z.core.$strict>, z.ZodObject<{
882
+ condition: z.ZodLiteral<"language_is">;
883
+ language: z.ZodString;
884
+ }, z.core.$strict>], "condition">>;
885
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
886
+ sm: "sm";
887
+ md: "md";
888
+ lg: "lg";
889
+ xl: "xl";
890
+ }>, {
891
+ readonly setting: true;
892
+ readonly token: false;
893
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
894
+ sm: "sm";
895
+ md: "md";
896
+ lg: "lg";
897
+ xl: "xl";
898
+ }>, {
899
+ readonly setting: true;
900
+ readonly token: false;
901
+ }>, unknown>>>;
902
+ weight: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
903
+ regular: "regular";
904
+ medium: "medium";
905
+ bold: "bold";
906
+ }>, {
907
+ readonly setting: true;
908
+ readonly token: false;
909
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
910
+ regular: "regular";
911
+ medium: "medium";
912
+ bold: "bold";
913
+ }>, {
914
+ readonly setting: true;
915
+ readonly token: false;
916
+ }>, unknown>>>;
917
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
918
+ start: "start";
919
+ center: "center";
920
+ end: "end";
921
+ }>, {
922
+ readonly setting: true;
923
+ readonly token: false;
924
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
925
+ start: "start";
926
+ center: "center";
927
+ end: "end";
928
+ }>, {
929
+ readonly setting: true;
930
+ readonly token: false;
931
+ }>, unknown>>>;
932
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
933
+ readonly setting: true;
934
+ readonly token: true;
935
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
936
+ readonly setting: true;
937
+ readonly token: true;
938
+ }>, unknown>>>;
939
+ primitive: z.ZodLiteral<"price">;
940
+ }, z.core.$strict>;
941
+ /**
942
+ * The current item's availability as a label the definition supplies in
943
+ * every language; the runtime picks which of the two to draw.
944
+ */
945
+ export declare const availabilityPrimitiveSchema: z.ZodObject<{
946
+ soldOutColor: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
947
+ readonly setting: true;
948
+ readonly token: true;
949
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
950
+ readonly setting: true;
951
+ readonly token: true;
952
+ }>, unknown>>>;
953
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
954
+ condition: z.ZodLiteral<"setting_on">;
955
+ setting: z.ZodString;
956
+ }, z.core.$strict>, z.ZodObject<{
957
+ condition: z.ZodLiteral<"item_has_image">;
958
+ }, z.core.$strict>, z.ZodObject<{
959
+ condition: z.ZodLiteral<"item_available">;
960
+ }, z.core.$strict>, z.ZodObject<{
961
+ condition: z.ZodLiteral<"language_is">;
962
+ language: z.ZodString;
963
+ }, z.core.$strict>], "condition">>;
964
+ size: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
965
+ sm: "sm";
966
+ md: "md";
967
+ lg: "lg";
968
+ xl: "xl";
969
+ }>, {
970
+ readonly setting: true;
971
+ readonly token: false;
972
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
973
+ sm: "sm";
974
+ md: "md";
975
+ lg: "lg";
976
+ xl: "xl";
977
+ }>, {
978
+ readonly setting: true;
979
+ readonly token: false;
980
+ }>, unknown>>>;
981
+ weight: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
982
+ regular: "regular";
983
+ medium: "medium";
984
+ bold: "bold";
985
+ }>, {
986
+ readonly setting: true;
987
+ readonly token: false;
988
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
989
+ regular: "regular";
990
+ medium: "medium";
991
+ bold: "bold";
992
+ }>, {
993
+ readonly setting: true;
994
+ readonly token: false;
995
+ }>, unknown>>>;
996
+ align: z.ZodOptional<z.ZodType<TaggedValue<z.ZodEnum<{
997
+ start: "start";
998
+ center: "center";
999
+ end: "end";
1000
+ }>, {
1001
+ readonly setting: true;
1002
+ readonly token: false;
1003
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodEnum<{
1004
+ start: "start";
1005
+ center: "center";
1006
+ end: "end";
1007
+ }>, {
1008
+ readonly setting: true;
1009
+ readonly token: false;
1010
+ }>, unknown>>>;
1011
+ color: z.ZodOptional<z.ZodType<TaggedValue<z.ZodString, {
1012
+ readonly setting: true;
1013
+ readonly token: true;
1014
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodString, {
1015
+ readonly setting: true;
1016
+ readonly token: true;
1017
+ }>, unknown>>>;
1018
+ primitive: z.ZodLiteral<"availability">;
1019
+ inStock: z.ZodType<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
1020
+ readonly setting: true;
1021
+ readonly token: false;
1022
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
1023
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
1024
+ readonly setting: true;
1025
+ readonly token: false;
1026
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
1027
+ }>, unknown>>;
1028
+ soldOut: z.ZodType<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
1029
+ readonly setting: true;
1030
+ readonly token: false;
1031
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
1032
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodRecord<z.ZodString, z.ZodString>, {
1033
+ readonly setting: true;
1034
+ readonly token: false;
1035
+ readonly item: readonly ["title", "handle", "vendor", "product_type", "description"];
1036
+ }>, unknown>>;
1037
+ }, z.core.$strict>;
1038
+ export type SpacerPrimitive = z.infer<typeof spacerPrimitiveSchema>;
1039
+ export type DividerPrimitive = z.infer<typeof dividerPrimitiveSchema>;
1040
+ export type IconPrimitive = z.infer<typeof iconPrimitiveSchema>;
1041
+ export type BadgePrimitive = z.infer<typeof badgePrimitiveSchema>;
1042
+ export type ButtonPrimitive = z.infer<typeof buttonPrimitiveSchema>;
1043
+ export type TextPrimitive = z.infer<typeof textPrimitiveSchema>;
1044
+ export type ImagePrimitive = z.infer<typeof imagePrimitiveSchema>;
1045
+ export type PricePrimitive = z.infer<typeof pricePrimitiveSchema>;
1046
+ export type AvailabilityPrimitive = z.infer<typeof availabilityPrimitiveSchema>;
1047
+ type LayoutAttributes = z.infer<z.ZodObject<typeof layoutAttributes>>;
1048
+ type RowAttributes = z.infer<z.ZodObject<typeof rowAttributes>>;
1049
+ type GridAttributes = z.infer<z.ZodObject<typeof gridAttributes>>;
1050
+ declare const repeaterAttributes: {
1051
+ limit: z.ZodOptional<z.ZodType<TaggedValue<z.ZodInt, {
1052
+ readonly setting: true;
1053
+ readonly token: false;
1054
+ }>, unknown, z.core.$ZodTypeInternals<TaggedValue<z.ZodInt, {
1055
+ readonly setting: true;
1056
+ readonly token: false;
1057
+ }>, unknown>>>;
1058
+ when: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1059
+ condition: z.ZodLiteral<"setting_on">;
1060
+ setting: z.ZodString;
1061
+ }, z.core.$strict>, z.ZodObject<{
1062
+ condition: z.ZodLiteral<"item_has_image">;
1063
+ }, z.core.$strict>, z.ZodObject<{
1064
+ condition: z.ZodLiteral<"item_available">;
1065
+ }, z.core.$strict>, z.ZodObject<{
1066
+ condition: z.ZodLiteral<"language_is">;
1067
+ language: z.ZodString;
1068
+ }, z.core.$strict>], "condition">>;
1069
+ };
1070
+ type RepeaterAttributes = z.infer<z.ZodObject<typeof repeaterAttributes>>;
1071
+ export interface StackPrimitive extends LayoutAttributes {
1072
+ primitive: 'stack';
1073
+ children: PrimitiveNode[];
1074
+ }
1075
+ export interface RowPrimitive extends RowAttributes {
1076
+ primitive: 'row';
1077
+ children: PrimitiveNode[];
1078
+ }
1079
+ /** Two or three columns of equal width, each child taking one cell in order. */
1080
+ export interface GridPrimitive extends GridAttributes {
1081
+ primitive: 'grid';
1082
+ children: PrimitiveNode[];
1083
+ }
1084
+ /**
1085
+ * The block's Binding, one item at a time. `children` is the template drawn
1086
+ * once per item; `empty` is what the block shows instead when the Binding
1087
+ * resolves to nothing. The repeater lays nothing out itself — its parent
1088
+ * does — so a ring strip is a row holding one, and a list is a stack.
1089
+ */
1090
+ export interface RepeaterPrimitive extends RepeaterAttributes {
1091
+ primitive: 'repeater';
1092
+ children: PrimitiveNode[];
1093
+ empty?: PrimitiveNode[];
1094
+ }
1095
+ export type PrimitiveNode = StackPrimitive | RowPrimitive | GridPrimitive | RepeaterPrimitive | SpacerPrimitive | DividerPrimitive | TextPrimitive | ImagePrimitive | IconPrimitive | BadgePrimitive | ButtonPrimitive | PricePrimitive | AvailabilityPrimitive;
1096
+ /**
1097
+ * Discriminated on the `primitive` tag so later vocabulary is one more member,
1098
+ * never a rewrite. A tag outside the vocabulary is refused at parse.
1099
+ */
1100
+ export declare const primitiveNodeSchema: z.ZodType<PrimitiveNode>;
1101
+ /**
1102
+ * A node whose tag this build does not know: a newer Primitive frozen into a
1103
+ * Release by a newer api. It parses and keeps its content so a phone can draw
1104
+ * nothing for it and the rest of the body, which is the no-crash rule a
1105
+ * Release needs to stay readable by every build that ever read it.
1106
+ */
1107
+ export interface UnlistedPrimitiveNode {
1108
+ primitive: string;
1109
+ [attribute: string]: unknown;
1110
+ }
1111
+ export interface EnvelopeStackPrimitive extends LayoutAttributes {
1112
+ primitive: 'stack';
1113
+ children: EnvelopePrimitiveNode[];
1114
+ }
1115
+ export interface EnvelopeRowPrimitive extends RowAttributes {
1116
+ primitive: 'row';
1117
+ children: EnvelopePrimitiveNode[];
1118
+ }
1119
+ export interface EnvelopeGridPrimitive extends GridAttributes {
1120
+ primitive: 'grid';
1121
+ children: EnvelopePrimitiveNode[];
1122
+ }
1123
+ export interface EnvelopeRepeaterPrimitive extends RepeaterAttributes {
1124
+ primitive: 'repeater';
1125
+ children: EnvelopePrimitiveNode[];
1126
+ empty?: EnvelopePrimitiveNode[];
1127
+ }
1128
+ /** A body as it travels in an envelope: every known Primitive strict, an unknown tag kept. */
1129
+ export type EnvelopePrimitiveNode = EnvelopeStackPrimitive | EnvelopeRowPrimitive | EnvelopeGridPrimitive | EnvelopeRepeaterPrimitive | SpacerPrimitive | DividerPrimitive | TextPrimitive | ImagePrimitive | IconPrimitive | BadgePrimitive | ButtonPrimitive | PricePrimitive | AvailabilityPrimitive | UnlistedPrimitiveNode;
1130
+ /**
1131
+ * Known tags parse strictly; an unknown tag falls back to the tolerant shape.
1132
+ * A malformed known node never slips through as unknown.
1133
+ */
1134
+ export declare const envelopePrimitiveNodeSchema: z.ZodType<EnvelopePrimitiveNode, unknown>;
1135
+ export declare function isListedPrimitive(tag: string): tag is PrimitiveType;
1136
+ /** The two slots a node holds other nodes in; both walk the same way. */
1137
+ declare const CHILD_SLOTS: readonly ["children", "empty"];
1138
+ export type PrimitiveChildSlot = (typeof CHILD_SLOTS)[number];
1139
+ /** Which slots each Primitive holds other nodes in; a leaf holds none. */
1140
+ export declare const PRIMITIVE_CHILD_SLOTS: Readonly<Record<PrimitiveType, readonly PrimitiveChildSlot[]>>;
1141
+ export interface UnknownPrimitive {
1142
+ readonly path: readonly (string | number)[];
1143
+ readonly primitive: string;
1144
+ }
1145
+ /**
1146
+ * Every node whose tag is outside the vocabulary, walked over the raw body
1147
+ * before any parse so the refusal can name the tag and where it sits.
1148
+ */
1149
+ export declare function unknownPrimitivesOf(body: unknown): UnknownPrimitive[];
1150
+ /** Where a reference sits, and whether a repeater's current item is in scope there. */
1151
+ interface BodyPosition {
1152
+ readonly path: readonly (string | number)[];
1153
+ readonly inRepeater: boolean;
1154
+ }
1155
+ export interface ComposedBodyReference extends BodyPosition {
1156
+ readonly reference: {
1157
+ setting: string;
1158
+ } | {
1159
+ token: string;
1160
+ };
1161
+ readonly slot: ValueSlot;
1162
+ }
1163
+ /** One place the body reads the repeater's current item, and what reads it. */
1164
+ export interface ComposedBodyItemUse extends BodyPosition {
1165
+ readonly use: string;
1166
+ }
1167
+ export interface ComposedBodyCondition extends BodyPosition {
1168
+ readonly condition: ShowWhen;
1169
+ }
1170
+ export interface ComposedBodyRepeater extends BodyPosition {
1171
+ readonly nested: boolean;
1172
+ }
1173
+ /** Every setting and token the body reads, with the slot each feeds. */
1174
+ export declare function composedBodyReferences(body: PrimitiveNode): ComposedBodyReference[];
1175
+ /**
1176
+ * Every place the body reads the repeater's current item: a value naming one
1177
+ * of its fields, a commerce leaf, or a condition asking about it.
1178
+ */
1179
+ export declare function composedBodyItemUses(body: PrimitiveNode): ComposedBodyItemUse[];
1180
+ /** Every "show when" the body carries, with where it sits. */
1181
+ export declare function composedBodyConditions(body: PrimitiveNode): ComposedBodyCondition[];
1182
+ /** Every repeater the body carries; `nested` marks one standing inside another. */
1183
+ export declare function composedBodyRepeaters(body: PrimitiveNode): ComposedBodyRepeater[];
1184
+ /** The options an enum slot accepts, for a select setting bound to it. */
1185
+ export declare function enumSlotValues(node: {
1186
+ primitive: string;
1187
+ }, attribute: string): readonly string[] | null;
1188
+ /** One asset a body names outright, and the attribute that names it. */
1189
+ export interface BodyAssetReference {
1190
+ readonly assetId: string;
1191
+ readonly path: readonly (string | number)[];
1192
+ }
1193
+ /** Every asset the body names outright, with the path of the attribute naming it. */
1194
+ export declare function composedBodyAssetReferences(body: unknown): readonly BodyAssetReference[];
1195
+ export declare function composedBodyAssetIds(body: unknown): readonly string[];
1196
+ export declare function composedBodyShape(body: PrimitiveNode): {
1197
+ nodes: number;
1198
+ depth: number;
1199
+ };
1200
+ /** The node at a body path, for a caller holding a reference's path. */
1201
+ export declare function nodeAtBodyPath(body: PrimitiveNode, path: readonly (string | number)[]): PrimitiveNode | undefined;
1202
+ export declare function isTokenRole(role: string): role is SemanticTokenKey;
1203
+ /** One role's value off a resolved theme style; undefined for a role that is not one. */
1204
+ export declare function tokenRoleValue(style: ThemeStyle, role: string): string | number | undefined;
1205
+ export {};
1206
+ //# sourceMappingURL=primitives.d.ts.map