@spectratools/graphic-designer-cli 0.10.0 → 0.11.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 +158 -116
- package/dist/index.d.ts +44 -4
- package/dist/index.js +162 -66
- package/dist/qa.d.ts +1 -1
- package/dist/qa.js +29 -7
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +158 -116
- package/dist/{spec.schema-B6sXTTou.d.ts → spec.schema-CYlOLxmK.d.ts} +1395 -1221
- package/dist/spec.schema.d.ts +1 -1
- package/dist/spec.schema.js +29 -7
- package/package.json +1 -1
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, aw 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 DrawArc, s as DrawBadge, t as DrawBezier, u as DrawCircle, b as DrawCommand, v as DrawFontFamily, w as DrawGradientRect, ax as DrawGrid, x as DrawLine, y as DrawPath, z as DrawPoint, E as DrawRect, F as DrawShadow, G as DrawText, H as DrawTextRow, I as DrawTextRowSegment, J as Element, K as FlowNodeElement, ay as FlowNodeShadow, L as Gradient, M as GradientOverlayDecorator, az as GradientStop, P as GridLayoutConfig, Q as ImageElement, U as LayoutConfig, aA as LinearGradient, W as ManualLayoutConfig, aB as RadialGradient, X as RainbowRuleDecorator, _ as ShapeElement, $ as StackLayoutConfig, a0 as TerminalElement, a1 as TextElement, c as Theme, a2 as ThemeInput, a3 as VignetteDecorator, a5 as builtInThemeBackgrounds, a6 as builtInThemes, a8 as connectionElementSchema, a9 as defaultAutoLayout, aa as defaultCanvas, ab as defaultConstraints, ac as defaultGridLayout, ad as defaultLayout, ae as defaultStackLayout, af as defaultTheme, ag as deriveSafeFrame, ah as designSpecSchema, ai as diagramElementSchema, aj as diagramLayoutSchema, ak as diagramSpecSchema, ao as flowNodeElementSchema, ap as inferLayout, ar as parseDesignSpec, as as parseDiagramSpec, au as resolveTheme } from './spec.schema-
|
|
2
|
+
export { A as AnchorHint, e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement, aw 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 DrawArc, s as DrawBadge, t as DrawBezier, u as DrawCircle, b as DrawCommand, v as DrawFontFamily, w as DrawGradientRect, ax as DrawGrid, x as DrawLine, y as DrawPath, z as DrawPoint, E as DrawRect, F as DrawShadow, G as DrawText, H as DrawTextRow, I as DrawTextRowSegment, J as Element, K as FlowNodeElement, ay as FlowNodeShadow, L as Gradient, M as GradientOverlayDecorator, az as GradientStop, P as GridLayoutConfig, Q as ImageElement, U as LayoutConfig, aA as LinearGradient, W as ManualLayoutConfig, aB as RadialGradient, X as RainbowRuleDecorator, _ as ShapeElement, $ as StackLayoutConfig, a0 as TerminalElement, a1 as TextElement, c as Theme, a2 as ThemeInput, a3 as VignetteDecorator, a5 as builtInThemeBackgrounds, a6 as builtInThemes, a8 as connectionElementSchema, a9 as defaultAutoLayout, aa as defaultCanvas, ab as defaultConstraints, ac as defaultGridLayout, ad as defaultLayout, ae as defaultStackLayout, af as defaultTheme, ag as deriveSafeFrame, ah as designSpecSchema, ai as diagramElementSchema, aj as diagramLayoutSchema, ak as diagramSpecSchema, ao as flowNodeElementSchema, ap as inferLayout, ar as parseDesignSpec, as as parseDiagramSpec, au as resolveTheme } from './spec.schema-CYlOLxmK.js';
|
|
3
3
|
import '@napi-rs/canvas';
|
package/dist/spec.schema.js
CHANGED
|
@@ -570,7 +570,8 @@ var connectionElementSchema = z2.object({
|
|
|
570
570
|
from: z2.string().min(1).max(120),
|
|
571
571
|
to: z2.string().min(1).max(120),
|
|
572
572
|
style: z2.enum(["solid", "dashed", "dotted"]).default("solid"),
|
|
573
|
-
|
|
573
|
+
/** @deprecated Use `style` instead. */
|
|
574
|
+
strokeStyle: z2.enum(["solid", "dashed", "dotted"]).optional(),
|
|
574
575
|
arrow: z2.enum(["end", "start", "both", "none"]).default("end"),
|
|
575
576
|
label: z2.string().min(1).max(200).optional(),
|
|
576
577
|
labelPosition: z2.enum(["start", "middle", "end"]).default("middle"),
|
|
@@ -582,7 +583,8 @@ var connectionElementSchema = z2.object({
|
|
|
582
583
|
arrowSize: z2.number().min(4).max(32).optional(),
|
|
583
584
|
arrowPlacement: z2.enum(["endpoint", "boundary"]).default("endpoint"),
|
|
584
585
|
opacity: z2.number().min(0).max(1).default(1),
|
|
585
|
-
routing: z2.enum(["auto", "orthogonal", "curve", "arc"]).default("auto"),
|
|
586
|
+
routing: z2.enum(["auto", "orthogonal", "curve", "arc", "straight"]).default("auto"),
|
|
587
|
+
curveMode: z2.enum(["normal", "ellipse"]).default("normal"),
|
|
586
588
|
tension: z2.number().min(0.1).max(0.8).default(0.35),
|
|
587
589
|
fromAnchor: anchorHintSchema.optional(),
|
|
588
590
|
toAnchor: anchorHintSchema.optional()
|
|
@@ -675,7 +677,11 @@ var autoLayoutConfigSchema = z2.object({
|
|
|
675
677
|
/** Sort strategy for radial layout node ordering. Only relevant when algorithm is 'radial'. */
|
|
676
678
|
radialSortBy: z2.enum(["id", "connections"]).optional(),
|
|
677
679
|
/** Explicit center used by curve/arc connection routing. */
|
|
678
|
-
diagramCenter: diagramCenterSchema.optional()
|
|
680
|
+
diagramCenter: diagramCenterSchema.optional(),
|
|
681
|
+
/** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
682
|
+
ellipseRx: z2.number().positive().optional(),
|
|
683
|
+
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
684
|
+
ellipseRy: z2.number().positive().optional()
|
|
679
685
|
}).strict();
|
|
680
686
|
var gridLayoutConfigSchema = z2.object({
|
|
681
687
|
mode: z2.literal("grid"),
|
|
@@ -685,7 +691,11 @@ var gridLayoutConfigSchema = z2.object({
|
|
|
685
691
|
cardMaxHeight: z2.number().int().min(32).max(4096).optional(),
|
|
686
692
|
equalHeight: z2.boolean().default(false),
|
|
687
693
|
/** Explicit center used by curve/arc connection routing. */
|
|
688
|
-
diagramCenter: diagramCenterSchema.optional()
|
|
694
|
+
diagramCenter: diagramCenterSchema.optional(),
|
|
695
|
+
/** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
696
|
+
ellipseRx: z2.number().positive().optional(),
|
|
697
|
+
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
698
|
+
ellipseRy: z2.number().positive().optional()
|
|
689
699
|
}).strict();
|
|
690
700
|
var stackLayoutConfigSchema = z2.object({
|
|
691
701
|
mode: z2.literal("stack"),
|
|
@@ -693,7 +703,11 @@ var stackLayoutConfigSchema = z2.object({
|
|
|
693
703
|
gap: z2.number().int().min(0).max(256).default(24),
|
|
694
704
|
alignment: z2.enum(["start", "center", "end", "stretch"]).default("stretch"),
|
|
695
705
|
/** Explicit center used by curve/arc connection routing. */
|
|
696
|
-
diagramCenter: diagramCenterSchema.optional()
|
|
706
|
+
diagramCenter: diagramCenterSchema.optional(),
|
|
707
|
+
/** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
708
|
+
ellipseRx: z2.number().positive().optional(),
|
|
709
|
+
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
710
|
+
ellipseRy: z2.number().positive().optional()
|
|
697
711
|
}).strict();
|
|
698
712
|
var manualPositionSchema = z2.object({
|
|
699
713
|
x: z2.number().int(),
|
|
@@ -705,7 +719,11 @@ var manualLayoutConfigSchema = z2.object({
|
|
|
705
719
|
mode: z2.literal("manual"),
|
|
706
720
|
positions: z2.record(z2.string().min(1), manualPositionSchema).default({}),
|
|
707
721
|
/** Explicit center used by curve/arc connection routing. */
|
|
708
|
-
diagramCenter: diagramCenterSchema.optional()
|
|
722
|
+
diagramCenter: diagramCenterSchema.optional(),
|
|
723
|
+
/** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
724
|
+
ellipseRx: z2.number().positive().optional(),
|
|
725
|
+
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
726
|
+
ellipseRy: z2.number().positive().optional()
|
|
709
727
|
}).strict();
|
|
710
728
|
var layoutConfigSchema = z2.discriminatedUnion("mode", [
|
|
711
729
|
autoLayoutConfigSchema,
|
|
@@ -770,7 +788,11 @@ var diagramElementSchema = z2.discriminatedUnion("type", [
|
|
|
770
788
|
var diagramLayoutSchema = z2.object({
|
|
771
789
|
mode: z2.enum(["manual", "auto"]).default("manual"),
|
|
772
790
|
positions: z2.record(z2.string(), diagramPositionSchema).optional(),
|
|
773
|
-
diagramCenter: diagramCenterSchema.optional()
|
|
791
|
+
diagramCenter: diagramCenterSchema.optional(),
|
|
792
|
+
/** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
793
|
+
ellipseRx: z2.number().positive().optional(),
|
|
794
|
+
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
795
|
+
ellipseRy: z2.number().positive().optional()
|
|
774
796
|
}).strict();
|
|
775
797
|
var diagramSpecSchema = z2.object({
|
|
776
798
|
version: z2.literal(1),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectratools/graphic-designer-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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",
|