@spectratools/graphic-designer-cli 0.7.1 → 0.9.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.
package/dist/cli.js CHANGED
@@ -879,6 +879,26 @@ var drawGridSchema = z2.object({
879
879
  offsetX: z2.number().default(0),
880
880
  offsetY: z2.number().default(0)
881
881
  }).strict();
882
+ var drawTextRowSegmentSchema = z2.object({
883
+ text: z2.string().min(1).max(500),
884
+ color: colorHexSchema2.optional(),
885
+ fontSize: z2.number().min(6).max(200).optional(),
886
+ fontWeight: z2.number().int().min(100).max(900).optional(),
887
+ fontFamily: drawFontFamilySchema.optional()
888
+ }).strict();
889
+ var drawTextRowSchema = z2.object({
890
+ type: z2.literal("text-row"),
891
+ segments: z2.array(drawTextRowSegmentSchema).min(1).max(20),
892
+ x: z2.number(),
893
+ y: z2.number(),
894
+ align: z2.enum(["left", "center", "right"]).default("center"),
895
+ baseline: z2.enum(["top", "middle", "alphabetic", "bottom"]).default("alphabetic"),
896
+ defaultFontSize: z2.number().min(6).max(200).default(16),
897
+ defaultFontWeight: z2.number().int().min(100).max(900).default(400),
898
+ defaultFontFamily: drawFontFamilySchema.default("body"),
899
+ defaultColor: colorHexSchema2.default("#FFFFFF"),
900
+ opacity: z2.number().min(0).max(1).default(1)
901
+ }).strict();
882
902
  var drawCommandSchema = z2.discriminatedUnion("type", [
883
903
  drawRectSchema,
884
904
  drawCircleSchema,
@@ -888,7 +908,8 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
888
908
  drawPathSchema,
889
909
  drawBadgeSchema,
890
910
  drawGradientRectSchema,
891
- drawGridSchema
911
+ drawGridSchema,
912
+ drawTextRowSchema
892
913
  ]);
893
914
  var defaultCanvas = {
894
915
  width: 1200,
@@ -992,7 +1013,14 @@ var flowNodeElementSchema = z2.object({
992
1013
  badgeColor: colorHexSchema2.optional(),
993
1014
  badgeBackground: colorHexSchema2.optional(),
994
1015
  badgePosition: z2.enum(["top", "inside-top"]).default("inside-top"),
995
- shadow: flowNodeShadowSchema.optional()
1016
+ shadow: flowNodeShadowSchema.optional(),
1017
+ // Accent bar (left edge colored bar)
1018
+ accentColor: colorHexSchema2.optional(),
1019
+ accentBarWidth: z2.number().min(0).max(16).default(3),
1020
+ // Inner glow (gradient overlay from accent color inward)
1021
+ glowColor: colorHexSchema2.optional(),
1022
+ glowWidth: z2.number().min(0).max(64).default(16),
1023
+ glowOpacity: z2.number().min(0).max(1).default(0.15)
996
1024
  }).strict();
997
1025
  var anchorHintSchema = z2.union([
998
1026
  z2.enum(["top", "bottom", "left", "right", "center"]),
@@ -1839,6 +1867,38 @@ function renderFlowNode(ctx, node, bounds, theme) {
1839
1867
  ctx.shadowOffsetX = 0;
1840
1868
  ctx.shadowOffsetY = 0;
1841
1869
  }
1870
+ if (node.accentColor) {
1871
+ const barWidth = node.accentBarWidth ?? 3;
1872
+ const effectiveRadius = node.shape === "box" ? 0 : cornerRadius;
1873
+ ctx.save();
1874
+ ctx.beginPath();
1875
+ ctx.roundRect(bounds.x, bounds.y, bounds.width, bounds.height, effectiveRadius);
1876
+ ctx.clip();
1877
+ ctx.fillStyle = node.accentColor;
1878
+ ctx.fillRect(bounds.x, bounds.y, barWidth, bounds.height);
1879
+ ctx.restore();
1880
+ }
1881
+ if (node.glowColor) {
1882
+ const glowW = node.glowWidth ?? 16;
1883
+ const glowOp = node.glowOpacity ?? 0.15;
1884
+ ctx.save();
1885
+ ctx.beginPath();
1886
+ ctx.roundRect(bounds.x, bounds.y, bounds.width, bounds.height, cornerRadius);
1887
+ ctx.clip();
1888
+ const barOffset = node.accentColor ? node.accentBarWidth ?? 3 : 0;
1889
+ const gradient = ctx.createLinearGradient(
1890
+ bounds.x + barOffset,
1891
+ bounds.y,
1892
+ bounds.x + barOffset + glowW,
1893
+ bounds.y
1894
+ );
1895
+ gradient.addColorStop(0, node.glowColor);
1896
+ gradient.addColorStop(1, "rgba(0,0,0,0)");
1897
+ ctx.globalAlpha = glowOp;
1898
+ ctx.fillStyle = gradient;
1899
+ ctx.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);
1900
+ ctx.restore();
1901
+ }
1842
1902
  const headingFont = resolveFont(theme.fonts.heading, "heading");
1843
1903
  const bodyFont = resolveFont(theme.fonts.body, "body");
1844
1904
  const monoFont = resolveFont(theme.fonts.mono, "mono");
@@ -4220,6 +4280,84 @@ function renderDrawCommands(ctx, commands, theme) {
4220
4280
  });
4221
4281
  break;
4222
4282
  }
4283
+ case "text-row": {
4284
+ const segments = command.segments;
4285
+ if (segments.length === 0) break;
4286
+ const resolveSegment = (seg) => ({
4287
+ text: seg.text,
4288
+ fontSize: seg.fontSize ?? command.defaultFontSize,
4289
+ fontWeight: seg.fontWeight ?? command.defaultFontWeight,
4290
+ fontFamily: resolveDrawFont(theme, seg.fontFamily ?? command.defaultFontFamily),
4291
+ color: seg.color ?? command.defaultColor
4292
+ });
4293
+ const measured = [];
4294
+ let totalWidth = 0;
4295
+ let maxAscent = 0;
4296
+ let maxDescent = 0;
4297
+ for (const seg of segments) {
4298
+ const resolved = resolveSegment(seg);
4299
+ applyFont(ctx, {
4300
+ size: resolved.fontSize,
4301
+ weight: resolved.fontWeight,
4302
+ family: resolved.fontFamily
4303
+ });
4304
+ const metrics = ctx.measureText(resolved.text);
4305
+ const width = metrics.width;
4306
+ const ascent = metrics.actualBoundingBoxAscent || 0;
4307
+ const descent = metrics.actualBoundingBoxDescent || 0;
4308
+ totalWidth += width;
4309
+ maxAscent = Math.max(maxAscent, ascent);
4310
+ maxDescent = Math.max(maxDescent, descent);
4311
+ measured.push({ width, resolved });
4312
+ }
4313
+ let cursorX;
4314
+ if (command.align === "center") {
4315
+ cursorX = command.x - totalWidth / 2;
4316
+ } else if (command.align === "right") {
4317
+ cursorX = command.x - totalWidth;
4318
+ } else {
4319
+ cursorX = command.x;
4320
+ }
4321
+ const startX = cursorX;
4322
+ withOpacity(ctx, command.opacity, () => {
4323
+ ctx.textBaseline = command.baseline;
4324
+ for (const { width, resolved } of measured) {
4325
+ applyFont(ctx, {
4326
+ size: resolved.fontSize,
4327
+ weight: resolved.fontWeight,
4328
+ family: resolved.fontFamily
4329
+ });
4330
+ ctx.fillStyle = resolved.color;
4331
+ ctx.textAlign = "left";
4332
+ ctx.fillText(resolved.text, cursorX, command.y);
4333
+ cursorX += width;
4334
+ }
4335
+ });
4336
+ const height = Math.max(1, maxAscent + maxDescent);
4337
+ let topY;
4338
+ if (command.baseline === "top") {
4339
+ topY = command.y;
4340
+ } else if (command.baseline === "middle") {
4341
+ topY = command.y - height / 2;
4342
+ } else if (command.baseline === "bottom") {
4343
+ topY = command.y - height;
4344
+ } else {
4345
+ topY = command.y - maxAscent;
4346
+ }
4347
+ rendered.push({
4348
+ id,
4349
+ kind: "draw",
4350
+ bounds: {
4351
+ x: startX,
4352
+ y: topY,
4353
+ width: Math.max(1, totalWidth),
4354
+ height
4355
+ },
4356
+ foregroundColor: command.defaultColor,
4357
+ backgroundColor: theme.background
4358
+ });
4359
+ break;
4360
+ }
4223
4361
  }
4224
4362
  }
4225
4363
  return rendered;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Cli } from 'incur';
2
- import { T as ThemeInput, D as DesignSpec, a as Rect$1, b as DrawCommand, c as Theme, d as RenderedElement, A as AnchorHint, C as ConnectionElement } from './spec.schema-BDvtn_mJ.js';
3
- export { e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement, h as ConstraintSpec, i as DEFAULT_GENERATOR_VERSION, j as DEFAULT_RAINBOW_COLORS, k as Decorator, l as DesignCardSpec, m as DesignSafeFrame, n as DesignTheme, o as DiagramElement, p as DiagramLayout, q as DiagramSpec, r as DrawBadge, s as DrawBezier, t as DrawCircle, u as DrawFontFamily, v as DrawGradientRect, w as DrawLine, x as DrawPath, y as DrawPoint, z as DrawRect, E as DrawShadow, F as DrawText, G as Element, H as FlowNodeElement, I as Gradient, J as GradientOverlayDecorator, K as GradientSpec, L as GradientStop, M as GridLayoutConfig, N as ImageElement, O as LayoutConfig, P as LayoutSnapshot, Q as ManualLayoutConfig, S as RainbowRuleDecorator, R as RenderMetadata, U as RenderResult, V as ShapeElement, W as StackLayoutConfig, X as TerminalElement, Y as TextElement, Z as ThemeInput, _ as VignetteDecorator, $ as WrittenArtifacts, a0 as builtInThemeBackgrounds, a1 as builtInThemes, a2 as computeSpecHash, a3 as connectionElementSchema, a4 as defaultAutoLayout, a5 as defaultCanvas, a6 as defaultConstraints, a7 as defaultGridLayout, a8 as defaultLayout, a9 as defaultStackLayout, aa as defaultTheme, ab as deriveSafeFrame, ac as designSpecSchema, ad as diagramElementSchema, ae as diagramLayoutSchema, af as diagramSpecSchema, ag as drawGradientRect, ah as drawRainbowRule, ai as drawVignette, aj as flowNodeElementSchema, ak as inferLayout, al as inferSidecarPath, am as parseDesignSpec, an as parseDiagramSpec, ao as renderDesign, ap as resolveTheme, aq as writeRenderArtifacts } from './spec.schema-BDvtn_mJ.js';
2
+ import { T as ThemeInput, D as DesignSpec, a as Rect$1, b as DrawCommand, c as Theme, d as RenderedElement, A as AnchorHint, C as ConnectionElement } from './spec.schema-B_Z-KNqt.js';
3
+ export { e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement, h as ConstraintSpec, i as DEFAULT_GENERATOR_VERSION, j as DEFAULT_RAINBOW_COLORS, k as Decorator, l as DesignCardSpec, m as DesignSafeFrame, n as DesignTheme, o as DiagramElement, p as DiagramLayout, q as DiagramSpec, r as DrawBadge, s as DrawBezier, t as DrawCircle, u as DrawFontFamily, v as DrawGradientRect, w as DrawLine, x as DrawPath, y as DrawPoint, z as DrawRect, E as DrawShadow, F as DrawText, G as DrawTextRow, H as DrawTextRowSegment, I as Element, J as FlowNodeElement, K as Gradient, L as GradientOverlayDecorator, M as GradientSpec, N as GradientStop, O as GridLayoutConfig, P as ImageElement, Q as LayoutConfig, S as LayoutSnapshot, U as ManualLayoutConfig, V as RainbowRuleDecorator, R as RenderMetadata, W as RenderResult, X as ShapeElement, Y as StackLayoutConfig, Z as TerminalElement, _ as TextElement, $ as ThemeInput, a0 as VignetteDecorator, a1 as WrittenArtifacts, a2 as builtInThemeBackgrounds, a3 as builtInThemes, a4 as computeSpecHash, a5 as connectionElementSchema, a6 as defaultAutoLayout, a7 as defaultCanvas, a8 as defaultConstraints, a9 as defaultGridLayout, aa as defaultLayout, ab as defaultStackLayout, ac as defaultTheme, ad as deriveSafeFrame, ae as designSpecSchema, af as diagramElementSchema, ag as diagramLayoutSchema, ah as diagramSpecSchema, ai as drawGradientRect, aj as drawRainbowRule, ak as drawVignette, al as flowNodeElementSchema, am as inferLayout, an as inferSidecarPath, ao as parseDesignSpec, ap as parseDiagramSpec, aq as renderDesign, ar as resolveTheme, as as writeRenderArtifacts } from './spec.schema-B_Z-KNqt.js';
4
4
  import { SKRSContext2D } from '@napi-rs/canvas';
5
5
  export { QaIssue, QaReferenceResult, QaReport, QaSeverity, readMetadata, runQa } from './qa.js';
6
6
  import { Highlighter } from 'shiki';
package/dist/index.js CHANGED
@@ -888,6 +888,26 @@ var drawGridSchema = z2.object({
888
888
  offsetX: z2.number().default(0),
889
889
  offsetY: z2.number().default(0)
890
890
  }).strict();
891
+ var drawTextRowSegmentSchema = z2.object({
892
+ text: z2.string().min(1).max(500),
893
+ color: colorHexSchema2.optional(),
894
+ fontSize: z2.number().min(6).max(200).optional(),
895
+ fontWeight: z2.number().int().min(100).max(900).optional(),
896
+ fontFamily: drawFontFamilySchema.optional()
897
+ }).strict();
898
+ var drawTextRowSchema = z2.object({
899
+ type: z2.literal("text-row"),
900
+ segments: z2.array(drawTextRowSegmentSchema).min(1).max(20),
901
+ x: z2.number(),
902
+ y: z2.number(),
903
+ align: z2.enum(["left", "center", "right"]).default("center"),
904
+ baseline: z2.enum(["top", "middle", "alphabetic", "bottom"]).default("alphabetic"),
905
+ defaultFontSize: z2.number().min(6).max(200).default(16),
906
+ defaultFontWeight: z2.number().int().min(100).max(900).default(400),
907
+ defaultFontFamily: drawFontFamilySchema.default("body"),
908
+ defaultColor: colorHexSchema2.default("#FFFFFF"),
909
+ opacity: z2.number().min(0).max(1).default(1)
910
+ }).strict();
891
911
  var drawCommandSchema = z2.discriminatedUnion("type", [
892
912
  drawRectSchema,
893
913
  drawCircleSchema,
@@ -897,7 +917,8 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
897
917
  drawPathSchema,
898
918
  drawBadgeSchema,
899
919
  drawGradientRectSchema,
900
- drawGridSchema
920
+ drawGridSchema,
921
+ drawTextRowSchema
901
922
  ]);
902
923
  var defaultCanvas = {
903
924
  width: 1200,
@@ -1002,7 +1023,14 @@ var flowNodeElementSchema = z2.object({
1002
1023
  badgeColor: colorHexSchema2.optional(),
1003
1024
  badgeBackground: colorHexSchema2.optional(),
1004
1025
  badgePosition: z2.enum(["top", "inside-top"]).default("inside-top"),
1005
- shadow: flowNodeShadowSchema.optional()
1026
+ shadow: flowNodeShadowSchema.optional(),
1027
+ // Accent bar (left edge colored bar)
1028
+ accentColor: colorHexSchema2.optional(),
1029
+ accentBarWidth: z2.number().min(0).max(16).default(3),
1030
+ // Inner glow (gradient overlay from accent color inward)
1031
+ glowColor: colorHexSchema2.optional(),
1032
+ glowWidth: z2.number().min(0).max(64).default(16),
1033
+ glowOpacity: z2.number().min(0).max(1).default(0.15)
1006
1034
  }).strict();
1007
1035
  var anchorHintSchema = z2.union([
1008
1036
  z2.enum(["top", "bottom", "left", "right", "center"]),
@@ -1852,6 +1880,38 @@ function renderFlowNode(ctx, node, bounds, theme) {
1852
1880
  ctx.shadowOffsetX = 0;
1853
1881
  ctx.shadowOffsetY = 0;
1854
1882
  }
1883
+ if (node.accentColor) {
1884
+ const barWidth = node.accentBarWidth ?? 3;
1885
+ const effectiveRadius = node.shape === "box" ? 0 : cornerRadius;
1886
+ ctx.save();
1887
+ ctx.beginPath();
1888
+ ctx.roundRect(bounds.x, bounds.y, bounds.width, bounds.height, effectiveRadius);
1889
+ ctx.clip();
1890
+ ctx.fillStyle = node.accentColor;
1891
+ ctx.fillRect(bounds.x, bounds.y, barWidth, bounds.height);
1892
+ ctx.restore();
1893
+ }
1894
+ if (node.glowColor) {
1895
+ const glowW = node.glowWidth ?? 16;
1896
+ const glowOp = node.glowOpacity ?? 0.15;
1897
+ ctx.save();
1898
+ ctx.beginPath();
1899
+ ctx.roundRect(bounds.x, bounds.y, bounds.width, bounds.height, cornerRadius);
1900
+ ctx.clip();
1901
+ const barOffset = node.accentColor ? node.accentBarWidth ?? 3 : 0;
1902
+ const gradient = ctx.createLinearGradient(
1903
+ bounds.x + barOffset,
1904
+ bounds.y,
1905
+ bounds.x + barOffset + glowW,
1906
+ bounds.y
1907
+ );
1908
+ gradient.addColorStop(0, node.glowColor);
1909
+ gradient.addColorStop(1, "rgba(0,0,0,0)");
1910
+ ctx.globalAlpha = glowOp;
1911
+ ctx.fillStyle = gradient;
1912
+ ctx.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);
1913
+ ctx.restore();
1914
+ }
1855
1915
  const headingFont = resolveFont(theme.fonts.heading, "heading");
1856
1916
  const bodyFont = resolveFont(theme.fonts.body, "body");
1857
1917
  const monoFont = resolveFont(theme.fonts.mono, "mono");
@@ -4237,6 +4297,84 @@ function renderDrawCommands(ctx, commands, theme) {
4237
4297
  });
4238
4298
  break;
4239
4299
  }
4300
+ case "text-row": {
4301
+ const segments = command.segments;
4302
+ if (segments.length === 0) break;
4303
+ const resolveSegment = (seg) => ({
4304
+ text: seg.text,
4305
+ fontSize: seg.fontSize ?? command.defaultFontSize,
4306
+ fontWeight: seg.fontWeight ?? command.defaultFontWeight,
4307
+ fontFamily: resolveDrawFont(theme, seg.fontFamily ?? command.defaultFontFamily),
4308
+ color: seg.color ?? command.defaultColor
4309
+ });
4310
+ const measured = [];
4311
+ let totalWidth = 0;
4312
+ let maxAscent = 0;
4313
+ let maxDescent = 0;
4314
+ for (const seg of segments) {
4315
+ const resolved = resolveSegment(seg);
4316
+ applyFont(ctx, {
4317
+ size: resolved.fontSize,
4318
+ weight: resolved.fontWeight,
4319
+ family: resolved.fontFamily
4320
+ });
4321
+ const metrics = ctx.measureText(resolved.text);
4322
+ const width = metrics.width;
4323
+ const ascent = metrics.actualBoundingBoxAscent || 0;
4324
+ const descent = metrics.actualBoundingBoxDescent || 0;
4325
+ totalWidth += width;
4326
+ maxAscent = Math.max(maxAscent, ascent);
4327
+ maxDescent = Math.max(maxDescent, descent);
4328
+ measured.push({ width, resolved });
4329
+ }
4330
+ let cursorX;
4331
+ if (command.align === "center") {
4332
+ cursorX = command.x - totalWidth / 2;
4333
+ } else if (command.align === "right") {
4334
+ cursorX = command.x - totalWidth;
4335
+ } else {
4336
+ cursorX = command.x;
4337
+ }
4338
+ const startX = cursorX;
4339
+ withOpacity(ctx, command.opacity, () => {
4340
+ ctx.textBaseline = command.baseline;
4341
+ for (const { width, resolved } of measured) {
4342
+ applyFont(ctx, {
4343
+ size: resolved.fontSize,
4344
+ weight: resolved.fontWeight,
4345
+ family: resolved.fontFamily
4346
+ });
4347
+ ctx.fillStyle = resolved.color;
4348
+ ctx.textAlign = "left";
4349
+ ctx.fillText(resolved.text, cursorX, command.y);
4350
+ cursorX += width;
4351
+ }
4352
+ });
4353
+ const height = Math.max(1, maxAscent + maxDescent);
4354
+ let topY;
4355
+ if (command.baseline === "top") {
4356
+ topY = command.y;
4357
+ } else if (command.baseline === "middle") {
4358
+ topY = command.y - height / 2;
4359
+ } else if (command.baseline === "bottom") {
4360
+ topY = command.y - height;
4361
+ } else {
4362
+ topY = command.y - maxAscent;
4363
+ }
4364
+ rendered.push({
4365
+ id,
4366
+ kind: "draw",
4367
+ bounds: {
4368
+ x: startX,
4369
+ y: topY,
4370
+ width: Math.max(1, totalWidth),
4371
+ height
4372
+ },
4373
+ foregroundColor: command.defaultColor,
4374
+ backgroundColor: theme.background
4375
+ });
4376
+ break;
4377
+ }
4240
4378
  }
4241
4379
  }
4242
4380
  return rendered;
package/dist/qa.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as RenderMetadata, D as DesignSpec } from './spec.schema-BDvtn_mJ.js';
1
+ import { R as RenderMetadata, D as DesignSpec } from './spec.schema-B_Z-KNqt.js';
2
2
  import 'zod';
3
3
  import '@napi-rs/canvas';
4
4
 
package/dist/qa.js CHANGED
@@ -622,6 +622,26 @@ var drawGridSchema = z2.object({
622
622
  offsetX: z2.number().default(0),
623
623
  offsetY: z2.number().default(0)
624
624
  }).strict();
625
+ var drawTextRowSegmentSchema = z2.object({
626
+ text: z2.string().min(1).max(500),
627
+ color: colorHexSchema2.optional(),
628
+ fontSize: z2.number().min(6).max(200).optional(),
629
+ fontWeight: z2.number().int().min(100).max(900).optional(),
630
+ fontFamily: drawFontFamilySchema.optional()
631
+ }).strict();
632
+ var drawTextRowSchema = z2.object({
633
+ type: z2.literal("text-row"),
634
+ segments: z2.array(drawTextRowSegmentSchema).min(1).max(20),
635
+ x: z2.number(),
636
+ y: z2.number(),
637
+ align: z2.enum(["left", "center", "right"]).default("center"),
638
+ baseline: z2.enum(["top", "middle", "alphabetic", "bottom"]).default("alphabetic"),
639
+ defaultFontSize: z2.number().min(6).max(200).default(16),
640
+ defaultFontWeight: z2.number().int().min(100).max(900).default(400),
641
+ defaultFontFamily: drawFontFamilySchema.default("body"),
642
+ defaultColor: colorHexSchema2.default("#FFFFFF"),
643
+ opacity: z2.number().min(0).max(1).default(1)
644
+ }).strict();
625
645
  var drawCommandSchema = z2.discriminatedUnion("type", [
626
646
  drawRectSchema,
627
647
  drawCircleSchema,
@@ -631,7 +651,8 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
631
651
  drawPathSchema,
632
652
  drawBadgeSchema,
633
653
  drawGradientRectSchema,
634
- drawGridSchema
654
+ drawGridSchema,
655
+ drawTextRowSchema
635
656
  ]);
636
657
  var defaultCanvas = {
637
658
  width: 1200,
@@ -735,7 +756,14 @@ var flowNodeElementSchema = z2.object({
735
756
  badgeColor: colorHexSchema2.optional(),
736
757
  badgeBackground: colorHexSchema2.optional(),
737
758
  badgePosition: z2.enum(["top", "inside-top"]).default("inside-top"),
738
- shadow: flowNodeShadowSchema.optional()
759
+ shadow: flowNodeShadowSchema.optional(),
760
+ // Accent bar (left edge colored bar)
761
+ accentColor: colorHexSchema2.optional(),
762
+ accentBarWidth: z2.number().min(0).max(16).default(3),
763
+ // Inner glow (gradient overlay from accent color inward)
764
+ glowColor: colorHexSchema2.optional(),
765
+ glowWidth: z2.number().min(0).max(64).default(16),
766
+ glowOpacity: z2.number().min(0).max(1).default(0.15)
739
767
  }).strict();
740
768
  var anchorHintSchema = z2.union([
741
769
  z2.enum(["top", "bottom", "left", "right", "center"]),
@@ -1,3 +1,3 @@
1
- export { i as DEFAULT_GENERATOR_VERSION, P as LayoutSnapshot, a as Rect, R as RenderMetadata, U as RenderResult, d as RenderedElement, $ as WrittenArtifacts, a2 as computeSpecHash, al as inferSidecarPath, ao as renderDesign, aq as writeRenderArtifacts } from './spec.schema-BDvtn_mJ.js';
1
+ export { i as DEFAULT_GENERATOR_VERSION, S as LayoutSnapshot, a as Rect, R as RenderMetadata, W as RenderResult, d as RenderedElement, a1 as WrittenArtifacts, a4 as computeSpecHash, an as inferSidecarPath, aq as renderDesign, as as writeRenderArtifacts } from './spec.schema-B_Z-KNqt.js';
2
2
  import 'zod';
3
3
  import '@napi-rs/canvas';
package/dist/renderer.js CHANGED
@@ -473,6 +473,38 @@ function renderFlowNode(ctx, node, bounds, theme) {
473
473
  ctx.shadowOffsetX = 0;
474
474
  ctx.shadowOffsetY = 0;
475
475
  }
476
+ if (node.accentColor) {
477
+ const barWidth = node.accentBarWidth ?? 3;
478
+ const effectiveRadius = node.shape === "box" ? 0 : cornerRadius;
479
+ ctx.save();
480
+ ctx.beginPath();
481
+ ctx.roundRect(bounds.x, bounds.y, bounds.width, bounds.height, effectiveRadius);
482
+ ctx.clip();
483
+ ctx.fillStyle = node.accentColor;
484
+ ctx.fillRect(bounds.x, bounds.y, barWidth, bounds.height);
485
+ ctx.restore();
486
+ }
487
+ if (node.glowColor) {
488
+ const glowW = node.glowWidth ?? 16;
489
+ const glowOp = node.glowOpacity ?? 0.15;
490
+ ctx.save();
491
+ ctx.beginPath();
492
+ ctx.roundRect(bounds.x, bounds.y, bounds.width, bounds.height, cornerRadius);
493
+ ctx.clip();
494
+ const barOffset = node.accentColor ? node.accentBarWidth ?? 3 : 0;
495
+ const gradient = ctx.createLinearGradient(
496
+ bounds.x + barOffset,
497
+ bounds.y,
498
+ bounds.x + barOffset + glowW,
499
+ bounds.y
500
+ );
501
+ gradient.addColorStop(0, node.glowColor);
502
+ gradient.addColorStop(1, "rgba(0,0,0,0)");
503
+ ctx.globalAlpha = glowOp;
504
+ ctx.fillStyle = gradient;
505
+ ctx.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);
506
+ ctx.restore();
507
+ }
476
508
  const headingFont = resolveFont(theme.fonts.heading, "heading");
477
509
  const bodyFont = resolveFont(theme.fonts.body, "body");
478
510
  const monoFont = resolveFont(theme.fonts.mono, "mono");
@@ -3086,6 +3118,84 @@ function renderDrawCommands(ctx, commands, theme) {
3086
3118
  });
3087
3119
  break;
3088
3120
  }
3121
+ case "text-row": {
3122
+ const segments = command.segments;
3123
+ if (segments.length === 0) break;
3124
+ const resolveSegment = (seg) => ({
3125
+ text: seg.text,
3126
+ fontSize: seg.fontSize ?? command.defaultFontSize,
3127
+ fontWeight: seg.fontWeight ?? command.defaultFontWeight,
3128
+ fontFamily: resolveDrawFont(theme, seg.fontFamily ?? command.defaultFontFamily),
3129
+ color: seg.color ?? command.defaultColor
3130
+ });
3131
+ const measured = [];
3132
+ let totalWidth = 0;
3133
+ let maxAscent = 0;
3134
+ let maxDescent = 0;
3135
+ for (const seg of segments) {
3136
+ const resolved = resolveSegment(seg);
3137
+ applyFont(ctx, {
3138
+ size: resolved.fontSize,
3139
+ weight: resolved.fontWeight,
3140
+ family: resolved.fontFamily
3141
+ });
3142
+ const metrics = ctx.measureText(resolved.text);
3143
+ const width = metrics.width;
3144
+ const ascent = metrics.actualBoundingBoxAscent || 0;
3145
+ const descent = metrics.actualBoundingBoxDescent || 0;
3146
+ totalWidth += width;
3147
+ maxAscent = Math.max(maxAscent, ascent);
3148
+ maxDescent = Math.max(maxDescent, descent);
3149
+ measured.push({ width, resolved });
3150
+ }
3151
+ let cursorX;
3152
+ if (command.align === "center") {
3153
+ cursorX = command.x - totalWidth / 2;
3154
+ } else if (command.align === "right") {
3155
+ cursorX = command.x - totalWidth;
3156
+ } else {
3157
+ cursorX = command.x;
3158
+ }
3159
+ const startX = cursorX;
3160
+ withOpacity(ctx, command.opacity, () => {
3161
+ ctx.textBaseline = command.baseline;
3162
+ for (const { width, resolved } of measured) {
3163
+ applyFont(ctx, {
3164
+ size: resolved.fontSize,
3165
+ weight: resolved.fontWeight,
3166
+ family: resolved.fontFamily
3167
+ });
3168
+ ctx.fillStyle = resolved.color;
3169
+ ctx.textAlign = "left";
3170
+ ctx.fillText(resolved.text, cursorX, command.y);
3171
+ cursorX += width;
3172
+ }
3173
+ });
3174
+ const height = Math.max(1, maxAscent + maxDescent);
3175
+ let topY;
3176
+ if (command.baseline === "top") {
3177
+ topY = command.y;
3178
+ } else if (command.baseline === "middle") {
3179
+ topY = command.y - height / 2;
3180
+ } else if (command.baseline === "bottom") {
3181
+ topY = command.y - height;
3182
+ } else {
3183
+ topY = command.y - maxAscent;
3184
+ }
3185
+ rendered.push({
3186
+ id,
3187
+ kind: "draw",
3188
+ bounds: {
3189
+ x: startX,
3190
+ y: topY,
3191
+ width: Math.max(1, totalWidth),
3192
+ height
3193
+ },
3194
+ foregroundColor: command.defaultColor,
3195
+ backgroundColor: theme.background
3196
+ });
3197
+ break;
3198
+ }
3089
3199
  }
3090
3200
  }
3091
3201
  return rendered;
@@ -3494,6 +3604,26 @@ var drawGridSchema = z2.object({
3494
3604
  offsetX: z2.number().default(0),
3495
3605
  offsetY: z2.number().default(0)
3496
3606
  }).strict();
3607
+ var drawTextRowSegmentSchema = z2.object({
3608
+ text: z2.string().min(1).max(500),
3609
+ color: colorHexSchema2.optional(),
3610
+ fontSize: z2.number().min(6).max(200).optional(),
3611
+ fontWeight: z2.number().int().min(100).max(900).optional(),
3612
+ fontFamily: drawFontFamilySchema.optional()
3613
+ }).strict();
3614
+ var drawTextRowSchema = z2.object({
3615
+ type: z2.literal("text-row"),
3616
+ segments: z2.array(drawTextRowSegmentSchema).min(1).max(20),
3617
+ x: z2.number(),
3618
+ y: z2.number(),
3619
+ align: z2.enum(["left", "center", "right"]).default("center"),
3620
+ baseline: z2.enum(["top", "middle", "alphabetic", "bottom"]).default("alphabetic"),
3621
+ defaultFontSize: z2.number().min(6).max(200).default(16),
3622
+ defaultFontWeight: z2.number().int().min(100).max(900).default(400),
3623
+ defaultFontFamily: drawFontFamilySchema.default("body"),
3624
+ defaultColor: colorHexSchema2.default("#FFFFFF"),
3625
+ opacity: z2.number().min(0).max(1).default(1)
3626
+ }).strict();
3497
3627
  var drawCommandSchema = z2.discriminatedUnion("type", [
3498
3628
  drawRectSchema,
3499
3629
  drawCircleSchema,
@@ -3503,7 +3633,8 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
3503
3633
  drawPathSchema,
3504
3634
  drawBadgeSchema,
3505
3635
  drawGradientRectSchema,
3506
- drawGridSchema
3636
+ drawGridSchema,
3637
+ drawTextRowSchema
3507
3638
  ]);
3508
3639
  var defaultCanvas = {
3509
3640
  width: 1200,
@@ -3607,7 +3738,14 @@ var flowNodeElementSchema = z2.object({
3607
3738
  badgeColor: colorHexSchema2.optional(),
3608
3739
  badgeBackground: colorHexSchema2.optional(),
3609
3740
  badgePosition: z2.enum(["top", "inside-top"]).default("inside-top"),
3610
- shadow: flowNodeShadowSchema.optional()
3741
+ shadow: flowNodeShadowSchema.optional(),
3742
+ // Accent bar (left edge colored bar)
3743
+ accentColor: colorHexSchema2.optional(),
3744
+ accentBarWidth: z2.number().min(0).max(16).default(3),
3745
+ // Inner glow (gradient overlay from accent color inward)
3746
+ glowColor: colorHexSchema2.optional(),
3747
+ glowWidth: z2.number().min(0).max(64).default(16),
3748
+ glowOpacity: z2.number().min(0).max(1).default(0.15)
3611
3749
  }).strict();
3612
3750
  var anchorHintSchema = z2.union([
3613
3751
  z2.enum(["top", "bottom", "left", "right", "center"]),
@@ -1105,6 +1105,92 @@ declare const drawGridSchema: z.ZodObject<{
1105
1105
  offsetY?: number | undefined;
1106
1106
  spacing?: number | undefined;
1107
1107
  }>;
1108
+ declare const drawTextRowSegmentSchema: z.ZodObject<{
1109
+ text: z.ZodString;
1110
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1111
+ fontSize: z.ZodOptional<z.ZodNumber>;
1112
+ fontWeight: z.ZodOptional<z.ZodNumber>;
1113
+ fontFamily: z.ZodOptional<z.ZodEnum<["heading", "body", "mono"]>>;
1114
+ }, "strict", z.ZodTypeAny, {
1115
+ text: string;
1116
+ color?: string | undefined;
1117
+ fontSize?: number | undefined;
1118
+ fontWeight?: number | undefined;
1119
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1120
+ }, {
1121
+ text: string;
1122
+ color?: string | undefined;
1123
+ fontSize?: number | undefined;
1124
+ fontWeight?: number | undefined;
1125
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1126
+ }>;
1127
+ declare const drawTextRowSchema: z.ZodObject<{
1128
+ type: z.ZodLiteral<"text-row">;
1129
+ segments: z.ZodArray<z.ZodObject<{
1130
+ text: z.ZodString;
1131
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1132
+ fontSize: z.ZodOptional<z.ZodNumber>;
1133
+ fontWeight: z.ZodOptional<z.ZodNumber>;
1134
+ fontFamily: z.ZodOptional<z.ZodEnum<["heading", "body", "mono"]>>;
1135
+ }, "strict", z.ZodTypeAny, {
1136
+ text: string;
1137
+ color?: string | undefined;
1138
+ fontSize?: number | undefined;
1139
+ fontWeight?: number | undefined;
1140
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1141
+ }, {
1142
+ text: string;
1143
+ color?: string | undefined;
1144
+ fontSize?: number | undefined;
1145
+ fontWeight?: number | undefined;
1146
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1147
+ }>, "many">;
1148
+ x: z.ZodNumber;
1149
+ y: z.ZodNumber;
1150
+ align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
1151
+ baseline: z.ZodDefault<z.ZodEnum<["top", "middle", "alphabetic", "bottom"]>>;
1152
+ defaultFontSize: z.ZodDefault<z.ZodNumber>;
1153
+ defaultFontWeight: z.ZodDefault<z.ZodNumber>;
1154
+ defaultFontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
1155
+ defaultColor: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1156
+ opacity: z.ZodDefault<z.ZodNumber>;
1157
+ }, "strict", z.ZodTypeAny, {
1158
+ type: "text-row";
1159
+ opacity: number;
1160
+ x: number;
1161
+ y: number;
1162
+ align: "center" | "left" | "right";
1163
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
1164
+ segments: {
1165
+ text: string;
1166
+ color?: string | undefined;
1167
+ fontSize?: number | undefined;
1168
+ fontWeight?: number | undefined;
1169
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1170
+ }[];
1171
+ defaultFontSize: number;
1172
+ defaultFontWeight: number;
1173
+ defaultFontFamily: "body" | "heading" | "mono";
1174
+ defaultColor: string;
1175
+ }, {
1176
+ type: "text-row";
1177
+ x: number;
1178
+ y: number;
1179
+ segments: {
1180
+ text: string;
1181
+ color?: string | undefined;
1182
+ fontSize?: number | undefined;
1183
+ fontWeight?: number | undefined;
1184
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1185
+ }[];
1186
+ opacity?: number | undefined;
1187
+ align?: "center" | "left" | "right" | undefined;
1188
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
1189
+ defaultFontSize?: number | undefined;
1190
+ defaultFontWeight?: number | undefined;
1191
+ defaultFontFamily?: "body" | "heading" | "mono" | undefined;
1192
+ defaultColor?: string | undefined;
1193
+ }>;
1108
1194
  declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1109
1195
  type: z.ZodLiteral<"rect">;
1110
1196
  x: z.ZodNumber;
@@ -1717,6 +1803,72 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1717
1803
  offsetX?: number | undefined;
1718
1804
  offsetY?: number | undefined;
1719
1805
  spacing?: number | undefined;
1806
+ }>, z.ZodObject<{
1807
+ type: z.ZodLiteral<"text-row">;
1808
+ segments: z.ZodArray<z.ZodObject<{
1809
+ text: z.ZodString;
1810
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1811
+ fontSize: z.ZodOptional<z.ZodNumber>;
1812
+ fontWeight: z.ZodOptional<z.ZodNumber>;
1813
+ fontFamily: z.ZodOptional<z.ZodEnum<["heading", "body", "mono"]>>;
1814
+ }, "strict", z.ZodTypeAny, {
1815
+ text: string;
1816
+ color?: string | undefined;
1817
+ fontSize?: number | undefined;
1818
+ fontWeight?: number | undefined;
1819
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1820
+ }, {
1821
+ text: string;
1822
+ color?: string | undefined;
1823
+ fontSize?: number | undefined;
1824
+ fontWeight?: number | undefined;
1825
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1826
+ }>, "many">;
1827
+ x: z.ZodNumber;
1828
+ y: z.ZodNumber;
1829
+ align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
1830
+ baseline: z.ZodDefault<z.ZodEnum<["top", "middle", "alphabetic", "bottom"]>>;
1831
+ defaultFontSize: z.ZodDefault<z.ZodNumber>;
1832
+ defaultFontWeight: z.ZodDefault<z.ZodNumber>;
1833
+ defaultFontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
1834
+ defaultColor: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1835
+ opacity: z.ZodDefault<z.ZodNumber>;
1836
+ }, "strict", z.ZodTypeAny, {
1837
+ type: "text-row";
1838
+ opacity: number;
1839
+ x: number;
1840
+ y: number;
1841
+ align: "center" | "left" | "right";
1842
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
1843
+ segments: {
1844
+ text: string;
1845
+ color?: string | undefined;
1846
+ fontSize?: number | undefined;
1847
+ fontWeight?: number | undefined;
1848
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1849
+ }[];
1850
+ defaultFontSize: number;
1851
+ defaultFontWeight: number;
1852
+ defaultFontFamily: "body" | "heading" | "mono";
1853
+ defaultColor: string;
1854
+ }, {
1855
+ type: "text-row";
1856
+ x: number;
1857
+ y: number;
1858
+ segments: {
1859
+ text: string;
1860
+ color?: string | undefined;
1861
+ fontSize?: number | undefined;
1862
+ fontWeight?: number | undefined;
1863
+ fontFamily?: "body" | "heading" | "mono" | undefined;
1864
+ }[];
1865
+ opacity?: number | undefined;
1866
+ align?: "center" | "left" | "right" | undefined;
1867
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
1868
+ defaultFontSize?: number | undefined;
1869
+ defaultFontWeight?: number | undefined;
1870
+ defaultFontFamily?: "body" | "heading" | "mono" | undefined;
1871
+ defaultColor?: string | undefined;
1720
1872
  }>]>;
1721
1873
  /** Default canvas dimensions and padding (1200 × 675 px, 48 px padding). */
1722
1874
  declare const defaultCanvas: {
@@ -1869,6 +2021,11 @@ declare const flowNodeElementSchema: z.ZodObject<{
1869
2021
  offsetX?: number | undefined;
1870
2022
  offsetY?: number | undefined;
1871
2023
  }>>;
2024
+ accentColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2025
+ accentBarWidth: z.ZodDefault<z.ZodNumber>;
2026
+ glowColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2027
+ glowWidth: z.ZodDefault<z.ZodNumber>;
2028
+ glowOpacity: z.ZodDefault<z.ZodNumber>;
1872
2029
  }, "strict", z.ZodTypeAny, {
1873
2030
  type: "flow-node";
1874
2031
  id: string;
@@ -1877,6 +2034,9 @@ declare const flowNodeElementSchema: z.ZodObject<{
1877
2034
  fillOpacity: number;
1878
2035
  opacity: number;
1879
2036
  badgePosition: "top" | "inside-top";
2037
+ accentBarWidth: number;
2038
+ glowWidth: number;
2039
+ glowOpacity: number;
1880
2040
  width?: number | undefined;
1881
2041
  height?: number | undefined;
1882
2042
  sublabel?: string | undefined;
@@ -1900,6 +2060,8 @@ declare const flowNodeElementSchema: z.ZodObject<{
1900
2060
  offsetY: number;
1901
2061
  color?: string | undefined;
1902
2062
  } | undefined;
2063
+ accentColor?: string | undefined;
2064
+ glowColor?: string | undefined;
1903
2065
  }, {
1904
2066
  type: "flow-node";
1905
2067
  id: string;
@@ -1931,6 +2093,11 @@ declare const flowNodeElementSchema: z.ZodObject<{
1931
2093
  offsetX?: number | undefined;
1932
2094
  offsetY?: number | undefined;
1933
2095
  } | undefined;
2096
+ accentColor?: string | undefined;
2097
+ accentBarWidth?: number | undefined;
2098
+ glowColor?: string | undefined;
2099
+ glowWidth?: number | undefined;
2100
+ glowOpacity?: number | undefined;
1934
2101
  }>;
1935
2102
  declare const anchorHintSchema: z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
1936
2103
  x: z.ZodNumber;
@@ -2369,6 +2536,11 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2369
2536
  offsetX?: number | undefined;
2370
2537
  offsetY?: number | undefined;
2371
2538
  }>>;
2539
+ accentColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2540
+ accentBarWidth: z.ZodDefault<z.ZodNumber>;
2541
+ glowColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
2542
+ glowWidth: z.ZodDefault<z.ZodNumber>;
2543
+ glowOpacity: z.ZodDefault<z.ZodNumber>;
2372
2544
  }, "strict", z.ZodTypeAny, {
2373
2545
  type: "flow-node";
2374
2546
  id: string;
@@ -2377,6 +2549,9 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2377
2549
  fillOpacity: number;
2378
2550
  opacity: number;
2379
2551
  badgePosition: "top" | "inside-top";
2552
+ accentBarWidth: number;
2553
+ glowWidth: number;
2554
+ glowOpacity: number;
2380
2555
  width?: number | undefined;
2381
2556
  height?: number | undefined;
2382
2557
  sublabel?: string | undefined;
@@ -2400,6 +2575,8 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2400
2575
  offsetY: number;
2401
2576
  color?: string | undefined;
2402
2577
  } | undefined;
2578
+ accentColor?: string | undefined;
2579
+ glowColor?: string | undefined;
2403
2580
  }, {
2404
2581
  type: "flow-node";
2405
2582
  id: string;
@@ -2431,6 +2608,11 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2431
2608
  offsetX?: number | undefined;
2432
2609
  offsetY?: number | undefined;
2433
2610
  } | undefined;
2611
+ accentColor?: string | undefined;
2612
+ accentBarWidth?: number | undefined;
2613
+ glowColor?: string | undefined;
2614
+ glowWidth?: number | undefined;
2615
+ glowOpacity?: number | undefined;
2434
2616
  }>, z.ZodObject<{
2435
2617
  type: z.ZodLiteral<"connection">;
2436
2618
  from: z.ZodString;
@@ -3461,6 +3643,11 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
3461
3643
  offsetX?: number | undefined;
3462
3644
  offsetY?: number | undefined;
3463
3645
  }>>;
3646
+ accentColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3647
+ accentBarWidth: z.ZodDefault<z.ZodNumber>;
3648
+ glowColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
3649
+ glowWidth: z.ZodDefault<z.ZodNumber>;
3650
+ glowOpacity: z.ZodDefault<z.ZodNumber>;
3464
3651
  }, "strict", z.ZodTypeAny, {
3465
3652
  type: "flow-node";
3466
3653
  id: string;
@@ -3469,6 +3656,9 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
3469
3656
  fillOpacity: number;
3470
3657
  opacity: number;
3471
3658
  badgePosition: "top" | "inside-top";
3659
+ accentBarWidth: number;
3660
+ glowWidth: number;
3661
+ glowOpacity: number;
3472
3662
  width?: number | undefined;
3473
3663
  height?: number | undefined;
3474
3664
  sublabel?: string | undefined;
@@ -3492,6 +3682,8 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
3492
3682
  offsetY: number;
3493
3683
  color?: string | undefined;
3494
3684
  } | undefined;
3685
+ accentColor?: string | undefined;
3686
+ glowColor?: string | undefined;
3495
3687
  }, {
3496
3688
  type: "flow-node";
3497
3689
  id: string;
@@ -3523,6 +3715,11 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
3523
3715
  offsetX?: number | undefined;
3524
3716
  offsetY?: number | undefined;
3525
3717
  } | undefined;
3718
+ accentColor?: string | undefined;
3719
+ accentBarWidth?: number | undefined;
3720
+ glowColor?: string | undefined;
3721
+ glowWidth?: number | undefined;
3722
+ glowOpacity?: number | undefined;
3526
3723
  }>, z.ZodObject<{
3527
3724
  type: z.ZodLiteral<"connection">;
3528
3725
  from: z.ZodString;
@@ -3852,6 +4049,11 @@ declare const diagramSpecSchema: z.ZodObject<{
3852
4049
  offsetX?: number | undefined;
3853
4050
  offsetY?: number | undefined;
3854
4051
  }>>;
4052
+ accentColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
4053
+ accentBarWidth: z.ZodDefault<z.ZodNumber>;
4054
+ glowColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
4055
+ glowWidth: z.ZodDefault<z.ZodNumber>;
4056
+ glowOpacity: z.ZodDefault<z.ZodNumber>;
3855
4057
  }, "strict", z.ZodTypeAny, {
3856
4058
  type: "flow-node";
3857
4059
  id: string;
@@ -3860,6 +4062,9 @@ declare const diagramSpecSchema: z.ZodObject<{
3860
4062
  fillOpacity: number;
3861
4063
  opacity: number;
3862
4064
  badgePosition: "top" | "inside-top";
4065
+ accentBarWidth: number;
4066
+ glowWidth: number;
4067
+ glowOpacity: number;
3863
4068
  width?: number | undefined;
3864
4069
  height?: number | undefined;
3865
4070
  sublabel?: string | undefined;
@@ -3883,6 +4088,8 @@ declare const diagramSpecSchema: z.ZodObject<{
3883
4088
  offsetY: number;
3884
4089
  color?: string | undefined;
3885
4090
  } | undefined;
4091
+ accentColor?: string | undefined;
4092
+ glowColor?: string | undefined;
3886
4093
  }, {
3887
4094
  type: "flow-node";
3888
4095
  id: string;
@@ -3914,6 +4121,11 @@ declare const diagramSpecSchema: z.ZodObject<{
3914
4121
  offsetX?: number | undefined;
3915
4122
  offsetY?: number | undefined;
3916
4123
  } | undefined;
4124
+ accentColor?: string | undefined;
4125
+ accentBarWidth?: number | undefined;
4126
+ glowColor?: string | undefined;
4127
+ glowWidth?: number | undefined;
4128
+ glowOpacity?: number | undefined;
3917
4129
  }>, z.ZodObject<{
3918
4130
  type: z.ZodLiteral<"connection">;
3919
4131
  from: z.ZodString;
@@ -4069,6 +4281,9 @@ declare const diagramSpecSchema: z.ZodObject<{
4069
4281
  fillOpacity: number;
4070
4282
  opacity: number;
4071
4283
  badgePosition: "top" | "inside-top";
4284
+ accentBarWidth: number;
4285
+ glowWidth: number;
4286
+ glowOpacity: number;
4072
4287
  width?: number | undefined;
4073
4288
  height?: number | undefined;
4074
4289
  sublabel?: string | undefined;
@@ -4092,6 +4307,8 @@ declare const diagramSpecSchema: z.ZodObject<{
4092
4307
  offsetY: number;
4093
4308
  color?: string | undefined;
4094
4309
  } | undefined;
4310
+ accentColor?: string | undefined;
4311
+ glowColor?: string | undefined;
4095
4312
  } | {
4096
4313
  type: "connection";
4097
4314
  opacity: number;
@@ -4199,6 +4416,11 @@ declare const diagramSpecSchema: z.ZodObject<{
4199
4416
  offsetX?: number | undefined;
4200
4417
  offsetY?: number | undefined;
4201
4418
  } | undefined;
4419
+ accentColor?: string | undefined;
4420
+ accentBarWidth?: number | undefined;
4421
+ glowColor?: string | undefined;
4422
+ glowWidth?: number | undefined;
4423
+ glowOpacity?: number | undefined;
4202
4424
  } | {
4203
4425
  type: "connection";
4204
4426
  from: string;
@@ -4583,6 +4805,11 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4583
4805
  offsetX?: number | undefined;
4584
4806
  offsetY?: number | undefined;
4585
4807
  }>>;
4808
+ accentColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
4809
+ accentBarWidth: z.ZodDefault<z.ZodNumber>;
4810
+ glowColor: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
4811
+ glowWidth: z.ZodDefault<z.ZodNumber>;
4812
+ glowOpacity: z.ZodDefault<z.ZodNumber>;
4586
4813
  }, "strict", z.ZodTypeAny, {
4587
4814
  type: "flow-node";
4588
4815
  id: string;
@@ -4591,6 +4818,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4591
4818
  fillOpacity: number;
4592
4819
  opacity: number;
4593
4820
  badgePosition: "top" | "inside-top";
4821
+ accentBarWidth: number;
4822
+ glowWidth: number;
4823
+ glowOpacity: number;
4594
4824
  width?: number | undefined;
4595
4825
  height?: number | undefined;
4596
4826
  sublabel?: string | undefined;
@@ -4614,6 +4844,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4614
4844
  offsetY: number;
4615
4845
  color?: string | undefined;
4616
4846
  } | undefined;
4847
+ accentColor?: string | undefined;
4848
+ glowColor?: string | undefined;
4617
4849
  }, {
4618
4850
  type: "flow-node";
4619
4851
  id: string;
@@ -4645,6 +4877,11 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4645
4877
  offsetX?: number | undefined;
4646
4878
  offsetY?: number | undefined;
4647
4879
  } | undefined;
4880
+ accentColor?: string | undefined;
4881
+ accentBarWidth?: number | undefined;
4882
+ glowColor?: string | undefined;
4883
+ glowWidth?: number | undefined;
4884
+ glowOpacity?: number | undefined;
4648
4885
  }>, z.ZodObject<{
4649
4886
  type: z.ZodLiteral<"connection">;
4650
4887
  from: z.ZodString;
@@ -5728,6 +5965,72 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5728
5965
  offsetX?: number | undefined;
5729
5966
  offsetY?: number | undefined;
5730
5967
  spacing?: number | undefined;
5968
+ }>, z.ZodObject<{
5969
+ type: z.ZodLiteral<"text-row">;
5970
+ segments: z.ZodArray<z.ZodObject<{
5971
+ text: z.ZodString;
5972
+ color: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
5973
+ fontSize: z.ZodOptional<z.ZodNumber>;
5974
+ fontWeight: z.ZodOptional<z.ZodNumber>;
5975
+ fontFamily: z.ZodOptional<z.ZodEnum<["heading", "body", "mono"]>>;
5976
+ }, "strict", z.ZodTypeAny, {
5977
+ text: string;
5978
+ color?: string | undefined;
5979
+ fontSize?: number | undefined;
5980
+ fontWeight?: number | undefined;
5981
+ fontFamily?: "body" | "heading" | "mono" | undefined;
5982
+ }, {
5983
+ text: string;
5984
+ color?: string | undefined;
5985
+ fontSize?: number | undefined;
5986
+ fontWeight?: number | undefined;
5987
+ fontFamily?: "body" | "heading" | "mono" | undefined;
5988
+ }>, "many">;
5989
+ x: z.ZodNumber;
5990
+ y: z.ZodNumber;
5991
+ align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
5992
+ baseline: z.ZodDefault<z.ZodEnum<["top", "middle", "alphabetic", "bottom"]>>;
5993
+ defaultFontSize: z.ZodDefault<z.ZodNumber>;
5994
+ defaultFontWeight: z.ZodDefault<z.ZodNumber>;
5995
+ defaultFontFamily: z.ZodDefault<z.ZodEnum<["heading", "body", "mono"]>>;
5996
+ defaultColor: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
5997
+ opacity: z.ZodDefault<z.ZodNumber>;
5998
+ }, "strict", z.ZodTypeAny, {
5999
+ type: "text-row";
6000
+ opacity: number;
6001
+ x: number;
6002
+ y: number;
6003
+ align: "center" | "left" | "right";
6004
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
6005
+ segments: {
6006
+ text: string;
6007
+ color?: string | undefined;
6008
+ fontSize?: number | undefined;
6009
+ fontWeight?: number | undefined;
6010
+ fontFamily?: "body" | "heading" | "mono" | undefined;
6011
+ }[];
6012
+ defaultFontSize: number;
6013
+ defaultFontWeight: number;
6014
+ defaultFontFamily: "body" | "heading" | "mono";
6015
+ defaultColor: string;
6016
+ }, {
6017
+ type: "text-row";
6018
+ x: number;
6019
+ y: number;
6020
+ segments: {
6021
+ text: string;
6022
+ color?: string | undefined;
6023
+ fontSize?: number | undefined;
6024
+ fontWeight?: number | undefined;
6025
+ fontFamily?: "body" | "heading" | "mono" | undefined;
6026
+ }[];
6027
+ opacity?: number | undefined;
6028
+ align?: "center" | "left" | "right" | undefined;
6029
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
6030
+ defaultFontSize?: number | undefined;
6031
+ defaultFontWeight?: number | undefined;
6032
+ defaultFontFamily?: "body" | "heading" | "mono" | undefined;
6033
+ defaultColor?: string | undefined;
5731
6034
  }>]>, "many">>;
5732
6035
  layout: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
5733
6036
  mode: z.ZodLiteral<"auto">;
@@ -6093,6 +6396,24 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6093
6396
  offsetX: number;
6094
6397
  offsetY: number;
6095
6398
  spacing: number;
6399
+ } | {
6400
+ type: "text-row";
6401
+ opacity: number;
6402
+ x: number;
6403
+ y: number;
6404
+ align: "center" | "left" | "right";
6405
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
6406
+ segments: {
6407
+ text: string;
6408
+ color?: string | undefined;
6409
+ fontSize?: number | undefined;
6410
+ fontWeight?: number | undefined;
6411
+ fontFamily?: "body" | "heading" | "mono" | undefined;
6412
+ }[];
6413
+ defaultFontSize: number;
6414
+ defaultFontWeight: number;
6415
+ defaultFontFamily: "body" | "heading" | "mono";
6416
+ defaultColor: string;
6096
6417
  })[];
6097
6418
  theme: {
6098
6419
  code: {
@@ -6143,6 +6464,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6143
6464
  fillOpacity: number;
6144
6465
  opacity: number;
6145
6466
  badgePosition: "top" | "inside-top";
6467
+ accentBarWidth: number;
6468
+ glowWidth: number;
6469
+ glowOpacity: number;
6146
6470
  width?: number | undefined;
6147
6471
  height?: number | undefined;
6148
6472
  sublabel?: string | undefined;
@@ -6166,6 +6490,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6166
6490
  offsetY: number;
6167
6491
  color?: string | undefined;
6168
6492
  } | undefined;
6493
+ accentColor?: string | undefined;
6494
+ glowColor?: string | undefined;
6169
6495
  } | {
6170
6496
  body: string;
6171
6497
  type: "card";
@@ -6572,6 +6898,24 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6572
6898
  offsetX?: number | undefined;
6573
6899
  offsetY?: number | undefined;
6574
6900
  spacing?: number | undefined;
6901
+ } | {
6902
+ type: "text-row";
6903
+ x: number;
6904
+ y: number;
6905
+ segments: {
6906
+ text: string;
6907
+ color?: string | undefined;
6908
+ fontSize?: number | undefined;
6909
+ fontWeight?: number | undefined;
6910
+ fontFamily?: "body" | "heading" | "mono" | undefined;
6911
+ }[];
6912
+ opacity?: number | undefined;
6913
+ align?: "center" | "left" | "right" | undefined;
6914
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
6915
+ defaultFontSize?: number | undefined;
6916
+ defaultFontWeight?: number | undefined;
6917
+ defaultFontFamily?: "body" | "heading" | "mono" | undefined;
6918
+ defaultColor?: string | undefined;
6575
6919
  })[] | undefined;
6576
6920
  theme?: {
6577
6921
  code: {
@@ -6645,6 +6989,11 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6645
6989
  offsetX?: number | undefined;
6646
6990
  offsetY?: number | undefined;
6647
6991
  } | undefined;
6992
+ accentColor?: string | undefined;
6993
+ accentBarWidth?: number | undefined;
6994
+ glowColor?: string | undefined;
6995
+ glowWidth?: number | undefined;
6996
+ glowOpacity?: number | undefined;
6648
6997
  } | {
6649
6998
  body: string;
6650
6999
  type: "card";
@@ -7040,6 +7389,24 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
7040
7389
  offsetX: number;
7041
7390
  offsetY: number;
7042
7391
  spacing: number;
7392
+ } | {
7393
+ type: "text-row";
7394
+ opacity: number;
7395
+ x: number;
7396
+ y: number;
7397
+ align: "center" | "left" | "right";
7398
+ baseline: "top" | "alphabetic" | "bottom" | "middle";
7399
+ segments: {
7400
+ text: string;
7401
+ color?: string | undefined;
7402
+ fontSize?: number | undefined;
7403
+ fontWeight?: number | undefined;
7404
+ fontFamily?: "body" | "heading" | "mono" | undefined;
7405
+ }[];
7406
+ defaultFontSize: number;
7407
+ defaultFontWeight: number;
7408
+ defaultFontFamily: "body" | "heading" | "mono";
7409
+ defaultColor: string;
7043
7410
  })[];
7044
7411
  theme: {
7045
7412
  code: {
@@ -7090,6 +7457,9 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
7090
7457
  fillOpacity: number;
7091
7458
  opacity: number;
7092
7459
  badgePosition: "top" | "inside-top";
7460
+ accentBarWidth: number;
7461
+ glowWidth: number;
7462
+ glowOpacity: number;
7093
7463
  width?: number | undefined;
7094
7464
  height?: number | undefined;
7095
7465
  sublabel?: string | undefined;
@@ -7113,6 +7483,8 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
7113
7483
  offsetY: number;
7114
7484
  color?: string | undefined;
7115
7485
  } | undefined;
7486
+ accentColor?: string | undefined;
7487
+ glowColor?: string | undefined;
7116
7488
  } | {
7117
7489
  body: string;
7118
7490
  type: "card";
@@ -7470,6 +7842,24 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
7470
7842
  offsetX?: number | undefined;
7471
7843
  offsetY?: number | undefined;
7472
7844
  spacing?: number | undefined;
7845
+ } | {
7846
+ type: "text-row";
7847
+ x: number;
7848
+ y: number;
7849
+ segments: {
7850
+ text: string;
7851
+ color?: string | undefined;
7852
+ fontSize?: number | undefined;
7853
+ fontWeight?: number | undefined;
7854
+ fontFamily?: "body" | "heading" | "mono" | undefined;
7855
+ }[];
7856
+ opacity?: number | undefined;
7857
+ align?: "center" | "left" | "right" | undefined;
7858
+ baseline?: "top" | "alphabetic" | "bottom" | "middle" | undefined;
7859
+ defaultFontSize?: number | undefined;
7860
+ defaultFontWeight?: number | undefined;
7861
+ defaultFontFamily?: "body" | "heading" | "mono" | undefined;
7862
+ defaultColor?: string | undefined;
7473
7863
  })[] | undefined;
7474
7864
  theme?: {
7475
7865
  code: {
@@ -7543,6 +7933,11 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
7543
7933
  offsetX?: number | undefined;
7544
7934
  offsetY?: number | undefined;
7545
7935
  } | undefined;
7936
+ accentColor?: string | undefined;
7937
+ accentBarWidth?: number | undefined;
7938
+ glowColor?: string | undefined;
7939
+ glowWidth?: number | undefined;
7940
+ glowOpacity?: number | undefined;
7546
7941
  } | {
7547
7942
  body: string;
7548
7943
  type: "card";
@@ -7757,6 +8152,8 @@ type DrawPath = z.infer<typeof drawPathSchema>;
7757
8152
  type DrawBadge = z.infer<typeof drawBadgeSchema>;
7758
8153
  type DrawGradientRect = z.infer<typeof drawGradientRectSchema>;
7759
8154
  type DrawGrid = z.infer<typeof drawGridSchema>;
8155
+ type DrawTextRow = z.infer<typeof drawTextRowSchema>;
8156
+ type DrawTextRowSegment = z.infer<typeof drawTextRowSegmentSchema>;
7760
8157
  type DrawCommand = z.infer<typeof drawCommandSchema>;
7761
8158
  type LayoutConfig = z.infer<typeof layoutConfigSchema>;
7762
8159
  type AutoLayoutConfig = z.infer<typeof autoLayoutConfigSchema>;
@@ -7814,4 +8211,4 @@ declare function deriveSafeFrame(spec: DesignSpec): DesignSafeFrame;
7814
8211
  declare function parseDiagramSpec(input: unknown): DiagramSpec;
7815
8212
  declare function parseDesignSpec(input: unknown): DesignSpec;
7816
8213
 
7817
- export { type WrittenArtifacts as $, type AnchorHint as A, type BuiltInTheme as B, type ConnectionElement as C, type DesignSpec as D, type DrawShadow as E, type DrawText as F, type Element as G, type FlowNodeElement as H, type Gradient as I, type GradientOverlayDecorator as J, type GradientSpec as K, type GradientStop$1 as L, type GridLayoutConfig as M, type ImageElement as N, type LayoutConfig as O, type LayoutSnapshot as P, type ManualLayoutConfig as Q, type RenderMetadata as R, type RainbowRuleDecorator as S, type ThemeInput$1 as T, type RenderResult as U, type ShapeElement as V, type StackLayoutConfig as W, type TerminalElement as X, type TextElement as Y, type ThemeInput as Z, type VignetteDecorator as _, type Rect as a, builtInThemeBackgrounds as a0, builtInThemes as a1, computeSpecHash as a2, connectionElementSchema as a3, defaultAutoLayout as a4, defaultCanvas as a5, defaultConstraints as a6, defaultGridLayout as a7, defaultLayout as a8, defaultStackLayout as a9, defaultTheme as aa, deriveSafeFrame as ab, designSpecSchema as ac, diagramElementSchema as ad, diagramLayoutSchema as ae, diagramSpecSchema as af, drawGradientRect as ag, drawRainbowRule as ah, drawVignette as ai, flowNodeElementSchema as aj, inferLayout as ak, inferSidecarPath as al, parseDesignSpec as am, parseDiagramSpec as an, renderDesign as ao, resolveTheme as ap, writeRenderArtifacts as aq, type CodeBlockStyle as ar, type DrawGrid as as, type FlowNodeShadow as at, type GradientStop as au, type LinearGradient as av, type RadialGradient as aw, type DrawCommand as b, type Theme as c, type RenderedElement as d, type AutoLayoutConfig as e, type CardElement as f, type CodeBlockElement as g, type ConstraintSpec as h, DEFAULT_GENERATOR_VERSION as i, DEFAULT_RAINBOW_COLORS as j, type Decorator as k, type DesignCardSpec as l, type DesignSafeFrame as m, type DesignTheme as n, type DiagramElement as o, type DiagramLayout as p, type DiagramSpec as q, type DrawBadge as r, type DrawBezier as s, type DrawCircle as t, type DrawFontFamily as u, type DrawGradientRect as v, type DrawLine as w, type DrawPath as x, type DrawPoint as y, type DrawRect as z };
8214
+ export { type ThemeInput as $, type AnchorHint as A, type BuiltInTheme as B, type ConnectionElement as C, type DesignSpec as D, type DrawShadow as E, type DrawText as F, type DrawTextRow as G, type DrawTextRowSegment as H, type Element as I, type FlowNodeElement as J, type Gradient as K, type GradientOverlayDecorator as L, type GradientSpec as M, type GradientStop$1 as N, type GridLayoutConfig as O, type ImageElement as P, type LayoutConfig as Q, type RenderMetadata as R, type LayoutSnapshot as S, type ThemeInput$1 as T, type ManualLayoutConfig as U, type RainbowRuleDecorator as V, type RenderResult as W, type ShapeElement as X, type StackLayoutConfig as Y, type TerminalElement as Z, type TextElement as _, type Rect as a, type VignetteDecorator as a0, type WrittenArtifacts as a1, builtInThemeBackgrounds as a2, builtInThemes as a3, computeSpecHash as a4, connectionElementSchema as a5, defaultAutoLayout as a6, defaultCanvas as a7, defaultConstraints as a8, defaultGridLayout as a9, defaultLayout as aa, defaultStackLayout as ab, defaultTheme as ac, deriveSafeFrame as ad, designSpecSchema as ae, diagramElementSchema as af, diagramLayoutSchema as ag, diagramSpecSchema as ah, drawGradientRect as ai, drawRainbowRule as aj, drawVignette as ak, flowNodeElementSchema as al, inferLayout as am, inferSidecarPath as an, parseDesignSpec as ao, parseDiagramSpec as ap, renderDesign as aq, resolveTheme as ar, writeRenderArtifacts as as, type CodeBlockStyle as at, type DrawGrid as au, type FlowNodeShadow as av, type GradientStop as aw, type LinearGradient as ax, type RadialGradient as ay, type DrawCommand as b, type Theme as c, type RenderedElement as d, type AutoLayoutConfig as e, type CardElement as f, type CodeBlockElement as g, type ConstraintSpec as h, DEFAULT_GENERATOR_VERSION as i, DEFAULT_RAINBOW_COLORS as j, type Decorator as k, type DesignCardSpec as l, type DesignSafeFrame as m, type DesignTheme as n, type DiagramElement as o, type DiagramLayout as p, type DiagramSpec as q, type DrawBadge as r, type DrawBezier as s, type DrawCircle as t, type DrawFontFamily as u, type DrawGradientRect as v, type DrawLine as w, type DrawPath as x, type DrawPoint as y, type DrawRect as z };
@@ -1,3 +1,3 @@
1
1
  import 'zod';
2
- export { A as AnchorHint, e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement, ar as CodeBlockStyle, C as ConnectionElement, h as ConstraintSpec, k as Decorator, l as DesignCardSpec, m as DesignSafeFrame, D as DesignSpec, n as DesignTheme, o as DiagramElement, p as DiagramLayout, q as DiagramSpec, r as DrawBadge, s as DrawBezier, t as DrawCircle, b as DrawCommand, u as DrawFontFamily, v as DrawGradientRect, as as DrawGrid, w as DrawLine, x as DrawPath, y as DrawPoint, z as DrawRect, E as DrawShadow, F as DrawText, G as Element, H as FlowNodeElement, at as FlowNodeShadow, I as Gradient, J as GradientOverlayDecorator, au as GradientStop, M as GridLayoutConfig, N as ImageElement, O as LayoutConfig, av as LinearGradient, Q as ManualLayoutConfig, aw as RadialGradient, S as RainbowRuleDecorator, V as ShapeElement, W as StackLayoutConfig, X as TerminalElement, Y as TextElement, c as Theme, Z as ThemeInput, _ as VignetteDecorator, a0 as builtInThemeBackgrounds, a1 as builtInThemes, a3 as connectionElementSchema, a4 as defaultAutoLayout, a5 as defaultCanvas, a6 as defaultConstraints, a7 as defaultGridLayout, a8 as defaultLayout, a9 as defaultStackLayout, aa as defaultTheme, ab as deriveSafeFrame, ac as designSpecSchema, ad as diagramElementSchema, ae as diagramLayoutSchema, af as diagramSpecSchema, aj as flowNodeElementSchema, ak as inferLayout, am as parseDesignSpec, an as parseDiagramSpec, ap as resolveTheme } from './spec.schema-BDvtn_mJ.js';
2
+ export { A as AnchorHint, e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement, at as CodeBlockStyle, C as ConnectionElement, h as ConstraintSpec, k as Decorator, l as DesignCardSpec, m as DesignSafeFrame, D as DesignSpec, n as DesignTheme, o as DiagramElement, p as DiagramLayout, q as DiagramSpec, r as DrawBadge, s as DrawBezier, t as DrawCircle, b as DrawCommand, u as DrawFontFamily, v as DrawGradientRect, au as DrawGrid, w as DrawLine, x as DrawPath, y as DrawPoint, z as DrawRect, E as DrawShadow, F as DrawText, G as DrawTextRow, H as DrawTextRowSegment, I as Element, J as FlowNodeElement, av as FlowNodeShadow, K as Gradient, L as GradientOverlayDecorator, aw as GradientStop, O as GridLayoutConfig, P as ImageElement, Q as LayoutConfig, ax as LinearGradient, U as ManualLayoutConfig, ay as RadialGradient, V as RainbowRuleDecorator, X as ShapeElement, Y as StackLayoutConfig, Z as TerminalElement, _ as TextElement, c as Theme, $ as ThemeInput, a0 as VignetteDecorator, a2 as builtInThemeBackgrounds, a3 as builtInThemes, a5 as connectionElementSchema, a6 as defaultAutoLayout, a7 as defaultCanvas, a8 as defaultConstraints, a9 as defaultGridLayout, aa as defaultLayout, ab as defaultStackLayout, ac as defaultTheme, ad as deriveSafeFrame, ae as designSpecSchema, af as diagramElementSchema, ag as diagramLayoutSchema, ah as diagramSpecSchema, al as flowNodeElementSchema, am as inferLayout, ao as parseDesignSpec, ap as parseDiagramSpec, ar as resolveTheme } from './spec.schema-B_Z-KNqt.js';
3
3
  import '@napi-rs/canvas';
@@ -398,6 +398,26 @@ var drawGridSchema = z2.object({
398
398
  offsetX: z2.number().default(0),
399
399
  offsetY: z2.number().default(0)
400
400
  }).strict();
401
+ var drawTextRowSegmentSchema = z2.object({
402
+ text: z2.string().min(1).max(500),
403
+ color: colorHexSchema2.optional(),
404
+ fontSize: z2.number().min(6).max(200).optional(),
405
+ fontWeight: z2.number().int().min(100).max(900).optional(),
406
+ fontFamily: drawFontFamilySchema.optional()
407
+ }).strict();
408
+ var drawTextRowSchema = z2.object({
409
+ type: z2.literal("text-row"),
410
+ segments: z2.array(drawTextRowSegmentSchema).min(1).max(20),
411
+ x: z2.number(),
412
+ y: z2.number(),
413
+ align: z2.enum(["left", "center", "right"]).default("center"),
414
+ baseline: z2.enum(["top", "middle", "alphabetic", "bottom"]).default("alphabetic"),
415
+ defaultFontSize: z2.number().min(6).max(200).default(16),
416
+ defaultFontWeight: z2.number().int().min(100).max(900).default(400),
417
+ defaultFontFamily: drawFontFamilySchema.default("body"),
418
+ defaultColor: colorHexSchema2.default("#FFFFFF"),
419
+ opacity: z2.number().min(0).max(1).default(1)
420
+ }).strict();
401
421
  var drawCommandSchema = z2.discriminatedUnion("type", [
402
422
  drawRectSchema,
403
423
  drawCircleSchema,
@@ -407,7 +427,8 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
407
427
  drawPathSchema,
408
428
  drawBadgeSchema,
409
429
  drawGradientRectSchema,
410
- drawGridSchema
430
+ drawGridSchema,
431
+ drawTextRowSchema
411
432
  ]);
412
433
  var defaultCanvas = {
413
434
  width: 1200,
@@ -512,7 +533,14 @@ var flowNodeElementSchema = z2.object({
512
533
  badgeColor: colorHexSchema2.optional(),
513
534
  badgeBackground: colorHexSchema2.optional(),
514
535
  badgePosition: z2.enum(["top", "inside-top"]).default("inside-top"),
515
- shadow: flowNodeShadowSchema.optional()
536
+ shadow: flowNodeShadowSchema.optional(),
537
+ // Accent bar (left edge colored bar)
538
+ accentColor: colorHexSchema2.optional(),
539
+ accentBarWidth: z2.number().min(0).max(16).default(3),
540
+ // Inner glow (gradient overlay from accent color inward)
541
+ glowColor: colorHexSchema2.optional(),
542
+ glowWidth: z2.number().min(0).max(64).default(16),
543
+ glowOpacity: z2.number().min(0).max(1).default(0.15)
516
544
  }).strict();
517
545
  var anchorHintSchema = z2.union([
518
546
  z2.enum(["top", "bottom", "left", "right", "center"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectratools/graphic-designer-cli",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "Deterministic visual content generator — code screenshots, terminal shots, flowcharts, and infographics. No browser dependency.",
5
5
  "type": "module",
6
6
  "license": "MIT",