@efxlab/motion-canvas-2d 4.0.0

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 (455) hide show
  1. package/editor/index.css +40 -0
  2. package/editor/index.js +525 -0
  3. package/editor/index.js.map +1 -0
  4. package/lib/code/CodeCursor.d.ts +84 -0
  5. package/lib/code/CodeCursor.d.ts.map +1 -0
  6. package/lib/code/CodeCursor.js +315 -0
  7. package/lib/code/CodeDiffer.d.ts +28 -0
  8. package/lib/code/CodeDiffer.d.ts.map +1 -0
  9. package/lib/code/CodeDiffer.js +51 -0
  10. package/lib/code/CodeFragment.d.ts +42 -0
  11. package/lib/code/CodeFragment.d.ts.map +1 -0
  12. package/lib/code/CodeFragment.js +72 -0
  13. package/lib/code/CodeHighlighter.d.ts +69 -0
  14. package/lib/code/CodeHighlighter.d.ts.map +1 -0
  15. package/lib/code/CodeHighlighter.js +2 -0
  16. package/lib/code/CodeMetrics.d.ts +11 -0
  17. package/lib/code/CodeMetrics.d.ts.map +1 -0
  18. package/lib/code/CodeMetrics.js +29 -0
  19. package/lib/code/CodeRange.d.ts +43 -0
  20. package/lib/code/CodeRange.d.ts.map +1 -0
  21. package/lib/code/CodeRange.js +185 -0
  22. package/lib/code/CodeScope.d.ts +16 -0
  23. package/lib/code/CodeScope.d.ts.map +1 -0
  24. package/lib/code/CodeScope.js +72 -0
  25. package/lib/code/CodeSelection.d.ts +6 -0
  26. package/lib/code/CodeSelection.d.ts.map +1 -0
  27. package/lib/code/CodeSelection.js +13 -0
  28. package/lib/code/CodeSignal.d.ts +63 -0
  29. package/lib/code/CodeSignal.d.ts.map +1 -0
  30. package/lib/code/CodeSignal.js +206 -0
  31. package/lib/code/CodeTokenizer.d.ts +8 -0
  32. package/lib/code/CodeTokenizer.d.ts.map +1 -0
  33. package/lib/code/CodeTokenizer.js +50 -0
  34. package/lib/code/DefaultHighlightStyle.d.ts +3 -0
  35. package/lib/code/DefaultHighlightStyle.d.ts.map +1 -0
  36. package/lib/code/DefaultHighlightStyle.js +98 -0
  37. package/lib/code/LezerHighlighter.d.ts +22 -0
  38. package/lib/code/LezerHighlighter.d.ts.map +1 -0
  39. package/lib/code/LezerHighlighter.js +91 -0
  40. package/lib/code/diff.d.ts +31 -0
  41. package/lib/code/diff.d.ts.map +1 -0
  42. package/lib/code/diff.js +236 -0
  43. package/lib/code/extractRange.d.ts +17 -0
  44. package/lib/code/extractRange.d.ts.map +1 -0
  45. package/lib/code/extractRange.js +102 -0
  46. package/lib/code/index.d.ts +14 -0
  47. package/lib/code/index.d.ts.map +1 -0
  48. package/lib/code/index.js +14 -0
  49. package/lib/components/Bezier.d.ts +22 -0
  50. package/lib/components/Bezier.d.ts.map +1 -0
  51. package/lib/components/Bezier.js +80 -0
  52. package/lib/components/Camera.d.ts +172 -0
  53. package/lib/components/Camera.d.ts.map +1 -0
  54. package/lib/components/Camera.js +239 -0
  55. package/lib/components/Circle.d.ts +191 -0
  56. package/lib/components/Circle.d.ts.map +1 -0
  57. package/lib/components/Circle.js +178 -0
  58. package/lib/components/Code.d.ts +238 -0
  59. package/lib/components/Code.d.ts.map +1 -0
  60. package/lib/components/Code.js +331 -0
  61. package/lib/components/CodeBlock.d.ts +131 -0
  62. package/lib/components/CodeBlock.d.ts.map +1 -0
  63. package/lib/components/CodeBlock.js +462 -0
  64. package/lib/components/CubicBezier.d.ts +69 -0
  65. package/lib/components/CubicBezier.d.ts.map +1 -0
  66. package/lib/components/CubicBezier.js +81 -0
  67. package/lib/components/Curve.d.ts +202 -0
  68. package/lib/components/Curve.d.ts.map +1 -0
  69. package/lib/components/Curve.js +284 -0
  70. package/lib/components/Grid.d.ts +75 -0
  71. package/lib/components/Grid.d.ts.map +1 -0
  72. package/lib/components/Grid.js +91 -0
  73. package/lib/components/Icon.d.ts +58 -0
  74. package/lib/components/Icon.d.ts.map +1 -0
  75. package/lib/components/Icon.js +58 -0
  76. package/lib/components/Img.d.ts +116 -0
  77. package/lib/components/Img.d.ts.map +1 -0
  78. package/lib/components/Img.js +233 -0
  79. package/lib/components/Knot.d.ts +89 -0
  80. package/lib/components/Knot.d.ts.map +1 -0
  81. package/lib/components/Knot.js +68 -0
  82. package/lib/components/Latex.d.ts +49 -0
  83. package/lib/components/Latex.d.ts.map +1 -0
  84. package/lib/components/Latex.js +206 -0
  85. package/lib/components/Layout.d.ts +423 -0
  86. package/lib/components/Layout.d.ts.map +1 -0
  87. package/lib/components/Layout.js +699 -0
  88. package/lib/components/Line.d.ts +158 -0
  89. package/lib/components/Line.d.ts.map +1 -0
  90. package/lib/components/Line.js +315 -0
  91. package/lib/components/Node.d.ts +843 -0
  92. package/lib/components/Node.d.ts.map +1 -0
  93. package/lib/components/Node.js +1335 -0
  94. package/lib/components/Path.d.ts +18 -0
  95. package/lib/components/Path.d.ts.map +1 -0
  96. package/lib/components/Path.js +96 -0
  97. package/lib/components/Polygon.d.ts +157 -0
  98. package/lib/components/Polygon.d.ts.map +1 -0
  99. package/lib/components/Polygon.js +183 -0
  100. package/lib/components/QuadBezier.d.ts +61 -0
  101. package/lib/components/QuadBezier.d.ts.map +1 -0
  102. package/lib/components/QuadBezier.js +76 -0
  103. package/lib/components/Ray.d.ts +60 -0
  104. package/lib/components/Ray.d.ts.map +1 -0
  105. package/lib/components/Ray.js +95 -0
  106. package/lib/components/Rect.d.ts +112 -0
  107. package/lib/components/Rect.d.ts.map +1 -0
  108. package/lib/components/Rect.js +76 -0
  109. package/lib/components/SVG.d.ts +175 -0
  110. package/lib/components/SVG.d.ts.map +1 -0
  111. package/lib/components/SVG.js +582 -0
  112. package/lib/components/Shape.d.ts +39 -0
  113. package/lib/components/Shape.d.ts.map +1 -0
  114. package/lib/components/Shape.js +134 -0
  115. package/lib/components/Spline.d.ts +87 -0
  116. package/lib/components/Spline.d.ts.map +1 -0
  117. package/lib/components/Spline.js +230 -0
  118. package/lib/components/Txt.d.ts +51 -0
  119. package/lib/components/Txt.d.ts.map +1 -0
  120. package/lib/components/Txt.js +172 -0
  121. package/lib/components/TxtLeaf.d.ts +20 -0
  122. package/lib/components/TxtLeaf.d.ts.map +1 -0
  123. package/lib/components/TxtLeaf.js +185 -0
  124. package/lib/components/Video.d.ts +110 -0
  125. package/lib/components/Video.d.ts.map +1 -0
  126. package/lib/components/Video.js +267 -0
  127. package/lib/components/View2D.d.ts +25 -0
  128. package/lib/components/View2D.d.ts.map +1 -0
  129. package/lib/components/View2D.js +85 -0
  130. package/lib/components/index.d.ts +27 -0
  131. package/lib/components/index.d.ts.map +1 -0
  132. package/lib/components/index.js +27 -0
  133. package/lib/components/types.d.ts +17 -0
  134. package/lib/components/types.d.ts.map +1 -0
  135. package/lib/components/types.js +2 -0
  136. package/lib/curves/ArcSegment.d.ts +26 -0
  137. package/lib/curves/ArcSegment.d.ts.map +1 -0
  138. package/lib/curves/ArcSegment.js +116 -0
  139. package/lib/curves/CircleSegment.d.ts +18 -0
  140. package/lib/curves/CircleSegment.d.ts.map +1 -0
  141. package/lib/curves/CircleSegment.js +60 -0
  142. package/lib/curves/CubicBezierSegment.d.ts +18 -0
  143. package/lib/curves/CubicBezierSegment.d.ts.map +1 -0
  144. package/lib/curves/CubicBezierSegment.js +60 -0
  145. package/lib/curves/CurveDrawingInfo.d.ts +11 -0
  146. package/lib/curves/CurveDrawingInfo.d.ts.map +1 -0
  147. package/lib/curves/CurveDrawingInfo.js +2 -0
  148. package/lib/curves/CurvePoint.d.ts +15 -0
  149. package/lib/curves/CurvePoint.d.ts.map +1 -0
  150. package/lib/curves/CurvePoint.js +2 -0
  151. package/lib/curves/CurveProfile.d.ts +7 -0
  152. package/lib/curves/CurveProfile.d.ts.map +1 -0
  153. package/lib/curves/CurveProfile.js +2 -0
  154. package/lib/curves/KnotInfo.d.ts +12 -0
  155. package/lib/curves/KnotInfo.d.ts.map +1 -0
  156. package/lib/curves/KnotInfo.js +2 -0
  157. package/lib/curves/LineSegment.d.ts +16 -0
  158. package/lib/curves/LineSegment.d.ts.map +1 -0
  159. package/lib/curves/LineSegment.js +51 -0
  160. package/lib/curves/Polynomial.d.ts +118 -0
  161. package/lib/curves/Polynomial.d.ts.map +1 -0
  162. package/lib/curves/Polynomial.js +263 -0
  163. package/lib/curves/Polynomial2D.d.ts +22 -0
  164. package/lib/curves/Polynomial2D.d.ts.map +1 -0
  165. package/lib/curves/Polynomial2D.js +51 -0
  166. package/lib/curves/PolynomialSegment.d.ts +39 -0
  167. package/lib/curves/PolynomialSegment.d.ts.map +1 -0
  168. package/lib/curves/PolynomialSegment.js +88 -0
  169. package/lib/curves/QuadBezierSegment.d.ts +17 -0
  170. package/lib/curves/QuadBezierSegment.d.ts.map +1 -0
  171. package/lib/curves/QuadBezierSegment.js +53 -0
  172. package/lib/curves/Segment.d.ts +9 -0
  173. package/lib/curves/Segment.d.ts.map +1 -0
  174. package/lib/curves/Segment.js +3 -0
  175. package/lib/curves/UniformPolynomialCurveSampler.d.ts +43 -0
  176. package/lib/curves/UniformPolynomialCurveSampler.d.ts.map +1 -0
  177. package/lib/curves/UniformPolynomialCurveSampler.js +74 -0
  178. package/lib/curves/createCurveProfileLerp.d.ts +32 -0
  179. package/lib/curves/createCurveProfileLerp.d.ts.map +1 -0
  180. package/lib/curves/createCurveProfileLerp.js +351 -0
  181. package/lib/curves/getBezierSplineProfile.d.ts +12 -0
  182. package/lib/curves/getBezierSplineProfile.d.ts.map +1 -0
  183. package/lib/curves/getBezierSplineProfile.js +140 -0
  184. package/lib/curves/getCircleProfile.d.ts +4 -0
  185. package/lib/curves/getCircleProfile.d.ts.map +1 -0
  186. package/lib/curves/getCircleProfile.js +44 -0
  187. package/lib/curves/getPathProfile.d.ts +3 -0
  188. package/lib/curves/getPathProfile.d.ts.map +1 -0
  189. package/lib/curves/getPathProfile.js +128 -0
  190. package/lib/curves/getPointAtDistance.d.ts +4 -0
  191. package/lib/curves/getPointAtDistance.d.ts.map +1 -0
  192. package/lib/curves/getPointAtDistance.js +15 -0
  193. package/lib/curves/getPolylineProfile.d.ts +4 -0
  194. package/lib/curves/getPolylineProfile.d.ts.map +1 -0
  195. package/lib/curves/getPolylineProfile.js +58 -0
  196. package/lib/curves/getRectProfile.d.ts +4 -0
  197. package/lib/curves/getRectProfile.d.ts.map +1 -0
  198. package/lib/curves/getRectProfile.js +57 -0
  199. package/lib/curves/index.d.ts +17 -0
  200. package/lib/curves/index.d.ts.map +1 -0
  201. package/lib/curves/index.js +17 -0
  202. package/lib/decorators/canvasStyleSignal.d.ts +5 -0
  203. package/lib/decorators/canvasStyleSignal.d.ts.map +1 -0
  204. package/lib/decorators/canvasStyleSignal.js +12 -0
  205. package/lib/decorators/colorSignal.d.ts +2 -0
  206. package/lib/decorators/colorSignal.d.ts.map +1 -0
  207. package/lib/decorators/colorSignal.js +9 -0
  208. package/lib/decorators/compound.d.ts +27 -0
  209. package/lib/decorators/compound.d.ts.map +1 -0
  210. package/lib/decorators/compound.js +49 -0
  211. package/lib/decorators/computed.d.ts +9 -0
  212. package/lib/decorators/computed.d.ts.map +1 -0
  213. package/lib/decorators/computed.js +18 -0
  214. package/lib/decorators/defaultStyle.d.ts +2 -0
  215. package/lib/decorators/defaultStyle.d.ts.map +1 -0
  216. package/lib/decorators/defaultStyle.js +13 -0
  217. package/lib/decorators/filtersSignal.d.ts +11 -0
  218. package/lib/decorators/filtersSignal.d.ts.map +1 -0
  219. package/lib/decorators/filtersSignal.js +73 -0
  220. package/lib/decorators/index.d.ts +11 -0
  221. package/lib/decorators/index.d.ts.map +1 -0
  222. package/lib/decorators/index.js +11 -0
  223. package/lib/decorators/initializers.d.ts +4 -0
  224. package/lib/decorators/initializers.d.ts.map +1 -0
  225. package/lib/decorators/initializers.js +27 -0
  226. package/lib/decorators/nodeName.d.ts +9 -0
  227. package/lib/decorators/nodeName.d.ts.map +1 -0
  228. package/lib/decorators/nodeName.js +13 -0
  229. package/lib/decorators/signal.d.ts +183 -0
  230. package/lib/decorators/signal.d.ts.map +1 -0
  231. package/lib/decorators/signal.js +285 -0
  232. package/lib/decorators/spacingSignal.d.ts +2 -0
  233. package/lib/decorators/spacingSignal.d.ts.map +1 -0
  234. package/lib/decorators/spacingSignal.js +15 -0
  235. package/lib/decorators/vector2Signal.d.ts +8 -0
  236. package/lib/decorators/vector2Signal.d.ts.map +1 -0
  237. package/lib/decorators/vector2Signal.js +15 -0
  238. package/lib/index.d.ts +9 -0
  239. package/lib/index.d.ts.map +1 -0
  240. package/lib/index.js +9 -0
  241. package/lib/jsx-dev-runtime.d.ts +3 -0
  242. package/lib/jsx-dev-runtime.d.ts.map +1 -0
  243. package/lib/jsx-dev-runtime.js +3 -0
  244. package/lib/jsx-runtime.d.ts +12 -0
  245. package/lib/jsx-runtime.d.ts.map +1 -0
  246. package/lib/jsx-runtime.js +23 -0
  247. package/lib/partials/Filter.d.ts +82 -0
  248. package/lib/partials/Filter.d.ts.map +1 -0
  249. package/lib/partials/Filter.js +137 -0
  250. package/lib/partials/Gradient.d.ts +31 -0
  251. package/lib/partials/Gradient.d.ts.map +1 -0
  252. package/lib/partials/Gradient.js +63 -0
  253. package/lib/partials/Pattern.d.ts +13 -0
  254. package/lib/partials/Pattern.d.ts.map +1 -0
  255. package/lib/partials/Pattern.js +27 -0
  256. package/lib/partials/ShaderConfig.d.ts +81 -0
  257. package/lib/partials/ShaderConfig.d.ts.map +1 -0
  258. package/lib/partials/ShaderConfig.js +25 -0
  259. package/lib/partials/index.d.ts +5 -0
  260. package/lib/partials/index.d.ts.map +1 -0
  261. package/lib/partials/index.js +5 -0
  262. package/lib/partials/types.d.ts +35 -0
  263. package/lib/partials/types.d.ts.map +1 -0
  264. package/lib/partials/types.js +2 -0
  265. package/lib/scenes/Scene2D.d.ts +23 -0
  266. package/lib/scenes/Scene2D.d.ts.map +1 -0
  267. package/lib/scenes/Scene2D.js +152 -0
  268. package/lib/scenes/index.d.ts +4 -0
  269. package/lib/scenes/index.d.ts.map +1 -0
  270. package/lib/scenes/index.js +4 -0
  271. package/lib/scenes/makeScene2D.d.ts +5 -0
  272. package/lib/scenes/makeScene2D.d.ts.map +1 -0
  273. package/lib/scenes/makeScene2D.js +12 -0
  274. package/lib/scenes/useScene2D.d.ts +3 -0
  275. package/lib/scenes/useScene2D.d.ts.map +1 -0
  276. package/lib/scenes/useScene2D.js +5 -0
  277. package/lib/tsconfig.build.tsbuildinfo +1 -0
  278. package/lib/tsconfig.tsbuildinfo +1 -0
  279. package/lib/utils/CanvasUtils.d.ts +21 -0
  280. package/lib/utils/CanvasUtils.d.ts.map +1 -0
  281. package/lib/utils/CanvasUtils.js +138 -0
  282. package/lib/utils/diff.d.ts +31 -0
  283. package/lib/utils/diff.d.ts.map +1 -0
  284. package/lib/utils/diff.js +97 -0
  285. package/lib/utils/index.d.ts +4 -0
  286. package/lib/utils/index.d.ts.map +1 -0
  287. package/lib/utils/index.js +4 -0
  288. package/lib/utils/is.d.ts +8 -0
  289. package/lib/utils/is.d.ts.map +1 -0
  290. package/lib/utils/is.js +10 -0
  291. package/lib/utils/makeSignalExtensions.d.ts +4 -0
  292. package/lib/utils/makeSignalExtensions.d.ts.map +1 -0
  293. package/lib/utils/makeSignalExtensions.js +20 -0
  294. package/lib/utils/withDefaults.d.ts +20 -0
  295. package/lib/utils/withDefaults.d.ts.map +1 -0
  296. package/lib/utils/withDefaults.js +23 -0
  297. package/package.json +54 -0
  298. package/src/editor/NodeInspectorConfig.tsx +76 -0
  299. package/src/editor/PreviewOverlayConfig.tsx +65 -0
  300. package/src/editor/Provider.tsx +109 -0
  301. package/src/editor/SceneGraphTabConfig.tsx +87 -0
  302. package/src/editor/icons/CircleIcon.tsx +7 -0
  303. package/src/editor/icons/CodeBlockIcon.tsx +8 -0
  304. package/src/editor/icons/CurveIcon.tsx +7 -0
  305. package/src/editor/icons/GridIcon.tsx +7 -0
  306. package/src/editor/icons/IconMap.ts +35 -0
  307. package/src/editor/icons/ImgIcon.tsx +8 -0
  308. package/src/editor/icons/LayoutIcon.tsx +9 -0
  309. package/src/editor/icons/LineIcon.tsx +7 -0
  310. package/src/editor/icons/NodeIcon.tsx +7 -0
  311. package/src/editor/icons/RayIcon.tsx +7 -0
  312. package/src/editor/icons/RectIcon.tsx +7 -0
  313. package/src/editor/icons/ShapeIcon.tsx +7 -0
  314. package/src/editor/icons/TxtIcon.tsx +8 -0
  315. package/src/editor/icons/VideoIcon.tsx +7 -0
  316. package/src/editor/icons/View2DIcon.tsx +10 -0
  317. package/src/editor/index.css +0 -0
  318. package/src/editor/index.ts +19 -0
  319. package/src/editor/shortcuts.ts +27 -0
  320. package/src/editor/tree/DetachedRoot.tsx +27 -0
  321. package/src/editor/tree/NodeElement.tsx +72 -0
  322. package/src/editor/tree/TreeElement.tsx +70 -0
  323. package/src/editor/tree/TreeRoot.tsx +10 -0
  324. package/src/editor/tree/ViewRoot.tsx +20 -0
  325. package/src/editor/tree/index.module.scss +45 -0
  326. package/src/editor/tree/index.ts +4 -0
  327. package/src/editor/tree/navigation.ts +145 -0
  328. package/src/editor/tsconfig.build.json +5 -0
  329. package/src/editor/tsconfig.json +12 -0
  330. package/src/editor/tsdoc.json +4 -0
  331. package/src/editor/utils/SignalSet.ts +37 -0
  332. package/src/editor/utils/index.ts +1 -0
  333. package/src/editor/vite-env.d.ts +1 -0
  334. package/src/lib/code/CodeCursor.ts +468 -0
  335. package/src/lib/code/CodeDiffer.ts +77 -0
  336. package/src/lib/code/CodeFragment.ts +96 -0
  337. package/src/lib/code/CodeHighlighter.ts +73 -0
  338. package/src/lib/code/CodeMetrics.ts +47 -0
  339. package/src/lib/code/CodeRange.test.ts +113 -0
  340. package/src/lib/code/CodeRange.ts +222 -0
  341. package/src/lib/code/CodeScope.ts +100 -0
  342. package/src/lib/code/CodeSelection.ts +28 -0
  343. package/src/lib/code/CodeSignal.ts +348 -0
  344. package/src/lib/code/CodeTokenizer.ts +54 -0
  345. package/src/lib/code/DefaultHighlightStyle.ts +98 -0
  346. package/src/lib/code/LezerHighlighter.ts +113 -0
  347. package/src/lib/code/diff.test.ts +311 -0
  348. package/src/lib/code/diff.ts +319 -0
  349. package/src/lib/code/extractRange.ts +125 -0
  350. package/src/lib/code/index.ts +13 -0
  351. package/src/lib/components/Bezier.ts +103 -0
  352. package/src/lib/components/Camera.ts +359 -0
  353. package/src/lib/components/Circle.ts +269 -0
  354. package/src/lib/components/Code.ts +532 -0
  355. package/src/lib/components/CodeBlock.ts +581 -0
  356. package/src/lib/components/CubicBezier.ts +115 -0
  357. package/src/lib/components/Curve.ts +455 -0
  358. package/src/lib/components/Grid.ts +134 -0
  359. package/src/lib/components/Icon.ts +95 -0
  360. package/src/lib/components/Img.ts +305 -0
  361. package/src/lib/components/Knot.ts +156 -0
  362. package/src/lib/components/Latex.ts +249 -0
  363. package/src/lib/components/Layout.ts +1071 -0
  364. package/src/lib/components/Line.ts +394 -0
  365. package/src/lib/components/Node.ts +1949 -0
  366. package/src/lib/components/Path.ts +132 -0
  367. package/src/lib/components/Polygon.ts +238 -0
  368. package/src/lib/components/QuadBezier.ts +103 -0
  369. package/src/lib/components/Ray.ts +126 -0
  370. package/src/lib/components/Rect.ts +186 -0
  371. package/src/lib/components/SVG.ts +788 -0
  372. package/src/lib/components/Shape.ts +146 -0
  373. package/src/lib/components/Spline.ts +318 -0
  374. package/src/lib/components/Txt.test.tsx +81 -0
  375. package/src/lib/components/Txt.ts +204 -0
  376. package/src/lib/components/TxtLeaf.ts +210 -0
  377. package/src/lib/components/Video.ts +368 -0
  378. package/src/lib/components/View2D.ts +85 -0
  379. package/src/lib/components/__logs__/image-without-source.md +17 -0
  380. package/src/lib/components/__logs__/line-without-points.md +30 -0
  381. package/src/lib/components/__logs__/reactive-playback-rate.md +21 -0
  382. package/src/lib/components/__logs__/spline-with-insufficient-knots.md +24 -0
  383. package/src/lib/components/__tests__/children.test.tsx +142 -0
  384. package/src/lib/components/__tests__/clone.test.tsx +126 -0
  385. package/src/lib/components/__tests__/generatorTest.ts +27 -0
  386. package/src/lib/components/__tests__/mockScene2D.ts +50 -0
  387. package/src/lib/components/__tests__/query.test.tsx +122 -0
  388. package/src/lib/components/__tests__/state.test.tsx +60 -0
  389. package/src/lib/components/index.ts +26 -0
  390. package/src/lib/components/types.ts +35 -0
  391. package/src/lib/curves/ArcSegment.ts +155 -0
  392. package/src/lib/curves/CircleSegment.ts +77 -0
  393. package/src/lib/curves/CubicBezierSegment.ts +78 -0
  394. package/src/lib/curves/CurveDrawingInfo.ts +11 -0
  395. package/src/lib/curves/CurvePoint.ts +15 -0
  396. package/src/lib/curves/CurveProfile.ts +7 -0
  397. package/src/lib/curves/KnotInfo.ts +10 -0
  398. package/src/lib/curves/LineSegment.ts +62 -0
  399. package/src/lib/curves/Polynomial.ts +355 -0
  400. package/src/lib/curves/Polynomial2D.ts +62 -0
  401. package/src/lib/curves/PolynomialSegment.ts +124 -0
  402. package/src/lib/curves/QuadBezierSegment.ts +64 -0
  403. package/src/lib/curves/Segment.ts +17 -0
  404. package/src/lib/curves/UniformPolynomialCurveSampler.ts +93 -0
  405. package/src/lib/curves/createCurveProfileLerp.ts +471 -0
  406. package/src/lib/curves/getBezierSplineProfile.ts +227 -0
  407. package/src/lib/curves/getCircleProfile.ts +86 -0
  408. package/src/lib/curves/getPathProfile.ts +177 -0
  409. package/src/lib/curves/getPointAtDistance.ts +21 -0
  410. package/src/lib/curves/getPolylineProfile.test.ts +21 -0
  411. package/src/lib/curves/getPolylineProfile.ts +88 -0
  412. package/src/lib/curves/getRectProfile.ts +138 -0
  413. package/src/lib/curves/index.ts +16 -0
  414. package/src/lib/decorators/canvasStyleSignal.ts +15 -0
  415. package/src/lib/decorators/colorSignal.ts +9 -0
  416. package/src/lib/decorators/compound.ts +85 -0
  417. package/src/lib/decorators/computed.ts +18 -0
  418. package/src/lib/decorators/defaultStyle.ts +15 -0
  419. package/src/lib/decorators/filtersSignal.ts +133 -0
  420. package/src/lib/decorators/index.ts +10 -0
  421. package/src/lib/decorators/initializers.ts +34 -0
  422. package/src/lib/decorators/nodeName.ts +13 -0
  423. package/src/lib/decorators/signal.test.ts +89 -0
  424. package/src/lib/decorators/signal.ts +348 -0
  425. package/src/lib/decorators/spacingSignal.ts +15 -0
  426. package/src/lib/decorators/vector2Signal.ts +35 -0
  427. package/src/lib/globals.d.ts +3 -0
  428. package/src/lib/index.ts +8 -0
  429. package/src/lib/jsx-dev-runtime.ts +2 -0
  430. package/src/lib/jsx-runtime.ts +45 -0
  431. package/src/lib/parse-svg-path.d.ts +14 -0
  432. package/src/lib/partials/Filter.ts +185 -0
  433. package/src/lib/partials/Gradient.ts +103 -0
  434. package/src/lib/partials/Pattern.ts +35 -0
  435. package/src/lib/partials/ShaderConfig.ts +122 -0
  436. package/src/lib/partials/index.ts +4 -0
  437. package/src/lib/partials/types.ts +58 -0
  438. package/src/lib/scenes/Scene2D.ts +195 -0
  439. package/src/lib/scenes/index.ts +3 -0
  440. package/src/lib/scenes/makeScene2D.ts +19 -0
  441. package/src/lib/scenes/useScene2D.ts +6 -0
  442. package/src/lib/tsconfig.build.json +12 -0
  443. package/src/lib/tsconfig.json +14 -0
  444. package/src/lib/tsdoc.json +4 -0
  445. package/src/lib/utils/CanvasUtils.ts +306 -0
  446. package/src/lib/utils/diff.test.ts +453 -0
  447. package/src/lib/utils/diff.ts +148 -0
  448. package/src/lib/utils/index.ts +3 -0
  449. package/src/lib/utils/is.ts +11 -0
  450. package/src/lib/utils/makeSignalExtensions.ts +29 -0
  451. package/src/lib/utils/withDefaults.tsx +26 -0
  452. package/src/tsconfig.base.json +18 -0
  453. package/src/tsconfig.build.json +8 -0
  454. package/src/tsconfig.json +5 -0
  455. package/tsconfig.project.json +7 -0
@@ -0,0 +1,40 @@
1
+ .index-module_root__omEd0 {
2
+ margin-top: -1px;
3
+ padding: 3px 0 4px;
4
+ border-top: 2px solid var(--background-color);
5
+ width: max-content;
6
+ min-width: 100%;
7
+ }
8
+
9
+ .index-module_entry__vB6ny {
10
+ --depth: 0;
11
+ padding: 4px 0 4px calc(var(--depth) * 22px + 24px);
12
+ border-radius: var(--radius);
13
+ user-select: none;
14
+ cursor: pointer;
15
+ }
16
+ .index-module_entry__vB6ny:hover {
17
+ background-color: var(--surface-color-hover);
18
+ }
19
+ .index-module_entry__vB6ny.index-module_active__KevXv {
20
+ --surface-color-hover: none;
21
+ background-color: var(--theme-overlay);
22
+ color: var(--theme);
23
+ }
24
+ .index-module_entry__vB6ny.index-module_parent__5nc9I {
25
+ padding-left: calc(var(--depth) * 22px);
26
+ }
27
+
28
+ .index-module_label__9BJvW {
29
+ width: max-content;
30
+ display: flex;
31
+ padding-right: 8px;
32
+ }
33
+ .index-module_label__9BJvW > svg {
34
+ width: 20px;
35
+ height: 20px;
36
+ align-self: center;
37
+ background-color: var(--background-color);
38
+ border-radius: var(--radius);
39
+ margin-right: 8px;
40
+ }
@@ -0,0 +1,525 @@
1
+ import './index.css';
2
+ import { useApplication, useCurrentScene, Pane, Separator, Group, Label, Button, findAndOpenFirstUserFile, UnknownField, AutoField, useViewportContext, useViewportMatrix, OverlayWrapper, MouseButton, makeShortcuts, Toggle, useShortcuts, useSurfaceShortcuts, usePanels, useReducedMotion, emphasize, Tab, AccountTree, makeEditorPlugin } from '@efxlab/motion-canvas-ui';
3
+ import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
4
+ import { signal, computed, useSignalEffect, useComputed, useSignal } from '@preact/signals';
5
+ import { SceneRenderEvent, Vector2 } from '@efxlab/motion-canvas-core';
6
+ import { createContext } from 'preact';
7
+ import { useMemo, useContext, useRef, useEffect } from 'preact/hooks';
8
+ import { NODE_NAME } from '@efxlab/motion-canvas-2d';
9
+
10
+ class SignalSet {
11
+ set = new Set();
12
+ signal = signal(0);
13
+ has(value) {
14
+ this.signal.value;
15
+ return this.set.has(value);
16
+ }
17
+ peekHas(value) {
18
+ return this.set.has(value);
19
+ }
20
+ add(value) {
21
+ if (this.set.has(value)) {
22
+ return false;
23
+ }
24
+ this.set.add(value);
25
+ this.signal.value++;
26
+ return true;
27
+ }
28
+ delete(value) {
29
+ const result = this.set.delete(value);
30
+ if (result) {
31
+ this.signal.value++;
32
+ }
33
+ return result;
34
+ }
35
+ toggle(value, state) {
36
+ return state ? this.add(value) : this.delete(value);
37
+ }
38
+ }
39
+
40
+ const PluginContext = createContext(null);
41
+ const NodeInspectorKey = '@efxlab/motion-canvas-2d/node-inspector';
42
+ function usePluginState() {
43
+ return useContext(PluginContext);
44
+ }
45
+ function Provider({ children }) {
46
+ const { inspection } = useApplication();
47
+ const currentScene = useCurrentScene();
48
+ const state = useMemo(() => {
49
+ const afterRender = signal(0);
50
+ const openDetached = signal(false);
51
+ const visibleNodes = new Set();
52
+ const scene = signal(currentScene);
53
+ const selectedNode = computed(() => {
54
+ afterRender.value;
55
+ const { key, payload } = inspection.value;
56
+ if (key === NodeInspectorKey) {
57
+ return scene.value?.getNode(payload) ?? null;
58
+ }
59
+ return null;
60
+ });
61
+ const hoveredKey = signal(null);
62
+ const openNodes = new SignalSet();
63
+ const selectNode = (nodeKey) => {
64
+ const { key, payload } = inspection.peek();
65
+ if (key === NodeInspectorKey && !nodeKey) {
66
+ inspection.value = { key: '', payload: null };
67
+ }
68
+ else if (payload !== nodeKey) {
69
+ inspection.value = { key: NodeInspectorKey, payload: nodeKey };
70
+ }
71
+ };
72
+ return {
73
+ selectedNode,
74
+ selectNode,
75
+ hoveredKey,
76
+ afterRender,
77
+ openNodes,
78
+ openDetached,
79
+ visibleNodes,
80
+ scene,
81
+ };
82
+ }, []);
83
+ state.scene.value = currentScene;
84
+ useSignalEffect(() => state.scene.value?.onRenderLifecycle.subscribe(([event]) => {
85
+ if (event === SceneRenderEvent.AfterRender) {
86
+ state.afterRender.value++;
87
+ }
88
+ }));
89
+ // Expand all nodes necessary to reveal the selected one:
90
+ useSignalEffect(() => {
91
+ const selectedNode = state.selectedNode.value;
92
+ if (selectedNode && !state.visibleNodes.has(selectedNode.key ?? '')) {
93
+ let node = selectedNode.parent() ?? null;
94
+ if (!node && selectedNode !== selectedNode.view()) {
95
+ state.openDetached.value = true;
96
+ }
97
+ while (node) {
98
+ state.openNodes.add(node.key);
99
+ const parent = node.parent();
100
+ if (!parent && node !== node.view()) {
101
+ state.openDetached.value = true;
102
+ }
103
+ node = parent;
104
+ }
105
+ }
106
+ });
107
+ return (jsx(PluginContext.Provider, { value: state, children: children }));
108
+ }
109
+
110
+ function Component$1() {
111
+ const { inspection } = useApplication();
112
+ const { scene, afterRender } = usePluginState();
113
+ const node = useComputed(() => {
114
+ afterRender.value;
115
+ const { payload } = inspection.value;
116
+ return scene.value?.getNode(payload);
117
+ });
118
+ const attributes = useComputed(() => {
119
+ afterRender.value;
120
+ const currentNode = node.value;
121
+ const attributes = [];
122
+ if (currentNode) {
123
+ for (const { key, meta, signal } of currentNode) {
124
+ if (!meta.inspectable)
125
+ continue;
126
+ attributes.push([key, signal()]);
127
+ }
128
+ }
129
+ return attributes;
130
+ });
131
+ const stack = node.value?.creationStack;
132
+ return (jsxs(Pane, { title: "Node Inspector", id: "node-inspector-pane", children: [jsx(Separator, { size: 1 }), stack && (jsxs(Group, { children: [jsx(Label, {}), jsx(Button, { onClick: () => findAndOpenFirstUserFile(stack), main: true, children: "GO TO SOURCE" })] })), jsxs(Group, { children: [jsx(Label, { children: "key" }), jsx(UnknownField, { value: inspection.value.payload })] }), !node.value && (jsxs(Group, { children: [jsx(Label, {}), "Couldn't find the node. It may have been deleted or doesn't exist yet."] })), attributes.value.map(([key, value]) => (jsxs(Group, { children: [jsx(Label, { children: key }), jsx(AutoField, { value: value })] }, key)))] }));
133
+ }
134
+ const NodeInspectorConfig = {
135
+ key: NodeInspectorKey,
136
+ component: Component$1,
137
+ };
138
+
139
+ function Component({ children }) {
140
+ const state = useViewportContext();
141
+ const { scene, selectNode } = usePluginState();
142
+ const matrix = useViewportMatrix();
143
+ return (jsx(OverlayWrapper, { onPointerDown: event => {
144
+ if (event.button !== MouseButton.Left || event.shiftKey)
145
+ return;
146
+ if (!scene.value)
147
+ return;
148
+ event.stopPropagation();
149
+ const position = new Vector2(event.x - state.rect.x, event.y - state.rect.y).transformAsPoint(matrix.inverse());
150
+ selectNode(scene.value.inspectPosition(position.x, position.y));
151
+ }, children: children }));
152
+ }
153
+ function drawHook() {
154
+ const { selectedNode, hoveredKey, afterRender, scene } = usePluginState();
155
+ selectedNode.value;
156
+ hoveredKey.value;
157
+ afterRender.value;
158
+ return (ctx, matrix) => {
159
+ const currentScene = scene.peek();
160
+ if (!currentScene)
161
+ return;
162
+ let node = selectedNode.value;
163
+ if (node) {
164
+ currentScene.drawOverlay(node.key, matrix, ctx);
165
+ }
166
+ node = currentScene.getNode(hoveredKey.value);
167
+ if (node && hoveredKey.value !== selectedNode.value?.key) {
168
+ ctx.globalAlpha = 0.5;
169
+ currentScene.drawOverlay(hoveredKey.value, matrix, ctx);
170
+ }
171
+ };
172
+ }
173
+ const PreviewOverlayConfig = {
174
+ drawHook,
175
+ component: Component,
176
+ };
177
+
178
+ const SCENE_GRAPH_SHORTCUTS = makeShortcuts('scene-graph', {
179
+ moveUp: {
180
+ display: '↑',
181
+ description: 'Go up',
182
+ key: 'ArrowUp',
183
+ modifiers: {},
184
+ },
185
+ modeDown: {
186
+ display: '↓',
187
+ description: 'Go down',
188
+ key: 'ArrowDown',
189
+ modifiers: {},
190
+ },
191
+ expandOrMoveDown: {
192
+ display: '→',
193
+ description: 'Expand / Enter',
194
+ key: 'ArrowRight',
195
+ modifiers: {},
196
+ },
197
+ collapseOrMoveUp: {
198
+ display: '←',
199
+ description: 'Collapse / Leave',
200
+ key: 'ArrowLeft',
201
+ modifiers: {},
202
+ },
203
+ });
204
+
205
+ function CircleIcon() {
206
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M10,5C12.76,5 15,7.24 15,10C15,12.76 12.76,15 10,15C7.24,15 5,12.76 5,10C5,7.24 7.24,5 10,5ZM10,7C8.344,7 7,8.344 7,10C7,11.656 8.344,13 10,13C11.656,13 13,11.656 13,10C13,8.344 11.656,7 10,7Z" }) }));
207
+ }
208
+
209
+ function CodeBlockIcon() {
210
+ return (jsxs("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: [jsx("path", { d: "M5,9L5,6.999C5,6.469 5.211,5.96 5.585,5.586C5.96,5.211 6.469,5 6.999,5L9,5L9,7L6.999,7L7,9L7,11L7,13L8.985,13L9,15L7,15C5.895,15 5,14.105 5,13L5,11L4,11L4,9L5,9Z" }), jsx("path", { d: "M15,11L15,13.001C15,13.531 14.789,14.04 14.415,14.414C14.04,14.789 13.531,15 13.001,15L11,15L11,13L13,13L13,11L13,9L13,7L11.015,7L11,5L13,5C14.105,5 15,5.895 15,7L15,9L16,9L16,11L15,11Z" })] }));
211
+ }
212
+
213
+ function CurveIcon() {
214
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M12.19,6.47L13.595,5.047C15.519,6.947 15.187,8.932 14.229,9.951C13.675,10.541 12.879,10.861 12.016,10.767C11.261,10.685 10.426,10.278 9.708,9.348C9.292,8.809 8.878,8.441 8.471,8.249C8.217,8.13 7.979,8.084 7.77,8.154C7.565,8.222 7.409,8.394 7.287,8.621C7.097,8.975 7.001,9.444 7,10.003C6.996,11.584 7.848,12.746 8.91,12.946C9.535,13.064 10.185,12.783 10.687,12.082L12.313,13.247C11,15.079 9.118,15.344 7.581,14.591C6.161,13.896 4.994,12.246 5,9.997C5.005,7.945 5.963,6.649 7.136,6.257C8.281,5.874 9.866,6.278 11.292,8.126C11.81,8.799 12.421,8.954 12.772,8.581C13.196,8.13 13.042,7.312 12.19,6.47Z" }) }));
215
+ }
216
+
217
+ function GridIcon() {
218
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M6,8L4,8L4,6L6,6L6,4L8,4L8,6L12,6L12,4L14,4L14,6L16,6L16,8L14,8L14,12L16,12L16,14L14,14L14,16L12,16L12,14L8,14L8,16L6,16L6,14L4,14L4,12L6,12L6,8ZM8,12L12,12L12,8L8,8L8,12Z" }) }));
219
+ }
220
+
221
+ function ImgIcon() {
222
+ return (jsxs("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: [jsx("path", { d: "M5,15L15,15L15,10L13,8L8,13L5,10L5,15Z" }), jsx("circle", { cx: "8", cy: "7", r: "2" })] }));
223
+ }
224
+
225
+ function LayoutIcon() {
226
+ return (jsxs("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: [jsx("path", { d: "M14,5C14.552,5 15,5.448 15,6C15,7.916 15,12.084 15,14C15,14.552 14.552,15 14,15C12.815,15 11,15 11,15L11,5L14,5Z" }), jsx("path", { d: "M9,5L9,9L5,9L5,6C5,5.448 5.448,5 6,5L9,5Z" }), jsx("path", { d: "M9,11L9,15L6,15C5.448,15 5,14.552 5,14L5,11L9,11Z" })] }));
227
+ }
228
+
229
+ function LineIcon() {
230
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M9.906,4.589L11.411,5.906L8.529,9.2L13.859,8.439C14.273,8.379 14.68,8.584 14.879,8.952C15.078,9.319 15.028,9.772 14.753,10.087L10.094,15.411L8.589,14.094L11.471,10.8L6.141,11.561C5.727,11.621 5.32,11.416 5.121,11.048C4.922,10.681 4.972,10.228 5.247,9.913L9.906,4.589Z" }) }));
231
+ }
232
+
233
+ function NodeIcon() {
234
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M7,9L5,9L5,7L7,7L7,5L9,5L9,7L12,7L12,5L15,8L12,11L12,9L9,9L9,12L11,12L8,15L5,12L7,12L7,9Z" }) }));
235
+ }
236
+
237
+ function RayIcon() {
238
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M12,9.414L6.707,14.707L5.293,13.293L10.586,8L8,8L8,6L13,6C13.552,6 14,6.448 14,7L14,12L12,12L12,9.414Z" }) }));
239
+ }
240
+
241
+ function RectIcon() {
242
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M15,6L15,14C15,14.552 14.552,15 14,15L6,15C5.448,15 5,14.552 5,14L5,6C5,5.448 5.448,5 6,5L14,5C14.552,5 15,5.448 15,6ZM13,7L7,7L7,13L13,13L13,7Z" }) }));
243
+ }
244
+
245
+ function ShapeIcon() {
246
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M11.746,10.93C12.637,12.664 11.973,14.504 10.611,15.244C9.692,15.743 8.385,15.804 6.94,14.829C5.555,13.893 4.689,12.16 4.544,10.388C4.395,8.572 5,6.752 6.399,5.701C8.069,4.445 10.793,4.271 12.765,4.921C14.324,5.436 15.374,6.473 15.495,7.691C15.651,9.262 14.613,10.061 13.26,10.5C12.847,10.634 12.41,10.735 12.02,10.841C11.936,10.864 11.838,10.897 11.746,10.93ZM7.601,7.299C6.737,7.949 6.445,9.103 6.537,10.224C6.633,11.389 7.149,12.556 8.06,13.171C8.696,13.601 9.251,13.706 9.656,13.486C10.207,13.187 10.315,12.395 9.886,11.701C9.48,11.044 9.513,10.523 9.68,10.122C9.835,9.75 10.164,9.417 10.678,9.187C11.243,8.935 12.157,8.8 12.908,8.503C13.216,8.381 13.542,8.264 13.505,7.888C13.485,7.691 13.359,7.53 13.197,7.384C12.928,7.143 12.558,6.959 12.138,6.821C10.736,6.358 8.789,6.406 7.601,7.299Z" }) }));
247
+ }
248
+
249
+ function TxtIcon() {
250
+ return (jsxs("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: [jsx("path", { d: "M9,13L9,6L11,6L11,13L12,13L12,15L8,15L8,13L9,13Z" }), jsx("path", { d: "M7,8L5,8L5,6C5,5.448 5.448,5 6,5L14,5C14.552,5 15,5.448 15,6L15,8L13,8L13,7L7,7L7,8Z" })] }));
251
+ }
252
+
253
+ function VideoIcon() {
254
+ return (jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: jsx("path", { d: "M14,10.866L7.25,14.763C6.941,14.942 6.559,14.942 6.25,14.763C5.941,14.585 5.75,14.254 5.75,13.897L5.75,6.103C5.75,5.746 5.941,5.415 6.25,5.237C6.559,5.058 6.941,5.058 7.25,5.237L14,9.134C14.309,9.313 14.5,9.643 14.5,10C14.5,10.357 14.309,10.687 14,10.866ZM11.5,10L7.75,7.835L7.75,12.165L11.5,10Z" }) }));
255
+ }
256
+
257
+ function View2DIcon() {
258
+ return (jsxs("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: [jsx("path", { d: "M9,5L9,7L7,7L7,9L5,9L5,6C5,5.448 5.448,5 6,5L9,5Z" }), jsx("path", { d: "M5,11L7,11L7,13L9,13L9,15L6,15C5.448,15 5,14.552 5,14L5,11Z" }), jsx("path", { d: "M11,15L11,13L13,13L13,11L15,11L15,14C15,14.552 14.552,15 14,15L11,15Z" }), jsx("path", { d: "M15,9L13,9L13,7L11,7L11,5L14,5C14.552,5 15,5.448 15,6L15,9Z" })] }));
259
+ }
260
+
261
+ /* eslint-disable @typescript-eslint/naming-convention */
262
+ const IconMap = {
263
+ Circle: CircleIcon,
264
+ CodeBlock: CodeBlockIcon,
265
+ Curve: CurveIcon,
266
+ Grid: GridIcon,
267
+ Img: ImgIcon,
268
+ Layout: LayoutIcon,
269
+ Line: LineIcon,
270
+ Node: NodeIcon,
271
+ Ray: RayIcon,
272
+ Rect: RectIcon,
273
+ Shape: ShapeIcon,
274
+ Txt: TxtIcon,
275
+ TxtLeaf: TxtIcon,
276
+ Video: VideoIcon,
277
+ View2D: View2DIcon,
278
+ };
279
+
280
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
281
+
282
+ var styles = {"root":"index-module_root__omEd0","entry":"index-module_entry__vB6ny","active":"index-module_active__KevXv","parent":"index-module_parent__5nc9I","label":"index-module_label__9BJvW"};
283
+
284
+ const DEPTH_VAR = '--depth';
285
+ function TreeElement({ label, children, selected, hasChildren, depth = 0, open, onToggle, icon, forwardRef, ...props }) {
286
+ return (jsxs(Fragment, { children: [jsx("div", { className: clsx(styles.entry, selected && styles.active, hasChildren && styles.parent), onDblClick: () => {
287
+ if (hasChildren) {
288
+ onToggle?.(!open);
289
+ }
290
+ }, ...props, style: { [DEPTH_VAR]: `${depth}` }, children: jsxs("div", { ref: forwardRef, className: styles.label, children: [hasChildren && (jsx(Toggle, { animated: false, open: open, onToggle: onToggle, onDblClick: e => {
291
+ e.stopPropagation();
292
+ } })), icon, label] }) }), children] }));
293
+ }
294
+
295
+ function NodeElement({ node, depth = 0 }) {
296
+ const { selectedNode, visibleNodes, selectNode, hoveredKey, openNodes, afterRender, } = usePluginState();
297
+ const ref = useRef(null);
298
+ const nodeSignal = useSignal(node);
299
+ nodeSignal.value = node;
300
+ const open = useComputed(() => openNodes.has(nodeSignal.value.key));
301
+ useEffect(() => {
302
+ visibleNodes.add(node.key);
303
+ return () => {
304
+ visibleNodes.delete(node.key);
305
+ };
306
+ }, [node.key]);
307
+ const children = useComputed(() => {
308
+ afterRender.value;
309
+ return nodeSignal.value.peekChildren();
310
+ });
311
+ useSignalEffect(() => {
312
+ if (node.key === selectedNode.value?.key) {
313
+ ref.current?.scrollIntoView({ block: 'nearest', behavior: 'instant' });
314
+ }
315
+ });
316
+ const Icon = IconMap[node[NODE_NAME]] ?? IconMap.Node;
317
+ return (jsx(TreeElement, { forwardRef: ref, open: open.value, hasChildren: children.value.length > 0, onToggle: value => openNodes.toggle(node.key, value), depth: depth, icon: jsx(Icon, {}), label: node.key, selected: selectedNode.value === node, onClick: event => {
318
+ selectNode(node.key);
319
+ event.stopPropagation();
320
+ }, onPointerEnter: () => (hoveredKey.value = node.key), onPointerLeave: () => (hoveredKey.value = null), children: open.value &&
321
+ children.value.length > 0 &&
322
+ children.value.map(child => (jsx(NodeElement, { node: child, depth: depth + 1 }))) }));
323
+ }
324
+
325
+ function TreeRoot({ className, ...props }) {
326
+ return jsx("div", { className: clsx(styles.root, className), ...props });
327
+ }
328
+
329
+ function DetachedRoot() {
330
+ const { afterRender, openDetached, scene } = usePluginState();
331
+ const currentScene = scene.value;
332
+ const children = currentScene ? [...currentScene.getDetachedNodes()] : [];
333
+ afterRender.value;
334
+ return children.length > 0 ? (jsx(TreeRoot, { children: jsx(TreeElement, { open: openDetached.value, hasChildren: true, onToggle: value => {
335
+ openDetached.value = value;
336
+ }, label: "Detached nodes", children: openDetached.value &&
337
+ children.map(child => jsx(NodeElement, { node: child, depth: 1 })) }) })) : null;
338
+ }
339
+
340
+ function useKeyboardNavigation() {
341
+ const { selectedNode, scene, afterRender, openNodes, selectNode } = usePluginState();
342
+ const detachedNodes = useComputed(() => {
343
+ afterRender.value;
344
+ const detachedNodes = [];
345
+ for (const node of scene.value?.getDetachedNodes() ?? []) {
346
+ detachedNodes.push(node.key);
347
+ }
348
+ return detachedNodes;
349
+ });
350
+ function selectView() {
351
+ selectNode(scene.value?.getView()?.key ?? null);
352
+ }
353
+ function findNextNodeUp(node) {
354
+ const detachedIndex = detachedNodes.value.indexOf(node.key);
355
+ if (detachedIndex > 0) {
356
+ return detachedNodes.value[detachedIndex - 1];
357
+ }
358
+ else if (detachedIndex === 0) {
359
+ // Go back to the scene graph after reaching the top of detached nodes:
360
+ return findLowestNode();
361
+ }
362
+ const parent = node.parent();
363
+ if (!parent) {
364
+ return null;
365
+ }
366
+ const siblings = parent.peekChildren();
367
+ const index = siblings.indexOf(node);
368
+ if (index < 1) {
369
+ return parent.key;
370
+ }
371
+ let current = siblings[index - 1];
372
+ while (current) {
373
+ const children = current.peekChildren();
374
+ if (openNodes.has(current.key) && children.length > 0) {
375
+ current = children.at(-1);
376
+ }
377
+ else {
378
+ return current.key;
379
+ }
380
+ }
381
+ return null;
382
+ }
383
+ function findNextNodeDown(node) {
384
+ if (openNodes.has(node.key)) {
385
+ const children = node.peekChildren();
386
+ if (children.length > 0) {
387
+ return children[0].key;
388
+ }
389
+ }
390
+ let current = node;
391
+ while (current) {
392
+ const parent = current.parent();
393
+ if (!parent) {
394
+ const detachedIndex = detachedNodes.value.indexOf(node.key);
395
+ if (detachedIndex >= 0) {
396
+ return detachedNodes.value[detachedIndex + 1] ?? null;
397
+ }
398
+ // Try jumping down to the detached section after reaching the bottom:
399
+ return detachedNodes.value[0] ?? null;
400
+ }
401
+ const siblings = parent.peekChildren();
402
+ const index = siblings.indexOf(current);
403
+ if (index < siblings.length - 1) {
404
+ return siblings[index + 1].key;
405
+ }
406
+ current = parent;
407
+ }
408
+ return null;
409
+ }
410
+ function findLowestNode() {
411
+ let current = scene.value?.getView();
412
+ while (current) {
413
+ const children = current.peekChildren();
414
+ if (openNodes.has(current.key) && children.length > 0) {
415
+ current = children.at(-1);
416
+ }
417
+ else {
418
+ return current.key;
419
+ }
420
+ }
421
+ return null;
422
+ }
423
+ useShortcuts(SCENE_GRAPH_SHORTCUTS, {
424
+ moveUp: () => {
425
+ const node = selectedNode.value;
426
+ if (!node) {
427
+ selectView();
428
+ return;
429
+ }
430
+ selectNode(findNextNodeUp(node) ?? node.key);
431
+ },
432
+ collapseOrMoveUp: () => {
433
+ const node = selectedNode.value;
434
+ if (!node) {
435
+ selectView();
436
+ return;
437
+ }
438
+ if (!openNodes.delete(node.key)) {
439
+ selectNode(node.parent()?.key ?? node.key);
440
+ }
441
+ },
442
+ modeDown: () => {
443
+ const node = selectedNode.value;
444
+ if (!node) {
445
+ selectView();
446
+ return;
447
+ }
448
+ selectNode(findNextNodeDown(node) ?? node.key);
449
+ },
450
+ expandOrMoveDown: () => {
451
+ const node = selectedNode.value;
452
+ if (!node) {
453
+ selectView();
454
+ return;
455
+ }
456
+ if (node.peekChildren().length === 0 || !openNodes.add(node.key)) {
457
+ selectNode(findNextNodeDown(node) ?? node.key);
458
+ }
459
+ },
460
+ });
461
+ }
462
+
463
+ function ViewRoot() {
464
+ const { scene } = usePluginState();
465
+ const view = useSignal(scene.value?.getView());
466
+ useSignalEffect(() => {
467
+ view.value = scene.value?.getView();
468
+ return scene.value?.onReset.subscribe(() => {
469
+ view.value = scene.value?.getView();
470
+ });
471
+ });
472
+ return view.value ? (jsx(TreeRoot, { children: jsx(NodeElement, { node: view.value }) })) : null;
473
+ }
474
+
475
+ function TabComponent({ tab }) {
476
+ const { sidebar } = usePanels();
477
+ const inspectorTab = useRef(null);
478
+ const reducedMotion = useReducedMotion();
479
+ const { selectedNode, selectNode } = usePluginState();
480
+ const { logger } = useApplication();
481
+ useEffect(() => logger.onInspected.subscribe(key => {
482
+ sidebar.set(tab);
483
+ selectNode(key);
484
+ }), [tab]);
485
+ useSignalEffect(() => {
486
+ if (selectedNode.value &&
487
+ sidebar.current.peek() !== tab &&
488
+ !reducedMotion &&
489
+ inspectorTab.current &&
490
+ inspectorTab.current.getAnimations().length < 2) {
491
+ inspectorTab.current.animate(emphasize(), { duration: 400 });
492
+ inspectorTab.current.animate([{ color: 'white' }, { color: '' }], {
493
+ duration: 800,
494
+ });
495
+ }
496
+ });
497
+ return (jsx(Tab, { forwardRef: inspectorTab, title: "Scene Graph", id: "scene-graph-tab", tab: tab, children: jsx(AccountTree, {}) }));
498
+ }
499
+ function PaneComponent() {
500
+ const ref = useSurfaceShortcuts(SCENE_GRAPH_SHORTCUTS);
501
+ const { selectNode } = usePluginState();
502
+ useKeyboardNavigation();
503
+ return (jsxs(Pane, { forwardRef: ref, title: "Scene Graph", id: "scene-graph-pane", onClick: () => {
504
+ selectNode(null);
505
+ }, children: [jsx(ViewRoot, {}), jsx(DetachedRoot, {})] }));
506
+ }
507
+ const SceneGraphTabConfig = {
508
+ name: 'scene-graph',
509
+ tabComponent: TabComponent,
510
+ paneComponent: PaneComponent,
511
+ };
512
+
513
+ var index = makeEditorPlugin(() => {
514
+ return {
515
+ name: '@efxlab/motion-canvas-2d',
516
+ provider: Provider,
517
+ previewOverlay: PreviewOverlayConfig,
518
+ tabs: [SceneGraphTabConfig],
519
+ inspectors: [NodeInspectorConfig],
520
+ shortcuts: [SCENE_GRAPH_SHORTCUTS],
521
+ };
522
+ });
523
+
524
+ export { index as default };
525
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/editor/utils/SignalSet.ts","../src/editor/Provider.tsx","../src/editor/NodeInspectorConfig.tsx","../src/editor/PreviewOverlayConfig.tsx","../src/editor/shortcuts.ts","../src/editor/icons/CircleIcon.tsx","../src/editor/icons/CodeBlockIcon.tsx","../src/editor/icons/CurveIcon.tsx","../src/editor/icons/GridIcon.tsx","../src/editor/icons/ImgIcon.tsx","../src/editor/icons/LayoutIcon.tsx","../src/editor/icons/LineIcon.tsx","../src/editor/icons/NodeIcon.tsx","../src/editor/icons/RayIcon.tsx","../src/editor/icons/RectIcon.tsx","../src/editor/icons/ShapeIcon.tsx","../src/editor/icons/TxtIcon.tsx","../src/editor/icons/VideoIcon.tsx","../src/editor/icons/View2DIcon.tsx","../src/editor/icons/IconMap.ts","../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/editor/tree/TreeElement.tsx","../src/editor/tree/NodeElement.tsx","../src/editor/tree/TreeRoot.tsx","../src/editor/tree/DetachedRoot.tsx","../src/editor/tree/navigation.ts","../src/editor/tree/ViewRoot.tsx","../src/editor/SceneGraphTabConfig.tsx","../src/editor/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;",null,null,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