@retikz/core 0.3.0-alpha.4 → 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 (417) 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 +73 -41
  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 +20 -7
  30. package/dist/es/compile/node.d.ts.map +1 -1
  31. package/dist/es/compile/node.js +42 -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 +59 -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 +13 -10
  97. package/dist/es/index.d.ts.map +1 -1
  98. package/dist/es/index.js +19 -14
  99. package/dist/es/ir/animation.d.ts +219 -0
  100. package/dist/es/ir/animation.d.ts.map +1 -0
  101. package/dist/es/ir/animation.js +118 -0
  102. package/dist/es/ir/boundary.d.ts +1 -1
  103. package/dist/es/ir/boundary.d.ts.map +1 -1
  104. package/dist/es/ir/coordinate.d.ts +8 -8
  105. package/dist/es/ir/index.d.ts +1 -0
  106. package/dist/es/ir/index.d.ts.map +1 -1
  107. package/dist/es/ir/node.d.ts +249 -92
  108. package/dist/es/ir/node.d.ts.map +1 -1
  109. package/dist/es/ir/node.js +25 -23
  110. package/dist/es/ir/paint.d.ts +19 -18
  111. package/dist/es/ir/paint.d.ts.map +1 -1
  112. package/dist/es/ir/paint.js +10 -10
  113. package/dist/es/ir/path/arrow.d.ts +39 -38
  114. package/dist/es/ir/path/arrow.d.ts.map +1 -1
  115. package/dist/es/ir/path/arrow.js +18 -16
  116. package/dist/es/ir/path/path.d.ts +1106 -209
  117. package/dist/es/ir/path/path.d.ts.map +1 -1
  118. package/dist/es/ir/path/path.js +3 -1
  119. package/dist/es/ir/path/step.d.ts +932 -20
  120. package/dist/es/ir/path/step.d.ts.map +1 -1
  121. package/dist/es/ir/path/step.js +73 -22
  122. package/dist/es/ir/path/target.js +3 -3
  123. package/dist/es/ir/position/at-position.d.ts +18 -18
  124. package/dist/es/ir/position/at-position.d.ts.map +1 -1
  125. package/dist/es/ir/position/at-position.js +11 -11
  126. package/dist/es/ir/scene.d.ts +156 -0
  127. package/dist/es/ir/scene.d.ts.map +1 -1
  128. package/dist/es/ir/scene.js +3 -1
  129. package/dist/es/ir/scope.d.ts +3446 -1306
  130. package/dist/es/ir/scope.d.ts.map +1 -1
  131. package/dist/es/ir/scope.js +10 -6
  132. package/dist/es/ir/transform.d.ts +44 -17
  133. package/dist/es/ir/transform.d.ts.map +1 -1
  134. package/dist/es/ir/transform.js +10 -3
  135. package/dist/es/parsers/index.d.ts +3 -3
  136. package/dist/es/parsers/index.d.ts.map +1 -1
  137. package/dist/es/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
  138. package/dist/es/parsers/node-target.d.ts.map +1 -0
  139. package/dist/es/parsers/{parseNodeTarget.js → node-target.js} +10 -8
  140. package/dist/{lib/parsers/parseTargetSugar.d.ts → es/parsers/target-sugar.d.ts} +1 -1
  141. package/dist/es/parsers/target-sugar.d.ts.map +1 -0
  142. package/dist/es/parsers/{parseTargetSugar.js → target-sugar.js} +9 -4
  143. package/dist/{lib/parsers/parseWay.d.ts → es/parsers/way.d.ts} +1 -1
  144. package/dist/es/parsers/way.d.ts.map +1 -0
  145. package/dist/es/parsers/{parseWay.js → way.js} +9 -5
  146. package/dist/es/path-generators/define.d.ts.map +1 -0
  147. package/dist/es/{pathGenerators → path-generators}/define.js +1 -1
  148. package/dist/es/path-generators/index.d.ts.map +1 -0
  149. package/dist/es/path-generators/types.d.ts.map +1 -0
  150. package/dist/es/patterns/define.d.ts +9 -0
  151. package/dist/es/patterns/define.d.ts.map +1 -0
  152. package/dist/es/patterns/define.js +10 -0
  153. package/dist/es/patterns/index.d.ts +1 -0
  154. package/dist/es/patterns/index.d.ts.map +1 -1
  155. package/dist/es/patterns/index.js +42 -35
  156. package/dist/es/presets/animation.d.ts +123 -0
  157. package/dist/es/presets/animation.d.ts.map +1 -0
  158. package/dist/es/presets/animation.js +272 -0
  159. package/dist/es/presets/index.d.ts +3 -0
  160. package/dist/es/presets/index.d.ts.map +1 -0
  161. package/dist/es/primitive/ellipse.d.ts +3 -0
  162. package/dist/es/primitive/ellipse.d.ts.map +1 -1
  163. package/dist/es/primitive/group.d.ts +3 -0
  164. package/dist/es/primitive/group.d.ts.map +1 -1
  165. package/dist/es/primitive/marker.d.ts +1 -1
  166. package/dist/es/primitive/paint.d.ts +1 -1
  167. package/dist/es/primitive/path.d.ts +4 -1
  168. package/dist/es/primitive/path.d.ts.map +1 -1
  169. package/dist/es/primitive/rect.d.ts +3 -0
  170. package/dist/es/primitive/rect.d.ts.map +1 -1
  171. package/dist/es/primitive/scene.d.ts +3 -0
  172. package/dist/es/primitive/scene.d.ts.map +1 -1
  173. package/dist/es/primitive/text.d.ts +3 -0
  174. package/dist/es/primitive/text.d.ts.map +1 -1
  175. package/dist/es/shapes/arc.js +2 -2
  176. package/dist/{lib/shapes/_contour.d.ts → es/shapes/contour.d.ts} +6 -3
  177. package/dist/es/shapes/contour.d.ts.map +1 -0
  178. package/dist/es/shapes/{_contour.js → contour.js} +14 -2
  179. package/dist/es/shapes/ellipse.js +2 -2
  180. package/dist/es/shapes/index.d.ts +1 -1
  181. package/dist/es/shapes/index.d.ts.map +1 -1
  182. package/dist/es/shapes/index.js +1 -1
  183. package/dist/es/shapes/polygon.d.ts +1 -1
  184. package/dist/es/shapes/polygon.d.ts.map +1 -1
  185. package/dist/es/shapes/polygon.js +26 -21
  186. package/dist/es/shapes/rectangle.js +5 -5
  187. package/dist/es/shapes/sector.d.ts.map +1 -1
  188. package/dist/es/shapes/sector.js +30 -22
  189. package/dist/es/shapes/{_shared.d.ts → shared.d.ts} +4 -8
  190. package/dist/es/shapes/shared.d.ts.map +1 -0
  191. package/dist/es/shapes/{_shared.js → shared.js} +8 -12
  192. package/dist/es/shapes/star.d.ts.map +1 -1
  193. package/dist/es/shapes/star.js +4 -14
  194. package/dist/lib/arrows/define.cjs +10 -0
  195. package/dist/lib/arrows/define.d.ts +9 -0
  196. package/dist/lib/arrows/define.d.ts.map +1 -0
  197. package/dist/lib/arrows/index.cjs +14 -1
  198. package/dist/lib/arrows/index.d.ts +3 -1
  199. package/dist/lib/arrows/index.d.ts.map +1 -1
  200. package/dist/lib/arrows/types.d.ts +4 -2
  201. package/dist/lib/arrows/types.d.ts.map +1 -1
  202. package/dist/lib/compile/anchor-cache.cjs +17 -4
  203. package/dist/lib/compile/anchor-cache.d.ts +3 -3
  204. package/dist/lib/compile/anchor-cache.d.ts.map +1 -1
  205. package/dist/lib/compile/compile.cjs +71 -39
  206. package/dist/lib/compile/compile.d.ts +5 -14
  207. package/dist/lib/compile/compile.d.ts.map +1 -1
  208. package/dist/lib/compile/{lowerComposites.cjs → composite.cjs} +9 -1
  209. package/dist/lib/compile/{lowerComposites.d.ts → composite.d.ts} +9 -2
  210. package/dist/lib/compile/composite.d.ts.map +1 -0
  211. package/dist/lib/compile/constant.cjs +24 -0
  212. package/dist/lib/compile/constant.d.ts +32 -0
  213. package/dist/lib/compile/constant.d.ts.map +1 -0
  214. package/dist/lib/compile/direction.cjs +31 -0
  215. package/dist/lib/compile/direction.d.ts +27 -0
  216. package/dist/lib/compile/direction.d.ts.map +1 -0
  217. package/dist/lib/compile/index.d.ts +3 -1
  218. package/dist/lib/compile/index.d.ts.map +1 -1
  219. package/dist/lib/compile/name-stack.cjs +5 -1
  220. package/dist/lib/compile/name-stack.d.ts +3 -1
  221. package/dist/lib/compile/name-stack.d.ts.map +1 -1
  222. package/dist/lib/compile/node.cjs +42 -62
  223. package/dist/lib/compile/node.d.ts +20 -7
  224. package/dist/lib/compile/node.d.ts.map +1 -1
  225. package/dist/lib/compile/paint.cjs +1 -1
  226. package/dist/lib/compile/path/anchor.cjs +10 -12
  227. package/dist/lib/compile/path/anchor.d.ts +4 -3
  228. package/dist/lib/compile/path/anchor.d.ts.map +1 -1
  229. package/dist/lib/compile/path/index.cjs +58 -33
  230. package/dist/lib/compile/path/index.d.ts +6 -8
  231. package/dist/lib/compile/path/index.d.ts.map +1 -1
  232. package/dist/lib/compile/path/relative.cjs +1 -1
  233. package/dist/lib/compile/path/relative.d.ts +1 -1
  234. package/dist/lib/compile/path/shrink.cjs +16 -11
  235. package/dist/lib/compile/path/shrink.d.ts +3 -1
  236. package/dist/lib/compile/path/shrink.d.ts.map +1 -1
  237. package/dist/lib/compile/position.cjs +6 -19
  238. package/dist/lib/compile/position.d.ts +2 -2
  239. package/dist/lib/compile/position.d.ts.map +1 -1
  240. package/dist/lib/compile/precision.cjs +2 -2
  241. package/dist/lib/compile/precision.d.ts +1 -1
  242. package/dist/lib/compile/precision.d.ts.map +1 -1
  243. package/dist/lib/compile/scope.cjs +29 -13
  244. package/dist/lib/compile/scope.d.ts +7 -5
  245. package/dist/lib/compile/scope.d.ts.map +1 -1
  246. package/dist/lib/compile/style.cjs +2 -2
  247. package/dist/lib/compile/style.d.ts +2 -2
  248. package/dist/lib/compile/style.d.ts.map +1 -1
  249. package/dist/lib/composites/{types.cjs → define.cjs} +2 -2
  250. package/dist/lib/composites/define.d.ts +8 -0
  251. package/dist/lib/composites/define.d.ts.map +1 -0
  252. package/dist/lib/composites/index.d.ts +1 -1
  253. package/dist/lib/composites/index.d.ts.map +1 -1
  254. package/dist/lib/composites/types.d.ts +0 -6
  255. package/dist/lib/composites/types.d.ts.map +1 -1
  256. package/dist/lib/geometry/anchor.cjs +47 -0
  257. package/dist/lib/geometry/anchor.d.ts +33 -0
  258. package/dist/lib/geometry/anchor.d.ts.map +1 -0
  259. package/dist/lib/geometry/bend.cjs +2 -2
  260. package/dist/lib/geometry/bend.d.ts +1 -1
  261. package/dist/lib/geometry/circle.cjs +9 -9
  262. package/dist/lib/geometry/circle.d.ts +4 -4
  263. package/dist/lib/geometry/circle.d.ts.map +1 -1
  264. package/dist/lib/geometry/{roundedContour.cjs → contour.cjs} +21 -32
  265. package/dist/lib/geometry/{roundedContour.d.ts → contour.d.ts} +4 -5
  266. package/dist/lib/geometry/contour.d.ts.map +1 -0
  267. package/dist/lib/geometry/diamond.cjs +7 -7
  268. package/dist/lib/geometry/diamond.d.ts +3 -3
  269. package/dist/lib/geometry/diamond.d.ts.map +1 -1
  270. package/dist/lib/geometry/{_edge.cjs → edge.cjs} +1 -1
  271. package/dist/{es/geometry/_edge.d.ts → lib/geometry/edge.d.ts} +1 -1
  272. package/dist/lib/geometry/edge.d.ts.map +1 -0
  273. package/dist/lib/geometry/ellipse.cjs +8 -8
  274. package/dist/lib/geometry/ellipse.d.ts +3 -3
  275. package/dist/lib/geometry/ellipse.d.ts.map +1 -1
  276. package/dist/lib/geometry/index.d.ts +2 -1
  277. package/dist/lib/geometry/index.d.ts.map +1 -1
  278. package/dist/lib/geometry/point.cjs +17 -0
  279. package/dist/lib/geometry/point.d.ts +6 -0
  280. package/dist/lib/geometry/point.d.ts.map +1 -1
  281. package/dist/lib/geometry/rect.cjs +9 -22
  282. package/dist/lib/geometry/rect.d.ts +4 -17
  283. package/dist/lib/geometry/rect.d.ts.map +1 -1
  284. package/dist/lib/geometry/segment.cjs +25 -47
  285. package/dist/lib/geometry/segment.d.ts.map +1 -1
  286. package/dist/lib/geometry/{_transform.cjs → transform.cjs} +1 -1
  287. package/dist/{es/geometry/_transform.d.ts → lib/geometry/transform.d.ts} +1 -1
  288. package/dist/lib/geometry/transform.d.ts.map +1 -0
  289. package/dist/lib/index.cjs +56 -22
  290. package/dist/lib/index.d.ts +13 -10
  291. package/dist/lib/index.d.ts.map +1 -1
  292. package/dist/lib/ir/animation.cjs +127 -0
  293. package/dist/lib/ir/animation.d.ts +219 -0
  294. package/dist/lib/ir/animation.d.ts.map +1 -0
  295. package/dist/lib/ir/boundary.d.ts +1 -1
  296. package/dist/lib/ir/boundary.d.ts.map +1 -1
  297. package/dist/lib/ir/coordinate.d.ts +8 -8
  298. package/dist/lib/ir/index.d.ts +1 -0
  299. package/dist/lib/ir/index.d.ts.map +1 -1
  300. package/dist/lib/ir/node.cjs +25 -23
  301. package/dist/lib/ir/node.d.ts +249 -92
  302. package/dist/lib/ir/node.d.ts.map +1 -1
  303. package/dist/lib/ir/paint.cjs +10 -10
  304. package/dist/lib/ir/paint.d.ts +19 -18
  305. package/dist/lib/ir/paint.d.ts.map +1 -1
  306. package/dist/lib/ir/path/arrow.cjs +18 -16
  307. package/dist/lib/ir/path/arrow.d.ts +39 -38
  308. package/dist/lib/ir/path/arrow.d.ts.map +1 -1
  309. package/dist/lib/ir/path/path.cjs +3 -1
  310. package/dist/lib/ir/path/path.d.ts +1106 -209
  311. package/dist/lib/ir/path/path.d.ts.map +1 -1
  312. package/dist/lib/ir/path/step.cjs +73 -21
  313. package/dist/lib/ir/path/step.d.ts +932 -20
  314. package/dist/lib/ir/path/step.d.ts.map +1 -1
  315. package/dist/lib/ir/path/target.cjs +3 -3
  316. package/dist/lib/ir/position/at-position.cjs +11 -11
  317. package/dist/lib/ir/position/at-position.d.ts +18 -18
  318. package/dist/lib/ir/position/at-position.d.ts.map +1 -1
  319. package/dist/lib/ir/scene.cjs +3 -1
  320. package/dist/lib/ir/scene.d.ts +156 -0
  321. package/dist/lib/ir/scene.d.ts.map +1 -1
  322. package/dist/lib/ir/scope.cjs +10 -6
  323. package/dist/lib/ir/scope.d.ts +3446 -1306
  324. package/dist/lib/ir/scope.d.ts.map +1 -1
  325. package/dist/lib/ir/transform.cjs +9 -2
  326. package/dist/lib/ir/transform.d.ts +44 -17
  327. package/dist/lib/ir/transform.d.ts.map +1 -1
  328. package/dist/lib/parsers/index.d.ts +3 -3
  329. package/dist/lib/parsers/index.d.ts.map +1 -1
  330. package/dist/lib/parsers/{parseNodeTarget.cjs → node-target.cjs} +10 -8
  331. package/dist/lib/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
  332. package/dist/lib/parsers/node-target.d.ts.map +1 -0
  333. package/dist/lib/parsers/{parseTargetSugar.cjs → target-sugar.cjs} +9 -4
  334. package/dist/{es/parsers/parseTargetSugar.d.ts → lib/parsers/target-sugar.d.ts} +1 -1
  335. package/dist/lib/parsers/target-sugar.d.ts.map +1 -0
  336. package/dist/lib/parsers/{parseWay.cjs → way.cjs} +12 -8
  337. package/dist/{es/parsers/parseWay.d.ts → lib/parsers/way.d.ts} +1 -1
  338. package/dist/lib/parsers/way.d.ts.map +1 -0
  339. package/dist/lib/{pathGenerators → path-generators}/define.cjs +1 -1
  340. package/dist/lib/path-generators/define.d.ts.map +1 -0
  341. package/dist/lib/path-generators/index.d.ts.map +1 -0
  342. package/dist/lib/path-generators/types.d.ts.map +1 -0
  343. package/dist/lib/patterns/define.cjs +10 -0
  344. package/dist/lib/patterns/define.d.ts +9 -0
  345. package/dist/lib/patterns/define.d.ts.map +1 -0
  346. package/dist/lib/patterns/index.cjs +42 -35
  347. package/dist/lib/patterns/index.d.ts +1 -0
  348. package/dist/lib/patterns/index.d.ts.map +1 -1
  349. package/dist/lib/presets/animation.cjs +286 -0
  350. package/dist/lib/presets/animation.d.ts +123 -0
  351. package/dist/lib/presets/animation.d.ts.map +1 -0
  352. package/dist/lib/presets/index.d.ts +3 -0
  353. package/dist/lib/presets/index.d.ts.map +1 -0
  354. package/dist/lib/primitive/ellipse.d.ts +3 -0
  355. package/dist/lib/primitive/ellipse.d.ts.map +1 -1
  356. package/dist/lib/primitive/group.d.ts +3 -0
  357. package/dist/lib/primitive/group.d.ts.map +1 -1
  358. package/dist/lib/primitive/marker.d.ts +1 -1
  359. package/dist/lib/primitive/paint.d.ts +1 -1
  360. package/dist/lib/primitive/path.d.ts +4 -1
  361. package/dist/lib/primitive/path.d.ts.map +1 -1
  362. package/dist/lib/primitive/rect.d.ts +3 -0
  363. package/dist/lib/primitive/rect.d.ts.map +1 -1
  364. package/dist/lib/primitive/scene.d.ts +3 -0
  365. package/dist/lib/primitive/scene.d.ts.map +1 -1
  366. package/dist/lib/primitive/text.d.ts +3 -0
  367. package/dist/lib/primitive/text.d.ts.map +1 -1
  368. package/dist/lib/shapes/arc.cjs +4 -4
  369. package/dist/lib/shapes/{_contour.cjs → contour.cjs} +14 -1
  370. package/dist/{es/shapes/_contour.d.ts → lib/shapes/contour.d.ts} +6 -3
  371. package/dist/lib/shapes/contour.d.ts.map +1 -0
  372. package/dist/lib/shapes/ellipse.cjs +2 -2
  373. package/dist/lib/shapes/index.cjs +1 -1
  374. package/dist/lib/shapes/index.d.ts +1 -1
  375. package/dist/lib/shapes/index.d.ts.map +1 -1
  376. package/dist/lib/shapes/polygon.cjs +29 -24
  377. package/dist/lib/shapes/polygon.d.ts +1 -1
  378. package/dist/lib/shapes/polygon.d.ts.map +1 -1
  379. package/dist/lib/shapes/rectangle.cjs +11 -11
  380. package/dist/lib/shapes/sector.cjs +41 -33
  381. package/dist/lib/shapes/sector.d.ts.map +1 -1
  382. package/dist/lib/shapes/{_shared.cjs → shared.cjs} +7 -12
  383. package/dist/lib/shapes/{_shared.d.ts → shared.d.ts} +4 -8
  384. package/dist/lib/shapes/shared.d.ts.map +1 -0
  385. package/dist/lib/shapes/star.cjs +7 -17
  386. package/dist/lib/shapes/star.d.ts.map +1 -1
  387. package/package.json +2 -3
  388. package/dist/es/compile/lowerComposites.d.ts.map +0 -1
  389. package/dist/es/geometry/_edge.d.ts.map +0 -1
  390. package/dist/es/geometry/_transform.d.ts.map +0 -1
  391. package/dist/es/geometry/roundedContour.d.ts.map +0 -1
  392. package/dist/es/parsers/parseNodeTarget.d.ts.map +0 -1
  393. package/dist/es/parsers/parseTargetSugar.d.ts.map +0 -1
  394. package/dist/es/parsers/parseWay.d.ts.map +0 -1
  395. package/dist/es/pathGenerators/define.d.ts.map +0 -1
  396. package/dist/es/pathGenerators/index.d.ts.map +0 -1
  397. package/dist/es/pathGenerators/types.d.ts.map +0 -1
  398. package/dist/es/shapes/_contour.d.ts.map +0 -1
  399. package/dist/es/shapes/_shared.d.ts.map +0 -1
  400. package/dist/lib/compile/lowerComposites.d.ts.map +0 -1
  401. package/dist/lib/geometry/_edge.d.ts.map +0 -1
  402. package/dist/lib/geometry/_transform.d.ts.map +0 -1
  403. package/dist/lib/geometry/roundedContour.d.ts.map +0 -1
  404. package/dist/lib/parsers/parseNodeTarget.d.ts.map +0 -1
  405. package/dist/lib/parsers/parseTargetSugar.d.ts.map +0 -1
  406. package/dist/lib/parsers/parseWay.d.ts.map +0 -1
  407. package/dist/lib/pathGenerators/define.d.ts.map +0 -1
  408. package/dist/lib/pathGenerators/index.d.ts.map +0 -1
  409. package/dist/lib/pathGenerators/types.d.ts.map +0 -1
  410. package/dist/lib/shapes/_contour.d.ts.map +0 -1
  411. package/dist/lib/shapes/_shared.d.ts.map +0 -1
  412. /package/dist/es/{pathGenerators → path-generators}/define.d.ts +0 -0
  413. /package/dist/es/{pathGenerators → path-generators}/index.d.ts +0 -0
  414. /package/dist/es/{pathGenerators → path-generators}/types.d.ts +0 -0
  415. /package/dist/lib/{pathGenerators → path-generators}/define.d.ts +0 -0
  416. /package/dist/lib/{pathGenerators → path-generators}/index.d.ts +0 -0
  417. /package/dist/lib/{pathGenerators → path-generators}/types.d.ts +0 -0
@@ -2,10 +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, } from './ir';
8
- export type { BoundaryKeyword, IRBoundary } from './ir';
5
+ export { PositionSchema, PolarPositionSchema, AtPositionSchema, OffsetPositionSchema, AtDirection, 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, AtDirectionValue, 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, 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';
9
10
  export type { ScenePrimitive, RectPrim, EllipsePrim, TextPrim, TextLine, PathPrim, PathCommand,
10
11
  /** 7 个 named PathCommand 分支(便于 wrapper / Pick<>) */
11
12
  MovePathCommand, LinePathCommand, QuadPathCommand, CubicPathCommand, ArcPathCommand, EllipseArcPathCommand, ClosePathCommand, ArrowEndSpec, GroupPrim, Transform,
@@ -21,16 +22,18 @@ export type { FontSpec, TextMetrics, TextMeasurer, CompileOptions, CompileWarnin
21
22
  export { computeLayout, fallbackMeasurer, compileToScene } from './compile';
22
23
  export type { WayItem, WayDSL, WayCycle, WayVia, WayRelativeItem, WayLabel, WayLabelOp, } from './parsers';
23
24
  export { parseWay, DrawWay, parseTargetSugar, parseNodeTarget } from './parsers';
24
- export type { Position, Rect, RectAnchor, Circle, Ellipse, Diamond, PolarPosition, } from './geometry';
25
- export { point, rect, circle, ellipse, diamond, RECT_ANCHORS, polar } from './geometry';
25
+ export { fadeIn, drawOn, scaleIn, grow, growUp, slideIn, colorShift, cameraTo, pulse, spin, loop, flash, blink, wiggle, stagger, } from './presets';
26
+ export type { AnimationPresetOptions, ScaleInOptions, GrowUpOptions, SlideInOptions, ColorShiftOptions, CameraToOptions, PulseOptions, SpinOptions, LoopOptions, FlashOptions, BlinkOptions, WiggleOptions, } from './presets';
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';
26
29
  export type { ShapeDefinition, ShapeDefinitionInput, ShapeStyle } from './shapes';
27
30
  export { BUILTIN_SHAPES, defineShape, worldToLocal, localToWorld } from './shapes';
28
31
  export type { ArrowDefinition, ArrowEmitContext } from './arrows';
29
- export { BUILTIN_ARROWS } from './arrows';
32
+ export { BUILTIN_ARROWS, defineArrow } from './arrows';
30
33
  export type { PatternDefinition, PatternEmitContext } from './patterns';
31
- export { BUILTIN_PATTERNS } from './patterns';
32
- export type { PathGeneratorDefinition, PathGeneratorContext } from './pathGenerators';
33
- 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';
34
37
  export type { CompositeDefinition } from './composites';
35
38
  export { defineComposite } from './composites';
36
39
  export type { ValueOf, AssertEqual } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA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EAAE,MAAM,UAAU,CAAC;AAGnF,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7D,YAAY,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,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"}
@@ -0,0 +1,127 @@
1
+ const require_json = require("./json.cjs");
2
+ let zod = require("zod");
3
+ //#region src/ir/animation.ts
4
+ /**
5
+ * 可动画属性通道(renderer 无关;DrawWay 风格 const + 派生类型,裸字面量 'opacity' 仍第一形态)
6
+ * @description `viewBox` 仅在 scene 根合法(镜头),元素级 viewBox track 由 compile / render 拒;
7
+ * `pathDraw` 是 0..1 路径画出进度;`scaleX` / `scaleY` 是非均匀缩放(柱状图从基线长出等),`scale` 是均匀缩放;
8
+ * transform 通道(scale / scaleX / scaleY / rotate)的支点见 track 级 `origin`,缺省几何中心。
9
+ * 各后端按通道翻译:SVG WAAPI/CSS、Canvas rAF 几何 lerp。
10
+ */
11
+ var AnimationProperty = {
12
+ Opacity: "opacity",
13
+ Fill: "fill",
14
+ Stroke: "stroke",
15
+ StrokeWidth: "strokeWidth",
16
+ TranslateX: "translateX",
17
+ TranslateY: "translateY",
18
+ Rotate: "rotate",
19
+ Scale: "scale",
20
+ ScaleX: "scaleX",
21
+ ScaleY: "scaleY",
22
+ PathDraw: "pathDraw",
23
+ ViewBox: "viewBox"
24
+ };
25
+ /** 缓动具名预设(与 CSS 同名);track / keyframe 亦可改用 cubic-bezier 四元组 */
26
+ var AnimationEasing = {
27
+ Linear: "linear",
28
+ Ease: "ease",
29
+ EaseIn: "ease-in",
30
+ EaseOut: "ease-out",
31
+ EaseInOut: "ease-in-out"
32
+ };
33
+ /** 每次迭代的播放方向(抄 WAAPI / CSS animation-direction) */
34
+ var AnimationDirection = {
35
+ Normal: "normal",
36
+ Reverse: "reverse",
37
+ Alternate: "alternate",
38
+ AlternateReverse: "alternate-reverse"
39
+ };
40
+ /** 活动区间外取值(抄 WAAPI / CSS animation-fill-mode) */
41
+ var AnimationFill = {
42
+ None: "none",
43
+ Forwards: "forwards",
44
+ Backwards: "backwards",
45
+ Both: "both"
46
+ };
47
+ var EasingSchema = zod.z.union([zod.z.string().min(1), zod.z.tuple([
48
+ zod.z.number().finite(),
49
+ zod.z.number().finite(),
50
+ zod.z.number().finite(),
51
+ zod.z.number().finite()
52
+ ])]).describe("Easing: a named preset (built-in linear / ease / ease-in / ease-out / ease-in-out, or a custom name resolved by a renderer-registered easing) or a cubic-bezier control-point tuple [x1, y1, x2, y2]. Defaults to linear when omitted.");
53
+ var KeyframeSchema = zod.z.object({
54
+ at: zod.z.number().min(0).max(1).describe("Normalized keyframe time in [0, 1] (WAAPI offset, decoupled from duration). Keyframes within a track must be sorted ascending by `at`."),
55
+ value: require_json.JsonValueSchema.describe("Keyframe value (any JSON value). For built-in properties it is narrowed by the track-level refinement: a finite number (opacity / scale / rotate / translateX|Y / strokeWidth / pathDraw 0..1), a color string (fill / stroke, interpolated in oklch), or a 4-number array [x, y, w, h] (viewBox). Custom (non-built-in) properties accept any JSON value, interpreted by a renderer-registered interpolator."),
56
+ easing: EasingSchema.optional().describe("Per-segment easing from this keyframe to the next; overrides the track-level easing.")
57
+ }).describe("A single animation keyframe: a value at a normalized time, with optional per-segment easing.");
58
+ /** 播放触发器关键字(runtime 落地;DrawWay 风格 const + 派生类型,与其它 Animation 枚举单一真源一致) */
59
+ var AnimationTrigger = {
60
+ Load: "load",
61
+ Visible: "visible",
62
+ Manual: "manual"
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\".");
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
+ var AnimationTrackSchema = zod.z.object({
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)."),
68
+ keyframes: zod.z.array(KeyframeSchema).min(1).refine((frames) => frames.every((frame, index) => index === 0 || frame.at >= frames[index - 1].at), { message: "keyframes must be sorted ascending by `at`" }).describe("Ordered keyframes (at least one), sorted ascending by `at` within [0, 1]. Each keyframe gives the absolute display value at that time (NOT a delta on top of the base). By convention the final keyframe equals the element base (settled) state, so ignoring the animation renders the complete base figure."),
69
+ duration: zod.z.number().finite().positive().describe("One-iteration duration in milliseconds (> 0)."),
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
+ easing: EasingSchema.optional().describe("Track-level easing applied to each segment that lacks its own keyframe easing. Defaults to linear."),
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."),
75
+ trigger: TriggerSchema.optional().describe("Playback trigger; defaults to \"load\"."),
76
+ origin: OriginSchema.optional().describe("Transform pivot for scale / scaleX / scaleY / rotate channels; ignored by other channels. Defaults to the element geometric center.")
77
+ }).superRefine((track, ctx) => {
78
+ const numeric = new Set([
79
+ AnimationProperty.Opacity,
80
+ AnimationProperty.StrokeWidth,
81
+ AnimationProperty.TranslateX,
82
+ AnimationProperty.TranslateY,
83
+ AnimationProperty.Rotate,
84
+ AnimationProperty.Scale,
85
+ AnimationProperty.ScaleX,
86
+ AnimationProperty.ScaleY,
87
+ AnimationProperty.PathDraw
88
+ ]);
89
+ track.keyframes.forEach((frame, index) => {
90
+ const value = frame.value;
91
+ const path = [
92
+ "keyframes",
93
+ index,
94
+ "value"
95
+ ];
96
+ if (track.property === AnimationProperty.ViewBox) {
97
+ if (!Array.isArray(value) || value.length !== 4) ctx.addIssue({
98
+ code: zod.z.ZodIssueCode.custom,
99
+ path,
100
+ message: "viewBox keyframe value must be a 4-number array [x, y, w, h]"
101
+ });
102
+ } else if (track.property === AnimationProperty.Fill || track.property === AnimationProperty.Stroke) {
103
+ if (typeof value !== "string") ctx.addIssue({
104
+ code: zod.z.ZodIssueCode.custom,
105
+ path,
106
+ message: `${track.property} keyframe value must be a color string`
107
+ });
108
+ } else if (numeric.has(track.property)) {
109
+ if (typeof value !== "number") ctx.addIssue({
110
+ code: zod.z.ZodIssueCode.custom,
111
+ path,
112
+ message: `${track.property} keyframe value must be a number`
113
+ });
114
+ }
115
+ });
116
+ }).describe("A declarative timeline animation track on a single renderer-agnostic property: keyframes over normalized time plus WAAPI-style timing options. The `property` is open (built-in channels or a custom name resolved by a renderer-registered interpolator). Fully JSON-serializable (no functions); playback control and callbacks live in the runtime, not the IR. Renderers that cannot animate render the static settled state and emit a diagnosable warning.");
117
+ //#endregion
118
+ exports.AnimationDirection = AnimationDirection;
119
+ exports.AnimationEasing = AnimationEasing;
120
+ exports.AnimationFill = AnimationFill;
121
+ exports.AnimationProperty = AnimationProperty;
122
+ exports.AnimationTrackSchema = AnimationTrackSchema;
123
+ exports.AnimationTrigger = AnimationTrigger;
124
+ exports.EasingSchema = EasingSchema;
125
+ exports.KeyframeSchema = KeyframeSchema;
126
+ exports.OriginSchema = OriginSchema;
127
+ exports.TriggerSchema = TriggerSchema;
@@ -0,0 +1,219 @@
1
+ import { z } from 'zod';
2
+ import { ValueOf } from '../types';
3
+ /**
4
+ * 可动画属性通道(renderer 无关;DrawWay 风格 const + 派生类型,裸字面量 'opacity' 仍第一形态)
5
+ * @description `viewBox` 仅在 scene 根合法(镜头),元素级 viewBox track 由 compile / render 拒;
6
+ * `pathDraw` 是 0..1 路径画出进度;`scaleX` / `scaleY` 是非均匀缩放(柱状图从基线长出等),`scale` 是均匀缩放;
7
+ * transform 通道(scale / scaleX / scaleY / rotate)的支点见 track 级 `origin`,缺省几何中心。
8
+ * 各后端按通道翻译:SVG WAAPI/CSS、Canvas rAF 几何 lerp。
9
+ */
10
+ export declare const AnimationProperty: {
11
+ readonly Opacity: "opacity";
12
+ readonly Fill: "fill";
13
+ readonly Stroke: "stroke";
14
+ readonly StrokeWidth: "strokeWidth";
15
+ readonly TranslateX: "translateX";
16
+ readonly TranslateY: "translateY";
17
+ readonly Rotate: "rotate";
18
+ readonly Scale: "scale";
19
+ readonly ScaleX: "scaleX";
20
+ readonly ScaleY: "scaleY";
21
+ readonly PathDraw: "pathDraw";
22
+ readonly ViewBox: "viewBox";
23
+ };
24
+ /** 内置可动画属性通道名联合 */
25
+ export type AnimationPropertyValue = ValueOf<typeof AnimationProperty>;
26
+ export type BuiltinAnimationProperty = AnimationPropertyValue;
27
+ /** 属性名:内置 ∪ 任意自定义字符串(`& {}` 保内置自动补全,同 NodeShape 范式);自定义通道由后续 renderer 注册的插值器解释 */
28
+ export type AnimationPropertyRef = BuiltinAnimationProperty | (string & {});
29
+ /** 缓动具名预设(与 CSS 同名);track / keyframe 亦可改用 cubic-bezier 四元组 */
30
+ export declare const AnimationEasing: {
31
+ readonly Linear: "linear";
32
+ readonly Ease: "ease";
33
+ readonly EaseIn: "ease-in";
34
+ readonly EaseOut: "ease-out";
35
+ readonly EaseInOut: "ease-in-out";
36
+ };
37
+ /** 缓动预设名联合 */
38
+ export type AnimationEasingValue = ValueOf<typeof AnimationEasing>;
39
+ /** 每次迭代的播放方向(抄 WAAPI / CSS animation-direction) */
40
+ export declare const AnimationDirection: {
41
+ readonly Normal: "normal";
42
+ readonly Reverse: "reverse";
43
+ readonly Alternate: "alternate";
44
+ readonly AlternateReverse: "alternate-reverse";
45
+ };
46
+ /** 播放方向名联合 */
47
+ export type AnimationDirectionValue = ValueOf<typeof AnimationDirection>;
48
+ /** 活动区间外取值(抄 WAAPI / CSS animation-fill-mode) */
49
+ export declare const AnimationFill: {
50
+ readonly None: "none";
51
+ readonly Forwards: "forwards";
52
+ readonly Backwards: "backwards";
53
+ readonly Both: "both";
54
+ };
55
+ /** 填充模式名联合 */
56
+ export type AnimationFillValue = ValueOf<typeof AnimationFill>;
57
+ export declare const EasingSchema: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
58
+ export declare const KeyframeSchema: z.ZodObject<{
59
+ at: z.ZodNumber;
60
+ value: z.ZodType<import('./json').JsonValue, z.ZodTypeDef, import('./json').JsonValue>;
61
+ easing: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ value: import('./json').JsonValue;
64
+ at: number;
65
+ easing?: string | [number, number, number, number] | undefined;
66
+ }, {
67
+ value: import('./json').JsonValue;
68
+ at: number;
69
+ easing?: string | [number, number, number, number] | undefined;
70
+ }>;
71
+ /** 播放触发器关键字(runtime 落地;DrawWay 风格 const + 派生类型,与其它 Animation 枚举单一真源一致) */
72
+ export declare const AnimationTrigger: {
73
+ readonly Load: "load";
74
+ readonly Visible: "visible";
75
+ readonly Manual: "manual";
76
+ };
77
+ /** 触发器关键字联合(不含 { onEvent } 对象形态) */
78
+ export type AnimationTriggerValue = ValueOf<typeof AnimationTrigger>;
79
+ export declare const TriggerSchema: z.ZodUnion<[z.ZodNativeEnum<{
80
+ readonly Load: "load";
81
+ readonly Visible: "visible";
82
+ readonly Manual: "manual";
83
+ }>, z.ZodObject<{
84
+ onEvent: z.ZodString;
85
+ }, "strip", z.ZodTypeAny, {
86
+ onEvent: string;
87
+ }, {
88
+ onEvent: string;
89
+ }>]>;
90
+ export declare const OriginSchema: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
91
+ export declare const AnimationTrackSchema: z.ZodEffects<z.ZodObject<{
92
+ property: z.ZodString;
93
+ keyframes: z.ZodEffects<z.ZodArray<z.ZodObject<{
94
+ at: z.ZodNumber;
95
+ value: z.ZodType<import('./json').JsonValue, z.ZodTypeDef, import('./json').JsonValue>;
96
+ easing: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ value: import('./json').JsonValue;
99
+ at: number;
100
+ easing?: string | [number, number, number, number] | undefined;
101
+ }, {
102
+ value: import('./json').JsonValue;
103
+ at: number;
104
+ easing?: string | [number, number, number, number] | undefined;
105
+ }>, "many">, {
106
+ value: import('./json').JsonValue;
107
+ at: number;
108
+ easing?: string | [number, number, number, number] | undefined;
109
+ }[], {
110
+ value: import('./json').JsonValue;
111
+ at: number;
112
+ easing?: string | [number, number, number, number] | undefined;
113
+ }[]>;
114
+ duration: z.ZodNumber;
115
+ delay: z.ZodOptional<z.ZodNumber>;
116
+ easing: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
117
+ iterations: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodLiteral<"infinite">]>>;
118
+ direction: z.ZodOptional<z.ZodNativeEnum<{
119
+ readonly Normal: "normal";
120
+ readonly Reverse: "reverse";
121
+ readonly Alternate: "alternate";
122
+ readonly AlternateReverse: "alternate-reverse";
123
+ }>>;
124
+ fill: z.ZodOptional<z.ZodNativeEnum<{
125
+ readonly None: "none";
126
+ readonly Forwards: "forwards";
127
+ readonly Backwards: "backwards";
128
+ readonly Both: "both";
129
+ }>>;
130
+ trigger: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<{
131
+ readonly Load: "load";
132
+ readonly Visible: "visible";
133
+ readonly Manual: "manual";
134
+ }>, z.ZodObject<{
135
+ onEvent: z.ZodString;
136
+ }, "strip", z.ZodTypeAny, {
137
+ onEvent: string;
138
+ }, {
139
+ onEvent: string;
140
+ }>]>>;
141
+ origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ property: string;
144
+ keyframes: {
145
+ value: import('./json').JsonValue;
146
+ at: number;
147
+ easing?: string | [number, number, number, number] | undefined;
148
+ }[];
149
+ duration: number;
150
+ fill?: "none" | "forwards" | "backwards" | "both" | undefined;
151
+ origin?: string | [number, number] | undefined;
152
+ direction?: "reverse" | "normal" | "alternate" | "alternate-reverse" | undefined;
153
+ easing?: string | [number, number, number, number] | undefined;
154
+ delay?: number | undefined;
155
+ iterations?: number | "infinite" | undefined;
156
+ trigger?: "load" | "visible" | "manual" | {
157
+ onEvent: string;
158
+ } | undefined;
159
+ }, {
160
+ property: string;
161
+ keyframes: {
162
+ value: import('./json').JsonValue;
163
+ at: number;
164
+ easing?: string | [number, number, number, number] | undefined;
165
+ }[];
166
+ duration: number;
167
+ fill?: "none" | "forwards" | "backwards" | "both" | undefined;
168
+ origin?: string | [number, number] | undefined;
169
+ direction?: "reverse" | "normal" | "alternate" | "alternate-reverse" | undefined;
170
+ easing?: string | [number, number, number, number] | undefined;
171
+ delay?: number | undefined;
172
+ iterations?: number | "infinite" | undefined;
173
+ trigger?: "load" | "visible" | "manual" | {
174
+ onEvent: string;
175
+ } | undefined;
176
+ }>, {
177
+ property: string;
178
+ keyframes: {
179
+ value: import('./json').JsonValue;
180
+ at: number;
181
+ easing?: string | [number, number, number, number] | undefined;
182
+ }[];
183
+ duration: number;
184
+ fill?: "none" | "forwards" | "backwards" | "both" | undefined;
185
+ origin?: string | [number, number] | undefined;
186
+ direction?: "reverse" | "normal" | "alternate" | "alternate-reverse" | undefined;
187
+ easing?: string | [number, number, number, number] | undefined;
188
+ delay?: number | undefined;
189
+ iterations?: number | "infinite" | undefined;
190
+ trigger?: "load" | "visible" | "manual" | {
191
+ onEvent: string;
192
+ } | undefined;
193
+ }, {
194
+ property: string;
195
+ keyframes: {
196
+ value: import('./json').JsonValue;
197
+ at: number;
198
+ easing?: string | [number, number, number, number] | undefined;
199
+ }[];
200
+ duration: number;
201
+ fill?: "none" | "forwards" | "backwards" | "both" | undefined;
202
+ origin?: string | [number, number] | undefined;
203
+ direction?: "reverse" | "normal" | "alternate" | "alternate-reverse" | undefined;
204
+ easing?: string | [number, number, number, number] | undefined;
205
+ delay?: number | undefined;
206
+ iterations?: number | "infinite" | undefined;
207
+ trigger?: "load" | "visible" | "manual" | {
208
+ onEvent: string;
209
+ } | undefined;
210
+ }>;
211
+ /** 时间轴动画 track(renderer 无关、JSON 可序列化、无函数;keyframe 给绝对展示值、末帧 = 元素 base 终态) */
212
+ export type IRAnimationTrack = z.infer<typeof AnimationTrackSchema>;
213
+ /** 单个动画关键帧 */
214
+ export type IRKeyframe = z.infer<typeof KeyframeSchema>;
215
+ /** transform 支点(命名 anchor ∪ 局部坐标点;scale / scaleX / scaleY / rotate 用,缺省几何中心) */
216
+ export type IRAnimationOrigin = z.infer<typeof OriginSchema>;
217
+ /** 动画播放触发器(load / visible / manual / { onEvent }) */
218
+ export type IRAnimationTrigger = z.infer<typeof TriggerSchema>;
219
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/ir/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAapB,CAAC;AACX,mBAAmB;AACnB,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACvE,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAC9D,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE5E,8DAA8D;AAC9D,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AACX,cAAc;AACd,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC;AAEnE,mDAAmD;AACnD,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AACX,cAAc;AACd,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzE,iDAAiD;AACjD,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AACX,cAAc;AACd,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/D,eAAO,MAAM,YAAY,mGAOtB,CAAC;AAEJ,eAAO,MAAM,cAAc;;;;;;;;;;;;EAgBgF,CAAC;AAE5G,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB;;;;CAAkE,CAAC;AAChG,oCAAoC;AACpC,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAErE,eAAO,MAAM,aAAa;;;;;;;;;;IAYvB,CAAC;AAEJ,eAAO,MAAM,YAAY,yEActB,CAAC;AAEJ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmF9B,CAAC;AAEJ,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,cAAc;AACd,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAC7D,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -21,5 +21,5 @@ export declare const Boundary: {
21
21
  readonly Circle: "circle";
22
22
  };
23
23
  /** 连接面保留关键字联合('shape' | 'circle';其余取值为借用的 shape 引用) */
24
- export type BoundaryKeyword = ValueOf<typeof Boundary>;
24
+ export type BoundaryValue = ValueOf<typeof Boundary>;
25
25
  //# sourceMappingURL=boundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../src/ir/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC,mEAAmE;AACnE,eAAO,MAAM,cAAc;;;;;;;;;IAIxB,CAAC;AAEJ,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,4CAA4C;AAC5C,eAAO,MAAM,QAAQ;IACnB,yBAAyB;;IAEzB,sDAAsD;;CAE9C,CAAC;AAEX,uDAAuD;AACvD,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../src/ir/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC,mEAAmE;AACnE,eAAO,MAAM,cAAc;;;;;;;;;IAIxB,CAAC;AAEJ,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,4CAA4C;AAC5C,eAAO,MAAM,QAAQ;IACnB,yBAAyB;;IAEzB,sDAAsD;;CAE9C,CAAC;AAEX,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -8,14 +8,14 @@ export declare const CoordinateSchema: z.ZodObject<{
8
8
  id: z.ZodString;
9
9
  position: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>, z.ZodObject<{
10
10
  direction: z.ZodNativeEnum<{
11
- readonly above: "above";
12
- readonly below: "below";
13
- readonly left: "left";
14
- readonly right: "right";
15
- readonly 'above-left': "above-left";
16
- readonly 'above-right': "above-right";
17
- readonly 'below-left': "below-left";
18
- readonly 'below-right': "below-right";
11
+ readonly Above: "above";
12
+ readonly Below: "below";
13
+ readonly Left: "left";
14
+ readonly Right: "right";
15
+ readonly AboveLeft: "above-left";
16
+ readonly AboveRight: "above-right";
17
+ readonly BelowLeft: "below-left";
18
+ readonly BelowRight: "below-right";
19
19
  }>;
20
20
  of: z.ZodString;
21
21
  distance: z.ZodOptional<z.ZodNumber>;
@@ -1,6 +1,7 @@
1
1
  export * from './position';
2
2
  export * from './font';
3
3
  export * from './json';
4
+ export * from './animation';
4
5
  export * from './paint';
5
6
  export * from './clip';
6
7
  export * from './text';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -7,25 +7,26 @@ const require_shape = require("./shape.cjs");
7
7
  const require_boundary = require("./boundary.cjs");
8
8
  const require_between_position = require("./position/between-position.cjs");
9
9
  const require_font = require("./font.cjs");
10
+ const require_animation = require("./animation.cjs");
10
11
  const require_paint = require("./paint.cjs");
11
12
  const require_text = require("./text.cjs");
12
13
  let zod = require("zod");
13
14
  //#region src/ir/node.ts
14
15
  /**
15
16
  * 节点形状常量(用 const + ValueOf 派生,不用 TS enum)
16
- * @description rectangle 默认;几何语义:node 视觉边界包"text 矩形 + padding";rectangle: 视觉=text;ellipse: rx=innerHalfW×√2,ry=innerHalfH×√2。circle 是 ellipse 等轴 preset 别名(`{ type:'ellipse', params:{ circumscribe:'equal' } }`,两轴 = 内框对角线半长 √(innerHalfW²+innerHalfH²));diamond 是 polygon 4 边形 45° preset 别名(`{ type:'polygon', params:{ sides:4, rotate:45 } }`)——circle / diamond 均保留为合法 shape 名向后兼容,编译期分别消解为 ellipse / polygon,不进 shape 注册表
17
+ * @description rectangle 默认;几何语义:node 视觉边界包"text 矩形 + padding";rectangle: 视觉=text;ellipse: rx=innerHalfW×√2,ry=innerHalfH×√2。circle 是 ellipse 等轴 preset 别名(`{ type:'ellipse', params:{ circumscribe:'equal' } }`,两轴 = 内框对角线半长 √(innerHalfW²+innerHalfH²));diamond 是 polygon 4 边形 preset 别名(`{ type:'polygon', params:{ sides:4, rotate:0 } }`)——circle / diamond 均保留为合法 shape 名向后兼容,编译期分别消解为 ellipse / polygon,不进 shape 注册表
17
18
  */
18
- var NODE_SHAPES = {
19
- rectangle: "rectangle",
20
- circle: "circle",
21
- ellipse: "ellipse",
22
- diamond: "diamond"
19
+ var BuiltinShape = {
20
+ Rectangle: "rectangle",
21
+ Circle: "circle",
22
+ Ellipse: "ellipse",
23
+ Diamond: "diamond"
23
24
  };
24
25
  /** 节点文本对齐(TikZ `align=` 同义) */
25
- var NODE_TEXT_ALIGNS = {
26
- left: "left",
27
- center: "center",
28
- right: "right"
26
+ var NodeTextAlign = {
27
+ Left: "left",
28
+ Center: "center",
29
+ Right: "right"
29
30
  };
30
31
  /**
31
32
  * 节点附属标签 label(TikZ `[label=above:foo]` 同义)
@@ -33,7 +34,7 @@ var NODE_TEXT_ALIGNS = {
33
34
  */
34
35
  var NodeLabelSchema = zod.z.object({
35
36
  text: zod.z.string().describe("Label text content; rendered as a single line."),
36
- position: zod.z.union([zod.z.nativeEnum(require_at_position.AT_DIRECTIONS), zod.z.number()]).optional().describe("Placement around the node border: 8-direction enum (above / right / above-left / ...) or numeric angle in degrees (`label=30:foo` for radial placement). Default `above`. Numeric uses the polar convention (0° = +x, 90° = +y, screen-down)."),
37
+ position: zod.z.union([zod.z.nativeEnum(require_at_position.AtDirection), zod.z.number()]).optional().describe("Placement around the node border: 8-direction enum (above / right / above-left / ...) or numeric angle in degrees (`label=30:foo` for radial placement). Default `above`. Numeric uses the polar convention (0° = +x, 90° = +y, screen-down)."),
37
38
  distance: zod.z.number().nonnegative().optional().describe("Gap between the node border and the label center, in user units. Default 12."),
38
39
  textColor: zod.z.string().optional().describe("Label text color; falls back to currentColor."),
39
40
  opacity: zod.z.number().min(0).max(1).optional().describe("Label-only opacity 0..1; multiplied with the node opacity if both are set."),
@@ -56,6 +57,7 @@ var NodeSchema = zod.z.object({
56
57
  shape: zod.z.union([zod.z.string().min(1), require_shape.ShapeRefSchema]).optional().describe("Node visual shape: a bare name string (parameterless, e.g. \"rectangle\") or `{ type, params }` carrying a JSON params object (e.g. `{ type:\"sector\", params:{ innerRadius, outerRadius, startAngle, endAngle } }`). Built-in or registered via CompileOptions.shapes; unregistered type rejected at compile time. Defaults to \"rectangle\"."),
57
58
  boundary: require_boundary.BoundarySchema.optional().describe("Default connection surface for edges meeting this node (see BoundarySchema). Defaults to \"shape\" (use the visual shape). Per-edge overridable via the edge endpoint `boundary` field."),
58
59
  meta: require_json.JsonObjectSchema.optional().describe("Opaque provenance metadata carried by this element (e.g. a Tier 2 lowering tagging which datum / series / layer it came from). Provenance passthrough: preserved verbatim into the Scene primitive(s) this element emits, ignored by renderers, and never interpreted by the compiler — it does not affect layout, connection, style, or bounding box. Must be a JSON object (fully serializable). Not inherited across scopes; not part of the every-X style defaults."),
60
+ animations: zod.z.array(require_animation.AnimationTrackSchema).optional().describe("Declarative timeline animation tracks for this element (fadeIn / drawOn / pulse / …). Each track animates one renderer-agnostic property over normalized time; the element base value is the settled (animation-end) state. Carried verbatim into the Scene primitive(s) this element emits; renderers play them or, when unable, render the static settled state with a diagnosable warning. Does not affect layout / bounding box (animations may transiently overflow). Not inherited across scopes; not part of the every-X style defaults."),
59
61
  position: zod.z.union([
60
62
  require_position.PositionSchema,
61
63
  require_polar_position.PolarPositionSchema,
@@ -63,9 +65,9 @@ var NodeSchema = zod.z.object({
63
65
  require_offset_position.OffsetPositionSchema,
64
66
  require_between_position.BetweenPositionSchema
65
67
  ]).describe("Center point of the node content box; Cartesian [x, y], polar, relative-to-another-node (`at`-style with `direction` / `of` / `distance?`), offset from a base point (`{ of, offset }` form mirroring TikZ `calc`), or between two endpoints (`{ between: [A, B], t }` proportional point). All non-Cartesian forms resolve at compile time."),
66
- rotate: zod.z.number().optional().describe("Rotation in degrees around the node center; positive = clockwise (matches TikZ rotate=...)"),
67
- text: require_text.TextBlockSchema.optional(),
68
- align: zod.z.nativeEnum(NODE_TEXT_ALIGNS).optional().describe("Multi-line text alignment within the text block; `left` / `center` / `right`. Defaults to `center` (matches TikZ)."),
68
+ rotate: zod.z.number().finite().optional().describe("Rotation in degrees around the node center; positive = clockwise (matches TikZ rotate=...)"),
69
+ text: require_text.TextBlockSchema.optional().describe("Optional node text content; accepts a string, an array of lines, or styled text line objects. A literal newline (\"\\n\") inside any string is a hard line break, so one string with newlines renders as multiple lines. When omitted the node emits only its shape primitive; when present it participates in text measurement, node box sizing, and TextPrim emission."),
70
+ align: zod.z.nativeEnum(NodeTextAlign).optional().describe("Multi-line text alignment within the text block; `left` / `center` / `right`. Defaults to `center` (matches TikZ)."),
69
71
  lineHeight: zod.z.number().positive().optional().describe("Line height in user units; falls back to `font.size × 1.2` when omitted."),
70
72
  maxTextWidth: zod.z.number().finite().positive().optional().describe("Max line width before wrapping (user units). The text box shrinks to the actual longest line for short text — this is a wrap threshold, NOT a fixed paragraph width. Western text wraps on word boundaries, CJK per character. Omitted = no auto-wrap (only manual line breaks)."),
71
73
  color: zod.z.string().optional().describe("Master color (TikZ `color=`). When set, stroke / fill / text default to it unless individually overridden, and it cascades to the inner text and edge labels. Individual fields (stroke / fill / textColor) always win over this within the same node."),
@@ -73,10 +75,10 @@ var NodeSchema = zod.z.object({
73
75
  fillOpacity: zod.z.number().min(0).max(1).optional().describe("Fill opacity 0..1; affects only the shape fill, leaves stroke / text alone."),
74
76
  stroke: zod.z.string().optional().describe("Border color of the node shape; any CSS color. Defaults to currentColor when omitted"),
75
77
  drawOpacity: zod.z.number().min(0).max(1).optional().describe("Stroke opacity 0..1 (TikZ `draw opacity`); affects only the border."),
76
- strokeWidth: zod.z.number().optional().describe("Border width in user units; defaults to 1 when omitted"),
77
- dashed: zod.z.boolean().optional().describe("Border style preset: dashed line (TikZ `dashed`); compiled to a default dash pattern. `dashArray` takes precedence."),
78
- dotted: zod.z.boolean().optional().describe("Border style preset: dotted line (TikZ `dotted`); compiled to a default dot pattern. `dashArray` and `dashed` take precedence."),
79
- dashArray: zod.z.array(zod.z.number().finite().nonnegative()).min(1).optional().describe("Explicit stroke dash pattern lengths in user units (e.g. [4, 2]); overrides `dashed` / `dotted`."),
78
+ strokeWidth: zod.z.number().finite().nonnegative().optional().describe("Border width in user units; defaults to 1 when omitted"),
79
+ dashed: zod.z.boolean().optional().describe("Border style preset: dashed line (TikZ `dashed`); compiled to a default dash pattern. `dashPattern` takes precedence."),
80
+ dotted: zod.z.boolean().optional().describe("Border style preset: dotted line (TikZ `dotted`); compiled to a default dot pattern. `dashPattern` and `dashed` take precedence."),
81
+ dashPattern: zod.z.array(zod.z.number().finite().nonnegative()).min(1).optional().describe("Explicit stroke dash pattern lengths in user units (e.g. [4, 2]); overrides `dashed` / `dotted`."),
80
82
  cornerRadius: zod.z.number().nonnegative().optional().describe("Migration-period top-level corner radius in user units; only effective on `rectangle` shape. Prefer the shape params form `{ type: \"rectangle\", params: { cornerRadius } }`."),
81
83
  minimumWidth: zod.z.number().nonnegative().optional().describe("Minimum visual border width in user units; floors the bounding box width."),
82
84
  minimumHeight: zod.z.number().nonnegative().optional().describe("Minimum visual border height in user units; floors the bounding box height."),
@@ -88,15 +90,15 @@ var NodeSchema = zod.z.object({
88
90
  opacity: zod.z.number().min(0).max(1).optional().describe("Whole-node opacity 0..1; applies uniformly to shape and text."),
89
91
  innerXSep: zod.z.number().nonnegative().optional().describe("Inner horizontal padding from text to border in user units. Falls back to `padding` then default."),
90
92
  innerYSep: zod.z.number().nonnegative().optional().describe("Inner vertical padding from text to border in user units. Falls back to `padding` then default."),
91
- outerSep: zod.z.number().nonnegative().optional().describe("Outer margin from border to path attachment point in user units; does NOT change the visible border. Falls back to `margin`."),
93
+ outerSep: zod.z.number().nonnegative().optional().describe("Uniform outer offset (TikZ `outer sep`) around the node connection boundary, in user units. Applies to ALL border references — automatic edge endpoints AND explicit compass/angle anchors (e.g. `A.north`, `A.30`) — and is included in the node layout footprint / viewBox. Does NOT change the visible shape; center, shape-specific anchors, edge points, and label attachment stay on the visual shape. Default 0. Falls back to `margin`."),
92
94
  padding: zod.z.number().nonnegative().optional().describe("Symmetric inner padding (alias for `innerXSep` + `innerYSep`); axis-specific fields take precedence."),
93
- margin: zod.z.number().nonnegative().optional().describe("Symmetric outer margin (alias for `outerSep`); axis-specific field takes precedence."),
95
+ margin: zod.z.number().nonnegative().optional().describe("Symmetric outer offset, alias for `outerSep` (TikZ `outer sep`); the axis-specific `outerSep` field takes precedence."),
94
96
  font: require_font.FontSchema.optional().describe("Font spec for the inner text label (family / size / weight / style); all fields optional, all fall back to renderer defaults."),
95
97
  label: zod.z.union([NodeLabelSchema, zod.z.array(NodeLabelSchema)]).optional().describe("Extra label(s) attached around the node border (TikZ `[label=above:foo]`); single object or array form. Compiled into one TextPrim per label, positioned by `position` direction / angle and `distance`."),
96
98
  zIndex: zod.z.number().int().finite().optional().describe("Explicit stacking order among sibling IR children. Higher draws on top. Omitted = 0 = source order. Sorting is stable: same zIndex keeps source order. Scoped per group (a node inside a scope only restacks within that scope).")
97
- }).describe("Node primitive: a positioned, optionally textual shape (rectangle / circle / ellipse / diamond)");
99
+ }).strict().describe("Node primitive: a positioned, optionally textual shape (rectangle / circle / ellipse / diamond)");
98
100
  //#endregion
99
- exports.NODE_SHAPES = NODE_SHAPES;
100
- exports.NODE_TEXT_ALIGNS = NODE_TEXT_ALIGNS;
101
+ exports.BuiltinShape = BuiltinShape;
101
102
  exports.NodeLabelSchema = NodeLabelSchema;
102
103
  exports.NodeSchema = NodeSchema;
104
+ exports.NodeTextAlign = NodeTextAlign;