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

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 (171) hide show
  1. package/dist/es/arrows/index.d.ts +13 -0
  2. package/dist/es/arrows/index.d.ts.map +1 -0
  3. package/dist/es/arrows/index.js +118 -0
  4. package/dist/es/arrows/types.d.ts +43 -0
  5. package/dist/es/arrows/types.d.ts.map +1 -0
  6. package/dist/es/compile/compile.d.ts +26 -1
  7. package/dist/es/compile/compile.d.ts.map +1 -1
  8. package/dist/es/compile/compile.js +37 -4
  9. package/dist/es/compile/marker-prim.d.ts +22 -0
  10. package/dist/es/compile/marker-prim.d.ts.map +1 -0
  11. package/dist/es/compile/marker-prim.js +63 -0
  12. package/dist/es/compile/node.d.ts +19 -4
  13. package/dist/es/compile/node.d.ts.map +1 -1
  14. package/dist/es/compile/node.js +159 -29
  15. package/dist/es/compile/paint.d.ts +21 -0
  16. package/dist/es/compile/paint.d.ts.map +1 -0
  17. package/dist/es/compile/paint.js +94 -0
  18. package/dist/es/compile/path/index.d.ts +18 -0
  19. package/dist/es/compile/path/index.d.ts.map +1 -1
  20. package/dist/es/compile/path/index.js +260 -11
  21. package/dist/es/compile/path/relative.d.ts.map +1 -1
  22. package/dist/es/compile/path/relative.js +8 -0
  23. package/dist/es/compile/path/shrink.d.ts +19 -6
  24. package/dist/es/compile/path/shrink.d.ts.map +1 -1
  25. package/dist/es/compile/path/shrink.js +147 -25
  26. package/dist/es/geometry/bend.d.ts +7 -0
  27. package/dist/es/geometry/bend.d.ts.map +1 -1
  28. package/dist/es/geometry/bend.js +26 -1
  29. package/dist/es/index.d.ts +14 -4
  30. package/dist/es/index.d.ts.map +1 -1
  31. package/dist/es/index.js +7 -2
  32. package/dist/es/ir/index.d.ts +2 -0
  33. package/dist/es/ir/index.d.ts.map +1 -1
  34. package/dist/es/ir/json.d.ts +22 -0
  35. package/dist/es/ir/json.d.ts.map +1 -0
  36. package/dist/es/ir/json.js +25 -0
  37. package/dist/es/ir/node.d.ts +262 -9
  38. package/dist/es/ir/node.d.ts.map +1 -1
  39. package/dist/es/ir/node.js +9 -2
  40. package/dist/es/ir/paint.d.ts +154 -0
  41. package/dist/es/ir/paint.d.ts.map +1 -0
  42. package/dist/es/ir/paint.js +59 -0
  43. package/dist/es/ir/path/arrow.d.ts +52 -72
  44. package/dist/es/ir/path/arrow.d.ts.map +1 -1
  45. package/dist/es/ir/path/arrow.js +5 -5
  46. package/dist/es/ir/path/path.d.ts +637 -87
  47. package/dist/es/ir/path/path.d.ts.map +1 -1
  48. package/dist/es/ir/path/path.js +23 -2
  49. package/dist/es/ir/path/step.d.ts +363 -8
  50. package/dist/es/ir/path/step.d.ts.map +1 -1
  51. package/dist/es/ir/path/step.js +17 -4
  52. package/dist/es/ir/scope.d.ts +1874 -338
  53. package/dist/es/ir/scope.d.ts.map +1 -1
  54. package/dist/es/ir/scope.js +2 -1
  55. package/dist/es/pathGenerators/define.d.ts +16 -0
  56. package/dist/es/pathGenerators/define.d.ts.map +1 -0
  57. package/dist/es/pathGenerators/define.js +23 -0
  58. package/dist/es/pathGenerators/index.d.ts +9 -0
  59. package/dist/es/pathGenerators/index.d.ts.map +1 -0
  60. package/dist/es/pathGenerators/types.d.ts +45 -0
  61. package/dist/es/pathGenerators/types.d.ts.map +1 -0
  62. package/dist/es/patterns/index.d.ts +10 -0
  63. package/dist/es/patterns/index.d.ts.map +1 -0
  64. package/dist/es/patterns/index.js +83 -0
  65. package/dist/es/patterns/types.d.ts +38 -0
  66. package/dist/es/patterns/types.d.ts.map +1 -0
  67. package/dist/es/primitive/ellipse.d.ts +3 -5
  68. package/dist/es/primitive/ellipse.d.ts.map +1 -1
  69. package/dist/es/primitive/index.d.ts +1 -0
  70. package/dist/es/primitive/index.d.ts.map +1 -1
  71. package/dist/es/primitive/marker.d.ts +160 -0
  72. package/dist/es/primitive/marker.d.ts.map +1 -0
  73. package/dist/es/primitive/paint.d.ts +46 -0
  74. package/dist/es/primitive/paint.d.ts.map +1 -0
  75. package/dist/es/primitive/path.d.ts +25 -20
  76. package/dist/es/primitive/path.d.ts.map +1 -1
  77. package/dist/es/primitive/rect.d.ts +3 -2
  78. package/dist/es/primitive/rect.d.ts.map +1 -1
  79. package/dist/es/primitive/scene.d.ts +4 -0
  80. package/dist/es/primitive/scene.d.ts.map +1 -1
  81. package/dist/es/shapes/types.d.ts +2 -2
  82. package/dist/es/shapes/types.d.ts.map +1 -1
  83. package/dist/lib/arrows/index.cjs +118 -0
  84. package/dist/lib/arrows/index.d.ts +13 -0
  85. package/dist/lib/arrows/index.d.ts.map +1 -0
  86. package/dist/lib/arrows/types.d.ts +43 -0
  87. package/dist/lib/arrows/types.d.ts.map +1 -0
  88. package/dist/lib/compile/compile.cjs +38 -5
  89. package/dist/lib/compile/compile.d.ts +26 -1
  90. package/dist/lib/compile/compile.d.ts.map +1 -1
  91. package/dist/lib/compile/marker-prim.cjs +63 -0
  92. package/dist/lib/compile/marker-prim.d.ts +22 -0
  93. package/dist/lib/compile/marker-prim.d.ts.map +1 -0
  94. package/dist/lib/compile/node.cjs +159 -28
  95. package/dist/lib/compile/node.d.ts +19 -4
  96. package/dist/lib/compile/node.d.ts.map +1 -1
  97. package/dist/lib/compile/paint.cjs +94 -0
  98. package/dist/lib/compile/paint.d.ts +21 -0
  99. package/dist/lib/compile/paint.d.ts.map +1 -0
  100. package/dist/lib/compile/path/index.cjs +258 -9
  101. package/dist/lib/compile/path/index.d.ts +18 -0
  102. package/dist/lib/compile/path/index.d.ts.map +1 -1
  103. package/dist/lib/compile/path/relative.cjs +8 -0
  104. package/dist/lib/compile/path/relative.d.ts.map +1 -1
  105. package/dist/lib/compile/path/shrink.cjs +147 -25
  106. package/dist/lib/compile/path/shrink.d.ts +19 -6
  107. package/dist/lib/compile/path/shrink.d.ts.map +1 -1
  108. package/dist/lib/geometry/bend.cjs +26 -0
  109. package/dist/lib/geometry/bend.d.ts +7 -0
  110. package/dist/lib/geometry/bend.d.ts.map +1 -1
  111. package/dist/lib/index.cjs +14 -0
  112. package/dist/lib/index.d.ts +14 -4
  113. package/dist/lib/index.d.ts.map +1 -1
  114. package/dist/lib/ir/index.d.ts +2 -0
  115. package/dist/lib/ir/index.d.ts.map +1 -1
  116. package/dist/lib/ir/json.cjs +26 -0
  117. package/dist/lib/ir/json.d.ts +22 -0
  118. package/dist/lib/ir/json.d.ts.map +1 -0
  119. package/dist/lib/ir/node.cjs +9 -2
  120. package/dist/lib/ir/node.d.ts +262 -9
  121. package/dist/lib/ir/node.d.ts.map +1 -1
  122. package/dist/lib/ir/paint.cjs +61 -0
  123. package/dist/lib/ir/paint.d.ts +154 -0
  124. package/dist/lib/ir/paint.d.ts.map +1 -0
  125. package/dist/lib/ir/path/arrow.cjs +5 -5
  126. package/dist/lib/ir/path/arrow.d.ts +52 -72
  127. package/dist/lib/ir/path/arrow.d.ts.map +1 -1
  128. package/dist/lib/ir/path/path.cjs +22 -1
  129. package/dist/lib/ir/path/path.d.ts +637 -87
  130. package/dist/lib/ir/path/path.d.ts.map +1 -1
  131. package/dist/lib/ir/path/step.cjs +17 -3
  132. package/dist/lib/ir/path/step.d.ts +363 -8
  133. package/dist/lib/ir/path/step.d.ts.map +1 -1
  134. package/dist/lib/ir/scope.cjs +2 -1
  135. package/dist/lib/ir/scope.d.ts +1874 -338
  136. package/dist/lib/ir/scope.d.ts.map +1 -1
  137. package/dist/lib/pathGenerators/define.cjs +23 -0
  138. package/dist/lib/pathGenerators/define.d.ts +16 -0
  139. package/dist/lib/pathGenerators/define.d.ts.map +1 -0
  140. package/dist/lib/pathGenerators/index.d.ts +9 -0
  141. package/dist/lib/pathGenerators/index.d.ts.map +1 -0
  142. package/dist/lib/pathGenerators/types.d.ts +45 -0
  143. package/dist/lib/pathGenerators/types.d.ts.map +1 -0
  144. package/dist/lib/patterns/index.cjs +83 -0
  145. package/dist/lib/patterns/index.d.ts +10 -0
  146. package/dist/lib/patterns/index.d.ts.map +1 -0
  147. package/dist/lib/patterns/types.d.ts +38 -0
  148. package/dist/lib/patterns/types.d.ts.map +1 -0
  149. package/dist/lib/primitive/ellipse.d.ts +3 -5
  150. package/dist/lib/primitive/ellipse.d.ts.map +1 -1
  151. package/dist/lib/primitive/index.d.ts +1 -0
  152. package/dist/lib/primitive/index.d.ts.map +1 -1
  153. package/dist/lib/primitive/marker.d.ts +160 -0
  154. package/dist/lib/primitive/marker.d.ts.map +1 -0
  155. package/dist/lib/primitive/paint.d.ts +46 -0
  156. package/dist/lib/primitive/paint.d.ts.map +1 -0
  157. package/dist/lib/primitive/path.d.ts +25 -20
  158. package/dist/lib/primitive/path.d.ts.map +1 -1
  159. package/dist/lib/primitive/rect.d.ts +3 -2
  160. package/dist/lib/primitive/rect.d.ts.map +1 -1
  161. package/dist/lib/primitive/scene.d.ts +4 -0
  162. package/dist/lib/primitive/scene.d.ts.map +1 -1
  163. package/dist/lib/shapes/types.d.ts +2 -2
  164. package/dist/lib/shapes/types.d.ts.map +1 -1
  165. package/package.json +1 -1
  166. package/dist/es/compile/path/arrow-geometry.d.ts +0 -22
  167. package/dist/es/compile/path/arrow-geometry.d.ts.map +0 -1
  168. package/dist/es/compile/path/arrow-geometry.js +0 -40
  169. package/dist/lib/compile/path/arrow-geometry.cjs +0 -41
  170. package/dist/lib/compile/path/arrow-geometry.d.ts +0 -22
  171. package/dist/lib/compile/path/arrow-geometry.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6IpB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -1,7 +1,22 @@
1
- import { ArrowDetailSchema } from "./arrow.js";
1
+ import { PaintSpecSchema } from "../paint.js";
2
+ import { ArrowDetailSchema, ArrowEndDetailSchema } from "./arrow.js";
2
3
  import { StepSchema } from "./step.js";
3
4
  import { z } from "zod";
4
5
  //#region src/ir/path/path.ts
6
+ /**
7
+ * 路径整条缩放 schema:等比 number 或非等比 {x,y}
8
+ * @description 与 Node scale 字段对齐;number = 等比,{x,y} = 各轴独立。全部要求有限正数。
9
+ */
10
+ var PathScaleSchema = z.union([z.number().finite().positive(), z.object({
11
+ x: z.number().finite().positive().describe("Scale factor on the x axis (finite, positive)."),
12
+ y: z.number().finite().positive().describe("Scale factor on the y axis (finite, positive).")
13
+ }).describe("Anisotropic scale with independent x / y factors.")]).describe("Whole-path scale: a single finite positive number for uniform scaling, or an { x, y } object for anisotropic scaling. Applied around the path bounding-box center together with rotate.");
14
+ /**
15
+ * 路径中段标记 schema(首批仅箭头)
16
+ * @description `kind:'arrow'` 判别符 + 复用 ArrowEndDetail 视觉子集(shape / scale / length / width / color / fill / opacity / lineWidth);
17
+ * 方向由该处路径切线决定,shape 是已注册箭头名(不是 `->` 方向记号)。后续可扩展更多 mark kind。
18
+ */
19
+ var ArrowMarkSchema = ArrowEndDetailSchema.extend({ kind: z.literal("arrow").describe("Discriminator marking this mark as an arrow tip. Only `arrow` is supported in the first batch; other kinds are rejected by schema.") }).describe("Arrow mark placed along the path: an arrow tip whose direction follows the path tangent at the mark position. Reuses the per-end arrow visual subset (shape / scale / length / width / color / fill / opacity / lineWidth); `shape` is a registered arrow name, NOT a `->` direction token.");
5
20
  var PathSchema = z.object({
6
21
  type: z.literal("path").describe("Discriminator marking this child as a path"),
7
22
  color: z.string().optional().describe("Master color (TikZ `color=`). When set, the stroke, arrow tips, and step labels default to it unless individually overridden. Following the master color (not the stroke) is how a colored line shares its color with its labels and arrows — `stroke=` alone only paints the line."),
@@ -15,7 +30,7 @@ var PathSchema = z.object({
15
30
  "<->"
16
31
  ]).optional().describe("Path-level arrow direction. omitted/`none` = no arrows; `->` = arrow at end; `<-` = at start; `<->` = both."),
17
32
  arrowDetail: ArrowDetailSchema.optional().describe("Detailed arrow visual config (shape / scale / length / width / color / fill / opacity / lineWidth) with optional `start` / `end` per-end overrides. Omitted = built-in defaults (shape `stealth`, all visuals inherit from path stroke / opacity)."),
18
- fill: z.string().optional().describe("Fill color of the closed region; any CSS color. Omitted = no fill (stroke only). Pairs with `cycle` step for filled shapes."),
33
+ fill: z.union([z.string(), PaintSpecSchema]).optional().describe("Fill of the closed region: any CSS color string, or a PaintSpec (linear / radial gradient, pattern, or image). Omitted = no fill (stroke only). Pairs with `cycle` step for filled shapes."),
19
34
  fillRule: z.enum(["nonzero", "evenodd"]).optional().describe("How self-intersecting / nested sub-paths are filled. `nonzero` (default) winds-by-direction; `evenodd` toggles fill on each crossing — useful for ring / donut shapes."),
20
35
  lineCap: z.enum([
21
36
  "butt",
@@ -40,6 +55,12 @@ var PathSchema = z.object({
40
55
  fillOpacity: z.number().min(0).max(1).optional().describe("Fill opacity 0..1; affects only the closed-region fill."),
41
56
  drawOpacity: z.number().min(0).max(1).optional().describe("Stroke opacity 0..1 (TikZ `draw opacity`); affects only the path stroke."),
42
57
  zIndex: z.number().int().finite().optional().describe("Explicit stacking order among sibling IR children. Higher draws on top. Omitted = 0 = source order. Sorting is stable: same zIndex keeps source order. Scoped per group (a path inside a scope only restacks within that scope)."),
58
+ rotate: z.number().finite().optional().describe("Rotate the whole path by this many degrees about its bounding-box center (positive = visually clockwise under screen y-down). Equivalent to wrapping the path in a Scope with a rotate transform centered on the path. Endpoints are resolved in the current scope first; the rotation wraps the resulting geometry."),
59
+ scale: PathScaleSchema.optional().describe("Scale the whole path about its bounding-box center: a finite positive number (uniform) or { x, y } (anisotropic). Applied together with rotate around the same center."),
60
+ marks: z.array(z.object({
61
+ pos: z.number().min(0).max(1).describe("Normalized position along the path in [0, 1] (0 = start, 1 = end). Values outside [0, 1] are rejected by schema. The geometric meaning of the parameter matches step labels: arc length for line/step, Bezier parameter for curve/cubic/bend."),
62
+ mark: ArrowMarkSchema.describe("The mark to place at this position; currently an arrow tip oriented by the path tangent.")
63
+ })).optional().describe("Marks placed along the path at normalized positions; each is rendered at its position with its direction taken from the path tangent there. First batch supports arrow marks only."),
43
64
  children: z.array(StepSchema).min(2).describe("Sequence of step actions defining the path; the first should usually be a `move`")
44
65
  }).describe("A drawn path composed of a sequence of step actions (move / line / ...)");
45
66
  //#endregion
@@ -870,8 +870,11 @@ export declare const BendStepSchema: z.ZodObject<{
870
870
  of: string | [number, number] | import('..').PolarPosition;
871
871
  offset: [number, number];
872
872
  }>]>;
873
- bendDirection: z.ZodEnum<["left", "right"]>;
873
+ bendDirection: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
874
874
  bendAngle: z.ZodOptional<z.ZodNumber>;
875
+ outAngle: z.ZodOptional<z.ZodNumber>;
876
+ inAngle: z.ZodOptional<z.ZodNumber>;
877
+ looseness: z.ZodOptional<z.ZodNumber>;
875
878
  label: z.ZodOptional<z.ZodObject<{
876
879
  text: z.ZodString;
877
880
  position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
@@ -937,7 +940,6 @@ export declare const BendStepSchema: z.ZodObject<{
937
940
  relativeAccumulate: [number, number];
938
941
  };
939
942
  kind: "bend";
940
- bendDirection: "left" | "right";
941
943
  label?: {
942
944
  text: string;
943
945
  opacity?: number | undefined;
@@ -951,7 +953,11 @@ export declare const BendStepSchema: z.ZodObject<{
951
953
  position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
952
954
  textColor?: string | undefined;
953
955
  } | undefined;
956
+ bendDirection?: "left" | "right" | undefined;
954
957
  bendAngle?: number | undefined;
958
+ outAngle?: number | undefined;
959
+ inAngle?: number | undefined;
960
+ looseness?: number | undefined;
955
961
  }, {
956
962
  type: "step";
957
963
  to: [number, number] | import('..').PolarPosition | {
@@ -970,7 +976,6 @@ export declare const BendStepSchema: z.ZodObject<{
970
976
  relativeAccumulate: [number, number];
971
977
  };
972
978
  kind: "bend";
973
- bendDirection: "left" | "right";
974
979
  label?: {
975
980
  text: string;
976
981
  opacity?: number | undefined;
@@ -984,7 +989,11 @@ export declare const BendStepSchema: z.ZodObject<{
984
989
  position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
985
990
  textColor?: string | undefined;
986
991
  } | undefined;
992
+ bendDirection?: "left" | "right" | undefined;
987
993
  bendAngle?: number | undefined;
994
+ outAngle?: number | undefined;
995
+ inAngle?: number | undefined;
996
+ looseness?: number | undefined;
988
997
  }>;
989
998
  export declare const ArcStepSchema: z.ZodObject<{
990
999
  type: z.ZodLiteral<"step">;
@@ -1527,6 +1536,174 @@ export declare const RectangleStepSchema: z.ZodObject<{
1527
1536
  };
1528
1537
  roundedCorners?: number | undefined;
1529
1538
  }>;
1539
+ export declare const GeneratorStepSchema: z.ZodObject<{
1540
+ type: z.ZodLiteral<"step">;
1541
+ kind: z.ZodLiteral<"generator">;
1542
+ name: z.ZodString;
1543
+ to: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodObject<{
1544
+ id: z.ZodString;
1545
+ anchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<[import('../..').RectAnchor, ...import('../..').RectAnchor[]]>, z.ZodNumber, z.ZodObject<{
1546
+ side: z.ZodEnum<["north", "south", "east", "west"]>;
1547
+ t: z.ZodNumber;
1548
+ }, "strip", z.ZodTypeAny, {
1549
+ side: "north" | "south" | "east" | "west";
1550
+ t: number;
1551
+ }, {
1552
+ side: "north" | "south" | "east" | "west";
1553
+ t: number;
1554
+ }>]>>;
1555
+ offset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ id: string;
1558
+ offset?: [number, number] | undefined;
1559
+ anchor?: number | import('../..').RectAnchor | {
1560
+ side: "north" | "south" | "east" | "west";
1561
+ t: number;
1562
+ } | undefined;
1563
+ }, {
1564
+ id: string;
1565
+ offset?: [number, number] | undefined;
1566
+ anchor?: number | import('../..').RectAnchor | {
1567
+ side: "north" | "south" | "east" | "west";
1568
+ t: number;
1569
+ } | undefined;
1570
+ }>, z.ZodObject<{
1571
+ relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
1572
+ }, "strip", z.ZodTypeAny, {
1573
+ relative: [number, number];
1574
+ }, {
1575
+ relative: [number, number];
1576
+ }>, z.ZodObject<{
1577
+ relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
1578
+ }, "strip", z.ZodTypeAny, {
1579
+ relativeAccumulate: [number, number];
1580
+ }, {
1581
+ relativeAccumulate: [number, number];
1582
+ }>, z.ZodObject<{
1583
+ of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
1584
+ offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
1585
+ }, "strip", z.ZodTypeAny, {
1586
+ of: string | [number, number] | import('..').PolarPosition;
1587
+ offset: [number, number];
1588
+ }, {
1589
+ of: string | [number, number] | import('..').PolarPosition;
1590
+ offset: [number, number];
1591
+ }>]>>;
1592
+ params: z.ZodRecord<z.ZodString, z.ZodType<import('..').JsonValue, z.ZodTypeDef, import('..').JsonValue>>;
1593
+ label: z.ZodOptional<z.ZodObject<{
1594
+ text: z.ZodString;
1595
+ position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
1596
+ side: z.ZodOptional<z.ZodEnum<["above", "below", "left", "right", "sloped"]>>;
1597
+ textColor: z.ZodOptional<z.ZodString>;
1598
+ opacity: z.ZodOptional<z.ZodNumber>;
1599
+ font: z.ZodOptional<z.ZodObject<{
1600
+ family: z.ZodOptional<z.ZodString>;
1601
+ size: z.ZodOptional<z.ZodNumber>;
1602
+ weight: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["normal", "bold"]>, z.ZodNumber]>>;
1603
+ style: z.ZodOptional<z.ZodEnum<["normal", "italic", "oblique"]>>;
1604
+ }, "strip", z.ZodTypeAny, {
1605
+ family?: string | undefined;
1606
+ size?: number | undefined;
1607
+ weight?: number | "normal" | "bold" | undefined;
1608
+ style?: "normal" | "italic" | "oblique" | undefined;
1609
+ }, {
1610
+ family?: string | undefined;
1611
+ size?: number | undefined;
1612
+ weight?: number | "normal" | "bold" | undefined;
1613
+ style?: "normal" | "italic" | "oblique" | undefined;
1614
+ }>>;
1615
+ }, "strip", z.ZodTypeAny, {
1616
+ text: string;
1617
+ opacity?: number | undefined;
1618
+ font?: {
1619
+ family?: string | undefined;
1620
+ size?: number | undefined;
1621
+ weight?: number | "normal" | "bold" | undefined;
1622
+ style?: "normal" | "italic" | "oblique" | undefined;
1623
+ } | undefined;
1624
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
1625
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
1626
+ textColor?: string | undefined;
1627
+ }, {
1628
+ text: string;
1629
+ opacity?: number | undefined;
1630
+ font?: {
1631
+ family?: string | undefined;
1632
+ size?: number | undefined;
1633
+ weight?: number | "normal" | "bold" | undefined;
1634
+ style?: "normal" | "italic" | "oblique" | undefined;
1635
+ } | undefined;
1636
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
1637
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
1638
+ textColor?: string | undefined;
1639
+ }>>;
1640
+ }, "strip", z.ZodTypeAny, {
1641
+ params: Record<string, import('..').JsonValue>;
1642
+ type: "step";
1643
+ kind: "generator";
1644
+ name: string;
1645
+ to?: [number, number] | import('..').PolarPosition | {
1646
+ of: string | [number, number] | import('..').PolarPosition;
1647
+ offset: [number, number];
1648
+ } | {
1649
+ id: string;
1650
+ offset?: [number, number] | undefined;
1651
+ anchor?: number | import('../..').RectAnchor | {
1652
+ side: "north" | "south" | "east" | "west";
1653
+ t: number;
1654
+ } | undefined;
1655
+ } | {
1656
+ relative: [number, number];
1657
+ } | {
1658
+ relativeAccumulate: [number, number];
1659
+ } | undefined;
1660
+ label?: {
1661
+ text: string;
1662
+ opacity?: number | undefined;
1663
+ font?: {
1664
+ family?: string | undefined;
1665
+ size?: number | undefined;
1666
+ weight?: number | "normal" | "bold" | undefined;
1667
+ style?: "normal" | "italic" | "oblique" | undefined;
1668
+ } | undefined;
1669
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
1670
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
1671
+ textColor?: string | undefined;
1672
+ } | undefined;
1673
+ }, {
1674
+ params: Record<string, import('..').JsonValue>;
1675
+ type: "step";
1676
+ kind: "generator";
1677
+ name: string;
1678
+ to?: [number, number] | import('..').PolarPosition | {
1679
+ of: string | [number, number] | import('..').PolarPosition;
1680
+ offset: [number, number];
1681
+ } | {
1682
+ id: string;
1683
+ offset?: [number, number] | undefined;
1684
+ anchor?: number | import('../..').RectAnchor | {
1685
+ side: "north" | "south" | "east" | "west";
1686
+ t: number;
1687
+ } | undefined;
1688
+ } | {
1689
+ relative: [number, number];
1690
+ } | {
1691
+ relativeAccumulate: [number, number];
1692
+ } | undefined;
1693
+ label?: {
1694
+ text: string;
1695
+ opacity?: number | undefined;
1696
+ font?: {
1697
+ family?: string | undefined;
1698
+ size?: number | undefined;
1699
+ weight?: number | "normal" | "bold" | undefined;
1700
+ style?: "normal" | "italic" | "oblique" | undefined;
1701
+ } | undefined;
1702
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
1703
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
1704
+ textColor?: string | undefined;
1705
+ } | undefined;
1706
+ }>;
1530
1707
  export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1531
1708
  type: z.ZodLiteral<"step">;
1532
1709
  kind: z.ZodLiteral<"move">;
@@ -2332,8 +2509,11 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2332
2509
  of: string | [number, number] | import('..').PolarPosition;
2333
2510
  offset: [number, number];
2334
2511
  }>]>;
2335
- bendDirection: z.ZodEnum<["left", "right"]>;
2512
+ bendDirection: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
2336
2513
  bendAngle: z.ZodOptional<z.ZodNumber>;
2514
+ outAngle: z.ZodOptional<z.ZodNumber>;
2515
+ inAngle: z.ZodOptional<z.ZodNumber>;
2516
+ looseness: z.ZodOptional<z.ZodNumber>;
2337
2517
  label: z.ZodOptional<z.ZodObject<{
2338
2518
  text: z.ZodString;
2339
2519
  position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
@@ -2399,7 +2579,6 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2399
2579
  relativeAccumulate: [number, number];
2400
2580
  };
2401
2581
  kind: "bend";
2402
- bendDirection: "left" | "right";
2403
2582
  label?: {
2404
2583
  text: string;
2405
2584
  opacity?: number | undefined;
@@ -2413,7 +2592,11 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2413
2592
  position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
2414
2593
  textColor?: string | undefined;
2415
2594
  } | undefined;
2595
+ bendDirection?: "left" | "right" | undefined;
2416
2596
  bendAngle?: number | undefined;
2597
+ outAngle?: number | undefined;
2598
+ inAngle?: number | undefined;
2599
+ looseness?: number | undefined;
2417
2600
  }, {
2418
2601
  type: "step";
2419
2602
  to: [number, number] | import('..').PolarPosition | {
@@ -2432,7 +2615,6 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2432
2615
  relativeAccumulate: [number, number];
2433
2616
  };
2434
2617
  kind: "bend";
2435
- bendDirection: "left" | "right";
2436
2618
  label?: {
2437
2619
  text: string;
2438
2620
  opacity?: number | undefined;
@@ -2446,7 +2628,11 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2446
2628
  position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
2447
2629
  textColor?: string | undefined;
2448
2630
  } | undefined;
2631
+ bendDirection?: "left" | "right" | undefined;
2449
2632
  bendAngle?: number | undefined;
2633
+ outAngle?: number | undefined;
2634
+ inAngle?: number | undefined;
2635
+ looseness?: number | undefined;
2450
2636
  }>, z.ZodObject<{
2451
2637
  type: z.ZodLiteral<"step">;
2452
2638
  kind: z.ZodLiteral<"arc">;
@@ -2984,6 +3170,173 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2984
3170
  relativeAccumulate: [number, number];
2985
3171
  };
2986
3172
  roundedCorners?: number | undefined;
3173
+ }>, z.ZodObject<{
3174
+ type: z.ZodLiteral<"step">;
3175
+ kind: z.ZodLiteral<"generator">;
3176
+ name: z.ZodString;
3177
+ to: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodObject<{
3178
+ id: z.ZodString;
3179
+ anchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<[import('../..').RectAnchor, ...import('../..').RectAnchor[]]>, z.ZodNumber, z.ZodObject<{
3180
+ side: z.ZodEnum<["north", "south", "east", "west"]>;
3181
+ t: z.ZodNumber;
3182
+ }, "strip", z.ZodTypeAny, {
3183
+ side: "north" | "south" | "east" | "west";
3184
+ t: number;
3185
+ }, {
3186
+ side: "north" | "south" | "east" | "west";
3187
+ t: number;
3188
+ }>]>>;
3189
+ offset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
3190
+ }, "strip", z.ZodTypeAny, {
3191
+ id: string;
3192
+ offset?: [number, number] | undefined;
3193
+ anchor?: number | import('../..').RectAnchor | {
3194
+ side: "north" | "south" | "east" | "west";
3195
+ t: number;
3196
+ } | undefined;
3197
+ }, {
3198
+ id: string;
3199
+ offset?: [number, number] | undefined;
3200
+ anchor?: number | import('../..').RectAnchor | {
3201
+ side: "north" | "south" | "east" | "west";
3202
+ t: number;
3203
+ } | undefined;
3204
+ }>, z.ZodObject<{
3205
+ relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
3206
+ }, "strip", z.ZodTypeAny, {
3207
+ relative: [number, number];
3208
+ }, {
3209
+ relative: [number, number];
3210
+ }>, z.ZodObject<{
3211
+ relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
3212
+ }, "strip", z.ZodTypeAny, {
3213
+ relativeAccumulate: [number, number];
3214
+ }, {
3215
+ relativeAccumulate: [number, number];
3216
+ }>, z.ZodObject<{
3217
+ of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
3218
+ offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
3219
+ }, "strip", z.ZodTypeAny, {
3220
+ of: string | [number, number] | import('..').PolarPosition;
3221
+ offset: [number, number];
3222
+ }, {
3223
+ of: string | [number, number] | import('..').PolarPosition;
3224
+ offset: [number, number];
3225
+ }>]>>;
3226
+ params: z.ZodRecord<z.ZodString, z.ZodType<import('..').JsonValue, z.ZodTypeDef, import('..').JsonValue>>;
3227
+ label: z.ZodOptional<z.ZodObject<{
3228
+ text: z.ZodString;
3229
+ position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
3230
+ side: z.ZodOptional<z.ZodEnum<["above", "below", "left", "right", "sloped"]>>;
3231
+ textColor: z.ZodOptional<z.ZodString>;
3232
+ opacity: z.ZodOptional<z.ZodNumber>;
3233
+ font: z.ZodOptional<z.ZodObject<{
3234
+ family: z.ZodOptional<z.ZodString>;
3235
+ size: z.ZodOptional<z.ZodNumber>;
3236
+ weight: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["normal", "bold"]>, z.ZodNumber]>>;
3237
+ style: z.ZodOptional<z.ZodEnum<["normal", "italic", "oblique"]>>;
3238
+ }, "strip", z.ZodTypeAny, {
3239
+ family?: string | undefined;
3240
+ size?: number | undefined;
3241
+ weight?: number | "normal" | "bold" | undefined;
3242
+ style?: "normal" | "italic" | "oblique" | undefined;
3243
+ }, {
3244
+ family?: string | undefined;
3245
+ size?: number | undefined;
3246
+ weight?: number | "normal" | "bold" | undefined;
3247
+ style?: "normal" | "italic" | "oblique" | undefined;
3248
+ }>>;
3249
+ }, "strip", z.ZodTypeAny, {
3250
+ text: string;
3251
+ opacity?: number | undefined;
3252
+ font?: {
3253
+ family?: string | undefined;
3254
+ size?: number | undefined;
3255
+ weight?: number | "normal" | "bold" | undefined;
3256
+ style?: "normal" | "italic" | "oblique" | undefined;
3257
+ } | undefined;
3258
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
3259
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
3260
+ textColor?: string | undefined;
3261
+ }, {
3262
+ text: string;
3263
+ opacity?: number | undefined;
3264
+ font?: {
3265
+ family?: string | undefined;
3266
+ size?: number | undefined;
3267
+ weight?: number | "normal" | "bold" | undefined;
3268
+ style?: "normal" | "italic" | "oblique" | undefined;
3269
+ } | undefined;
3270
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
3271
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
3272
+ textColor?: string | undefined;
3273
+ }>>;
3274
+ }, "strip", z.ZodTypeAny, {
3275
+ params: Record<string, import('..').JsonValue>;
3276
+ type: "step";
3277
+ kind: "generator";
3278
+ name: string;
3279
+ to?: [number, number] | import('..').PolarPosition | {
3280
+ of: string | [number, number] | import('..').PolarPosition;
3281
+ offset: [number, number];
3282
+ } | {
3283
+ id: string;
3284
+ offset?: [number, number] | undefined;
3285
+ anchor?: number | import('../..').RectAnchor | {
3286
+ side: "north" | "south" | "east" | "west";
3287
+ t: number;
3288
+ } | undefined;
3289
+ } | {
3290
+ relative: [number, number];
3291
+ } | {
3292
+ relativeAccumulate: [number, number];
3293
+ } | undefined;
3294
+ label?: {
3295
+ text: string;
3296
+ opacity?: number | undefined;
3297
+ font?: {
3298
+ family?: string | undefined;
3299
+ size?: number | undefined;
3300
+ weight?: number | "normal" | "bold" | undefined;
3301
+ style?: "normal" | "italic" | "oblique" | undefined;
3302
+ } | undefined;
3303
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
3304
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
3305
+ textColor?: string | undefined;
3306
+ } | undefined;
3307
+ }, {
3308
+ params: Record<string, import('..').JsonValue>;
3309
+ type: "step";
3310
+ kind: "generator";
3311
+ name: string;
3312
+ to?: [number, number] | import('..').PolarPosition | {
3313
+ of: string | [number, number] | import('..').PolarPosition;
3314
+ offset: [number, number];
3315
+ } | {
3316
+ id: string;
3317
+ offset?: [number, number] | undefined;
3318
+ anchor?: number | import('../..').RectAnchor | {
3319
+ side: "north" | "south" | "east" | "west";
3320
+ t: number;
3321
+ } | undefined;
3322
+ } | {
3323
+ relative: [number, number];
3324
+ } | {
3325
+ relativeAccumulate: [number, number];
3326
+ } | undefined;
3327
+ label?: {
3328
+ text: string;
3329
+ opacity?: number | undefined;
3330
+ font?: {
3331
+ family?: string | undefined;
3332
+ size?: number | undefined;
3333
+ weight?: number | "normal" | "bold" | undefined;
3334
+ style?: "normal" | "italic" | "oblique" | undefined;
3335
+ } | undefined;
3336
+ side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
3337
+ position?: number | "at-start" | "very-near-start" | "near-start" | "midway" | "near-end" | "very-near-end" | "at-end" | undefined;
3338
+ textColor?: string | undefined;
3339
+ } | undefined;
2987
3340
  }>]>;
2988
3341
  /** Move step:移动游标但不绘制 */
2989
3342
  export type IRMoveStep = z.infer<typeof MoveStepSchema>;
@@ -3007,9 +3360,11 @@ export type IRCirclePathStep = z.infer<typeof CirclePathStepSchema>;
3007
3360
  export type IREllipsePathStep = z.infer<typeof EllipsePathStepSchema>;
3008
3361
  /** Rectangle step:两对角定义的轴对齐矩形(可圆角) */
3009
3362
  export type IRRectangleStep = z.infer<typeof RectangleStepSchema>;
3363
+ /** Generator step:按 name 调注册的 path generator 产 sub-path(params 为 JSON 对象) */
3364
+ export type IRGeneratorStep = z.infer<typeof GeneratorStepSchema>;
3010
3365
  /**
3011
- * 路径上的一个动作(十一种 kind)
3012
- * @description 十一种 kind:move / line / step(折角)/ cycle / curve / cubic / bend / arc / circlePath / ellipsePath / rectangle(矩形);`to` 字段支持 relative / relativeAccumulate 变体;除 move/cycle/rectangle 外可挂 `label?` 边标注
3366
+ * 路径上的一个动作(十二种 kind)
3367
+ * @description 十二种 kind:move / line / step(折角)/ cycle / curve / cubic / bend / arc / circlePath / ellipsePath / rectangle(矩形)/ generator(注册生成器);`to` 字段支持 relative / relativeAccumulate 变体;除 move/cycle/rectangle 外可挂 `label?` 边标注
3013
3368
  */
3014
3369
  export type IRStep = z.infer<typeof StepSchema>;
3015
3370
  //# sourceMappingURL=step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDzB,CAAC;AAEJ,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQyC,CAAC;AAErE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS4C,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,OAAO,cAAc,CAAC,CAAC;AAExD,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,qCAAqC;AACrC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,6BAA6B;AAC7B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,4BAA4B;AAC5B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,oCAAoC;AACpC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,sCAAsC;AACtC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { PositionSchema } from "../position/position.js";
2
2
  import { FontSchema } from "../font.js";
3
+ import { JsonObjectSchema } from "../json.js";
3
4
  import { TargetSchema } from "./target.js";
4
5
  import { z } from "zod";
5
6
  //#region src/ir/path/step.ts
@@ -75,8 +76,11 @@ var BendStepSchema = z.object({
75
76
  type: z.literal("step").describe("Discriminator marking this as a path step node"),
76
77
  kind: z.literal("bend").describe("Arc-like bend from cursor to target by direction + angle (TikZ `to[bend left=N]` / `to[bend right=N]`); compiles to a cubic Bezier approximation"),
77
78
  to: TargetSchema.describe("Destination point of the bend"),
78
- bendDirection: z.enum(["left", "right"]).describe("Bend side relative to from→to direction (visual left vs right of the chord)"),
79
- bendAngle: z.number().optional().describe("Bend angle in degrees; default 30 (matches TikZ `bend left` without explicit angle)"),
79
+ bendDirection: z.enum(["left", "right"]).optional().describe("Bend side relative to from→to direction (visual left vs right of the chord). Optional: provide bendDirection/bendAngle for a symmetric bend, or outAngle/inAngle for an asymmetric curve / self-loop (out/in takes precedence when both are given)."),
80
+ bendAngle: z.number().finite().optional().describe("Bend angle in degrees; default 30 (matches TikZ `bend left` without explicit angle)"),
81
+ outAngle: z.number().finite().optional().describe("Out angle in degrees at the start point (TikZ `out=`). Together with inAngle, compiles to a cubic Bezier whose start control point lies along this direction. When out/in angles are given they take precedence over bendDirection / bendAngle."),
82
+ inAngle: z.number().finite().optional().describe("In angle in degrees at the end point (TikZ `in=`). Together with outAngle, compiles to a cubic Bezier whose end control point lies along this direction."),
83
+ looseness: z.number().finite().positive().optional().describe("Curve looseness factor controlling control-point distance from the endpoints (TikZ `looseness=`); default ~1. Larger values push the control points further out for a slacker curve. Also scales the default self-loop size when from equals to."),
80
84
  label: StepLabelSchema.optional().describe("Edge label attached to this bend segment")
81
85
  }).describe("Bend action: shorthand for an arc-like cubic; control points computed at compile time");
82
86
  var ArcStepSchema = z.object({
@@ -124,6 +128,14 @@ var RectangleStepSchema = z.object({
124
128
  to: TargetSchema.describe("The opposite corner; order is irrelevant (compile normalizes to min/max)"),
125
129
  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
130
  }).describe("Rectangle action: closed axis-aligned rectangle (optionally rounded) drawn between two opposite corners.");
131
+ var GeneratorStepSchema = z.object({
132
+ type: z.literal("step").describe("Discriminator marking this as a path step node"),
133
+ kind: z.literal("generator").describe("Delegate this segment to a registered path generator looked up by `name` in CompileOptions.pathGenerators; the generator turns `from` / `to` / `params` into low-level path commands at compile time"),
134
+ name: z.string().min(1).describe("Registered generator name; resolved against CompileOptions.pathGenerators at compile time. An unregistered name throws at compile time (the error lists the available names). The IR only stores the string; the generator function itself is injected at runtime and never enters the IR."),
135
+ to: TargetSchema.optional().describe("Optional destination point passed to the generator as the segment end; omit for pure parametric curves that need no end target (e.g. a closed loop or a fixed-extent wave)."),
136
+ params: JsonObjectSchema.describe("JSON-only parameter object handed to the generator. Must be a plain JSON object (validated by JsonObjectSchema); the generator validates its own shape via paramsSchema. Top-level keys listed in the generator targetParams are resolved from node targets to world coordinates before the generator runs."),
137
+ label: StepLabelSchema.optional().describe("Edge label attached to the generated segment; positioned along the produced commands.")
138
+ }).describe("Generator action: produce a sub-path by invoking a registered path generator (parabola / sin / etc.); core ships no built-in curve generators.");
127
139
  var StepSchema = z.discriminatedUnion("kind", [
128
140
  MoveStepSchema,
129
141
  LineStepSchema,
@@ -135,7 +147,8 @@ var StepSchema = z.discriminatedUnion("kind", [
135
147
  ArcStepSchema,
136
148
  CirclePathStepSchema,
137
149
  EllipsePathStepSchema,
138
- RectangleStepSchema
150
+ RectangleStepSchema,
151
+ GeneratorStepSchema
139
152
  ]).describe("A single path action; the discriminator field is `kind`");
140
153
  //#endregion
141
- export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, LineStepSchema, MoveStepSchema, RectangleStepSchema, StepLabelSchema, StepSchema };
154
+ export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, GeneratorStepSchema, LineStepSchema, MoveStepSchema, RectangleStepSchema, StepLabelSchema, StepSchema };