@weasel-js/ui 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/dist/chunks/{ActionsBar-B-gWm0NE.js → ActionsBar-C2oXIJk-.js} +3 -3
  2. package/dist/chunks/{ActionsBar-B-gWm0NE.js.map → ActionsBar-C2oXIJk-.js.map} +1 -1
  3. package/dist/chunks/{Badge-BXTDs-zi.js → Badge-7yQseqZb.js} +233 -263
  4. package/dist/chunks/Badge-7yQseqZb.js.map +1 -0
  5. package/dist/chunks/BandEditor-CqiMlSF9.js +252 -0
  6. package/dist/chunks/BandEditor-CqiMlSF9.js.map +1 -0
  7. package/dist/chunks/{Callout-wRyevt8I.js → Callout-63z0T-w3.js} +1 -1
  8. package/dist/chunks/{Callout-wRyevt8I.js.map → Callout-63z0T-w3.js.map} +1 -1
  9. package/dist/chunks/{Checkbox-D_GCnoJ0.js → Checkbox-CkcngYWa.js} +1 -1
  10. package/dist/chunks/{Checkbox-D_GCnoJ0.js.map → Checkbox-CkcngYWa.js.map} +1 -1
  11. package/dist/chunks/{ColorField-pEkaSppg.js → ColorField-CCBSv8dp.js} +2 -2
  12. package/dist/chunks/{ColorField-pEkaSppg.js.map → ColorField-CCBSv8dp.js.map} +1 -1
  13. package/dist/chunks/{ComboBox-inno5gt1.js → ComboBox-TnIrRldB.js} +2 -2
  14. package/dist/chunks/{ComboBox-inno5gt1.js.map → ComboBox-TnIrRldB.js.map} +1 -1
  15. package/dist/chunks/{CurveEditor-Cpuvl_iN.js → CurveEditor-BNbP2wgq.js} +193 -196
  16. package/dist/chunks/CurveEditor-BNbP2wgq.js.map +1 -0
  17. package/dist/chunks/{DataGrid-BWZZUekH.js → DataGrid-CiJGbgok.js} +2 -5
  18. package/dist/chunks/DataGrid-CiJGbgok.js.map +1 -0
  19. package/dist/chunks/{DetentSlider--tQdVQj_.js → DetentSlider-C6RTsiPi.js} +2 -2
  20. package/dist/chunks/{DetentSlider--tQdVQj_.js.map → DetentSlider-C6RTsiPi.js.map} +1 -1
  21. package/dist/chunks/{Dialog-CX2B8PIp.js → Dialog-D8pVzsw8.js} +1 -1
  22. package/dist/chunks/{Dialog-CX2B8PIp.js.map → Dialog-D8pVzsw8.js.map} +1 -1
  23. package/dist/chunks/Disclosure-aSX2CZlw.js +47 -0
  24. package/dist/chunks/Disclosure-aSX2CZlw.js.map +1 -0
  25. package/dist/chunks/{DragHandleGlyph--2zsZzA2.js → DragHandleGlyph-C6GJyfnm.js} +1 -1
  26. package/dist/chunks/{DragHandleGlyph--2zsZzA2.js.map → DragHandleGlyph-C6GJyfnm.js.map} +1 -1
  27. package/dist/chunks/{Field-Bc6Nuc3p.js → Field-BUroh92b.js} +1 -1
  28. package/dist/chunks/{Field-Bc6Nuc3p.js.map → Field-BUroh92b.js.map} +1 -1
  29. package/dist/chunks/{FontFamilySelect-CvrXKVwv.js → FontFamilySelect-xjOHQMsK.js} +2 -2
  30. package/dist/chunks/{FontFamilySelect-CvrXKVwv.js.map → FontFamilySelect-xjOHQMsK.js.map} +1 -1
  31. package/dist/chunks/{GradientEditor-C5pPbMa_.js → GradientEditor-D1IVEkHO.js} +13 -11
  32. package/dist/chunks/{GradientEditor-C5pPbMa_.js.map → GradientEditor-D1IVEkHO.js.map} +1 -1
  33. package/dist/chunks/{InlineRange-CBt_SBsC.js → InlineRange-DG2dvtb4.js} +2 -2
  34. package/dist/chunks/{InlineRange-CBt_SBsC.js.map → InlineRange-DG2dvtb4.js.map} +1 -1
  35. package/dist/chunks/{Input-CSAECs_T.js → Input-CxMANia3.js} +2 -2
  36. package/dist/chunks/{Input-CSAECs_T.js.map → Input-CxMANia3.js.map} +1 -1
  37. package/dist/chunks/{ItemList-POiCvUDx.js → ItemList-BcdHAah3.js} +1 -1
  38. package/dist/chunks/{ItemList-POiCvUDx.js.map → ItemList-BcdHAah3.js.map} +1 -1
  39. package/dist/chunks/{Keycaps-DszN5Dwl.js → Keycaps-D-UGWDrt.js} +1 -1
  40. package/dist/chunks/{Keycaps-DszN5Dwl.js.map → Keycaps-D-UGWDrt.js.map} +1 -1
  41. package/dist/chunks/{LayerStack-htMwIsJ6.js → LayerStack-DQnWSOVC.js} +23 -26
  42. package/dist/chunks/LayerStack-DQnWSOVC.js.map +1 -0
  43. package/dist/chunks/{NumberField-Byw1iaIJ.js → NumberField-DLw4UmF3.js} +12 -10
  44. package/dist/chunks/NumberField-DLw4UmF3.js.map +1 -0
  45. package/dist/chunks/{OptionsBar-efIwfqYe.js → OptionsBar-BXyk_5gT.js} +3 -3
  46. package/dist/chunks/{OptionsBar-efIwfqYe.js.map → OptionsBar-BXyk_5gT.js.map} +1 -1
  47. package/dist/chunks/{PaintInput-DtCSGda0.js → PaintInput-DCgWtKxw.js} +5 -5
  48. package/dist/chunks/{PaintInput-DtCSGda0.js.map → PaintInput-DCgWtKxw.js.map} +1 -1
  49. package/dist/chunks/{PatternPicker-G9e0CU5H.js → PatternPicker-CPFEhpXD.js} +2 -2
  50. package/dist/chunks/{PatternPicker-G9e0CU5H.js.map → PatternPicker-CPFEhpXD.js.map} +1 -1
  51. package/dist/chunks/{Plot2D-D63D5w6c.js → Plot2D-BtI_c25q.js} +1 -1
  52. package/dist/chunks/{Plot2D-D63D5w6c.js.map → Plot2D-BtI_c25q.js.map} +1 -1
  53. package/dist/chunks/{PointPlotter-CR-QGCIf.js → PointPlotter-B-DvXjkL.js} +2 -2
  54. package/dist/chunks/{PointPlotter-CR-QGCIf.js.map → PointPlotter-B-DvXjkL.js.map} +1 -1
  55. package/dist/chunks/{Powerline--gx4j0Zr.js → Powerline-CJYCbqSc.js} +2 -2
  56. package/dist/chunks/{Powerline--gx4j0Zr.js.map → Powerline-CJYCbqSc.js.map} +1 -1
  57. package/dist/chunks/{Prefs-ByKG3ylD.js → Prefs-BqnwyjmH.js} +10 -10
  58. package/dist/chunks/{Prefs-ByKG3ylD.js.map → Prefs-BqnwyjmH.js.map} +1 -1
  59. package/dist/chunks/Properties-fLSEE65J.js +746 -0
  60. package/dist/chunks/Properties-fLSEE65J.js.map +1 -0
  61. package/dist/chunks/{RadioGroup-XjbfUb7S.js → RadioGroup-VGAaLYaR.js} +2 -2
  62. package/dist/chunks/{RadioGroup-XjbfUb7S.js.map → RadioGroup-VGAaLYaR.js.map} +1 -1
  63. package/dist/chunks/{RangeSlider-D0hFbx_Z.js → RangeSlider-DefoAOsh.js} +1 -1
  64. package/dist/chunks/{RangeSlider-D0hFbx_Z.js.map → RangeSlider-DefoAOsh.js.map} +1 -1
  65. package/dist/chunks/ResizeHandle-DMJdqRud.js +79 -0
  66. package/dist/chunks/ResizeHandle-DMJdqRud.js.map +1 -0
  67. package/dist/chunks/Select-DGafwTF0.js +121 -0
  68. package/dist/chunks/Select-DGafwTF0.js.map +1 -0
  69. package/dist/chunks/{SelectionPanel-OfbtyDJH.js → SelectionPanel-BwBevj5F.js} +10 -10
  70. package/dist/chunks/{SelectionPanel-OfbtyDJH.js.map → SelectionPanel-BwBevj5F.js.map} +1 -1
  71. package/dist/chunks/{Sidebar-Du0yp1S0.js → Sidebar-CeSRkWKK.js} +1 -1
  72. package/dist/chunks/{Sidebar-Du0yp1S0.js.map → Sidebar-CeSRkWKK.js.map} +1 -1
  73. package/dist/chunks/{SidebarPanel-Cuq__FIC.js → SidebarPanel-BWIiJv7M.js} +1 -1
  74. package/dist/chunks/{SidebarPanel-Cuq__FIC.js.map → SidebarPanel-BWIiJv7M.js.map} +1 -1
  75. package/dist/chunks/Slider-X6WcO-6s.js +303 -0
  76. package/dist/chunks/Slider-X6WcO-6s.js.map +1 -0
  77. package/dist/chunks/{StatusBar-DLYwh5sb.js → StatusBar-COyPUoEs.js} +1 -1
  78. package/dist/chunks/{StatusBar-DLYwh5sb.js.map → StatusBar-COyPUoEs.js.map} +1 -1
  79. package/dist/chunks/{Switch-B521iN3m.js → Switch-Y097LD1L.js} +1 -1
  80. package/dist/chunks/{Switch-B521iN3m.js.map → Switch-Y097LD1L.js.map} +1 -1
  81. package/dist/chunks/{Tabs-BuifAv0p.js → Tabs-BDzkqWDE.js} +1 -1
  82. package/dist/chunks/{Tabs-BuifAv0p.js.map → Tabs-BDzkqWDE.js.map} +1 -1
  83. package/dist/chunks/{Timeline-BE7UWajy.js → Timeline-D9xQBdKN.js} +219 -205
  84. package/dist/chunks/Timeline-D9xQBdKN.js.map +1 -0
  85. package/dist/chunks/{Toast-B75V2gqL.js → Toast-DX0iLdC3.js} +1 -1
  86. package/dist/chunks/{Toast-B75V2gqL.js.map → Toast-DX0iLdC3.js.map} +1 -1
  87. package/dist/chunks/{ToggleBar-D0veW91s.js → ToggleBar-fQGk_Wf_.js} +2 -2
  88. package/dist/chunks/{ToggleBar-D0veW91s.js.map → ToggleBar-fQGk_Wf_.js.map} +1 -1
  89. package/dist/chunks/{ToolButton-D5VwD47i.js → ToolButton-DpqTcgLa.js} +1 -1
  90. package/dist/chunks/{ToolButton-D5VwD47i.js.map → ToolButton-DpqTcgLa.js.map} +1 -1
  91. package/dist/chunks/{ToolGroup-B2PlMKQ-.js → ToolGroup-DOrObiiA.js} +1 -1
  92. package/dist/chunks/{ToolGroup-B2PlMKQ-.js.map → ToolGroup-DOrObiiA.js.map} +1 -1
  93. package/dist/chunks/{ToolOptionsBar-ByHX7y1M.js → ToolOptionsBar-f6b5u99i.js} +1 -1
  94. package/dist/chunks/{ToolOptionsBar-ByHX7y1M.js.map → ToolOptionsBar-f6b5u99i.js.map} +1 -1
  95. package/dist/chunks/{ToolPalette-Bi5ezkO6.js → ToolPalette-B_Zjw6dC.js} +5 -5
  96. package/dist/chunks/{ToolPalette-Bi5ezkO6.js.map → ToolPalette-B_Zjw6dC.js.map} +1 -1
  97. package/dist/chunks/{keyGlyph-BLFMKZgF.js → keyGlyph-L5bsDQe5.js} +1 -1
  98. package/dist/chunks/{keyGlyph-BLFMKZgF.js.map → keyGlyph-L5bsDQe5.js.map} +1 -1
  99. package/dist/chunks/{number-D3TDawLC.js → number-Dy633mrx.js} +1 -1
  100. package/dist/chunks/{number-D3TDawLC.js.map → number-Dy633mrx.js.map} +1 -1
  101. package/dist/chunks/{range.module-CttzfN6a.js → range.module-CO59aXEH.js} +1 -1
  102. package/dist/chunks/{range.module-CttzfN6a.js.map → range.module-CO59aXEH.js.map} +1 -1
  103. package/dist/chunks/{segmentedControl.module-XADeq9e5.js → segmentedControl.module-pcPOsNey.js} +1 -1
  104. package/dist/chunks/{segmentedControl.module-XADeq9e5.js.map → segmentedControl.module-pcPOsNey.js.map} +1 -1
  105. package/dist/chunks/useReorderDragList-C2fhvbU1.js +102 -0
  106. package/dist/chunks/useReorderDragList-C2fhvbU1.js.map +1 -0
  107. package/dist/chunks/{useRovingTabIndex-ByjY4lnw.js → useRovingTabIndex-DqXFNDaD.js} +1 -1
  108. package/dist/chunks/{useRovingTabIndex-ByjY4lnw.js.map → useRovingTabIndex-DqXFNDaD.js.map} +1 -1
  109. package/dist/components/ActionsBar/index.js +1 -1
  110. package/dist/components/Badge/Badge.d.ts.map +1 -1
  111. package/dist/components/Badge/index.js +1 -1
  112. package/dist/components/Badge/shapes/Perforated.d.ts.map +1 -1
  113. package/dist/components/Badge/shapes/Shield.d.ts.map +1 -1
  114. package/dist/components/Badge/useSvgBox.d.ts +10 -0
  115. package/dist/components/Badge/useSvgBox.d.ts.map +1 -0
  116. package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
  117. package/dist/components/BandEditor/index.js +1 -1
  118. package/dist/components/Callout/index.js +1 -1
  119. package/dist/components/Checkbox/index.js +1 -1
  120. package/dist/components/ColorField/index.js +1 -1
  121. package/dist/components/ComboBox/index.js +1 -1
  122. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -1
  123. package/dist/components/CurveEditor/index.js +1 -1
  124. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  125. package/dist/components/DataGrid/index.js +1 -1
  126. package/dist/components/DetentSlider/index.js +1 -1
  127. package/dist/components/Dialog/index.js +1 -1
  128. package/dist/components/Disclosure/Disclosure.d.ts +64 -0
  129. package/dist/components/Disclosure/Disclosure.d.ts.map +1 -0
  130. package/dist/components/Disclosure/index.d.ts +3 -0
  131. package/dist/components/Disclosure/index.d.ts.map +1 -0
  132. package/dist/components/Disclosure/index.js +2 -0
  133. package/dist/components/DragHandleGlyph/index.js +1 -1
  134. package/dist/components/Field/index.js +1 -1
  135. package/dist/components/FontFamilySelect/index.js +1 -1
  136. package/dist/components/GradientEditor/index.js +1 -1
  137. package/dist/components/InlineRange/index.js +1 -1
  138. package/dist/components/Input/index.js +1 -1
  139. package/dist/components/ItemList/index.js +1 -1
  140. package/dist/components/Keycaps/index.js +2 -2
  141. package/dist/components/LayerStack/LayerStack.d.ts +22 -9
  142. package/dist/components/LayerStack/LayerStack.d.ts.map +1 -1
  143. package/dist/components/LayerStack/index.js +1 -1
  144. package/dist/components/NumberField/NumberField.d.ts +12 -0
  145. package/dist/components/NumberField/NumberField.d.ts.map +1 -1
  146. package/dist/components/NumberField/index.js +1 -1
  147. package/dist/components/OptionsBar/index.js +1 -1
  148. package/dist/components/PaintInput/index.js +1 -1
  149. package/dist/components/PatternPicker/index.js +1 -1
  150. package/dist/components/Plot2D/index.js +1 -1
  151. package/dist/components/PointPlotter/index.js +1 -1
  152. package/dist/components/Powerline/index.js +2 -2
  153. package/dist/components/Prefs/index.js +1 -1
  154. package/dist/components/Properties/EffectCard.d.ts +3 -2
  155. package/dist/components/Properties/EffectCard.d.ts.map +1 -1
  156. package/dist/components/Properties/PropertyGroup.d.ts +24 -10
  157. package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
  158. package/dist/components/Properties/PropertyPanel.d.ts +68 -24
  159. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
  160. package/dist/components/Properties/index.d.ts +1 -1
  161. package/dist/components/Properties/index.d.ts.map +1 -1
  162. package/dist/components/Properties/index.js +2 -2
  163. package/dist/components/RadioGroup/index.js +1 -1
  164. package/dist/components/RangeSlider/index.js +1 -1
  165. package/dist/components/ResizeHandle/ResizeHandle.d.ts.map +1 -1
  166. package/dist/components/ResizeHandle/index.js +1 -1
  167. package/dist/components/Select/Select.d.ts +7 -1
  168. package/dist/components/Select/Select.d.ts.map +1 -1
  169. package/dist/components/Select/index.js +1 -1
  170. package/dist/components/SelectionPanel/index.js +1 -1
  171. package/dist/components/Sidebar/index.js +1 -1
  172. package/dist/components/SidebarPanel/index.js +1 -1
  173. package/dist/components/Slider/Slider.d.ts.map +1 -1
  174. package/dist/components/Slider/index.js +1 -1
  175. package/dist/components/StatusBar/index.js +1 -1
  176. package/dist/components/Switch/index.js +1 -1
  177. package/dist/components/Tabs/index.js +1 -1
  178. package/dist/components/Timeline/Lane.d.ts.map +1 -1
  179. package/dist/components/Timeline/Ruler.d.ts.map +1 -1
  180. package/dist/components/Timeline/index.js +1 -1
  181. package/dist/components/Toast/index.js +1 -1
  182. package/dist/components/ToggleBar/index.js +1 -1
  183. package/dist/components/ToolButton/index.js +1 -1
  184. package/dist/components/ToolGroup/index.js +1 -1
  185. package/dist/components/ToolOptionsBar/index.js +1 -1
  186. package/dist/components/ToolPalette/index.js +1 -1
  187. package/dist/index.d.ts +1 -0
  188. package/dist/index.d.ts.map +1 -1
  189. package/dist/index.js +58 -57
  190. package/dist/index.js.map +1 -1
  191. package/dist/style.css +1 -1
  192. package/dist/useReorderDragList.d.ts +20 -7
  193. package/dist/useReorderDragList.d.ts.map +1 -1
  194. package/package.json +6 -6
  195. package/dist/chunks/Badge-BXTDs-zi.js.map +0 -1
  196. package/dist/chunks/BandEditor-CfLW44uR.js +0 -248
  197. package/dist/chunks/BandEditor-CfLW44uR.js.map +0 -1
  198. package/dist/chunks/CurveEditor-Cpuvl_iN.js.map +0 -1
  199. package/dist/chunks/DataGrid-BWZZUekH.js.map +0 -1
  200. package/dist/chunks/LayerStack-htMwIsJ6.js.map +0 -1
  201. package/dist/chunks/NumberField-Byw1iaIJ.js.map +0 -1
  202. package/dist/chunks/Properties-BEGlt0Z2.js +0 -662
  203. package/dist/chunks/Properties-BEGlt0Z2.js.map +0 -1
  204. package/dist/chunks/ResizeHandle-DjGZkPpx.js +0 -81
  205. package/dist/chunks/ResizeHandle-DjGZkPpx.js.map +0 -1
  206. package/dist/chunks/Select-D1uP21db.js +0 -103
  207. package/dist/chunks/Select-D1uP21db.js.map +0 -1
  208. package/dist/chunks/Slider-CSwL-Nj9.js +0 -296
  209. package/dist/chunks/Slider-CSwL-Nj9.js.map +0 -1
  210. package/dist/chunks/Timeline-BE7UWajy.js.map +0 -1
  211. package/dist/chunks/useReorderDragList-nQMVwNBd.js +0 -109
  212. package/dist/chunks/useReorderDragList-nQMVwNBd.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { H as e, R as t, i as n } from "./icons-BV27dhKB.js";
2
- import { t as r } from "./DetentSlider--tQdVQj_.js";
2
+ import { t as r } from "./DetentSlider-C6RTsiPi.js";
3
3
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
- import { EASINGS as s, cubicBezierEasing as c, resolveEasing as l, sampleTrack as u, useVisibleRaf as d } from "@weasel-js/core";
5
- import { useCallback as f, useEffect as p, useLayoutEffect as m, useMemo as h, useReducer as g, useRef as _, useState as v } from "react";
6
- var y = {
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
7
  ruler: "_ruler_gapxk_1",
8
8
  tick: "_tick_gapxk_11",
9
9
  playhead: "_playhead_gapxk_29",
@@ -41,26 +41,26 @@ var y = {
41
41
  };
42
42
  //#endregion
43
43
  //#region src/components/Timeline/easingSpec.ts
44
- function b(e) {
45
- return typeof e == "object" && e && "bezier" in e ? e.bezier : null;
46
- }
47
44
  function x(e) {
48
- return e === void 0 ? null : b(e);
45
+ return typeof e == "object" && e && "bezier" in e ? e.bezier : null;
49
46
  }
50
47
  function S(e) {
48
+ return e === void 0 ? null : x(e);
49
+ }
50
+ function C(e) {
51
51
  if (e === void 0) return "linear";
52
52
  if (typeof e == "string") return e;
53
- let t = b(e);
53
+ let t = x(e);
54
54
  if (t) return `cubic-bezier(${t.join(", ")})`;
55
55
  for (let [t, n] of Object.entries(s)) if (n === e) return t;
56
56
  return "custom";
57
57
  }
58
- function C(e, t) {
59
- let n = l(e), r = Array(t), i = t - 1;
58
+ function w(e, t) {
59
+ let n = u(e), r = Array(t), i = t - 1;
60
60
  for (let e = 0; e < t; e++) r[e] = n(i === 0 ? 0 : e / i);
61
61
  return r;
62
62
  }
63
- var w = Object.keys(s), T = 24, E = {
63
+ var T = Object.keys(s), E = 24, D = {
64
64
  linear: [
65
65
  0,
66
66
  0,
@@ -121,16 +121,16 @@ var w = Object.keys(s), T = 24, E = {
121
121
  .63,
122
122
  1
123
123
  ]
124
- }, D = [
124
+ }, O = [
125
125
  .25,
126
126
  .1,
127
127
  .25,
128
128
  1
129
129
  ];
130
- function O(e) {
131
- let { value: t, onChange: n } = e, r = x(t), i = S(t), s = r === null && w.includes(i), c = r === null ? s ? i : "linear" : "custom", l = C(t, T).map((e, t) => `${t / (T - 1) * 100},${100 - e * 100}`).join(" ");
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
132
  return /* @__PURE__ */ o("div", {
133
- className: y.easingPicker,
133
+ className: b.easingPicker,
134
134
  children: [
135
135
  /* @__PURE__ */ o("label", { children: ["Easing", /* @__PURE__ */ o("select", {
136
136
  value: c,
@@ -140,7 +140,7 @@ function O(e) {
140
140
  value: "linear",
141
141
  children: "linear"
142
142
  }),
143
- w.filter((e) => e !== "linear").map((e) => /* @__PURE__ */ a("option", {
143
+ T.filter((e) => e !== "linear").map((e) => /* @__PURE__ */ a("option", {
144
144
  value: e,
145
145
  children: e
146
146
  }, e)),
@@ -152,15 +152,15 @@ function O(e) {
152
152
  })] }),
153
153
  r === null ? /* @__PURE__ */ a("button", {
154
154
  type: "button",
155
- className: y.transportButton,
156
- onClick: () => n({ bezier: E[c] ?? D }),
155
+ className: b.transportButton,
156
+ onClick: () => n({ bezier: D[c] ?? O }),
157
157
  children: "Convert to bezier"
158
158
  }) : /* @__PURE__ */ a("span", {
159
- className: y.easingLabel,
159
+ className: b.easingLabel,
160
160
  children: i
161
161
  }),
162
162
  /* @__PURE__ */ a("svg", {
163
- className: y.easingPreview,
163
+ className: b.easingPreview,
164
164
  "data-testid": "easing-preview",
165
165
  viewBox: "0 0 100 100",
166
166
  preserveAspectRatio: "none",
@@ -174,8 +174,8 @@ function O(e) {
174
174
  }
175
175
  //#endregion
176
176
  //#region src/components/Timeline/timeScale.ts
177
- var k = 1;
178
- function A(e, t) {
177
+ var A = 1;
178
+ function j(e, t) {
179
179
  let n = e.to - e.from, r = n === 0 ? 0 : t / n, i = t === 0 ? 0 : n / t;
180
180
  return {
181
181
  window: e,
@@ -184,36 +184,36 @@ function A(e, t) {
184
184
  toMs: (t) => e.from + t * i
185
185
  };
186
186
  }
187
- function j(e, t) {
187
+ function M(e, t) {
188
188
  let n = e.to - e.from;
189
189
  return n === 0 ? 0 : (t - e.from) / n;
190
190
  }
191
- function M(e, t) {
192
- return `${j(e, t) * 100}%`;
193
- }
194
191
  function N(e, t) {
195
- let n = e.to - e.from;
196
- return n === 0 ? 0 : t / n;
192
+ return `${M(e, t) * 100}%`;
197
193
  }
198
194
  function P(e, t) {
199
- return `${N(e, t) * 100}%`;
195
+ let n = e.to - e.from;
196
+ return n === 0 ? 0 : t / n;
200
197
  }
201
198
  function F(e, t) {
199
+ return `${P(e, t) * 100}%`;
200
+ }
201
+ function I(e, t) {
202
202
  let n = Math.min(e.to - e.from, t.to - t.from), r = e.from;
203
203
  return r < t.from && (r = t.from), r + n > t.to && (r = t.to - n), {
204
204
  from: r,
205
205
  to: r + n
206
206
  };
207
207
  }
208
- function I(e, t, n, r) {
209
- let i = e.to - e.from, a = r.to - r.from, o = Math.min(a, Math.max(k, i * n)), s = i === 0 ? .5 : (t - e.from) / i;
210
- return F({
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
211
  from: t - s * o,
212
212
  to: t + (1 - s) * o
213
213
  }, r);
214
214
  }
215
- function L(e, t, n) {
216
- return F({
215
+ function ee(e, t, n) {
216
+ return I({
217
217
  from: e.from + t,
218
218
  to: e.to + t
219
219
  }, n);
@@ -273,7 +273,7 @@ function W(e, t) {
273
273
  keys: t
274
274
  };
275
275
  }
276
- function ee(e, t) {
276
+ function te(e, t) {
277
277
  return {
278
278
  ...e,
279
279
  events: t
@@ -314,7 +314,7 @@ function K(e, t, n) {
314
314
  t: i
315
315
  }, o = n.events.filter((e, n) => n !== t.keyIndex), s = o.findIndex((e) => e.t > i), c = s === -1 ? o.length : s;
316
316
  return o.splice(c, 0, a), {
317
- tracks: G(e, t.trackPath, ee(r, o)),
317
+ tracks: G(e, t.trackPath, te(r, o)),
318
318
  selection: {
319
319
  trackPath: t.trackPath,
320
320
  keyIndex: c
@@ -332,7 +332,7 @@ function q(e, t, n) {
332
332
  tracks: e.slice(),
333
333
  selection: null
334
334
  };
335
- let i = r, a = Math.max(0, n), o = i.keys.length === 0 ? 0 : u(i, a), s = i.keys.slice(), c = s.findIndex((e) => e.t > a), l = c === -1 ? s.length : c;
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
336
  return s.splice(l, 0, {
337
337
  t: a,
338
338
  value: o
@@ -377,7 +377,7 @@ function X(e, t, n) {
377
377
  value: n
378
378
  }, G(e, t.trackPath, W(r, i));
379
379
  }
380
- function te(e, t, n) {
380
+ function ne(e, t, n) {
381
381
  let r = e, i = n;
382
382
  for (let n of t) {
383
383
  let t = Math.abs(n - e);
@@ -387,129 +387,139 @@ function te(e, t, n) {
387
387
  }
388
388
  //#endregion
389
389
  //#region src/components/Timeline/Lane.tsx
390
- var Z = 8, ne = 6, re = 10, ie = 16;
391
- function ae(e, t) {
390
+ var Z = 8, re = 6, ie = 10, ae = 16;
391
+ function oe(e, t) {
392
392
  let n = c(...e), r = Array(t), i = t - 1;
393
393
  for (let e = 0; e < t; e++) r[e] = n(i === 0 ? 0 : e / i);
394
394
  return r;
395
395
  }
396
- function oe(e) {
396
+ function se(e) {
397
397
  return e.kind === "sampled" ? e.track.keys.map((e) => e.t) : e.kind === "event" ? e.track.events.map((e) => e.t) : [];
398
398
  }
399
- function Q(e) {
400
- let { row: t, window: r, mode: s, selection: c, onSelect: l, onKeyInput: u, onKeyCommit: d, onInsert: f, onToggleExpand: m, expanded: h, snapTimes: g, selectedSegment: b = null, onSelectSegment: S, onEasingCommit: w } = e, T = _(null), E = _(null);
401
- p(() => () => {
402
- E.current?.();
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
403
  }, []);
404
- let [D, O] = v(null), [k, N] = v(null), F = (e) => M(r, e + t.offset), I = (e) => {
405
- let n = T.current?.getBoundingClientRect();
406
- return n ? A(r, n.width).toMs(e - n.left) - t.offset : r.from;
407
- }, L = () => {
408
- let e = A(r, T.current?.getBoundingClientRect().width ?? 0);
409
- return e.toMs(ne) - e.toMs(0);
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
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 = T.current?.getBoundingClientRect();
411
+ let t = E.current?.getBoundingClientRect();
412
412
  if (!t || t.height === 0) return V;
413
413
  let n = ((1 - (e - t.top) / t.height) * 100 - Z) / (100 - 2 * Z);
414
414
  return V + Math.min(1, Math.max(0, n)) * H;
415
- }, ee = () => {
415
+ }, te = () => {
416
416
  let e = [];
417
417
  for (let n = 1; n < z.length; n++) {
418
- let i = z[n - 1], a = z[n], o = D && D.keyIndex === n ? ae(D.points, ie) : C(a.easing, ie);
418
+ let i = z[n - 1], a = z[n], o = O && O.keyIndex === n ? oe(O.points, ae) : w(a.easing, ae);
419
419
  for (let n = 0; n < o.length; n++) {
420
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(`${j(r, s + t.offset) * 100},${100 - U(c)}`);
421
+ e.push(`${M(r, s + t.offset) * 100},${100 - U(c)}`);
422
422
  }
423
423
  }
424
424
  return e.join(" ");
425
- }, G = b != null && t.kind === "sampled" ? x(z[b]?.easing) : null, K = D && D.keyIndex === b ? D.points : G, q = (e, t, n) => {
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
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
427
  return {
428
- left: F(a),
428
+ left: I(a),
429
429
  bottom: `${U(o)}%`
430
430
  };
431
- }, J = (e, t) => (n) => {
431
+ }, J = (e, t) => {
432
+ D.current?.cancel(), D.current = l(e.currentTarget, e, t, { capture: !1 });
433
+ }, Y = (e, t) => (n) => {
432
434
  if (n.button !== 0 || !G) return;
433
435
  n.stopPropagation();
434
436
  let r = z[e - 1], i = z[e], a = [...G], o = (e) => {
435
- let n = I(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];
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];
436
438
  return l[t * 2] = o, l[t * 2 + 1] = c, l;
437
- }, s = (t) => {
438
- a = o(t), O({
439
- keyIndex: e,
440
- points: a
441
- });
442
- }, c = (t) => {
443
- a = o(t), w?.(e, { bezier: a }), l();
444
- }, l = () => {
445
- O(null), document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", c), document.removeEventListener("pointercancel", l), E.current = null;
439
+ }, s = () => {
440
+ k(null), D.current = null;
446
441
  };
447
- document.addEventListener("pointermove", s), document.addEventListener("pointerup", c), document.addEventListener("pointercancel", l), E.current = l;
448
- }, Y = (e) => (n) => {
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) => {
449
455
  if (n.button !== 0) return;
450
- n.stopPropagation(), l(e);
456
+ n.stopPropagation(), u(e);
451
457
  let r = (e) => {
452
- let n = Math.max(0, I(e.clientX));
453
- return e.altKey ? n : te(n + t.offset, g, L()) - t.offset;
458
+ let n = Math.max(0, L(e.clientX));
459
+ return e.altKey ? n : ne(n + t.offset, _, ee()) - t.offset;
454
460
  }, i = (e) => R ? W(e.clientY) : void 0;
455
- N({
461
+ P({
456
462
  keyIndex: e,
457
463
  t: Q[e],
458
464
  value: B[e]
459
465
  });
460
- let a = (t) => {
461
- let n = i(t);
462
- N({
463
- keyIndex: e,
464
- t: r(t),
465
- value: n ?? B[e]
466
- }), n === void 0 ? u(e, r(t)) : u(e, r(t), n);
467
- }, o = (t) => {
468
- let n = i(t);
469
- n === void 0 ? d(e, r(t)) : d(e, r(t), n), s();
470
- }, s = () => {
471
- N(null), document.removeEventListener("pointermove", a), document.removeEventListener("pointerup", o), document.removeEventListener("pointercancel", s), E.current = null;
466
+ let a = () => {
467
+ P(null), D.current = null;
472
468
  };
473
- document.addEventListener("pointermove", a), document.addEventListener("pointerup", o), document.addEventListener("pointercancel", s), E.current = s;
474
- }, X = (e, t) => (n) => {
475
- let r = re * (n.shiftKey ? 10 : 1);
476
- n.key === "ArrowRight" && (n.preventDefault(), d(e, t + r)), n.key === "ArrowLeft" && (n.preventDefault(), d(e, Math.max(0, t - r)));
477
- }, Q = oe(t);
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);
478
488
  return /* @__PURE__ */ o("div", {
479
- className: y.lane,
489
+ className: b.lane,
480
490
  "data-depth": t.depth,
481
491
  "data-mode": s,
482
492
  children: [/* @__PURE__ */ o("div", {
483
- className: y.laneLabel,
493
+ className: b.laneLabel,
484
494
  children: [t.kind === "timeline" ? /* @__PURE__ */ a("span", {
485
495
  role: "button",
486
496
  tabIndex: 0,
487
- "aria-expanded": h,
497
+ "aria-expanded": g,
488
498
  "data-testid": "timeline-disclosure",
489
- className: y.disclosure,
490
- onClick: m,
499
+ className: b.disclosure,
500
+ onClick: h,
491
501
  onKeyDown: (e) => {
492
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m());
502
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), h());
493
503
  },
494
504
  children: /* @__PURE__ */ a(n, {
495
505
  size: 14,
496
- className: [y.disclosureIcon, !h && y.disclosureCollapsed].filter(Boolean).join(" ")
506
+ className: [b.disclosureIcon, !g && b.disclosureCollapsed].filter(Boolean).join(" ")
497
507
  })
498
508
  }) : null, t.label]
499
509
  }), /* @__PURE__ */ o("div", {
500
- className: y.laneTrack,
501
- ref: T,
510
+ className: b.laneTrack,
511
+ ref: E,
502
512
  "data-testid": "timeline-lane-track",
503
513
  onDoubleClick: (e) => {
504
- t.kind === "sampled" && f(Math.max(0, I(e.clientX)));
514
+ t.kind === "sampled" && p(Math.max(0, L(e.clientX)));
505
515
  },
506
516
  children: [
507
517
  t.kind === "timeline" ? /* @__PURE__ */ a("div", {
508
- className: y.nestedBar,
518
+ className: b.nestedBar,
509
519
  "data-testid": "timeline-nested",
510
520
  style: {
511
- left: F(0),
512
- width: P(r, t.track.timeline.duration ?? 0)
521
+ left: I(0),
522
+ width: F(r, t.track.timeline.duration ?? 0)
513
523
  }
514
524
  }) : null,
515
525
  t.kind === "sampled" ? z.slice(1).map((e, n) => {
@@ -518,26 +528,26 @@ function Q(e) {
518
528
  role: "button",
519
529
  tabIndex: 0,
520
530
  "aria-label": `${t.label} segment into ${Math.round(e.t)} ms`,
521
- "aria-current": b === i ? "true" : void 0,
531
+ "aria-current": x === i ? "true" : void 0,
522
532
  "data-testid": "timeline-segment",
523
- className: y.segment,
533
+ className: b.segment,
524
534
  style: {
525
- left: F(z[i - 1].t),
526
- width: P(r, e.t - z[i - 1].t)
535
+ left: I(z[i - 1].t),
536
+ width: F(r, e.t - z[i - 1].t)
527
537
  },
528
- onClick: () => S?.(i),
538
+ onClick: () => C?.(i),
529
539
  onKeyDown: (e) => {
530
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), S?.(i));
540
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C?.(i));
531
541
  }
532
542
  }, `seg-${i}`);
533
543
  }) : null,
534
544
  R && z.length > 1 ? /* @__PURE__ */ a("svg", {
535
- className: y.curve,
545
+ className: b.curve,
536
546
  "data-testid": "timeline-curve",
537
547
  viewBox: "0 0 100 100",
538
548
  preserveAspectRatio: "none",
539
549
  children: /* @__PURE__ */ a("polyline", {
540
- points: ee(),
550
+ points: te(),
541
551
  vectorEffect: "non-scaling-stroke"
542
552
  })
543
553
  }) : null,
@@ -547,40 +557,40 @@ function Q(e) {
547
557
  "aria-label": `${t.label} key at ${Math.round(e)} ms`,
548
558
  "aria-current": c === n ? "true" : void 0,
549
559
  "data-testid": t.kind === "event" ? "timeline-event" : "timeline-key",
550
- "data-dragging": k?.keyIndex === n ? "true" : void 0,
551
- className: t.kind === "event" ? y.eventMark : y.key,
560
+ "data-dragging": A?.keyIndex === n ? "true" : void 0,
561
+ className: t.kind === "event" ? b.eventMark : b.key,
552
562
  style: R ? {
553
- left: F(e),
563
+ left: I(e),
554
564
  bottom: `${U(B[n])}%`
555
- } : { left: F(e) },
556
- onPointerDown: Y(n),
557
- onKeyDown: X(n, e)
565
+ } : { left: I(e) },
566
+ onPointerDown: X(n),
567
+ onKeyDown: ce(n, e)
558
568
  }, n)),
559
- k ? /* @__PURE__ */ a("div", {
569
+ A ? /* @__PURE__ */ a("div", {
560
570
  "aria-hidden": "true",
561
571
  "data-testid": "timeline-key-ghost",
562
- className: t.kind === "event" ? y.eventGhost : y.keyGhost,
563
- style: R && k.value !== void 0 ? {
564
- left: F(k.t),
565
- bottom: `${U(k.value)}%`
566
- } : { left: F(k.t) }
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) }
567
577
  }) : null,
568
- R && K && b != null ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("div", {
578
+ R && K && x != null ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("div", {
569
579
  role: "button",
570
580
  tabIndex: 0,
571
581
  "aria-label": `${t.label} bezier handle 1`,
572
582
  "data-testid": "timeline-bezier-handle",
573
- className: y.bezierHandle,
574
- style: q(b, K[0], K[1]),
575
- onPointerDown: J(b, 0)
583
+ className: b.bezierHandle,
584
+ style: q(x, K[0], K[1]),
585
+ onPointerDown: Y(x, 0)
576
586
  }), /* @__PURE__ */ a("div", {
577
587
  role: "button",
578
588
  tabIndex: 0,
579
589
  "aria-label": `${t.label} bezier handle 2`,
580
590
  "data-testid": "timeline-bezier-handle",
581
- className: y.bezierHandle,
582
- style: q(b, K[2], K[3]),
583
- onPointerDown: J(b, 1)
591
+ className: b.bezierHandle,
592
+ style: q(x, K[2], K[3]),
593
+ onPointerDown: Y(x, 1)
584
594
  })] }) : null
585
595
  ]
586
596
  })]
@@ -588,60 +598,64 @@ function Q(e) {
588
598
  }
589
599
  //#endregion
590
600
  //#region src/components/Timeline/Ruler.tsx
591
- var se = 64, ce = .0015;
592
- function le(e) {
601
+ var Q = 64, le = .0015;
602
+ function ue(e) {
593
603
  return e >= 1e3 ? `${(e / 1e3).toFixed(e % 1e3 == 0 ? 0 : 2)}s` : `${Math.round(e)}ms`;
594
604
  }
595
- function ue(e) {
596
- let { window: t, bounds: n, playhead: r, onScrub: i, onWindowChange: s } = e, c = _(null), l = _(null);
597
- p(() => () => {
598
- l.current?.();
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();
599
609
  }, []);
600
- let [u, d] = v(0);
601
- m(() => {
610
+ let [d, f] = y(0);
611
+ h(() => {
602
612
  let e = c.current;
603
613
  if (!e) return;
604
- let t = () => d(e.getBoundingClientRect().width);
614
+ let t = () => f(e.getBoundingClientRect().width);
605
615
  if (t(), typeof ResizeObserver > "u") return;
606
616
  let n = new ResizeObserver(t);
607
617
  return n.observe(e), () => n.disconnect();
608
618
  }, []);
609
- let f = () => c.current?.getBoundingClientRect().width ?? 0, h = (e) => {
619
+ let p = () => c.current?.getBoundingClientRect().width ?? 0, g = (e) => {
610
620
  let n = c.current?.getBoundingClientRect();
611
621
  if (!n) return t.from;
612
- let r = A(t, n.width).toMs(e - n.left);
622
+ let r = j(t, n.width).toMs(e - n.left);
613
623
  return Math.min(t.to, Math.max(t.from, r));
614
- }, g = (e) => {
624
+ }, _ = (e) => {
615
625
  if (e.button !== 0) return;
616
- i(h(e.clientX));
617
- let t = (e) => {
618
- i(h(e.clientX));
619
- }, n = () => {
620
- document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", n), document.removeEventListener("pointercancel", n), l.current = null;
626
+ i(g(e.clientX)), u.current?.cancel();
627
+ let t = () => {
628
+ u.current = null;
621
629
  };
622
- document.addEventListener("pointermove", t), document.addEventListener("pointerup", n), document.addEventListener("pointercancel", n), l.current = n;
623
- }, b = (e) => {
624
- if (e.ctrlKey) s(I(t, h(e.clientX), Math.exp(e.deltaY * ce), n));
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));
625
639
  else {
626
- let r = f(), i = r === 0 ? 0 : (t.to - t.from) / r;
627
- s(L(t, e.deltaY * i, n));
640
+ let r = p(), i = r === 0 ? 0 : (t.to - t.from) / r;
641
+ s(ee(t, e.deltaY * i, n));
628
642
  }
629
- }, x = z(t, u, se), S = (e) => M(t, e);
643
+ }, S = z(t, d, Q), C = (e) => N(t, e);
630
644
  return /* @__PURE__ */ o("div", {
631
- className: y.ruler,
645
+ className: b.ruler,
632
646
  ref: c,
633
647
  "data-testid": "timeline-ruler",
634
- onPointerDown: g,
635
- onWheel: b,
636
- children: [x.map((e) => /* @__PURE__ */ a("span", {
637
- className: y.tick,
648
+ onPointerDown: _,
649
+ onWheel: x,
650
+ children: [S.map((e) => /* @__PURE__ */ a("span", {
651
+ className: b.tick,
638
652
  "data-testid": "timeline-tick",
639
- style: { left: S(e) },
640
- children: le(e)
653
+ style: { left: C(e) },
654
+ children: ue(e)
641
655
  }, e)), /* @__PURE__ */ a("div", {
642
- className: y.playhead,
656
+ className: b.playhead,
643
657
  "data-testid": "timeline-playhead",
644
- style: { left: S(r) }
658
+ style: { left: C(r) }
645
659
  })]
646
660
  });
647
661
  }
@@ -653,26 +667,26 @@ var $ = [
653
667
  1,
654
668
  2,
655
669
  4
656
- ], de = (e) => `${(e / 1e3).toFixed(2)}s`;
657
- function fe(n) {
670
+ ], fe = (e) => `${(e / 1e3).toFixed(2)}s`;
671
+ function pe(n) {
658
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);
659
673
  return /* @__PURE__ */ o("div", {
660
- className: y.transport,
674
+ className: b.transport,
661
675
  children: [
662
676
  /* @__PURE__ */ a("button", {
663
677
  type: "button",
664
- className: y.transportButton,
678
+ className: b.transportButton,
665
679
  "aria-label": i ? "Play" : "Pause",
666
680
  onClick: i ? d : f,
667
681
  children: a(i ? e : t, { size: 14 })
668
682
  }),
669
683
  /* @__PURE__ */ o("span", {
670
- className: y.time,
684
+ className: b.time,
671
685
  "data-testid": "timeline-time",
672
686
  children: [
673
- de(l),
687
+ fe(l),
674
688
  " / ",
675
- de(u)
689
+ fe(u)
676
690
  ]
677
691
  }),
678
692
  /* @__PURE__ */ a("button", {
@@ -680,12 +694,12 @@ function fe(n) {
680
694
  role: "switch",
681
695
  "aria-checked": h,
682
696
  "aria-label": "Loop",
683
- className: y.transportButton,
697
+ className: b.transportButton,
684
698
  onClick: () => p(!h),
685
699
  children: "⟲"
686
700
  }),
687
701
  /* @__PURE__ */ o("div", {
688
- className: y.rate,
702
+ className: b.rate,
689
703
  children: [
690
704
  "Rate",
691
705
  /* @__PURE__ */ a(r, {
@@ -695,10 +709,10 @@ function fe(n) {
695
709
  onChange: m,
696
710
  formatLabel: (e) => `${e}x`,
697
711
  labels: "none",
698
- className: y.rateSlider
712
+ className: b.rateSlider
699
713
  }),
700
714
  /* @__PURE__ */ o("span", {
701
- className: y.rateReadout,
715
+ className: b.rateReadout,
702
716
  children: [c, "x"]
703
717
  })
704
718
  ]
@@ -708,18 +722,18 @@ function fe(n) {
708
722
  }
709
723
  //#endregion
710
724
  //#region src/components/Timeline/Timeline.tsx
711
- function pe(e) {
712
- let { tracks: t, duration: n, playhead: r, onInput: i, onChange: s, onScrub: c, renderKeyEditor: l, label: u, className: d } = e, [f, p] = v(() => /* @__PURE__ */ new Set()), [m, g] = v({
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({
713
727
  from: 0,
714
728
  to: n
715
- }), [_, b] = v(null), [x, S] = v(null), C = e.window ?? m, w = e.onWindowChange ?? g, T = e.selection === void 0 ? _ : e.selection, E = e.onSelect ?? b, D = {
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 = {
716
730
  from: 0,
717
731
  to: n
718
- }, k = h(() => V(t, f), [t, f]), A = h(() => {
732
+ }, O = g(() => V(t, f), [t, f]), A = g(() => {
719
733
  let e = new Set([0, n]);
720
- for (let t of k) if (t.kind === "sampled") for (let n of t.track.keys) e.add(n.t + t.offset);
734
+ for (let t of O) if (t.kind === "sampled") for (let n of t.track.keys) e.add(n.t + t.offset);
721
735
  return [...e];
722
- }, [k, n]), j = (e) => {
736
+ }, [O, n]), j = (e) => {
723
737
  p((t) => {
724
738
  let n = new Set(t);
725
739
  return n.has(e) ? n.delete(e) : n.add(e), n;
@@ -732,18 +746,18 @@ function pe(e) {
732
746
  }
733
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;
734
748
  return /* @__PURE__ */ o("div", {
735
- className: [y.root, d].filter(Boolean).join(" "),
749
+ className: [b.root, d].filter(Boolean).join(" "),
736
750
  "data-testid": "timeline-root",
737
751
  tabIndex: -1,
738
752
  onKeyDown: M,
739
753
  children: [
740
754
  u ? /* @__PURE__ */ a("div", {
741
- className: y.label,
755
+ className: b.label,
742
756
  children: u
743
757
  }) : null,
744
758
  e.transport === !1 ? null : /* @__PURE__ */ o("div", {
745
- className: y.transportRow,
746
- children: [/* @__PURE__ */ a(fe, {
759
+ className: b.transportRow,
760
+ children: [/* @__PURE__ */ a(pe, {
747
761
  ...e.transport ?? {
748
762
  paused: !0,
749
763
  loop: !1,
@@ -760,16 +774,16 @@ function pe(e) {
760
774
  role: "switch",
761
775
  "aria-checked": (e.mode ?? "dope") === "graph",
762
776
  "aria-label": "Graph mode",
763
- className: y.transportButton,
777
+ className: b.transportButton,
764
778
  onClick: () => e.onModeChange?.((e.mode ?? "dope") === "graph" ? "dope" : "graph"),
765
779
  children: "Graph"
766
780
  })]
767
781
  }),
768
782
  /* @__PURE__ */ o("div", {
769
- className: y.body,
770
- children: [/* @__PURE__ */ a("div", { className: y.gutter }), /* @__PURE__ */ a("div", {
771
- className: y.rulerWrap,
772
- children: /* @__PURE__ */ a(ue, {
783
+ className: b.body,
784
+ children: [/* @__PURE__ */ a("div", { className: b.gutter }), /* @__PURE__ */ a("div", {
785
+ className: b.rulerWrap,
786
+ children: /* @__PURE__ */ a(de, {
773
787
  window: C,
774
788
  bounds: D,
775
789
  playhead: r,
@@ -779,10 +793,10 @@ function pe(e) {
779
793
  })]
780
794
  }),
781
795
  /* @__PURE__ */ a("div", {
782
- className: y.lanes,
783
- children: k.map((n) => {
796
+ className: b.lanes,
797
+ children: O.map((n) => {
784
798
  let r = n.path;
785
- return /* @__PURE__ */ a(Q, {
799
+ return /* @__PURE__ */ a(ce, {
786
800
  row: n,
787
801
  window: C,
788
802
  mode: e.mode ?? "dope",
@@ -828,7 +842,7 @@ function pe(e) {
828
842
  })
829
843
  }),
830
844
  l && T && P && N?.kind === "sampled" ? /* @__PURE__ */ a("div", {
831
- className: y.inspector,
845
+ className: b.inspector,
832
846
  children: l({
833
847
  key: P,
834
848
  track: N,
@@ -838,8 +852,8 @@ function pe(e) {
838
852
  })
839
853
  }) : null,
840
854
  x && I ? /* @__PURE__ */ a("div", {
841
- className: y.inspector,
842
- children: /* @__PURE__ */ a(O, {
855
+ className: b.inspector,
856
+ children: /* @__PURE__ */ a(k, {
843
857
  value: I.easing,
844
858
  onChange: (e) => s(Y(t, x, e))
845
859
  })
@@ -849,20 +863,20 @@ function pe(e) {
849
863
  }
850
864
  //#endregion
851
865
  //#region src/components/Timeline/AnimatedTimeline.tsx
852
- function me(e) {
853
- let { handle: t, ...n } = e, [, r] = g((e) => e + 1, 0);
854
- p(() => t.subscribe(r), [t]);
855
- let i = _(null), o = d(() => {
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(() => {
856
870
  r(), t.isPaused() || i.current?.request();
857
871
  });
858
- i.current = o, p(() => (t.isPaused() || o.request(), () => o.cancel()), [t, o]);
859
- let s = f((e) => {
872
+ i.current = o, m(() => (t.isPaused() || o.request(), () => o.cancel()), [t, o]);
873
+ let s = p((e) => {
860
874
  t.edit(() => {
861
875
  let n = t.tracks();
862
876
  n.splice(0, n.length, ...e);
863
877
  });
864
878
  }, [t]), c = t.time(), l = t.duration();
865
- return /* @__PURE__ */ a(pe, {
879
+ return /* @__PURE__ */ a(me, {
866
880
  ...n,
867
881
  tracks: t.tracks(),
868
882
  duration: l,
@@ -889,6 +903,6 @@ function me(e) {
889
903
  });
890
904
  }
891
905
  //#endregion
892
- export { O as a, S as c, U as i, C as l, pe as n, w as o, fe as r, x as s, me as t };
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 };
893
907
 
894
- //# sourceMappingURL=Timeline-BE7UWajy.js.map
908
+ //# sourceMappingURL=Timeline-D9xQBdKN.js.map