@spectratools/graphic-designer-cli 0.7.1 → 0.8.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 +30 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +30 -2
- package/dist/qa.d.ts +1 -1
- package/dist/qa.js +30 -2
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +30 -2
- package/dist/{spec.schema-BDvtn_mJ.d.ts → spec.schema-B_Z-KNqt.d.ts} +398 -1
- package/dist/spec.schema.d.ts +1 -1
- package/dist/spec.schema.js +30 -2
- package/package.json +1 -1
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"]),
|
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-
|
|
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
|
|
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"]),
|
package/dist/qa.d.ts
CHANGED
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"]),
|
package/dist/renderer.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { i as DEFAULT_GENERATOR_VERSION,
|
|
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
|
@@ -3494,6 +3494,26 @@ var drawGridSchema = z2.object({
|
|
|
3494
3494
|
offsetX: z2.number().default(0),
|
|
3495
3495
|
offsetY: z2.number().default(0)
|
|
3496
3496
|
}).strict();
|
|
3497
|
+
var drawTextRowSegmentSchema = z2.object({
|
|
3498
|
+
text: z2.string().min(1).max(500),
|
|
3499
|
+
color: colorHexSchema2.optional(),
|
|
3500
|
+
fontSize: z2.number().min(6).max(200).optional(),
|
|
3501
|
+
fontWeight: z2.number().int().min(100).max(900).optional(),
|
|
3502
|
+
fontFamily: drawFontFamilySchema.optional()
|
|
3503
|
+
}).strict();
|
|
3504
|
+
var drawTextRowSchema = z2.object({
|
|
3505
|
+
type: z2.literal("text-row"),
|
|
3506
|
+
segments: z2.array(drawTextRowSegmentSchema).min(1).max(20),
|
|
3507
|
+
x: z2.number(),
|
|
3508
|
+
y: z2.number(),
|
|
3509
|
+
align: z2.enum(["left", "center", "right"]).default("center"),
|
|
3510
|
+
baseline: z2.enum(["top", "middle", "alphabetic", "bottom"]).default("alphabetic"),
|
|
3511
|
+
defaultFontSize: z2.number().min(6).max(200).default(16),
|
|
3512
|
+
defaultFontWeight: z2.number().int().min(100).max(900).default(400),
|
|
3513
|
+
defaultFontFamily: drawFontFamilySchema.default("body"),
|
|
3514
|
+
defaultColor: colorHexSchema2.default("#FFFFFF"),
|
|
3515
|
+
opacity: z2.number().min(0).max(1).default(1)
|
|
3516
|
+
}).strict();
|
|
3497
3517
|
var drawCommandSchema = z2.discriminatedUnion("type", [
|
|
3498
3518
|
drawRectSchema,
|
|
3499
3519
|
drawCircleSchema,
|
|
@@ -3503,7 +3523,8 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
|
|
|
3503
3523
|
drawPathSchema,
|
|
3504
3524
|
drawBadgeSchema,
|
|
3505
3525
|
drawGradientRectSchema,
|
|
3506
|
-
drawGridSchema
|
|
3526
|
+
drawGridSchema,
|
|
3527
|
+
drawTextRowSchema
|
|
3507
3528
|
]);
|
|
3508
3529
|
var defaultCanvas = {
|
|
3509
3530
|
width: 1200,
|
|
@@ -3607,7 +3628,14 @@ var flowNodeElementSchema = z2.object({
|
|
|
3607
3628
|
badgeColor: colorHexSchema2.optional(),
|
|
3608
3629
|
badgeBackground: colorHexSchema2.optional(),
|
|
3609
3630
|
badgePosition: z2.enum(["top", "inside-top"]).default("inside-top"),
|
|
3610
|
-
shadow: flowNodeShadowSchema.optional()
|
|
3631
|
+
shadow: flowNodeShadowSchema.optional(),
|
|
3632
|
+
// Accent bar (left edge colored bar)
|
|
3633
|
+
accentColor: colorHexSchema2.optional(),
|
|
3634
|
+
accentBarWidth: z2.number().min(0).max(16).default(3),
|
|
3635
|
+
// Inner glow (gradient overlay from accent color inward)
|
|
3636
|
+
glowColor: colorHexSchema2.optional(),
|
|
3637
|
+
glowWidth: z2.number().min(0).max(64).default(16),
|
|
3638
|
+
glowOpacity: z2.number().min(0).max(1).default(0.15)
|
|
3611
3639
|
}).strict();
|
|
3612
3640
|
var anchorHintSchema = z2.union([
|
|
3613
3641
|
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
|
|
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 };
|
package/dist/spec.schema.d.ts
CHANGED
|
@@ -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,
|
|
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';
|
package/dist/spec.schema.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.8.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",
|