@retikz/core 0.2.0-alpha.4 → 0.2.0-alpha.6

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.
Files changed (141) hide show
  1. package/dist/es/compile/anchor-cache.d.ts +10 -0
  2. package/dist/es/compile/anchor-cache.d.ts.map +1 -1
  3. package/dist/es/compile/anchor-cache.js +25 -1
  4. package/dist/es/compile/index.d.ts +0 -1
  5. package/dist/es/compile/index.d.ts.map +1 -1
  6. package/dist/es/compile/path/anchor.d.ts.map +1 -1
  7. package/dist/es/compile/path/anchor.js +17 -18
  8. package/dist/es/compile/path/index.d.ts.map +1 -1
  9. package/dist/es/compile/path/index.js +98 -13
  10. package/dist/es/compile/path/relative.d.ts.map +1 -1
  11. package/dist/es/compile/path/relative.js +5 -1
  12. package/dist/es/geometry/_edge.d.ts +29 -0
  13. package/dist/es/geometry/_edge.d.ts.map +1 -0
  14. package/dist/es/geometry/_edge.js +35 -0
  15. package/dist/es/geometry/arc.d.ts +11 -0
  16. package/dist/es/geometry/arc.d.ts.map +1 -1
  17. package/dist/es/geometry/arc.js +27 -1
  18. package/dist/es/geometry/circle.d.ts +3 -0
  19. package/dist/es/geometry/circle.d.ts.map +1 -1
  20. package/dist/es/geometry/circle.js +7 -0
  21. package/dist/es/geometry/diamond.d.ts +3 -0
  22. package/dist/es/geometry/diamond.d.ts.map +1 -1
  23. package/dist/es/geometry/diamond.js +29 -0
  24. package/dist/es/geometry/ellipse.d.ts +3 -0
  25. package/dist/es/geometry/ellipse.d.ts.map +1 -1
  26. package/dist/es/geometry/ellipse.js +7 -0
  27. package/dist/es/geometry/rect.d.ts +26 -0
  28. package/dist/es/geometry/rect.d.ts.map +1 -1
  29. package/dist/es/geometry/rect.js +90 -1
  30. package/dist/es/geometry/segment.d.ts +2 -0
  31. package/dist/es/geometry/segment.d.ts.map +1 -1
  32. package/dist/es/geometry/segment.js +12 -1
  33. package/dist/es/index.d.ts +3 -3
  34. package/dist/es/index.d.ts.map +1 -1
  35. package/dist/es/index.js +6 -5
  36. package/dist/es/ir/coordinate.d.ts +2 -2
  37. package/dist/es/ir/node.d.ts +4 -4
  38. package/dist/es/ir/path/path.d.ts +828 -111
  39. package/dist/es/ir/path/path.d.ts.map +1 -1
  40. package/dist/es/ir/path/step.d.ts +1209 -168
  41. package/dist/es/ir/path/step.d.ts.map +1 -1
  42. package/dist/es/ir/path/step.js +36 -11
  43. package/dist/es/ir/path/target.d.ts +71 -1
  44. package/dist/es/ir/path/target.d.ts.map +1 -1
  45. package/dist/es/ir/path/target.js +24 -3
  46. package/dist/es/ir/scope.d.ts +1228 -190
  47. package/dist/es/ir/scope.d.ts.map +1 -1
  48. package/dist/es/parsers/index.d.ts +1 -0
  49. package/dist/es/parsers/index.d.ts.map +1 -1
  50. package/dist/es/parsers/parseNodeTarget.d.ts +4 -0
  51. package/dist/es/parsers/parseNodeTarget.d.ts.map +1 -0
  52. package/dist/es/parsers/parseNodeTarget.js +33 -0
  53. package/dist/es/parsers/parseTargetSugar.d.ts +4 -2
  54. package/dist/es/parsers/parseTargetSugar.d.ts.map +1 -1
  55. package/dist/es/parsers/parseTargetSugar.js +6 -3
  56. package/dist/es/parsers/parseWay.d.ts +1 -1
  57. package/dist/es/parsers/parseWay.d.ts.map +1 -1
  58. package/dist/es/shapes/circle.d.ts.map +1 -1
  59. package/dist/es/shapes/circle.js +1 -0
  60. package/dist/es/shapes/diamond.d.ts.map +1 -1
  61. package/dist/es/shapes/diamond.js +1 -0
  62. package/dist/es/shapes/ellipse.d.ts.map +1 -1
  63. package/dist/es/shapes/ellipse.js +1 -0
  64. package/dist/es/shapes/rectangle.d.ts.map +1 -1
  65. package/dist/es/shapes/rectangle.js +1 -0
  66. package/dist/es/shapes/types.d.ts +6 -0
  67. package/dist/es/shapes/types.d.ts.map +1 -1
  68. package/dist/lib/compile/anchor-cache.cjs +25 -0
  69. package/dist/lib/compile/anchor-cache.d.ts +10 -0
  70. package/dist/lib/compile/anchor-cache.d.ts.map +1 -1
  71. package/dist/lib/compile/index.d.ts +0 -1
  72. package/dist/lib/compile/index.d.ts.map +1 -1
  73. package/dist/lib/compile/path/anchor.cjs +16 -17
  74. package/dist/lib/compile/path/anchor.d.ts.map +1 -1
  75. package/dist/lib/compile/path/index.cjs +96 -11
  76. package/dist/lib/compile/path/index.d.ts.map +1 -1
  77. package/dist/lib/compile/path/relative.cjs +5 -1
  78. package/dist/lib/compile/path/relative.d.ts.map +1 -1
  79. package/dist/lib/geometry/_edge.cjs +38 -0
  80. package/dist/lib/geometry/_edge.d.ts +29 -0
  81. package/dist/lib/geometry/_edge.d.ts.map +1 -0
  82. package/dist/lib/geometry/arc.cjs +28 -0
  83. package/dist/lib/geometry/arc.d.ts +11 -0
  84. package/dist/lib/geometry/arc.d.ts.map +1 -1
  85. package/dist/lib/geometry/circle.cjs +7 -0
  86. package/dist/lib/geometry/circle.d.ts +3 -0
  87. package/dist/lib/geometry/circle.d.ts.map +1 -1
  88. package/dist/lib/geometry/diamond.cjs +29 -0
  89. package/dist/lib/geometry/diamond.d.ts +3 -0
  90. package/dist/lib/geometry/diamond.d.ts.map +1 -1
  91. package/dist/lib/geometry/ellipse.cjs +7 -0
  92. package/dist/lib/geometry/ellipse.d.ts +3 -0
  93. package/dist/lib/geometry/ellipse.d.ts.map +1 -1
  94. package/dist/lib/geometry/rect.cjs +90 -0
  95. package/dist/lib/geometry/rect.d.ts +26 -0
  96. package/dist/lib/geometry/rect.d.ts.map +1 -1
  97. package/dist/lib/geometry/segment.cjs +12 -0
  98. package/dist/lib/geometry/segment.d.ts +2 -0
  99. package/dist/lib/geometry/segment.d.ts.map +1 -1
  100. package/dist/lib/index.cjs +7 -2
  101. package/dist/lib/index.d.ts +3 -3
  102. package/dist/lib/index.d.ts.map +1 -1
  103. package/dist/lib/ir/coordinate.d.ts +2 -2
  104. package/dist/lib/ir/node.d.ts +4 -4
  105. package/dist/lib/ir/path/path.d.ts +828 -111
  106. package/dist/lib/ir/path/path.d.ts.map +1 -1
  107. package/dist/lib/ir/path/step.cjs +36 -10
  108. package/dist/lib/ir/path/step.d.ts +1209 -168
  109. package/dist/lib/ir/path/step.d.ts.map +1 -1
  110. package/dist/lib/ir/path/target.cjs +25 -2
  111. package/dist/lib/ir/path/target.d.ts +71 -1
  112. package/dist/lib/ir/path/target.d.ts.map +1 -1
  113. package/dist/lib/ir/scope.d.ts +1228 -190
  114. package/dist/lib/ir/scope.d.ts.map +1 -1
  115. package/dist/lib/parsers/index.d.ts +1 -0
  116. package/dist/lib/parsers/index.d.ts.map +1 -1
  117. package/dist/lib/parsers/parseNodeTarget.cjs +33 -0
  118. package/dist/lib/parsers/parseNodeTarget.d.ts +4 -0
  119. package/dist/lib/parsers/parseNodeTarget.d.ts.map +1 -0
  120. package/dist/lib/parsers/parseTargetSugar.cjs +6 -3
  121. package/dist/lib/parsers/parseTargetSugar.d.ts +4 -2
  122. package/dist/lib/parsers/parseTargetSugar.d.ts.map +1 -1
  123. package/dist/lib/parsers/parseWay.d.ts +1 -1
  124. package/dist/lib/parsers/parseWay.d.ts.map +1 -1
  125. package/dist/lib/shapes/circle.cjs +1 -0
  126. package/dist/lib/shapes/circle.d.ts.map +1 -1
  127. package/dist/lib/shapes/diamond.cjs +1 -0
  128. package/dist/lib/shapes/diamond.d.ts.map +1 -1
  129. package/dist/lib/shapes/ellipse.cjs +1 -0
  130. package/dist/lib/shapes/ellipse.d.ts.map +1 -1
  131. package/dist/lib/shapes/rectangle.cjs +1 -0
  132. package/dist/lib/shapes/rectangle.d.ts.map +1 -1
  133. package/dist/lib/shapes/types.d.ts +6 -0
  134. package/dist/lib/shapes/types.d.ts.map +1 -1
  135. package/package.json +1 -1
  136. package/dist/es/compile/parseTarget.d.ts +0 -20
  137. package/dist/es/compile/parseTarget.d.ts.map +0 -1
  138. package/dist/es/compile/parseTarget.js +0 -36
  139. package/dist/lib/compile/parseTarget.cjs +0 -36
  140. package/dist/lib/compile/parseTarget.d.ts +0 -20
  141. package/dist/l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and for an arc-like cubic; control points computed at compile time");
82
82
  var ArcStepSchema = z.object({
83
83
  type: z.literal("step").describe("Discriminator marking this as a path step node"),
84
- kind: z.literal("arc").describe("Arc segment from cursor as center, sweeping startAngle → endAngle on a circle of given radius (TikZ `arc[start angle=…, end angle=…, radius=…]`); pen ends at the arc endpoint, not the center"),
84
+ kind: z.literal("arc").describe("Arc segment sweeping startAngle → endAngle around a center. Circular (radius) or elliptical (radiusX/radiusY). Center defaults to the cursor but can be set explicitly. Pen ends at the arc endpoint, not the center (TikZ `arc[start angle=…, end angle=…, radius=…]`)."),
85
85
  startAngle: z.number().describe("Arc start angle in degrees, measured from +x axis. 0° = +x, 90° = +y = screen-down (visual clockwise under screen y-down); matches polar / Node label angle convention."),
86
86
  endAngle: z.number().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
87
- radius: z.number().positive().describe("Arc radius in user units"),
87
+ radius: z.number().positive().optional().describe("Circular arc radius in user units. Give EITHER radius (circular) OR both radiusX and radiusY (elliptical), never both — enforced by the sugar/compile layer, not schema."),
88
+ radiusX: z.number().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
89
+ radiusY: z.number().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
90
+ center: TargetSchema.optional().describe("Explicit arc center. Defaults to the cursor (previous step anchor) for backward compatibility; set it to anchor the arc independently of the cursor (used by <Sector> to draw a correct wedge)."),
88
91
  label: StepLabelSchema.optional().describe("Edge label attached to this arc")
89
- }).describe("Arc action: TikZ-style arc with implicit center at the cursor; startAngle / endAngle / radius give the geometry. Pen is left at the arc endpoint.");
92
+ }).describe("Arc action: circular (radius) or elliptical (radiusX/radiusY) arc around a center (cursor by default, or explicit). Pen is left at the arc endpoint.");
90
93
  var CirclePathStepSchema = z.object({
91
94
  type: z.literal("step").describe("Discriminator marking this as a path step node"),
92
- kind: z.literal("circlePath").describe("Full circle centered at the cursor with given radius (TikZ `circle[radius=…]`); compiled to a single full-sweep ellipse arc command. Pen returns to the center."),
95
+ kind: z.literal("circlePath").describe("Circle centered at the cursor. Without angles: a full circle (TikZ `circle[radius=…]`), pen returns to center. With startAngle + endAngle: a partial arc closed per `closed` (half circle / segment)."),
93
96
  radius: z.number().positive().describe("Circle radius in user units"),
94
- label: StepLabelSchema.optional().describe("Edge label attached to this full circle")
95
- }).describe("CirclePath action: full closed circle around the cursor as center; pen returns to center after.");
97
+ startAngle: z.number().optional().describe("Partial-circle start angle in degrees (same convention as arc: 0°=+x, 90°=+y screen-down). Give both startAngle and endAngle for a partial circle, or neither for a full circle (enforced by the sugar/compile layer, not schema)."),
98
+ endAngle: z.number().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
99
+ closed: z.enum([
100
+ "closed",
101
+ "chord",
102
+ "open"
103
+ ]).optional().describe("Closing mode. 'closed' = full circle (only valid with no angles; the default then). With angles: 'chord' (straight chord between the two arc ends → half circle / segment; default) or 'open' (pure unclosed arc)."),
104
+ label: StepLabelSchema.optional().describe("Edge label attached to this circle")
105
+ }).describe("CirclePath action: full circle (no angles, pen returns to center) or partial arc (with angles, closed per chord/open).");
96
106
  var EllipsePathStepSchema = z.object({
97
107
  type: z.literal("step").describe("Discriminator marking this as a path step node"),
98
- kind: z.literal("ellipsePath").describe("Full ellipse centered at the cursor with given x/y radii (TikZ `ellipse[x radius=…, y radius=…]`); compiled to a single full-sweep ellipse arc command. Pen returns to the center."),
108
+ kind: z.literal("ellipsePath").describe("Ellipse centered at the cursor. Without angles: a full ellipse (TikZ `ellipse[x radius=…, y radius=…]`), pen returns to center. With startAngle + endAngle: a partial elliptical arc closed per `closed`."),
99
109
  radiusX: z.number().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
100
110
  radiusY: z.number().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
101
- label: StepLabelSchema.optional().describe("Edge label attached to this full ellipse")
102
- }).describe("EllipsePath action: full closed ellipse around the cursor; pen returns to center.");
111
+ startAngle: z.number().optional().describe("Partial-ellipse start angle in degrees (parametric, same convention as arc). Give both startAngle and endAngle for a partial ellipse, or neither for a full ellipse."),
112
+ endAngle: z.number().optional().describe("Partial-ellipse end angle in degrees."),
113
+ closed: z.enum([
114
+ "closed",
115
+ "chord",
116
+ "open"
117
+ ]).optional().describe("Closing mode. 'closed' = full ellipse (only valid with no angles; default then). With angles: 'chord' (chord between arc ends; default) or 'open' (pure unclosed arc)."),
118
+ label: StepLabelSchema.optional().describe("Edge label attached to this ellipse")
119
+ }).describe("EllipsePath action: full ellipse (no angles, pen returns to center) or partial elliptical arc (with angles, closed per chord/open).");
120
+ var RectangleStepSchema = z.object({
121
+ type: z.literal("step").describe("Discriminator marking this as a path step node"),
122
+ kind: z.literal("rectangle").describe("Axis-aligned rectangle between two opposite corners (TikZ `(a) rectangle (b)`); compiled to path commands (4 lines + close, or rounded corners via quarter arcs). Self-contained: corners come from from/to, not the cursor."),
123
+ from: TargetSchema.describe("One corner of the rectangle"),
124
+ to: TargetSchema.describe("The opposite corner; order is irrelevant (compile normalizes to min/max)"),
125
+ roundedCorners: z.number().nonnegative().optional().describe("Single corner radius applied to all four corners; omitted = sharp corners. Clamped to half the smaller side at compile time.")
126
+ }).describe("Rectangle action: closed axis-aligned rectangle (optionally rounded) drawn between two opposite corners.");
103
127
  var StepSchema = z.discriminatedUnion("kind", [
104
128
  MoveStepSchema,
105
129
  LineStepSchema,
@@ -110,7 +134,8 @@ var StepSchema = z.discriminatedUnion("kind", [
110
134
  BendStepSchema,
111
135
  ArcStepSchema,
112
136
  CirclePathStepSchema,
113
- EllipsePathStepSchema
137
+ EllipsePathStepSchema,
138
+ RectangleStepSchema
114
139
  ]).describe("A single path action; the discriminator field is `kind`");
115
140
  //#endregion
116
- export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, LineStepSchema, MoveStepSchema, StepLabelSchema, StepSchema };
141
+ export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, LineStepSchema, MoveStepSchema, RectangleStepSchema, StepLabelSchema, StepSchema };
@@ -1,4 +1,47 @@
1
1
  import { z } from 'zod';
2
+ import { RectAnchor } from '../../geometry/rect';
3
+ export declare const AnchorRefSchema: z.ZodUnion<[z.ZodEnum<[RectAnchor, ...RectAnchor[]]>, z.ZodNumber, z.ZodObject<{
4
+ side: z.ZodEnum<["north", "south", "east", "west"]>;
5
+ t: z.ZodNumber;
6
+ }, "strip", z.ZodTypeAny, {
7
+ side: "north" | "south" | "east" | "west";
8
+ t: number;
9
+ }, {
10
+ side: "north" | "south" | "east" | "west";
11
+ t: number;
12
+ }>]>;
13
+ export declare const NodeTargetSchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ anchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<[RectAnchor, ...RectAnchor[]]>, z.ZodNumber, z.ZodObject<{
16
+ side: z.ZodEnum<["north", "south", "east", "west"]>;
17
+ t: z.ZodNumber;
18
+ }, "strip", z.ZodTypeAny, {
19
+ side: "north" | "south" | "east" | "west";
20
+ t: number;
21
+ }, {
22
+ side: "north" | "south" | "east" | "west";
23
+ t: number;
24
+ }>]>>;
25
+ offset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ id: string;
28
+ offset?: [number, number] | undefined;
29
+ anchor?: number | RectAnchor | {
30
+ side: "north" | "south" | "east" | "west";
31
+ t: number;
32
+ } | undefined;
33
+ }, {
34
+ id: string;
35
+ offset?: [number, number] | undefined;
36
+ anchor?: number | RectAnchor | {
37
+ side: "north" | "south" | "east" | "west";
38
+ t: number;
39
+ } | undefined;
40
+ }>;
41
+ /** anchor 引用:命名 anchor / 角度 / 边上比例点 */
42
+ export type IRAnchorRef = z.infer<typeof AnchorRefSchema>;
43
+ /** 节点 / Coordinate 引用对象:{ id, anchor?, offset? } */
44
+ export type IRNodeTarget = z.infer<typeof NodeTargetSchema>;
2
45
  export declare const RelativeTargetSchema: z.ZodObject<{
3
46
  relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
4
47
  }, "strip", z.ZodTypeAny, {
@@ -13,7 +56,34 @@ export declare const RelativeAccumulateTargetSchema: z.ZodObject<{
13
56
  }, {
14
57
  relativeAccumulate: [number, number];
15
58
  }>;
16
- export declare const TargetSchema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
59
+ export declare const TargetSchema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodObject<{
60
+ id: z.ZodString;
61
+ anchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<[RectAnchor, ...RectAnchor[]]>, z.ZodNumber, z.ZodObject<{
62
+ side: z.ZodEnum<["north", "south", "east", "west"]>;
63
+ t: z.ZodNumber;
64
+ }, "strip", z.ZodTypeAny, {
65
+ side: "north" | "south" | "east" | "west";
66
+ t: number;
67
+ }, {
68
+ side: "north" | "south" | "east" | "west";
69
+ t: number;
70
+ }>]>>;
71
+ offset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ id: string;
74
+ offset?: [number, number] | undefined;
75
+ anchor?: number | RectAnchor | {
76
+ side: "north" | "south" | "east" | "west";
77
+ t: number;
78
+ } | undefined;
79
+ }, {
80
+ id: string;
81
+ offset?: [number, number] | undefined;
82
+ anchor?: number | RectAnchor | {
83
+ side: "north" | "south" | "east" | "west";
84
+ t: number;
85
+ } | undefined;
86
+ }>, z.ZodObject<{
17
87
  relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
18
88
  }, "strip", z.ZodTypeAny, {
19
89
  relative: [number, number];
@@ -1 +1 @@
1
- {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;;;EAQ9B,CAAC;AAEJ,eAAO,MAAM,8BAA8B;;;;;;EAQxC,CAAC;AAEJ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;IAWtB,CAAC;AAEJ,4CAA4C;AAC5C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEpD,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE,2CAA2C;AAC3C,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
1
+ {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMpE,eAAO,MAAM,eAAe;;;;;;;;;IAiBsF,CAAC;AAEnH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASmE,CAAC;AAEjG,uCAAuC;AACvC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,oDAAoD;AACpD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;EAQ9B,CAAC;AAEJ,eAAO,MAAM,8BAA8B;;;;;;EAQxC,CAAC;AAEJ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWtB,CAAC;AAEJ,4CAA4C;AAC5C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEpD,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE,2CAA2C;AAC3C,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -1,17 +1,38 @@
1
1
  import { PositionSchema } from "../position/position.js";
2
2
  import { PolarPositionSchema } from "../position/polar-position.js";
3
3
  import { OffsetPositionSchema } from "../position/offset-position.js";
4
+ import { RECT_ANCHORS } from "../../geometry/rect.js";
4
5
  import { z } from "zod";
5
6
  //#region src/ir/path/target.ts
7
+ /** 9 个命名 anchor(复用 geometry/rect.ts,避免两套常量) */
8
+ var NAMED_ANCHORS = Object.values(RECT_ANCHORS);
9
+ var AnchorRefSchema = z.union([
10
+ z.enum(NAMED_ANCHORS).describe("Named anchor (center / north / ... / south-west)"),
11
+ z.number().finite().describe("Angle anchor in degrees (boundary point in that direction)"),
12
+ z.object({
13
+ side: z.enum([
14
+ "north",
15
+ "south",
16
+ "east",
17
+ "west"
18
+ ]).describe("Which edge of the shape boundary"),
19
+ t: z.number().min(0).max(1).describe("Proportion along the edge (0..1); direction north/south = west→east, east/west = north→south")
20
+ }).describe("Proportional point on the real shape boundary edge")
21
+ ]).describe("Anchor reference: named anchor, angle in degrees, or proportional point { side, t } on the boundary");
22
+ var NodeTargetSchema = z.object({
23
+ id: z.string().min(1).describe("Referenced Node/Coordinate id"),
24
+ anchor: AnchorRefSchema.optional().describe("Optional anchor; omitted = auto clip to boundary"),
25
+ offset: z.tuple([z.number().finite(), z.number().finite()]).optional().describe("Optional world-space 2D offset added after the anchor/edge point is resolved")
26
+ }).describe("Reference to a Node/Coordinate by id, with optional anchor and world-space offset");
6
27
  var RelativeTargetSchema = z.object({ relative: z.tuple([z.number(), z.number()]).describe("Relative offset (dx, dy)") }).describe("Relative offset from the previous step end point (does NOT update the cursor position; matches TikZ `(+x, +y)` syntax)");
7
28
  var RelativeAccumulateTargetSchema = z.object({ relativeAccumulate: z.tuple([z.number(), z.number()]).describe("Accumulated relative offset (dx, dy)") }).describe("Accumulated relative offset from the previous step end point (DOES update the cursor; matches TikZ `(++x, ++y)` syntax)");
8
29
  var TargetSchema = z.union([
9
30
  PositionSchema,
10
31
  PolarPositionSchema,
11
- z.string().min(1),
32
+ NodeTargetSchema,
12
33
  RelativeTargetSchema,
13
34
  RelativeAccumulateTargetSchema,
14
35
  OffsetPositionSchema
15
- ]).describe("Path endpoint: Cartesian [x, y], polar position, node id reference, relative offset object ({ relative } / { relativeAccumulate }), or offset position ({ of, offset } mirroring TikZ `calc`) resolved at compile time");
36
+ ]).describe("Path endpoint: Cartesian [x, y], polar position, node target object ({ id, anchor?, offset? }), relative offset object ({ relative } / { relativeAccumulate }), or offset position ({ of, offset } mirroring TikZ `calc`) resolved at compile time. Node id string shorthand is React DSL only (parsed to a node target object before reaching the IR).");
16
37
  //#endregion
17
- export { RelativeAccumulateTargetSchema, RelativeTargetSchema, TargetSchema };
38
+ export { AnchorRefSchema, NodeTargetSchema, RelativeAccumulateTargetSchema, RelativeTargetSchema, TargetSchema };