tsquare 0.1.0 → 0.3.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 (50) hide show
  1. package/README.md +34 -8
  2. package/assets/mark.png +0 -0
  3. package/bin/tsquare.js +2 -6
  4. package/dist/catalog.d.ts +1055 -0
  5. package/dist/chunks/chunk-46MGJLGB.js +2126 -0
  6. package/{src/cli.ts → dist/cli.js} +28 -24
  7. package/dist/colors.d.ts +29 -0
  8. package/dist/compile.d.ts +24 -0
  9. package/dist/components.d.ts +83 -0
  10. package/dist/icons.d.ts +12 -0
  11. package/dist/index.d.ts +10 -0
  12. package/dist/index.js +54 -0
  13. package/dist/layout.d.ts +66 -0
  14. package/dist/playground/index.d.ts +38 -0
  15. package/dist/playground/index.html +325 -0
  16. package/dist/playground/index.js +466 -0
  17. package/dist/playground/language-data.d.ts +28 -0
  18. package/dist/playground/playground.js +47 -0
  19. package/dist/playground/reference.d.ts +11 -0
  20. package/dist/print.d.ts +2 -0
  21. package/dist/prompt-example.d.ts +3 -0
  22. package/dist/prompt.d.ts +22 -0
  23. package/dist/render.d.ts +40 -0
  24. package/dist/schema.d.ts +33 -0
  25. package/dist/share.d.ts +4 -0
  26. package/dist/suggest.d.ts +5 -0
  27. package/dist/text.d.ts +50 -0
  28. package/examples/checkout.tsq +15 -0
  29. package/examples/dashboard.tsq +27 -0
  30. package/examples/notes-mobile.tsq +84 -0
  31. package/examples/notes-web.tsq +54 -0
  32. package/examples/sign-in.tsq +14 -0
  33. package/examples/states.tsq +16 -0
  34. package/package.json +31 -7
  35. package/skill/tsquare/SKILL.md +5 -4
  36. package/skill/tsquare/reference.md +7 -6
  37. package/src/catalog.ts +0 -329
  38. package/src/colors.ts +0 -82
  39. package/src/compile.ts +0 -64
  40. package/src/components.tsx +0 -1057
  41. package/src/icons.ts +0 -54
  42. package/src/index.ts +0 -11
  43. package/src/layout.ts +0 -63
  44. package/src/print.ts +0 -73
  45. package/src/prompt-example.ts +0 -43
  46. package/src/prompt.ts +0 -121
  47. package/src/render.ts +0 -178
  48. package/src/schema.ts +0 -43
  49. package/src/suggest.ts +0 -34
  50. package/src/text.ts +0 -333
@@ -0,0 +1,1055 @@
1
+ import { z } from "zod";
2
+ export declare const componentDefinitions: {
3
+ Board: {
4
+ props: z.ZodObject<{
5
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ layout: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
7
+ grid: "grid";
8
+ row: "row";
9
+ }>>>;
10
+ columns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
11
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13
+ accent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ }, z.core.$strip>;
15
+ slots: string[];
16
+ description: string;
17
+ example: {
18
+ title: string;
19
+ layout: string;
20
+ gap: number;
21
+ };
22
+ };
23
+ Screen: {
24
+ props: z.ZodObject<{
25
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ device: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
27
+ custom: "custom";
28
+ desktop: "desktop";
29
+ phone: "phone";
30
+ tablet: "tablet";
31
+ }>>>;
32
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
34
+ chrome: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
35
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
36
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
37
+ }, z.core.$strip>;
38
+ slots: string[];
39
+ description: string;
40
+ example: {
41
+ name: string;
42
+ device: string;
43
+ };
44
+ };
45
+ Note: {
46
+ props: z.ZodObject<{
47
+ text: z.ZodString;
48
+ color: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
49
+ blue: "blue";
50
+ green: "green";
51
+ pink: "pink";
52
+ yellow: "yellow";
53
+ }>>>;
54
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
55
+ }, z.core.$strip>;
56
+ slots: never[];
57
+ description: string;
58
+ example: {
59
+ text: string;
60
+ color: string;
61
+ };
62
+ };
63
+ Stack: {
64
+ props: z.ZodObject<{
65
+ direction: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
66
+ column: "column";
67
+ row: "row";
68
+ }>>>;
69
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
70
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
71
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
72
+ center: "center";
73
+ end: "end";
74
+ start: "start";
75
+ stretch: "stretch";
76
+ }>>>;
77
+ justify: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
78
+ around: "around";
79
+ between: "between";
80
+ center: "center";
81
+ end: "end";
82
+ start: "start";
83
+ }>>>;
84
+ wrap: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
85
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
86
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
87
+ border: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
88
+ all: "all";
89
+ bottom: "bottom";
90
+ left: "left";
91
+ none: "none";
92
+ right: "right";
93
+ top: "top";
94
+ }>>>;
95
+ fill: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
96
+ }, z.core.$strip>;
97
+ slots: string[];
98
+ description: string;
99
+ example: {
100
+ direction: string;
101
+ gap: number;
102
+ align: string;
103
+ };
104
+ };
105
+ Grid: {
106
+ props: z.ZodObject<{
107
+ columns: z.ZodNumber;
108
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
109
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
110
+ }, z.core.$strip>;
111
+ slots: string[];
112
+ description: string;
113
+ example: {
114
+ columns: number;
115
+ gap: number;
116
+ };
117
+ };
118
+ Card: {
119
+ props: z.ZodObject<{
120
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
122
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
123
+ variant: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
124
+ filled: "filled";
125
+ outline: "outline";
126
+ }>>>;
127
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
128
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
129
+ }, z.core.$strip>;
130
+ slots: string[];
131
+ description: string;
132
+ example: {
133
+ title: string;
134
+ variant: string;
135
+ };
136
+ };
137
+ Divider: {
138
+ props: z.ZodObject<{
139
+ vertical: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
140
+ }, z.core.$strip>;
141
+ slots: never[];
142
+ description: string;
143
+ example: {};
144
+ };
145
+ Spacer: {
146
+ props: z.ZodObject<{
147
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
148
+ }, z.core.$strip>;
149
+ slots: never[];
150
+ description: string;
151
+ example: {
152
+ size: number;
153
+ };
154
+ };
155
+ Heading: {
156
+ props: z.ZodObject<{
157
+ text: z.ZodString;
158
+ level: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>>;
159
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
160
+ center: "center";
161
+ left: "left";
162
+ right: "right";
163
+ }>>>;
164
+ }, z.core.$strip>;
165
+ slots: never[];
166
+ description: string;
167
+ example: {
168
+ text: string;
169
+ level: number;
170
+ };
171
+ };
172
+ Text: {
173
+ props: z.ZodObject<{
174
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
175
+ lines: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
176
+ size: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
177
+ lg: "lg";
178
+ md: "md";
179
+ sm: "sm";
180
+ }>>>;
181
+ muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
182
+ bold: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
183
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
184
+ center: "center";
185
+ left: "left";
186
+ right: "right";
187
+ }>>>;
188
+ }, z.core.$strip>;
189
+ slots: never[];
190
+ description: string;
191
+ example: {
192
+ lines: number;
193
+ };
194
+ };
195
+ Image: {
196
+ props: z.ZodObject<{
197
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
198
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
199
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ rounded: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
201
+ }, z.core.$strip>;
202
+ slots: never[];
203
+ description: string;
204
+ example: {
205
+ height: number;
206
+ label: string;
207
+ };
208
+ };
209
+ Icon: {
210
+ props: z.ZodObject<{
211
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
213
+ }, z.core.$strip>;
214
+ slots: never[];
215
+ description: string;
216
+ example: {
217
+ name: string;
218
+ size: number;
219
+ };
220
+ };
221
+ Avatar: {
222
+ props: z.ZodObject<{
223
+ initials: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
225
+ }, z.core.$strip>;
226
+ slots: never[];
227
+ description: string;
228
+ example: {
229
+ initials: string;
230
+ size: number;
231
+ };
232
+ };
233
+ Badge: {
234
+ props: z.ZodObject<{
235
+ label: z.ZodString;
236
+ variant: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
237
+ outline: "outline";
238
+ solid: "solid";
239
+ }>>>;
240
+ tone: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
241
+ danger: "danger";
242
+ neutral: "neutral";
243
+ success: "success";
244
+ warning: "warning";
245
+ }>>>;
246
+ }, z.core.$strip>;
247
+ slots: never[];
248
+ description: string;
249
+ example: {
250
+ label: string;
251
+ variant: string;
252
+ };
253
+ };
254
+ Button: {
255
+ props: z.ZodObject<{
256
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
+ variant: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
258
+ ghost: "ghost";
259
+ primary: "primary";
260
+ secondary: "secondary";
261
+ }>>>;
262
+ size: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
263
+ lg: "lg";
264
+ md: "md";
265
+ sm: "sm";
266
+ }>>>;
267
+ leadingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
268
+ trailingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
269
+ fullWidth: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
270
+ }, z.core.$strip>;
271
+ slots: never[];
272
+ description: string;
273
+ example: {
274
+ label: string;
275
+ variant: string;
276
+ fullWidth: boolean;
277
+ };
278
+ };
279
+ Input: {
280
+ props: z.ZodObject<{
281
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
282
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
+ type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
285
+ email: "email";
286
+ password: "password";
287
+ search: "search";
288
+ text: "text";
289
+ }>>>;
290
+ multiline: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
291
+ helper: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
+ error: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
293
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
294
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
295
+ }, z.core.$strip>;
296
+ slots: never[];
297
+ description: string;
298
+ example: {
299
+ label: string;
300
+ placeholder: string;
301
+ };
302
+ };
303
+ Checkbox: {
304
+ props: z.ZodObject<{
305
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
306
+ checked: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
307
+ }, z.core.$strip>;
308
+ slots: never[];
309
+ description: string;
310
+ example: {
311
+ label: string;
312
+ checked: boolean;
313
+ };
314
+ };
315
+ Radio: {
316
+ props: z.ZodObject<{
317
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
+ checked: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
319
+ }, z.core.$strip>;
320
+ slots: never[];
321
+ description: string;
322
+ example: {
323
+ label: string;
324
+ checked: boolean;
325
+ };
326
+ };
327
+ Toggle: {
328
+ props: z.ZodObject<{
329
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
+ on: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
331
+ }, z.core.$strip>;
332
+ slots: never[];
333
+ description: string;
334
+ example: {
335
+ label: string;
336
+ on: boolean;
337
+ };
338
+ };
339
+ Select: {
340
+ props: z.ZodObject<{
341
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
342
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
343
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
344
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
345
+ }, z.core.$strip>;
346
+ slots: never[];
347
+ description: string;
348
+ example: {
349
+ label: string;
350
+ value: string;
351
+ };
352
+ };
353
+ NavBar: {
354
+ props: z.ZodObject<{
355
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
+ leading: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
357
+ back: "back";
358
+ close: "close";
359
+ logo: "logo";
360
+ menu: "menu";
361
+ none: "none";
362
+ }>>>;
363
+ actions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
364
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
365
+ center: "center";
366
+ left: "left";
367
+ }>>>;
368
+ }, z.core.$strip>;
369
+ slots: never[];
370
+ description: string;
371
+ example: {
372
+ title: string;
373
+ leading: string;
374
+ actions: string[];
375
+ };
376
+ };
377
+ TabBar: {
378
+ props: z.ZodObject<{
379
+ items: z.ZodArray<z.ZodObject<{
380
+ label: z.ZodString;
381
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ }, z.core.$strip>>;
383
+ active: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
384
+ }, z.core.$strip>;
385
+ slots: never[];
386
+ description: string;
387
+ example: {
388
+ items: {
389
+ label: string;
390
+ icon: string;
391
+ }[];
392
+ active: number;
393
+ };
394
+ };
395
+ Tabs: {
396
+ props: z.ZodObject<{
397
+ items: z.ZodArray<z.ZodString>;
398
+ active: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
399
+ }, z.core.$strip>;
400
+ slots: never[];
401
+ description: string;
402
+ example: {
403
+ items: string[];
404
+ active: number;
405
+ };
406
+ };
407
+ List: {
408
+ props: z.ZodObject<{
409
+ dividers: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
410
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
411
+ }, z.core.$strip>;
412
+ slots: string[];
413
+ description: string;
414
+ example: {
415
+ dividers: boolean;
416
+ };
417
+ };
418
+ ListItem: {
419
+ props: z.ZodObject<{
420
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
421
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
422
+ leading: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
423
+ avatar: "avatar";
424
+ checkbox: "checkbox";
425
+ icon: "icon";
426
+ image: "image";
427
+ none: "none";
428
+ }>>>;
429
+ leadingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
+ trailing: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
431
+ badge: "badge";
432
+ chevron: "chevron";
433
+ icon: "icon";
434
+ none: "none";
435
+ text: "text";
436
+ toggle: "toggle";
437
+ }>>>;
438
+ trailingText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
439
+ trailingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
440
+ }, z.core.$strip>;
441
+ slots: never[];
442
+ description: string;
443
+ example: {
444
+ title: string;
445
+ subtitle: string;
446
+ leadingIcon: string;
447
+ trailing: string;
448
+ };
449
+ };
450
+ Table: {
451
+ props: z.ZodObject<{
452
+ columns: z.ZodArray<z.ZodString>;
453
+ rows: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
454
+ data: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodString>>>>;
455
+ }, z.core.$strip>;
456
+ slots: never[];
457
+ description: string;
458
+ example: {
459
+ columns: string[];
460
+ rows: number;
461
+ };
462
+ };
463
+ Modal: {
464
+ props: z.ZodObject<{
465
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
466
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
467
+ scrim: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
468
+ }, z.core.$strip>;
469
+ slots: string[];
470
+ description: string;
471
+ example: {
472
+ title: string;
473
+ width: number;
474
+ };
475
+ };
476
+ Drawer: {
477
+ props: z.ZodObject<{
478
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
479
+ bottom: "bottom";
480
+ left: "left";
481
+ right: "right";
482
+ }>>>;
483
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
484
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
485
+ scrim: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
486
+ handle: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
487
+ }, z.core.$strip>;
488
+ slots: string[];
489
+ description: string;
490
+ example: {
491
+ side: string;
492
+ title: string;
493
+ size: number;
494
+ };
495
+ };
496
+ };
497
+ export declare const catalog: import("@json-render/core").Catalog<{
498
+ spec: import("@json-render/core").SchemaType<"object", {
499
+ root: import("@json-render/core").SchemaType<"string", unknown>;
500
+ elements: import("@json-render/core").SchemaType<"record", import("@json-render/core").SchemaType<"object", {
501
+ type: import("@json-render/core").SchemaType<"ref", string>;
502
+ props: import("@json-render/core").SchemaType<"propsOf", string>;
503
+ children: import("@json-render/core").SchemaType<"array", import("@json-render/core").SchemaType<"string", unknown>>;
504
+ visible: {
505
+ optional: true;
506
+ kind: "any";
507
+ inner?: unknown;
508
+ };
509
+ repeat: {
510
+ optional: true;
511
+ kind: "any";
512
+ inner?: unknown;
513
+ };
514
+ }>>;
515
+ }>;
516
+ catalog: import("@json-render/core").SchemaType<"object", {
517
+ components: import("@json-render/core").SchemaType<"map", {
518
+ props: import("@json-render/core").SchemaType<"zod", unknown>;
519
+ slots: import("@json-render/core").SchemaType<"array", import("@json-render/core").SchemaType<"string", unknown>>;
520
+ description: import("@json-render/core").SchemaType<"string", unknown>;
521
+ example: import("@json-render/core").SchemaType<"any", unknown>;
522
+ }>;
523
+ }>;
524
+ }, {
525
+ components: {
526
+ Board: {
527
+ props: z.ZodObject<{
528
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
529
+ layout: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
530
+ grid: "grid";
531
+ row: "row";
532
+ }>>>;
533
+ columns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
534
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
535
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
536
+ accent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ }, z.core.$strip>;
538
+ slots: string[];
539
+ description: string;
540
+ example: {
541
+ title: string;
542
+ layout: string;
543
+ gap: number;
544
+ };
545
+ };
546
+ Screen: {
547
+ props: z.ZodObject<{
548
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
549
+ device: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
550
+ custom: "custom";
551
+ desktop: "desktop";
552
+ phone: "phone";
553
+ tablet: "tablet";
554
+ }>>>;
555
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
556
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
557
+ chrome: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
558
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
559
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
560
+ }, z.core.$strip>;
561
+ slots: string[];
562
+ description: string;
563
+ example: {
564
+ name: string;
565
+ device: string;
566
+ };
567
+ };
568
+ Note: {
569
+ props: z.ZodObject<{
570
+ text: z.ZodString;
571
+ color: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
572
+ blue: "blue";
573
+ green: "green";
574
+ pink: "pink";
575
+ yellow: "yellow";
576
+ }>>>;
577
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
578
+ }, z.core.$strip>;
579
+ slots: never[];
580
+ description: string;
581
+ example: {
582
+ text: string;
583
+ color: string;
584
+ };
585
+ };
586
+ Stack: {
587
+ props: z.ZodObject<{
588
+ direction: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
589
+ column: "column";
590
+ row: "row";
591
+ }>>>;
592
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
593
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
594
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
595
+ center: "center";
596
+ end: "end";
597
+ start: "start";
598
+ stretch: "stretch";
599
+ }>>>;
600
+ justify: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
601
+ around: "around";
602
+ between: "between";
603
+ center: "center";
604
+ end: "end";
605
+ start: "start";
606
+ }>>>;
607
+ wrap: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
608
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
609
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
610
+ border: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
611
+ all: "all";
612
+ bottom: "bottom";
613
+ left: "left";
614
+ none: "none";
615
+ right: "right";
616
+ top: "top";
617
+ }>>>;
618
+ fill: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
619
+ }, z.core.$strip>;
620
+ slots: string[];
621
+ description: string;
622
+ example: {
623
+ direction: string;
624
+ gap: number;
625
+ align: string;
626
+ };
627
+ };
628
+ Grid: {
629
+ props: z.ZodObject<{
630
+ columns: z.ZodNumber;
631
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
632
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
633
+ }, z.core.$strip>;
634
+ slots: string[];
635
+ description: string;
636
+ example: {
637
+ columns: number;
638
+ gap: number;
639
+ };
640
+ };
641
+ Card: {
642
+ props: z.ZodObject<{
643
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
644
+ padding: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
645
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
646
+ variant: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
647
+ filled: "filled";
648
+ outline: "outline";
649
+ }>>>;
650
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
651
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
652
+ }, z.core.$strip>;
653
+ slots: string[];
654
+ description: string;
655
+ example: {
656
+ title: string;
657
+ variant: string;
658
+ };
659
+ };
660
+ Divider: {
661
+ props: z.ZodObject<{
662
+ vertical: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
663
+ }, z.core.$strip>;
664
+ slots: never[];
665
+ description: string;
666
+ example: {};
667
+ };
668
+ Spacer: {
669
+ props: z.ZodObject<{
670
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
671
+ }, z.core.$strip>;
672
+ slots: never[];
673
+ description: string;
674
+ example: {
675
+ size: number;
676
+ };
677
+ };
678
+ Heading: {
679
+ props: z.ZodObject<{
680
+ text: z.ZodString;
681
+ level: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>>;
682
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
683
+ center: "center";
684
+ left: "left";
685
+ right: "right";
686
+ }>>>;
687
+ }, z.core.$strip>;
688
+ slots: never[];
689
+ description: string;
690
+ example: {
691
+ text: string;
692
+ level: number;
693
+ };
694
+ };
695
+ Text: {
696
+ props: z.ZodObject<{
697
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
698
+ lines: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
699
+ size: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
700
+ lg: "lg";
701
+ md: "md";
702
+ sm: "sm";
703
+ }>>>;
704
+ muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
705
+ bold: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
706
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
707
+ center: "center";
708
+ left: "left";
709
+ right: "right";
710
+ }>>>;
711
+ }, z.core.$strip>;
712
+ slots: never[];
713
+ description: string;
714
+ example: {
715
+ lines: number;
716
+ };
717
+ };
718
+ Image: {
719
+ props: z.ZodObject<{
720
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
721
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
722
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
+ rounded: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
724
+ }, z.core.$strip>;
725
+ slots: never[];
726
+ description: string;
727
+ example: {
728
+ height: number;
729
+ label: string;
730
+ };
731
+ };
732
+ Icon: {
733
+ props: z.ZodObject<{
734
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
735
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
736
+ }, z.core.$strip>;
737
+ slots: never[];
738
+ description: string;
739
+ example: {
740
+ name: string;
741
+ size: number;
742
+ };
743
+ };
744
+ Avatar: {
745
+ props: z.ZodObject<{
746
+ initials: z.ZodOptional<z.ZodNullable<z.ZodString>>;
747
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
748
+ }, z.core.$strip>;
749
+ slots: never[];
750
+ description: string;
751
+ example: {
752
+ initials: string;
753
+ size: number;
754
+ };
755
+ };
756
+ Badge: {
757
+ props: z.ZodObject<{
758
+ label: z.ZodString;
759
+ variant: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
760
+ outline: "outline";
761
+ solid: "solid";
762
+ }>>>;
763
+ tone: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
764
+ danger: "danger";
765
+ neutral: "neutral";
766
+ success: "success";
767
+ warning: "warning";
768
+ }>>>;
769
+ }, z.core.$strip>;
770
+ slots: never[];
771
+ description: string;
772
+ example: {
773
+ label: string;
774
+ variant: string;
775
+ };
776
+ };
777
+ Button: {
778
+ props: z.ZodObject<{
779
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
780
+ variant: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
781
+ ghost: "ghost";
782
+ primary: "primary";
783
+ secondary: "secondary";
784
+ }>>>;
785
+ size: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
786
+ lg: "lg";
787
+ md: "md";
788
+ sm: "sm";
789
+ }>>>;
790
+ leadingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
+ trailingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
792
+ fullWidth: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
793
+ }, z.core.$strip>;
794
+ slots: never[];
795
+ description: string;
796
+ example: {
797
+ label: string;
798
+ variant: string;
799
+ fullWidth: boolean;
800
+ };
801
+ };
802
+ Input: {
803
+ props: z.ZodObject<{
804
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
805
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
806
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
807
+ type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
808
+ email: "email";
809
+ password: "password";
810
+ search: "search";
811
+ text: "text";
812
+ }>>>;
813
+ multiline: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
814
+ helper: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
+ error: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
816
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
817
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
818
+ }, z.core.$strip>;
819
+ slots: never[];
820
+ description: string;
821
+ example: {
822
+ label: string;
823
+ placeholder: string;
824
+ };
825
+ };
826
+ Checkbox: {
827
+ props: z.ZodObject<{
828
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
829
+ checked: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
830
+ }, z.core.$strip>;
831
+ slots: never[];
832
+ description: string;
833
+ example: {
834
+ label: string;
835
+ checked: boolean;
836
+ };
837
+ };
838
+ Radio: {
839
+ props: z.ZodObject<{
840
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
841
+ checked: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
842
+ }, z.core.$strip>;
843
+ slots: never[];
844
+ description: string;
845
+ example: {
846
+ label: string;
847
+ checked: boolean;
848
+ };
849
+ };
850
+ Toggle: {
851
+ props: z.ZodObject<{
852
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
853
+ on: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
854
+ }, z.core.$strip>;
855
+ slots: never[];
856
+ description: string;
857
+ example: {
858
+ label: string;
859
+ on: boolean;
860
+ };
861
+ };
862
+ Select: {
863
+ props: z.ZodObject<{
864
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
865
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
866
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
867
+ width: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
868
+ }, z.core.$strip>;
869
+ slots: never[];
870
+ description: string;
871
+ example: {
872
+ label: string;
873
+ value: string;
874
+ };
875
+ };
876
+ NavBar: {
877
+ props: z.ZodObject<{
878
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
879
+ leading: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
880
+ back: "back";
881
+ close: "close";
882
+ logo: "logo";
883
+ menu: "menu";
884
+ none: "none";
885
+ }>>>;
886
+ actions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
887
+ align: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
888
+ center: "center";
889
+ left: "left";
890
+ }>>>;
891
+ }, z.core.$strip>;
892
+ slots: never[];
893
+ description: string;
894
+ example: {
895
+ title: string;
896
+ leading: string;
897
+ actions: string[];
898
+ };
899
+ };
900
+ TabBar: {
901
+ props: z.ZodObject<{
902
+ items: z.ZodArray<z.ZodObject<{
903
+ label: z.ZodString;
904
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
905
+ }, z.core.$strip>>;
906
+ active: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
907
+ }, z.core.$strip>;
908
+ slots: never[];
909
+ description: string;
910
+ example: {
911
+ items: {
912
+ label: string;
913
+ icon: string;
914
+ }[];
915
+ active: number;
916
+ };
917
+ };
918
+ Tabs: {
919
+ props: z.ZodObject<{
920
+ items: z.ZodArray<z.ZodString>;
921
+ active: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
922
+ }, z.core.$strip>;
923
+ slots: never[];
924
+ description: string;
925
+ example: {
926
+ items: string[];
927
+ active: number;
928
+ };
929
+ };
930
+ List: {
931
+ props: z.ZodObject<{
932
+ dividers: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
933
+ grow: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
934
+ }, z.core.$strip>;
935
+ slots: string[];
936
+ description: string;
937
+ example: {
938
+ dividers: boolean;
939
+ };
940
+ };
941
+ ListItem: {
942
+ props: z.ZodObject<{
943
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
944
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
945
+ leading: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
946
+ avatar: "avatar";
947
+ checkbox: "checkbox";
948
+ icon: "icon";
949
+ image: "image";
950
+ none: "none";
951
+ }>>>;
952
+ leadingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
953
+ trailing: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
954
+ badge: "badge";
955
+ chevron: "chevron";
956
+ icon: "icon";
957
+ none: "none";
958
+ text: "text";
959
+ toggle: "toggle";
960
+ }>>>;
961
+ trailingText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
+ trailingIcon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
963
+ }, z.core.$strip>;
964
+ slots: never[];
965
+ description: string;
966
+ example: {
967
+ title: string;
968
+ subtitle: string;
969
+ leadingIcon: string;
970
+ trailing: string;
971
+ };
972
+ };
973
+ Table: {
974
+ props: z.ZodObject<{
975
+ columns: z.ZodArray<z.ZodString>;
976
+ rows: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
977
+ data: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodString>>>>;
978
+ }, z.core.$strip>;
979
+ slots: never[];
980
+ description: string;
981
+ example: {
982
+ columns: string[];
983
+ rows: number;
984
+ };
985
+ };
986
+ Modal: {
987
+ props: z.ZodObject<{
988
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
989
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
990
+ scrim: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
991
+ }, z.core.$strip>;
992
+ slots: string[];
993
+ description: string;
994
+ example: {
995
+ title: string;
996
+ width: number;
997
+ };
998
+ };
999
+ Drawer: {
1000
+ props: z.ZodObject<{
1001
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1002
+ bottom: "bottom";
1003
+ left: "left";
1004
+ right: "right";
1005
+ }>>>;
1006
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1007
+ size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1008
+ scrim: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1009
+ handle: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1010
+ }, z.core.$strip>;
1011
+ slots: string[];
1012
+ description: string;
1013
+ example: {
1014
+ side: string;
1015
+ title: string;
1016
+ size: number;
1017
+ };
1018
+ };
1019
+ };
1020
+ }>;
1021
+ export type ComponentName = keyof typeof componentDefinitions;
1022
+ /**
1023
+ * A ListItem's effective leading and trailing kinds. Setting the value implies
1024
+ * the kind (leadingIcon → leading=icon, trailingIcon → trailing=icon,
1025
+ * trailingText → trailing=text), so writing only the value still shows it.
1026
+ * The renderer and checkSpec both use this, so they can't disagree.
1027
+ */
1028
+ export declare function listItemEnds(p: {
1029
+ leading?: string | null;
1030
+ leadingIcon?: string | null;
1031
+ trailing?: string | null;
1032
+ trailingIcon?: string | null;
1033
+ trailingText?: string | null;
1034
+ }): {
1035
+ leading: string | undefined;
1036
+ trailing: string | undefined;
1037
+ };
1038
+ /**
1039
+ * Props renamed in 0.3.0, still accepted under their old names so existing
1040
+ * wireframes and render URLs keep working. The prompt, docs and autocomplete
1041
+ * only teach the new names, and `tsquare fmt` rewrites the old ones.
1042
+ */
1043
+ export declare const RENAMED_PROPS: Record<string, Record<string, string>>;
1044
+ /** Rewrites renamed props to their current names, in place. Safe to call more than once. */
1045
+ export declare function upgradeRenamedProps(spec: {
1046
+ elements: Record<string, {
1047
+ type: string;
1048
+ props?: Record<string, unknown>;
1049
+ }>;
1050
+ }): {
1051
+ elements: Record<string, {
1052
+ type: string;
1053
+ props?: Record<string, unknown>;
1054
+ }>;
1055
+ };