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

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 (439) 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 +15 -2
  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 +46 -43
  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 +30 -0
  19. package/dist/es/compile/constant.d.ts.map +1 -0
  20. package/dist/es/compile/constant.js +21 -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 +19 -8
  30. package/dist/es/compile/node.d.ts.map +1 -1
  31. package/dist/es/compile/node.js +56 -70
  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 +97 -44
  39. package/dist/es/compile/path/label.d.ts.map +1 -1
  40. package/dist/es/compile/path/label.js +8 -4
  41. package/dist/es/compile/path/relative.d.ts +1 -1
  42. package/dist/es/compile/path/relative.js +1 -1
  43. package/dist/es/compile/path/shrink.d.ts +3 -1
  44. package/dist/es/compile/path/shrink.d.ts.map +1 -1
  45. package/dist/es/compile/path/shrink.js +16 -11
  46. package/dist/es/compile/position.d.ts +2 -2
  47. package/dist/es/compile/position.d.ts.map +1 -1
  48. package/dist/es/compile/position.js +6 -19
  49. package/dist/es/compile/precision.d.ts +1 -1
  50. package/dist/es/compile/precision.d.ts.map +1 -1
  51. package/dist/es/compile/precision.js +2 -2
  52. package/dist/es/compile/scope.d.ts +7 -5
  53. package/dist/es/compile/scope.d.ts.map +1 -1
  54. package/dist/es/compile/scope.js +44 -16
  55. package/dist/es/compile/style.d.ts +2 -2
  56. package/dist/es/compile/style.d.ts.map +1 -1
  57. package/dist/es/compile/style.js +2 -2
  58. package/dist/es/compile/text-metrics.d.ts +1 -1
  59. package/dist/es/compile/text-metrics.js +2 -2
  60. package/dist/es/composites/define.d.ts +8 -0
  61. package/dist/es/composites/define.d.ts.map +1 -0
  62. package/dist/es/composites/{types.js → define.js} +2 -2
  63. package/dist/es/composites/index.d.ts +1 -1
  64. package/dist/es/composites/index.d.ts.map +1 -1
  65. package/dist/es/composites/types.d.ts +0 -6
  66. package/dist/es/composites/types.d.ts.map +1 -1
  67. package/dist/es/geometry/anchor.d.ts +33 -0
  68. package/dist/es/geometry/anchor.d.ts.map +1 -0
  69. package/dist/es/geometry/anchor.js +45 -0
  70. package/dist/es/geometry/bend.d.ts +1 -1
  71. package/dist/es/geometry/bend.js +3 -3
  72. package/dist/es/geometry/circle.d.ts +4 -4
  73. package/dist/es/geometry/circle.d.ts.map +1 -1
  74. package/dist/es/geometry/circle.js +3 -3
  75. package/dist/es/geometry/{roundedContour.d.ts → contour.d.ts} +9 -5
  76. package/dist/es/geometry/contour.d.ts.map +1 -0
  77. package/dist/es/geometry/{roundedContour.js → contour.js} +27 -37
  78. package/dist/es/geometry/diamond.d.ts +10 -4
  79. package/dist/es/geometry/diamond.d.ts.map +1 -1
  80. package/dist/es/geometry/diamond.js +11 -3
  81. package/dist/{lib/geometry/_edge.d.ts → es/geometry/edge.d.ts} +1 -1
  82. package/dist/es/geometry/edge.d.ts.map +1 -0
  83. package/dist/es/geometry/{_edge.js → edge.js} +1 -1
  84. package/dist/es/geometry/ellipse.d.ts +3 -3
  85. package/dist/es/geometry/ellipse.d.ts.map +1 -1
  86. package/dist/es/geometry/ellipse.js +4 -2
  87. package/dist/es/geometry/index.d.ts +6 -1
  88. package/dist/es/geometry/index.d.ts.map +1 -1
  89. package/dist/es/geometry/point.d.ts +6 -0
  90. package/dist/es/geometry/point.d.ts.map +1 -1
  91. package/dist/es/geometry/point.js +17 -0
  92. package/dist/es/geometry/rect.d.ts +4 -17
  93. package/dist/es/geometry/rect.d.ts.map +1 -1
  94. package/dist/es/geometry/rect.js +4 -16
  95. package/dist/es/geometry/segment.d.ts +7 -0
  96. package/dist/es/geometry/segment.d.ts.map +1 -1
  97. package/dist/es/geometry/segment.js +48 -47
  98. package/dist/{lib/geometry/_transform.d.ts → es/geometry/transform.d.ts} +1 -1
  99. package/dist/es/geometry/transform.d.ts.map +1 -0
  100. package/dist/es/geometry/{_transform.js → transform.js} +1 -1
  101. package/dist/es/index.d.ts +13 -13
  102. package/dist/es/index.d.ts.map +1 -1
  103. package/dist/es/index.js +20 -16
  104. package/dist/es/ir/animation.d.ts +26 -125
  105. package/dist/es/ir/animation.d.ts.map +1 -1
  106. package/dist/es/ir/animation.js +6 -6
  107. package/dist/es/ir/boundary.d.ts +4 -10
  108. package/dist/es/ir/boundary.d.ts.map +1 -1
  109. package/dist/es/ir/clip.d.ts +6 -46
  110. package/dist/es/ir/clip.d.ts.map +1 -1
  111. package/dist/es/ir/composite.d.ts +2 -14
  112. package/dist/es/ir/composite.d.ts.map +1 -1
  113. package/dist/es/ir/coordinate.d.ts +14 -50
  114. package/dist/es/ir/coordinate.d.ts.map +1 -1
  115. package/dist/es/ir/coordinate.js +1 -1
  116. package/dist/es/ir/font.d.ts +10 -13
  117. package/dist/es/ir/font.d.ts.map +1 -1
  118. package/dist/es/ir/json.d.ts +1 -1
  119. package/dist/es/ir/json.d.ts.map +1 -1
  120. package/dist/es/ir/json.js +1 -1
  121. package/dist/es/ir/node.d.ts +175 -821
  122. package/dist/es/ir/node.d.ts.map +1 -1
  123. package/dist/es/ir/node.js +23 -23
  124. package/dist/es/ir/paint.d.ts +23 -100
  125. package/dist/es/ir/paint.d.ts.map +1 -1
  126. package/dist/es/ir/paint.js +10 -10
  127. package/dist/es/ir/path/arrow.d.ts +19 -131
  128. package/dist/es/ir/path/arrow.d.ts.map +1 -1
  129. package/dist/es/ir/path/arrow.js +18 -16
  130. package/dist/es/ir/path/path.d.ts +519 -3065
  131. package/dist/es/ir/path/path.d.ts.map +1 -1
  132. package/dist/es/ir/path/path.js +3 -3
  133. package/dist/es/ir/path/step.d.ts +929 -3474
  134. package/dist/es/ir/path/step.d.ts.map +1 -1
  135. package/dist/es/ir/path/step.js +74 -23
  136. package/dist/es/ir/path/target.d.ts +40 -121
  137. package/dist/es/ir/path/target.d.ts.map +1 -1
  138. package/dist/es/ir/path/target.js +3 -3
  139. package/dist/es/ir/position/at-position.d.ts +20 -28
  140. package/dist/es/ir/position/at-position.d.ts.map +1 -1
  141. package/dist/es/ir/position/at-position.js +11 -11
  142. package/dist/es/ir/position/offset-position.d.ts +2 -8
  143. package/dist/es/ir/position/offset-position.d.ts.map +1 -1
  144. package/dist/es/ir/scene.d.ts +17 -181
  145. package/dist/es/ir/scene.d.ts.map +1 -1
  146. package/dist/es/ir/scope.d.ts +315 -7291
  147. package/dist/es/ir/scope.d.ts.map +1 -1
  148. package/dist/es/ir/scope.js +10 -7
  149. package/dist/es/ir/shape.d.ts +2 -8
  150. package/dist/es/ir/shape.d.ts.map +1 -1
  151. package/dist/es/ir/text.d.ts +24 -70
  152. package/dist/es/ir/text.d.ts.map +1 -1
  153. package/dist/es/ir/transform.d.ts +47 -144
  154. package/dist/es/ir/transform.d.ts.map +1 -1
  155. package/dist/es/ir/transform.js +12 -5
  156. package/dist/es/parsers/index.d.ts +3 -3
  157. package/dist/es/parsers/index.d.ts.map +1 -1
  158. package/dist/es/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
  159. package/dist/es/parsers/node-target.d.ts.map +1 -0
  160. package/dist/es/parsers/{parseNodeTarget.js → node-target.js} +10 -8
  161. package/dist/{lib/parsers/parseTargetSugar.d.ts → es/parsers/target-sugar.d.ts} +1 -1
  162. package/dist/es/parsers/target-sugar.d.ts.map +1 -0
  163. package/dist/es/parsers/{parseTargetSugar.js → target-sugar.js} +9 -4
  164. package/dist/{lib/parsers/parseWay.d.ts → es/parsers/way.d.ts} +2 -2
  165. package/dist/es/parsers/way.d.ts.map +1 -0
  166. package/dist/es/parsers/{parseWay.js → way.js} +10 -6
  167. package/dist/es/path-generators/define.d.ts.map +1 -0
  168. package/dist/es/{pathGenerators → path-generators}/define.js +1 -1
  169. package/dist/es/path-generators/index.d.ts.map +1 -0
  170. package/dist/es/path-generators/types.d.ts.map +1 -0
  171. package/dist/es/patterns/define.d.ts +9 -0
  172. package/dist/es/patterns/define.d.ts.map +1 -0
  173. package/dist/es/patterns/define.js +10 -0
  174. package/dist/es/patterns/index.d.ts +1 -0
  175. package/dist/es/patterns/index.d.ts.map +1 -1
  176. package/dist/es/patterns/index.js +42 -35
  177. package/dist/es/presets/animation.js +2 -2
  178. package/dist/es/primitive/marker.d.ts +7 -7
  179. package/dist/es/primitive/marker.d.ts.map +1 -1
  180. package/dist/es/primitive/paint.d.ts +1 -1
  181. package/dist/es/primitive/path.d.ts +1 -1
  182. package/dist/es/shapes/arc.d.ts.map +1 -1
  183. package/dist/es/shapes/arc.js +24 -5
  184. package/dist/{lib/shapes/_contour.d.ts → es/shapes/contour.d.ts} +6 -3
  185. package/dist/es/shapes/contour.d.ts.map +1 -0
  186. package/dist/es/shapes/{_contour.js → contour.js} +14 -2
  187. package/dist/es/shapes/ellipse.js +2 -2
  188. package/dist/es/shapes/index.d.ts +1 -1
  189. package/dist/es/shapes/index.d.ts.map +1 -1
  190. package/dist/es/shapes/index.js +1 -1
  191. package/dist/es/shapes/polygon.d.ts +1 -1
  192. package/dist/es/shapes/polygon.d.ts.map +1 -1
  193. package/dist/es/shapes/polygon.js +26 -21
  194. package/dist/es/shapes/rectangle.js +6 -6
  195. package/dist/es/shapes/sector.d.ts.map +1 -1
  196. package/dist/es/shapes/sector.js +30 -22
  197. package/dist/es/shapes/{_shared.d.ts → shared.d.ts} +7 -10
  198. package/dist/es/shapes/shared.d.ts.map +1 -0
  199. package/dist/es/shapes/{_shared.js → shared.js} +13 -15
  200. package/dist/es/shapes/star.d.ts.map +1 -1
  201. package/dist/es/shapes/star.js +6 -15
  202. package/dist/es/shapes/types.d.ts +10 -3
  203. package/dist/es/shapes/types.d.ts.map +1 -1
  204. package/dist/es/types.d.ts +1 -1
  205. package/dist/lib/arrows/define.cjs +10 -0
  206. package/dist/lib/arrows/define.d.ts +9 -0
  207. package/dist/lib/arrows/define.d.ts.map +1 -0
  208. package/dist/lib/arrows/index.cjs +15 -2
  209. package/dist/lib/arrows/index.d.ts +3 -1
  210. package/dist/lib/arrows/index.d.ts.map +1 -1
  211. package/dist/lib/arrows/types.d.ts +4 -2
  212. package/dist/lib/arrows/types.d.ts.map +1 -1
  213. package/dist/lib/compile/anchor-cache.cjs +17 -4
  214. package/dist/lib/compile/anchor-cache.d.ts +3 -3
  215. package/dist/lib/compile/anchor-cache.d.ts.map +1 -1
  216. package/dist/lib/compile/compile.cjs +44 -41
  217. package/dist/lib/compile/compile.d.ts +5 -14
  218. package/dist/lib/compile/compile.d.ts.map +1 -1
  219. package/dist/lib/compile/{lowerComposites.cjs → composite.cjs} +9 -1
  220. package/dist/lib/compile/{lowerComposites.d.ts → composite.d.ts} +9 -2
  221. package/dist/lib/compile/composite.d.ts.map +1 -0
  222. package/dist/lib/compile/constant.cjs +22 -0
  223. package/dist/lib/compile/constant.d.ts +30 -0
  224. package/dist/lib/compile/constant.d.ts.map +1 -0
  225. package/dist/lib/compile/direction.cjs +31 -0
  226. package/dist/lib/compile/direction.d.ts +27 -0
  227. package/dist/lib/compile/direction.d.ts.map +1 -0
  228. package/dist/lib/compile/index.d.ts +3 -1
  229. package/dist/lib/compile/index.d.ts.map +1 -1
  230. package/dist/lib/compile/name-stack.cjs +5 -1
  231. package/dist/lib/compile/name-stack.d.ts +3 -1
  232. package/dist/lib/compile/name-stack.d.ts.map +1 -1
  233. package/dist/lib/compile/node.cjs +56 -69
  234. package/dist/lib/compile/node.d.ts +19 -8
  235. package/dist/lib/compile/node.d.ts.map +1 -1
  236. package/dist/lib/compile/paint.cjs +1 -1
  237. package/dist/lib/compile/path/anchor.cjs +10 -12
  238. package/dist/lib/compile/path/anchor.d.ts +4 -3
  239. package/dist/lib/compile/path/anchor.d.ts.map +1 -1
  240. package/dist/lib/compile/path/index.cjs +95 -42
  241. package/dist/lib/compile/path/index.d.ts +6 -8
  242. package/dist/lib/compile/path/index.d.ts.map +1 -1
  243. package/dist/lib/compile/path/label.cjs +8 -4
  244. package/dist/lib/compile/path/label.d.ts.map +1 -1
  245. package/dist/lib/compile/path/relative.cjs +1 -1
  246. package/dist/lib/compile/path/relative.d.ts +1 -1
  247. package/dist/lib/compile/path/shrink.cjs +16 -11
  248. package/dist/lib/compile/path/shrink.d.ts +3 -1
  249. package/dist/lib/compile/path/shrink.d.ts.map +1 -1
  250. package/dist/lib/compile/position.cjs +6 -19
  251. package/dist/lib/compile/position.d.ts +2 -2
  252. package/dist/lib/compile/position.d.ts.map +1 -1
  253. package/dist/lib/compile/precision.cjs +2 -2
  254. package/dist/lib/compile/precision.d.ts +1 -1
  255. package/dist/lib/compile/precision.d.ts.map +1 -1
  256. package/dist/lib/compile/scope.cjs +44 -16
  257. package/dist/lib/compile/scope.d.ts +7 -5
  258. package/dist/lib/compile/scope.d.ts.map +1 -1
  259. package/dist/lib/compile/style.cjs +2 -2
  260. package/dist/lib/compile/style.d.ts +2 -2
  261. package/dist/lib/compile/style.d.ts.map +1 -1
  262. package/dist/lib/compile/text-metrics.cjs +2 -2
  263. package/dist/lib/compile/text-metrics.d.ts +1 -1
  264. package/dist/lib/composites/{types.cjs → define.cjs} +2 -2
  265. package/dist/lib/composites/define.d.ts +8 -0
  266. package/dist/lib/composites/define.d.ts.map +1 -0
  267. package/dist/lib/composites/index.d.ts +1 -1
  268. package/dist/lib/composites/index.d.ts.map +1 -1
  269. package/dist/lib/composites/types.d.ts +0 -6
  270. package/dist/lib/composites/types.d.ts.map +1 -1
  271. package/dist/lib/geometry/anchor.cjs +47 -0
  272. package/dist/lib/geometry/anchor.d.ts +33 -0
  273. package/dist/lib/geometry/anchor.d.ts.map +1 -0
  274. package/dist/lib/geometry/bend.cjs +3 -3
  275. package/dist/lib/geometry/bend.d.ts +1 -1
  276. package/dist/lib/geometry/circle.cjs +9 -9
  277. package/dist/lib/geometry/circle.d.ts +4 -4
  278. package/dist/lib/geometry/circle.d.ts.map +1 -1
  279. package/dist/lib/geometry/{roundedContour.cjs → contour.cjs} +26 -35
  280. package/dist/lib/geometry/{roundedContour.d.ts → contour.d.ts} +9 -5
  281. package/dist/lib/geometry/contour.d.ts.map +1 -0
  282. package/dist/lib/geometry/diamond.cjs +16 -8
  283. package/dist/lib/geometry/diamond.d.ts +10 -4
  284. package/dist/lib/geometry/diamond.d.ts.map +1 -1
  285. package/dist/lib/geometry/{_edge.cjs → edge.cjs} +1 -1
  286. package/dist/{es/geometry/_edge.d.ts → lib/geometry/edge.d.ts} +1 -1
  287. package/dist/lib/geometry/edge.d.ts.map +1 -0
  288. package/dist/lib/geometry/ellipse.cjs +10 -8
  289. package/dist/lib/geometry/ellipse.d.ts +3 -3
  290. package/dist/lib/geometry/ellipse.d.ts.map +1 -1
  291. package/dist/lib/geometry/index.d.ts +6 -1
  292. package/dist/lib/geometry/index.d.ts.map +1 -1
  293. package/dist/lib/geometry/point.cjs +17 -0
  294. package/dist/lib/geometry/point.d.ts +6 -0
  295. package/dist/lib/geometry/point.d.ts.map +1 -1
  296. package/dist/lib/geometry/rect.cjs +9 -22
  297. package/dist/lib/geometry/rect.d.ts +4 -17
  298. package/dist/lib/geometry/rect.d.ts.map +1 -1
  299. package/dist/lib/geometry/segment.cjs +48 -46
  300. package/dist/lib/geometry/segment.d.ts +7 -0
  301. package/dist/lib/geometry/segment.d.ts.map +1 -1
  302. package/dist/lib/geometry/{_transform.cjs → transform.cjs} +1 -1
  303. package/dist/{es/geometry/_transform.d.ts → lib/geometry/transform.d.ts} +1 -1
  304. package/dist/lib/geometry/transform.d.ts.map +1 -0
  305. package/dist/lib/index.cjs +35 -22
  306. package/dist/lib/index.d.ts +13 -13
  307. package/dist/lib/index.d.ts.map +1 -1
  308. package/dist/lib/ir/animation.cjs +6 -6
  309. package/dist/lib/ir/animation.d.ts +26 -125
  310. package/dist/lib/ir/animation.d.ts.map +1 -1
  311. package/dist/lib/ir/boundary.d.ts +4 -10
  312. package/dist/lib/ir/boundary.d.ts.map +1 -1
  313. package/dist/lib/ir/clip.d.ts +6 -46
  314. package/dist/lib/ir/clip.d.ts.map +1 -1
  315. package/dist/lib/ir/composite.d.ts +2 -14
  316. package/dist/lib/ir/composite.d.ts.map +1 -1
  317. package/dist/lib/ir/coordinate.cjs +1 -1
  318. package/dist/lib/ir/coordinate.d.ts +14 -50
  319. package/dist/lib/ir/coordinate.d.ts.map +1 -1
  320. package/dist/lib/ir/font.d.ts +10 -13
  321. package/dist/lib/ir/font.d.ts.map +1 -1
  322. package/dist/lib/ir/json.cjs +1 -1
  323. package/dist/lib/ir/json.d.ts +1 -1
  324. package/dist/lib/ir/json.d.ts.map +1 -1
  325. package/dist/lib/ir/node.cjs +23 -23
  326. package/dist/lib/ir/node.d.ts +175 -821
  327. package/dist/lib/ir/node.d.ts.map +1 -1
  328. package/dist/lib/ir/paint.cjs +10 -10
  329. package/dist/lib/ir/paint.d.ts +23 -100
  330. package/dist/lib/ir/paint.d.ts.map +1 -1
  331. package/dist/lib/ir/path/arrow.cjs +18 -16
  332. package/dist/lib/ir/path/arrow.d.ts +19 -131
  333. package/dist/lib/ir/path/arrow.d.ts.map +1 -1
  334. package/dist/lib/ir/path/path.cjs +4 -2
  335. package/dist/lib/ir/path/path.d.ts +519 -3065
  336. package/dist/lib/ir/path/path.d.ts.map +1 -1
  337. package/dist/lib/ir/path/step.cjs +74 -22
  338. package/dist/lib/ir/path/step.d.ts +929 -3474
  339. package/dist/lib/ir/path/step.d.ts.map +1 -1
  340. package/dist/lib/ir/path/target.cjs +3 -3
  341. package/dist/lib/ir/path/target.d.ts +40 -121
  342. package/dist/lib/ir/path/target.d.ts.map +1 -1
  343. package/dist/lib/ir/position/at-position.cjs +11 -11
  344. package/dist/lib/ir/position/at-position.d.ts +20 -28
  345. package/dist/lib/ir/position/at-position.d.ts.map +1 -1
  346. package/dist/lib/ir/position/offset-position.d.ts +2 -8
  347. package/dist/lib/ir/position/offset-position.d.ts.map +1 -1
  348. package/dist/lib/ir/scene.d.ts +17 -181
  349. package/dist/lib/ir/scene.d.ts.map +1 -1
  350. package/dist/lib/ir/scope.cjs +10 -7
  351. package/dist/lib/ir/scope.d.ts +315 -7291
  352. package/dist/lib/ir/scope.d.ts.map +1 -1
  353. package/dist/lib/ir/shape.d.ts +2 -8
  354. package/dist/lib/ir/shape.d.ts.map +1 -1
  355. package/dist/lib/ir/text.d.ts +24 -70
  356. package/dist/lib/ir/text.d.ts.map +1 -1
  357. package/dist/lib/ir/transform.cjs +11 -4
  358. package/dist/lib/ir/transform.d.ts +47 -144
  359. package/dist/lib/ir/transform.d.ts.map +1 -1
  360. package/dist/lib/parsers/index.d.ts +3 -3
  361. package/dist/lib/parsers/index.d.ts.map +1 -1
  362. package/dist/lib/parsers/{parseNodeTarget.cjs → node-target.cjs} +10 -8
  363. package/dist/lib/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
  364. package/dist/lib/parsers/node-target.d.ts.map +1 -0
  365. package/dist/lib/parsers/{parseTargetSugar.cjs → target-sugar.cjs} +9 -4
  366. package/dist/{es/parsers/parseTargetSugar.d.ts → lib/parsers/target-sugar.d.ts} +1 -1
  367. package/dist/lib/parsers/target-sugar.d.ts.map +1 -0
  368. package/dist/lib/parsers/{parseWay.cjs → way.cjs} +13 -9
  369. package/dist/{es/parsers/parseWay.d.ts → lib/parsers/way.d.ts} +2 -2
  370. package/dist/lib/parsers/way.d.ts.map +1 -0
  371. package/dist/lib/{pathGenerators → path-generators}/define.cjs +1 -1
  372. package/dist/lib/path-generators/define.d.ts.map +1 -0
  373. package/dist/lib/path-generators/index.d.ts.map +1 -0
  374. package/dist/lib/path-generators/types.d.ts.map +1 -0
  375. package/dist/lib/patterns/define.cjs +10 -0
  376. package/dist/lib/patterns/define.d.ts +9 -0
  377. package/dist/lib/patterns/define.d.ts.map +1 -0
  378. package/dist/lib/patterns/index.cjs +42 -35
  379. package/dist/lib/patterns/index.d.ts +1 -0
  380. package/dist/lib/patterns/index.d.ts.map +1 -1
  381. package/dist/lib/presets/animation.cjs +2 -2
  382. package/dist/lib/primitive/marker.d.ts +7 -7
  383. package/dist/lib/primitive/marker.d.ts.map +1 -1
  384. package/dist/lib/primitive/paint.d.ts +1 -1
  385. package/dist/lib/primitive/path.d.ts +1 -1
  386. package/dist/lib/shapes/arc.cjs +26 -7
  387. package/dist/lib/shapes/arc.d.ts.map +1 -1
  388. package/dist/lib/shapes/{_contour.cjs → contour.cjs} +14 -1
  389. package/dist/{es/shapes/_contour.d.ts → lib/shapes/contour.d.ts} +6 -3
  390. package/dist/lib/shapes/contour.d.ts.map +1 -0
  391. package/dist/lib/shapes/ellipse.cjs +2 -2
  392. package/dist/lib/shapes/index.cjs +1 -1
  393. package/dist/lib/shapes/index.d.ts +1 -1
  394. package/dist/lib/shapes/index.d.ts.map +1 -1
  395. package/dist/lib/shapes/polygon.cjs +29 -24
  396. package/dist/lib/shapes/polygon.d.ts +1 -1
  397. package/dist/lib/shapes/polygon.d.ts.map +1 -1
  398. package/dist/lib/shapes/rectangle.cjs +12 -12
  399. package/dist/lib/shapes/sector.cjs +41 -33
  400. package/dist/lib/shapes/sector.d.ts.map +1 -1
  401. package/dist/lib/shapes/{_shared.cjs → shared.cjs} +12 -15
  402. package/dist/lib/shapes/{_shared.d.ts → shared.d.ts} +7 -10
  403. package/dist/lib/shapes/shared.d.ts.map +1 -0
  404. package/dist/lib/shapes/star.cjs +9 -18
  405. package/dist/lib/shapes/star.d.ts.map +1 -1
  406. package/dist/lib/shapes/types.d.ts +10 -3
  407. package/dist/lib/shapes/types.d.ts.map +1 -1
  408. package/dist/lib/types.d.ts +1 -1
  409. package/package.json +3 -4
  410. package/dist/es/compile/lowerComposites.d.ts.map +0 -1
  411. package/dist/es/geometry/_edge.d.ts.map +0 -1
  412. package/dist/es/geometry/_transform.d.ts.map +0 -1
  413. package/dist/es/geometry/roundedContour.d.ts.map +0 -1
  414. package/dist/es/parsers/parseNodeTarget.d.ts.map +0 -1
  415. package/dist/es/parsers/parseTargetSugar.d.ts.map +0 -1
  416. package/dist/es/parsers/parseWay.d.ts.map +0 -1
  417. package/dist/es/pathGenerators/define.d.ts.map +0 -1
  418. package/dist/es/pathGenerators/index.d.ts.map +0 -1
  419. package/dist/es/pathGenerators/types.d.ts.map +0 -1
  420. package/dist/es/shapes/_contour.d.ts.map +0 -1
  421. package/dist/es/shapes/_shared.d.ts.map +0 -1
  422. package/dist/lib/compile/lowerComposites.d.ts.map +0 -1
  423. package/dist/lib/geometry/_edge.d.ts.map +0 -1
  424. package/dist/lib/geometry/_transform.d.ts.map +0 -1
  425. package/dist/lib/geometry/roundedContour.d.ts.map +0 -1
  426. package/dist/lib/parsers/parseNodeTarget.d.ts.map +0 -1
  427. package/dist/lib/parsers/parseTargetSugar.d.ts.map +0 -1
  428. package/dist/lib/parsers/parseWay.d.ts.map +0 -1
  429. package/dist/lib/pathGenerators/define.d.ts.map +0 -1
  430. package/dist/lib/pathGenerators/index.d.ts.map +0 -1
  431. package/dist/lib/pathGenerators/types.d.ts.map +0 -1
  432. package/dist/lib/shapes/_contour.d.ts.map +0 -1
  433. package/dist/lib/shapes/_shared.d.ts.map +0 -1
  434. /package/dist/es/{pathGenerators → path-generators}/define.d.ts +0 -0
  435. /package/dist/es/{pathGenerators → path-generators}/index.d.ts +0 -0
  436. /package/dist/es/{pathGenerators → path-generators}/types.d.ts +0 -0
  437. /package/dist/lib/{pathGenerators → path-generators}/define.d.ts +0 -0
  438. /package/dist/lib/{pathGenerators → path-generators}/index.d.ts +0 -0
  439. /package/dist/lib/{pathGenerators → path-generators}/types.d.ts +0 -0
@@ -1,14 +1,20 @@
1
+ const require_point = require("./point.cjs");
1
2
  //#region src/geometry/segment.ts
2
3
  var DEG_TO_RAD = Math.PI / 180;
3
- var normalize = (v) => {
4
- const len = Math.hypot(v[0], v[1]);
5
- if (len === 0) return [1, 0];
6
- return [v[0] / len, v[1] / len];
4
+ var sampleEllipseArc = (center, rx, ry, startAngleDeg, endAngleDeg, t) => {
5
+ const rad = (startAngleDeg + t * (endAngleDeg - startAngleDeg)) * DEG_TO_RAD;
6
+ const cos = Math.cos(rad);
7
+ const sin = Math.sin(rad);
8
+ const sweepSign = endAngleDeg >= startAngleDeg ? 1 : -1;
9
+ return {
10
+ point: [center[0] + rx * cos, center[1] + ry * sin],
11
+ tangent: require_point.point.normalize([-rx * sin * sweepSign, ry * cos * sweepSign])
12
+ };
7
13
  };
8
14
  /** 直线段 from → to */
9
15
  var lineSegmentSample = (from, to, t) => ({
10
16
  point: [from[0] + (to[0] - from[0]) * t, from[1] + (to[1] - from[1]) * t],
11
- tangent: normalize([to[0] - from[0], to[1] - from[1]])
17
+ tangent: require_point.point.normalize([to[0] - from[0], to[1] - from[1]])
12
18
  });
13
19
  /**
14
20
  * 二次贝塞尔 from → control → to
@@ -16,9 +22,12 @@ var lineSegmentSample = (from, to, t) => ({
16
22
  */
17
23
  var quadSegmentSample = (from, control, to, t) => {
18
24
  const u = 1 - t;
25
+ const point$1 = [u * u * from[0] + 2 * u * t * control[0] + t * t * to[0], u * u * from[1] + 2 * u * t * control[1] + t * t * to[1]];
26
+ const tx = 2 * u * (control[0] - from[0]) + 2 * t * (to[0] - control[0]);
27
+ const ty = 2 * u * (control[1] - from[1]) + 2 * t * (to[1] - control[1]);
19
28
  return {
20
- point: [u * u * from[0] + 2 * u * t * control[0] + t * t * to[0], u * u * from[1] + 2 * u * t * control[1] + t * t * to[1]],
21
- tangent: normalize([2 * u * (control[0] - from[0]) + 2 * t * (to[0] - control[0]), 2 * u * (control[1] - from[1]) + 2 * t * (to[1] - control[1])])
29
+ point: point$1,
30
+ tangent: require_point.point.normalize([tx, ty])
22
31
  };
23
32
  };
24
33
  /**
@@ -27,9 +36,12 @@ var quadSegmentSample = (from, control, to, t) => {
27
36
  */
28
37
  var cubicSegmentSample = (from, c1, c2, to, t) => {
29
38
  const u = 1 - t;
39
+ const point$2 = [u * u * u * from[0] + 3 * u * u * t * c1[0] + 3 * u * t * t * c2[0] + t * t * t * to[0], u * u * u * from[1] + 3 * u * u * t * c1[1] + 3 * u * t * t * c2[1] + t * t * t * to[1]];
40
+ const tx = 3 * u * u * (c1[0] - from[0]) + 6 * u * t * (c2[0] - c1[0]) + 3 * t * t * (to[0] - c2[0]);
41
+ const ty = 3 * u * u * (c1[1] - from[1]) + 6 * u * t * (c2[1] - c1[1]) + 3 * t * t * (to[1] - c2[1]);
30
42
  return {
31
- point: [u * u * u * from[0] + 3 * u * u * t * c1[0] + 3 * u * t * t * c2[0] + t * t * t * to[0], u * u * u * from[1] + 3 * u * u * t * c1[1] + 3 * u * t * t * c2[1] + t * t * t * to[1]],
32
- tangent: normalize([3 * u * u * (c1[0] - from[0]) + 6 * u * t * (c2[0] - c1[0]) + 3 * t * t * (to[0] - c2[0]), 3 * u * u * (c1[1] - from[1]) + 6 * u * t * (c2[1] - c1[1]) + 3 * t * t * (to[1] - c2[1])])
43
+ point: point$2,
44
+ tangent: require_point.point.normalize([tx, ty])
33
45
  };
34
46
  };
35
47
  /**
@@ -41,46 +53,35 @@ var foldSegmentSample = (from, corner, to, t) => {
41
53
  return lineSegmentSample(corner, to, t * 2 - 1);
42
54
  };
43
55
  /** 弧段(角度度数,与 ir/path arc 同约定);切线沿扫描方向:endAngle ≥ start 取 (-sin,cos),否则反向 */
44
- var arcSegmentSample = (center, radius, startAngleDeg, endAngleDeg, t) => {
45
- const rad = (startAngleDeg + t * (endAngleDeg - startAngleDeg)) * DEG_TO_RAD;
46
- const cos = Math.cos(rad);
47
- const sin = Math.sin(rad);
48
- const sweepSign = endAngleDeg >= startAngleDeg ? 1 : -1;
49
- return {
50
- point: [center[0] + radius * cos, center[1] + radius * sin],
51
- tangent: normalize([-sin * sweepSign, cos * sweepSign])
52
- };
53
- };
56
+ var arcSegmentSample = (center, radius, startAngleDeg, endAngleDeg, t) => sampleEllipseArc(center, radius, radius, startAngleDeg, endAngleDeg, t);
54
57
  /** 椭圆弧段(参数角度数,与 ir/path arc 同约定);点用 (rx·cos, ry·sin),切线沿扫描方向 */
55
- var ellipseArcSegmentSample = (center, rx, ry, startAngleDeg, endAngleDeg, t) => {
56
- const rad = (startAngleDeg + t * (endAngleDeg - startAngleDeg)) * DEG_TO_RAD;
57
- const cos = Math.cos(rad);
58
- const sin = Math.sin(rad);
59
- const sweepSign = endAngleDeg >= startAngleDeg ? 1 : -1;
60
- return {
61
- point: [center[0] + rx * cos, center[1] + ry * sin],
62
- tangent: normalize([-rx * sin * sweepSign, ry * cos * sweepSign])
63
- };
64
- };
58
+ var ellipseArcSegmentSample = (center, rx, ry, startAngleDeg, endAngleDeg, t) => sampleEllipseArc(center, rx, ry, startAngleDeg, endAngleDeg, t);
65
59
  /** 整圆,从 0°(east) 开始,与 compile/path circlePath 输出方向(右→左→右,sweep=1)一致 */
66
- var circleSegmentSample = (center, radius, t) => {
67
- const rad = t * 360 * DEG_TO_RAD;
68
- const cos = Math.cos(rad);
69
- const sin = Math.sin(rad);
70
- return {
71
- point: [center[0] + radius * cos, center[1] + radius * sin],
72
- tangent: normalize([-sin, cos])
73
- };
74
- };
60
+ var circleSegmentSample = (center, radius, t) => sampleEllipseArc(center, radius, radius, 0, 360, t);
75
61
  /** 整椭圆,参数化 (rx·cos(2πt), ry·sin(2πt)) */
76
- var ellipseSegmentSample = (center, rx, ry, t) => {
77
- const rad = t * 360 * DEG_TO_RAD;
78
- const cos = Math.cos(rad);
79
- const sin = Math.sin(rad);
80
- return {
81
- point: [center[0] + rx * cos, center[1] + ry * sin],
82
- tangent: normalize([-rx * sin, ry * cos])
83
- };
62
+ var ellipseSegmentSample = (center, rx, ry, t) => sampleEllipseArc(center, rx, ry, 0, 360, t);
63
+ /**
64
+ * 矩形周长段:两对角 闭合周长上 t∈[0,1] 的点 / 切线
65
+ * @description 4 条边按 rectOutline 的顺时针绕向(y-down:左上→右上→右下→左下→闭合回左上)均分参数,
66
+ * 每条边占 1/4 t;切线 = 该边方向。忽略 cornerRadius(采尖角折线周长),mark 落在直边上精确、
67
+ * 贴近圆角处略偏轮廓——对中段 marking 足够。退化(零宽 / 零高)由 lineSegmentSample 的零切线回退兜底。
68
+ */
69
+ var rectPerimeterSample = (from, to, t) => {
70
+ const x0 = Math.min(from[0], to[0]);
71
+ const x1 = Math.max(from[0], to[0]);
72
+ const y0 = Math.min(from[1], to[1]);
73
+ const y1 = Math.max(from[1], to[1]);
74
+ const corners = [
75
+ [x0, y0],
76
+ [x1, y0],
77
+ [x1, y1],
78
+ [x0, y1],
79
+ [x0, y0]
80
+ ];
81
+ const scaled = (t <= 0 ? 0 : t >= 1 ? 1 : t) * 4;
82
+ const edge = Math.min(Math.floor(scaled), 3);
83
+ const localT = scaled - edge;
84
+ return lineSegmentSample(corners[edge], corners[edge + 1], localT);
84
85
  };
85
86
  //#endregion
86
87
  exports.arcSegmentSample = arcSegmentSample;
@@ -91,3 +92,4 @@ exports.ellipseSegmentSample = ellipseSegmentSample;
91
92
  exports.foldSegmentSample = foldSegmentSample;
92
93
  exports.lineSegmentSample = lineSegmentSample;
93
94
  exports.quadSegmentSample = quadSegmentSample;
95
+ exports.rectPerimeterSample = rectPerimeterSample;
@@ -34,4 +34,11 @@ export declare const ellipseArcSegmentSample: (center: Position, rx: number, ry:
34
34
  export declare const circleSegmentSample: (center: Position, radius: number, t: number) => SegmentSample;
35
35
  /** 整椭圆,参数化 (rx·cos(2πt), ry·sin(2πt)) */
36
36
  export declare const ellipseSegmentSample: (center: Position, rx: number, ry: number, t: number) => SegmentSample;
37
+ /**
38
+ * 矩形周长段:两对角 → 闭合周长上 t∈[0,1] 的点 / 切线
39
+ * @description 4 条边按 rectOutline 的顺时针绕向(y-down:左上→右上→右下→左下→闭合回左上)均分参数,
40
+ * 每条边占 1/4 t;切线 = 该边方向。忽略 cornerRadius(采尖角折线周长),mark 落在直边上精确、
41
+ * 贴近圆角处略偏轮廓——对中段 marking 足够。退化(零宽 / 零高)由 lineSegmentSample 的零切线回退兜底。
42
+ */
43
+ export declare const rectPerimeterSample: (from: Position, to: Position, t: number) => SegmentSample;
37
44
  //# sourceMappingURL=segment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../../src/geometry/segment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAiBxC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,wBAAwB;IACxB,KAAK,EAAE,QAAQ,CAAC;IAChB,iCAAiC;IACjC,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAQF,oBAAoB;AACpB,eAAO,MAAM,iBAAiB,GAC5B,MAAM,QAAQ,E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,GAC9B,MAAM,QAAQ,EACd,IAAI,QAAQ,EACZ,GAAG,MAAM,KACR,aAkBF,CAAC"}
@@ -1,4 +1,4 @@
1
- //#region src/geometry/_transform.ts
1
+ //#region src/geometry/transform.ts
2
2
  /**
3
3
  * 本地坐标(以中心为原点)→ 世界坐标
4
4
  * @description rotate=0 / 缺省时退化为平移;非零时按右手系绕中心旋转后再平移
@@ -18,4 +18,4 @@ export declare const localToWorld: (s: CenteredShape, local: Position) => Positi
18
18
  * @description 先反平移到中心、再反旋转回本地基;旋转矩阵转置即逆
19
19
  */
20
20
  export declare const worldToLocal: (s: CenteredShape, world: Position) => Position;
21
- //# sourceMappingURL=_transform.d.ts.map
21
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/geometry/transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,YAAY;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,aAAa,EAAE,OAAO,QAAQ,KAAG,QAShE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,aAAa,EAAE,OAAO,QAAQ,KAAG,QAQhE,CAAC"}
@@ -22,30 +22,32 @@ const require_transform = require("./ir/transform.cjs");
22
22
  const require_scope = require("./ir/scope.cjs");
23
23
  const require_composite = require("./ir/composite.cjs");
24
24
  const require_scene = require("./ir/scene.cjs");
25
- const require__transform = require("./geometry/_transform.cjs");
25
+ const require_transform$1 = require("./geometry/transform.cjs");
26
26
  const require_rect = require("./geometry/rect.cjs");
27
27
  const require_define = require("./shapes/define.cjs");
28
28
  const require_ellipse = require("./geometry/ellipse.cjs");
29
+ const require_anchor = require("./geometry/anchor.cjs");
30
+ const require_polar = require("./geometry/polar.cjs");
31
+ const require_point = require("./geometry/point.cjs");
29
32
  const require_index = require("./shapes/index.cjs");
33
+ const require_define$1 = require("./arrows/define.cjs");
30
34
  const require_index$1 = require("./arrows/index.cjs");
35
+ const require_define$2 = require("./patterns/define.cjs");
31
36
  const require_index$2 = require("./patterns/index.cjs");
37
+ const require_constant = require("./compile/constant.cjs");
32
38
  const require_text_metrics = require("./compile/text-metrics.cjs");
33
39
  const require_layout = require("./compile/layout.cjs");
34
40
  const require_compile = require("./compile/compile.cjs");
35
- const require_parseNodeTarget = require("./parsers/parseNodeTarget.cjs");
36
- const require_parseTargetSugar = require("./parsers/parseTargetSugar.cjs");
37
- const require_parseWay = require("./parsers/parseWay.cjs");
41
+ const require_node_target = require("./parsers/node-target.cjs");
42
+ const require_target_sugar = require("./parsers/target-sugar.cjs");
43
+ const require_way = require("./parsers/way.cjs");
38
44
  const require_animation$1 = require("./presets/animation.cjs");
39
- const require_polar = require("./geometry/polar.cjs");
40
- const require_point = require("./geometry/point.cjs");
41
45
  const require_circle = require("./geometry/circle.cjs");
42
46
  const require_diamond = require("./geometry/diamond.cjs");
43
- const require_define$1 = require("./pathGenerators/define.cjs");
44
- const require_types = require("./composites/types.cjs");
47
+ const require_define$3 = require("./path-generators/define.cjs");
48
+ const require_define$4 = require("./composites/define.cjs");
45
49
  exports.ARROW_MARKER_DEFAULT_SIZE = require_arrow.ARROW_MARKER_DEFAULT_SIZE;
46
50
  exports.ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH = require_arrow.ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH;
47
- exports.ARROW_SHAPES = require_arrow.ARROW_SHAPES;
48
- exports.AT_DIRECTIONS = require_at_position.AT_DIRECTIONS;
49
51
  exports.AbsoluteTargetSchema = require_between_position.AbsoluteTargetSchema;
50
52
  exports.AnchorRefSchema = require_target.AnchorRefSchema;
51
53
  exports.AnimationDirection = require_animation.AnimationDirection;
@@ -58,6 +60,9 @@ exports.ArcStepSchema = require_step.ArcStepSchema;
58
60
  exports.ArrowDefaultSchema = require_scope.ArrowDefaultSchema;
59
61
  exports.ArrowDetailSchema = require_arrow.ArrowDetailSchema;
60
62
  exports.ArrowEndDetailSchema = require_arrow.ArrowEndDetailSchema;
63
+ exports.ArrowMarkSchema = require_path.ArrowMarkSchema;
64
+ exports.ArrowShape = require_arrow.ArrowShape;
65
+ exports.AtDirection = require_at_position.AtDirection;
61
66
  exports.AtPositionSchema = require_at_position.AtPositionSchema;
62
67
  exports.BUILTIN_ARROWS = require_index$1.BUILTIN_ARROWS;
63
68
  exports.BUILTIN_PATTERNS = require_index$2.BUILTIN_PATTERNS;
@@ -66,10 +71,13 @@ exports.BendStepSchema = require_step.BendStepSchema;
66
71
  exports.BetweenPositionSchema = require_between_position.BetweenPositionSchema;
67
72
  exports.Boundary = require_boundary.Boundary;
68
73
  exports.BoundarySchema = require_boundary.BoundarySchema;
74
+ exports.BuiltinShape = require_node.BuiltinShape;
69
75
  exports.CURRENT_IR_VERSION = require_scene.CURRENT_IR_VERSION;
70
76
  exports.ChildSchema = require_scene.ChildSchema;
71
77
  exports.CirclePathStepSchema = require_step.CirclePathStepSchema;
72
78
  exports.ClipSpecSchema = require_clip.ClipSpecSchema;
79
+ exports.CompassAnchor = require_anchor.CompassAnchor;
80
+ exports.CompileWarningCode = require_constant.CompileWarningCode;
73
81
  exports.CompositeBaseSchema = require_composite.CompositeBaseSchema;
74
82
  exports.ControlPointSchema = require_step.ControlPointSchema;
75
83
  exports.CoordinateSchema = require_coordinate.CoordinateSchema;
@@ -77,10 +85,11 @@ exports.CubicStepSchema = require_step.CubicStepSchema;
77
85
  exports.CurveStepSchema = require_step.CurveStepSchema;
78
86
  exports.CycleStepSchema = require_step.CycleStepSchema;
79
87
  exports.DEFAULT_ARROW_SHAPE = require_arrow.DEFAULT_ARROW_SHAPE;
80
- exports.DrawWay = require_parseWay.DrawWay;
88
+ exports.DrawWay = require_way.DrawWay;
81
89
  exports.EasingSchema = require_animation.EasingSchema;
82
90
  exports.EllipsePathStepSchema = require_step.EllipsePathStepSchema;
83
91
  exports.FoldStepSchema = require_step.FoldStepSchema;
92
+ exports.FoldStepVia = require_step.FoldStepVia;
84
93
  exports.FontSchema = require_font.FontSchema;
85
94
  exports.GeneratorStepSchema = require_step.GeneratorStepSchema;
86
95
  exports.GradientStopSchema = require_paint.GradientStopSchema;
@@ -92,21 +101,20 @@ exports.LabelDefaultSchema = require_scope.LabelDefaultSchema;
92
101
  exports.LineSpecSchema = require_text.LineSpecSchema;
93
102
  exports.LineStepSchema = require_step.LineStepSchema;
94
103
  exports.MoveStepSchema = require_step.MoveStepSchema;
95
- exports.NODE_SHAPES = require_node.NODE_SHAPES;
96
- exports.NODE_TEXT_ALIGNS = require_node.NODE_TEXT_ALIGNS;
97
104
  exports.NodeDefaultSchema = require_scope.NodeDefaultSchema;
98
105
  exports.NodeLabelSchema = require_node.NodeLabelSchema;
99
106
  exports.NodeSchema = require_node.NodeSchema;
100
107
  exports.NodeTargetSchema = require_target.NodeTargetSchema;
108
+ exports.NodeTextAlign = require_node.NodeTextAlign;
101
109
  exports.OffsetPositionSchema = require_offset_position.OffsetPositionSchema;
102
110
  exports.OriginSchema = require_animation.OriginSchema;
103
- exports.PATTERN_SHAPES = require_paint.PATTERN_SHAPES;
104
111
  exports.PaintSpecSchema = require_paint.PaintSpecSchema;
105
112
  exports.PathDefaultSchema = require_scope.PathDefaultSchema;
113
+ exports.PathScaleSchema = require_path.PathScaleSchema;
106
114
  exports.PathSchema = require_path.PathSchema;
115
+ exports.PatternShape = require_paint.PatternShape;
107
116
  exports.PolarPositionSchema = require_polar_position.PolarPositionSchema;
108
117
  exports.PositionSchema = require_position.PositionSchema;
109
- exports.RECT_ANCHORS = require_rect.RECT_ANCHORS;
110
118
  exports.RectangleStepSchema = require_step.RectangleStepSchema;
111
119
  exports.RelativeAccumulateTargetSchema = require_target.RelativeAccumulateTargetSchema;
112
120
  exports.RelativeTargetSchema = require_target.RelativeTargetSchema;
@@ -120,14 +128,17 @@ exports.TextBlockSchema = require_text.TextBlockSchema;
120
128
  exports.TransformSchema = require_transform.TransformSchema;
121
129
  exports.TriggerSchema = require_animation.TriggerSchema;
122
130
  exports.ViewBoxSchema = require_scene.ViewBoxSchema;
131
+ exports.WebAnchor = require_anchor.WebAnchor;
123
132
  exports.blink = require_animation$1.blink;
124
133
  exports.cameraTo = require_animation$1.cameraTo;
125
134
  exports.circle = require_circle.circle;
126
135
  exports.colorShift = require_animation$1.colorShift;
127
136
  exports.compileToScene = require_compile.compileToScene;
128
137
  exports.computeLayout = require_layout.computeLayout;
129
- exports.defineComposite = require_types.defineComposite;
130
- exports.definePathGenerator = require_define$1.definePathGenerator;
138
+ exports.defineArrow = require_define$1.defineArrow;
139
+ exports.defineComposite = require_define$4.defineComposite;
140
+ exports.definePathGenerator = require_define$3.definePathGenerator;
141
+ exports.definePattern = require_define$2.definePattern;
131
142
  exports.defineShape = require_define.defineShape;
132
143
  exports.diamond = require_diamond.diamond;
133
144
  exports.drawOn = require_animation$1.drawOn;
@@ -135,13 +146,15 @@ exports.ellipse = require_ellipse.ellipse;
135
146
  exports.fadeIn = require_animation$1.fadeIn;
136
147
  exports.fallbackMeasurer = require_text_metrics.fallbackMeasurer;
137
148
  exports.flash = require_animation$1.flash;
149
+ exports.formatCompileWarning = require_constant.formatCompileWarning;
138
150
  exports.grow = require_animation$1.grow;
139
151
  exports.growUp = require_animation$1.growUp;
140
- exports.localToWorld = require__transform.localToWorld;
152
+ exports.localToWorld = require_transform$1.localToWorld;
141
153
  exports.loop = require_animation$1.loop;
142
- exports.parseNodeTarget = require_parseNodeTarget.parseNodeTarget;
143
- exports.parseTargetSugar = require_parseTargetSugar.parseTargetSugar;
144
- exports.parseWay = require_parseWay.parseWay;
154
+ exports.normalizeCompassAnchor = require_anchor.normalizeCompassAnchor;
155
+ exports.parseNodeTarget = require_node_target.parseNodeTarget;
156
+ exports.parseTargetSugar = require_target_sugar.parseTargetSugar;
157
+ exports.parseWay = require_way.parseWay;
145
158
  exports.point = require_point.point;
146
159
  exports.polar = require_polar.polar;
147
160
  exports.pulse = require_animation$1.pulse;
@@ -151,4 +164,4 @@ exports.slideIn = require_animation$1.slideIn;
151
164
  exports.spin = require_animation$1.spin;
152
165
  exports.stagger = require_animation$1.stagger;
153
166
  exports.wiggle = require_animation$1.wiggle;
154
- exports.worldToLocal = require__transform.worldToLocal;
167
+ exports.worldToLocal = require_transform$1.worldToLocal;
@@ -2,11 +2,11 @@
2
2
  * @retikz/core 公开 API
3
3
  * @description 任何 framework adapter(@retikz/react、@retikz/vue、@retikz/render/canvas、@retikz/ssr)只能 import 本文件导出内容,不准走子路径。本包零 React/零 DOM 依赖
4
4
  */
5
- export { PositionSchema, PolarPositionSchema, AtPositionSchema, OffsetPositionSchema, AT_DIRECTIONS, TargetSchema, AnchorRefSchema, NodeTargetSchema, RelativeTargetSchema, RelativeAccumulateTargetSchema, AbsoluteTargetSchema, BetweenPositionSchema, MoveStepSchema, LineStepSchema, FoldStepSchema, CycleStepSchema, CurveStepSchema, CubicStepSchema, BendStepSchema, ArcStepSchema, CirclePathStepSchema, EllipsePathStepSchema, RectangleStepSchema, GeneratorStepSchema, ControlPointSchema, StepLabelSchema, StepSchema, NodeSchema, NodeLabelSchema, ShapeRefSchema, CoordinateSchema, FontSchema, TextBlockSchema, LineSpecSchema, PathSchema, ArrowDetailSchema, ArrowEndDetailSchema, ScopeSchema, CompositeBaseSchema, NodeDefaultSchema, PathDefaultSchema, LabelDefaultSchema, ArrowDefaultSchema, TransformSchema, ChildSchema, SceneSchema, CURRENT_IR_VERSION, PaintSpecSchema, GradientStopSchema, JsonValueSchema, JsonObjectSchema, ClipSpecSchema, ViewBoxSchema, } from './ir';
6
- export type { IRPosition, IRAtPosition, IROffsetPosition, AtDirection, IRTarget, IRAnchorRef, IRNodeTarget, IRRelativeTarget, IRRelativeAccumulateTarget, IRAbsoluteTarget, IRBetweenPosition, IRMoveStep, IRLineStep, IRFoldStep, IRCycleStep, IRCurveStep, IRCubicStep, IRBendStep, IRArcStep, IRCirclePathStep, IREllipsePathStep, IRRectangleStep, IRGeneratorStep, IRControlPoint, IRStepLabel, IRStep, IRNode, IRNodeLabel, IRShapeRef, IRCoordinate, IRFont, IRLineSpec, IRTextBlock, IRPath, IRScope, IRComposite, IRNodeDefault, IRPathDefault, IRLabelDefault, IRArrowDefault, StyleChannel, IRTransform, IRTranslateTransform, IRPolarTranslateTransform, IRAtTranslateTransform, IROffsetTranslateTransform, IRRotateTransform, IRScaleTransform, IRChild, IR, ArrowShape, BuiltinArrowName, ArrowShapeName, IRArrowDetail, IRArrowEndDetail, NodeShape, BuiltinShapeName, NodeTextAlign, PatternShapeName, BuiltinPatternName, IRPaintSpec, IRGradientStop, JsonValue, IRJsonObject, IRClipSpec, IRViewBox, } from './ir';
7
- export { ARROW_SHAPES, DEFAULT_ARROW_SHAPE, HOLLOW_ARROW_SHAPES, ARROW_MARKER_DEFAULT_SIZE, ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH, NODE_SHAPES, NODE_TEXT_ALIGNS, PATTERN_SHAPES, Boundary, BoundarySchema, AnimationProperty, AnimationEasing, AnimationDirection, AnimationFill, AnimationTrigger, AnimationTrackSchema, KeyframeSchema, TriggerSchema, EasingSchema, OriginSchema, } from './ir';
8
- export type { BoundaryKeyword, IRBoundary } from './ir';
9
- export type { BuiltinAnimationProperty, AnimationPropertyRef, AnimationEasingName, AnimationDirectionName, AnimationFillName, AnimationTriggerName, IRAnimationTrack, IRKeyframe, IRAnimationTrigger, IRAnimationOrigin, } from './ir';
5
+ export { PositionSchema, PolarPositionSchema, AtPositionSchema, OffsetPositionSchema, AtDirection, TargetSchema, AnchorRefSchema, NodeTargetSchema, RelativeTargetSchema, RelativeAccumulateTargetSchema, AbsoluteTargetSchema, BetweenPositionSchema, MoveStepSchema, LineStepSchema, FoldStepSchema, FoldStepVia, CycleStepSchema, CurveStepSchema, CubicStepSchema, BendStepSchema, ArcStepSchema, CirclePathStepSchema, EllipsePathStepSchema, RectangleStepSchema, GeneratorStepSchema, ControlPointSchema, StepLabelSchema, StepSchema, NodeSchema, NodeLabelSchema, ShapeRefSchema, CoordinateSchema, FontSchema, TextBlockSchema, LineSpecSchema, PathSchema, PathScaleSchema, ArrowMarkSchema, ArrowDetailSchema, ArrowEndDetailSchema, ScopeSchema, CompositeBaseSchema, NodeDefaultSchema, PathDefaultSchema, LabelDefaultSchema, ArrowDefaultSchema, TransformSchema, ChildSchema, SceneSchema, CURRENT_IR_VERSION, PaintSpecSchema, GradientStopSchema, JsonValueSchema, JsonObjectSchema, ClipSpecSchema, ViewBoxSchema, } from './ir';
6
+ export type { IRPosition, IRAtPosition, IROffsetPosition, AtDirectionValue, IRTarget, IRAnchorRef, IRNodeTarget, IRRelativeTarget, IRRelativeAccumulateTarget, IRAbsoluteTarget, IRBetweenPosition, IRMoveStep, IRLineStep, IRFoldStep, FoldStepViaValue, IRCycleStep, IRCurveStep, IRCubicStep, IRBendStep, IRArcStep, IRCirclePathStep, IREllipsePathStep, IRRectangleStep, IRGeneratorStep, IRControlPoint, IRStepLabel, IRStep, IRNode, IRNodeLabel, IRShapeRef, IRCoordinate, IRFont, IRLineSpec, IRTextBlock, IRPath, IRPathScale, IRArrowMark, IRScope, IRComposite, IRNodeDefault, IRPathDefault, IRLabelDefault, IRArrowDefault, StyleChannel, IRTransform, IRTranslateTransform, IRPolarTranslateTransform, IRAtTranslateTransform, IROffsetTranslateTransform, IRBetweenTranslateTransform, IRRotateTransform, IRScaleTransform, IRChild, IR, ArrowShapeValue, BuiltinArrowName, ArrowShapeName, IRArrowDetail, IRArrowEndDetail, NodeShape, BuiltinShapeName, BuiltinShapeValue, NodeTextAlignValue, PatternShapeValue, PatternShapeName, BuiltinPatternName, IRPaintSpec, IRGradientStop, JsonValue, IRJsonObject, IRClipSpec, IRViewBox, } from './ir';
7
+ export { ArrowShape, DEFAULT_ARROW_SHAPE, HOLLOW_ARROW_SHAPES, ARROW_MARKER_DEFAULT_SIZE, ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH, BuiltinShape, NodeTextAlign, PatternShape, Boundary, BoundarySchema, AnimationProperty, AnimationEasing, AnimationDirection, AnimationFill, AnimationTrigger, AnimationTrackSchema, KeyframeSchema, TriggerSchema, EasingSchema, OriginSchema, } from './ir';
8
+ export type { BoundaryValue, IRBoundary } from './ir';
9
+ export type { BuiltinAnimationProperty, AnimationPropertyRef, AnimationEasingValue, AnimationDirectionValue, AnimationFillValue, AnimationTriggerValue, IRAnimationTrack, IRKeyframe, IRAnimationTrigger, IRAnimationOrigin, } from './ir';
10
10
  export type { ScenePrimitive, RectPrim, EllipsePrim, TextPrim, TextLine, PathPrim, PathCommand,
11
11
  /** 7 个 named PathCommand 分支(便于 wrapper / Pick<>) */
12
12
  MovePathCommand, LinePathCommand, QuadPathCommand, CubicPathCommand, ArcPathCommand, EllipseArcPathCommand, ClosePathCommand, ArrowEndSpec, GroupPrim, Transform,
@@ -18,22 +18,22 @@ ClipResource, ClipShape,
18
18
  ResolvedPatternTile,
19
19
  /** marker 窄子集(ArrowDefinition.emit 产物,renderer-agnostic) */
20
20
  MarkerPrimitive, MarkerPathPrim, MarkerEllipsePrim, MarkerRectPrim, MarkerGroupPrim, MarkerPathCommand, MarkerFill, } from './primitive';
21
- export type { FontSpec, TextMetrics, TextMeasurer, CompileOptions, CompileWarning, } from './compile';
22
- export { computeLayout, fallbackMeasurer, compileToScene } from './compile';
21
+ export type { FontSpec, TextMetrics, TextMeasurer, CompileOptions, CompileWarning, CompileWarningCodeValue, } from './compile';
22
+ export { computeLayout, fallbackMeasurer, compileToScene, CompileWarningCode, formatCompileWarning } from './compile';
23
23
  export type { WayItem, WayDSL, WayCycle, WayVia, WayRelativeItem, WayLabel, WayLabelOp, } from './parsers';
24
24
  export { parseWay, DrawWay, parseTargetSugar, parseNodeTarget } from './parsers';
25
25
  export { fadeIn, drawOn, scaleIn, grow, growUp, slideIn, colorShift, cameraTo, pulse, spin, loop, flash, blink, wiggle, stagger, } from './presets';
26
26
  export type { AnimationPresetOptions, ScaleInOptions, GrowUpOptions, SlideInOptions, ColorShiftOptions, CameraToOptions, PulseOptions, SpinOptions, LoopOptions, FlashOptions, BlinkOptions, WiggleOptions, } from './presets';
27
- export type { Position, Rect, RectAnchor, Circle, Ellipse, Diamond, PolarPosition, } from './geometry';
28
- export { point, rect, circle, ellipse, diamond, RECT_ANCHORS, polar } from './geometry';
27
+ export type { Position, CompassAnchorValue, AnchorInput, WebAnchorValue, Rect, Circle, Ellipse, Diamond, PolarPosition, } from './geometry';
28
+ export { point, CompassAnchor, WebAnchor, normalizeCompassAnchor, rect, circle, ellipse, diamond, polar, } from './geometry';
29
29
  export type { ShapeDefinition, ShapeDefinitionInput, ShapeStyle } from './shapes';
30
30
  export { BUILTIN_SHAPES, defineShape, worldToLocal, localToWorld } from './shapes';
31
31
  export type { ArrowDefinition, ArrowEmitContext } from './arrows';
32
- export { BUILTIN_ARROWS } from './arrows';
32
+ export { BUILTIN_ARROWS, defineArrow } from './arrows';
33
33
  export type { PatternDefinition, PatternEmitContext } from './patterns';
34
- export { BUILTIN_PATTERNS } from './patterns';
35
- export type { PathGeneratorDefinition, PathGeneratorContext } from './pathGenerators';
36
- export { definePathGenerator } from './pathGenerators';
34
+ export { BUILTIN_PATTERNS, definePattern } from './patterns';
35
+ export type { PathGeneratorDefinition, PathGeneratorContext } from './path-generators';
36
+ export { definePathGenerator } from './path-generators';
37
37
  export type { CompositeDefinition } from './composites';
38
38
  export { defineComposite } from './composites';
39
39
  export type { ValueOf, AssertEqual } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB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MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,YAAY,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,WAAW,EACX,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,UAAU,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB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AAC;AAG/C,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -61,7 +61,7 @@ var AnimationTrigger = {
61
61
  Visible: "visible",
62
62
  Manual: "manual"
63
63
  };
64
- var TriggerSchema = zod.z.union([zod.z.nativeEnum(AnimationTrigger), zod.z.object({ onEvent: zod.z.string().min(1).describe("Event name (e.g. \"click\") the runtime binds to start playback; the handler function never enters the IR.") })]).describe("When playback starts: \"load\" (on render, SSR-friendly) / \"visible\" (runtime IntersectionObserver) / \"manual\" (runtime API) / { onEvent } (bridge to hydration; only the event name is stored, never a callback). Defaults to \"load\".");
64
+ var TriggerSchema = zod.z.union([zod.z.enum(AnimationTrigger), zod.z.object({ onEvent: zod.z.string().min(1).describe("Event name (e.g. \"click\") the runtime binds to start playback; the handler function never enters the IR.") })]).describe("When playback starts: \"load\" (on render, SSR-friendly) / \"visible\" (runtime IntersectionObserver) / \"manual\" (runtime API) / { onEvent } (bridge to hydration; only the event name is stored, never a callback). Defaults to \"load\".");
65
65
  var OriginSchema = zod.z.union([zod.z.string().min(1).describe("Named transform pivot reusing the node anchor vocabulary (center / north / south / east / west / north-east / ... / south-west), resolved against the element boundary by the renderer."), zod.z.tuple([zod.z.number().finite(), zod.z.number().finite()]).describe("Explicit pivot in the element local coordinate space [x, y].")]).describe("Transform pivot for scale / scaleX / scaleY / rotate channels: a named anchor or an explicit local-space point. Ignored by non-transform channels. Defaults to the element geometric center.");
66
66
  var AnimationTrackSchema = zod.z.object({
67
67
  property: zod.z.string().min(1).describe("Renderer-agnostic animated channel. Built-in: opacity / fill / stroke / strokeWidth / translateX / translateY / rotate / scale (uniform) / scaleX / scaleY (non-uniform) / pathDraw (0..1 reveal) / viewBox (scene-root camera only). Any other string is a custom channel that passes through to a renderer-registered interpolator. `viewBox` is valid only at the scene root (enforced at compile)."),
@@ -70,8 +70,8 @@ var AnimationTrackSchema = zod.z.object({
70
70
  delay: zod.z.number().finite().nonnegative().optional().describe("Delay before the first iteration, in milliseconds (>= 0). Group-level stagger is compiled by sugar into per-track delays."),
71
71
  easing: EasingSchema.optional().describe("Track-level easing applied to each segment that lacks its own keyframe easing. Defaults to linear."),
72
72
  iterations: zod.z.union([zod.z.number().finite().positive(), zod.z.literal("infinite")]).optional().describe("Total play count (WAAPI iterations): a positive number (may be fractional) or \"infinite\". Omitted = 1 = play once."),
73
- direction: zod.z.nativeEnum(AnimationDirection).optional().describe("Per-iteration playback direction (WAAPI / CSS animation-direction). Defaults to \"normal\"."),
74
- fill: zod.z.nativeEnum(AnimationFill).optional().describe("Value held outside the active interval (WAAPI / CSS fill-mode). Defaults to \"forwards\" so the element settles at its base (end) state, matching the static-settled invariant."),
73
+ direction: zod.z.enum(AnimationDirection).optional().describe("Per-iteration playback direction (WAAPI / CSS animation-direction). Defaults to \"normal\"."),
74
+ fill: zod.z.enum(AnimationFill).optional().describe("Value held outside the active interval (WAAPI / CSS fill-mode). Defaults to \"forwards\" so the element settles at its base (end) state, matching the static-settled invariant."),
75
75
  trigger: TriggerSchema.optional().describe("Playback trigger; defaults to \"load\"."),
76
76
  origin: OriginSchema.optional().describe("Transform pivot for scale / scaleX / scaleY / rotate channels; ignored by other channels. Defaults to the element geometric center.")
77
77
  }).superRefine((track, ctx) => {
@@ -95,19 +95,19 @@ var AnimationTrackSchema = zod.z.object({
95
95
  ];
96
96
  if (track.property === AnimationProperty.ViewBox) {
97
97
  if (!Array.isArray(value) || value.length !== 4) ctx.addIssue({
98
- code: zod.z.ZodIssueCode.custom,
98
+ code: "custom",
99
99
  path,
100
100
  message: "viewBox keyframe value must be a 4-number array [x, y, w, h]"
101
101
  });
102
102
  } else if (track.property === AnimationProperty.Fill || track.property === AnimationProperty.Stroke) {
103
103
  if (typeof value !== "string") ctx.addIssue({
104
- code: zod.z.ZodIssueCode.custom,
104
+ code: "custom",
105
105
  path,
106
106
  message: `${track.property} keyframe value must be a color string`
107
107
  });
108
108
  } else if (numeric.has(track.property)) {
109
109
  if (typeof value !== "number") ctx.addIssue({
110
- code: zod.z.ZodIssueCode.custom,
110
+ code: "custom",
111
111
  path,
112
112
  message: `${track.property} keyframe value must be a number`
113
113
  });