@weasel-js/ui 1.4.4 → 1.5.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 (311) hide show
  1. package/dist/chunks/{ActionBar-DxGp3WuZ.js → ActionBar-GZdcfdQL.js} +1 -2
  2. package/dist/chunks/{ActionBar-DxGp3WuZ.js.map → ActionBar-GZdcfdQL.js.map} +1 -1
  3. package/dist/chunks/{ActionsBar-D1VFreoj.js → ActionsBar-Fhx_40iP.js} +2 -2
  4. package/dist/chunks/{ActionsBar-D1VFreoj.js.map → ActionsBar-Fhx_40iP.js.map} +1 -1
  5. package/dist/chunks/{BandEditor-CUlbOlJi.js → BandEditor-D8I5Uun-.js} +93 -98
  6. package/dist/chunks/BandEditor-D8I5Uun-.js.map +1 -0
  7. package/dist/chunks/{Callout-Dvt6lqVn.js → Callout-cx5_CWcW.js} +1 -1
  8. package/dist/chunks/{Callout-Dvt6lqVn.js.map → Callout-cx5_CWcW.js.map} +1 -1
  9. package/dist/chunks/{Checkbox-D-pVpobU.js → Checkbox-BZZsPaVF.js} +1 -1
  10. package/dist/chunks/{Checkbox-D-pVpobU.js.map → Checkbox-BZZsPaVF.js.map} +1 -1
  11. package/dist/chunks/{ColorField-C20aRvCg.js → ColorField-YVf8irfr.js} +2 -2
  12. package/dist/chunks/{ColorField-C20aRvCg.js.map → ColorField-YVf8irfr.js.map} +1 -1
  13. package/dist/chunks/ComboBox-D57tNYDD.js +138 -0
  14. package/dist/chunks/ComboBox-D57tNYDD.js.map +1 -0
  15. package/dist/chunks/CurveEditor-BXiMoN9d.js +533 -0
  16. package/dist/chunks/CurveEditor-BXiMoN9d.js.map +1 -0
  17. package/dist/chunks/DetentSlider-BWNSv07Z.js +72 -0
  18. package/dist/chunks/DetentSlider-BWNSv07Z.js.map +1 -0
  19. package/dist/chunks/{Dialog-CYBLjwbd.js → Dialog-DuOzsR2g.js} +1 -1
  20. package/dist/chunks/{Dialog-CYBLjwbd.js.map → Dialog-DuOzsR2g.js.map} +1 -1
  21. package/dist/chunks/{Disclosure-DiA6UKdM.js → Disclosure-9UgDzc7Z.js} +6 -6
  22. package/dist/chunks/{Disclosure-DiA6UKdM.js.map → Disclosure-9UgDzc7Z.js.map} +1 -1
  23. package/dist/chunks/{Field-dzlxOGxT.js → Field-BNqvUJfg.js} +1 -1
  24. package/dist/chunks/{Field-dzlxOGxT.js.map → Field-BNqvUJfg.js.map} +1 -1
  25. package/dist/chunks/{FontFamilySelect-DIJ4phXz.js → FontFamilySelect-CO19kyOO.js} +2 -2
  26. package/dist/chunks/{FontFamilySelect-DIJ4phXz.js.map → FontFamilySelect-CO19kyOO.js.map} +1 -1
  27. package/dist/chunks/{GradientEditor-BLpAtMDK.js → GradientEditor-B_ymIr4Q.js} +74 -51
  28. package/dist/chunks/GradientEditor-B_ymIr4Q.js.map +1 -0
  29. package/dist/chunks/Icon-QhLhaGFe.js +498 -0
  30. package/dist/chunks/Icon-QhLhaGFe.js.map +1 -0
  31. package/dist/chunks/{InlineRange-CcfzY80y.js → InlineRange-DdIlfGqG.js} +2 -2
  32. package/dist/chunks/{InlineRange-CcfzY80y.js.map → InlineRange-DdIlfGqG.js.map} +1 -1
  33. package/dist/chunks/{Input-CoKOtyD0.js → Input-B9Vh7ASP.js} +2 -2
  34. package/dist/chunks/{Input-CoKOtyD0.js.map → Input-B9Vh7ASP.js.map} +1 -1
  35. package/dist/chunks/Jog-BYrxbAQU.js +81 -0
  36. package/dist/chunks/Jog-BYrxbAQU.js.map +1 -0
  37. package/dist/chunks/{Keycaps-DSeq6QWH.js → Keycaps-CGNQV2Pz.js} +5 -5
  38. package/dist/chunks/Keycaps-CGNQV2Pz.js.map +1 -0
  39. package/dist/chunks/MenuButton-DGE-0DP0.js +60 -0
  40. package/dist/chunks/MenuButton-DGE-0DP0.js.map +1 -0
  41. package/dist/chunks/MeshEditor-CHoGQ9K8.js +123 -0
  42. package/dist/chunks/MeshEditor-CHoGQ9K8.js.map +1 -0
  43. package/dist/chunks/NumberField-CQzS6TjF.js +112 -0
  44. package/dist/chunks/NumberField-CQzS6TjF.js.map +1 -0
  45. package/dist/chunks/{OptionsBar-D_Cd3ZYs.js → OptionsBar-BWaYG_OH.js} +2 -2
  46. package/dist/chunks/{OptionsBar-D_Cd3ZYs.js.map → OptionsBar-BWaYG_OH.js.map} +1 -1
  47. package/dist/chunks/PaintField-BVYMu3OI.js +62 -0
  48. package/dist/chunks/PaintField-BVYMu3OI.js.map +1 -0
  49. package/dist/chunks/PaintInput-BzAHCKro.js +131 -0
  50. package/dist/chunks/PaintInput-BzAHCKro.js.map +1 -0
  51. package/dist/chunks/{PatternPicker-Ba22Bf4L.js → PatternPicker-C4OryrYi.js} +2 -2
  52. package/dist/chunks/{PatternPicker-Ba22Bf4L.js.map → PatternPicker-C4OryrYi.js.map} +1 -1
  53. package/dist/chunks/Plot2D-Czvyt_vG.js +292 -0
  54. package/dist/chunks/Plot2D-Czvyt_vG.js.map +1 -0
  55. package/dist/chunks/{PointPlotter-CbDKVggs.js → PointPlotter-Xvb98GwB.js} +2 -2
  56. package/dist/chunks/PointPlotter-Xvb98GwB.js.map +1 -0
  57. package/dist/chunks/{Powerline-BaHDJlcO.js → Powerline-B_EH-7Z-.js} +1 -1
  58. package/dist/chunks/{Powerline-BaHDJlcO.js.map → Powerline-B_EH-7Z-.js.map} +1 -1
  59. package/dist/chunks/Prefs-FuaJBs3t.js +308 -0
  60. package/dist/chunks/Prefs-FuaJBs3t.js.map +1 -0
  61. package/dist/chunks/Properties-B3KU69NI.js +874 -0
  62. package/dist/chunks/Properties-B3KU69NI.js.map +1 -0
  63. package/dist/chunks/{RadioGroup-B2_LUgDp.js → RadioGroup-C6xpdQNg.js} +2 -2
  64. package/dist/chunks/{RadioGroup-B2_LUgDp.js.map → RadioGroup-C6xpdQNg.js.map} +1 -1
  65. package/dist/chunks/{RangeSlider-S2R3zA8N.js → RangeSlider-CzgeGLVS.js} +1 -1
  66. package/dist/chunks/{RangeSlider-S2R3zA8N.js.map → RangeSlider-CzgeGLVS.js.map} +1 -1
  67. package/dist/chunks/{ResizeHandle-BrCO0JrH.js → ResizeHandle-1Ey8AOij.js} +1 -1
  68. package/dist/chunks/{ResizeHandle-BrCO0JrH.js.map → ResizeHandle-1Ey8AOij.js.map} +1 -1
  69. package/dist/chunks/{Select-CacMfs4v.js → Select-BMYVh10x.js} +20 -17
  70. package/dist/chunks/Select-BMYVh10x.js.map +1 -0
  71. package/dist/chunks/{SelectionPanel-C59wavdA.js → SelectionPanel-DTpcQidl.js} +211 -201
  72. package/dist/chunks/SelectionPanel-DTpcQidl.js.map +1 -0
  73. package/dist/chunks/{Sidebar-BvwjZiFm.js → Sidebar-BlUjn8lD.js} +1 -1
  74. package/dist/chunks/{Sidebar-BvwjZiFm.js.map → Sidebar-BlUjn8lD.js.map} +1 -1
  75. package/dist/chunks/{SidebarPanel-D5Ua2vyP.js → SidebarPanel-BqHfz6VK.js} +2 -2
  76. package/dist/chunks/{SidebarPanel-D5Ua2vyP.js.map → SidebarPanel-BqHfz6VK.js.map} +1 -1
  77. package/dist/chunks/Slider-B2ywUZH6.js +381 -0
  78. package/dist/chunks/Slider-B2ywUZH6.js.map +1 -0
  79. package/dist/chunks/{StatusBar-Bqv4D0dW.js → StatusBar-BFt7Yw5O.js} +1 -1
  80. package/dist/chunks/{StatusBar-Bqv4D0dW.js.map → StatusBar-BFt7Yw5O.js.map} +1 -1
  81. package/dist/chunks/{Switch-C4NU-me1.js → Switch-Om3t3ASc.js} +1 -1
  82. package/dist/chunks/{Switch-C4NU-me1.js.map → Switch-Om3t3ASc.js.map} +1 -1
  83. package/dist/chunks/{Tabs-BT3CDkoQ.js → Tabs-EAvYywil.js} +1 -1
  84. package/dist/chunks/{Tabs-BT3CDkoQ.js.map → Tabs-EAvYywil.js.map} +1 -1
  85. package/dist/chunks/Timeline-BEyKaBXl.js +916 -0
  86. package/dist/chunks/Timeline-BEyKaBXl.js.map +1 -0
  87. package/dist/chunks/{Toast-B7ylq7fz.js → Toast-iqLDD_XZ.js} +1 -1
  88. package/dist/chunks/{Toast-B7ylq7fz.js.map → Toast-iqLDD_XZ.js.map} +1 -1
  89. package/dist/chunks/{ToggleBar-Bxwv6xvj.js → ToggleBar--9As2PWG.js} +8 -8
  90. package/dist/chunks/ToggleBar--9As2PWG.js.map +1 -0
  91. package/dist/chunks/TokenPanel-BL9hlq7x.js +374 -0
  92. package/dist/chunks/TokenPanel-BL9hlq7x.js.map +1 -0
  93. package/dist/chunks/{ToolButton-CtDkqUIc.js → ToolButton-Dd-1T5aX.js} +1 -1
  94. package/dist/chunks/{ToolButton-CtDkqUIc.js.map → ToolButton-Dd-1T5aX.js.map} +1 -1
  95. package/dist/chunks/{ToolGroup-zDtqt0QJ.js → ToolGroup-BBI-W-Gm.js} +1 -1
  96. package/dist/chunks/{ToolGroup-zDtqt0QJ.js.map → ToolGroup-BBI-W-Gm.js.map} +1 -1
  97. package/dist/chunks/{ToolPalette-BbrMHfQ9.js → ToolPalette-BmTDDpmz.js} +3 -3
  98. package/dist/chunks/{ToolPalette-BbrMHfQ9.js.map → ToolPalette-BmTDDpmz.js.map} +1 -1
  99. package/dist/chunks/createKeyframeLayer-7j7ukrSx.js +699 -0
  100. package/dist/chunks/createKeyframeLayer-7j7ukrSx.js.map +1 -0
  101. package/dist/chunks/{icons-BV27dhKB.js → icons-Btrs-JD7.js} +35 -32
  102. package/dist/chunks/icons-Btrs-JD7.js.map +1 -0
  103. package/dist/chunks/number-f6PydOZK.js +52 -0
  104. package/dist/chunks/number-f6PydOZK.js.map +1 -0
  105. package/dist/chunks/range.module-DSsOIq1R.js +8 -0
  106. package/dist/chunks/range.module-DSsOIq1R.js.map +1 -0
  107. package/dist/chunks/{schema-CtWwGbqJ.js → schema-MCVT1MLv.js} +15 -9
  108. package/dist/chunks/schema-MCVT1MLv.js.map +1 -0
  109. package/dist/chunks/segmentedControl.module-DmeUMYe3.js +11 -0
  110. package/dist/chunks/segmentedControl.module-DmeUMYe3.js.map +1 -0
  111. package/dist/chunks/snap-B0WQwetQ.js +13 -0
  112. package/dist/chunks/snap-B0WQwetQ.js.map +1 -0
  113. package/dist/components/ActionBar/ActionBar.d.ts.map +1 -1
  114. package/dist/components/ActionBar/index.js +1 -1
  115. package/dist/components/ActionsBar/index.js +1 -1
  116. package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
  117. package/dist/components/BandEditor/index.js +1 -1
  118. package/dist/components/BandEditor/scale.d.ts +1 -8
  119. package/dist/components/BandEditor/scale.d.ts.map +1 -1
  120. package/dist/components/Callout/index.js +1 -1
  121. package/dist/components/Checkbox/index.js +1 -1
  122. package/dist/components/ColorField/index.js +1 -1
  123. package/dist/components/ComboBox/ComboBox.d.ts +36 -0
  124. package/dist/components/ComboBox/ComboBox.d.ts.map +1 -1
  125. package/dist/components/ComboBox/index.d.ts +1 -1
  126. package/dist/components/ComboBox/index.d.ts.map +1 -1
  127. package/dist/components/ComboBox/index.js +1 -1
  128. package/dist/components/CurveEditor/CurveEditor.d.ts +4 -2
  129. package/dist/components/CurveEditor/CurveEditor.d.ts.map +1 -1
  130. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts +8 -1
  131. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -1
  132. package/dist/components/CurveEditor/createFunctionLayer.d.ts +2 -0
  133. package/dist/components/CurveEditor/createFunctionLayer.d.ts.map +1 -1
  134. package/dist/components/CurveEditor/createKeyframeLayer.d.ts +70 -0
  135. package/dist/components/CurveEditor/createKeyframeLayer.d.ts.map +1 -0
  136. package/dist/components/CurveEditor/index.d.ts +3 -1
  137. package/dist/components/CurveEditor/index.d.ts.map +1 -1
  138. package/dist/components/CurveEditor/index.js +4 -2
  139. package/dist/components/CurveEditor/layerTypes.d.ts +8 -3
  140. package/dist/components/CurveEditor/layerTypes.d.ts.map +1 -1
  141. package/dist/components/DetentSlider/DetentSlider.d.ts +9 -10
  142. package/dist/components/DetentSlider/DetentSlider.d.ts.map +1 -1
  143. package/dist/components/DetentSlider/index.js +1 -1
  144. package/dist/components/Dialog/index.js +1 -1
  145. package/dist/components/Disclosure/index.js +1 -1
  146. package/dist/components/Field/index.js +1 -1
  147. package/dist/components/FontFamilySelect/index.js +1 -1
  148. package/dist/components/GradientEditor/GradientEditor.d.ts +3 -0
  149. package/dist/components/GradientEditor/GradientEditor.d.ts.map +1 -1
  150. package/dist/components/GradientEditor/index.js +1 -1
  151. package/dist/components/InlineRange/index.js +1 -1
  152. package/dist/components/Input/index.js +1 -1
  153. package/dist/components/Jog/Jog.d.ts +28 -0
  154. package/dist/components/Jog/Jog.d.ts.map +1 -0
  155. package/dist/components/Jog/index.d.ts +3 -0
  156. package/dist/components/Jog/index.d.ts.map +1 -0
  157. package/dist/components/Jog/index.js +2 -0
  158. package/dist/components/Keycaps/index.js +1 -1
  159. package/dist/components/MenuButton/MenuButton.d.ts +29 -0
  160. package/dist/components/MenuButton/MenuButton.d.ts.map +1 -0
  161. package/dist/components/MenuButton/index.d.ts +3 -0
  162. package/dist/components/MenuButton/index.d.ts.map +1 -0
  163. package/dist/components/MenuButton/index.js +2 -0
  164. package/dist/components/MeshEditor/MeshEditor.d.ts +30 -0
  165. package/dist/components/MeshEditor/MeshEditor.d.ts.map +1 -0
  166. package/dist/components/MeshEditor/index.d.ts +3 -0
  167. package/dist/components/MeshEditor/index.d.ts.map +1 -0
  168. package/dist/components/MeshEditor/index.js +2 -0
  169. package/dist/components/NumberField/UnitField.d.ts +30 -0
  170. package/dist/components/NumberField/UnitField.d.ts.map +1 -0
  171. package/dist/components/NumberField/index.d.ts +2 -0
  172. package/dist/components/NumberField/index.d.ts.map +1 -1
  173. package/dist/components/NumberField/index.js +2 -2
  174. package/dist/components/OptionsBar/index.js +1 -1
  175. package/dist/components/PaintField/PaintField.d.ts +36 -0
  176. package/dist/components/PaintField/PaintField.d.ts.map +1 -0
  177. package/dist/components/PaintField/index.d.ts +3 -0
  178. package/dist/components/PaintField/index.d.ts.map +1 -0
  179. package/dist/components/PaintField/index.js +2 -0
  180. package/dist/components/PaintInput/PaintInput.d.ts.map +1 -1
  181. package/dist/components/PaintInput/index.js +1 -1
  182. package/dist/components/PatternPicker/index.js +1 -1
  183. package/dist/components/Plot2D/Plot2D.d.ts +38 -2
  184. package/dist/components/Plot2D/Plot2D.d.ts.map +1 -1
  185. package/dist/components/Plot2D/index.d.ts +2 -1
  186. package/dist/components/Plot2D/index.d.ts.map +1 -1
  187. package/dist/components/Plot2D/index.js +2 -2
  188. package/dist/components/Plot2D/ticks.d.ts +43 -0
  189. package/dist/components/Plot2D/ticks.d.ts.map +1 -0
  190. package/dist/components/PointPlotter/PointPlotter.d.ts +3 -1
  191. package/dist/components/PointPlotter/PointPlotter.d.ts.map +1 -1
  192. package/dist/components/PointPlotter/index.js +1 -1
  193. package/dist/components/Powerline/index.js +1 -1
  194. package/dist/components/Prefs/PrefsForm.d.ts +4 -0
  195. package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
  196. package/dist/components/Prefs/index.d.ts +1 -1
  197. package/dist/components/Prefs/index.d.ts.map +1 -1
  198. package/dist/components/Prefs/index.js +3 -3
  199. package/dist/components/Prefs/schema.d.ts +5 -2
  200. package/dist/components/Prefs/schema.d.ts.map +1 -1
  201. package/dist/components/Properties/PinDot.d.ts +18 -0
  202. package/dist/components/Properties/PinDot.d.ts.map +1 -0
  203. package/dist/components/Properties/PropertyPanel.d.ts +106 -12
  204. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
  205. package/dist/components/Properties/index.d.ts +4 -2
  206. package/dist/components/Properties/index.d.ts.map +1 -1
  207. package/dist/components/Properties/index.js +2 -2
  208. package/dist/components/Properties/storyLayouts.d.ts +1 -1
  209. package/dist/components/RadioGroup/index.js +1 -1
  210. package/dist/components/RangeSlider/index.js +1 -1
  211. package/dist/components/ResizeHandle/index.js +1 -1
  212. package/dist/components/Select/Select.d.ts +8 -0
  213. package/dist/components/Select/Select.d.ts.map +1 -1
  214. package/dist/components/Select/index.js +1 -1
  215. package/dist/components/SelectionPanel/index.js +1 -1
  216. package/dist/components/Sidebar/index.js +1 -1
  217. package/dist/components/SidebarPanel/index.js +1 -1
  218. package/dist/components/Slider/Slider.d.ts +19 -1
  219. package/dist/components/Slider/Slider.d.ts.map +1 -1
  220. package/dist/components/Slider/index.d.ts +1 -1
  221. package/dist/components/Slider/index.d.ts.map +1 -1
  222. package/dist/components/Slider/index.js +1 -1
  223. package/dist/components/StatusBar/index.js +1 -1
  224. package/dist/components/Switch/index.js +1 -1
  225. package/dist/components/Tabs/index.js +1 -1
  226. package/dist/components/Timeline/Lane.d.ts +9 -7
  227. package/dist/components/Timeline/Lane.d.ts.map +1 -1
  228. package/dist/components/Timeline/LaneGraph.d.ts +24 -0
  229. package/dist/components/Timeline/LaneGraph.d.ts.map +1 -0
  230. package/dist/components/Timeline/Ruler.d.ts.map +1 -1
  231. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  232. package/dist/components/Timeline/index.js +2 -2
  233. package/dist/components/Timeline/keys.d.ts +4 -3
  234. package/dist/components/Timeline/keys.d.ts.map +1 -1
  235. package/dist/components/Timeline/timeScale.d.ts +2 -0
  236. package/dist/components/Timeline/timeScale.d.ts.map +1 -1
  237. package/dist/components/Toast/index.js +1 -1
  238. package/dist/components/ToggleBar/index.js +1 -1
  239. package/dist/components/TokenPanel/TokenPanel.d.ts +33 -0
  240. package/dist/components/TokenPanel/TokenPanel.d.ts.map +1 -0
  241. package/dist/components/TokenPanel/color.d.ts +7 -0
  242. package/dist/components/TokenPanel/color.d.ts.map +1 -0
  243. package/dist/components/TokenPanel/index.d.ts +5 -0
  244. package/dist/components/TokenPanel/index.d.ts.map +1 -0
  245. package/dist/components/TokenPanel/index.js +2 -0
  246. package/dist/components/TokenPanel/tokenTypes.d.ts +31 -0
  247. package/dist/components/TokenPanel/tokenTypes.d.ts.map +1 -0
  248. package/dist/components/ToolButton/index.js +1 -1
  249. package/dist/components/ToolGroup/index.js +1 -1
  250. package/dist/components/ToolPalette/index.js +1 -1
  251. package/dist/components/paintValue.d.ts +8 -0
  252. package/dist/components/paintValue.d.ts.map +1 -1
  253. package/dist/format/number.d.ts +16 -0
  254. package/dist/format/number.d.ts.map +1 -1
  255. package/dist/handles.d.ts +20 -0
  256. package/dist/handles.d.ts.map +1 -0
  257. package/dist/icons/Icon.d.ts +10 -2
  258. package/dist/icons/Icon.d.ts.map +1 -1
  259. package/dist/icons/index.d.ts +6 -3
  260. package/dist/icons/index.d.ts.map +1 -1
  261. package/dist/icons/paths.d.ts +270 -16
  262. package/dist/icons/paths.d.ts.map +1 -1
  263. package/dist/index.d.ts +11 -1
  264. package/dist/index.d.ts.map +1 -1
  265. package/dist/index.js +105 -65
  266. package/dist/index.js.map +1 -1
  267. package/dist/paintPreview.d.ts +13 -0
  268. package/dist/paintPreview.d.ts.map +1 -0
  269. package/dist/snap.d.ts +5 -0
  270. package/dist/snap.d.ts.map +1 -0
  271. package/dist/style.css +1 -1
  272. package/dist/useAsyncOptions.d.ts +38 -0
  273. package/dist/useAsyncOptions.d.ts.map +1 -0
  274. package/package.json +8 -6
  275. package/dist/chunks/BandEditor-CUlbOlJi.js.map +0 -1
  276. package/dist/chunks/ComboBox-BBRRWvdc.js +0 -107
  277. package/dist/chunks/ComboBox-BBRRWvdc.js.map +0 -1
  278. package/dist/chunks/CurveEditor-DtjdpJVB.js +0 -784
  279. package/dist/chunks/CurveEditor-DtjdpJVB.js.map +0 -1
  280. package/dist/chunks/DetentSlider-BpD7bgjN.js +0 -83
  281. package/dist/chunks/DetentSlider-BpD7bgjN.js.map +0 -1
  282. package/dist/chunks/GradientEditor-BLpAtMDK.js.map +0 -1
  283. package/dist/chunks/Icon-DBXtBB1f.js +0 -101
  284. package/dist/chunks/Icon-DBXtBB1f.js.map +0 -1
  285. package/dist/chunks/Keycaps-DSeq6QWH.js.map +0 -1
  286. package/dist/chunks/NumberField-DBowmOfe.js +0 -62
  287. package/dist/chunks/NumberField-DBowmOfe.js.map +0 -1
  288. package/dist/chunks/PaintInput-B7AScmHN.js +0 -118
  289. package/dist/chunks/PaintInput-B7AScmHN.js.map +0 -1
  290. package/dist/chunks/Plot2D-C97pO13t.js +0 -134
  291. package/dist/chunks/Plot2D-C97pO13t.js.map +0 -1
  292. package/dist/chunks/PointPlotter-CbDKVggs.js.map +0 -1
  293. package/dist/chunks/Prefs-4JSEtuU-.js +0 -294
  294. package/dist/chunks/Prefs-4JSEtuU-.js.map +0 -1
  295. package/dist/chunks/Properties-BpUYKi7-.js +0 -758
  296. package/dist/chunks/Properties-BpUYKi7-.js.map +0 -1
  297. package/dist/chunks/Select-CacMfs4v.js.map +0 -1
  298. package/dist/chunks/SelectionPanel-C59wavdA.js.map +0 -1
  299. package/dist/chunks/Slider-Bs-KSYgQ.js +0 -303
  300. package/dist/chunks/Slider-Bs-KSYgQ.js.map +0 -1
  301. package/dist/chunks/Timeline-Bz806JbE.js +0 -908
  302. package/dist/chunks/Timeline-Bz806JbE.js.map +0 -1
  303. package/dist/chunks/ToggleBar-Bxwv6xvj.js.map +0 -1
  304. package/dist/chunks/icons-BV27dhKB.js.map +0 -1
  305. package/dist/chunks/number-Bv1nbhOJ.js +0 -18
  306. package/dist/chunks/number-Bv1nbhOJ.js.map +0 -1
  307. package/dist/chunks/range.module-CvSfABmu.js +0 -8
  308. package/dist/chunks/range.module-CvSfABmu.js.map +0 -1
  309. package/dist/chunks/schema-CtWwGbqJ.js.map +0 -1
  310. package/dist/chunks/segmentedControl.module-BgvAPkSZ.js +0 -11
  311. package/dist/chunks/segmentedControl.module-BgvAPkSZ.js.map +0 -1
@@ -0,0 +1,916 @@
1
+ import { H as e, R as t, i as n } from "./icons-Btrs-JD7.js";
2
+ import { r } from "./Plot2D-Czvyt_vG.js";
3
+ import { i, n as a, t as o } from "./createKeyframeLayer-7j7ukrSx.js";
4
+ import { t as s } from "./snap-B0WQwetQ.js";
5
+ import { t as c } from "./DetentSlider-BWNSv07Z.js";
6
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { EASINGS as f, openPointerSession as p, resolveEasing as m, sampleTrack as h, useVisibleRaf as g } from "@weasel-js/core";
8
+ import { useCallback as _, useEffect as v, useLayoutEffect as y, useMemo as b, useReducer as x, useRef as S, useState as C } from "react";
9
+ var w = {
10
+ ruler: "_ruler_v2h5a_1",
11
+ tick: "_tick_v2h5a_11",
12
+ playhead: "_playhead_v2h5a_29",
13
+ lane: "_lane_v2h5a_38",
14
+ laneLabel: "_laneLabel_v2h5a_45",
15
+ disclosure: "_disclosure_v2h5a_65",
16
+ disclosureIcon: "_disclosureIcon_v2h5a_66",
17
+ disclosureCollapsed: "_disclosureCollapsed_v2h5a_67",
18
+ laneTrack: "_laneTrack_v2h5a_69",
19
+ key: "_key_v2h5a_76",
20
+ eventMark: "_eventMark_v2h5a_76",
21
+ keyGhost: "_keyGhost_v2h5a_96",
22
+ eventGhost: "_eventGhost_v2h5a_96",
23
+ graphHost: "_graphHost_v2h5a_113",
24
+ graph: "_graph_v2h5a_113",
25
+ nestedBar: "_nestedBar_v2h5a_132",
26
+ transport: "_transport_v2h5a_141",
27
+ transportButton: "_transportButton_v2h5a_150",
28
+ transportRow: "_transportRow_v2h5a_176",
29
+ time: "_time_v2h5a_194",
30
+ rate: "_rate_v2h5a_200",
31
+ rateSlider: "_rateSlider_v2h5a_201",
32
+ rateReadout: "_rateReadout_v2h5a_205",
33
+ root: "_root_v2h5a_211",
34
+ label: "_label_v2h5a_226",
35
+ body: "_body_v2h5a_228",
36
+ gutter: "_gutter_v2h5a_46",
37
+ rulerWrap: "_rulerWrap_v2h5a_230",
38
+ lanes: "_lanes_v2h5a_232",
39
+ inspector: "_inspector_v2h5a_239",
40
+ segment: "_segment_v2h5a_248",
41
+ easingPicker: "_easingPicker_v2h5a_258",
42
+ easingLabel: "_easingLabel_v2h5a_259",
43
+ easingPreview: "_easingPreview_v2h5a_261"
44
+ };
45
+ //#endregion
46
+ //#region src/components/Timeline/easingSpec.ts
47
+ function T(e) {
48
+ return typeof e == "object" && e && "bezier" in e ? e.bezier : null;
49
+ }
50
+ function E(e) {
51
+ return e === void 0 ? null : T(e);
52
+ }
53
+ function D(e) {
54
+ if (e === void 0) return "linear";
55
+ if (typeof e == "string") return e;
56
+ let t = T(e);
57
+ if (t) return `cubic-bezier(${t.join(", ")})`;
58
+ for (let [t, n] of Object.entries(f)) if (n === e) return t;
59
+ return "custom";
60
+ }
61
+ function O(e, t) {
62
+ let n = m(e), r = Array(t), i = t - 1;
63
+ for (let e = 0; e < t; e++) r[e] = n(i === 0 ? 0 : e / i);
64
+ return r;
65
+ }
66
+ var k = Object.keys(f), A = 24, j = {
67
+ linear: [
68
+ 0,
69
+ 0,
70
+ 1,
71
+ 1
72
+ ],
73
+ easeInQuad: [
74
+ .11,
75
+ 0,
76
+ .5,
77
+ 0
78
+ ],
79
+ easeOutQuad: [
80
+ .5,
81
+ 1,
82
+ .89,
83
+ 1
84
+ ],
85
+ easeInOutQuad: [
86
+ .45,
87
+ 0,
88
+ .55,
89
+ 1
90
+ ],
91
+ easeInCubic: [
92
+ .32,
93
+ 0,
94
+ .67,
95
+ 0
96
+ ],
97
+ easeOutCubic: [
98
+ .33,
99
+ 1,
100
+ .68,
101
+ 1
102
+ ],
103
+ easeInOutCubic: [
104
+ .65,
105
+ 0,
106
+ .35,
107
+ 1
108
+ ],
109
+ easeInSine: [
110
+ .12,
111
+ 0,
112
+ .39,
113
+ 0
114
+ ],
115
+ easeOutSine: [
116
+ .61,
117
+ 1,
118
+ .88,
119
+ 1
120
+ ],
121
+ easeInOutSine: [
122
+ .37,
123
+ 0,
124
+ .63,
125
+ 1
126
+ ]
127
+ }, M = [
128
+ .25,
129
+ .1,
130
+ .25,
131
+ 1
132
+ ];
133
+ function N(e) {
134
+ let { value: t, onChange: n } = e, r = E(t), i = D(t), a = r === null && k.includes(i), o = r === null ? a ? i : "linear" : "custom", s = O(t, A).map((e, t) => `${t / (A - 1) * 100},${100 - e * 100}`).join(" ");
135
+ return /* @__PURE__ */ d("div", {
136
+ className: w.easingPicker,
137
+ children: [
138
+ /* @__PURE__ */ d("label", { children: ["Easing", /* @__PURE__ */ d("select", {
139
+ value: o,
140
+ onChange: (e) => n(e.target.value === "linear" ? void 0 : e.target.value),
141
+ children: [
142
+ /* @__PURE__ */ u("option", {
143
+ value: "linear",
144
+ children: "linear"
145
+ }),
146
+ k.filter((e) => e !== "linear").map((e) => /* @__PURE__ */ u("option", {
147
+ value: e,
148
+ children: e
149
+ }, e)),
150
+ r === null ? null : /* @__PURE__ */ u("option", {
151
+ value: "custom",
152
+ children: "custom"
153
+ })
154
+ ]
155
+ })] }),
156
+ r === null ? /* @__PURE__ */ u("button", {
157
+ type: "button",
158
+ className: w.transportButton,
159
+ onClick: () => n({ bezier: j[o] ?? M }),
160
+ children: "Convert to bezier"
161
+ }) : /* @__PURE__ */ u("span", {
162
+ className: w.easingLabel,
163
+ children: i
164
+ }),
165
+ /* @__PURE__ */ u("svg", {
166
+ className: w.easingPreview,
167
+ "data-testid": "easing-preview",
168
+ viewBox: "0 0 100 100",
169
+ preserveAspectRatio: "none",
170
+ children: /* @__PURE__ */ u("polyline", {
171
+ points: s,
172
+ vectorEffect: "non-scaling-stroke"
173
+ })
174
+ })
175
+ ]
176
+ });
177
+ }
178
+ //#endregion
179
+ //#region src/components/Timeline/timeScale.ts
180
+ var P = 1;
181
+ function F(e, t) {
182
+ let n = e.to - e.from, r = n === 0 ? 0 : t / n, i = t === 0 ? 0 : n / t;
183
+ return {
184
+ window: e,
185
+ widthPx: t,
186
+ toPx: (t) => (t - e.from) * r,
187
+ toMs: (t) => e.from + t * i
188
+ };
189
+ }
190
+ function I(e, t) {
191
+ let n = e.to - e.from;
192
+ return n === 0 ? 0 : (t - e.from) / n;
193
+ }
194
+ function L(e, t) {
195
+ return `${I(e, t) * 100}%`;
196
+ }
197
+ function R(e, t) {
198
+ let n = e.to - e.from;
199
+ return n === 0 ? 0 : t / n;
200
+ }
201
+ function z(e, t) {
202
+ return `${R(e, t) * 100}%`;
203
+ }
204
+ function B(e, t) {
205
+ let n = Math.min(e.to - e.from, t.to - t.from), r = e.from;
206
+ return r < t.from && (r = t.from), r + n > t.to && (r = t.to - n), {
207
+ from: r,
208
+ to: r + n
209
+ };
210
+ }
211
+ function ee(e, t, n, r) {
212
+ let i = e.to - e.from, a = r.to - r.from, o = Math.min(a, Math.max(P, i * n)), s = i === 0 ? .5 : (t - e.from) / i;
213
+ return B({
214
+ from: t - s * o,
215
+ to: t + (1 - s) * o
216
+ }, r);
217
+ }
218
+ function te(e, t, n) {
219
+ return B({
220
+ from: e.from + t,
221
+ to: e.to + t
222
+ }, n);
223
+ }
224
+ function V(e, t, n) {
225
+ let i = e.to - e.from;
226
+ if (t <= 0 || i <= 0) return [];
227
+ let a = r(n / t * i), o = [];
228
+ for (let t = Math.ceil(e.from / a) * a; t <= e.to + 1e-9; t += a) o.push(Math.round(t / a) * a);
229
+ return o;
230
+ }
231
+ //#endregion
232
+ //#region src/components/Timeline/LaneGraph.tsx
233
+ var H = 8, ne = 10;
234
+ function re(e) {
235
+ let t = e.map((e) => e.value), n = Math.min(...t), r = Math.max(...t) - n || 1, i = r * H / (100 - 2 * H);
236
+ return [n - i, n + r + i];
237
+ }
238
+ function ie(e) {
239
+ let { keys: t, label: n, window: r, offset: s, snapTimes: c, selection: l, selectedSegment: d, onSelect: f, onSelectSegment: p, onKeysInput: m, onKeysCommit: h } = e, g = S(null), [_, v] = C({
240
+ width: 0,
241
+ height: 0
242
+ });
243
+ y(() => {
244
+ let e = g.current;
245
+ if (!e) return;
246
+ let t = () => {
247
+ let t = e.getBoundingClientRect();
248
+ v((e) => e.width === t.width && e.height === t.height ? e : {
249
+ width: t.width,
250
+ height: t.height
251
+ });
252
+ };
253
+ if (t(), typeof ResizeObserver > "u") return;
254
+ let n = new ResizeObserver(t);
255
+ return n.observe(e), () => n.disconnect();
256
+ }, []);
257
+ let x = b(() => a({
258
+ id: "keys",
259
+ label: n,
260
+ formatX: (e) => `${Math.round(e)} ms`,
261
+ snapX: c.map((e) => e - s),
262
+ xClamp: [0, Infinity],
263
+ step: { x: ne }
264
+ }), [
265
+ n,
266
+ c,
267
+ s
268
+ ]), T = b(() => ({
269
+ keys: t,
270
+ selectedKey: l,
271
+ selectedSegment: d,
272
+ drag: null
273
+ }), [
274
+ t,
275
+ l,
276
+ d
277
+ ]), [E, D] = C(null), O = E ?? T, k = S(O);
278
+ k.current = O;
279
+ let A = b(() => [{
280
+ layer: x,
281
+ state: O
282
+ }], [x, O]), j = (e, t) => {
283
+ let n = t, r = k.current;
284
+ if (n.selectedKey !== null && n.selectedKey !== r.selectedKey && f(n.selectedKey), n.selectedSegment !== null && n.selectedSegment !== r.selectedSegment && p?.(n.selectedSegment), !n.drag) {
285
+ D(null);
286
+ return;
287
+ }
288
+ if (D(n), n.drag.kind !== "key") return;
289
+ let i = o(n).keys;
290
+ i !== n.keys && m?.(i);
291
+ }, M = (e, t, n) => {
292
+ D(null);
293
+ let r = t;
294
+ r.keys !== n.keys && h(r.keys);
295
+ }, [N, P] = re(O.keys), F = _.width > 0 ? V(r, _.width, 64) : [];
296
+ return /* @__PURE__ */ u("div", {
297
+ ref: g,
298
+ className: w.graphHost,
299
+ children: _.width > 0 && _.height > 0 ? /* @__PURE__ */ u(i, {
300
+ className: w.graph,
301
+ "aria-label": `${n} graph`,
302
+ layers: A,
303
+ onLayerChange: j,
304
+ onLayerCommit: M,
305
+ width: _.width,
306
+ height: _.height,
307
+ xRange: [r.from - s, r.to - s],
308
+ yRange: [N, P],
309
+ grid: !1,
310
+ axes: !1,
311
+ xTicks: {
312
+ values: F.map((e) => e - s),
313
+ labels: !1
314
+ },
315
+ yTicks: {
316
+ labels: "outside",
317
+ gap: 10
318
+ },
319
+ history: !1
320
+ }) : null
321
+ });
322
+ }
323
+ //#endregion
324
+ //#region src/components/Timeline/Lane.tsx
325
+ var ae = 10;
326
+ function oe(e) {
327
+ return e.kind === "sampled" ? e.track.keys.map((e) => e.t) : e.kind === "event" ? e.track.events.map((e) => e.t) : [];
328
+ }
329
+ function se(e) {
330
+ let { row: t, window: r, mode: i, selection: a, onSelect: o, onKeyInput: c, onKeyCommit: f, onInsert: m, onToggleExpand: h, expanded: g, snapTimes: _, selectedSegment: y = null, onSelectSegment: b, onKeysInput: x, onKeysCommit: T } = e, E = S(null), D = S(null);
331
+ v(() => () => {
332
+ D.current?.cancel();
333
+ }, []);
334
+ let [O, k] = C(null), A = (e) => L(r, e + t.offset), j = (e) => {
335
+ let n = E.current?.getBoundingClientRect();
336
+ return n ? F(r, n.width).toMs(e - n.left) - t.offset : r.from;
337
+ }, M = () => {
338
+ let e = F(r, E.current?.getBoundingClientRect().width ?? 0);
339
+ return e.toMs(6) - e.toMs(0);
340
+ }, N = i === "graph" && t.numeric, P = t.kind === "sampled" ? t.track.keys : [], I = (e) => (n) => {
341
+ if (n.button !== 0) return;
342
+ n.stopPropagation(), o(e);
343
+ let r = (e) => {
344
+ let n = Math.max(0, j(e.clientX));
345
+ return e.altKey ? n : s(n + t.offset, _, M()) - t.offset;
346
+ };
347
+ k({
348
+ keyIndex: e,
349
+ t: B[e]
350
+ });
351
+ let i = () => {
352
+ k(null), D.current = null;
353
+ };
354
+ D.current?.cancel(), D.current = p(n.currentTarget, n, {
355
+ onMove: (t) => {
356
+ k({
357
+ keyIndex: e,
358
+ t: r(t)
359
+ }), c(e, r(t));
360
+ },
361
+ onEnd: (t) => {
362
+ f(e, r(t)), i();
363
+ },
364
+ onCancel: i
365
+ }, { capture: !1 });
366
+ }, R = (e, t) => (n) => {
367
+ let r = ae * (n.shiftKey ? 10 : 1);
368
+ n.key === "ArrowRight" && (n.preventDefault(), f(e, t + r)), n.key === "ArrowLeft" && (n.preventDefault(), f(e, Math.max(0, t - r)));
369
+ }, B = oe(t);
370
+ return /* @__PURE__ */ d("div", {
371
+ className: w.lane,
372
+ "data-depth": t.depth,
373
+ "data-mode": i,
374
+ "data-graph": N ? "true" : void 0,
375
+ children: [/* @__PURE__ */ d("div", {
376
+ className: w.laneLabel,
377
+ children: [t.kind === "timeline" ? /* @__PURE__ */ u("span", {
378
+ role: "button",
379
+ tabIndex: 0,
380
+ "aria-expanded": g,
381
+ "data-testid": "timeline-disclosure",
382
+ className: w.disclosure,
383
+ onClick: h,
384
+ onKeyDown: (e) => {
385
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), h());
386
+ },
387
+ children: /* @__PURE__ */ u(n, {
388
+ size: 14,
389
+ className: [w.disclosureIcon, !g && w.disclosureCollapsed].filter(Boolean).join(" ")
390
+ })
391
+ }) : null, t.label]
392
+ }), /* @__PURE__ */ u("div", {
393
+ className: w.laneTrack,
394
+ ref: E,
395
+ "data-testid": "timeline-lane-track",
396
+ onDoubleClick: (e) => {
397
+ t.kind === "sampled" && m(Math.max(0, j(e.clientX)));
398
+ },
399
+ children: N ? /* @__PURE__ */ u(ie, {
400
+ keys: P,
401
+ label: t.label,
402
+ window: r,
403
+ offset: t.offset,
404
+ snapTimes: _,
405
+ selection: a,
406
+ selectedSegment: y,
407
+ onSelect: o,
408
+ onSelectSegment: b,
409
+ onKeysInput: x,
410
+ onKeysCommit: (e) => T?.(e)
411
+ }) : /* @__PURE__ */ d(l, { children: [
412
+ t.kind === "timeline" ? /* @__PURE__ */ u("div", {
413
+ className: w.nestedBar,
414
+ "data-testid": "timeline-nested",
415
+ style: {
416
+ left: A(0),
417
+ width: z(r, t.track.timeline.duration ?? 0)
418
+ }
419
+ }) : null,
420
+ t.kind === "sampled" ? P.slice(1).map((e, n) => {
421
+ let i = n + 1;
422
+ return /* @__PURE__ */ u("div", {
423
+ role: "button",
424
+ tabIndex: 0,
425
+ "aria-label": `${t.label} segment into ${Math.round(e.t)} ms`,
426
+ "aria-current": y === i ? "true" : void 0,
427
+ "data-testid": "timeline-segment",
428
+ className: w.segment,
429
+ style: {
430
+ left: A(P[i - 1].t),
431
+ width: z(r, e.t - P[i - 1].t)
432
+ },
433
+ onClick: () => b?.(i),
434
+ onKeyDown: (e) => {
435
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), b?.(i));
436
+ }
437
+ }, `seg-${i}`);
438
+ }) : null,
439
+ B.map((e, n) => /* @__PURE__ */ u("div", {
440
+ role: "button",
441
+ tabIndex: 0,
442
+ "aria-label": `${t.label} key at ${Math.round(e)} ms`,
443
+ "aria-current": a === n ? "true" : void 0,
444
+ "data-testid": t.kind === "event" ? "timeline-event" : "timeline-key",
445
+ "data-dragging": O?.keyIndex === n ? "true" : void 0,
446
+ className: t.kind === "event" ? w.eventMark : w.key,
447
+ style: { left: A(e) },
448
+ onPointerDown: I(n),
449
+ onKeyDown: R(n, e)
450
+ }, n)),
451
+ O ? /* @__PURE__ */ u("div", {
452
+ "aria-hidden": "true",
453
+ "data-testid": "timeline-key-ghost",
454
+ className: t.kind === "event" ? w.eventGhost : w.keyGhost,
455
+ style: { left: A(O.t) }
456
+ }) : null
457
+ ] })
458
+ })]
459
+ });
460
+ }
461
+ //#endregion
462
+ //#region src/components/Timeline/Ruler.tsx
463
+ var ce = .0015;
464
+ function le(e) {
465
+ return e >= 1e3 ? `${(e / 1e3).toFixed(e % 1e3 == 0 ? 0 : 2)}s` : `${Math.round(e)}ms`;
466
+ }
467
+ function ue(e) {
468
+ let { window: t, bounds: n, playhead: r, onScrub: i, onWindowChange: a } = e, o = S(null), s = S(null);
469
+ v(() => () => {
470
+ s.current?.cancel();
471
+ }, []);
472
+ let [c, l] = C(0);
473
+ y(() => {
474
+ let e = o.current;
475
+ if (!e) return;
476
+ let t = () => l(e.getBoundingClientRect().width);
477
+ if (t(), typeof ResizeObserver > "u") return;
478
+ let n = new ResizeObserver(t);
479
+ return n.observe(e), () => n.disconnect();
480
+ }, []);
481
+ let f = () => o.current?.getBoundingClientRect().width ?? 0, m = (e) => {
482
+ let n = o.current?.getBoundingClientRect();
483
+ if (!n) return t.from;
484
+ let r = F(t, n.width).toMs(e - n.left);
485
+ return Math.min(t.to, Math.max(t.from, r));
486
+ }, h = (e) => {
487
+ if (e.button !== 0) return;
488
+ i(m(e.clientX)), s.current?.cancel();
489
+ let t = () => {
490
+ s.current = null;
491
+ };
492
+ s.current = p(e.currentTarget, e, {
493
+ onMove: (e) => {
494
+ i(m(e.clientX));
495
+ },
496
+ onEnd: t,
497
+ onCancel: t
498
+ }, { capture: !1 });
499
+ }, g = (e) => {
500
+ if (e.ctrlKey) a(ee(t, m(e.clientX), Math.exp(e.deltaY * ce), n));
501
+ else {
502
+ let r = f(), i = r === 0 ? 0 : (t.to - t.from) / r;
503
+ a(te(t, e.deltaY * i, n));
504
+ }
505
+ }, _ = V(t, c, 64), b = (e) => L(t, e);
506
+ return /* @__PURE__ */ d("div", {
507
+ className: w.ruler,
508
+ ref: o,
509
+ "data-testid": "timeline-ruler",
510
+ onPointerDown: h,
511
+ onWheel: g,
512
+ children: [_.map((e) => /* @__PURE__ */ u("span", {
513
+ className: w.tick,
514
+ "data-testid": "timeline-tick",
515
+ style: { left: b(e) },
516
+ children: le(e)
517
+ }, e)), /* @__PURE__ */ u("div", {
518
+ className: w.playhead,
519
+ "data-testid": "timeline-playhead",
520
+ style: { left: b(r) }
521
+ })]
522
+ });
523
+ }
524
+ //#endregion
525
+ //#region src/components/Timeline/Transport.tsx
526
+ var U = [
527
+ .25,
528
+ .5,
529
+ 1,
530
+ 2,
531
+ 4
532
+ ], W = (e) => `${(e / 1e3).toFixed(2)}s`;
533
+ function G(n) {
534
+ let { paused: r, loop: i, rate: a, playhead: o, duration: s, onPlay: l, onPause: f, onLoopChange: p, onRateChange: m } = n, h = i !== !1 && i !== 0, g = U.includes(a) ? U : [...U, a].sort((e, t) => e - t);
535
+ return /* @__PURE__ */ d("div", {
536
+ className: w.transport,
537
+ children: [
538
+ /* @__PURE__ */ u("button", {
539
+ type: "button",
540
+ className: w.transportButton,
541
+ "aria-label": r ? "Play" : "Pause",
542
+ onClick: r ? l : f,
543
+ children: u(r ? e : t, { size: 14 })
544
+ }),
545
+ /* @__PURE__ */ u("button", {
546
+ type: "button",
547
+ role: "switch",
548
+ "aria-checked": h,
549
+ "aria-label": "Loop",
550
+ className: w.transportButton,
551
+ onClick: () => p(!h),
552
+ children: "⟲"
553
+ }),
554
+ /* @__PURE__ */ d("div", {
555
+ className: w.rate,
556
+ children: [
557
+ "Rate",
558
+ /* @__PURE__ */ u(c, {
559
+ ariaLabel: "Rate",
560
+ items: g,
561
+ value: a,
562
+ onChange: m,
563
+ formatLabel: (e) => `${e}x`,
564
+ labels: "none",
565
+ className: w.rateSlider
566
+ }),
567
+ /* @__PURE__ */ d("span", {
568
+ className: w.rateReadout,
569
+ children: [a, "x"]
570
+ })
571
+ ]
572
+ }),
573
+ /* @__PURE__ */ d("span", {
574
+ className: w.time,
575
+ "data-testid": "timeline-time",
576
+ children: [
577
+ W(o),
578
+ " / ",
579
+ W(s)
580
+ ]
581
+ })
582
+ ]
583
+ });
584
+ }
585
+ //#endregion
586
+ //#region src/components/Timeline/lanes.ts
587
+ function de(e) {
588
+ if (e.kind !== "sampled") return !1;
589
+ let t = e.keys;
590
+ return t.length > 0 && t.every((e) => typeof e.value == "number");
591
+ }
592
+ function fe(e, t) {
593
+ let n = [], r = (e, i, a, o) => {
594
+ e.forEach((e, s) => {
595
+ let c = [...i, s], l = c.join(".");
596
+ n.push({
597
+ key: l,
598
+ path: c,
599
+ track: e,
600
+ label: e.label ?? `${e.kind} ${s}`,
601
+ depth: a,
602
+ offset: o,
603
+ kind: e.kind,
604
+ numeric: de(e)
605
+ }), e.kind === "timeline" && t.has(l) && r(e.timeline.tracks, c, a + 1, o + e.at);
606
+ });
607
+ };
608
+ return r(e, [], 0, 0), n;
609
+ }
610
+ function K(e, t) {
611
+ let n = e, r;
612
+ for (let e of t) {
613
+ if (r = n[e], !r) return;
614
+ n = r.kind === "timeline" ? r.timeline.tracks : [];
615
+ }
616
+ return r;
617
+ }
618
+ //#endregion
619
+ //#region src/components/Timeline/keys.ts
620
+ function q(e, t) {
621
+ return e.length === t.length && e.every((e, n) => e === t[n]);
622
+ }
623
+ function J(e, t) {
624
+ return {
625
+ ...e,
626
+ keys: t
627
+ };
628
+ }
629
+ function pe(e, t) {
630
+ return {
631
+ ...e,
632
+ events: t
633
+ };
634
+ }
635
+ function Y(e, t, n) {
636
+ let r = e.slice(), [i, ...a] = t;
637
+ if (a.length === 0) return r[i] = n, r;
638
+ let o = r[i];
639
+ if (o?.kind !== "timeline") return r;
640
+ let s = o;
641
+ return r[i] = {
642
+ ...s,
643
+ timeline: {
644
+ ...s.timeline,
645
+ tracks: Y(s.timeline.tracks, a, n)
646
+ }
647
+ }, r;
648
+ }
649
+ function X(e, t, n) {
650
+ let r = K(e, t.trackPath), i = Math.max(0, n);
651
+ if (r?.kind === "sampled") {
652
+ let n = r, a = {
653
+ ...n.keys[t.keyIndex],
654
+ t: i
655
+ }, o = n.keys.filter((e, n) => n !== t.keyIndex), s = o.findIndex((e) => e.t > i), c = s === -1 ? o.length : s;
656
+ return o.splice(c, 0, a), {
657
+ tracks: Y(e, t.trackPath, J(r, o)),
658
+ selection: {
659
+ trackPath: t.trackPath,
660
+ keyIndex: c
661
+ }
662
+ };
663
+ }
664
+ if (r?.kind === "event") {
665
+ let n = r, a = {
666
+ ...n.events[t.keyIndex],
667
+ t: i
668
+ }, o = n.events.filter((e, n) => n !== t.keyIndex), s = o.findIndex((e) => e.t > i), c = s === -1 ? o.length : s;
669
+ return o.splice(c, 0, a), {
670
+ tracks: Y(e, t.trackPath, pe(r, o)),
671
+ selection: {
672
+ trackPath: t.trackPath,
673
+ keyIndex: c
674
+ }
675
+ };
676
+ }
677
+ return {
678
+ tracks: e.slice(),
679
+ selection: t
680
+ };
681
+ }
682
+ function me(e, t, n) {
683
+ let r = K(e, t);
684
+ if (r?.kind !== "sampled") return {
685
+ tracks: e.slice(),
686
+ selection: null
687
+ };
688
+ let i = r, a = Math.max(0, n), o = i.keys.length === 0 ? 0 : h(i, a), s = i.keys.slice(), c = s.findIndex((e) => e.t > a), l = c === -1 ? s.length : c;
689
+ return s.splice(l, 0, {
690
+ t: a,
691
+ value: o
692
+ }), {
693
+ tracks: Y(e, t, J(r, s)),
694
+ selection: {
695
+ trackPath: t,
696
+ keyIndex: l
697
+ }
698
+ };
699
+ }
700
+ function he(e, t) {
701
+ let n = K(e, t.trackPath);
702
+ if (n?.kind !== "sampled") return {
703
+ tracks: e.slice(),
704
+ selection: t
705
+ };
706
+ let r = n.keys.filter((e, n) => n !== t.keyIndex);
707
+ return {
708
+ tracks: Y(e, t.trackPath, J(n, r)),
709
+ selection: r.length === 0 ? null : {
710
+ trackPath: t.trackPath,
711
+ keyIndex: Math.max(0, t.keyIndex - 1)
712
+ }
713
+ };
714
+ }
715
+ function Z(e, t, n) {
716
+ let r = K(e, t.trackPath);
717
+ if (r?.kind !== "sampled") return e.slice();
718
+ let i = r.keys.slice(), { easing: a, ...o } = i[t.keyIndex];
719
+ return i[t.keyIndex] = n === void 0 ? o : {
720
+ ...o,
721
+ easing: n
722
+ }, Y(e, t.trackPath, J(r, i));
723
+ }
724
+ function Q(e, t, n) {
725
+ let r = K(e, t);
726
+ return r?.kind === "sampled" ? Y(e, t, J(r, n.slice())) : e.slice();
727
+ }
728
+ function ge(e, t, n) {
729
+ let r = K(e, t.trackPath);
730
+ if (r?.kind !== "sampled") return e.slice();
731
+ let i = r.keys.slice();
732
+ return i[t.keyIndex] = {
733
+ ...i[t.keyIndex],
734
+ value: n
735
+ }, Y(e, t.trackPath, J(r, i));
736
+ }
737
+ //#endregion
738
+ //#region src/components/Timeline/Timeline.tsx
739
+ function $(e) {
740
+ let { tracks: t, duration: n, playhead: r, onInput: i, onChange: a, onScrub: o, renderKeyEditor: s, label: c, className: l } = e, [f, p] = C(() => /* @__PURE__ */ new Set()), [m, h] = C({
741
+ from: 0,
742
+ to: n
743
+ }), [g, _] = C(null), [v, y] = C(null), x = e.window ?? m, S = e.onWindowChange ?? h, T = e.selection === void 0 ? g : e.selection, E = e.onSelect ?? _, D = {
744
+ from: 0,
745
+ to: n
746
+ }, O = b(() => fe(t, f), [t, f]), k = b(() => {
747
+ let e = new Set([0, n]);
748
+ for (let t of O) if (t.kind === "sampled") for (let n of t.track.keys) e.add(n.t + t.offset);
749
+ return [...e];
750
+ }, [O, n]), A = (e) => {
751
+ p((t) => {
752
+ let n = new Set(t);
753
+ return n.has(e) ? n.delete(e) : n.add(e), n;
754
+ });
755
+ }, j = (e) => {
756
+ if ((e.key === "Delete" || e.key === "Backspace") && T) {
757
+ e.preventDefault();
758
+ let n = he(t, T);
759
+ a(n.tracks), E(n.selection);
760
+ }
761
+ }, M = T ? K(t, T.trackPath) : void 0, P = M?.kind === "sampled" ? M.keys[T.keyIndex] : void 0, F = v ? K(t, v.trackPath) : void 0, I = F?.kind === "sampled" ? F.keys[v.keyIndex] : void 0;
762
+ return /* @__PURE__ */ d("div", {
763
+ className: [w.root, l].filter(Boolean).join(" "),
764
+ "data-testid": "timeline-root",
765
+ tabIndex: -1,
766
+ onKeyDown: j,
767
+ children: [
768
+ c ? /* @__PURE__ */ u("div", {
769
+ className: w.label,
770
+ children: c
771
+ }) : null,
772
+ e.transport === !1 ? null : /* @__PURE__ */ d("div", {
773
+ className: w.transportRow,
774
+ children: [/* @__PURE__ */ u(G, {
775
+ ...e.transport ?? {
776
+ paused: !0,
777
+ loop: !1,
778
+ rate: 1,
779
+ onPlay: () => {},
780
+ onPause: () => {},
781
+ onLoopChange: () => {},
782
+ onRateChange: () => {}
783
+ },
784
+ playhead: r,
785
+ duration: n
786
+ }), /* @__PURE__ */ u("button", {
787
+ type: "button",
788
+ role: "switch",
789
+ "aria-checked": (e.mode ?? "dope") === "graph",
790
+ "aria-label": "Graph mode",
791
+ className: w.transportButton,
792
+ onClick: () => e.onModeChange?.((e.mode ?? "dope") === "graph" ? "dope" : "graph"),
793
+ children: "Graph"
794
+ })]
795
+ }),
796
+ /* @__PURE__ */ d("div", {
797
+ className: w.body,
798
+ children: [/* @__PURE__ */ u("div", { className: w.gutter }), /* @__PURE__ */ u("div", {
799
+ className: w.rulerWrap,
800
+ children: /* @__PURE__ */ u(ue, {
801
+ window: x,
802
+ bounds: D,
803
+ playhead: r,
804
+ onScrub: o,
805
+ onWindowChange: S
806
+ })
807
+ })]
808
+ }),
809
+ /* @__PURE__ */ u("div", {
810
+ className: w.lanes,
811
+ children: O.map((n) => {
812
+ let r = n.path;
813
+ return /* @__PURE__ */ u(se, {
814
+ row: n,
815
+ window: x,
816
+ mode: e.mode ?? "dope",
817
+ selection: T && q(T.trackPath, r) ? T.keyIndex : null,
818
+ expanded: f.has(n.key),
819
+ snapTimes: k,
820
+ onToggleExpand: () => A(n.key),
821
+ onSelect: (e) => E({
822
+ trackPath: r,
823
+ keyIndex: e
824
+ }),
825
+ onKeyInput: (e, n) => {
826
+ i?.(X(t, {
827
+ trackPath: r,
828
+ keyIndex: e
829
+ }, n).tracks);
830
+ },
831
+ onKeyCommit: (e, n) => {
832
+ let i = X(t, {
833
+ trackPath: r,
834
+ keyIndex: e
835
+ }, n);
836
+ a(i.tracks), E(i.selection);
837
+ },
838
+ onKeysInput: (e) => i?.(Q(t, r, e)),
839
+ onKeysCommit: (e) => a(Q(t, r, e)),
840
+ onInsert: (e) => {
841
+ let n = me(t, r, e);
842
+ a(n.tracks), E(n.selection);
843
+ },
844
+ selectedSegment: v && q(v.trackPath, r) ? v.keyIndex : null,
845
+ onSelectSegment: (e) => y({
846
+ trackPath: r,
847
+ keyIndex: e
848
+ })
849
+ }, n.key);
850
+ })
851
+ }),
852
+ s && T && P && M?.kind === "sampled" ? /* @__PURE__ */ u("div", {
853
+ className: w.inspector,
854
+ children: s({
855
+ key: P,
856
+ track: M,
857
+ selection: T,
858
+ commit: (e) => a(ge(t, T, e.value)),
859
+ setEasing: (e) => a(Z(t, T, e))
860
+ })
861
+ }) : null,
862
+ v && I ? /* @__PURE__ */ u("div", {
863
+ className: w.inspector,
864
+ children: /* @__PURE__ */ u(N, {
865
+ value: I.easing,
866
+ onChange: (e) => a(Z(t, v, e))
867
+ })
868
+ }) : null
869
+ ]
870
+ });
871
+ }
872
+ //#endregion
873
+ //#region src/components/Timeline/AnimatedTimeline.tsx
874
+ function _e(e) {
875
+ let { handle: t, ...n } = e, [, r] = x((e) => e + 1, 0);
876
+ v(() => t.subscribe(r), [t]);
877
+ let i = S(null), a = g(() => {
878
+ r(), t.isPaused() || i.current?.request();
879
+ });
880
+ i.current = a, v(() => (t.isPaused() || a.request(), () => a.cancel()), [t, a]);
881
+ let o = _((e) => {
882
+ t.edit(() => {
883
+ let n = t.tracks();
884
+ n.splice(0, n.length, ...e);
885
+ });
886
+ }, [t]), s = t.time(), c = t.duration();
887
+ return /* @__PURE__ */ u($, {
888
+ ...n,
889
+ tracks: t.tracks(),
890
+ duration: c,
891
+ playhead: s,
892
+ onChange: o,
893
+ onScrub: t.seek,
894
+ transport: e.transport === !1 ? !1 : {
895
+ paused: t.isPaused(),
896
+ loop: t.loop(),
897
+ rate: t.timeScale(),
898
+ onPlay: () => {
899
+ t.time() >= c && t.seek(0), t.resume(), a.request(), r();
900
+ },
901
+ onPause: () => {
902
+ t.pause(), r();
903
+ },
904
+ onLoopChange: (e) => {
905
+ t.setLoop(e), r();
906
+ },
907
+ onRateChange: (e) => {
908
+ t.setTimeScale(e), r();
909
+ }
910
+ }
911
+ });
912
+ }
913
+ //#endregion
914
+ export { N as a, D as c, G as i, O as l, $ as n, k as o, q as r, E as s, _e as t };
915
+
916
+ //# sourceMappingURL=Timeline-BEyKaBXl.js.map