@retikz/core 0.3.0-alpha.5 → 0.3.0-beta.1

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 (375) hide show
  1. package/dist/es/arrows/define.d.ts +9 -0
  2. package/dist/es/arrows/define.d.ts.map +1 -0
  3. package/dist/es/arrows/define.js +10 -0
  4. package/dist/es/arrows/index.d.ts +3 -1
  5. package/dist/es/arrows/index.d.ts.map +1 -1
  6. package/dist/es/arrows/index.js +14 -1
  7. package/dist/es/arrows/types.d.ts +4 -2
  8. package/dist/es/arrows/types.d.ts.map +1 -1
  9. package/dist/es/compile/anchor-cache.d.ts +3 -3
  10. package/dist/es/compile/anchor-cache.d.ts.map +1 -1
  11. package/dist/es/compile/anchor-cache.js +18 -5
  12. package/dist/es/compile/compile.d.ts +5 -14
  13. package/dist/es/compile/compile.d.ts.map +1 -1
  14. package/dist/es/compile/compile.js +39 -39
  15. package/dist/es/compile/{lowerComposites.d.ts → composite.d.ts} +9 -2
  16. package/dist/es/compile/composite.d.ts.map +1 -0
  17. package/dist/es/compile/{lowerComposites.js → composite.js} +9 -1
  18. package/dist/es/compile/constant.d.ts +32 -0
  19. package/dist/es/compile/constant.d.ts.map +1 -0
  20. package/dist/es/compile/constant.js +23 -0
  21. package/dist/es/compile/direction.d.ts +27 -0
  22. package/dist/es/compile/direction.d.ts.map +1 -0
  23. package/dist/es/compile/direction.js +30 -0
  24. package/dist/es/compile/index.d.ts +3 -1
  25. package/dist/es/compile/index.d.ts.map +1 -1
  26. package/dist/es/compile/name-stack.d.ts +3 -1
  27. package/dist/es/compile/name-stack.d.ts.map +1 -1
  28. package/dist/es/compile/name-stack.js +5 -1
  29. package/dist/es/compile/node.d.ts +18 -7
  30. package/dist/es/compile/node.d.ts.map +1 -1
  31. package/dist/es/compile/node.js +39 -63
  32. package/dist/es/compile/paint.js +1 -1
  33. package/dist/es/compile/path/anchor.d.ts +4 -3
  34. package/dist/es/compile/path/anchor.d.ts.map +1 -1
  35. package/dist/es/compile/path/anchor.js +9 -12
  36. package/dist/es/compile/path/index.d.ts +6 -8
  37. package/dist/es/compile/path/index.d.ts.map +1 -1
  38. package/dist/es/compile/path/index.js +57 -34
  39. package/dist/es/compile/path/relative.d.ts +1 -1
  40. package/dist/es/compile/path/relative.js +1 -1
  41. package/dist/es/compile/path/shrink.d.ts +3 -1
  42. package/dist/es/compile/path/shrink.d.ts.map +1 -1
  43. package/dist/es/compile/path/shrink.js +16 -11
  44. package/dist/es/compile/position.d.ts +2 -2
  45. package/dist/es/compile/position.d.ts.map +1 -1
  46. package/dist/es/compile/position.js +6 -19
  47. package/dist/es/compile/precision.d.ts +1 -1
  48. package/dist/es/compile/precision.d.ts.map +1 -1
  49. package/dist/es/compile/precision.js +2 -2
  50. package/dist/es/compile/scope.d.ts +7 -5
  51. package/dist/es/compile/scope.d.ts.map +1 -1
  52. package/dist/es/compile/scope.js +29 -13
  53. package/dist/es/compile/style.d.ts +2 -2
  54. package/dist/es/compile/style.d.ts.map +1 -1
  55. package/dist/es/compile/style.js +2 -2
  56. package/dist/es/composites/define.d.ts +8 -0
  57. package/dist/es/composites/define.d.ts.map +1 -0
  58. package/dist/es/composites/{types.js → define.js} +2 -2
  59. package/dist/es/composites/index.d.ts +1 -1
  60. package/dist/es/composites/index.d.ts.map +1 -1
  61. package/dist/es/composites/types.d.ts +0 -6
  62. package/dist/es/composites/types.d.ts.map +1 -1
  63. package/dist/es/geometry/anchor.d.ts +33 -0
  64. package/dist/es/geometry/anchor.d.ts.map +1 -0
  65. package/dist/es/geometry/anchor.js +45 -0
  66. package/dist/es/geometry/bend.d.ts +1 -1
  67. package/dist/es/geometry/bend.js +2 -2
  68. package/dist/es/geometry/circle.d.ts +4 -4
  69. package/dist/es/geometry/circle.d.ts.map +1 -1
  70. package/dist/es/geometry/circle.js +3 -3
  71. package/dist/es/geometry/{roundedContour.d.ts → contour.d.ts} +4 -5
  72. package/dist/es/geometry/contour.d.ts.map +1 -0
  73. package/dist/es/geometry/{roundedContour.js → contour.js} +22 -34
  74. package/dist/es/geometry/diamond.d.ts +3 -3
  75. package/dist/es/geometry/diamond.d.ts.map +1 -1
  76. package/dist/es/geometry/diamond.js +2 -2
  77. package/dist/{lib/geometry/_edge.d.ts → es/geometry/edge.d.ts} +1 -1
  78. package/dist/es/geometry/edge.d.ts.map +1 -0
  79. package/dist/es/geometry/{_edge.js → edge.js} +1 -1
  80. package/dist/es/geometry/ellipse.d.ts +3 -3
  81. package/dist/es/geometry/ellipse.d.ts.map +1 -1
  82. package/dist/es/geometry/ellipse.js +2 -2
  83. package/dist/es/geometry/index.d.ts +2 -1
  84. package/dist/es/geometry/index.d.ts.map +1 -1
  85. package/dist/es/geometry/point.d.ts +6 -0
  86. package/dist/es/geometry/point.d.ts.map +1 -1
  87. package/dist/es/geometry/point.js +17 -0
  88. package/dist/es/geometry/rect.d.ts +4 -17
  89. package/dist/es/geometry/rect.d.ts.map +1 -1
  90. package/dist/es/geometry/rect.js +4 -16
  91. package/dist/es/geometry/segment.d.ts.map +1 -1
  92. package/dist/es/geometry/segment.js +25 -47
  93. package/dist/{lib/geometry/_transform.d.ts → es/geometry/transform.d.ts} +1 -1
  94. package/dist/es/geometry/transform.d.ts.map +1 -0
  95. package/dist/es/geometry/{_transform.js → transform.js} +1 -1
  96. package/dist/es/index.d.ts +11 -11
  97. package/dist/es/index.d.ts.map +1 -1
  98. package/dist/es/index.js +17 -14
  99. package/dist/es/ir/animation.d.ts +6 -5
  100. package/dist/es/ir/animation.d.ts.map +1 -1
  101. package/dist/es/ir/boundary.d.ts +1 -1
  102. package/dist/es/ir/boundary.d.ts.map +1 -1
  103. package/dist/es/ir/coordinate.d.ts +8 -8
  104. package/dist/es/ir/node.d.ts +73 -72
  105. package/dist/es/ir/node.d.ts.map +1 -1
  106. package/dist/es/ir/node.js +23 -23
  107. package/dist/es/ir/paint.d.ts +19 -18
  108. package/dist/es/ir/paint.d.ts.map +1 -1
  109. package/dist/es/ir/paint.js +10 -10
  110. package/dist/es/ir/path/arrow.d.ts +15 -14
  111. package/dist/es/ir/path/arrow.d.ts.map +1 -1
  112. package/dist/es/ir/path/arrow.js +18 -16
  113. package/dist/es/ir/path/path.d.ts +893 -152
  114. package/dist/es/ir/path/path.d.ts.map +1 -1
  115. package/dist/es/ir/path/path.js +1 -1
  116. package/dist/es/ir/path/step.d.ts +932 -20
  117. package/dist/es/ir/path/step.d.ts.map +1 -1
  118. package/dist/es/ir/path/step.js +73 -22
  119. package/dist/es/ir/path/target.js +3 -3
  120. package/dist/es/ir/position/at-position.d.ts +18 -18
  121. package/dist/es/ir/position/at-position.d.ts.map +1 -1
  122. package/dist/es/ir/position/at-position.js +11 -11
  123. package/dist/es/ir/scope.d.ts +2559 -1057
  124. package/dist/es/ir/scope.d.ts.map +1 -1
  125. package/dist/es/ir/scope.js +5 -5
  126. package/dist/es/ir/transform.d.ts +44 -17
  127. package/dist/es/ir/transform.d.ts.map +1 -1
  128. package/dist/es/ir/transform.js +10 -3
  129. package/dist/es/parsers/index.d.ts +3 -3
  130. package/dist/es/parsers/index.d.ts.map +1 -1
  131. package/dist/es/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
  132. package/dist/es/parsers/node-target.d.ts.map +1 -0
  133. package/dist/es/parsers/{parseNodeTarget.js → node-target.js} +10 -8
  134. package/dist/{lib/parsers/parseTargetSugar.d.ts → es/parsers/target-sugar.d.ts} +1 -1
  135. package/dist/es/parsers/target-sugar.d.ts.map +1 -0
  136. package/dist/es/parsers/{parseTargetSugar.js → target-sugar.js} +9 -4
  137. package/dist/{lib/parsers/parseWay.d.ts → es/parsers/way.d.ts} +1 -1
  138. package/dist/es/parsers/way.d.ts.map +1 -0
  139. package/dist/es/parsers/{parseWay.js → way.js} +9 -5
  140. package/dist/es/path-generators/define.d.ts.map +1 -0
  141. package/dist/es/{pathGenerators → path-generators}/define.js +1 -1
  142. package/dist/es/path-generators/index.d.ts.map +1 -0
  143. package/dist/es/path-generators/types.d.ts.map +1 -0
  144. package/dist/es/patterns/define.d.ts +9 -0
  145. package/dist/es/patterns/define.d.ts.map +1 -0
  146. package/dist/es/patterns/define.js +10 -0
  147. package/dist/es/patterns/index.d.ts +1 -0
  148. package/dist/es/patterns/index.d.ts.map +1 -1
  149. package/dist/es/patterns/index.js +42 -35
  150. package/dist/es/presets/animation.js +2 -2
  151. package/dist/es/primitive/marker.d.ts +1 -1
  152. package/dist/es/primitive/paint.d.ts +1 -1
  153. package/dist/es/primitive/path.d.ts +1 -1
  154. package/dist/es/shapes/arc.js +2 -2
  155. package/dist/{lib/shapes/_contour.d.ts → es/shapes/contour.d.ts} +6 -3
  156. package/dist/es/shapes/contour.d.ts.map +1 -0
  157. package/dist/es/shapes/{_contour.js → contour.js} +14 -2
  158. package/dist/es/shapes/ellipse.js +2 -2
  159. package/dist/es/shapes/index.d.ts +1 -1
  160. package/dist/es/shapes/index.d.ts.map +1 -1
  161. package/dist/es/shapes/index.js +1 -1
  162. package/dist/es/shapes/polygon.d.ts +1 -1
  163. package/dist/es/shapes/polygon.d.ts.map +1 -1
  164. package/dist/es/shapes/polygon.js +26 -21
  165. package/dist/es/shapes/rectangle.js +5 -5
  166. package/dist/es/shapes/sector.d.ts.map +1 -1
  167. package/dist/es/shapes/sector.js +30 -22
  168. package/dist/es/shapes/{_shared.d.ts → shared.d.ts} +4 -8
  169. package/dist/es/shapes/shared.d.ts.map +1 -0
  170. package/dist/es/shapes/{_shared.js → shared.js} +8 -12
  171. package/dist/es/shapes/star.d.ts.map +1 -1
  172. package/dist/es/shapes/star.js +4 -14
  173. package/dist/lib/arrows/define.cjs +10 -0
  174. package/dist/lib/arrows/define.d.ts +9 -0
  175. package/dist/lib/arrows/define.d.ts.map +1 -0
  176. package/dist/lib/arrows/index.cjs +14 -1
  177. package/dist/lib/arrows/index.d.ts +3 -1
  178. package/dist/lib/arrows/index.d.ts.map +1 -1
  179. package/dist/lib/arrows/types.d.ts +4 -2
  180. package/dist/lib/arrows/types.d.ts.map +1 -1
  181. package/dist/lib/compile/anchor-cache.cjs +17 -4
  182. package/dist/lib/compile/anchor-cache.d.ts +3 -3
  183. package/dist/lib/compile/anchor-cache.d.ts.map +1 -1
  184. package/dist/lib/compile/compile.cjs +37 -37
  185. package/dist/lib/compile/compile.d.ts +5 -14
  186. package/dist/lib/compile/compile.d.ts.map +1 -1
  187. package/dist/lib/compile/{lowerComposites.cjs → composite.cjs} +9 -1
  188. package/dist/lib/compile/{lowerComposites.d.ts → composite.d.ts} +9 -2
  189. package/dist/lib/compile/composite.d.ts.map +1 -0
  190. package/dist/lib/compile/constant.cjs +24 -0
  191. package/dist/lib/compile/constant.d.ts +32 -0
  192. package/dist/lib/compile/constant.d.ts.map +1 -0
  193. package/dist/lib/compile/direction.cjs +31 -0
  194. package/dist/lib/compile/direction.d.ts +27 -0
  195. package/dist/lib/compile/direction.d.ts.map +1 -0
  196. package/dist/lib/compile/index.d.ts +3 -1
  197. package/dist/lib/compile/index.d.ts.map +1 -1
  198. package/dist/lib/compile/name-stack.cjs +5 -1
  199. package/dist/lib/compile/name-stack.d.ts +3 -1
  200. package/dist/lib/compile/name-stack.d.ts.map +1 -1
  201. package/dist/lib/compile/node.cjs +39 -62
  202. package/dist/lib/compile/node.d.ts +18 -7
  203. package/dist/lib/compile/node.d.ts.map +1 -1
  204. package/dist/lib/compile/paint.cjs +1 -1
  205. package/dist/lib/compile/path/anchor.cjs +10 -12
  206. package/dist/lib/compile/path/anchor.d.ts +4 -3
  207. package/dist/lib/compile/path/anchor.d.ts.map +1 -1
  208. package/dist/lib/compile/path/index.cjs +56 -33
  209. package/dist/lib/compile/path/index.d.ts +6 -8
  210. package/dist/lib/compile/path/index.d.ts.map +1 -1
  211. package/dist/lib/compile/path/relative.cjs +1 -1
  212. package/dist/lib/compile/path/relative.d.ts +1 -1
  213. package/dist/lib/compile/path/shrink.cjs +16 -11
  214. package/dist/lib/compile/path/shrink.d.ts +3 -1
  215. package/dist/lib/compile/path/shrink.d.ts.map +1 -1
  216. package/dist/lib/compile/position.cjs +6 -19
  217. package/dist/lib/compile/position.d.ts +2 -2
  218. package/dist/lib/compile/position.d.ts.map +1 -1
  219. package/dist/lib/compile/precision.cjs +2 -2
  220. package/dist/lib/compile/precision.d.ts +1 -1
  221. package/dist/lib/compile/precision.d.ts.map +1 -1
  222. package/dist/lib/compile/scope.cjs +29 -13
  223. package/dist/lib/compile/scope.d.ts +7 -5
  224. package/dist/lib/compile/scope.d.ts.map +1 -1
  225. package/dist/lib/compile/style.cjs +2 -2
  226. package/dist/lib/compile/style.d.ts +2 -2
  227. package/dist/lib/compile/style.d.ts.map +1 -1
  228. package/dist/lib/composites/{types.cjs → define.cjs} +2 -2
  229. package/dist/lib/composites/define.d.ts +8 -0
  230. package/dist/lib/composites/define.d.ts.map +1 -0
  231. package/dist/lib/composites/index.d.ts +1 -1
  232. package/dist/lib/composites/index.d.ts.map +1 -1
  233. package/dist/lib/composites/types.d.ts +0 -6
  234. package/dist/lib/composites/types.d.ts.map +1 -1
  235. package/dist/lib/geometry/anchor.cjs +47 -0
  236. package/dist/lib/geometry/anchor.d.ts +33 -0
  237. package/dist/lib/geometry/anchor.d.ts.map +1 -0
  238. package/dist/lib/geometry/bend.cjs +2 -2
  239. package/dist/lib/geometry/bend.d.ts +1 -1
  240. package/dist/lib/geometry/circle.cjs +9 -9
  241. package/dist/lib/geometry/circle.d.ts +4 -4
  242. package/dist/lib/geometry/circle.d.ts.map +1 -1
  243. package/dist/lib/geometry/{roundedContour.cjs → contour.cjs} +21 -32
  244. package/dist/lib/geometry/{roundedContour.d.ts → contour.d.ts} +4 -5
  245. package/dist/lib/geometry/contour.d.ts.map +1 -0
  246. package/dist/lib/geometry/diamond.cjs +7 -7
  247. package/dist/lib/geometry/diamond.d.ts +3 -3
  248. package/dist/lib/geometry/diamond.d.ts.map +1 -1
  249. package/dist/lib/geometry/{_edge.cjs → edge.cjs} +1 -1
  250. package/dist/{es/geometry/_edge.d.ts → lib/geometry/edge.d.ts} +1 -1
  251. package/dist/lib/geometry/edge.d.ts.map +1 -0
  252. package/dist/lib/geometry/ellipse.cjs +8 -8
  253. package/dist/lib/geometry/ellipse.d.ts +3 -3
  254. package/dist/lib/geometry/ellipse.d.ts.map +1 -1
  255. package/dist/lib/geometry/index.d.ts +2 -1
  256. package/dist/lib/geometry/index.d.ts.map +1 -1
  257. package/dist/lib/geometry/point.cjs +17 -0
  258. package/dist/lib/geometry/point.d.ts +6 -0
  259. package/dist/lib/geometry/point.d.ts.map +1 -1
  260. package/dist/lib/geometry/rect.cjs +9 -22
  261. package/dist/lib/geometry/rect.d.ts +4 -17
  262. package/dist/lib/geometry/rect.d.ts.map +1 -1
  263. package/dist/lib/geometry/segment.cjs +25 -47
  264. package/dist/lib/geometry/segment.d.ts.map +1 -1
  265. package/dist/lib/geometry/{_transform.cjs → transform.cjs} +1 -1
  266. package/dist/{es/geometry/_transform.d.ts → lib/geometry/transform.d.ts} +1 -1
  267. package/dist/lib/geometry/transform.d.ts.map +1 -0
  268. package/dist/lib/index.cjs +29 -22
  269. package/dist/lib/index.d.ts +11 -11
  270. package/dist/lib/index.d.ts.map +1 -1
  271. package/dist/lib/ir/animation.d.ts +6 -5
  272. package/dist/lib/ir/animation.d.ts.map +1 -1
  273. package/dist/lib/ir/boundary.d.ts +1 -1
  274. package/dist/lib/ir/boundary.d.ts.map +1 -1
  275. package/dist/lib/ir/coordinate.d.ts +8 -8
  276. package/dist/lib/ir/node.cjs +23 -23
  277. package/dist/lib/ir/node.d.ts +73 -72
  278. package/dist/lib/ir/node.d.ts.map +1 -1
  279. package/dist/lib/ir/paint.cjs +10 -10
  280. package/dist/lib/ir/paint.d.ts +19 -18
  281. package/dist/lib/ir/paint.d.ts.map +1 -1
  282. package/dist/lib/ir/path/arrow.cjs +18 -16
  283. package/dist/lib/ir/path/arrow.d.ts +15 -14
  284. package/dist/lib/ir/path/arrow.d.ts.map +1 -1
  285. package/dist/lib/ir/path/path.cjs +1 -1
  286. package/dist/lib/ir/path/path.d.ts +893 -152
  287. package/dist/lib/ir/path/path.d.ts.map +1 -1
  288. package/dist/lib/ir/path/step.cjs +73 -21
  289. package/dist/lib/ir/path/step.d.ts +932 -20
  290. package/dist/lib/ir/path/step.d.ts.map +1 -1
  291. package/dist/lib/ir/path/target.cjs +3 -3
  292. package/dist/lib/ir/position/at-position.cjs +11 -11
  293. package/dist/lib/ir/position/at-position.d.ts +18 -18
  294. package/dist/lib/ir/position/at-position.d.ts.map +1 -1
  295. package/dist/lib/ir/scope.cjs +5 -5
  296. package/dist/lib/ir/scope.d.ts +2559 -1057
  297. package/dist/lib/ir/scope.d.ts.map +1 -1
  298. package/dist/lib/ir/transform.cjs +9 -2
  299. package/dist/lib/ir/transform.d.ts +44 -17
  300. package/dist/lib/ir/transform.d.ts.map +1 -1
  301. package/dist/lib/parsers/index.d.ts +3 -3
  302. package/dist/lib/parsers/index.d.ts.map +1 -1
  303. package/dist/lib/parsers/{parseNodeTarget.cjs → node-target.cjs} +10 -8
  304. package/dist/lib/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
  305. package/dist/lib/parsers/node-target.d.ts.map +1 -0
  306. package/dist/lib/parsers/{parseTargetSugar.cjs → target-sugar.cjs} +9 -4
  307. package/dist/{es/parsers/parseTargetSugar.d.ts → lib/parsers/target-sugar.d.ts} +1 -1
  308. package/dist/lib/parsers/target-sugar.d.ts.map +1 -0
  309. package/dist/lib/parsers/{parseWay.cjs → way.cjs} +12 -8
  310. package/dist/{es/parsers/parseWay.d.ts → lib/parsers/way.d.ts} +1 -1
  311. package/dist/lib/parsers/way.d.ts.map +1 -0
  312. package/dist/lib/{pathGenerators → path-generators}/define.cjs +1 -1
  313. package/dist/lib/path-generators/define.d.ts.map +1 -0
  314. package/dist/lib/path-generators/index.d.ts.map +1 -0
  315. package/dist/lib/path-generators/types.d.ts.map +1 -0
  316. package/dist/lib/patterns/define.cjs +10 -0
  317. package/dist/lib/patterns/define.d.ts +9 -0
  318. package/dist/lib/patterns/define.d.ts.map +1 -0
  319. package/dist/lib/patterns/index.cjs +42 -35
  320. package/dist/lib/patterns/index.d.ts +1 -0
  321. package/dist/lib/patterns/index.d.ts.map +1 -1
  322. package/dist/lib/presets/animation.cjs +2 -2
  323. package/dist/lib/primitive/marker.d.ts +1 -1
  324. package/dist/lib/primitive/paint.d.ts +1 -1
  325. package/dist/lib/primitive/path.d.ts +1 -1
  326. package/dist/lib/shapes/arc.cjs +4 -4
  327. package/dist/lib/shapes/{_contour.cjs → contour.cjs} +14 -1
  328. package/dist/{es/shapes/_contour.d.ts → lib/shapes/contour.d.ts} +6 -3
  329. package/dist/lib/shapes/contour.d.ts.map +1 -0
  330. package/dist/lib/shapes/ellipse.cjs +2 -2
  331. package/dist/lib/shapes/index.cjs +1 -1
  332. package/dist/lib/shapes/index.d.ts +1 -1
  333. package/dist/lib/shapes/index.d.ts.map +1 -1
  334. package/dist/lib/shapes/polygon.cjs +29 -24
  335. package/dist/lib/shapes/polygon.d.ts +1 -1
  336. package/dist/lib/shapes/polygon.d.ts.map +1 -1
  337. package/dist/lib/shapes/rectangle.cjs +11 -11
  338. package/dist/lib/shapes/sector.cjs +41 -33
  339. package/dist/lib/shapes/sector.d.ts.map +1 -1
  340. package/dist/lib/shapes/{_shared.cjs → shared.cjs} +7 -12
  341. package/dist/lib/shapes/{_shared.d.ts → shared.d.ts} +4 -8
  342. package/dist/lib/shapes/shared.d.ts.map +1 -0
  343. package/dist/lib/shapes/star.cjs +7 -17
  344. package/dist/lib/shapes/star.d.ts.map +1 -1
  345. package/package.json +2 -3
  346. package/dist/es/compile/lowerComposites.d.ts.map +0 -1
  347. package/dist/es/geometry/_edge.d.ts.map +0 -1
  348. package/dist/es/geometry/_transform.d.ts.map +0 -1
  349. package/dist/es/geometry/roundedContour.d.ts.map +0 -1
  350. package/dist/es/parsers/parseNodeTarget.d.ts.map +0 -1
  351. package/dist/es/parsers/parseTargetSugar.d.ts.map +0 -1
  352. package/dist/es/parsers/parseWay.d.ts.map +0 -1
  353. package/dist/es/pathGenerators/define.d.ts.map +0 -1
  354. package/dist/es/pathGenerators/index.d.ts.map +0 -1
  355. package/dist/es/pathGenerators/types.d.ts.map +0 -1
  356. package/dist/es/shapes/_contour.d.ts.map +0 -1
  357. package/dist/es/shapes/_shared.d.ts.map +0 -1
  358. package/dist/lib/compile/lowerComposites.d.ts.map +0 -1
  359. package/dist/lib/geometry/_edge.d.ts.map +0 -1
  360. package/dist/lib/geometry/_transform.d.ts.map +0 -1
  361. package/dist/lib/geometry/roundedContour.d.ts.map +0 -1
  362. package/dist/lib/parsers/parseNodeTarget.d.ts.map +0 -1
  363. package/dist/lib/parsers/parseTargetSugar.d.ts.map +0 -1
  364. package/dist/lib/parsers/parseWay.d.ts.map +0 -1
  365. package/dist/lib/pathGenerators/define.d.ts.map +0 -1
  366. package/dist/lib/pathGenerators/index.d.ts.map +0 -1
  367. package/dist/lib/pathGenerators/types.d.ts.map +0 -1
  368. package/dist/lib/shapes/_contour.d.ts.map +0 -1
  369. package/dist/lib/shapes/_shared.d.ts.map +0 -1
  370. /package/dist/es/{pathGenerators → path-generators}/define.d.ts +0 -0
  371. /package/dist/es/{pathGenerators → path-generators}/index.d.ts +0 -0
  372. /package/dist/es/{pathGenerators → path-generators}/types.d.ts +0 -0
  373. /package/dist/lib/{pathGenerators → path-generators}/define.d.ts +0 -0
  374. /package/dist/lib/{pathGenerators → path-generators}/index.d.ts +0 -0
  375. /package/dist/lib/{pathGenerators → path-generators}/types.d.ts +0 -0
@@ -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;AAOxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;IAoBzB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+JpB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -41,10 +41,14 @@ var LineStepSchema = zod.z.object({
41
41
  to: require_target.TargetSchema.describe("Destination point of the line segment"),
42
42
  label: StepLabelSchema.optional().describe("Edge label attached to this line segment")
43
43
  }).describe("Line action: straight-line segment from cursor to target");
44
+ var FoldStepVia = {
45
+ HorizontalThenVertical: "-|",
46
+ VerticalThenHorizontal: "|-"
47
+ };
44
48
  var FoldStepSchema = zod.z.object({
45
49
  type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
46
- kind: zod.z.literal("step").describe("Folded right-angle segment from cursor to target through one intermediate point (TikZ `-|` / `|-`)"),
47
- via: zod.z.enum(["-|", "|-"]).describe("Folding direction: `-|` first horizontal then vertical; `|-` first vertical then horizontal"),
50
+ kind: zod.z.literal("fold").describe("Folded right-angle segment from cursor to target through one intermediate point (TikZ `-|` / `|-`)"),
51
+ via: zod.z.nativeEnum(FoldStepVia).describe("Folding direction: `-|` first horizontal then vertical; `|-` first vertical then horizontal"),
48
52
  to: require_target.TargetSchema.describe("Destination point of the folded segment"),
49
53
  label: StepLabelSchema.optional().describe("Edge label attached to this folded segment; positioned along the corresponding leg by `position`.")
50
54
  }).describe("Fold action: TikZ-style right-angle fold with a single intermediate point chosen by `via`");
@@ -83,23 +87,58 @@ var BendStepSchema = zod.z.object({
83
87
  looseness: zod.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."),
84
88
  label: StepLabelSchema.optional().describe("Edge label attached to this bend segment")
85
89
  }).describe("Bend action: shorthand for an arc-like cubic; control points computed at compile time");
86
- var ArcStepSchema = zod.z.object({
90
+ var refineArcStep = (step, ctx) => {
91
+ const hasRadius = step.radius !== void 0;
92
+ const hasRadiusX = step.radiusX !== void 0;
93
+ const hasRadiusY = step.radiusY !== void 0;
94
+ if (hasRadius && (hasRadiusX || hasRadiusY)) ctx.addIssue({
95
+ code: zod.z.ZodIssueCode.custom,
96
+ path: ["radius"],
97
+ message: "Arc step must use either radius or radiusX/radiusY, not both"
98
+ });
99
+ if (!hasRadius && !(hasRadiusX && hasRadiusY)) ctx.addIssue({
100
+ code: zod.z.ZodIssueCode.custom,
101
+ path: ["radius"],
102
+ message: "Arc step requires radius or both radiusX and radiusY"
103
+ });
104
+ if (hasRadiusX !== hasRadiusY) ctx.addIssue({
105
+ code: zod.z.ZodIssueCode.custom,
106
+ path: hasRadiusX ? ["radiusY"] : ["radiusX"],
107
+ message: "Arc step requires radiusX and radiusY together"
108
+ });
109
+ };
110
+ var refinePartialAngles = (step, ctx, kind) => {
111
+ const hasStart = step.startAngle !== void 0;
112
+ const hasEnd = step.endAngle !== void 0;
113
+ if (hasStart !== hasEnd) ctx.addIssue({
114
+ code: zod.z.ZodIssueCode.custom,
115
+ path: hasStart ? ["endAngle"] : ["startAngle"],
116
+ message: `${kind} requires startAngle and endAngle together`
117
+ });
118
+ if (step.closed === "closed" && (hasStart || hasEnd)) ctx.addIssue({
119
+ code: zod.z.ZodIssueCode.custom,
120
+ path: ["closed"],
121
+ message: `${kind} closed:'closed' is only valid without angles`
122
+ });
123
+ };
124
+ var ArcStepBaseSchema = zod.z.object({
87
125
  type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
88
126
  kind: zod.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=…]`)."),
89
- startAngle: zod.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."),
90
- endAngle: zod.z.number().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
91
- radius: zod.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."),
92
- radiusX: zod.z.number().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
93
- radiusY: zod.z.number().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
127
+ startAngle: zod.z.number().finite().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."),
128
+ endAngle: zod.z.number().finite().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
129
+ radius: zod.z.number().finite().positive().optional().describe("Circular arc radius in user units. Give either radius (circular) or both radiusX and radiusY (elliptical), never both."),
130
+ radiusX: zod.z.number().finite().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
131
+ radiusY: zod.z.number().finite().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
94
132
  center: require_target.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)."),
95
133
  label: StepLabelSchema.optional().describe("Edge label attached to this arc")
96
134
  }).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.");
97
- var CirclePathStepSchema = zod.z.object({
135
+ var ArcStepSchema = ArcStepBaseSchema.superRefine(refineArcStep);
136
+ var CirclePathStepBaseSchema = zod.z.object({
98
137
  type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
99
138
  kind: zod.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)."),
100
- radius: zod.z.number().positive().describe("Circle radius in user units"),
101
- startAngle: zod.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)."),
102
- endAngle: zod.z.number().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
139
+ radius: zod.z.number().finite().positive().describe("Circle radius in user units"),
140
+ startAngle: zod.z.number().finite().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."),
141
+ endAngle: zod.z.number().finite().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
103
142
  closed: zod.z.enum([
104
143
  "closed",
105
144
  "chord",
@@ -108,13 +147,14 @@ var CirclePathStepSchema = zod.z.object({
108
147
  ]).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; default), 'sector' (connect both arc ends to the center, then close), or 'open' (pure unclosed arc)."),
109
148
  label: StepLabelSchema.optional().describe("Edge label attached to this circle")
110
149
  }).describe("CirclePath action: full circle (no angles, pen returns to center) or partial arc (with angles, closed per chord/open).");
111
- var EllipsePathStepSchema = zod.z.object({
150
+ var CirclePathStepSchema = CirclePathStepBaseSchema.superRefine((step, ctx) => refinePartialAngles(step, ctx, "circlePath"));
151
+ var EllipsePathStepBaseSchema = zod.z.object({
112
152
  type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
113
153
  kind: zod.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`."),
114
- radiusX: zod.z.number().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
115
- radiusY: zod.z.number().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
116
- startAngle: zod.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."),
117
- endAngle: zod.z.number().optional().describe("Partial-ellipse end angle in degrees."),
154
+ radiusX: zod.z.number().finite().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
155
+ radiusY: zod.z.number().finite().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
156
+ startAngle: zod.z.number().finite().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."),
157
+ endAngle: zod.z.number().finite().optional().describe("Partial-ellipse end angle in degrees."),
118
158
  closed: zod.z.enum([
119
159
  "closed",
120
160
  "chord",
@@ -123,6 +163,7 @@ var EllipsePathStepSchema = zod.z.object({
123
163
  ]).optional().describe("Closing mode. 'closed' = full ellipse (only valid with no angles; default then). With angles: 'chord' (chord between arc ends; default), 'sector' (connect both arc ends to the center, then close), or 'open' (pure unclosed arc)."),
124
164
  label: StepLabelSchema.optional().describe("Edge label attached to this ellipse")
125
165
  }).describe("EllipsePath action: full ellipse (no angles, pen returns to center) or partial elliptical arc (with angles, closed per chord/open).");
166
+ var EllipsePathStepSchema = EllipsePathStepBaseSchema.superRefine((step, ctx) => refinePartialAngles(step, ctx, "ellipsePath"));
126
167
  var RectangleStepSchema = zod.z.object({
127
168
  type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
128
169
  kind: zod.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."),
@@ -146,12 +187,22 @@ var StepSchema = zod.z.discriminatedUnion("kind", [
146
187
  CurveStepSchema,
147
188
  CubicStepSchema,
148
189
  BendStepSchema,
149
- ArcStepSchema,
150
- CirclePathStepSchema,
151
- EllipsePathStepSchema,
190
+ ArcStepBaseSchema,
191
+ CirclePathStepBaseSchema,
192
+ EllipsePathStepBaseSchema,
152
193
  RectangleStepSchema,
153
194
  GeneratorStepSchema
154
- ]).describe("A single path action; the discriminator field is `kind`");
195
+ ]).superRefine((step, ctx) => {
196
+ if (step.kind === "arc") {
197
+ refineArcStep(step, ctx);
198
+ return;
199
+ }
200
+ if (step.kind === "circlePath") {
201
+ refinePartialAngles(step, ctx, "circlePath");
202
+ return;
203
+ }
204
+ if (step.kind === "ellipsePath") refinePartialAngles(step, ctx, "ellipsePath");
205
+ }).describe("A single path action; the discriminator field is `kind`");
155
206
  //#endregion
156
207
  exports.ArcStepSchema = ArcStepSchema;
157
208
  exports.BendStepSchema = BendStepSchema;
@@ -162,6 +213,7 @@ exports.CurveStepSchema = CurveStepSchema;
162
213
  exports.CycleStepSchema = CycleStepSchema;
163
214
  exports.EllipsePathStepSchema = EllipsePathStepSchema;
164
215
  exports.FoldStepSchema = FoldStepSchema;
216
+ exports.FoldStepVia = FoldStepVia;
165
217
  exports.GeneratorStepSchema = GeneratorStepSchema;
166
218
  exports.LineStepSchema = LineStepSchema;
167
219
  exports.MoveStepSchema = MoveStepSchema;