dialkit 1.4.0 → 1.4.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.
package/dist/icons.d.ts CHANGED
@@ -2,6 +2,7 @@ declare const ICON_CHEVRON = "M6 9.5L12 15.5L18 9.5";
2
2
  declare const ICON_CHECK = "M5 12.75L10 19L19 5";
3
3
  declare const ICON_PAUSE: string[];
4
4
  declare const ICON_PLAY = "M9.24394 2.36758C7.41419 1.18362 5 2.49701 5 4.67639V19.3238C5 21.5032 7.41419 22.8166 9.24394 21.6326L20.5624 14.3089C22.2371 13.2253 22.2372 10.775 20.5624 9.69129L9.24394 2.36758Z";
5
+ declare const ICON_REPLAY: string[];
5
6
  declare const ICON_TIMELINE: string[];
6
7
  declare const ICON_CLIPBOARD: {
7
8
  board: string;
@@ -19,4 +20,4 @@ declare const ICON_PANEL: {
19
20
  }[];
20
21
  };
21
22
 
22
- export { ICON_ADD_PRESET, ICON_CHECK, ICON_CHEVRON, ICON_CLIPBOARD, ICON_PANEL, ICON_PAUSE, ICON_PLAY, ICON_TIMELINE, ICON_TRASH };
23
+ export { ICON_ADD_PRESET, ICON_CHECK, ICON_CHEVRON, ICON_CLIPBOARD, ICON_PANEL, ICON_PAUSE, ICON_PLAY, ICON_REPLAY, ICON_TIMELINE, ICON_TRASH };
package/dist/icons.js CHANGED
@@ -6,6 +6,10 @@ var ICON_PAUSE = [
6
6
  "M16.75 3C15.2312 3 14 4.23122 14 5.75V18.25C14 19.7688 15.2312 21 16.75 21H17.25C18.7688 21 20 19.7688 20 18.25V5.75C20 4.23122 18.7688 3 17.25 3H16.75Z"
7
7
  ];
8
8
  var ICON_PLAY = "M9.24394 2.36758C7.41419 1.18362 5 2.49701 5 4.67639V19.3238C5 21.5032 7.41419 22.8166 9.24394 21.6326L20.5624 14.3089C22.2371 13.2253 22.2372 10.775 20.5624 9.69129L9.24394 2.36758Z";
9
+ var ICON_REPLAY = [
10
+ "M12 2.5C17.2466 2.50016 21.5 6.7534 21.5 12C21.5 17.2466 17.2466 21.4998 12 21.5C7.52191 21.5 3.76987 18.4025 2.76465 14.2344C2.63517 13.6975 2.96508 13.1578 3.50195 13.0283C4.03883 12.8988 4.57851 13.2288 4.70801 13.7656C5.5016 17.0563 8.46701 19.5 12 19.5C16.142 19.4998 19.5 16.142 19.5 12C19.5 7.85796 16.142 4.50016 12 4.5C9.32981 4.5 6.98389 5.89541 5.6543 8H7.5C8.05228 8 8.5 8.44772 8.5 9C8.5 9.55228 8.05228 10 7.5 10H3.5C2.94772 10 2.5 9.55228 2.5 9V5C2.5 4.44772 2.94772 4 3.5 4C4.05228 4 4.5 4.44772 4.5 5V6.16797C6.2376 3.93677 8.95063 2.5 12 2.5Z",
11
+ "M10 9.94043C10 9.33379 10.6826 8.97849 11.1797 9.32617L14.1221 11.3857C14.5486 11.6843 14.5486 12.3157 14.1221 12.6143L11.1797 14.6738C10.6826 15.0215 10 14.6662 10 14.0596V9.94043Z"
12
+ ];
9
13
  var ICON_TIMELINE = [
10
14
  "M18.868 10C20.8517 10.0003 22.2886 11.8914 21.7577 13.8027L20.369 18.8027C20.0083 20.1012 18.826 20.9999 17.4784 21H6.51941C5.17179 21 3.98948 20.1012 3.62878 18.8027L2.24011 13.8027C1.7092 11.8913 3.14603 10.0003 5.12976 10H18.868Z",
11
15
  "M18.9989 6.5C19.5511 6.50007 19.9989 6.94776 19.9989 7.5C19.9989 8.05224 19.5511 8.49993 18.9989 8.5H4.9989C4.44661 8.5 3.9989 8.05228 3.9989 7.5C3.9989 6.94772 4.44661 6.5 4.9989 6.5H18.9989Z",
@@ -46,6 +50,7 @@ export {
46
50
  ICON_PANEL,
47
51
  ICON_PAUSE,
48
52
  ICON_PLAY,
53
+ ICON_REPLAY,
49
54
  ICON_TIMELINE,
50
55
  ICON_TRASH
51
56
  };
package/dist/icons.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/icons.ts"],"sourcesContent":["// Shared SVG icon geometry — single source of truth across all framework adapters.\n\nexport const ICON_CHEVRON = 'M6 9.5L12 15.5L18 9.5';\n\nexport const ICON_CHECK = 'M5 12.75L10 19L19 5';\n\nexport const ICON_PAUSE = [\n 'M6.75 3C5.23122 3 4 4.23122 4 5.75V18.25C4 19.7688 5.23122 21 6.75 21H7.25C8.76878 21 10 19.7688 10 18.25V5.75C10 4.23122 8.76878 3 7.25 3H6.75Z',\n 'M16.75 3C15.2312 3 14 4.23122 14 5.75V18.25C14 19.7688 15.2312 21 16.75 21H17.25C18.7688 21 20 19.7688 20 18.25V5.75C20 4.23122 18.7688 3 17.25 3H16.75Z',\n];\n\nexport const ICON_PLAY = 'M9.24394 2.36758C7.41419 1.18362 5 2.49701 5 4.67639V19.3238C5 21.5032 7.41419 22.8166 9.24394 21.6326L20.5624 14.3089C22.2371 13.2253 22.2372 10.775 20.5624 9.69129L9.24394 2.36758Z';\n\nexport const ICON_TIMELINE = [\n 'M18.868 10C20.8517 10.0003 22.2886 11.8914 21.7577 13.8027L20.369 18.8027C20.0083 20.1012 18.826 20.9999 17.4784 21H6.51941C5.17179 21 3.98948 20.1012 3.62878 18.8027L2.24011 13.8027C1.7092 11.8913 3.14603 10.0003 5.12976 10H18.868Z',\n 'M18.9989 6.5C19.5511 6.50007 19.9989 6.94776 19.9989 7.5C19.9989 8.05224 19.5511 8.49993 18.9989 8.5H4.9989C4.44661 8.5 3.9989 8.05228 3.9989 7.5C3.9989 6.94772 4.44661 6.5 4.9989 6.5H18.9989Z',\n 'M16.9989 3C17.5511 3.00007 17.9989 3.44776 17.9989 4C17.9989 4.55224 17.5511 4.99993 16.9989 5H6.9989C6.44661 5 5.9989 4.55228 5.9989 4C5.9989 3.44772 6.44661 3 6.9989 3H16.9989Z',\n];\n\nexport const ICON_CLIPBOARD = {\n board: 'M8 6C8 4.34315 9.34315 3 11 3H13C14.6569 3 16 4.34315 16 6V7H8V6Z',\n sparkle: 'M19.2405 16.1852L18.5436 14.3733C18.4571 14.1484 18.241 14 18 14C17.759 14 17.5429 14.1484 17.4564 14.3733L16.7595 16.1852C16.658 16.4493 16.4493 16.658 16.1852 16.7595L14.3733 17.4564C14.1484 17.5429 14 17.759 14 18C14 18.241 14.1484 18.4571 14.3733 18.5436L16.1852 19.2405C16.4493 19.342 16.658 19.5507 16.7595 19.8148L17.4564 21.6267C17.5429 21.8516 17.759 22 18 22C18.241 22 18.4571 21.8516 18.5436 21.6267L19.2405 19.8148C19.342 19.5507 19.5507 19.342 19.8148 19.2405L21.6267 18.5436C21.8516 18.4571 22 18.241 22 18C22 17.759 21.8516 17.5429 21.6267 17.4564L19.8148 16.7595C19.5507 16.658 19.342 16.4493 19.2405 16.1852Z',\n body: 'M16 5H17C18.6569 5 20 6.34315 20 8V11M8 5H7C5.34315 5 4 6.34315 4 8V18C4 19.6569 5.34315 21 7 21H12',\n};\n\nexport const ICON_ADD_PRESET = [\n 'M4 6H20',\n 'M4 12H10',\n 'M15 15L21 15',\n 'M18 12V18',\n 'M4 18H10',\n];\n\nexport const ICON_TRASH = [\n 'M5 6.5L5.80734 18.2064C5.91582 19.7794 7.22348 21 8.80023 21H15.1998C16.7765 21 18.0842 19.7794 18.1927 18.2064L19 6.5',\n 'M10 11V16',\n 'M14 11V16',\n 'M3.5 6H20.5',\n 'M8.07092 5.74621C8.42348 3.89745 10.0485 2.5 12 2.5C13.9515 2.5 15.5765 3.89745 15.9291 5.74621',\n];\n\nexport const ICON_PANEL = {\n path: 'M6.84766 11.75C6.78583 11.9899 6.75 12.2408 6.75 12.5C6.75 12.7592 6.78583 13.0101 6.84766 13.25H2C1.58579 13.25 1.25 12.9142 1.25 12.5C1.25 12.0858 1.58579 11.75 2 11.75H6.84766ZM14 11.75C14.4142 11.75 14.75 12.0858 14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H12.6523C12.7142 13.0101 12.75 12.7592 12.75 12.5C12.75 12.2408 12.7142 11.9899 12.6523 11.75H14ZM3.09766 7.25C3.03583 7.48994 3 7.74075 3 8C3 8.25925 3.03583 8.51006 3.09766 8.75H2C1.58579 8.75 1.25 8.41421 1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H3.09766ZM14 7.25C14.4142 7.25 14.75 7.58579 14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H8.90234C8.96417 8.51006 9 8.25925 9 8C9 7.74075 8.96417 7.48994 8.90234 7.25H14ZM7.59766 2.75C7.53583 2.98994 7.5 3.24075 7.5 3.5C7.5 3.75925 7.53583 4.01006 7.59766 4.25H2C1.58579 4.25 1.25 3.91421 1.25 3.5C1.25 3.08579 1.58579 2.75 2 2.75H7.59766ZM14 2.75C14.4142 2.75 14.75 3.08579 14.75 3.5C14.75 3.91421 14.4142 4.25 14 4.25H13.4023C13.4642 4.01006 13.5 3.75925 13.5 3.5C13.5 3.24075 13.4642 2.98994 13.4023 2.75H14Z',\n circles: [\n { cx: '6', cy: '8', r: '0.998596' },\n { cx: '10.4999', cy: '3.5', r: '0.998657' },\n { cx: '9.75015', cy: '12.5', r: '0.997986' },\n ],\n};\n"],"mappings":";AAEO,IAAM,eAAe;AAErB,IAAM,aAAa;AAEnB,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AACF;AAEO,IAAM,YAAY;AAElB,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AACR;AAEO,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,SAAS;AAAA,IACP,EAAE,IAAI,KAAK,IAAI,KAAK,GAAG,WAAW;AAAA,IAClC,EAAE,IAAI,WAAW,IAAI,OAAO,GAAG,WAAW;AAAA,IAC1C,EAAE,IAAI,WAAW,IAAI,QAAQ,GAAG,WAAW;AAAA,EAC7C;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/icons.ts"],"sourcesContent":["// Shared SVG icon geometry — single source of truth across all framework adapters.\n\nexport const ICON_CHEVRON = 'M6 9.5L12 15.5L18 9.5';\n\nexport const ICON_CHECK = 'M5 12.75L10 19L19 5';\n\nexport const ICON_PAUSE = [\n 'M6.75 3C5.23122 3 4 4.23122 4 5.75V18.25C4 19.7688 5.23122 21 6.75 21H7.25C8.76878 21 10 19.7688 10 18.25V5.75C10 4.23122 8.76878 3 7.25 3H6.75Z',\n 'M16.75 3C15.2312 3 14 4.23122 14 5.75V18.25C14 19.7688 15.2312 21 16.75 21H17.25C18.7688 21 20 19.7688 20 18.25V5.75C20 4.23122 18.7688 3 17.25 3H16.75Z',\n];\n\nexport const ICON_PLAY = 'M9.24394 2.36758C7.41419 1.18362 5 2.49701 5 4.67639V19.3238C5 21.5032 7.41419 22.8166 9.24394 21.6326L20.5624 14.3089C22.2371 13.2253 22.2372 10.775 20.5624 9.69129L9.24394 2.36758Z';\n\nexport const ICON_REPLAY = [\n 'M12 2.5C17.2466 2.50016 21.5 6.7534 21.5 12C21.5 17.2466 17.2466 21.4998 12 21.5C7.52191 21.5 3.76987 18.4025 2.76465 14.2344C2.63517 13.6975 2.96508 13.1578 3.50195 13.0283C4.03883 12.8988 4.57851 13.2288 4.70801 13.7656C5.5016 17.0563 8.46701 19.5 12 19.5C16.142 19.4998 19.5 16.142 19.5 12C19.5 7.85796 16.142 4.50016 12 4.5C9.32981 4.5 6.98389 5.89541 5.6543 8H7.5C8.05228 8 8.5 8.44772 8.5 9C8.5 9.55228 8.05228 10 7.5 10H3.5C2.94772 10 2.5 9.55228 2.5 9V5C2.5 4.44772 2.94772 4 3.5 4C4.05228 4 4.5 4.44772 4.5 5V6.16797C6.2376 3.93677 8.95063 2.5 12 2.5Z',\n 'M10 9.94043C10 9.33379 10.6826 8.97849 11.1797 9.32617L14.1221 11.3857C14.5486 11.6843 14.5486 12.3157 14.1221 12.6143L11.1797 14.6738C10.6826 15.0215 10 14.6662 10 14.0596V9.94043Z',\n];\n\nexport const ICON_TIMELINE = [\n 'M18.868 10C20.8517 10.0003 22.2886 11.8914 21.7577 13.8027L20.369 18.8027C20.0083 20.1012 18.826 20.9999 17.4784 21H6.51941C5.17179 21 3.98948 20.1012 3.62878 18.8027L2.24011 13.8027C1.7092 11.8913 3.14603 10.0003 5.12976 10H18.868Z',\n 'M18.9989 6.5C19.5511 6.50007 19.9989 6.94776 19.9989 7.5C19.9989 8.05224 19.5511 8.49993 18.9989 8.5H4.9989C4.44661 8.5 3.9989 8.05228 3.9989 7.5C3.9989 6.94772 4.44661 6.5 4.9989 6.5H18.9989Z',\n 'M16.9989 3C17.5511 3.00007 17.9989 3.44776 17.9989 4C17.9989 4.55224 17.5511 4.99993 16.9989 5H6.9989C6.44661 5 5.9989 4.55228 5.9989 4C5.9989 3.44772 6.44661 3 6.9989 3H16.9989Z',\n];\n\nexport const ICON_CLIPBOARD = {\n board: 'M8 6C8 4.34315 9.34315 3 11 3H13C14.6569 3 16 4.34315 16 6V7H8V6Z',\n sparkle: 'M19.2405 16.1852L18.5436 14.3733C18.4571 14.1484 18.241 14 18 14C17.759 14 17.5429 14.1484 17.4564 14.3733L16.7595 16.1852C16.658 16.4493 16.4493 16.658 16.1852 16.7595L14.3733 17.4564C14.1484 17.5429 14 17.759 14 18C14 18.241 14.1484 18.4571 14.3733 18.5436L16.1852 19.2405C16.4493 19.342 16.658 19.5507 16.7595 19.8148L17.4564 21.6267C17.5429 21.8516 17.759 22 18 22C18.241 22 18.4571 21.8516 18.5436 21.6267L19.2405 19.8148C19.342 19.5507 19.5507 19.342 19.8148 19.2405L21.6267 18.5436C21.8516 18.4571 22 18.241 22 18C22 17.759 21.8516 17.5429 21.6267 17.4564L19.8148 16.7595C19.5507 16.658 19.342 16.4493 19.2405 16.1852Z',\n body: 'M16 5H17C18.6569 5 20 6.34315 20 8V11M8 5H7C5.34315 5 4 6.34315 4 8V18C4 19.6569 5.34315 21 7 21H12',\n};\n\nexport const ICON_ADD_PRESET = [\n 'M4 6H20',\n 'M4 12H10',\n 'M15 15L21 15',\n 'M18 12V18',\n 'M4 18H10',\n];\n\nexport const ICON_TRASH = [\n 'M5 6.5L5.80734 18.2064C5.91582 19.7794 7.22348 21 8.80023 21H15.1998C16.7765 21 18.0842 19.7794 18.1927 18.2064L19 6.5',\n 'M10 11V16',\n 'M14 11V16',\n 'M3.5 6H20.5',\n 'M8.07092 5.74621C8.42348 3.89745 10.0485 2.5 12 2.5C13.9515 2.5 15.5765 3.89745 15.9291 5.74621',\n];\n\nexport const ICON_PANEL = {\n path: 'M6.84766 11.75C6.78583 11.9899 6.75 12.2408 6.75 12.5C6.75 12.7592 6.78583 13.0101 6.84766 13.25H2C1.58579 13.25 1.25 12.9142 1.25 12.5C1.25 12.0858 1.58579 11.75 2 11.75H6.84766ZM14 11.75C14.4142 11.75 14.75 12.0858 14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H12.6523C12.7142 13.0101 12.75 12.7592 12.75 12.5C12.75 12.2408 12.7142 11.9899 12.6523 11.75H14ZM3.09766 7.25C3.03583 7.48994 3 7.74075 3 8C3 8.25925 3.03583 8.51006 3.09766 8.75H2C1.58579 8.75 1.25 8.41421 1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H3.09766ZM14 7.25C14.4142 7.25 14.75 7.58579 14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H8.90234C8.96417 8.51006 9 8.25925 9 8C9 7.74075 8.96417 7.48994 8.90234 7.25H14ZM7.59766 2.75C7.53583 2.98994 7.5 3.24075 7.5 3.5C7.5 3.75925 7.53583 4.01006 7.59766 4.25H2C1.58579 4.25 1.25 3.91421 1.25 3.5C1.25 3.08579 1.58579 2.75 2 2.75H7.59766ZM14 2.75C14.4142 2.75 14.75 3.08579 14.75 3.5C14.75 3.91421 14.4142 4.25 14 4.25H13.4023C13.4642 4.01006 13.5 3.75925 13.5 3.5C13.5 3.24075 13.4642 2.98994 13.4023 2.75H14Z',\n circles: [\n { cx: '6', cy: '8', r: '0.998596' },\n { cx: '10.4999', cy: '3.5', r: '0.998657' },\n { cx: '9.75015', cy: '12.5', r: '0.997986' },\n ],\n};\n"],"mappings":";AAEO,IAAM,eAAe;AAErB,IAAM,aAAa;AAEnB,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AACF;AAEO,IAAM,YAAY;AAElB,IAAM,cAAc;AAAA,EACzB;AAAA,EACA;AACF;AAEO,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AACR;AAEO,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,SAAS;AAAA,IACP,EAAE,IAAI,KAAK,IAAI,KAAK,GAAG,WAAW;AAAA,IAClC,EAAE,IAAI,WAAW,IAAI,OAAO,GAAG,WAAW;AAAA,IAC1C,EAAE,IAAI,WAAW,IAAI,QAAQ,GAAG,WAAW;AAAA,EAC7C;AACF;","names":[]}
package/dist/index.cjs CHANGED
@@ -1085,6 +1085,10 @@ var ICON_PAUSE = [
1085
1085
  "M16.75 3C15.2312 3 14 4.23122 14 5.75V18.25C14 19.7688 15.2312 21 16.75 21H17.25C18.7688 21 20 19.7688 20 18.25V5.75C20 4.23122 18.7688 3 17.25 3H16.75Z"
1086
1086
  ];
1087
1087
  var ICON_PLAY = "M9.24394 2.36758C7.41419 1.18362 5 2.49701 5 4.67639V19.3238C5 21.5032 7.41419 22.8166 9.24394 21.6326L20.5624 14.3089C22.2371 13.2253 22.2372 10.775 20.5624 9.69129L9.24394 2.36758Z";
1088
+ var ICON_REPLAY = [
1089
+ "M12 2.5C17.2466 2.50016 21.5 6.7534 21.5 12C21.5 17.2466 17.2466 21.4998 12 21.5C7.52191 21.5 3.76987 18.4025 2.76465 14.2344C2.63517 13.6975 2.96508 13.1578 3.50195 13.0283C4.03883 12.8988 4.57851 13.2288 4.70801 13.7656C5.5016 17.0563 8.46701 19.5 12 19.5C16.142 19.4998 19.5 16.142 19.5 12C19.5 7.85796 16.142 4.50016 12 4.5C9.32981 4.5 6.98389 5.89541 5.6543 8H7.5C8.05228 8 8.5 8.44772 8.5 9C8.5 9.55228 8.05228 10 7.5 10H3.5C2.94772 10 2.5 9.55228 2.5 9V5C2.5 4.44772 2.94772 4 3.5 4C4.05228 4 4.5 4.44772 4.5 5V6.16797C6.2376 3.93677 8.95063 2.5 12 2.5Z",
1090
+ "M10 9.94043C10 9.33379 10.6826 8.97849 11.1797 9.32617L14.1221 11.3857C14.5486 11.6843 14.5486 12.3157 14.1221 12.6143L11.1797 14.6738C10.6826 15.0215 10 14.6662 10 14.0596V9.94043Z"
1091
+ ];
1088
1092
  var ICON_TIMELINE = [
1089
1093
  "M18.868 10C20.8517 10.0003 22.2886 11.8914 21.7577 13.8027L20.369 18.8027C20.0083 20.1012 18.826 20.9999 17.4784 21H6.51941C5.17179 21 3.98948 20.1012 3.62878 18.8027L2.24011 13.8027C1.7092 11.8913 3.14603 10.0003 5.12976 10H18.868Z",
1090
1094
  "M18.9989 6.5C19.5511 6.50007 19.9989 6.94776 19.9989 7.5C19.9989 8.05224 19.5511 8.49993 18.9989 8.5H4.9989C4.44661 8.5 3.9989 8.05228 3.9989 7.5C3.9989 6.94772 4.44661 6.5 4.9989 6.5H18.9989Z",
@@ -4282,8 +4286,11 @@ var SECOND_TICK_STEPS = [
4282
4286
  ];
4283
4287
  var MIN_TIMELINE_MAX_ZOOM = 8;
4284
4288
  var PLAYHEAD_FLAG_WIDTH = 52;
4289
+ var PLAYHEAD_FLAG_EDGE_OVERHANG = 1;
4285
4290
  var POPOVER_WIDTH = 280;
4286
4291
  var ZOOM_DRAG_DISTANCE = 180;
4292
+ var DEFAULT_DOCK_MAX_HEIGHT = 400;
4293
+ var MIN_DOCK_MAX_HEIGHT = 120;
4287
4294
  var subscribeGlobalTimelines = (callback) => TimelineStore.subscribeGlobal(callback);
4288
4295
  var getTimelines = () => TimelineStore.getTimelines();
4289
4296
  var subscribeTimelineVisibility = (callback) => TimelineUiStore.subscribe(callback);
@@ -4316,7 +4323,10 @@ function DialTimelineDock({
4316
4323
  defaultOpen
4317
4324
  }) {
4318
4325
  const [mounted, setMounted] = (0, import_react23.useState)(false);
4326
+ const [dockMaxHeight, setDockMaxHeight] = (0, import_react23.useState)(DEFAULT_DOCK_MAX_HEIGHT);
4319
4327
  const visibilityControllerId = (0, import_react23.useRef)(/* @__PURE__ */ Symbol("dialkit-timeline-visibility"));
4328
+ const dockRef = (0, import_react23.useRef)(null);
4329
+ const resizeCleanupRef = (0, import_react23.useRef)(null);
4320
4330
  (0, import_react23.useEffect)(() => TimelineUiStore.registerController(visibilityControllerId.current, {
4321
4331
  visible,
4322
4332
  defaultVisible,
@@ -4332,6 +4342,31 @@ function DialTimelineDock({
4332
4342
  (0, import_react23.useEffect)(() => {
4333
4343
  setMounted(true);
4334
4344
  }, []);
4345
+ (0, import_react23.useEffect)(() => () => resizeCleanupRef.current?.(), []);
4346
+ const handleResizePointerDown = (0, import_react23.useCallback)((e) => {
4347
+ const dock = dockRef.current;
4348
+ if (!dock) return;
4349
+ e.preventDefault();
4350
+ e.stopPropagation();
4351
+ resizeCleanupRef.current?.();
4352
+ const pointerY = e.clientY;
4353
+ const startHeight = dock.getBoundingClientRect().height;
4354
+ const handlePointerMove = (event) => {
4355
+ event.preventDefault();
4356
+ const viewportMax = Math.max(MIN_DOCK_MAX_HEIGHT, window.innerHeight - 24);
4357
+ setDockMaxHeight(clamp(startHeight + pointerY - event.clientY, MIN_DOCK_MAX_HEIGHT, viewportMax));
4358
+ };
4359
+ const finishResize = () => {
4360
+ window.removeEventListener("pointermove", handlePointerMove);
4361
+ window.removeEventListener("pointerup", finishResize);
4362
+ window.removeEventListener("pointercancel", finishResize);
4363
+ resizeCleanupRef.current = null;
4364
+ };
4365
+ window.addEventListener("pointermove", handlePointerMove, { passive: false });
4366
+ window.addEventListener("pointerup", finishResize);
4367
+ window.addEventListener("pointercancel", finishResize);
4368
+ resizeCleanupRef.current = finishResize;
4369
+ }, []);
4335
4370
  const timelines = (0, import_react23.useSyncExternalStore)(subscribeGlobalTimelines, getTimelines, getTimelines);
4336
4371
  const dockVisible = (0, import_react23.useSyncExternalStore)(
4337
4372
  subscribeTimelineVisibility,
@@ -4342,16 +4377,37 @@ function DialTimelineDock({
4342
4377
  return null;
4343
4378
  }
4344
4379
  return (0, import_react_dom4.createPortal)(
4345
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-root dialkit-timeline", "data-theme": theme, hidden: !dockVisible, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-dock", children: timelines.map((timeline) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4346
- TimelineSection,
4347
- {
4348
- meta: timeline,
4349
- defaultOpen,
4350
- theme,
4351
- dockVisible
4352
- },
4353
- timeline.id
4354
- )) }) }),
4380
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-root dialkit-timeline", "data-theme": theme, hidden: !dockVisible, children: [
4381
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4382
+ "div",
4383
+ {
4384
+ className: "dialkit-timeline-resize-handle",
4385
+ onPointerDown: handleResizePointerDown,
4386
+ role: "separator",
4387
+ "aria-label": "Resize timeline height",
4388
+ "aria-orientation": "horizontal",
4389
+ title: "Drag to resize timeline"
4390
+ }
4391
+ ),
4392
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4393
+ "div",
4394
+ {
4395
+ ref: dockRef,
4396
+ className: "dialkit-timeline-dock",
4397
+ style: { maxHeight: `min(${dockMaxHeight}px, calc(100vh - 24px))` },
4398
+ children: timelines.map((timeline) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4399
+ TimelineSection,
4400
+ {
4401
+ meta: timeline,
4402
+ defaultOpen,
4403
+ theme,
4404
+ dockVisible
4405
+ },
4406
+ timeline.id
4407
+ ))
4408
+ }
4409
+ )
4410
+ ] }),
4355
4411
  document.body
4356
4412
  );
4357
4413
  }
@@ -4403,6 +4459,20 @@ function PlayPauseButton({ id }) {
4403
4459
  }
4404
4460
  );
4405
4461
  }
4462
+ function ReplayButton({ onReplay }) {
4463
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4464
+ import_react24.motion.button,
4465
+ {
4466
+ className: "dialkit-toolbar-add",
4467
+ onClick: onReplay,
4468
+ title: "Replay",
4469
+ "aria-label": "Replay",
4470
+ whileTap: { scale: 0.9 },
4471
+ transition: { type: "spring", visualDuration: 0.15, bounce: 0.3 },
4472
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: ICON_REPLAY.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d, fill: "currentColor" }, i)) })
4473
+ }
4474
+ );
4475
+ }
4406
4476
  function TimelinePlayheadFlag({
4407
4477
  id,
4408
4478
  duration,
@@ -4411,8 +4481,6 @@ function TimelinePlayheadFlag({
4411
4481
  viewEnd,
4412
4482
  laneWidth,
4413
4483
  rulerRef,
4414
- headerClearStart,
4415
- headerClearEnd,
4416
4484
  onResetView
4417
4485
  }) {
4418
4486
  const subscribe = useTransportSubscribe(id);
@@ -4472,16 +4540,22 @@ function TimelinePlayheadFlag({
4472
4540
  0,
4473
4541
  laneWidth
4474
4542
  );
4475
- const flagLeft = x - PLAYHEAD_FLAG_WIDTH / 2;
4476
- const flagRight = flagLeft + PLAYHEAD_FLAG_WIDTH;
4477
- const placement = flagLeft >= headerClearStart && flagRight <= headerClearEnd ? "raised" : "lowered";
4543
+ const flagCenter = clamp(
4544
+ x,
4545
+ PLAYHEAD_FLAG_WIDTH / 2 - PLAYHEAD_FLAG_EDGE_OVERHANG,
4546
+ laneWidth - PLAYHEAD_FLAG_WIDTH / 2 + PLAYHEAD_FLAG_EDGE_OVERHANG
4547
+ );
4548
+ const flagOffset = flagCenter - x;
4549
+ const edge = flagOffset > 0.5 ? "start" : flagOffset < -0.5 ? "end" : "center";
4478
4550
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4479
4551
  "div",
4480
4552
  {
4481
4553
  className: "dialkit-timeline-playhead-control",
4482
- "data-edge": "center",
4483
- "data-placement": placement,
4484
- style: { left: `calc(var(--dial-timeline-label-w) + ${x}px)` },
4554
+ "data-edge": edge,
4555
+ style: {
4556
+ left: `calc(var(--dial-timeline-label-w) + ${x}px)`,
4557
+ "--dial-timeline-playhead-flag-offset": `${flagOffset}px`
4558
+ },
4485
4559
  onPointerDown: handlePointerDown,
4486
4560
  role: "slider",
4487
4561
  "aria-label": "Timeline current time",
@@ -4490,8 +4564,8 @@ function TimelinePlayheadFlag({
4490
4564
  "aria-valuenow": time,
4491
4565
  title: "Drag to scrub the timeline",
4492
4566
  children: [
4493
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-playhead-flag", children: time.toFixed(2) }),
4494
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-playhead-stem" })
4567
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-playhead-stem" }),
4568
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-playhead-anchor", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-playhead-flag", children: time.toFixed(2) }) })
4495
4569
  ]
4496
4570
  }
4497
4571
  );
@@ -4589,30 +4663,18 @@ var TimelineSection = (0, import_react23.memo)(function TimelineSection2({
4589
4663
  const presets = DialStore.getPresets(meta.id);
4590
4664
  const activePresetId = DialStore.getActivePresetId(meta.id);
4591
4665
  const laneAreaRef = (0, import_react23.useRef)(null);
4592
- const titleRef = (0, import_react23.useRef)(null);
4593
- const actionsRef = (0, import_react23.useRef)(null);
4666
+ const horizontalScrollRef = (0, import_react23.useRef)(null);
4594
4667
  const [laneWidth, setLaneWidth] = (0, import_react23.useState)(0);
4595
- const [flagClearRange, setFlagClearRange] = (0, import_react23.useState)({ start: 0, end: 0 });
4596
4668
  (0, import_react23.useLayoutEffect)(() => {
4597
4669
  if (!open) return;
4598
4670
  const ruler = laneAreaRef.current;
4599
- const title = titleRef.current;
4600
- const actions = actionsRef.current;
4601
- if (!ruler || !title || !actions) return;
4671
+ if (!ruler) return;
4602
4672
  const measure = () => {
4603
- const rulerRect = ruler.getBoundingClientRect();
4604
- const titleRect = title.getBoundingClientRect();
4605
- const actionsRect = actions.getBoundingClientRect();
4606
- setLaneWidth(rulerRect.width);
4607
- const start = Math.round(titleRect.right + 10 - rulerRect.left);
4608
- const end = Math.round(actionsRect.left - 10 - rulerRect.left);
4609
- setFlagClearRange((current) => current.start === start && current.end === end ? current : { start, end });
4673
+ setLaneWidth(ruler.getBoundingClientRect().width);
4610
4674
  };
4611
4675
  measure();
4612
4676
  const observer = new ResizeObserver(measure);
4613
4677
  observer.observe(ruler);
4614
- observer.observe(title);
4615
- observer.observe(actions);
4616
4678
  return () => observer.disconnect();
4617
4679
  }, [open]);
4618
4680
  const visibleDuration = meta.duration > 0 ? meta.duration / zoom : meta.duration;
@@ -4627,6 +4689,14 @@ var TimelineSection = (0, import_react23.memo)(function TimelineSection2({
4627
4689
  (0, import_react23.useEffect)(() => {
4628
4690
  setViewStart((current) => clampViewStart(current, meta.duration, meta.duration / zoom));
4629
4691
  }, [meta.duration, zoom]);
4692
+ (0, import_react23.useLayoutEffect)(() => {
4693
+ const scroller = horizontalScrollRef.current;
4694
+ if (!scroller || pxPerSecond <= 0) return;
4695
+ const nextScrollLeft = safeViewStart * pxPerSecond;
4696
+ if (Math.abs(scroller.scrollLeft - nextScrollLeft) > 0.5) {
4697
+ scroller.scrollLeft = nextScrollLeft;
4698
+ }
4699
+ }, [open, pxPerSecond, safeViewStart]);
4630
4700
  (0, import_react23.useEffect)(() => {
4631
4701
  if (!dockVisible) setPopover(null);
4632
4702
  }, [dockVisible]);
@@ -4639,6 +4709,26 @@ var TimelineSection = (0, import_react23.memo)(function TimelineSection2({
4639
4709
  setZoom(1);
4640
4710
  setViewStart(0);
4641
4711
  }, []);
4712
+ const handleReplay = (0, import_react23.useCallback)(() => {
4713
+ setViewStart(0);
4714
+ TimelineStore.replay(meta.id);
4715
+ }, [meta.id]);
4716
+ const handleHorizontalScroll = (0, import_react23.useCallback)((e) => {
4717
+ if (pxPerSecond <= 0) return;
4718
+ setViewStart(clampViewStart(
4719
+ e.currentTarget.scrollLeft / pxPerSecond,
4720
+ meta.duration,
4721
+ visibleDuration
4722
+ ));
4723
+ }, [meta.duration, pxPerSecond, visibleDuration]);
4724
+ const handleTimelineWheel = (0, import_react23.useCallback)((e) => {
4725
+ const scroller = horizontalScrollRef.current;
4726
+ if (!scroller || zoom <= 1) return;
4727
+ const horizontalDelta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.shiftKey ? e.deltaY : 0;
4728
+ if (horizontalDelta === 0) return;
4729
+ e.preventDefault();
4730
+ scroller.scrollLeft += horizontalDelta;
4731
+ }, [zoom]);
4642
4732
  const zoomDragRef = (0, import_react23.useRef)(null);
4643
4733
  const rulerScrubRef = (0, import_react23.useRef)(null);
4644
4734
  const seekRulerFromClientX = (0, import_react23.useCallback)((clientX) => {
@@ -4961,7 +5051,7 @@ var TimelineSection = (0, import_react23.memo)(function TimelineSection2({
4961
5051
  }
4962
5052
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-section", children: [
4963
5053
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-header", "data-open": open || void 0, children: [
4964
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-identity", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { ref: titleRef, className: "dialkit-timeline-title", children: meta.name }) }),
5054
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-identity", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "dialkit-timeline-title", children: meta.name }) }),
4965
5055
  !open && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4966
5056
  TimelineOverview,
4967
5057
  {
@@ -4972,8 +5062,9 @@ var TimelineSection = (0, import_react23.memo)(function TimelineSection2({
4972
5062
  onNavigate: centerViewAt
4973
5063
  }
4974
5064
  ),
4975
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { ref: actionsRef, className: "dialkit-timeline-actions", children: [
5065
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-actions", children: [
4976
5066
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PlayPauseButton, { id: meta.id }),
5067
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ReplayButton, { onReplay: handleReplay }),
4977
5068
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4978
5069
  import_react24.motion.button,
4979
5070
  {
@@ -5056,54 +5147,68 @@ var TimelineSection = (0, import_react23.memo)(function TimelineSection2({
5056
5147
  )
5057
5148
  ] })
5058
5149
  ] }),
5059
- open && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5150
+ open && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
5060
5151
  "div",
5061
5152
  {
5062
5153
  className: "dialkit-timeline-body",
5154
+ onWheel: handleTimelineWheel,
5063
5155
  onPointerDown: handleTrackPointerDown,
5064
5156
  onPointerMove: handleTrackPointerMove,
5065
5157
  onPointerUp: finishTrackScrub,
5066
5158
  onPointerCancel: finishTrackScrub,
5067
5159
  onLostPointerCapture: finishTrackScrub,
5068
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-grid", children: [
5069
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-row dialkit-timeline-ruler-row", children: [
5160
+ children: [
5161
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-grid", children: [
5162
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-row dialkit-timeline-ruler-row", children: [
5163
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-label" }),
5164
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
5165
+ "div",
5166
+ {
5167
+ ref: laneAreaRef,
5168
+ className: "dialkit-timeline-ruler",
5169
+ onPointerDown: handleRulerPointerDown,
5170
+ onPointerMove: handleRulerPointerMove,
5171
+ onPointerUp: handleRulerPointerUp,
5172
+ onPointerCancel: handleRulerPointerCancel,
5173
+ onLostPointerCapture: handleRulerPointerCancel,
5174
+ title: "Drag to seek \xB7 Option-drag to zoom \xB7 Shift-drag to reset zoom",
5175
+ children: [
5176
+ fineTicks.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-tick dialkit-timeline-tick-fine", style: { left: (t - safeViewStart) * pxPerSecond } }, `fine:${t}`)),
5177
+ mediumTicks.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-tick dialkit-timeline-tick-medium", style: { left: (t - safeViewStart) * pxPerSecond } }, `medium:${t}`)),
5178
+ majorTicks.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-tick", style: { left: (t - safeViewStart) * pxPerSecond }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "dialkit-timeline-tick-label", children: formatRulerSeconds(t, majorStep) }) }, t))
5179
+ ]
5180
+ }
5181
+ )
5182
+ ] }),
5183
+ rows,
5184
+ pxPerSecond > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5185
+ TimelinePlayheadFlag,
5186
+ {
5187
+ id: meta.id,
5188
+ duration: meta.duration,
5189
+ pxPerSecond,
5190
+ viewStart: safeViewStart,
5191
+ viewEnd,
5192
+ laneWidth,
5193
+ rulerRef: laneAreaRef,
5194
+ onResetView: resetView
5195
+ }
5196
+ )
5197
+ ] }),
5198
+ zoom > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dialkit-timeline-scroll-row", children: [
5070
5199
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-label" }),
5071
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
5200
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5072
5201
  "div",
5073
5202
  {
5074
- ref: laneAreaRef,
5075
- className: "dialkit-timeline-ruler",
5076
- onPointerDown: handleRulerPointerDown,
5077
- onPointerMove: handleRulerPointerMove,
5078
- onPointerUp: handleRulerPointerUp,
5079
- onPointerCancel: handleRulerPointerCancel,
5080
- onLostPointerCapture: handleRulerPointerCancel,
5081
- title: "Drag to seek \xB7 Option-drag to zoom \xB7 Shift-drag to reset zoom",
5082
- children: [
5083
- fineTicks.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-tick dialkit-timeline-tick-fine", style: { left: (t - safeViewStart) * pxPerSecond } }, `fine:${t}`)),
5084
- mediumTicks.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-tick dialkit-timeline-tick-medium", style: { left: (t - safeViewStart) * pxPerSecond } }, `medium:${t}`)),
5085
- majorTicks.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "dialkit-timeline-tick", style: { left: (t - safeViewStart) * pxPerSecond }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "dialkit-timeline-tick-label", children: formatRulerSeconds(t, majorStep) }) }, t))
5086
- ]
5203
+ ref: horizontalScrollRef,
5204
+ className: "dialkit-timeline-horizontal-scroll",
5205
+ onScroll: handleHorizontalScroll,
5206
+ "aria-label": "Timeline horizontal scroll",
5207
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { width: laneWidth * zoom } })
5087
5208
  }
5088
5209
  )
5089
- ] }),
5090
- rows,
5091
- pxPerSecond > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5092
- TimelinePlayheadFlag,
5093
- {
5094
- id: meta.id,
5095
- duration: meta.duration,
5096
- pxPerSecond,
5097
- viewStart: safeViewStart,
5098
- viewEnd,
5099
- laneWidth,
5100
- rulerRef: laneAreaRef,
5101
- headerClearStart: flagClearRange.start,
5102
- headerClearEnd: flagClearRange.end,
5103
- onResetView: resetView
5104
- }
5105
- )
5106
- ] })
5210
+ ] })
5211
+ ]
5107
5212
  }
5108
5213
  ),
5109
5214
  popover && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(