@spectratools/graphic-designer-cli 0.9.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/qa.js CHANGED
@@ -563,6 +563,21 @@ var drawLineSchema = z2.object({
563
563
  opacity: z2.number().min(0).max(1).default(1),
564
564
  shadow: drawShadowSchema.optional()
565
565
  }).strict();
566
+ var drawArcSchema = z2.object({
567
+ type: z2.literal("arc"),
568
+ center: z2.object({
569
+ x: z2.number(),
570
+ y: z2.number()
571
+ }).strict(),
572
+ radius: z2.number().positive(),
573
+ startAngle: z2.number(),
574
+ endAngle: z2.number(),
575
+ color: colorHexSchema2.default("#FFFFFF"),
576
+ width: z2.number().min(0.5).max(32).default(2),
577
+ dash: z2.array(z2.number()).max(6).optional(),
578
+ opacity: z2.number().min(0).max(1).default(1),
579
+ shadow: drawShadowSchema.optional()
580
+ }).strict();
566
581
  var drawPointSchema = z2.object({
567
582
  x: z2.number(),
568
583
  y: z2.number()
@@ -647,6 +662,7 @@ var drawCommandSchema = z2.discriminatedUnion("type", [
647
662
  drawCircleSchema,
648
663
  drawTextSchema,
649
664
  drawLineSchema,
665
+ drawArcSchema,
650
666
  drawBezierSchema,
651
667
  drawPathSchema,
652
668
  drawBadgeSchema,
@@ -777,17 +793,21 @@ var connectionElementSchema = z2.object({
777
793
  from: z2.string().min(1).max(120),
778
794
  to: z2.string().min(1).max(120),
779
795
  style: z2.enum(["solid", "dashed", "dotted"]).default("solid"),
780
- strokeStyle: z2.enum(["solid", "dashed", "dotted"]).default("solid"),
796
+ /** @deprecated Use `style` instead. */
797
+ strokeStyle: z2.enum(["solid", "dashed", "dotted"]).optional(),
781
798
  arrow: z2.enum(["end", "start", "both", "none"]).default("end"),
782
799
  label: z2.string().min(1).max(200).optional(),
783
800
  labelPosition: z2.enum(["start", "middle", "end"]).default("middle"),
784
801
  color: colorHexSchema2.optional(),
802
+ fromColor: colorHexSchema2.optional(),
803
+ toColor: colorHexSchema2.optional(),
785
804
  width: z2.number().min(0.5).max(10).optional(),
786
805
  strokeWidth: z2.number().min(0.5).max(10).default(2),
787
806
  arrowSize: z2.number().min(4).max(32).optional(),
788
807
  arrowPlacement: z2.enum(["endpoint", "boundary"]).default("endpoint"),
789
808
  opacity: z2.number().min(0).max(1).default(1),
790
- routing: z2.enum(["auto", "orthogonal", "curve", "arc"]).default("auto"),
809
+ routing: z2.enum(["auto", "orthogonal", "curve", "arc", "straight"]).default("auto"),
810
+ curveMode: z2.enum(["normal", "ellipse"]).default("normal"),
791
811
  tension: z2.number().min(0.1).max(0.8).default(0.35),
792
812
  fromAnchor: anchorHintSchema.optional(),
793
813
  toAnchor: anchorHintSchema.optional()
@@ -880,7 +900,11 @@ var autoLayoutConfigSchema = z2.object({
880
900
  /** Sort strategy for radial layout node ordering. Only relevant when algorithm is 'radial'. */
881
901
  radialSortBy: z2.enum(["id", "connections"]).optional(),
882
902
  /** Explicit center used by curve/arc connection routing. */
883
- diagramCenter: diagramCenterSchema.optional()
903
+ diagramCenter: diagramCenterSchema.optional(),
904
+ /** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
905
+ ellipseRx: z2.number().positive().optional(),
906
+ /** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
907
+ ellipseRy: z2.number().positive().optional()
884
908
  }).strict();
885
909
  var gridLayoutConfigSchema = z2.object({
886
910
  mode: z2.literal("grid"),
@@ -890,7 +914,11 @@ var gridLayoutConfigSchema = z2.object({
890
914
  cardMaxHeight: z2.number().int().min(32).max(4096).optional(),
891
915
  equalHeight: z2.boolean().default(false),
892
916
  /** Explicit center used by curve/arc connection routing. */
893
- diagramCenter: diagramCenterSchema.optional()
917
+ diagramCenter: diagramCenterSchema.optional(),
918
+ /** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
919
+ ellipseRx: z2.number().positive().optional(),
920
+ /** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
921
+ ellipseRy: z2.number().positive().optional()
894
922
  }).strict();
895
923
  var stackLayoutConfigSchema = z2.object({
896
924
  mode: z2.literal("stack"),
@@ -898,7 +926,11 @@ var stackLayoutConfigSchema = z2.object({
898
926
  gap: z2.number().int().min(0).max(256).default(24),
899
927
  alignment: z2.enum(["start", "center", "end", "stretch"]).default("stretch"),
900
928
  /** Explicit center used by curve/arc connection routing. */
901
- diagramCenter: diagramCenterSchema.optional()
929
+ diagramCenter: diagramCenterSchema.optional(),
930
+ /** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
931
+ ellipseRx: z2.number().positive().optional(),
932
+ /** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
933
+ ellipseRy: z2.number().positive().optional()
902
934
  }).strict();
903
935
  var manualPositionSchema = z2.object({
904
936
  x: z2.number().int(),
@@ -910,7 +942,11 @@ var manualLayoutConfigSchema = z2.object({
910
942
  mode: z2.literal("manual"),
911
943
  positions: z2.record(z2.string().min(1), manualPositionSchema).default({}),
912
944
  /** Explicit center used by curve/arc connection routing. */
913
- diagramCenter: diagramCenterSchema.optional()
945
+ diagramCenter: diagramCenterSchema.optional(),
946
+ /** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
947
+ ellipseRx: z2.number().positive().optional(),
948
+ /** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
949
+ ellipseRy: z2.number().positive().optional()
914
950
  }).strict();
915
951
  var layoutConfigSchema = z2.discriminatedUnion("mode", [
916
952
  autoLayoutConfigSchema,
@@ -975,7 +1011,11 @@ var diagramElementSchema = z2.discriminatedUnion("type", [
975
1011
  var diagramLayoutSchema = z2.object({
976
1012
  mode: z2.enum(["manual", "auto"]).default("manual"),
977
1013
  positions: z2.record(z2.string(), diagramPositionSchema).optional(),
978
- diagramCenter: diagramCenterSchema.optional()
1014
+ diagramCenter: diagramCenterSchema.optional(),
1015
+ /** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
1016
+ ellipseRx: z2.number().positive().optional(),
1017
+ /** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
1018
+ ellipseRy: z2.number().positive().optional()
979
1019
  }).strict();
980
1020
  var diagramSpecSchema = z2.object({
981
1021
  version: z2.literal(1),
@@ -1,3 +1,3 @@
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';
1
+ export { i as DEFAULT_GENERATOR_VERSION, S as IterationMeta, V as LayoutSnapshot, a as Rect, Y as RenderDesignOptions, R as RenderMetadata, Z as RenderResult, d as RenderedElement, a4 as WrittenArtifacts, a7 as computeSpecHash, aq as inferSidecarPath, at as renderDesign, av as writeRenderArtifacts } from './spec.schema-CYlOLxmK.js';
2
2
  import 'zod';
3
3
  import '@napi-rs/canvas';