@spectratools/graphic-designer-cli 0.3.1 → 0.4.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.
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { SKRSContext2D } from '@napi-rs/canvas';
3
3
 
4
+ /** Default generator version stamped into render metadata when none is provided. */
4
5
  declare const DEFAULT_GENERATOR_VERSION = "0.2.0";
5
6
  type Rect = {
6
7
  x: number;
@@ -44,12 +45,64 @@ type WrittenArtifacts = {
44
45
  metadataPath: string;
45
46
  metadata: RenderMetadata;
46
47
  };
48
+ /**
49
+ * Compute a deterministic SHA-256 hash of a design spec.
50
+ *
51
+ * The spec is serialised to canonical JSON (sorted keys, no whitespace) before
52
+ * hashing, so two structurally identical specs always produce the same hash
53
+ * regardless of property order.
54
+ *
55
+ * @param spec - The parsed design spec to hash.
56
+ * @returns A lowercase hex-encoded SHA-256 digest string.
57
+ */
47
58
  declare function computeSpecHash(spec: DesignSpec): string;
59
+ /**
60
+ * Render a design spec to a PNG image buffer and accompanying metadata.
61
+ *
62
+ * This is the main entry point for the graphic-designer rendering pipeline.
63
+ * Fonts are loaded automatically (via {@link loadFonts}), the spec is validated
64
+ * and parsed, layout is computed, and all elements are drawn onto an
65
+ * off-screen canvas backed by `@napi-rs/canvas`.
66
+ *
67
+ * @param input - A raw or parsed {@link DesignSpec} object. It will be
68
+ * validated through Zod before rendering.
69
+ * @param options - Optional overrides for metadata fields.
70
+ * @param options.generatorVersion - Semantic version stamped into metadata.
71
+ * Defaults to {@link DEFAULT_GENERATOR_VERSION}.
72
+ * @param options.renderedAt - ISO-8601 timestamp for the render. Defaults to
73
+ * `new Date().toISOString()`.
74
+ * @returns A {@link RenderResult} containing the PNG buffer and full render
75
+ * metadata (spec hash, artifact hash, layout snapshot, etc.).
76
+ */
48
77
  declare function renderDesign(input: DesignSpec, options?: {
49
78
  generatorVersion?: string;
50
79
  renderedAt?: string;
51
80
  }): Promise<RenderResult>;
81
+ /**
82
+ * Write a render result to disk as a PNG image and a sidecar `.meta.json` file.
83
+ *
84
+ * If {@link out} points to a `.png` file the metadata file is placed alongside
85
+ * it with a `.meta.json` extension. If {@link out} is a directory, both files
86
+ * are named after the deterministic artifact base name derived from the spec
87
+ * hash and generator version.
88
+ *
89
+ * Parent directories are created recursively when they do not exist.
90
+ *
91
+ * @param result - The {@link RenderResult} returned by {@link renderDesign}.
92
+ * @param out - Destination path — either a `.png` file path or a directory.
93
+ * @returns A {@link WrittenArtifacts} object with the resolved file paths and
94
+ * metadata.
95
+ */
52
96
  declare function writeRenderArtifacts(result: RenderResult, out: string): Promise<WrittenArtifacts>;
97
+ /**
98
+ * Infer the conventional sidecar metadata path for a rendered image.
99
+ *
100
+ * For `.png` files the extension is replaced with `.meta.json`. For all other
101
+ * paths `.meta.json` is appended to the basename.
102
+ *
103
+ * @param imagePath - Absolute or relative path to the rendered image file.
104
+ * @returns The resolved path to the expected `.meta.json` sidecar file.
105
+ */
53
106
  declare function inferSidecarPath(imagePath: string): string;
54
107
 
55
108
  type GradientStop$1 = {
@@ -66,45 +119,92 @@ type RadialGradientSpec = {
66
119
  stops: GradientStop$1[];
67
120
  };
68
121
  type GradientSpec = LinearGradientSpec | RadialGradientSpec;
122
+ /** Default seven-colour rainbow palette used by {@link drawRainbowRule} when no custom colours are provided. */
69
123
  declare const DEFAULT_RAINBOW_COLORS: readonly ["#FF6B6B", "#FFA94D", "#FFD43B", "#69DB7C", "#4DABF7", "#9775FA", "#DA77F2"];
124
+ /**
125
+ * Fill a rectangle with a linear or radial gradient.
126
+ *
127
+ * Supports optional rounded corners via {@link borderRadius}. Linear gradients
128
+ * are rotated around the rectangle's centre according to the spec's `angle`
129
+ * field; radial gradients originate from the centre.
130
+ *
131
+ * @param ctx - The `@napi-rs/canvas` 2D rendering context.
132
+ * @param rect - The target {@link Rect} to fill.
133
+ * @param gradient - A {@link GradientSpec} describing the gradient type, angle
134
+ * (for linear), and colour stops.
135
+ * @param borderRadius - Corner radius in pixels. Defaults to `0` (sharp
136
+ * corners).
137
+ */
70
138
  declare function drawGradientRect(ctx: SKRSContext2D, rect: Rect, gradient: GradientSpec, borderRadius?: number): void;
139
+ /**
140
+ * Draw a horizontal rainbow gradient rule (decorative divider line).
141
+ *
142
+ * The rule is centred vertically on {@link y} and spans from {@link x} to
143
+ * `x + width`. When fewer than two colours are supplied the
144
+ * {@link DEFAULT_RAINBOW_COLORS} palette is used as a fallback.
145
+ *
146
+ * @param ctx - The `@napi-rs/canvas` 2D rendering context.
147
+ * @param x - Left edge x-coordinate.
148
+ * @param y - Vertical centre y-coordinate of the rule.
149
+ * @param width - Horizontal width in pixels.
150
+ * @param thickness - Rule thickness in pixels. Defaults to `2`.
151
+ * @param colors - Array of hex colour strings for the gradient stops. Defaults
152
+ * to {@link DEFAULT_RAINBOW_COLORS}.
153
+ * @param borderRadius - Corner radius. Defaults to half the thickness for a
154
+ * pill shape.
155
+ */
71
156
  declare function drawRainbowRule(ctx: SKRSContext2D, x: number, y: number, width: number, thickness?: number, colors?: string[], borderRadius?: number): void;
157
+ /**
158
+ * Draw a radial vignette overlay across the full canvas.
159
+ *
160
+ * The vignette fades from fully transparent at the centre to the specified
161
+ * {@link color} at the edges, controlled by {@link intensity}. It is a no-op
162
+ * when width, height, or intensity are zero or negative.
163
+ *
164
+ * @param ctx - The `@napi-rs/canvas` 2D rendering context.
165
+ * @param width - Canvas width in pixels.
166
+ * @param height - Canvas height in pixels.
167
+ * @param intensity - Opacity of the vignette at the edges, clamped to 0–1.
168
+ * Defaults to `0.3`.
169
+ * @param color - Hex colour string for the vignette tint. Defaults to
170
+ * `'#000000'`.
171
+ */
72
172
  declare function drawVignette(ctx: SKRSContext2D, width: number, height: number, intensity?: number, color?: string): void;
73
173
 
74
174
  declare const themeSchema: z.ZodObject<{
75
- background: z.ZodString;
76
- surface: z.ZodString;
77
- surfaceMuted: z.ZodString;
78
- surfaceElevated: z.ZodString;
79
- text: z.ZodString;
80
- textMuted: z.ZodString;
81
- textInverse: z.ZodString;
82
- primary: z.ZodString;
83
- secondary: z.ZodString;
84
- accent: z.ZodString;
85
- success: z.ZodString;
86
- warning: z.ZodString;
87
- error: z.ZodString;
88
- info: z.ZodString;
89
- border: z.ZodString;
90
- borderMuted: z.ZodString;
175
+ background: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
176
+ surface: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
177
+ surfaceMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
178
+ surfaceElevated: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
179
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
180
+ textMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
181
+ textInverse: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
182
+ primary: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
183
+ secondary: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
184
+ accent: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
185
+ success: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
186
+ warning: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
187
+ error: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
188
+ info: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
189
+ border: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
190
+ borderMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
91
191
  code: z.ZodObject<{
92
- background: z.ZodString;
93
- text: z.ZodString;
94
- comment: z.ZodString;
95
- keyword: z.ZodString;
96
- string: z.ZodString;
97
- number: z.ZodString;
98
- function: z.ZodString;
99
- variable: z.ZodString;
100
- operator: z.ZodString;
101
- punctuation: z.ZodString;
192
+ background: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
193
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
194
+ comment: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
195
+ keyword: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
196
+ string: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
197
+ number: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
198
+ function: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
199
+ variable: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
200
+ operator: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
201
+ punctuation: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
102
202
  }, "strict", z.ZodTypeAny, {
103
203
  string: string;
104
204
  number: string;
105
205
  function: string;
106
- text: string;
107
206
  background: string;
207
+ text: string;
108
208
  comment: string;
109
209
  keyword: string;
110
210
  variable: string;
@@ -114,8 +214,8 @@ declare const themeSchema: z.ZodObject<{
114
214
  string: string;
115
215
  number: string;
116
216
  function: string;
117
- text: string;
118
217
  background: string;
218
+ text: string;
119
219
  comment: string;
120
220
  keyword: string;
121
221
  variable: string;
@@ -140,27 +240,27 @@ declare const themeSchema: z.ZodObject<{
140
240
  string: string;
141
241
  number: string;
142
242
  function: string;
143
- text: string;
144
243
  background: string;
244
+ text: string;
145
245
  comment: string;
146
246
  keyword: string;
147
247
  variable: string;
148
248
  operator: string;
149
249
  punctuation: string;
150
250
  };
151
- accent: string;
152
- success: string;
153
- warning: string;
154
- error: string;
155
- text: string;
156
251
  background: string;
157
252
  surface: string;
158
253
  surfaceMuted: string;
159
254
  surfaceElevated: string;
255
+ text: string;
160
256
  textMuted: string;
161
257
  textInverse: string;
162
258
  primary: string;
163
259
  secondary: string;
260
+ accent: string;
261
+ success: string;
262
+ warning: string;
263
+ error: string;
164
264
  info: string;
165
265
  border: string;
166
266
  borderMuted: string;
@@ -174,27 +274,27 @@ declare const themeSchema: z.ZodObject<{
174
274
  string: string;
175
275
  number: string;
176
276
  function: string;
177
- text: string;
178
277
  background: string;
278
+ text: string;
179
279
  comment: string;
180
280
  keyword: string;
181
281
  variable: string;
182
282
  operator: string;
183
283
  punctuation: string;
184
284
  };
185
- accent: string;
186
- success: string;
187
- warning: string;
188
- error: string;
189
- text: string;
190
285
  background: string;
191
286
  surface: string;
192
287
  surfaceMuted: string;
193
288
  surfaceElevated: string;
289
+ text: string;
194
290
  textMuted: string;
195
291
  textInverse: string;
196
292
  primary: string;
197
293
  secondary: string;
294
+ accent: string;
295
+ success: string;
296
+ warning: string;
297
+ error: string;
198
298
  info: string;
199
299
  border: string;
200
300
  borderMuted: string;
@@ -216,7 +316,7 @@ declare function resolveTheme(theme: ThemeInput$1): Theme$1;
216
316
 
217
317
  declare const gradientStopSchema: z.ZodObject<{
218
318
  offset: z.ZodNumber;
219
- color: z.ZodString;
319
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
220
320
  }, "strict", z.ZodTypeAny, {
221
321
  color: string;
222
322
  offset: number;
@@ -229,7 +329,7 @@ declare const linearGradientSchema: z.ZodObject<{
229
329
  angle: z.ZodDefault<z.ZodNumber>;
230
330
  stops: z.ZodArray<z.ZodObject<{
231
331
  offset: z.ZodNumber;
232
- color: z.ZodString;
332
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
233
333
  }, "strict", z.ZodTypeAny, {
234
334
  color: string;
235
335
  offset: number;
@@ -256,7 +356,7 @@ declare const radialGradientSchema: z.ZodObject<{
256
356
  type: z.ZodLiteral<"radial">;
257
357
  stops: z.ZodArray<z.ZodObject<{
258
358
  offset: z.ZodNumber;
259
- color: z.ZodString;
359
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
260
360
  }, "strict", z.ZodTypeAny, {
261
361
  color: string;
262
362
  offset: number;
@@ -282,7 +382,7 @@ declare const gradientSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
282
382
  angle: z.ZodDefault<z.ZodNumber>;
283
383
  stops: z.ZodArray<z.ZodObject<{
284
384
  offset: z.ZodNumber;
285
- color: z.ZodString;
385
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
286
386
  }, "strict", z.ZodTypeAny, {
287
387
  color: string;
288
388
  offset: number;
@@ -308,7 +408,7 @@ declare const gradientSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
308
408
  type: z.ZodLiteral<"radial">;
309
409
  stops: z.ZodArray<z.ZodObject<{
310
410
  offset: z.ZodNumber;
311
- color: z.ZodString;
411
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
312
412
  }, "strict", z.ZodTypeAny, {
313
413
  color: string;
314
414
  offset: number;
@@ -336,8 +436,8 @@ declare const drawRectSchema: z.ZodObject<{
336
436
  y: z.ZodNumber;
337
437
  width: z.ZodNumber;
338
438
  height: z.ZodNumber;
339
- fill: z.ZodOptional<z.ZodString>;
340
- stroke: z.ZodOptional<z.ZodString>;
439
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
440
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
341
441
  strokeWidth: z.ZodDefault<z.ZodNumber>;
342
442
  radius: z.ZodDefault<z.ZodNumber>;
343
443
  opacity: z.ZodDefault<z.ZodNumber>;
@@ -369,8 +469,8 @@ declare const drawCircleSchema: z.ZodObject<{
369
469
  cx: z.ZodNumber;
370
470
  cy: z.ZodNumber;
371
471
  radius: z.ZodNumber;
372
- fill: z.ZodOptional<z.ZodString>;
373
- stroke: z.ZodOptional<z.ZodString>;
472
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
473
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
374
474
  strokeWidth: z.ZodDefault<z.ZodNumber>;
375
475
  opacity: z.ZodDefault<z.ZodNumber>;
376
476
  }, "strict", z.ZodTypeAny, {
@@ -400,7 +500,7 @@ declare const drawTextSchema: z.ZodObject<{
400
500
  fontSize: z.ZodDefault<z.ZodNumber>;
401
501
  fontWeight: z.ZodDefault<z.ZodNumber>;
402
502
  fontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
403
- color: z.ZodDefault<z.ZodString>;
503
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
404
504
  align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
405
505
  baseline: z.ZodDefault<z.ZodEnum<["top", "middle", "alphabetic", "bottom"]>>;
406
506
  letterSpacing: z.ZodDefault<z.ZodNumber>;
@@ -410,14 +510,14 @@ declare const drawTextSchema: z.ZodObject<{
410
510
  type: "text";
411
511
  color: string;
412
512
  opacity: number;
413
- fontSize: number;
414
513
  text: string;
415
- align: "left" | "center" | "right";
514
+ fontSize: number;
515
+ align: "center" | "left" | "right";
416
516
  x: number;
417
517
  y: number;
418
518
  fontWeight: number;
419
519
  fontFamily: "body" | "heading" | "mono";
420
- baseline: "middle" | "alphabetic" | "bottom" | "top";
520
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
421
521
  letterSpacing: number;
422
522
  maxWidth?: number | undefined;
423
523
  }, {
@@ -428,10 +528,10 @@ declare const drawTextSchema: z.ZodObject<{
428
528
  color?: string | undefined;
429
529
  opacity?: number | undefined;
430
530
  fontSize?: number | undefined;
431
- align?: "left" | "center" | "right" | undefined;
531
+ align?: "center" | "left" | "right" | undefined;
432
532
  fontWeight?: number | undefined;
433
533
  fontFamily?: "body" | "heading" | "mono" | undefined;
434
- baseline?: "middle" | "alphabetic" | "bottom" | "top" | undefined;
534
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
435
535
  letterSpacing?: number | undefined;
436
536
  maxWidth?: number | undefined;
437
537
  }>;
@@ -441,7 +541,7 @@ declare const drawLineSchema: z.ZodObject<{
441
541
  y1: z.ZodNumber;
442
542
  x2: z.ZodNumber;
443
543
  y2: z.ZodNumber;
444
- color: z.ZodDefault<z.ZodString>;
544
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
445
545
  width: z.ZodDefault<z.ZodNumber>;
446
546
  dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
447
547
  arrow: z.ZodDefault<z.ZodEnum<["none", "end", "start", "both"]>>;
@@ -494,7 +594,7 @@ declare const drawBezierSchema: z.ZodObject<{
494
594
  x: number;
495
595
  y: number;
496
596
  }>, "many">;
497
- color: z.ZodDefault<z.ZodString>;
597
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
498
598
  width: z.ZodDefault<z.ZodNumber>;
499
599
  dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
500
600
  arrow: z.ZodDefault<z.ZodEnum<["none", "end", "start", "both"]>>;
@@ -528,8 +628,8 @@ declare const drawBezierSchema: z.ZodObject<{
528
628
  declare const drawPathSchema: z.ZodObject<{
529
629
  type: z.ZodLiteral<"path">;
530
630
  d: z.ZodString;
531
- fill: z.ZodOptional<z.ZodString>;
532
- stroke: z.ZodOptional<z.ZodString>;
631
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
632
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
533
633
  strokeWidth: z.ZodDefault<z.ZodNumber>;
534
634
  opacity: z.ZodDefault<z.ZodNumber>;
535
635
  }, "strict", z.ZodTypeAny, {
@@ -554,8 +654,8 @@ declare const drawBadgeSchema: z.ZodObject<{
554
654
  text: z.ZodString;
555
655
  fontSize: z.ZodDefault<z.ZodNumber>;
556
656
  fontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
557
- color: z.ZodDefault<z.ZodString>;
558
- background: z.ZodDefault<z.ZodString>;
657
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
658
+ background: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
559
659
  paddingX: z.ZodDefault<z.ZodNumber>;
560
660
  paddingY: z.ZodDefault<z.ZodNumber>;
561
661
  borderRadius: z.ZodDefault<z.ZodNumber>;
@@ -564,12 +664,12 @@ declare const drawBadgeSchema: z.ZodObject<{
564
664
  type: "badge";
565
665
  color: string;
566
666
  opacity: number;
567
- fontSize: number;
667
+ background: string;
568
668
  text: string;
669
+ fontSize: number;
569
670
  borderRadius: number;
570
671
  x: number;
571
672
  y: number;
572
- background: string;
573
673
  fontFamily: "body" | "heading" | "mono";
574
674
  paddingX: number;
575
675
  paddingY: number;
@@ -580,9 +680,9 @@ declare const drawBadgeSchema: z.ZodObject<{
580
680
  y: number;
581
681
  color?: string | undefined;
582
682
  opacity?: number | undefined;
683
+ background?: string | undefined;
583
684
  fontSize?: number | undefined;
584
685
  borderRadius?: number | undefined;
585
- background?: string | undefined;
586
686
  fontFamily?: "body" | "heading" | "mono" | undefined;
587
687
  paddingX?: number | undefined;
588
688
  paddingY?: number | undefined;
@@ -598,7 +698,7 @@ declare const drawGradientRectSchema: z.ZodObject<{
598
698
  angle: z.ZodDefault<z.ZodNumber>;
599
699
  stops: z.ZodArray<z.ZodObject<{
600
700
  offset: z.ZodNumber;
601
- color: z.ZodString;
701
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
602
702
  }, "strict", z.ZodTypeAny, {
603
703
  color: string;
604
704
  offset: number;
@@ -624,7 +724,7 @@ declare const drawGradientRectSchema: z.ZodObject<{
624
724
  type: z.ZodLiteral<"radial">;
625
725
  stops: z.ZodArray<z.ZodObject<{
626
726
  offset: z.ZodNumber;
627
- color: z.ZodString;
727
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
628
728
  }, "strict", z.ZodTypeAny, {
629
729
  color: string;
630
730
  offset: number;
@@ -698,8 +798,8 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
698
798
  y: z.ZodNumber;
699
799
  width: z.ZodNumber;
700
800
  height: z.ZodNumber;
701
- fill: z.ZodOptional<z.ZodString>;
702
- stroke: z.ZodOptional<z.ZodString>;
801
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
802
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
703
803
  strokeWidth: z.ZodDefault<z.ZodNumber>;
704
804
  radius: z.ZodDefault<z.ZodNumber>;
705
805
  opacity: z.ZodDefault<z.ZodNumber>;
@@ -730,8 +830,8 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
730
830
  cx: z.ZodNumber;
731
831
  cy: z.ZodNumber;
732
832
  radius: z.ZodNumber;
733
- fill: z.ZodOptional<z.ZodString>;
734
- stroke: z.ZodOptional<z.ZodString>;
833
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
834
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
735
835
  strokeWidth: z.ZodDefault<z.ZodNumber>;
736
836
  opacity: z.ZodDefault<z.ZodNumber>;
737
837
  }, "strict", z.ZodTypeAny, {
@@ -760,7 +860,7 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
760
860
  fontSize: z.ZodDefault<z.ZodNumber>;
761
861
  fontWeight: z.ZodDefault<z.ZodNumber>;
762
862
  fontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
763
- color: z.ZodDefault<z.ZodString>;
863
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
764
864
  align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
765
865
  baseline: z.ZodDefault<z.ZodEnum<["top", "middle", "alphabetic", "bottom"]>>;
766
866
  letterSpacing: z.ZodDefault<z.ZodNumber>;
@@ -770,14 +870,14 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
770
870
  type: "text";
771
871
  color: string;
772
872
  opacity: number;
773
- fontSize: number;
774
873
  text: string;
775
- align: "left" | "center" | "right";
874
+ fontSize: number;
875
+ align: "center" | "left" | "right";
776
876
  x: number;
777
877
  y: number;
778
878
  fontWeight: number;
779
879
  fontFamily: "body" | "heading" | "mono";
780
- baseline: "middle" | "alphabetic" | "bottom" | "top";
880
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
781
881
  letterSpacing: number;
782
882
  maxWidth?: number | undefined;
783
883
  }, {
@@ -788,10 +888,10 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
788
888
  color?: string | undefined;
789
889
  opacity?: number | undefined;
790
890
  fontSize?: number | undefined;
791
- align?: "left" | "center" | "right" | undefined;
891
+ align?: "center" | "left" | "right" | undefined;
792
892
  fontWeight?: number | undefined;
793
893
  fontFamily?: "body" | "heading" | "mono" | undefined;
794
- baseline?: "middle" | "alphabetic" | "bottom" | "top" | undefined;
894
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
795
895
  letterSpacing?: number | undefined;
796
896
  maxWidth?: number | undefined;
797
897
  }>, z.ZodObject<{
@@ -800,7 +900,7 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
800
900
  y1: z.ZodNumber;
801
901
  x2: z.ZodNumber;
802
902
  y2: z.ZodNumber;
803
- color: z.ZodDefault<z.ZodString>;
903
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
804
904
  width: z.ZodDefault<z.ZodNumber>;
805
905
  dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
806
906
  arrow: z.ZodDefault<z.ZodEnum<["none", "end", "start", "both"]>>;
@@ -842,7 +942,7 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
842
942
  x: number;
843
943
  y: number;
844
944
  }>, "many">;
845
- color: z.ZodDefault<z.ZodString>;
945
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
846
946
  width: z.ZodDefault<z.ZodNumber>;
847
947
  dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
848
948
  arrow: z.ZodDefault<z.ZodEnum<["none", "end", "start", "both"]>>;
@@ -875,8 +975,8 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
875
975
  }>, z.ZodObject<{
876
976
  type: z.ZodLiteral<"path">;
877
977
  d: z.ZodString;
878
- fill: z.ZodOptional<z.ZodString>;
879
- stroke: z.ZodOptional<z.ZodString>;
978
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
979
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
880
980
  strokeWidth: z.ZodDefault<z.ZodNumber>;
881
981
  opacity: z.ZodDefault<z.ZodNumber>;
882
982
  }, "strict", z.ZodTypeAny, {
@@ -900,8 +1000,8 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
900
1000
  text: z.ZodString;
901
1001
  fontSize: z.ZodDefault<z.ZodNumber>;
902
1002
  fontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
903
- color: z.ZodDefault<z.ZodString>;
904
- background: z.ZodDefault<z.ZodString>;
1003
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1004
+ background: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
905
1005
  paddingX: z.ZodDefault<z.ZodNumber>;
906
1006
  paddingY: z.ZodDefault<z.ZodNumber>;
907
1007
  borderRadius: z.ZodDefault<z.ZodNumber>;
@@ -910,12 +1010,12 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
910
1010
  type: "badge";
911
1011
  color: string;
912
1012
  opacity: number;
913
- fontSize: number;
1013
+ background: string;
914
1014
  text: string;
1015
+ fontSize: number;
915
1016
  borderRadius: number;
916
1017
  x: number;
917
1018
  y: number;
918
- background: string;
919
1019
  fontFamily: "body" | "heading" | "mono";
920
1020
  paddingX: number;
921
1021
  paddingY: number;
@@ -926,9 +1026,9 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
926
1026
  y: number;
927
1027
  color?: string | undefined;
928
1028
  opacity?: number | undefined;
1029
+ background?: string | undefined;
929
1030
  fontSize?: number | undefined;
930
1031
  borderRadius?: number | undefined;
931
- background?: string | undefined;
932
1032
  fontFamily?: "body" | "heading" | "mono" | undefined;
933
1033
  paddingX?: number | undefined;
934
1034
  paddingY?: number | undefined;
@@ -943,7 +1043,7 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
943
1043
  angle: z.ZodDefault<z.ZodNumber>;
944
1044
  stops: z.ZodArray<z.ZodObject<{
945
1045
  offset: z.ZodNumber;
946
- color: z.ZodString;
1046
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
947
1047
  }, "strict", z.ZodTypeAny, {
948
1048
  color: string;
949
1049
  offset: number;
@@ -969,7 +1069,7 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
969
1069
  type: z.ZodLiteral<"radial">;
970
1070
  stops: z.ZodArray<z.ZodObject<{
971
1071
  offset: z.ZodNumber;
972
- color: z.ZodString;
1072
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
973
1073
  }, "strict", z.ZodTypeAny, {
974
1074
  color: string;
975
1075
  offset: number;
@@ -1037,17 +1137,20 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1037
1137
  opacity?: number | undefined;
1038
1138
  radius?: number | undefined;
1039
1139
  }>]>;
1140
+ /** Default canvas dimensions and padding (1200 × 675 px, 48 px padding). */
1040
1141
  declare const defaultCanvas: {
1041
1142
  readonly width: 1200;
1042
1143
  readonly height: 675;
1043
1144
  readonly padding: 48;
1044
1145
  };
1146
+ /** Default QA constraint thresholds applied when no explicit constraints are given. */
1045
1147
  declare const defaultConstraints: {
1046
1148
  readonly minContrastRatio: 4.5;
1047
1149
  readonly minFooterSpacing: 16;
1048
1150
  readonly checkOverlaps: true;
1049
1151
  readonly maxTextTruncation: 0.1;
1050
1152
  };
1153
+ /** Default auto-layout config used for flowcharts (ELK layered, top-to-bottom). */
1051
1154
  declare const defaultAutoLayout: {
1052
1155
  readonly mode: "auto";
1053
1156
  readonly algorithm: "layered";
@@ -1056,24 +1159,44 @@ declare const defaultAutoLayout: {
1056
1159
  readonly rankSpacing: 120;
1057
1160
  readonly edgeRouting: "polyline";
1058
1161
  };
1162
+ /** Default grid layout config (3 columns, 24 px gap, variable height). */
1059
1163
  declare const defaultGridLayout: {
1060
1164
  readonly mode: "grid";
1061
1165
  readonly columns: 3;
1062
1166
  readonly gap: 24;
1063
1167
  readonly equalHeight: false;
1064
1168
  };
1169
+ /** Default stack layout config (vertical direction, 24 px gap, stretch alignment). */
1065
1170
  declare const defaultStackLayout: {
1066
1171
  readonly mode: "stack";
1067
1172
  readonly direction: "vertical";
1068
1173
  readonly gap: 24;
1069
1174
  readonly alignment: "stretch";
1070
1175
  };
1176
+ /** Default layout configuration — alias for {@link defaultGridLayout}. */
1071
1177
  declare const defaultLayout: {
1072
1178
  readonly mode: "grid";
1073
1179
  readonly columns: 3;
1074
1180
  readonly gap: 24;
1075
1181
  readonly equalHeight: false;
1076
1182
  };
1183
+ /**
1184
+ * Infer the most appropriate layout mode from the element types present in a
1185
+ * design spec.
1186
+ *
1187
+ * When an explicit layout is provided it is returned as-is. Otherwise the
1188
+ * heuristic inspects the element list:
1189
+ *
1190
+ * - Flow-nodes **and** connections → {@link defaultAutoLayout} (ELK graph).
1191
+ * - All cards → {@link defaultGridLayout}.
1192
+ * - Contains code-block or terminal → {@link defaultStackLayout}.
1193
+ * - Fallback → {@link defaultGridLayout}.
1194
+ *
1195
+ * @param elements - The array of spec elements to inspect.
1196
+ * @param explicitLayout - An optional explicit layout config that short-circuits
1197
+ * inference when provided.
1198
+ * @returns The resolved {@link LayoutConfig}.
1199
+ */
1077
1200
  declare function inferLayout(elements: Element[], explicitLayout?: LayoutConfig): LayoutConfig;
1078
1201
  declare const cardElementSchema: z.ZodObject<{
1079
1202
  type: z.ZodLiteral<"card">;
@@ -1085,22 +1208,22 @@ declare const cardElementSchema: z.ZodObject<{
1085
1208
  tone: z.ZodDefault<z.ZodEnum<["neutral", "accent", "success", "warning", "error"]>>;
1086
1209
  icon: z.ZodOptional<z.ZodString>;
1087
1210
  }, "strict", z.ZodTypeAny, {
1211
+ body: string;
1088
1212
  type: "card";
1089
1213
  id: string;
1090
1214
  title: string;
1091
- body: string;
1092
- tone: "neutral" | "accent" | "success" | "warning" | "error";
1215
+ tone: "accent" | "success" | "warning" | "error" | "neutral";
1093
1216
  badge?: string | undefined;
1094
1217
  metric?: string | undefined;
1095
1218
  icon?: string | undefined;
1096
1219
  }, {
1220
+ body: string;
1097
1221
  type: "card";
1098
1222
  id: string;
1099
1223
  title: string;
1100
- body: string;
1101
1224
  badge?: string | undefined;
1102
1225
  metric?: string | undefined;
1103
- tone?: "neutral" | "accent" | "success" | "warning" | "error" | undefined;
1226
+ tone?: "accent" | "success" | "warning" | "error" | "neutral" | undefined;
1104
1227
  icon?: string | undefined;
1105
1228
  }>;
1106
1229
  declare const flowNodeElementSchema: z.ZodObject<{
@@ -1109,24 +1232,37 @@ declare const flowNodeElementSchema: z.ZodObject<{
1109
1232
  shape: z.ZodEnum<["box", "rounded-box", "diamond", "circle", "pill", "cylinder", "parallelogram"]>;
1110
1233
  label: z.ZodString;
1111
1234
  sublabel: z.ZodOptional<z.ZodString>;
1112
- sublabelColor: z.ZodOptional<z.ZodString>;
1113
- labelColor: z.ZodOptional<z.ZodString>;
1235
+ sublabelColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1236
+ sublabel2: z.ZodOptional<z.ZodString>;
1237
+ sublabel2Color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1238
+ sublabel2FontSize: z.ZodOptional<z.ZodNumber>;
1239
+ labelColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1114
1240
  labelFontSize: z.ZodOptional<z.ZodNumber>;
1115
- color: z.ZodOptional<z.ZodString>;
1116
- borderColor: z.ZodOptional<z.ZodString>;
1241
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1242
+ borderColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1117
1243
  borderWidth: z.ZodOptional<z.ZodNumber>;
1118
1244
  cornerRadius: z.ZodOptional<z.ZodNumber>;
1119
1245
  width: z.ZodOptional<z.ZodNumber>;
1120
1246
  height: z.ZodOptional<z.ZodNumber>;
1247
+ fillOpacity: z.ZodDefault<z.ZodNumber>;
1121
1248
  opacity: z.ZodDefault<z.ZodNumber>;
1249
+ badgeText: z.ZodOptional<z.ZodString>;
1250
+ badgeColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1251
+ badgeBackground: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1252
+ badgePosition: z.ZodDefault<z.ZodEnum<["top", "inside-top"]>>;
1122
1253
  }, "strict", z.ZodTypeAny, {
1123
1254
  type: "flow-node";
1124
1255
  id: string;
1125
1256
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
1126
1257
  label: string;
1258
+ fillOpacity: number;
1127
1259
  opacity: number;
1260
+ badgePosition: "top" | "inside-top";
1128
1261
  sublabel?: string | undefined;
1129
1262
  sublabelColor?: string | undefined;
1263
+ sublabel2?: string | undefined;
1264
+ sublabel2Color?: string | undefined;
1265
+ sublabel2FontSize?: number | undefined;
1130
1266
  labelColor?: string | undefined;
1131
1267
  labelFontSize?: number | undefined;
1132
1268
  color?: string | undefined;
@@ -1135,6 +1271,9 @@ declare const flowNodeElementSchema: z.ZodObject<{
1135
1271
  cornerRadius?: number | undefined;
1136
1272
  width?: number | undefined;
1137
1273
  height?: number | undefined;
1274
+ badgeText?: string | undefined;
1275
+ badgeColor?: string | undefined;
1276
+ badgeBackground?: string | undefined;
1138
1277
  }, {
1139
1278
  type: "flow-node";
1140
1279
  id: string;
@@ -1142,6 +1281,9 @@ declare const flowNodeElementSchema: z.ZodObject<{
1142
1281
  label: string;
1143
1282
  sublabel?: string | undefined;
1144
1283
  sublabelColor?: string | undefined;
1284
+ sublabel2?: string | undefined;
1285
+ sublabel2Color?: string | undefined;
1286
+ sublabel2FontSize?: number | undefined;
1145
1287
  labelColor?: string | undefined;
1146
1288
  labelFontSize?: number | undefined;
1147
1289
  color?: string | undefined;
@@ -1150,7 +1292,12 @@ declare const flowNodeElementSchema: z.ZodObject<{
1150
1292
  cornerRadius?: number | undefined;
1151
1293
  width?: number | undefined;
1152
1294
  height?: number | undefined;
1295
+ fillOpacity?: number | undefined;
1153
1296
  opacity?: number | undefined;
1297
+ badgeText?: string | undefined;
1298
+ badgeColor?: string | undefined;
1299
+ badgeBackground?: string | undefined;
1300
+ badgePosition?: "top" | "inside-top" | undefined;
1154
1301
  }>;
1155
1302
  declare const connectionElementSchema: z.ZodObject<{
1156
1303
  type: z.ZodLiteral<"connection">;
@@ -1160,7 +1307,7 @@ declare const connectionElementSchema: z.ZodObject<{
1160
1307
  arrow: z.ZodDefault<z.ZodEnum<["end", "start", "both", "none"]>>;
1161
1308
  label: z.ZodOptional<z.ZodString>;
1162
1309
  labelPosition: z.ZodDefault<z.ZodEnum<["start", "middle", "end"]>>;
1163
- color: z.ZodOptional<z.ZodString>;
1310
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1164
1311
  width: z.ZodOptional<z.ZodNumber>;
1165
1312
  arrowSize: z.ZodOptional<z.ZodNumber>;
1166
1313
  opacity: z.ZodDefault<z.ZodNumber>;
@@ -1398,40 +1545,40 @@ declare const textElementSchema: z.ZodObject<{
1398
1545
  content: z.ZodString;
1399
1546
  style: z.ZodEnum<["heading", "subheading", "body", "caption", "code"]>;
1400
1547
  align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
1401
- color: z.ZodOptional<z.ZodString>;
1548
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1402
1549
  }, "strict", z.ZodTypeAny, {
1403
1550
  type: "text";
1404
1551
  id: string;
1405
- style: "code" | "body" | "heading" | "subheading" | "caption";
1552
+ style: "body" | "heading" | "code" | "subheading" | "caption";
1406
1553
  content: string;
1407
- align: "left" | "center" | "right";
1554
+ align: "center" | "left" | "right";
1408
1555
  color?: string | undefined;
1409
1556
  }, {
1410
1557
  type: "text";
1411
1558
  id: string;
1412
- style: "code" | "body" | "heading" | "subheading" | "caption";
1559
+ style: "body" | "heading" | "code" | "subheading" | "caption";
1413
1560
  content: string;
1414
1561
  color?: string | undefined;
1415
- align?: "left" | "center" | "right" | undefined;
1562
+ align?: "center" | "left" | "right" | undefined;
1416
1563
  }>;
1417
1564
  declare const shapeElementSchema: z.ZodObject<{
1418
1565
  type: z.ZodLiteral<"shape">;
1419
1566
  id: z.ZodString;
1420
1567
  shape: z.ZodEnum<["rectangle", "rounded-rectangle", "circle", "ellipse", "line", "arrow"]>;
1421
- fill: z.ZodOptional<z.ZodString>;
1422
- stroke: z.ZodOptional<z.ZodString>;
1568
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1569
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1423
1570
  strokeWidth: z.ZodDefault<z.ZodNumber>;
1424
1571
  }, "strict", z.ZodTypeAny, {
1425
1572
  type: "shape";
1426
1573
  id: string;
1427
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
1574
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
1428
1575
  strokeWidth: number;
1429
1576
  fill?: string | undefined;
1430
1577
  stroke?: string | undefined;
1431
1578
  }, {
1432
1579
  type: "shape";
1433
1580
  id: string;
1434
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
1581
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
1435
1582
  fill?: string | undefined;
1436
1583
  stroke?: string | undefined;
1437
1584
  strokeWidth?: number | undefined;
@@ -1468,22 +1615,22 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1468
1615
  tone: z.ZodDefault<z.ZodEnum<["neutral", "accent", "success", "warning", "error"]>>;
1469
1616
  icon: z.ZodOptional<z.ZodString>;
1470
1617
  }, "strict", z.ZodTypeAny, {
1618
+ body: string;
1471
1619
  type: "card";
1472
1620
  id: string;
1473
1621
  title: string;
1474
- body: string;
1475
- tone: "neutral" | "accent" | "success" | "warning" | "error";
1622
+ tone: "accent" | "success" | "warning" | "error" | "neutral";
1476
1623
  badge?: string | undefined;
1477
1624
  metric?: string | undefined;
1478
1625
  icon?: string | undefined;
1479
1626
  }, {
1627
+ body: string;
1480
1628
  type: "card";
1481
1629
  id: string;
1482
1630
  title: string;
1483
- body: string;
1484
1631
  badge?: string | undefined;
1485
1632
  metric?: string | undefined;
1486
- tone?: "neutral" | "accent" | "success" | "warning" | "error" | undefined;
1633
+ tone?: "accent" | "success" | "warning" | "error" | "neutral" | undefined;
1487
1634
  icon?: string | undefined;
1488
1635
  }>, z.ZodObject<{
1489
1636
  type: z.ZodLiteral<"flow-node">;
@@ -1491,24 +1638,37 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1491
1638
  shape: z.ZodEnum<["box", "rounded-box", "diamond", "circle", "pill", "cylinder", "parallelogram"]>;
1492
1639
  label: z.ZodString;
1493
1640
  sublabel: z.ZodOptional<z.ZodString>;
1494
- sublabelColor: z.ZodOptional<z.ZodString>;
1495
- labelColor: z.ZodOptional<z.ZodString>;
1641
+ sublabelColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1642
+ sublabel2: z.ZodOptional<z.ZodString>;
1643
+ sublabel2Color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1644
+ sublabel2FontSize: z.ZodOptional<z.ZodNumber>;
1645
+ labelColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1496
1646
  labelFontSize: z.ZodOptional<z.ZodNumber>;
1497
- color: z.ZodOptional<z.ZodString>;
1498
- borderColor: z.ZodOptional<z.ZodString>;
1647
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1648
+ borderColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1499
1649
  borderWidth: z.ZodOptional<z.ZodNumber>;
1500
1650
  cornerRadius: z.ZodOptional<z.ZodNumber>;
1501
1651
  width: z.ZodOptional<z.ZodNumber>;
1502
1652
  height: z.ZodOptional<z.ZodNumber>;
1653
+ fillOpacity: z.ZodDefault<z.ZodNumber>;
1503
1654
  opacity: z.ZodDefault<z.ZodNumber>;
1655
+ badgeText: z.ZodOptional<z.ZodString>;
1656
+ badgeColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1657
+ badgeBackground: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1658
+ badgePosition: z.ZodDefault<z.ZodEnum<["top", "inside-top"]>>;
1504
1659
  }, "strict", z.ZodTypeAny, {
1505
1660
  type: "flow-node";
1506
1661
  id: string;
1507
1662
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
1508
1663
  label: string;
1664
+ fillOpacity: number;
1509
1665
  opacity: number;
1666
+ badgePosition: "top" | "inside-top";
1510
1667
  sublabel?: string | undefined;
1511
1668
  sublabelColor?: string | undefined;
1669
+ sublabel2?: string | undefined;
1670
+ sublabel2Color?: string | undefined;
1671
+ sublabel2FontSize?: number | undefined;
1512
1672
  labelColor?: string | undefined;
1513
1673
  labelFontSize?: number | undefined;
1514
1674
  color?: string | undefined;
@@ -1517,6 +1677,9 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1517
1677
  cornerRadius?: number | undefined;
1518
1678
  width?: number | undefined;
1519
1679
  height?: number | undefined;
1680
+ badgeText?: string | undefined;
1681
+ badgeColor?: string | undefined;
1682
+ badgeBackground?: string | undefined;
1520
1683
  }, {
1521
1684
  type: "flow-node";
1522
1685
  id: string;
@@ -1524,6 +1687,9 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1524
1687
  label: string;
1525
1688
  sublabel?: string | undefined;
1526
1689
  sublabelColor?: string | undefined;
1690
+ sublabel2?: string | undefined;
1691
+ sublabel2Color?: string | undefined;
1692
+ sublabel2FontSize?: number | undefined;
1527
1693
  labelColor?: string | undefined;
1528
1694
  labelFontSize?: number | undefined;
1529
1695
  color?: string | undefined;
@@ -1532,7 +1698,12 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1532
1698
  cornerRadius?: number | undefined;
1533
1699
  width?: number | undefined;
1534
1700
  height?: number | undefined;
1701
+ fillOpacity?: number | undefined;
1535
1702
  opacity?: number | undefined;
1703
+ badgeText?: string | undefined;
1704
+ badgeColor?: string | undefined;
1705
+ badgeBackground?: string | undefined;
1706
+ badgePosition?: "top" | "inside-top" | undefined;
1536
1707
  }>, z.ZodObject<{
1537
1708
  type: z.ZodLiteral<"connection">;
1538
1709
  from: z.ZodString;
@@ -1541,7 +1712,7 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1541
1712
  arrow: z.ZodDefault<z.ZodEnum<["end", "start", "both", "none"]>>;
1542
1713
  label: z.ZodOptional<z.ZodString>;
1543
1714
  labelPosition: z.ZodDefault<z.ZodEnum<["start", "middle", "end"]>>;
1544
- color: z.ZodOptional<z.ZodString>;
1715
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1545
1716
  width: z.ZodOptional<z.ZodNumber>;
1546
1717
  arrowSize: z.ZodOptional<z.ZodNumber>;
1547
1718
  opacity: z.ZodDefault<z.ZodNumber>;
@@ -1742,39 +1913,39 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1742
1913
  content: z.ZodString;
1743
1914
  style: z.ZodEnum<["heading", "subheading", "body", "caption", "code"]>;
1744
1915
  align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
1745
- color: z.ZodOptional<z.ZodString>;
1916
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1746
1917
  }, "strict", z.ZodTypeAny, {
1747
1918
  type: "text";
1748
1919
  id: string;
1749
- style: "code" | "body" | "heading" | "subheading" | "caption";
1920
+ style: "body" | "heading" | "code" | "subheading" | "caption";
1750
1921
  content: string;
1751
- align: "left" | "center" | "right";
1922
+ align: "center" | "left" | "right";
1752
1923
  color?: string | undefined;
1753
1924
  }, {
1754
1925
  type: "text";
1755
1926
  id: string;
1756
- style: "code" | "body" | "heading" | "subheading" | "caption";
1927
+ style: "body" | "heading" | "code" | "subheading" | "caption";
1757
1928
  content: string;
1758
1929
  color?: string | undefined;
1759
- align?: "left" | "center" | "right" | undefined;
1930
+ align?: "center" | "left" | "right" | undefined;
1760
1931
  }>, z.ZodObject<{
1761
1932
  type: z.ZodLiteral<"shape">;
1762
1933
  id: z.ZodString;
1763
1934
  shape: z.ZodEnum<["rectangle", "rounded-rectangle", "circle", "ellipse", "line", "arrow"]>;
1764
- fill: z.ZodOptional<z.ZodString>;
1765
- stroke: z.ZodOptional<z.ZodString>;
1935
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1936
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1766
1937
  strokeWidth: z.ZodDefault<z.ZodNumber>;
1767
1938
  }, "strict", z.ZodTypeAny, {
1768
1939
  type: "shape";
1769
1940
  id: string;
1770
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
1941
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
1771
1942
  strokeWidth: number;
1772
1943
  fill?: string | undefined;
1773
1944
  stroke?: string | undefined;
1774
1945
  }, {
1775
1946
  type: "shape";
1776
1947
  id: string;
1777
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
1948
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
1778
1949
  fill?: string | undefined;
1779
1950
  stroke?: string | undefined;
1780
1951
  strokeWidth?: number | undefined;
@@ -1808,6 +1979,14 @@ declare const autoLayoutConfigSchema: z.ZodObject<{
1808
1979
  rankSpacing: z.ZodDefault<z.ZodNumber>;
1809
1980
  edgeRouting: z.ZodDefault<z.ZodEnum<["orthogonal", "polyline", "spline"]>>;
1810
1981
  aspectRatio: z.ZodOptional<z.ZodNumber>;
1982
+ /** ID of the root node for radial layout. Only relevant when algorithm is 'radial'. */
1983
+ radialRoot: z.ZodOptional<z.ZodString>;
1984
+ /** Fixed radius in pixels for radial layout. Only relevant when algorithm is 'radial'. */
1985
+ radialRadius: z.ZodOptional<z.ZodNumber>;
1986
+ /** Compaction strategy for radial layout. Only relevant when algorithm is 'radial'. */
1987
+ radialCompaction: z.ZodOptional<z.ZodEnum<["none", "radial", "wedge"]>>;
1988
+ /** Sort strategy for radial layout node ordering. Only relevant when algorithm is 'radial'. */
1989
+ radialSortBy: z.ZodOptional<z.ZodEnum<["id", "connections"]>>;
1811
1990
  }, "strict", z.ZodTypeAny, {
1812
1991
  mode: "auto";
1813
1992
  direction: "TB" | "BT" | "LR" | "RL";
@@ -1816,6 +1995,10 @@ declare const autoLayoutConfigSchema: z.ZodObject<{
1816
1995
  rankSpacing: number;
1817
1996
  edgeRouting: "orthogonal" | "polyline" | "spline";
1818
1997
  aspectRatio?: number | undefined;
1998
+ radialRoot?: string | undefined;
1999
+ radialRadius?: number | undefined;
2000
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
2001
+ radialSortBy?: "id" | "connections" | undefined;
1819
2002
  }, {
1820
2003
  mode: "auto";
1821
2004
  direction?: "TB" | "BT" | "LR" | "RL" | undefined;
@@ -1824,6 +2007,10 @@ declare const autoLayoutConfigSchema: z.ZodObject<{
1824
2007
  rankSpacing?: number | undefined;
1825
2008
  edgeRouting?: "orthogonal" | "polyline" | "spline" | undefined;
1826
2009
  aspectRatio?: number | undefined;
2010
+ radialRoot?: string | undefined;
2011
+ radialRadius?: number | undefined;
2012
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
2013
+ radialSortBy?: "id" | "connections" | undefined;
1827
2014
  }>;
1828
2015
  declare const gridLayoutConfigSchema: z.ZodObject<{
1829
2016
  mode: z.ZodLiteral<"grid">;
@@ -1906,6 +2093,14 @@ declare const layoutConfigSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1906
2093
  rankSpacing: z.ZodDefault<z.ZodNumber>;
1907
2094
  edgeRouting: z.ZodDefault<z.ZodEnum<["orthogonal", "polyline", "spline"]>>;
1908
2095
  aspectRatio: z.ZodOptional<z.ZodNumber>;
2096
+ /** ID of the root node for radial layout. Only relevant when algorithm is 'radial'. */
2097
+ radialRoot: z.ZodOptional<z.ZodString>;
2098
+ /** Fixed radius in pixels for radial layout. Only relevant when algorithm is 'radial'. */
2099
+ radialRadius: z.ZodOptional<z.ZodNumber>;
2100
+ /** Compaction strategy for radial layout. Only relevant when algorithm is 'radial'. */
2101
+ radialCompaction: z.ZodOptional<z.ZodEnum<["none", "radial", "wedge"]>>;
2102
+ /** Sort strategy for radial layout node ordering. Only relevant when algorithm is 'radial'. */
2103
+ radialSortBy: z.ZodOptional<z.ZodEnum<["id", "connections"]>>;
1909
2104
  }, "strict", z.ZodTypeAny, {
1910
2105
  mode: "auto";
1911
2106
  direction: "TB" | "BT" | "LR" | "RL";
@@ -1914,6 +2109,10 @@ declare const layoutConfigSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1914
2109
  rankSpacing: number;
1915
2110
  edgeRouting: "orthogonal" | "polyline" | "spline";
1916
2111
  aspectRatio?: number | undefined;
2112
+ radialRoot?: string | undefined;
2113
+ radialRadius?: number | undefined;
2114
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
2115
+ radialSortBy?: "id" | "connections" | undefined;
1917
2116
  }, {
1918
2117
  mode: "auto";
1919
2118
  direction?: "TB" | "BT" | "LR" | "RL" | undefined;
@@ -1922,6 +2121,10 @@ declare const layoutConfigSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1922
2121
  rankSpacing?: number | undefined;
1923
2122
  edgeRouting?: "orthogonal" | "polyline" | "spline" | undefined;
1924
2123
  aspectRatio?: number | undefined;
2124
+ radialRoot?: string | undefined;
2125
+ radialRadius?: number | undefined;
2126
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
2127
+ radialSortBy?: "id" | "connections" | undefined;
1925
2128
  }>, z.ZodObject<{
1926
2129
  mode: z.ZodLiteral<"grid">;
1927
2130
  columns: z.ZodDefault<z.ZodNumber>;
@@ -2014,7 +2217,7 @@ declare const decoratorSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2014
2217
  y: z.ZodDefault<z.ZodEnum<["after-header", "before-footer", "custom"]>>;
2015
2218
  customY: z.ZodOptional<z.ZodNumber>;
2016
2219
  thickness: z.ZodDefault<z.ZodNumber>;
2017
- colors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2220
+ colors: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
2018
2221
  margin: z.ZodDefault<z.ZodNumber>;
2019
2222
  }, "strict", z.ZodTypeAny, {
2020
2223
  type: "rainbow-rule";
@@ -2033,7 +2236,7 @@ declare const decoratorSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2033
2236
  }>, z.ZodObject<{
2034
2237
  type: z.ZodLiteral<"vignette">;
2035
2238
  intensity: z.ZodDefault<z.ZodNumber>;
2036
- color: z.ZodDefault<z.ZodString>;
2239
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2037
2240
  }, "strict", z.ZodTypeAny, {
2038
2241
  type: "vignette";
2039
2242
  color: string;
@@ -2049,7 +2252,7 @@ declare const decoratorSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2049
2252
  angle: z.ZodDefault<z.ZodNumber>;
2050
2253
  stops: z.ZodArray<z.ZodObject<{
2051
2254
  offset: z.ZodNumber;
2052
- color: z.ZodString;
2255
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2053
2256
  }, "strict", z.ZodTypeAny, {
2054
2257
  color: string;
2055
2258
  offset: number;
@@ -2075,7 +2278,7 @@ declare const decoratorSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2075
2278
  type: z.ZodLiteral<"radial">;
2076
2279
  stops: z.ZodArray<z.ZodObject<{
2077
2280
  offset: z.ZodNumber;
2078
- color: z.ZodString;
2281
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2079
2282
  }, "strict", z.ZodTypeAny, {
2080
2283
  color: string;
2081
2284
  offset: number;
@@ -2133,39 +2336,39 @@ declare const decoratorSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2133
2336
  opacity?: number | undefined;
2134
2337
  }>]>;
2135
2338
  declare const themeInputSchema: z.ZodUnion<[z.ZodEnum<["dark", "light", "dracula", "github-dark", "one-dark", "nord"]>, z.ZodObject<{
2136
- background: z.ZodString;
2137
- surface: z.ZodString;
2138
- surfaceMuted: z.ZodString;
2139
- surfaceElevated: z.ZodString;
2140
- text: z.ZodString;
2141
- textMuted: z.ZodString;
2142
- textInverse: z.ZodString;
2143
- primary: z.ZodString;
2144
- secondary: z.ZodString;
2145
- accent: z.ZodString;
2146
- success: z.ZodString;
2147
- warning: z.ZodString;
2148
- error: z.ZodString;
2149
- info: z.ZodString;
2150
- border: z.ZodString;
2151
- borderMuted: z.ZodString;
2339
+ background: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2340
+ surface: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2341
+ surfaceMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2342
+ surfaceElevated: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2343
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2344
+ textMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2345
+ textInverse: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2346
+ primary: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2347
+ secondary: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2348
+ accent: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2349
+ success: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2350
+ warning: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2351
+ error: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2352
+ info: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2353
+ border: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2354
+ borderMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2152
2355
  code: z.ZodObject<{
2153
- background: z.ZodString;
2154
- text: z.ZodString;
2155
- comment: z.ZodString;
2156
- keyword: z.ZodString;
2157
- string: z.ZodString;
2158
- number: z.ZodString;
2159
- function: z.ZodString;
2160
- variable: z.ZodString;
2161
- operator: z.ZodString;
2162
- punctuation: z.ZodString;
2356
+ background: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2357
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2358
+ comment: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2359
+ keyword: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2360
+ string: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2361
+ number: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2362
+ function: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2363
+ variable: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2364
+ operator: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2365
+ punctuation: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2163
2366
  }, "strict", z.ZodTypeAny, {
2164
2367
  string: string;
2165
2368
  number: string;
2166
2369
  function: string;
2167
- text: string;
2168
2370
  background: string;
2371
+ text: string;
2169
2372
  comment: string;
2170
2373
  keyword: string;
2171
2374
  variable: string;
@@ -2175,8 +2378,8 @@ declare const themeInputSchema: z.ZodUnion<[z.ZodEnum<["dark", "light", "dracula
2175
2378
  string: string;
2176
2379
  number: string;
2177
2380
  function: string;
2178
- text: string;
2179
2381
  background: string;
2382
+ text: string;
2180
2383
  comment: string;
2181
2384
  keyword: string;
2182
2385
  variable: string;
@@ -2201,27 +2404,27 @@ declare const themeInputSchema: z.ZodUnion<[z.ZodEnum<["dark", "light", "dracula
2201
2404
  string: string;
2202
2405
  number: string;
2203
2406
  function: string;
2204
- text: string;
2205
2407
  background: string;
2408
+ text: string;
2206
2409
  comment: string;
2207
2410
  keyword: string;
2208
2411
  variable: string;
2209
2412
  operator: string;
2210
2413
  punctuation: string;
2211
2414
  };
2212
- accent: string;
2213
- success: string;
2214
- warning: string;
2215
- error: string;
2216
- text: string;
2217
2415
  background: string;
2218
2416
  surface: string;
2219
2417
  surfaceMuted: string;
2220
2418
  surfaceElevated: string;
2419
+ text: string;
2221
2420
  textMuted: string;
2222
2421
  textInverse: string;
2223
2422
  primary: string;
2224
2423
  secondary: string;
2424
+ accent: string;
2425
+ success: string;
2426
+ warning: string;
2427
+ error: string;
2225
2428
  info: string;
2226
2429
  border: string;
2227
2430
  borderMuted: string;
@@ -2235,27 +2438,27 @@ declare const themeInputSchema: z.ZodUnion<[z.ZodEnum<["dark", "light", "dracula
2235
2438
  string: string;
2236
2439
  number: string;
2237
2440
  function: string;
2238
- text: string;
2239
2441
  background: string;
2442
+ text: string;
2240
2443
  comment: string;
2241
2444
  keyword: string;
2242
2445
  variable: string;
2243
2446
  operator: string;
2244
2447
  punctuation: string;
2245
2448
  };
2246
- accent: string;
2247
- success: string;
2248
- warning: string;
2249
- error: string;
2250
- text: string;
2251
2449
  background: string;
2252
2450
  surface: string;
2253
2451
  surfaceMuted: string;
2254
2452
  surfaceElevated: string;
2453
+ text: string;
2255
2454
  textMuted: string;
2256
2455
  textInverse: string;
2257
2456
  primary: string;
2258
2457
  secondary: string;
2458
+ accent: string;
2459
+ success: string;
2460
+ warning: string;
2461
+ error: string;
2259
2462
  info: string;
2260
2463
  border: string;
2261
2464
  borderMuted: string;
@@ -2265,6 +2468,7 @@ declare const themeInputSchema: z.ZodUnion<[z.ZodEnum<["dark", "light", "dracula
2265
2468
  mono: string;
2266
2469
  };
2267
2470
  }>]>;
2471
+ /** Zod schema that validates and transforms raw input into a fully resolved {@link DesignSpec}. This is the source of truth for spec validation. */
2268
2472
  declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2269
2473
  version: z.ZodDefault<z.ZodLiteral<2>>;
2270
2474
  canvas: z.ZodDefault<z.ZodObject<{
@@ -2281,39 +2485,39 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2281
2485
  padding?: number | undefined;
2282
2486
  }>>;
2283
2487
  theme: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["dark", "light", "dracula", "github-dark", "one-dark", "nord"]>, z.ZodObject<{
2284
- background: z.ZodString;
2285
- surface: z.ZodString;
2286
- surfaceMuted: z.ZodString;
2287
- surfaceElevated: z.ZodString;
2288
- text: z.ZodString;
2289
- textMuted: z.ZodString;
2290
- textInverse: z.ZodString;
2291
- primary: z.ZodString;
2292
- secondary: z.ZodString;
2293
- accent: z.ZodString;
2294
- success: z.ZodString;
2295
- warning: z.ZodString;
2296
- error: z.ZodString;
2297
- info: z.ZodString;
2298
- border: z.ZodString;
2299
- borderMuted: z.ZodString;
2488
+ background: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2489
+ surface: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2490
+ surfaceMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2491
+ surfaceElevated: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2492
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2493
+ textMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2494
+ textInverse: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2495
+ primary: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2496
+ secondary: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2497
+ accent: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2498
+ success: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2499
+ warning: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2500
+ error: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2501
+ info: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2502
+ border: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2503
+ borderMuted: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2300
2504
  code: z.ZodObject<{
2301
- background: z.ZodString;
2302
- text: z.ZodString;
2303
- comment: z.ZodString;
2304
- keyword: z.ZodString;
2305
- string: z.ZodString;
2306
- number: z.ZodString;
2307
- function: z.ZodString;
2308
- variable: z.ZodString;
2309
- operator: z.ZodString;
2310
- punctuation: z.ZodString;
2505
+ background: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2506
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2507
+ comment: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2508
+ keyword: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2509
+ string: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2510
+ number: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2511
+ function: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2512
+ variable: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2513
+ operator: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2514
+ punctuation: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2311
2515
  }, "strict", z.ZodTypeAny, {
2312
2516
  string: string;
2313
2517
  number: string;
2314
2518
  function: string;
2315
- text: string;
2316
2519
  background: string;
2520
+ text: string;
2317
2521
  comment: string;
2318
2522
  keyword: string;
2319
2523
  variable: string;
@@ -2323,8 +2527,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2323
2527
  string: string;
2324
2528
  number: string;
2325
2529
  function: string;
2326
- text: string;
2327
2530
  background: string;
2531
+ text: string;
2328
2532
  comment: string;
2329
2533
  keyword: string;
2330
2534
  variable: string;
@@ -2349,27 +2553,27 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2349
2553
  string: string;
2350
2554
  number: string;
2351
2555
  function: string;
2352
- text: string;
2353
2556
  background: string;
2557
+ text: string;
2354
2558
  comment: string;
2355
2559
  keyword: string;
2356
2560
  variable: string;
2357
2561
  operator: string;
2358
2562
  punctuation: string;
2359
2563
  };
2360
- accent: string;
2361
- success: string;
2362
- warning: string;
2363
- error: string;
2364
- text: string;
2365
2564
  background: string;
2366
2565
  surface: string;
2367
2566
  surfaceMuted: string;
2368
2567
  surfaceElevated: string;
2568
+ text: string;
2369
2569
  textMuted: string;
2370
2570
  textInverse: string;
2371
2571
  primary: string;
2372
2572
  secondary: string;
2573
+ accent: string;
2574
+ success: string;
2575
+ warning: string;
2576
+ error: string;
2373
2577
  info: string;
2374
2578
  border: string;
2375
2579
  borderMuted: string;
@@ -2383,27 +2587,27 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2383
2587
  string: string;
2384
2588
  number: string;
2385
2589
  function: string;
2386
- text: string;
2387
2590
  background: string;
2591
+ text: string;
2388
2592
  comment: string;
2389
2593
  keyword: string;
2390
2594
  variable: string;
2391
2595
  operator: string;
2392
2596
  punctuation: string;
2393
2597
  };
2394
- accent: string;
2395
- success: string;
2396
- warning: string;
2397
- error: string;
2398
- text: string;
2399
2598
  background: string;
2400
2599
  surface: string;
2401
2600
  surfaceMuted: string;
2402
2601
  surfaceElevated: string;
2602
+ text: string;
2403
2603
  textMuted: string;
2404
2604
  textInverse: string;
2405
2605
  primary: string;
2406
2606
  secondary: string;
2607
+ accent: string;
2608
+ success: string;
2609
+ warning: string;
2610
+ error: string;
2407
2611
  info: string;
2408
2612
  border: string;
2409
2613
  borderMuted: string;
@@ -2413,12 +2617,12 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2413
2617
  mono: string;
2414
2618
  };
2415
2619
  }>]>>;
2416
- background: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2620
+ background: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2417
2621
  type: z.ZodLiteral<"linear">;
2418
2622
  angle: z.ZodDefault<z.ZodNumber>;
2419
2623
  stops: z.ZodArray<z.ZodObject<{
2420
2624
  offset: z.ZodNumber;
2421
- color: z.ZodString;
2625
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2422
2626
  }, "strict", z.ZodTypeAny, {
2423
2627
  color: string;
2424
2628
  offset: number;
@@ -2444,7 +2648,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2444
2648
  type: z.ZodLiteral<"radial">;
2445
2649
  stops: z.ZodArray<z.ZodObject<{
2446
2650
  offset: z.ZodNumber;
2447
- color: z.ZodString;
2651
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2448
2652
  }, "strict", z.ZodTypeAny, {
2449
2653
  color: string;
2450
2654
  offset: number;
@@ -2474,14 +2678,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2474
2678
  titleFontSize: z.ZodOptional<z.ZodNumber>;
2475
2679
  }, "strict", z.ZodTypeAny, {
2476
2680
  title: string;
2477
- align: "left" | "center" | "right";
2681
+ align: "center" | "left" | "right";
2478
2682
  titleLetterSpacing: number;
2479
2683
  eyebrow?: string | undefined;
2480
2684
  subtitle?: string | undefined;
2481
2685
  titleFontSize?: number | undefined;
2482
2686
  }, {
2483
2687
  title: string;
2484
- align?: "left" | "center" | "right" | undefined;
2688
+ align?: "center" | "left" | "right" | undefined;
2485
2689
  eyebrow?: string | undefined;
2486
2690
  subtitle?: string | undefined;
2487
2691
  titleLetterSpacing?: number | undefined;
@@ -2497,22 +2701,22 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2497
2701
  tone: z.ZodDefault<z.ZodEnum<["neutral", "accent", "success", "warning", "error"]>>;
2498
2702
  icon: z.ZodOptional<z.ZodString>;
2499
2703
  }, "strict", z.ZodTypeAny, {
2704
+ body: string;
2500
2705
  type: "card";
2501
2706
  id: string;
2502
2707
  title: string;
2503
- body: string;
2504
- tone: "neutral" | "accent" | "success" | "warning" | "error";
2708
+ tone: "accent" | "success" | "warning" | "error" | "neutral";
2505
2709
  badge?: string | undefined;
2506
2710
  metric?: string | undefined;
2507
2711
  icon?: string | undefined;
2508
2712
  }, {
2713
+ body: string;
2509
2714
  type: "card";
2510
2715
  id: string;
2511
2716
  title: string;
2512
- body: string;
2513
2717
  badge?: string | undefined;
2514
2718
  metric?: string | undefined;
2515
- tone?: "neutral" | "accent" | "success" | "warning" | "error" | undefined;
2719
+ tone?: "accent" | "success" | "warning" | "error" | "neutral" | undefined;
2516
2720
  icon?: string | undefined;
2517
2721
  }>, z.ZodObject<{
2518
2722
  type: z.ZodLiteral<"flow-node">;
@@ -2520,24 +2724,37 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2520
2724
  shape: z.ZodEnum<["box", "rounded-box", "diamond", "circle", "pill", "cylinder", "parallelogram"]>;
2521
2725
  label: z.ZodString;
2522
2726
  sublabel: z.ZodOptional<z.ZodString>;
2523
- sublabelColor: z.ZodOptional<z.ZodString>;
2524
- labelColor: z.ZodOptional<z.ZodString>;
2727
+ sublabelColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2728
+ sublabel2: z.ZodOptional<z.ZodString>;
2729
+ sublabel2Color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2730
+ sublabel2FontSize: z.ZodOptional<z.ZodNumber>;
2731
+ labelColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2525
2732
  labelFontSize: z.ZodOptional<z.ZodNumber>;
2526
- color: z.ZodOptional<z.ZodString>;
2527
- borderColor: z.ZodOptional<z.ZodString>;
2733
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2734
+ borderColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2528
2735
  borderWidth: z.ZodOptional<z.ZodNumber>;
2529
2736
  cornerRadius: z.ZodOptional<z.ZodNumber>;
2530
2737
  width: z.ZodOptional<z.ZodNumber>;
2531
2738
  height: z.ZodOptional<z.ZodNumber>;
2739
+ fillOpacity: z.ZodDefault<z.ZodNumber>;
2532
2740
  opacity: z.ZodDefault<z.ZodNumber>;
2741
+ badgeText: z.ZodOptional<z.ZodString>;
2742
+ badgeColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2743
+ badgeBackground: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2744
+ badgePosition: z.ZodDefault<z.ZodEnum<["top", "inside-top"]>>;
2533
2745
  }, "strict", z.ZodTypeAny, {
2534
2746
  type: "flow-node";
2535
2747
  id: string;
2536
2748
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
2537
2749
  label: string;
2750
+ fillOpacity: number;
2538
2751
  opacity: number;
2752
+ badgePosition: "top" | "inside-top";
2539
2753
  sublabel?: string | undefined;
2540
2754
  sublabelColor?: string | undefined;
2755
+ sublabel2?: string | undefined;
2756
+ sublabel2Color?: string | undefined;
2757
+ sublabel2FontSize?: number | undefined;
2541
2758
  labelColor?: string | undefined;
2542
2759
  labelFontSize?: number | undefined;
2543
2760
  color?: string | undefined;
@@ -2546,6 +2763,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2546
2763
  cornerRadius?: number | undefined;
2547
2764
  width?: number | undefined;
2548
2765
  height?: number | undefined;
2766
+ badgeText?: string | undefined;
2767
+ badgeColor?: string | undefined;
2768
+ badgeBackground?: string | undefined;
2549
2769
  }, {
2550
2770
  type: "flow-node";
2551
2771
  id: string;
@@ -2553,6 +2773,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2553
2773
  label: string;
2554
2774
  sublabel?: string | undefined;
2555
2775
  sublabelColor?: string | undefined;
2776
+ sublabel2?: string | undefined;
2777
+ sublabel2Color?: string | undefined;
2778
+ sublabel2FontSize?: number | undefined;
2556
2779
  labelColor?: string | undefined;
2557
2780
  labelFontSize?: number | undefined;
2558
2781
  color?: string | undefined;
@@ -2561,7 +2784,12 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2561
2784
  cornerRadius?: number | undefined;
2562
2785
  width?: number | undefined;
2563
2786
  height?: number | undefined;
2787
+ fillOpacity?: number | undefined;
2564
2788
  opacity?: number | undefined;
2789
+ badgeText?: string | undefined;
2790
+ badgeColor?: string | undefined;
2791
+ badgeBackground?: string | undefined;
2792
+ badgePosition?: "top" | "inside-top" | undefined;
2565
2793
  }>, z.ZodObject<{
2566
2794
  type: z.ZodLiteral<"connection">;
2567
2795
  from: z.ZodString;
@@ -2570,7 +2798,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2570
2798
  arrow: z.ZodDefault<z.ZodEnum<["end", "start", "both", "none"]>>;
2571
2799
  label: z.ZodOptional<z.ZodString>;
2572
2800
  labelPosition: z.ZodDefault<z.ZodEnum<["start", "middle", "end"]>>;
2573
- color: z.ZodOptional<z.ZodString>;
2801
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2574
2802
  width: z.ZodOptional<z.ZodNumber>;
2575
2803
  arrowSize: z.ZodOptional<z.ZodNumber>;
2576
2804
  opacity: z.ZodDefault<z.ZodNumber>;
@@ -2771,39 +2999,39 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2771
2999
  content: z.ZodString;
2772
3000
  style: z.ZodEnum<["heading", "subheading", "body", "caption", "code"]>;
2773
3001
  align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
2774
- color: z.ZodOptional<z.ZodString>;
3002
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2775
3003
  }, "strict", z.ZodTypeAny, {
2776
3004
  type: "text";
2777
3005
  id: string;
2778
- style: "code" | "body" | "heading" | "subheading" | "caption";
3006
+ style: "body" | "heading" | "code" | "subheading" | "caption";
2779
3007
  content: string;
2780
- align: "left" | "center" | "right";
3008
+ align: "center" | "left" | "right";
2781
3009
  color?: string | undefined;
2782
3010
  }, {
2783
3011
  type: "text";
2784
3012
  id: string;
2785
- style: "code" | "body" | "heading" | "subheading" | "caption";
3013
+ style: "body" | "heading" | "code" | "subheading" | "caption";
2786
3014
  content: string;
2787
3015
  color?: string | undefined;
2788
- align?: "left" | "center" | "right" | undefined;
3016
+ align?: "center" | "left" | "right" | undefined;
2789
3017
  }>, z.ZodObject<{
2790
3018
  type: z.ZodLiteral<"shape">;
2791
3019
  id: z.ZodString;
2792
3020
  shape: z.ZodEnum<["rectangle", "rounded-rectangle", "circle", "ellipse", "line", "arrow"]>;
2793
- fill: z.ZodOptional<z.ZodString>;
2794
- stroke: z.ZodOptional<z.ZodString>;
3021
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3022
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2795
3023
  strokeWidth: z.ZodDefault<z.ZodNumber>;
2796
3024
  }, "strict", z.ZodTypeAny, {
2797
3025
  type: "shape";
2798
3026
  id: string;
2799
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
3027
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
2800
3028
  strokeWidth: number;
2801
3029
  fill?: string | undefined;
2802
3030
  stroke?: string | undefined;
2803
3031
  }, {
2804
3032
  type: "shape";
2805
3033
  id: string;
2806
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
3034
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
2807
3035
  fill?: string | undefined;
2808
3036
  stroke?: string | undefined;
2809
3037
  strokeWidth?: number | undefined;
@@ -2844,7 +3072,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2844
3072
  y: z.ZodDefault<z.ZodEnum<["after-header", "before-footer", "custom"]>>;
2845
3073
  customY: z.ZodOptional<z.ZodNumber>;
2846
3074
  thickness: z.ZodDefault<z.ZodNumber>;
2847
- colors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3075
+ colors: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
2848
3076
  margin: z.ZodDefault<z.ZodNumber>;
2849
3077
  }, "strict", z.ZodTypeAny, {
2850
3078
  type: "rainbow-rule";
@@ -2863,7 +3091,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2863
3091
  }>, z.ZodObject<{
2864
3092
  type: z.ZodLiteral<"vignette">;
2865
3093
  intensity: z.ZodDefault<z.ZodNumber>;
2866
- color: z.ZodDefault<z.ZodString>;
3094
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2867
3095
  }, "strict", z.ZodTypeAny, {
2868
3096
  type: "vignette";
2869
3097
  color: string;
@@ -2879,7 +3107,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2879
3107
  angle: z.ZodDefault<z.ZodNumber>;
2880
3108
  stops: z.ZodArray<z.ZodObject<{
2881
3109
  offset: z.ZodNumber;
2882
- color: z.ZodString;
3110
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2883
3111
  }, "strict", z.ZodTypeAny, {
2884
3112
  color: string;
2885
3113
  offset: number;
@@ -2905,7 +3133,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2905
3133
  type: z.ZodLiteral<"radial">;
2906
3134
  stops: z.ZodArray<z.ZodObject<{
2907
3135
  offset: z.ZodNumber;
2908
- color: z.ZodString;
3136
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2909
3137
  }, "strict", z.ZodTypeAny, {
2910
3138
  color: string;
2911
3139
  offset: number;
@@ -2968,8 +3196,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
2968
3196
  y: z.ZodNumber;
2969
3197
  width: z.ZodNumber;
2970
3198
  height: z.ZodNumber;
2971
- fill: z.ZodOptional<z.ZodString>;
2972
- stroke: z.ZodOptional<z.ZodString>;
3199
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3200
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2973
3201
  strokeWidth: z.ZodDefault<z.ZodNumber>;
2974
3202
  radius: z.ZodDefault<z.ZodNumber>;
2975
3203
  opacity: z.ZodDefault<z.ZodNumber>;
@@ -3000,8 +3228,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3000
3228
  cx: z.ZodNumber;
3001
3229
  cy: z.ZodNumber;
3002
3230
  radius: z.ZodNumber;
3003
- fill: z.ZodOptional<z.ZodString>;
3004
- stroke: z.ZodOptional<z.ZodString>;
3231
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3232
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3005
3233
  strokeWidth: z.ZodDefault<z.ZodNumber>;
3006
3234
  opacity: z.ZodDefault<z.ZodNumber>;
3007
3235
  }, "strict", z.ZodTypeAny, {
@@ -3030,7 +3258,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3030
3258
  fontSize: z.ZodDefault<z.ZodNumber>;
3031
3259
  fontWeight: z.ZodDefault<z.ZodNumber>;
3032
3260
  fontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
3033
- color: z.ZodDefault<z.ZodString>;
3261
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3034
3262
  align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
3035
3263
  baseline: z.ZodDefault<z.ZodEnum<["top", "middle", "alphabetic", "bottom"]>>;
3036
3264
  letterSpacing: z.ZodDefault<z.ZodNumber>;
@@ -3040,14 +3268,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3040
3268
  type: "text";
3041
3269
  color: string;
3042
3270
  opacity: number;
3043
- fontSize: number;
3044
3271
  text: string;
3045
- align: "left" | "center" | "right";
3272
+ fontSize: number;
3273
+ align: "center" | "left" | "right";
3046
3274
  x: number;
3047
3275
  y: number;
3048
3276
  fontWeight: number;
3049
3277
  fontFamily: "body" | "heading" | "mono";
3050
- baseline: "middle" | "alphabetic" | "bottom" | "top";
3278
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
3051
3279
  letterSpacing: number;
3052
3280
  maxWidth?: number | undefined;
3053
3281
  }, {
@@ -3058,10 +3286,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3058
3286
  color?: string | undefined;
3059
3287
  opacity?: number | undefined;
3060
3288
  fontSize?: number | undefined;
3061
- align?: "left" | "center" | "right" | undefined;
3289
+ align?: "center" | "left" | "right" | undefined;
3062
3290
  fontWeight?: number | undefined;
3063
3291
  fontFamily?: "body" | "heading" | "mono" | undefined;
3064
- baseline?: "middle" | "alphabetic" | "bottom" | "top" | undefined;
3292
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
3065
3293
  letterSpacing?: number | undefined;
3066
3294
  maxWidth?: number | undefined;
3067
3295
  }>, z.ZodObject<{
@@ -3070,7 +3298,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3070
3298
  y1: z.ZodNumber;
3071
3299
  x2: z.ZodNumber;
3072
3300
  y2: z.ZodNumber;
3073
- color: z.ZodDefault<z.ZodString>;
3301
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3074
3302
  width: z.ZodDefault<z.ZodNumber>;
3075
3303
  dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
3076
3304
  arrow: z.ZodDefault<z.ZodEnum<["none", "end", "start", "both"]>>;
@@ -3112,7 +3340,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3112
3340
  x: number;
3113
3341
  y: number;
3114
3342
  }>, "many">;
3115
- color: z.ZodDefault<z.ZodString>;
3343
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3116
3344
  width: z.ZodDefault<z.ZodNumber>;
3117
3345
  dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
3118
3346
  arrow: z.ZodDefault<z.ZodEnum<["none", "end", "start", "both"]>>;
@@ -3145,8 +3373,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3145
3373
  }>, z.ZodObject<{
3146
3374
  type: z.ZodLiteral<"path">;
3147
3375
  d: z.ZodString;
3148
- fill: z.ZodOptional<z.ZodString>;
3149
- stroke: z.ZodOptional<z.ZodString>;
3376
+ fill: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3377
+ stroke: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3150
3378
  strokeWidth: z.ZodDefault<z.ZodNumber>;
3151
3379
  opacity: z.ZodDefault<z.ZodNumber>;
3152
3380
  }, "strict", z.ZodTypeAny, {
@@ -3170,8 +3398,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3170
3398
  text: z.ZodString;
3171
3399
  fontSize: z.ZodDefault<z.ZodNumber>;
3172
3400
  fontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
3173
- color: z.ZodDefault<z.ZodString>;
3174
- background: z.ZodDefault<z.ZodString>;
3401
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3402
+ background: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3175
3403
  paddingX: z.ZodDefault<z.ZodNumber>;
3176
3404
  paddingY: z.ZodDefault<z.ZodNumber>;
3177
3405
  borderRadius: z.ZodDefault<z.ZodNumber>;
@@ -3180,12 +3408,12 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3180
3408
  type: "badge";
3181
3409
  color: string;
3182
3410
  opacity: number;
3183
- fontSize: number;
3411
+ background: string;
3184
3412
  text: string;
3413
+ fontSize: number;
3185
3414
  borderRadius: number;
3186
3415
  x: number;
3187
3416
  y: number;
3188
- background: string;
3189
3417
  fontFamily: "body" | "heading" | "mono";
3190
3418
  paddingX: number;
3191
3419
  paddingY: number;
@@ -3196,9 +3424,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3196
3424
  y: number;
3197
3425
  color?: string | undefined;
3198
3426
  opacity?: number | undefined;
3427
+ background?: string | undefined;
3199
3428
  fontSize?: number | undefined;
3200
3429
  borderRadius?: number | undefined;
3201
- background?: string | undefined;
3202
3430
  fontFamily?: "body" | "heading" | "mono" | undefined;
3203
3431
  paddingX?: number | undefined;
3204
3432
  paddingY?: number | undefined;
@@ -3213,7 +3441,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3213
3441
  angle: z.ZodDefault<z.ZodNumber>;
3214
3442
  stops: z.ZodArray<z.ZodObject<{
3215
3443
  offset: z.ZodNumber;
3216
- color: z.ZodString;
3444
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
3217
3445
  }, "strict", z.ZodTypeAny, {
3218
3446
  color: string;
3219
3447
  offset: number;
@@ -3239,7 +3467,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3239
3467
  type: z.ZodLiteral<"radial">;
3240
3468
  stops: z.ZodArray<z.ZodObject<{
3241
3469
  offset: z.ZodNumber;
3242
- color: z.ZodString;
3470
+ color: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
3243
3471
  }, "strict", z.ZodTypeAny, {
3244
3472
  color: string;
3245
3473
  offset: number;
@@ -3315,6 +3543,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3315
3543
  rankSpacing: z.ZodDefault<z.ZodNumber>;
3316
3544
  edgeRouting: z.ZodDefault<z.ZodEnum<["orthogonal", "polyline", "spline"]>>;
3317
3545
  aspectRatio: z.ZodOptional<z.ZodNumber>;
3546
+ /** ID of the root node for radial layout. Only relevant when algorithm is 'radial'. */
3547
+ radialRoot: z.ZodOptional<z.ZodString>;
3548
+ /** Fixed radius in pixels for radial layout. Only relevant when algorithm is 'radial'. */
3549
+ radialRadius: z.ZodOptional<z.ZodNumber>;
3550
+ /** Compaction strategy for radial layout. Only relevant when algorithm is 'radial'. */
3551
+ radialCompaction: z.ZodOptional<z.ZodEnum<["none", "radial", "wedge"]>>;
3552
+ /** Sort strategy for radial layout node ordering. Only relevant when algorithm is 'radial'. */
3553
+ radialSortBy: z.ZodOptional<z.ZodEnum<["id", "connections"]>>;
3318
3554
  }, "strict", z.ZodTypeAny, {
3319
3555
  mode: "auto";
3320
3556
  direction: "TB" | "BT" | "LR" | "RL";
@@ -3323,6 +3559,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3323
3559
  rankSpacing: number;
3324
3560
  edgeRouting: "orthogonal" | "polyline" | "spline";
3325
3561
  aspectRatio?: number | undefined;
3562
+ radialRoot?: string | undefined;
3563
+ radialRadius?: number | undefined;
3564
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
3565
+ radialSortBy?: "id" | "connections" | undefined;
3326
3566
  }, {
3327
3567
  mode: "auto";
3328
3568
  direction?: "TB" | "BT" | "LR" | "RL" | undefined;
@@ -3331,6 +3571,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3331
3571
  rankSpacing?: number | undefined;
3332
3572
  edgeRouting?: "orthogonal" | "polyline" | "spline" | undefined;
3333
3573
  aspectRatio?: number | undefined;
3574
+ radialRoot?: string | undefined;
3575
+ radialRadius?: number | undefined;
3576
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
3577
+ radialSortBy?: "id" | "connections" | undefined;
3334
3578
  }>, z.ZodObject<{
3335
3579
  mode: z.ZodLiteral<"grid">;
3336
3580
  columns: z.ZodDefault<z.ZodNumber>;
@@ -3419,41 +3663,6 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3419
3663
  maxTextTruncation?: number | undefined;
3420
3664
  }>>;
3421
3665
  }, "strict", z.ZodTypeAny, {
3422
- theme: {
3423
- code: {
3424
- string: string;
3425
- number: string;
3426
- function: string;
3427
- text: string;
3428
- background: string;
3429
- comment: string;
3430
- keyword: string;
3431
- variable: string;
3432
- operator: string;
3433
- punctuation: string;
3434
- };
3435
- accent: string;
3436
- success: string;
3437
- warning: string;
3438
- error: string;
3439
- text: string;
3440
- background: string;
3441
- surface: string;
3442
- surfaceMuted: string;
3443
- surfaceElevated: string;
3444
- textMuted: string;
3445
- textInverse: string;
3446
- primary: string;
3447
- secondary: string;
3448
- info: string;
3449
- border: string;
3450
- borderMuted: string;
3451
- fonts: {
3452
- body: string;
3453
- heading: string;
3454
- mono: string;
3455
- };
3456
- } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark";
3457
3666
  draw: ({
3458
3667
  type: "rect";
3459
3668
  width: number;
@@ -3478,14 +3687,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3478
3687
  type: "text";
3479
3688
  color: string;
3480
3689
  opacity: number;
3481
- fontSize: number;
3482
3690
  text: string;
3483
- align: "left" | "center" | "right";
3691
+ fontSize: number;
3692
+ align: "center" | "left" | "right";
3484
3693
  x: number;
3485
3694
  y: number;
3486
3695
  fontWeight: number;
3487
3696
  fontFamily: "body" | "heading" | "mono";
3488
- baseline: "middle" | "alphabetic" | "bottom" | "top";
3697
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
3489
3698
  letterSpacing: number;
3490
3699
  maxWidth?: number | undefined;
3491
3700
  } | {
@@ -3523,12 +3732,12 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3523
3732
  type: "badge";
3524
3733
  color: string;
3525
3734
  opacity: number;
3526
- fontSize: number;
3735
+ background: string;
3527
3736
  text: string;
3737
+ fontSize: number;
3528
3738
  borderRadius: number;
3529
3739
  x: number;
3530
3740
  y: number;
3531
- background: string;
3532
3741
  fontFamily: "body" | "heading" | "mono";
3533
3742
  paddingX: number;
3534
3743
  paddingY: number;
@@ -3555,6 +3764,41 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3555
3764
  }[];
3556
3765
  };
3557
3766
  })[];
3767
+ theme: {
3768
+ code: {
3769
+ string: string;
3770
+ number: string;
3771
+ function: string;
3772
+ background: string;
3773
+ text: string;
3774
+ comment: string;
3775
+ keyword: string;
3776
+ variable: string;
3777
+ operator: string;
3778
+ punctuation: string;
3779
+ };
3780
+ background: string;
3781
+ surface: string;
3782
+ surfaceMuted: string;
3783
+ surfaceElevated: string;
3784
+ text: string;
3785
+ textMuted: string;
3786
+ textInverse: string;
3787
+ primary: string;
3788
+ secondary: string;
3789
+ accent: string;
3790
+ success: string;
3791
+ warning: string;
3792
+ error: string;
3793
+ info: string;
3794
+ border: string;
3795
+ borderMuted: string;
3796
+ fonts: {
3797
+ body: string;
3798
+ heading: string;
3799
+ mono: string;
3800
+ };
3801
+ } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark";
3558
3802
  version: 2;
3559
3803
  canvas: {
3560
3804
  width: number;
@@ -3562,22 +3806,18 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3562
3806
  padding: number;
3563
3807
  };
3564
3808
  elements: ({
3565
- type: "card";
3566
- id: string;
3567
- title: string;
3568
- body: string;
3569
- tone: "neutral" | "accent" | "success" | "warning" | "error";
3570
- badge?: string | undefined;
3571
- metric?: string | undefined;
3572
- icon?: string | undefined;
3573
- } | {
3574
3809
  type: "flow-node";
3575
3810
  id: string;
3576
3811
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
3577
3812
  label: string;
3813
+ fillOpacity: number;
3578
3814
  opacity: number;
3815
+ badgePosition: "top" | "inside-top";
3579
3816
  sublabel?: string | undefined;
3580
3817
  sublabelColor?: string | undefined;
3818
+ sublabel2?: string | undefined;
3819
+ sublabel2Color?: string | undefined;
3820
+ sublabel2FontSize?: number | undefined;
3581
3821
  labelColor?: string | undefined;
3582
3822
  labelFontSize?: number | undefined;
3583
3823
  color?: string | undefined;
@@ -3586,6 +3826,18 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3586
3826
  cornerRadius?: number | undefined;
3587
3827
  width?: number | undefined;
3588
3828
  height?: number | undefined;
3829
+ badgeText?: string | undefined;
3830
+ badgeColor?: string | undefined;
3831
+ badgeBackground?: string | undefined;
3832
+ } | {
3833
+ body: string;
3834
+ type: "card";
3835
+ id: string;
3836
+ title: string;
3837
+ tone: "accent" | "success" | "warning" | "error" | "neutral";
3838
+ badge?: string | undefined;
3839
+ metric?: string | undefined;
3840
+ icon?: string | undefined;
3589
3841
  } | {
3590
3842
  type: "connection";
3591
3843
  opacity: number;
@@ -3642,14 +3894,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3642
3894
  } | {
3643
3895
  type: "text";
3644
3896
  id: string;
3645
- style: "code" | "body" | "heading" | "subheading" | "caption";
3897
+ style: "body" | "heading" | "code" | "subheading" | "caption";
3646
3898
  content: string;
3647
- align: "left" | "center" | "right";
3899
+ align: "center" | "left" | "right";
3648
3900
  color?: string | undefined;
3649
3901
  } | {
3650
3902
  type: "shape";
3651
3903
  id: string;
3652
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
3904
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
3653
3905
  strokeWidth: number;
3654
3906
  fill?: string | undefined;
3655
3907
  stroke?: string | undefined;
@@ -3712,7 +3964,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3712
3964
  } | undefined;
3713
3965
  header?: {
3714
3966
  title: string;
3715
- align: "left" | "center" | "right";
3967
+ align: "center" | "left" | "right";
3716
3968
  titleLetterSpacing: number;
3717
3969
  eyebrow?: string | undefined;
3718
3970
  subtitle?: string | undefined;
@@ -3735,6 +3987,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3735
3987
  rankSpacing: number;
3736
3988
  edgeRouting: "orthogonal" | "polyline" | "spline";
3737
3989
  aspectRatio?: number | undefined;
3990
+ radialRoot?: string | undefined;
3991
+ radialRadius?: number | undefined;
3992
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
3993
+ radialSortBy?: "id" | "connections" | undefined;
3738
3994
  } | {
3739
3995
  mode: "grid";
3740
3996
  gap: number;
@@ -3752,41 +4008,6 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3752
4008
  }>;
3753
4009
  } | undefined;
3754
4010
  }, {
3755
- theme?: {
3756
- code: {
3757
- string: string;
3758
- number: string;
3759
- function: string;
3760
- text: string;
3761
- background: string;
3762
- comment: string;
3763
- keyword: string;
3764
- variable: string;
3765
- operator: string;
3766
- punctuation: string;
3767
- };
3768
- accent: string;
3769
- success: string;
3770
- warning: string;
3771
- error: string;
3772
- text: string;
3773
- background: string;
3774
- surface: string;
3775
- surfaceMuted: string;
3776
- surfaceElevated: string;
3777
- textMuted: string;
3778
- textInverse: string;
3779
- primary: string;
3780
- secondary: string;
3781
- info: string;
3782
- border: string;
3783
- borderMuted: string;
3784
- fonts: {
3785
- body: string;
3786
- heading: string;
3787
- mono: string;
3788
- };
3789
- } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark" | undefined;
3790
4011
  background?: string | {
3791
4012
  type: "linear";
3792
4013
  stops: {
@@ -3803,7 +4024,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3803
4024
  } | undefined;
3804
4025
  header?: {
3805
4026
  title: string;
3806
- align?: "left" | "center" | "right" | undefined;
4027
+ align?: "center" | "left" | "right" | undefined;
3807
4028
  eyebrow?: string | undefined;
3808
4029
  subtitle?: string | undefined;
3809
4030
  titleLetterSpacing?: number | undefined;
@@ -3841,10 +4062,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3841
4062
  color?: string | undefined;
3842
4063
  opacity?: number | undefined;
3843
4064
  fontSize?: number | undefined;
3844
- align?: "left" | "center" | "right" | undefined;
4065
+ align?: "center" | "left" | "right" | undefined;
3845
4066
  fontWeight?: number | undefined;
3846
4067
  fontFamily?: "body" | "heading" | "mono" | undefined;
3847
- baseline?: "middle" | "alphabetic" | "bottom" | "top" | undefined;
4068
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
3848
4069
  letterSpacing?: number | undefined;
3849
4070
  maxWidth?: number | undefined;
3850
4071
  } | {
@@ -3885,9 +4106,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3885
4106
  y: number;
3886
4107
  color?: string | undefined;
3887
4108
  opacity?: number | undefined;
4109
+ background?: string | undefined;
3888
4110
  fontSize?: number | undefined;
3889
4111
  borderRadius?: number | undefined;
3890
- background?: string | undefined;
3891
4112
  fontFamily?: "body" | "heading" | "mono" | undefined;
3892
4113
  paddingX?: number | undefined;
3893
4114
  paddingY?: number | undefined;
@@ -3914,6 +4135,41 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3914
4135
  opacity?: number | undefined;
3915
4136
  radius?: number | undefined;
3916
4137
  })[] | undefined;
4138
+ theme?: {
4139
+ code: {
4140
+ string: string;
4141
+ number: string;
4142
+ function: string;
4143
+ background: string;
4144
+ text: string;
4145
+ comment: string;
4146
+ keyword: string;
4147
+ variable: string;
4148
+ operator: string;
4149
+ punctuation: string;
4150
+ };
4151
+ background: string;
4152
+ surface: string;
4153
+ surfaceMuted: string;
4154
+ surfaceElevated: string;
4155
+ text: string;
4156
+ textMuted: string;
4157
+ textInverse: string;
4158
+ primary: string;
4159
+ secondary: string;
4160
+ accent: string;
4161
+ success: string;
4162
+ warning: string;
4163
+ error: string;
4164
+ info: string;
4165
+ border: string;
4166
+ borderMuted: string;
4167
+ fonts: {
4168
+ body: string;
4169
+ heading: string;
4170
+ mono: string;
4171
+ };
4172
+ } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark" | undefined;
3917
4173
  version?: 2 | undefined;
3918
4174
  canvas?: {
3919
4175
  width?: number | undefined;
@@ -3921,21 +4177,15 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3921
4177
  padding?: number | undefined;
3922
4178
  } | undefined;
3923
4179
  elements?: ({
3924
- type: "card";
3925
- id: string;
3926
- title: string;
3927
- body: string;
3928
- badge?: string | undefined;
3929
- metric?: string | undefined;
3930
- tone?: "neutral" | "accent" | "success" | "warning" | "error" | undefined;
3931
- icon?: string | undefined;
3932
- } | {
3933
4180
  type: "flow-node";
3934
4181
  id: string;
3935
4182
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
3936
4183
  label: string;
3937
4184
  sublabel?: string | undefined;
3938
4185
  sublabelColor?: string | undefined;
4186
+ sublabel2?: string | undefined;
4187
+ sublabel2Color?: string | undefined;
4188
+ sublabel2FontSize?: number | undefined;
3939
4189
  labelColor?: string | undefined;
3940
4190
  labelFontSize?: number | undefined;
3941
4191
  color?: string | undefined;
@@ -3944,7 +4194,21 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3944
4194
  cornerRadius?: number | undefined;
3945
4195
  width?: number | undefined;
3946
4196
  height?: number | undefined;
4197
+ fillOpacity?: number | undefined;
3947
4198
  opacity?: number | undefined;
4199
+ badgeText?: string | undefined;
4200
+ badgeColor?: string | undefined;
4201
+ badgeBackground?: string | undefined;
4202
+ badgePosition?: "top" | "inside-top" | undefined;
4203
+ } | {
4204
+ body: string;
4205
+ type: "card";
4206
+ id: string;
4207
+ title: string;
4208
+ badge?: string | undefined;
4209
+ metric?: string | undefined;
4210
+ tone?: "accent" | "success" | "warning" | "error" | "neutral" | undefined;
4211
+ icon?: string | undefined;
3948
4212
  } | {
3949
4213
  type: "connection";
3950
4214
  from: string;
@@ -4001,14 +4265,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4001
4265
  } | {
4002
4266
  type: "text";
4003
4267
  id: string;
4004
- style: "code" | "body" | "heading" | "subheading" | "caption";
4268
+ style: "body" | "heading" | "code" | "subheading" | "caption";
4005
4269
  content: string;
4006
4270
  color?: string | undefined;
4007
- align?: "left" | "center" | "right" | undefined;
4271
+ align?: "center" | "left" | "right" | undefined;
4008
4272
  } | {
4009
4273
  type: "shape";
4010
4274
  id: string;
4011
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
4275
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
4012
4276
  fill?: string | undefined;
4013
4277
  stroke?: string | undefined;
4014
4278
  strokeWidth?: number | undefined;
@@ -4062,6 +4326,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4062
4326
  rankSpacing?: number | undefined;
4063
4327
  edgeRouting?: "orthogonal" | "polyline" | "spline" | undefined;
4064
4328
  aspectRatio?: number | undefined;
4329
+ radialRoot?: string | undefined;
4330
+ radialRadius?: number | undefined;
4331
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
4332
+ radialSortBy?: "id" | "connections" | undefined;
4065
4333
  } | {
4066
4334
  mode: "grid";
4067
4335
  gap?: number | undefined;
@@ -4098,6 +4366,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4098
4366
  rankSpacing: number;
4099
4367
  edgeRouting: "orthogonal" | "polyline" | "spline";
4100
4368
  aspectRatio?: number | undefined;
4369
+ radialRoot?: string | undefined;
4370
+ radialRadius?: number | undefined;
4371
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
4372
+ radialSortBy?: "id" | "connections" | undefined;
4101
4373
  } | {
4102
4374
  mode: "grid";
4103
4375
  gap: number;
@@ -4114,41 +4386,6 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4114
4386
  height?: number | undefined;
4115
4387
  }>;
4116
4388
  };
4117
- theme: {
4118
- code: {
4119
- string: string;
4120
- number: string;
4121
- function: string;
4122
- text: string;
4123
- background: string;
4124
- comment: string;
4125
- keyword: string;
4126
- variable: string;
4127
- operator: string;
4128
- punctuation: string;
4129
- };
4130
- accent: string;
4131
- success: string;
4132
- warning: string;
4133
- error: string;
4134
- text: string;
4135
- background: string;
4136
- surface: string;
4137
- surfaceMuted: string;
4138
- surfaceElevated: string;
4139
- textMuted: string;
4140
- textInverse: string;
4141
- primary: string;
4142
- secondary: string;
4143
- info: string;
4144
- border: string;
4145
- borderMuted: string;
4146
- fonts: {
4147
- body: string;
4148
- heading: string;
4149
- mono: string;
4150
- };
4151
- } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark";
4152
4389
  draw: ({
4153
4390
  type: "rect";
4154
4391
  width: number;
@@ -4173,14 +4410,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4173
4410
  type: "text";
4174
4411
  color: string;
4175
4412
  opacity: number;
4176
- fontSize: number;
4177
4413
  text: string;
4178
- align: "left" | "center" | "right";
4414
+ fontSize: number;
4415
+ align: "center" | "left" | "right";
4179
4416
  x: number;
4180
4417
  y: number;
4181
4418
  fontWeight: number;
4182
4419
  fontFamily: "body" | "heading" | "mono";
4183
- baseline: "middle" | "alphabetic" | "bottom" | "top";
4420
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
4184
4421
  letterSpacing: number;
4185
4422
  maxWidth?: number | undefined;
4186
4423
  } | {
@@ -4218,12 +4455,12 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4218
4455
  type: "badge";
4219
4456
  color: string;
4220
4457
  opacity: number;
4221
- fontSize: number;
4458
+ background: string;
4222
4459
  text: string;
4460
+ fontSize: number;
4223
4461
  borderRadius: number;
4224
4462
  x: number;
4225
4463
  y: number;
4226
- background: string;
4227
4464
  fontFamily: "body" | "heading" | "mono";
4228
4465
  paddingX: number;
4229
4466
  paddingY: number;
@@ -4250,6 +4487,41 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4250
4487
  }[];
4251
4488
  };
4252
4489
  })[];
4490
+ theme: {
4491
+ code: {
4492
+ string: string;
4493
+ number: string;
4494
+ function: string;
4495
+ background: string;
4496
+ text: string;
4497
+ comment: string;
4498
+ keyword: string;
4499
+ variable: string;
4500
+ operator: string;
4501
+ punctuation: string;
4502
+ };
4503
+ background: string;
4504
+ surface: string;
4505
+ surfaceMuted: string;
4506
+ surfaceElevated: string;
4507
+ text: string;
4508
+ textMuted: string;
4509
+ textInverse: string;
4510
+ primary: string;
4511
+ secondary: string;
4512
+ accent: string;
4513
+ success: string;
4514
+ warning: string;
4515
+ error: string;
4516
+ info: string;
4517
+ border: string;
4518
+ borderMuted: string;
4519
+ fonts: {
4520
+ body: string;
4521
+ heading: string;
4522
+ mono: string;
4523
+ };
4524
+ } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark";
4253
4525
  version: 2;
4254
4526
  canvas: {
4255
4527
  width: number;
@@ -4257,22 +4529,18 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4257
4529
  padding: number;
4258
4530
  };
4259
4531
  elements: ({
4260
- type: "card";
4261
- id: string;
4262
- title: string;
4263
- body: string;
4264
- tone: "neutral" | "accent" | "success" | "warning" | "error";
4265
- badge?: string | undefined;
4266
- metric?: string | undefined;
4267
- icon?: string | undefined;
4268
- } | {
4269
4532
  type: "flow-node";
4270
4533
  id: string;
4271
4534
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
4272
4535
  label: string;
4536
+ fillOpacity: number;
4273
4537
  opacity: number;
4538
+ badgePosition: "top" | "inside-top";
4274
4539
  sublabel?: string | undefined;
4275
4540
  sublabelColor?: string | undefined;
4541
+ sublabel2?: string | undefined;
4542
+ sublabel2Color?: string | undefined;
4543
+ sublabel2FontSize?: number | undefined;
4276
4544
  labelColor?: string | undefined;
4277
4545
  labelFontSize?: number | undefined;
4278
4546
  color?: string | undefined;
@@ -4281,6 +4549,18 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4281
4549
  cornerRadius?: number | undefined;
4282
4550
  width?: number | undefined;
4283
4551
  height?: number | undefined;
4552
+ badgeText?: string | undefined;
4553
+ badgeColor?: string | undefined;
4554
+ badgeBackground?: string | undefined;
4555
+ } | {
4556
+ body: string;
4557
+ type: "card";
4558
+ id: string;
4559
+ title: string;
4560
+ tone: "accent" | "success" | "warning" | "error" | "neutral";
4561
+ badge?: string | undefined;
4562
+ metric?: string | undefined;
4563
+ icon?: string | undefined;
4284
4564
  } | {
4285
4565
  type: "connection";
4286
4566
  opacity: number;
@@ -4337,14 +4617,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4337
4617
  } | {
4338
4618
  type: "text";
4339
4619
  id: string;
4340
- style: "code" | "body" | "heading" | "subheading" | "caption";
4620
+ style: "body" | "heading" | "code" | "subheading" | "caption";
4341
4621
  content: string;
4342
- align: "left" | "center" | "right";
4622
+ align: "center" | "left" | "right";
4343
4623
  color?: string | undefined;
4344
4624
  } | {
4345
4625
  type: "shape";
4346
4626
  id: string;
4347
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
4627
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
4348
4628
  strokeWidth: number;
4349
4629
  fill?: string | undefined;
4350
4630
  stroke?: string | undefined;
@@ -4407,7 +4687,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4407
4687
  } | undefined;
4408
4688
  header?: {
4409
4689
  title: string;
4410
- align: "left" | "center" | "right";
4690
+ align: "center" | "left" | "right";
4411
4691
  titleLetterSpacing: number;
4412
4692
  eyebrow?: string | undefined;
4413
4693
  subtitle?: string | undefined;
@@ -4418,41 +4698,6 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4418
4698
  tagline?: string | undefined;
4419
4699
  } | undefined;
4420
4700
  }, {
4421
- theme?: {
4422
- code: {
4423
- string: string;
4424
- number: string;
4425
- function: string;
4426
- text: string;
4427
- background: string;
4428
- comment: string;
4429
- keyword: string;
4430
- variable: string;
4431
- operator: string;
4432
- punctuation: string;
4433
- };
4434
- accent: string;
4435
- success: string;
4436
- warning: string;
4437
- error: string;
4438
- text: string;
4439
- background: string;
4440
- surface: string;
4441
- surfaceMuted: string;
4442
- surfaceElevated: string;
4443
- textMuted: string;
4444
- textInverse: string;
4445
- primary: string;
4446
- secondary: string;
4447
- info: string;
4448
- border: string;
4449
- borderMuted: string;
4450
- fonts: {
4451
- body: string;
4452
- heading: string;
4453
- mono: string;
4454
- };
4455
- } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark" | undefined;
4456
4701
  background?: string | {
4457
4702
  type: "linear";
4458
4703
  stops: {
@@ -4469,7 +4714,7 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4469
4714
  } | undefined;
4470
4715
  header?: {
4471
4716
  title: string;
4472
- align?: "left" | "center" | "right" | undefined;
4717
+ align?: "center" | "left" | "right" | undefined;
4473
4718
  eyebrow?: string | undefined;
4474
4719
  subtitle?: string | undefined;
4475
4720
  titleLetterSpacing?: number | undefined;
@@ -4507,10 +4752,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4507
4752
  color?: string | undefined;
4508
4753
  opacity?: number | undefined;
4509
4754
  fontSize?: number | undefined;
4510
- align?: "left" | "center" | "right" | undefined;
4755
+ align?: "center" | "left" | "right" | undefined;
4511
4756
  fontWeight?: number | undefined;
4512
4757
  fontFamily?: "body" | "heading" | "mono" | undefined;
4513
- baseline?: "middle" | "alphabetic" | "bottom" | "top" | undefined;
4758
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
4514
4759
  letterSpacing?: number | undefined;
4515
4760
  maxWidth?: number | undefined;
4516
4761
  } | {
@@ -4551,9 +4796,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4551
4796
  y: number;
4552
4797
  color?: string | undefined;
4553
4798
  opacity?: number | undefined;
4799
+ background?: string | undefined;
4554
4800
  fontSize?: number | undefined;
4555
4801
  borderRadius?: number | undefined;
4556
- background?: string | undefined;
4557
4802
  fontFamily?: "body" | "heading" | "mono" | undefined;
4558
4803
  paddingX?: number | undefined;
4559
4804
  paddingY?: number | undefined;
@@ -4580,6 +4825,41 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4580
4825
  opacity?: number | undefined;
4581
4826
  radius?: number | undefined;
4582
4827
  })[] | undefined;
4828
+ theme?: {
4829
+ code: {
4830
+ string: string;
4831
+ number: string;
4832
+ function: string;
4833
+ background: string;
4834
+ text: string;
4835
+ comment: string;
4836
+ keyword: string;
4837
+ variable: string;
4838
+ operator: string;
4839
+ punctuation: string;
4840
+ };
4841
+ background: string;
4842
+ surface: string;
4843
+ surfaceMuted: string;
4844
+ surfaceElevated: string;
4845
+ text: string;
4846
+ textMuted: string;
4847
+ textInverse: string;
4848
+ primary: string;
4849
+ secondary: string;
4850
+ accent: string;
4851
+ success: string;
4852
+ warning: string;
4853
+ error: string;
4854
+ info: string;
4855
+ border: string;
4856
+ borderMuted: string;
4857
+ fonts: {
4858
+ body: string;
4859
+ heading: string;
4860
+ mono: string;
4861
+ };
4862
+ } | "dracula" | "github-dark" | "nord" | "dark" | "light" | "one-dark" | undefined;
4583
4863
  version?: 2 | undefined;
4584
4864
  canvas?: {
4585
4865
  width?: number | undefined;
@@ -4587,21 +4867,15 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4587
4867
  padding?: number | undefined;
4588
4868
  } | undefined;
4589
4869
  elements?: ({
4590
- type: "card";
4591
- id: string;
4592
- title: string;
4593
- body: string;
4594
- badge?: string | undefined;
4595
- metric?: string | undefined;
4596
- tone?: "neutral" | "accent" | "success" | "warning" | "error" | undefined;
4597
- icon?: string | undefined;
4598
- } | {
4599
4870
  type: "flow-node";
4600
4871
  id: string;
4601
4872
  shape: "box" | "rounded-box" | "diamond" | "circle" | "pill" | "cylinder" | "parallelogram";
4602
4873
  label: string;
4603
4874
  sublabel?: string | undefined;
4604
4875
  sublabelColor?: string | undefined;
4876
+ sublabel2?: string | undefined;
4877
+ sublabel2Color?: string | undefined;
4878
+ sublabel2FontSize?: number | undefined;
4605
4879
  labelColor?: string | undefined;
4606
4880
  labelFontSize?: number | undefined;
4607
4881
  color?: string | undefined;
@@ -4610,7 +4884,21 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4610
4884
  cornerRadius?: number | undefined;
4611
4885
  width?: number | undefined;
4612
4886
  height?: number | undefined;
4887
+ fillOpacity?: number | undefined;
4613
4888
  opacity?: number | undefined;
4889
+ badgeText?: string | undefined;
4890
+ badgeColor?: string | undefined;
4891
+ badgeBackground?: string | undefined;
4892
+ badgePosition?: "top" | "inside-top" | undefined;
4893
+ } | {
4894
+ body: string;
4895
+ type: "card";
4896
+ id: string;
4897
+ title: string;
4898
+ badge?: string | undefined;
4899
+ metric?: string | undefined;
4900
+ tone?: "accent" | "success" | "warning" | "error" | "neutral" | undefined;
4901
+ icon?: string | undefined;
4614
4902
  } | {
4615
4903
  type: "connection";
4616
4904
  from: string;
@@ -4667,14 +4955,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4667
4955
  } | {
4668
4956
  type: "text";
4669
4957
  id: string;
4670
- style: "code" | "body" | "heading" | "subheading" | "caption";
4958
+ style: "body" | "heading" | "code" | "subheading" | "caption";
4671
4959
  content: string;
4672
4960
  color?: string | undefined;
4673
- align?: "left" | "center" | "right" | undefined;
4961
+ align?: "center" | "left" | "right" | undefined;
4674
4962
  } | {
4675
4963
  type: "shape";
4676
4964
  id: string;
4677
- shape: "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse" | "line";
4965
+ shape: "line" | "circle" | "arrow" | "rectangle" | "rounded-rectangle" | "ellipse";
4678
4966
  fill?: string | undefined;
4679
4967
  stroke?: string | undefined;
4680
4968
  strokeWidth?: number | undefined;
@@ -4728,6 +5016,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4728
5016
  rankSpacing?: number | undefined;
4729
5017
  edgeRouting?: "orthogonal" | "polyline" | "spline" | undefined;
4730
5018
  aspectRatio?: number | undefined;
5019
+ radialRoot?: string | undefined;
5020
+ radialRadius?: number | undefined;
5021
+ radialCompaction?: "none" | "radial" | "wedge" | undefined;
5022
+ radialSortBy?: "id" | "connections" | undefined;
4731
5023
  } | {
4732
5024
  mode: "grid";
4733
5025
  gap?: number | undefined;
@@ -4803,7 +5095,27 @@ type DesignSafeFrame = {
4803
5095
  height: number;
4804
5096
  };
4805
5097
 
5098
+ /**
5099
+ * Compute the safe rendering area by insetting the canvas by its padding value.
5100
+ *
5101
+ * Elements positioned within the safe frame are guaranteed not to be clipped by
5102
+ * the canvas edges.
5103
+ *
5104
+ * @param spec - A parsed {@link DesignSpec} with resolved canvas dimensions and
5105
+ * padding.
5106
+ * @returns A {@link DesignSafeFrame} rectangle describing the usable area.
5107
+ */
4806
5108
  declare function deriveSafeFrame(spec: DesignSpec): DesignSafeFrame;
5109
+ /**
5110
+ * Validate and parse raw input into a fully resolved {@link DesignSpec}.
5111
+ *
5112
+ * Uses {@link designSpecSchema} under the hood. Throws a `ZodError` if the
5113
+ * input does not conform to the schema.
5114
+ *
5115
+ * @param input - Raw (unvalidated) input object to parse.
5116
+ * @returns A validated and transformed {@link DesignSpec}.
5117
+ * @throws {import('zod').ZodError} When the input fails schema validation.
5118
+ */
4807
5119
  declare function parseDesignSpec(input: unknown): DesignSpec;
4808
5120
 
4809
5121
  export { defaultGridLayout as $, type AutoLayoutConfig as A, type BuiltInTheme as B, type CardElement as C, type DesignSpec as D, type Element as E, type FlowNodeElement as F, type Gradient as G, type RainbowRuleDecorator as H, type ImageElement as I, type RenderResult as J, type StackLayoutConfig as K, type LayoutConfig as L, type ManualLayoutConfig as M, type TerminalElement as N, type TextElement as O, type ThemeInput as P, builtInThemeBackgrounds as Q, type RenderMetadata as R, type ShapeElement as S, type ThemeInput$1 as T, builtInThemes as U, type VignetteDecorator as V, type WrittenArtifacts as W, computeSpecHash as X, defaultAutoLayout as Y, defaultCanvas as Z, defaultConstraints as _, type Rect as a, defaultLayout as a0, defaultStackLayout as a1, defaultTheme as a2, deriveSafeFrame as a3, designSpecSchema as a4, drawGradientRect as a5, drawRainbowRule as a6, drawVignette as a7, inferLayout as a8, inferSidecarPath as a9, parseDesignSpec as aa, renderDesign as ab, resolveTheme as ac, writeRenderArtifacts as ad, type CodeBlockStyle as ae, type GradientStop as af, type LinearGradient as ag, type RadialGradient as ah, type DrawCommand as b, type Theme as c, type RenderedElement as d, type CodeBlockElement as e, type ConnectionElement as f, type ConstraintSpec as g, DEFAULT_GENERATOR_VERSION as h, DEFAULT_RAINBOW_COLORS as i, type Decorator as j, type DesignSafeFrame as k, type DrawBadge as l, type DrawBezier as m, type DrawCircle as n, type DrawFontFamily as o, type DrawGradientRect as p, type DrawLine as q, type DrawPath as r, type DrawPoint as s, type DrawRect as t, type DrawText as u, type GradientOverlayDecorator as v, type GradientSpec as w, type GradientStop$1 as x, type GridLayoutConfig as y, type LayoutSnapshot as z };