@schema-engine/layout 0.0.0-stage → 0.5.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 (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -2
  3. package/dist/index.d.ts +37 -0
  4. package/dist/index.js +4 -0
  5. package/dist/index.js.map +7 -0
  6. package/dist/lib/appearance.d.ts +204 -0
  7. package/dist/lib/appearance.js +2 -0
  8. package/dist/lib/appearance.js.map +7 -0
  9. package/dist/lib/deep-readonly.d.ts +10 -0
  10. package/dist/lib/deep-readonly.js +0 -0
  11. package/dist/lib/deep-readonly.js.map +7 -0
  12. package/dist/lib/grid-placement.d.ts +107 -0
  13. package/dist/lib/grid-placement.js +1 -0
  14. package/dist/lib/grid-placement.js.map +7 -0
  15. package/dist/lib/grid-styles.d.ts +178 -0
  16. package/dist/lib/grid-styles.js +2 -0
  17. package/dist/lib/grid-styles.js.map +7 -0
  18. package/dist/lib/layout-issue.d.ts +12 -0
  19. package/dist/lib/layout-issue.js +0 -0
  20. package/dist/lib/layout-issue.js.map +7 -0
  21. package/dist/lib/layout-theme.d.ts +94 -0
  22. package/dist/lib/layout-theme.js +4 -0
  23. package/dist/lib/layout-theme.js.map +7 -0
  24. package/dist/recipes/bind-recipe.d.ts +12 -0
  25. package/dist/recipes/bind-recipe.js +1 -0
  26. package/dist/recipes/bind-recipe.js.map +7 -0
  27. package/dist/recipes/define-recipe-spec.d.ts +49 -0
  28. package/dist/recipes/define-recipe-spec.js +1 -0
  29. package/dist/recipes/define-recipe-spec.js.map +7 -0
  30. package/dist/recipes/merge-slot-defaults.d.ts +8 -0
  31. package/dist/recipes/merge-slot-defaults.js +1 -0
  32. package/dist/recipes/merge-slot-defaults.js.map +7 -0
  33. package/dist/recipes/protocol.d.ts +69 -0
  34. package/dist/recipes/protocol.js +1 -0
  35. package/dist/recipes/protocol.js.map +7 -0
  36. package/dist/recipes/resolve-recipe-view.d.ts +52 -0
  37. package/dist/recipes/resolve-recipe-view.js +1 -0
  38. package/dist/recipes/resolve-recipe-view.js.map +7 -0
  39. package/dist/recipes/types.d.ts +53 -0
  40. package/dist/recipes/types.js +0 -0
  41. package/dist/recipes/types.js.map +7 -0
  42. package/dist/recipes/view-model.d.ts +20 -0
  43. package/dist/recipes/view-model.js +1 -0
  44. package/dist/recipes/view-model.js.map +7 -0
  45. package/dist/schemas/appearance.d.ts +57 -0
  46. package/dist/schemas/appearance.js +1 -0
  47. package/dist/schemas/appearance.js.map +7 -0
  48. package/dist/schemas/grid.d.ts +666 -0
  49. package/dist/schemas/grid.js +1 -0
  50. package/dist/schemas/grid.js.map +7 -0
  51. package/package.json +75 -3
  52. package/skill/SKILL.md +79 -0
  53. package/skill/reference/layout.md +48 -0
@@ -0,0 +1,666 @@
1
+ import * as z from 'zod/mini';
2
+ /**
3
+ * Semantic gap tokens for grid layouts.
4
+ *
5
+ * @remarks
6
+ * Tokens are indirections to overridable CSS variables: the renderer emits
7
+ * `var(--se-grid-gap-<token>)`, so hosts restyle every grid by overriding the
8
+ * token at `:root`. Raw CSS strings (e.g. `'1.5rem'`) are the one-off escape
9
+ * hatch.
10
+ */
11
+ export declare const GridGapTokens: readonly ["none", "compact", "default", "loose", "wide"];
12
+ export type GridGapToken = (typeof GridGapTokens)[number];
13
+ /**
14
+ * Semantic gap token or a raw CSS length.
15
+ *
16
+ * @remarks
17
+ * The enum branch is redundant for validation — the string branch accepts the
18
+ * same values — and `z.infer` collapses the union to `string`. It is kept
19
+ * because `z.toJSONSchema` emits it as `anyOf: [{enum: [...]}, {type: string}]`,
20
+ * which is how the token vocabulary reaches registry and docs consumers.
21
+ */
22
+ export declare const GridGapValueSchema: z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
23
+ default: "default";
24
+ none: "none";
25
+ compact: "compact";
26
+ loose: "loose";
27
+ wide: "wide";
28
+ }>, z.ZodMiniString<string>]>;
29
+ export declare const GridBreakpointConfigSchema: z.ZodMiniObject<{
30
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
31
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
32
+ default: "default";
33
+ none: "none";
34
+ compact: "compact";
35
+ loose: "loose";
36
+ wide: "wide";
37
+ }>, z.ZodMiniString<string>]>>;
38
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
39
+ default: "default";
40
+ none: "none";
41
+ compact: "compact";
42
+ loose: "loose";
43
+ wide: "wide";
44
+ }>, z.ZodMiniString<string>]>>;
45
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
46
+ default: "default";
47
+ none: "none";
48
+ compact: "compact";
49
+ loose: "loose";
50
+ wide: "wide";
51
+ }>, z.ZodMiniString<string>]>>;
52
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
53
+ }, z.core.$strict>;
54
+ export declare const GridLayoutConfigSchema: z.ZodMiniObject<{
55
+ areas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniString<string>>, z.ZodMiniObject<{
56
+ default: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
57
+ sm: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
58
+ md: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
59
+ lg: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
60
+ xl: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
61
+ '2xl': z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
62
+ }, z.core.$strict>]>>;
63
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
64
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
65
+ default: "default";
66
+ none: "none";
67
+ compact: "compact";
68
+ loose: "loose";
69
+ wide: "wide";
70
+ }>, z.ZodMiniString<string>]>>;
71
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
72
+ default: "default";
73
+ none: "none";
74
+ compact: "compact";
75
+ loose: "loose";
76
+ wide: "wide";
77
+ }>, z.ZodMiniString<string>]>>;
78
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
79
+ default: "default";
80
+ none: "none";
81
+ compact: "compact";
82
+ loose: "loose";
83
+ wide: "wide";
84
+ }>, z.ZodMiniString<string>]>>;
85
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
86
+ justifyItems: z.ZodMiniOptional<z.ZodMiniEnum<{
87
+ start: "start";
88
+ end: "end";
89
+ center: "center";
90
+ stretch: "stretch";
91
+ }>>;
92
+ alignItems: z.ZodMiniOptional<z.ZodMiniEnum<{
93
+ start: "start";
94
+ end: "end";
95
+ center: "center";
96
+ stretch: "stretch";
97
+ }>>;
98
+ placeItems: z.ZodMiniOptional<z.ZodMiniString<string>>;
99
+ justifyContent: z.ZodMiniOptional<z.ZodMiniEnum<{
100
+ start: "start";
101
+ end: "end";
102
+ center: "center";
103
+ stretch: "stretch";
104
+ "space-around": "space-around";
105
+ "space-between": "space-between";
106
+ "space-evenly": "space-evenly";
107
+ }>>;
108
+ alignContent: z.ZodMiniOptional<z.ZodMiniEnum<{
109
+ start: "start";
110
+ end: "end";
111
+ center: "center";
112
+ stretch: "stretch";
113
+ "space-around": "space-around";
114
+ "space-between": "space-between";
115
+ "space-evenly": "space-evenly";
116
+ }>>;
117
+ placeContent: z.ZodMiniOptional<z.ZodMiniString<string>>;
118
+ responsive: z.ZodMiniOptional<z.ZodMiniObject<{
119
+ default: z.ZodMiniOptional<z.ZodMiniObject<{
120
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
121
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
122
+ default: "default";
123
+ none: "none";
124
+ compact: "compact";
125
+ loose: "loose";
126
+ wide: "wide";
127
+ }>, z.ZodMiniString<string>]>>;
128
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
129
+ default: "default";
130
+ none: "none";
131
+ compact: "compact";
132
+ loose: "loose";
133
+ wide: "wide";
134
+ }>, z.ZodMiniString<string>]>>;
135
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
136
+ default: "default";
137
+ none: "none";
138
+ compact: "compact";
139
+ loose: "loose";
140
+ wide: "wide";
141
+ }>, z.ZodMiniString<string>]>>;
142
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
143
+ }, z.core.$strict>>;
144
+ sm: z.ZodMiniOptional<z.ZodMiniObject<{
145
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
146
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
147
+ default: "default";
148
+ none: "none";
149
+ compact: "compact";
150
+ loose: "loose";
151
+ wide: "wide";
152
+ }>, z.ZodMiniString<string>]>>;
153
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
154
+ default: "default";
155
+ none: "none";
156
+ compact: "compact";
157
+ loose: "loose";
158
+ wide: "wide";
159
+ }>, z.ZodMiniString<string>]>>;
160
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
161
+ default: "default";
162
+ none: "none";
163
+ compact: "compact";
164
+ loose: "loose";
165
+ wide: "wide";
166
+ }>, z.ZodMiniString<string>]>>;
167
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
168
+ }, z.core.$strict>>;
169
+ md: z.ZodMiniOptional<z.ZodMiniObject<{
170
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
171
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
172
+ default: "default";
173
+ none: "none";
174
+ compact: "compact";
175
+ loose: "loose";
176
+ wide: "wide";
177
+ }>, z.ZodMiniString<string>]>>;
178
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
179
+ default: "default";
180
+ none: "none";
181
+ compact: "compact";
182
+ loose: "loose";
183
+ wide: "wide";
184
+ }>, z.ZodMiniString<string>]>>;
185
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
186
+ default: "default";
187
+ none: "none";
188
+ compact: "compact";
189
+ loose: "loose";
190
+ wide: "wide";
191
+ }>, z.ZodMiniString<string>]>>;
192
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
193
+ }, z.core.$strict>>;
194
+ lg: z.ZodMiniOptional<z.ZodMiniObject<{
195
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
196
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
197
+ default: "default";
198
+ none: "none";
199
+ compact: "compact";
200
+ loose: "loose";
201
+ wide: "wide";
202
+ }>, z.ZodMiniString<string>]>>;
203
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
204
+ default: "default";
205
+ none: "none";
206
+ compact: "compact";
207
+ loose: "loose";
208
+ wide: "wide";
209
+ }>, z.ZodMiniString<string>]>>;
210
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
211
+ default: "default";
212
+ none: "none";
213
+ compact: "compact";
214
+ loose: "loose";
215
+ wide: "wide";
216
+ }>, z.ZodMiniString<string>]>>;
217
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
218
+ }, z.core.$strict>>;
219
+ xl: z.ZodMiniOptional<z.ZodMiniObject<{
220
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
221
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
222
+ default: "default";
223
+ none: "none";
224
+ compact: "compact";
225
+ loose: "loose";
226
+ wide: "wide";
227
+ }>, z.ZodMiniString<string>]>>;
228
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
229
+ default: "default";
230
+ none: "none";
231
+ compact: "compact";
232
+ loose: "loose";
233
+ wide: "wide";
234
+ }>, z.ZodMiniString<string>]>>;
235
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
236
+ default: "default";
237
+ none: "none";
238
+ compact: "compact";
239
+ loose: "loose";
240
+ wide: "wide";
241
+ }>, z.ZodMiniString<string>]>>;
242
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
243
+ }, z.core.$strict>>;
244
+ '2xl': z.ZodMiniOptional<z.ZodMiniObject<{
245
+ columns: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniLiteral<"auto">]>>;
246
+ gap: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
247
+ default: "default";
248
+ none: "none";
249
+ compact: "compact";
250
+ loose: "loose";
251
+ wide: "wide";
252
+ }>, z.ZodMiniString<string>]>>;
253
+ gapX: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
254
+ default: "default";
255
+ none: "none";
256
+ compact: "compact";
257
+ loose: "loose";
258
+ wide: "wide";
259
+ }>, z.ZodMiniString<string>]>>;
260
+ gapY: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
261
+ default: "default";
262
+ none: "none";
263
+ compact: "compact";
264
+ loose: "loose";
265
+ wide: "wide";
266
+ }>, z.ZodMiniString<string>]>>;
267
+ minColumnWidth: z.ZodMiniOptional<z.ZodMiniString<string>>;
268
+ }, z.core.$strict>>;
269
+ }, z.core.$strict>>;
270
+ }, z.core.$strict>;
271
+ /**
272
+ * Named item widths, as shares of the row.
273
+ *
274
+ * @remarks
275
+ * A grid whose items use `width` or `offset` is laid out on 12 tracks, so
276
+ * every name is a whole number of tracks: `full` 12, `three-quarters` 9,
277
+ * `two-thirds` 8, `half` 6, `third` 4, `quarter` 3. An item that sets no width
278
+ * fills the row.
279
+ */
280
+ export declare const GridWidthNames: readonly ["full", "three-quarters", "two-thirds", "half", "third", "quarter"];
281
+ export type GridWidthName = (typeof GridWidthNames)[number];
282
+ /** Named offsets: the widths that are a fraction of the row, without `full`. */
283
+ export declare const GridOffsetNames: readonly ["three-quarters", "two-thirds", "half", "third", "quarter"];
284
+ export type GridOffsetName = (typeof GridOffsetNames)[number];
285
+ export declare const ItemGridBreakpointSchema: z.ZodMiniObject<{
286
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
287
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
288
+ full: "full";
289
+ "three-quarters": "three-quarters";
290
+ "two-thirds": "two-thirds";
291
+ half: "half";
292
+ third: "third";
293
+ quarter: "quarter";
294
+ }>>;
295
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
296
+ "three-quarters": "three-quarters";
297
+ "two-thirds": "two-thirds";
298
+ half: "half";
299
+ third: "third";
300
+ quarter: "quarter";
301
+ }>>;
302
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
303
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
304
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
305
+ start: "start";
306
+ end: "end";
307
+ center: "center";
308
+ stretch: "stretch";
309
+ }>>;
310
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
311
+ start: "start";
312
+ end: "end";
313
+ center: "center";
314
+ stretch: "stretch";
315
+ }>>;
316
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
317
+ default: "default";
318
+ none: "none";
319
+ compact: "compact";
320
+ loose: "loose";
321
+ wide: "wide";
322
+ }>, z.ZodMiniString<string>]>>;
323
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
324
+ default: "default";
325
+ none: "none";
326
+ compact: "compact";
327
+ loose: "loose";
328
+ wide: "wide";
329
+ }>, z.ZodMiniString<string>]>>;
330
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
331
+ }, z.core.$strict>;
332
+ export declare const ElementGridConfigSchema: z.ZodMiniObject<{
333
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
334
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
335
+ full: "full";
336
+ "three-quarters": "three-quarters";
337
+ "two-thirds": "two-thirds";
338
+ half: "half";
339
+ third: "third";
340
+ quarter: "quarter";
341
+ }>>;
342
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
343
+ "three-quarters": "three-quarters";
344
+ "two-thirds": "two-thirds";
345
+ half: "half";
346
+ third: "third";
347
+ quarter: "quarter";
348
+ }>>;
349
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
350
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
351
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
352
+ start: "start";
353
+ end: "end";
354
+ center: "center";
355
+ stretch: "stretch";
356
+ }>>;
357
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
358
+ start: "start";
359
+ end: "end";
360
+ center: "center";
361
+ stretch: "stretch";
362
+ }>>;
363
+ placeSelf: z.ZodMiniOptional<z.ZodMiniString<string>>;
364
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
365
+ default: "default";
366
+ none: "none";
367
+ compact: "compact";
368
+ loose: "loose";
369
+ wide: "wide";
370
+ }>, z.ZodMiniString<string>]>>;
371
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
372
+ default: "default";
373
+ none: "none";
374
+ compact: "compact";
375
+ loose: "loose";
376
+ wide: "wide";
377
+ }>, z.ZodMiniString<string>]>>;
378
+ responsive: z.ZodMiniOptional<z.ZodMiniObject<{
379
+ default: z.ZodMiniOptional<z.ZodMiniObject<{
380
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
381
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
382
+ full: "full";
383
+ "three-quarters": "three-quarters";
384
+ "two-thirds": "two-thirds";
385
+ half: "half";
386
+ third: "third";
387
+ quarter: "quarter";
388
+ }>>;
389
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
390
+ "three-quarters": "three-quarters";
391
+ "two-thirds": "two-thirds";
392
+ half: "half";
393
+ third: "third";
394
+ quarter: "quarter";
395
+ }>>;
396
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
397
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
398
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
399
+ start: "start";
400
+ end: "end";
401
+ center: "center";
402
+ stretch: "stretch";
403
+ }>>;
404
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
405
+ start: "start";
406
+ end: "end";
407
+ center: "center";
408
+ stretch: "stretch";
409
+ }>>;
410
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
411
+ default: "default";
412
+ none: "none";
413
+ compact: "compact";
414
+ loose: "loose";
415
+ wide: "wide";
416
+ }>, z.ZodMiniString<string>]>>;
417
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
418
+ default: "default";
419
+ none: "none";
420
+ compact: "compact";
421
+ loose: "loose";
422
+ wide: "wide";
423
+ }>, z.ZodMiniString<string>]>>;
424
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
425
+ }, z.core.$strict>>;
426
+ sm: z.ZodMiniOptional<z.ZodMiniObject<{
427
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
428
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
429
+ full: "full";
430
+ "three-quarters": "three-quarters";
431
+ "two-thirds": "two-thirds";
432
+ half: "half";
433
+ third: "third";
434
+ quarter: "quarter";
435
+ }>>;
436
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
437
+ "three-quarters": "three-quarters";
438
+ "two-thirds": "two-thirds";
439
+ half: "half";
440
+ third: "third";
441
+ quarter: "quarter";
442
+ }>>;
443
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
444
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
445
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
446
+ start: "start";
447
+ end: "end";
448
+ center: "center";
449
+ stretch: "stretch";
450
+ }>>;
451
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
452
+ start: "start";
453
+ end: "end";
454
+ center: "center";
455
+ stretch: "stretch";
456
+ }>>;
457
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
458
+ default: "default";
459
+ none: "none";
460
+ compact: "compact";
461
+ loose: "loose";
462
+ wide: "wide";
463
+ }>, z.ZodMiniString<string>]>>;
464
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
465
+ default: "default";
466
+ none: "none";
467
+ compact: "compact";
468
+ loose: "loose";
469
+ wide: "wide";
470
+ }>, z.ZodMiniString<string>]>>;
471
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
472
+ }, z.core.$strict>>;
473
+ md: z.ZodMiniOptional<z.ZodMiniObject<{
474
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
475
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
476
+ full: "full";
477
+ "three-quarters": "three-quarters";
478
+ "two-thirds": "two-thirds";
479
+ half: "half";
480
+ third: "third";
481
+ quarter: "quarter";
482
+ }>>;
483
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
484
+ "three-quarters": "three-quarters";
485
+ "two-thirds": "two-thirds";
486
+ half: "half";
487
+ third: "third";
488
+ quarter: "quarter";
489
+ }>>;
490
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
491
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
492
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
493
+ start: "start";
494
+ end: "end";
495
+ center: "center";
496
+ stretch: "stretch";
497
+ }>>;
498
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
499
+ start: "start";
500
+ end: "end";
501
+ center: "center";
502
+ stretch: "stretch";
503
+ }>>;
504
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
505
+ default: "default";
506
+ none: "none";
507
+ compact: "compact";
508
+ loose: "loose";
509
+ wide: "wide";
510
+ }>, z.ZodMiniString<string>]>>;
511
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
512
+ default: "default";
513
+ none: "none";
514
+ compact: "compact";
515
+ loose: "loose";
516
+ wide: "wide";
517
+ }>, z.ZodMiniString<string>]>>;
518
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
519
+ }, z.core.$strict>>;
520
+ lg: z.ZodMiniOptional<z.ZodMiniObject<{
521
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
522
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
523
+ full: "full";
524
+ "three-quarters": "three-quarters";
525
+ "two-thirds": "two-thirds";
526
+ half: "half";
527
+ third: "third";
528
+ quarter: "quarter";
529
+ }>>;
530
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
531
+ "three-quarters": "three-quarters";
532
+ "two-thirds": "two-thirds";
533
+ half: "half";
534
+ third: "third";
535
+ quarter: "quarter";
536
+ }>>;
537
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
538
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
539
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
540
+ start: "start";
541
+ end: "end";
542
+ center: "center";
543
+ stretch: "stretch";
544
+ }>>;
545
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
546
+ start: "start";
547
+ end: "end";
548
+ center: "center";
549
+ stretch: "stretch";
550
+ }>>;
551
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
552
+ default: "default";
553
+ none: "none";
554
+ compact: "compact";
555
+ loose: "loose";
556
+ wide: "wide";
557
+ }>, z.ZodMiniString<string>]>>;
558
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
559
+ default: "default";
560
+ none: "none";
561
+ compact: "compact";
562
+ loose: "loose";
563
+ wide: "wide";
564
+ }>, z.ZodMiniString<string>]>>;
565
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
566
+ }, z.core.$strict>>;
567
+ xl: z.ZodMiniOptional<z.ZodMiniObject<{
568
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
569
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
570
+ full: "full";
571
+ "three-quarters": "three-quarters";
572
+ "two-thirds": "two-thirds";
573
+ half: "half";
574
+ third: "third";
575
+ quarter: "quarter";
576
+ }>>;
577
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
578
+ "three-quarters": "three-quarters";
579
+ "two-thirds": "two-thirds";
580
+ half: "half";
581
+ third: "third";
582
+ quarter: "quarter";
583
+ }>>;
584
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
585
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
586
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
587
+ start: "start";
588
+ end: "end";
589
+ center: "center";
590
+ stretch: "stretch";
591
+ }>>;
592
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
593
+ start: "start";
594
+ end: "end";
595
+ center: "center";
596
+ stretch: "stretch";
597
+ }>>;
598
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
599
+ default: "default";
600
+ none: "none";
601
+ compact: "compact";
602
+ loose: "loose";
603
+ wide: "wide";
604
+ }>, z.ZodMiniString<string>]>>;
605
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
606
+ default: "default";
607
+ none: "none";
608
+ compact: "compact";
609
+ loose: "loose";
610
+ wide: "wide";
611
+ }>, z.ZodMiniString<string>]>>;
612
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
613
+ }, z.core.$strict>>;
614
+ '2xl': z.ZodMiniOptional<z.ZodMiniObject<{
615
+ area: z.ZodMiniOptional<z.ZodMiniString<string>>;
616
+ width: z.ZodMiniOptional<z.ZodMiniEnum<{
617
+ full: "full";
618
+ "three-quarters": "three-quarters";
619
+ "two-thirds": "two-thirds";
620
+ half: "half";
621
+ third: "third";
622
+ quarter: "quarter";
623
+ }>>;
624
+ offset: z.ZodMiniOptional<z.ZodMiniEnum<{
625
+ "three-quarters": "three-quarters";
626
+ "two-thirds": "two-thirds";
627
+ half: "half";
628
+ third: "third";
629
+ quarter: "quarter";
630
+ }>>;
631
+ column: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
632
+ row: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniString<string>]>>;
633
+ justifySelf: z.ZodMiniOptional<z.ZodMiniEnum<{
634
+ start: "start";
635
+ end: "end";
636
+ center: "center";
637
+ stretch: "stretch";
638
+ }>>;
639
+ alignSelf: z.ZodMiniOptional<z.ZodMiniEnum<{
640
+ start: "start";
641
+ end: "end";
642
+ center: "center";
643
+ stretch: "stretch";
644
+ }>>;
645
+ marginBlockStart: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
646
+ default: "default";
647
+ none: "none";
648
+ compact: "compact";
649
+ loose: "loose";
650
+ wide: "wide";
651
+ }>, z.ZodMiniString<string>]>>;
652
+ marginBlockEnd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
653
+ default: "default";
654
+ none: "none";
655
+ compact: "compact";
656
+ loose: "loose";
657
+ wide: "wide";
658
+ }>, z.ZodMiniString<string>]>>;
659
+ hidden: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
660
+ }, z.core.$strict>>;
661
+ }, z.core.$strict>>;
662
+ }, z.core.$strict>;
663
+ export type GridBreakpointConfig = z.infer<typeof GridBreakpointConfigSchema>;
664
+ export type ItemGridBreakpointConfig = z.infer<typeof ItemGridBreakpointSchema>;
665
+ export type ElementGridConfig = z.infer<typeof ElementGridConfigSchema>;
666
+ export type GridLayoutConfig = z.infer<typeof GridLayoutConfigSchema>;
@@ -0,0 +1 @@
1
+ import*as e from"zod/mini";var z=["none","compact","default","loose","wide"],o=e.union([e.enum(z),e.string()]).check(e.describe("Semantic gap token (none | compact | default | loose | wide) or a raw CSS length.")),m=["auto","span","none","default","inherit","initial","unset","revert","revert-layer"];function u(t){return t.split("").map(n=>/[a-z]/i.test(n)?`[${n.toLowerCase()}${n.toUpperCase()}]`:n).join("")}var r=`(?!(?:${m.map(u).join("|")})(?![\\w-]))-?[_a-zA-Z][_a-zA-Z0-9-]*`,f=e.string().check(e.regex(new RegExp(`^${r}$`),'Area names are CSS identifiers such as "header" or "side-2".'),e.describe('Name of a cell group in the grid template: a CSS identifier such as "header" or "side-2".'));function p(t){return e.strictObject({default:e.optional(t),sm:e.optional(t),md:e.optional(t),lg:e.optional(t),xl:e.optional(t),"2xl":e.optional(t)})}function c(t){return e.optional(p(t))}var h=e.string().check(e.regex(new RegExp(`^\\s*(?:\\.+|${r})(?:\\s+(?:\\.+|${r}))*\\s*$`),'A grid areas row lists area names (CSS identifiers) or "." for an empty cell, separated by spaces.')),i=e.array(h).check(e.minLength(1)),g=e.union([i,p(i)]).check(e.describe('Rows of area names separated by spaces ("." is an empty cell), or a record of them per breakpoint (default, sm ... 2xl).')),l=e.strictObject({areas:e.optional(g),columns:e.optional(e.union([e.number(),e.literal("auto")])),gap:e.optional(o),gapX:e.optional(o),gapY:e.optional(o),minColumnWidth:e.optional(e.string()),justifyItems:e.optional(e.enum(["start","end","center","stretch"])),alignItems:e.optional(e.enum(["start","end","center","stretch"])),placeItems:e.optional(e.string()),justifyContent:e.optional(e.enum(["start","end","center","stretch","space-around","space-between","space-evenly"])),alignContent:e.optional(e.enum(["start","end","center","stretch","space-around","space-between","space-evenly"])),placeContent:e.optional(e.string())}),y=e.pick(l,{columns:!0,gap:!0,gapX:!0,gapY:!0,minColumnWidth:!0}),G=e.extend(l,{responsive:c(y)}),a=["full","three-quarters","two-thirds","half","third","quarter"],s=["three-quarters","two-thirds","half","third","quarter"],d=e.strictObject({area:e.optional(f).check(e.describe("Name of the cell group this item fills in the grid areas template.")),width:e.optional(e.enum(a)).check(e.describe(`Named share of the row (${a.join(" | ")}).`)),offset:e.optional(e.enum(s)).check(e.describe(`Named empty space before the item (${s.join(" | ")}).`)),column:e.optional(e.union([e.number(),e.string()])),row:e.optional(e.union([e.number(),e.string()])),justifySelf:e.optional(e.enum(["start","end","center","stretch"])),alignSelf:e.optional(e.enum(["start","end","center","stretch"])),placeSelf:e.optional(e.string()),marginBlockStart:e.optional(o).check(e.describe("Extra space before this element, on top of the grid row gap.")),marginBlockEnd:e.optional(o).check(e.describe("Extra space after this element, on top of the grid row gap."))}),S=e.extend(e.omit(d,{placeSelf:!0}),{hidden:e.optional(e.boolean())}),x=e.extend(d,{responsive:c(S)});export{x as ElementGridConfigSchema,y as GridBreakpointConfigSchema,z as GridGapTokens,o as GridGapValueSchema,G as GridLayoutConfigSchema,s as GridOffsetNames,a as GridWidthNames,S as ItemGridBreakpointSchema};