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