@waveform-playlist/ui-components 6.0.2 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -656,6 +656,44 @@ var Channel = (props) => {
656
656
  );
657
657
  };
658
658
 
659
+ // src/components/ErrorBoundary.tsx
660
+ import React2 from "react";
661
+ import { jsx as jsx4 } from "react/jsx-runtime";
662
+ var errorContainerStyle = {
663
+ padding: "16px",
664
+ background: "#1a1a2e",
665
+ color: "#e0e0e0",
666
+ border: "1px solid #d08070",
667
+ borderRadius: "4px",
668
+ fontFamily: "monospace",
669
+ fontSize: "13px",
670
+ minHeight: "60px",
671
+ display: "flex",
672
+ alignItems: "center",
673
+ justifyContent: "center"
674
+ };
675
+ var PlaylistErrorBoundary = class extends React2.Component {
676
+ constructor(props) {
677
+ super(props);
678
+ this.state = { hasError: false, error: null };
679
+ }
680
+ static getDerivedStateFromError(error) {
681
+ return { hasError: true, error };
682
+ }
683
+ componentDidCatch(error, errorInfo) {
684
+ console.error("[waveform-playlist] Render error:", error, errorInfo.componentStack);
685
+ }
686
+ render() {
687
+ if (this.state.hasError) {
688
+ if (this.props.fallback) {
689
+ return this.props.fallback;
690
+ }
691
+ return /* @__PURE__ */ jsx4("div", { style: errorContainerStyle, children: "Waveform playlist encountered an error. Check console for details." });
692
+ }
693
+ return this.props.children;
694
+ }
695
+ };
696
+
659
697
  // src/components/Clip.tsx
660
698
  import styled13 from "styled-components";
661
699
  import { useDraggable } from "@dnd-kit/core";
@@ -663,7 +701,7 @@ import { CSS } from "@dnd-kit/utilities";
663
701
 
664
702
  // src/components/ClipHeader.tsx
665
703
  import styled10 from "styled-components";
666
- import { jsx as jsx4 } from "react/jsx-runtime";
704
+ import { jsx as jsx5 } from "react/jsx-runtime";
667
705
  var CLIP_HEADER_HEIGHT = 22;
668
706
  var HeaderContainer = styled10.div`
669
707
  position: relative;
@@ -703,13 +741,13 @@ var ClipHeaderPresentational = ({
703
741
  trackName,
704
742
  isSelected = false
705
743
  }) => {
706
- return /* @__PURE__ */ jsx4(
744
+ return /* @__PURE__ */ jsx5(
707
745
  HeaderContainer,
708
746
  {
709
747
  $isDragging: false,
710
748
  $interactive: false,
711
749
  $isSelected: isSelected,
712
- children: /* @__PURE__ */ jsx4(TrackName, { children: trackName })
750
+ children: /* @__PURE__ */ jsx5(TrackName, { children: trackName })
713
751
  }
714
752
  );
715
753
  };
@@ -723,7 +761,7 @@ var ClipHeader = ({
723
761
  dragHandleProps
724
762
  }) => {
725
763
  if (disableDrag || !dragHandleProps) {
726
- return /* @__PURE__ */ jsx4(
764
+ return /* @__PURE__ */ jsx5(
727
765
  ClipHeaderPresentational,
728
766
  {
729
767
  trackName,
@@ -732,7 +770,7 @@ var ClipHeader = ({
732
770
  );
733
771
  }
734
772
  const { attributes, listeners, setActivatorNodeRef } = dragHandleProps;
735
- return /* @__PURE__ */ jsx4(
773
+ return /* @__PURE__ */ jsx5(
736
774
  HeaderContainer,
737
775
  {
738
776
  ref: setActivatorNodeRef,
@@ -741,15 +779,15 @@ var ClipHeader = ({
741
779
  $isSelected: isSelected,
742
780
  ...listeners,
743
781
  ...attributes,
744
- children: /* @__PURE__ */ jsx4(TrackName, { children: trackName })
782
+ children: /* @__PURE__ */ jsx5(TrackName, { children: trackName })
745
783
  }
746
784
  );
747
785
  };
748
786
 
749
787
  // src/components/ClipBoundary.tsx
750
- import React2 from "react";
788
+ import React3 from "react";
751
789
  import styled11 from "styled-components";
752
- import { jsx as jsx5 } from "react/jsx-runtime";
790
+ import { jsx as jsx6 } from "react/jsx-runtime";
753
791
  var CLIP_BOUNDARY_WIDTH = 8;
754
792
  var CLIP_BOUNDARY_WIDTH_TOUCH = 24;
755
793
  var BoundaryContainer = styled11.div`
@@ -789,12 +827,12 @@ var ClipBoundary = ({
789
827
  dragHandleProps,
790
828
  touchOptimized = false
791
829
  }) => {
792
- const [isHovered, setIsHovered] = React2.useState(false);
830
+ const [isHovered, setIsHovered] = React3.useState(false);
793
831
  if (!dragHandleProps) {
794
832
  return null;
795
833
  }
796
834
  const { attributes, listeners, setActivatorNodeRef, isDragging } = dragHandleProps;
797
- return /* @__PURE__ */ jsx5(
835
+ return /* @__PURE__ */ jsx6(
798
836
  BoundaryContainer,
799
837
  {
800
838
  ref: setActivatorNodeRef,
@@ -814,7 +852,7 @@ var ClipBoundary = ({
814
852
 
815
853
  // src/components/FadeOverlay.tsx
816
854
  import styled12, { useTheme } from "styled-components";
817
- import { jsx as jsx6 } from "react/jsx-runtime";
855
+ import { jsx as jsx7 } from "react/jsx-runtime";
818
856
  var FadeContainer = styled12.div.attrs((props) => ({
819
857
  style: {
820
858
  left: `${props.$left}px`,
@@ -871,7 +909,7 @@ var FadeOverlay = ({
871
909
  const theme = useTheme();
872
910
  if (width < 1) return null;
873
911
  const fillColor = color || theme?.fadeOverlayColor || "rgba(0, 0, 0, 0.4)";
874
- return /* @__PURE__ */ jsx6(FadeContainer, { $left: left, $width: width, $type: type, children: /* @__PURE__ */ jsx6(FadeSvg, { $type: type, viewBox: `0 0 ${width} 100`, preserveAspectRatio: "none", children: /* @__PURE__ */ jsx6(
912
+ return /* @__PURE__ */ jsx7(FadeContainer, { $left: left, $width: width, $type: type, children: /* @__PURE__ */ jsx7(FadeSvg, { $type: type, viewBox: `0 0 ${width} 100`, preserveAspectRatio: "none", children: /* @__PURE__ */ jsx7(
875
913
  "path",
876
914
  {
877
915
  d: generateFadePath(width, 100, curveType),
@@ -881,7 +919,7 @@ var FadeOverlay = ({
881
919
  };
882
920
 
883
921
  // src/components/Clip.tsx
884
- import { Fragment, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
922
+ import { Fragment, jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
885
923
  var ClipContainer = styled13.div.attrs((props) => ({
886
924
  style: props.$isOverlay ? {} : {
887
925
  left: `${props.$left}px`,
@@ -979,7 +1017,7 @@ var Clip = ({
979
1017
  "data-track-id": trackId,
980
1018
  onMouseDown,
981
1019
  children: [
982
- showHeader && /* @__PURE__ */ jsx7(
1020
+ showHeader && /* @__PURE__ */ jsx8(
983
1021
  ClipHeader,
984
1022
  {
985
1023
  clipId,
@@ -993,7 +1031,7 @@ var Clip = ({
993
1031
  ),
994
1032
  /* @__PURE__ */ jsxs2(ChannelsWrapper, { $isOverlay: isOverlay, children: [
995
1033
  children,
996
- showFades && fadeIn && fadeIn.duration > 0 && /* @__PURE__ */ jsx7(
1034
+ showFades && fadeIn && fadeIn.duration > 0 && /* @__PURE__ */ jsx8(
997
1035
  FadeOverlay,
998
1036
  {
999
1037
  left: 0,
@@ -1002,7 +1040,7 @@ var Clip = ({
1002
1040
  curveType: fadeIn.type
1003
1041
  }
1004
1042
  ),
1005
- showFades && fadeOut && fadeOut.duration > 0 && /* @__PURE__ */ jsx7(
1043
+ showFades && fadeOut && fadeOut.duration > 0 && /* @__PURE__ */ jsx8(
1006
1044
  FadeOverlay,
1007
1045
  {
1008
1046
  left: width - Math.floor(fadeOut.duration * sampleRate / samplesPerPixel),
@@ -1013,7 +1051,7 @@ var Clip = ({
1013
1051
  )
1014
1052
  ] }),
1015
1053
  showHeader && !disableHeaderDrag && !isOverlay && /* @__PURE__ */ jsxs2(Fragment, { children: [
1016
- /* @__PURE__ */ jsx7(
1054
+ /* @__PURE__ */ jsx8(
1017
1055
  ClipBoundary,
1018
1056
  {
1019
1057
  clipId,
@@ -1029,7 +1067,7 @@ var Clip = ({
1029
1067
  }
1030
1068
  }
1031
1069
  ),
1032
- /* @__PURE__ */ jsx7(
1070
+ /* @__PURE__ */ jsx8(
1033
1071
  ClipBoundary,
1034
1072
  {
1035
1073
  clipId,
@@ -1053,7 +1091,7 @@ var Clip = ({
1053
1091
 
1054
1092
  // src/components/MasterVolumeControl.tsx
1055
1093
  import styled14 from "styled-components";
1056
- import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1094
+ import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
1057
1095
  var VolumeContainer = styled14.div`
1058
1096
  display: inline-flex;
1059
1097
  align-items: center;
@@ -1076,8 +1114,8 @@ var MasterVolumeControl = ({
1076
1114
  onChange(parseFloat(e.target.value) / 100);
1077
1115
  };
1078
1116
  return /* @__PURE__ */ jsxs3(VolumeContainer, { className, children: [
1079
- /* @__PURE__ */ jsx8(VolumeLabel, { htmlFor: "master-gain", children: "Master Volume" }),
1080
- /* @__PURE__ */ jsx8(
1117
+ /* @__PURE__ */ jsx9(VolumeLabel, { htmlFor: "master-gain", children: "Master Volume" }),
1118
+ /* @__PURE__ */ jsx9(
1081
1119
  VolumeSlider,
1082
1120
  {
1083
1121
  min: "0",
@@ -1094,7 +1132,7 @@ var MasterVolumeControl = ({
1094
1132
  // src/components/Playhead.tsx
1095
1133
  import { useRef as useRef2, useEffect } from "react";
1096
1134
  import styled15 from "styled-components";
1097
- import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1135
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
1098
1136
  var PlayheadLine = styled15.div.attrs((props) => ({
1099
1137
  style: {
1100
1138
  transform: `translate3d(${props.$position}px, 0, 0)`
@@ -1111,7 +1149,7 @@ var PlayheadLine = styled15.div.attrs((props) => ({
1111
1149
  will-change: transform;
1112
1150
  `;
1113
1151
  var Playhead = ({ position, color = "#ff0000" }) => {
1114
- return /* @__PURE__ */ jsx9(PlayheadLine, { $position: position, $color: color });
1152
+ return /* @__PURE__ */ jsx10(PlayheadLine, { $position: position, $color: color });
1115
1153
  };
1116
1154
  var PlayheadWithMarkerContainer = styled15.div`
1117
1155
  position: absolute;
@@ -1190,14 +1228,14 @@ var PlayheadWithMarker = ({
1190
1228
  }
1191
1229
  });
1192
1230
  return /* @__PURE__ */ jsxs4(PlayheadWithMarkerContainer, { ref: containerRef, $color: color, children: [
1193
- /* @__PURE__ */ jsx9(MarkerTriangle, { $color: color }),
1194
- /* @__PURE__ */ jsx9(MarkerLine, { $color: color })
1231
+ /* @__PURE__ */ jsx10(MarkerTriangle, { $color: color }),
1232
+ /* @__PURE__ */ jsx10(MarkerLine, { $color: color })
1195
1233
  ] });
1196
1234
  };
1197
1235
 
1198
1236
  // src/components/Playlist.tsx
1199
1237
  import styled16, { withTheme } from "styled-components";
1200
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1238
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
1201
1239
  var Wrapper2 = styled16.div`
1202
1240
  overflow-y: hidden;
1203
1241
  overflow-x: auto;
@@ -1251,16 +1289,16 @@ var Playlist = ({
1251
1289
  isSelecting,
1252
1290
  "data-playlist-state": playlistState
1253
1291
  }) => {
1254
- return /* @__PURE__ */ jsx10(Wrapper2, { "data-scroll-container": "true", "data-playlist-state": playlistState, ref: scrollContainerRef, children: /* @__PURE__ */ jsxs5(
1292
+ return /* @__PURE__ */ jsx11(Wrapper2, { "data-scroll-container": "true", "data-playlist-state": playlistState, ref: scrollContainerRef, children: /* @__PURE__ */ jsxs5(
1255
1293
  ScrollContainer,
1256
1294
  {
1257
1295
  $backgroundColor: backgroundColor,
1258
1296
  $width: scrollContainerWidth,
1259
1297
  children: [
1260
- timescale && /* @__PURE__ */ jsx10(TimescaleWrapper, { $width: timescaleWidth, $backgroundColor: timescaleBackgroundColor, children: timescale }),
1298
+ timescale && /* @__PURE__ */ jsx11(TimescaleWrapper, { $width: timescaleWidth, $backgroundColor: timescaleBackgroundColor, children: timescale }),
1261
1299
  /* @__PURE__ */ jsxs5(TracksContainer, { $width: tracksWidth, $backgroundColor: backgroundColor, children: [
1262
1300
  children,
1263
- (onTracksClick || onTracksMouseDown) && /* @__PURE__ */ jsx10(
1301
+ (onTracksClick || onTracksMouseDown) && /* @__PURE__ */ jsx11(
1264
1302
  ClickOverlay,
1265
1303
  {
1266
1304
  $controlsWidth: controlsWidth,
@@ -1280,7 +1318,7 @@ var StyledPlaylist = withTheme(Playlist);
1280
1318
 
1281
1319
  // src/components/Selection.tsx
1282
1320
  import styled17 from "styled-components";
1283
- import { jsx as jsx11 } from "react/jsx-runtime";
1321
+ import { jsx as jsx12 } from "react/jsx-runtime";
1284
1322
  var SelectionOverlay = styled17.div.attrs((props) => ({
1285
1323
  style: {
1286
1324
  left: `${props.$left}px`,
@@ -1304,13 +1342,13 @@ var Selection = ({
1304
1342
  if (width <= 0) {
1305
1343
  return null;
1306
1344
  }
1307
- return /* @__PURE__ */ jsx11(SelectionOverlay, { $left: startPosition, $width: width, $color: color, "data-selection": true });
1345
+ return /* @__PURE__ */ jsx12(SelectionOverlay, { $left: startPosition, $width: width, $color: color, "data-selection": true });
1308
1346
  };
1309
1347
 
1310
1348
  // src/components/LoopRegion.tsx
1311
1349
  import { useCallback as useCallback2, useRef as useRef3, useState } from "react";
1312
1350
  import styled18 from "styled-components";
1313
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1351
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
1314
1352
  var LoopRegionOverlayDiv = styled18.div.attrs((props) => ({
1315
1353
  style: {
1316
1354
  left: `${props.$left}px`,
@@ -1360,7 +1398,7 @@ var LoopRegion = ({
1360
1398
  return null;
1361
1399
  }
1362
1400
  return /* @__PURE__ */ jsxs6(Fragment2, { children: [
1363
- /* @__PURE__ */ jsx12(
1401
+ /* @__PURE__ */ jsx13(
1364
1402
  LoopRegionOverlayDiv,
1365
1403
  {
1366
1404
  $left: startPosition,
@@ -1369,7 +1407,7 @@ var LoopRegion = ({
1369
1407
  "data-loop-region": true
1370
1408
  }
1371
1409
  ),
1372
- /* @__PURE__ */ jsx12(
1410
+ /* @__PURE__ */ jsx13(
1373
1411
  LoopMarker,
1374
1412
  {
1375
1413
  $left: startPosition,
@@ -1378,7 +1416,7 @@ var LoopRegion = ({
1378
1416
  "data-loop-marker": "start"
1379
1417
  }
1380
1418
  ),
1381
- /* @__PURE__ */ jsx12(
1419
+ /* @__PURE__ */ jsx13(
1382
1420
  LoopMarker,
1383
1421
  {
1384
1422
  $left: endPosition - 2,
@@ -1523,7 +1561,7 @@ var LoopRegionMarkers = ({
1523
1561
  return null;
1524
1562
  }
1525
1563
  return /* @__PURE__ */ jsxs6(Fragment2, { children: [
1526
- /* @__PURE__ */ jsx12(
1564
+ /* @__PURE__ */ jsx13(
1527
1565
  TimescaleLoopShade,
1528
1566
  {
1529
1567
  $left: startPosition,
@@ -1534,7 +1572,7 @@ var LoopRegionMarkers = ({
1534
1572
  "data-loop-region-timescale": true
1535
1573
  }
1536
1574
  ),
1537
- /* @__PURE__ */ jsx12(
1575
+ /* @__PURE__ */ jsx13(
1538
1576
  DraggableMarkerHandle,
1539
1577
  {
1540
1578
  $left: startPosition,
@@ -1545,7 +1583,7 @@ var LoopRegionMarkers = ({
1545
1583
  "data-loop-marker-handle": "start"
1546
1584
  }
1547
1585
  ),
1548
- /* @__PURE__ */ jsx12(
1586
+ /* @__PURE__ */ jsx13(
1549
1587
  DraggableMarkerHandle,
1550
1588
  {
1551
1589
  $left: endPosition,
@@ -1612,14 +1650,14 @@ var TimescaleLoopRegion = ({
1612
1650
  document.addEventListener("mousemove", handleMouseMove);
1613
1651
  document.addEventListener("mouseup", handleMouseUp);
1614
1652
  }, [minPosition, maxPosition, onLoopRegionChange]);
1615
- return /* @__PURE__ */ jsx12(
1653
+ return /* @__PURE__ */ jsx13(
1616
1654
  TimescaleLoopCreator,
1617
1655
  {
1618
1656
  ref: containerRef,
1619
1657
  $leftOffset: controlsOffset,
1620
1658
  onMouseDown: handleBackgroundMouseDown,
1621
1659
  "data-timescale-loop-creator": true,
1622
- children: hasLoopRegion && /* @__PURE__ */ jsx12(
1660
+ children: hasLoopRegion && /* @__PURE__ */ jsx13(
1623
1661
  LoopRegionMarkers,
1624
1662
  {
1625
1663
  startPosition,
@@ -1691,7 +1729,7 @@ function parseTime(timeStr, format) {
1691
1729
  }
1692
1730
 
1693
1731
  // src/components/TimeInput.tsx
1694
- import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
1732
+ import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1695
1733
  var TimeInput = ({
1696
1734
  id,
1697
1735
  label,
@@ -1723,8 +1761,8 @@ var TimeInput = ({
1723
1761
  }
1724
1762
  };
1725
1763
  return /* @__PURE__ */ jsxs7(Fragment3, { children: [
1726
- /* @__PURE__ */ jsx13(ScreenReaderOnly, { as: "label", htmlFor: id, children: label }),
1727
- /* @__PURE__ */ jsx13(
1764
+ /* @__PURE__ */ jsx14(ScreenReaderOnly, { as: "label", htmlFor: id, children: label }),
1765
+ /* @__PURE__ */ jsx14(
1728
1766
  BaseInput,
1729
1767
  {
1730
1768
  type: "text",
@@ -1741,7 +1779,7 @@ var TimeInput = ({
1741
1779
  };
1742
1780
 
1743
1781
  // src/components/SelectionTimeInputs.tsx
1744
- import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
1782
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1745
1783
  var SelectionTimeInputs = ({
1746
1784
  selectionStart,
1747
1785
  selectionEnd,
@@ -1775,7 +1813,7 @@ var SelectionTimeInputs = ({
1775
1813
  }
1776
1814
  };
1777
1815
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
1778
- /* @__PURE__ */ jsx14(
1816
+ /* @__PURE__ */ jsx15(
1779
1817
  TimeInput,
1780
1818
  {
1781
1819
  id: "audio_start",
@@ -1786,7 +1824,7 @@ var SelectionTimeInputs = ({
1786
1824
  onChange: handleStartChange
1787
1825
  }
1788
1826
  ),
1789
- /* @__PURE__ */ jsx14(
1827
+ /* @__PURE__ */ jsx15(
1790
1828
  TimeInput,
1791
1829
  {
1792
1830
  id: "audio_end",
@@ -1802,7 +1840,7 @@ var SelectionTimeInputs = ({
1802
1840
 
1803
1841
  // src/contexts/DevicePixelRatio.tsx
1804
1842
  import { useState as useState4, createContext, useContext } from "react";
1805
- import { jsx as jsx15 } from "react/jsx-runtime";
1843
+ import { jsx as jsx16 } from "react/jsx-runtime";
1806
1844
  function getScale() {
1807
1845
  return window.devicePixelRatio;
1808
1846
  }
@@ -1816,7 +1854,7 @@ var DevicePixelRatioProvider = ({ children }) => {
1816
1854
  },
1817
1855
  { once: true }
1818
1856
  );
1819
- return /* @__PURE__ */ jsx15(DevicePixelRatioContext.Provider, { value: Math.ceil(scale), children });
1857
+ return /* @__PURE__ */ jsx16(DevicePixelRatioContext.Provider, { value: Math.ceil(scale), children });
1820
1858
  };
1821
1859
  var useDevicePixelRatio = () => useContext(DevicePixelRatioContext);
1822
1860
 
@@ -1845,8 +1883,8 @@ var useTheme2 = () => useContext3(ThemeContext);
1845
1883
 
1846
1884
  // src/contexts/TrackControls.tsx
1847
1885
  import { createContext as createContext3, useContext as useContext4, Fragment as Fragment5 } from "react";
1848
- import { jsx as jsx16 } from "react/jsx-runtime";
1849
- var TrackControlsContext = createContext3(/* @__PURE__ */ jsx16(Fragment5, {}));
1886
+ import { jsx as jsx17 } from "react/jsx-runtime";
1887
+ var TrackControlsContext = createContext3(/* @__PURE__ */ jsx17(Fragment5, {}));
1850
1888
  var useTrackControls = () => useContext4(TrackControlsContext);
1851
1889
 
1852
1890
  // src/contexts/Playout.tsx
@@ -1855,7 +1893,7 @@ import {
1855
1893
  createContext as createContext4,
1856
1894
  useContext as useContext5
1857
1895
  } from "react";
1858
- import { jsx as jsx17 } from "react/jsx-runtime";
1896
+ import { jsx as jsx18 } from "react/jsx-runtime";
1859
1897
  var defaultProgress = 0;
1860
1898
  var defaultIsPlaying = false;
1861
1899
  var defaultSelectionStart = 0;
@@ -1884,7 +1922,7 @@ var PlayoutProvider = ({ children }) => {
1884
1922
  setSelectionStart(start);
1885
1923
  setSelectionEnd(end);
1886
1924
  };
1887
- return /* @__PURE__ */ jsx17(PlayoutStatusUpdateContext.Provider, { value: { setIsPlaying, setProgress, setSelection }, children: /* @__PURE__ */ jsx17(PlayoutStatusContext.Provider, { value: { isPlaying, progress, selectionStart, selectionEnd }, children }) });
1925
+ return /* @__PURE__ */ jsx18(PlayoutStatusUpdateContext.Provider, { value: { setIsPlaying, setProgress, setSelection }, children: /* @__PURE__ */ jsx18(PlayoutStatusContext.Provider, { value: { isPlaying, progress, selectionStart, selectionEnd }, children }) });
1888
1926
  };
1889
1927
  var usePlayoutStatus = () => useContext5(PlayoutStatusContext);
1890
1928
  var usePlayoutStatusUpdate = () => useContext5(PlayoutStatusUpdateContext);
@@ -1892,7 +1930,7 @@ var usePlayoutStatusUpdate = () => useContext5(PlayoutStatusUpdateContext);
1892
1930
  // src/components/SpectrogramChannel.tsx
1893
1931
  import { useLayoutEffect as useLayoutEffect2, useCallback as useCallback3, useRef as useRef4, useEffect as useEffect4 } from "react";
1894
1932
  import styled19 from "styled-components";
1895
- import { jsx as jsx18 } from "react/jsx-runtime";
1933
+ import { jsx as jsx19 } from "react/jsx-runtime";
1896
1934
  var MAX_CANVAS_WIDTH2 = 1e3;
1897
1935
  var Wrapper3 = styled19.div.attrs((props) => ({
1898
1936
  style: {
@@ -2069,7 +2107,7 @@ var SpectrogramChannel = ({
2069
2107
  while (totalWidth > 0) {
2070
2108
  const currentWidth = Math.min(totalWidth, MAX_CANVAS_WIDTH2);
2071
2109
  canvases.push(
2072
- /* @__PURE__ */ jsx18(
2110
+ /* @__PURE__ */ jsx19(
2073
2111
  SpectrogramCanvas,
2074
2112
  {
2075
2113
  $cssWidth: currentWidth,
@@ -2085,11 +2123,11 @@ var SpectrogramChannel = ({
2085
2123
  totalWidth -= currentWidth;
2086
2124
  canvasCount++;
2087
2125
  }
2088
- return /* @__PURE__ */ jsx18(Wrapper3, { $index: index, $cssWidth: length, $waveHeight: waveHeight, children: canvases });
2126
+ return /* @__PURE__ */ jsx19(Wrapper3, { $index: index, $cssWidth: length, $waveHeight: waveHeight, children: canvases });
2089
2127
  };
2090
2128
 
2091
2129
  // src/components/SmartChannel.tsx
2092
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
2130
+ import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
2093
2131
  var SmartChannel = ({
2094
2132
  isSelected,
2095
2133
  transparentBackground,
@@ -2114,7 +2152,7 @@ var SmartChannel = ({
2114
2152
  const drawMode = theme?.waveformDrawMode || "inverted";
2115
2153
  const hasSpectrogram = spectrogramData || spectrogramWorkerApi;
2116
2154
  if (renderMode === "spectrogram" && hasSpectrogram) {
2117
- return /* @__PURE__ */ jsx19(
2155
+ return /* @__PURE__ */ jsx20(
2118
2156
  SpectrogramChannel,
2119
2157
  {
2120
2158
  index: props.index,
@@ -2136,7 +2174,7 @@ var SmartChannel = ({
2136
2174
  if (renderMode === "both" && hasSpectrogram) {
2137
2175
  const halfHeight = Math.floor(waveHeight / 2);
2138
2176
  return /* @__PURE__ */ jsxs9(Fragment6, { children: [
2139
- /* @__PURE__ */ jsx19(
2177
+ /* @__PURE__ */ jsx20(
2140
2178
  SpectrogramChannel,
2141
2179
  {
2142
2180
  index: props.index * 2,
@@ -2155,11 +2193,10 @@ var SmartChannel = ({
2155
2193
  onCanvasesReady: spectrogramOnCanvasesReady
2156
2194
  }
2157
2195
  ),
2158
- /* @__PURE__ */ jsx19("div", { style: { position: "absolute", top: (props.index * 2 + 1) * halfHeight, width: props.length, height: halfHeight }, children: /* @__PURE__ */ jsx19(
2196
+ /* @__PURE__ */ jsx20("div", { style: { position: "absolute", top: (props.index * 2 + 1) * halfHeight, width: props.length, height: halfHeight }, children: /* @__PURE__ */ jsx20(
2159
2197
  Channel,
2160
2198
  {
2161
2199
  ...props,
2162
- ...theme,
2163
2200
  index: 0,
2164
2201
  waveOutlineColor,
2165
2202
  waveFillColor,
@@ -2173,11 +2210,10 @@ var SmartChannel = ({
2173
2210
  ) })
2174
2211
  ] });
2175
2212
  }
2176
- return /* @__PURE__ */ jsx19(
2213
+ return /* @__PURE__ */ jsx20(
2177
2214
  Channel,
2178
2215
  {
2179
2216
  ...props,
2180
- ...theme,
2181
2217
  waveOutlineColor,
2182
2218
  waveFillColor,
2183
2219
  waveHeight,
@@ -2193,7 +2229,7 @@ var SmartChannel = ({
2193
2229
  // src/components/SpectrogramLabels.tsx
2194
2230
  import { useRef as useRef5, useLayoutEffect as useLayoutEffect3 } from "react";
2195
2231
  import styled20 from "styled-components";
2196
- import { jsx as jsx20 } from "react/jsx-runtime";
2232
+ import { jsx as jsx21 } from "react/jsx-runtime";
2197
2233
  var LABELS_WIDTH = 72;
2198
2234
  var LabelsStickyWrapper = styled20.div`
2199
2235
  position: sticky;
@@ -2275,7 +2311,7 @@ var SpectrogramLabels = ({
2275
2311
  }
2276
2312
  }
2277
2313
  }, [waveHeight, numChannels, frequencyScaleFn, minFrequency, maxFrequency, labelsColor, labelsBackground, devicePixelRatio, spectrogramHeight, clipHeaderOffset]);
2278
- return /* @__PURE__ */ jsx20(LabelsStickyWrapper, { $height: totalHeight + clipHeaderOffset, children: /* @__PURE__ */ jsx20(
2314
+ return /* @__PURE__ */ jsx21(LabelsStickyWrapper, { $height: totalHeight + clipHeaderOffset, children: /* @__PURE__ */ jsx21(
2279
2315
  "canvas",
2280
2316
  {
2281
2317
  ref: canvasRef,
@@ -2294,7 +2330,7 @@ var SpectrogramLabels = ({
2294
2330
  import { useContext as useContext7 } from "react";
2295
2331
 
2296
2332
  // src/components/TimeScale.tsx
2297
- import React12, { useRef as useRef6, useEffect as useEffect5, useContext as useContext6 } from "react";
2333
+ import React13, { useRef as useRef6, useEffect as useEffect5, useContext as useContext6 } from "react";
2298
2334
  import styled21, { withTheme as withTheme2 } from "styled-components";
2299
2335
 
2300
2336
  // src/utils/conversions.ts
@@ -2318,7 +2354,7 @@ function secondsToPixels(seconds, samplesPerPixel, sampleRate) {
2318
2354
  }
2319
2355
 
2320
2356
  // src/components/TimeScale.tsx
2321
- import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
2357
+ import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
2322
2358
  function formatTime2(milliseconds) {
2323
2359
  const seconds = Math.floor(milliseconds / 1e3);
2324
2360
  const s = seconds % 60;
@@ -2412,7 +2448,7 @@ var TimeScale = (props) => {
2412
2448
  if (counter % marker === 0) {
2413
2449
  const timeMs = counter;
2414
2450
  const timestamp = formatTime2(timeMs);
2415
- const timestampContent = renderTimestamp ? /* @__PURE__ */ jsx21(React12.Fragment, { children: renderTimestamp(timeMs, pix) }, `timestamp-${counter}`) : /* @__PURE__ */ jsx21(TimeStamp, { $left: pix, children: timestamp }, timestamp);
2451
+ const timestampContent = renderTimestamp ? /* @__PURE__ */ jsx22(React13.Fragment, { children: renderTimestamp(timeMs, pix) }, `timestamp-${counter}`) : /* @__PURE__ */ jsx22(TimeStamp, { $left: pix, children: timestamp }, timestamp);
2416
2452
  timeMarkers.push(timestampContent);
2417
2453
  canvasInfo.set(pix, timeScaleHeight);
2418
2454
  } else if (counter % bigStep === 0) {
@@ -2430,7 +2466,7 @@ var TimeScale = (props) => {
2430
2466
  $timeScaleHeight: timeScaleHeight,
2431
2467
  children: [
2432
2468
  timeMarkers,
2433
- /* @__PURE__ */ jsx21(
2469
+ /* @__PURE__ */ jsx22(
2434
2470
  TimeTicks,
2435
2471
  {
2436
2472
  $cssWidth: widthX,
@@ -2447,7 +2483,7 @@ var TimeScale = (props) => {
2447
2483
  var StyledTimeScale = withTheme2(TimeScale);
2448
2484
 
2449
2485
  // src/components/SmartScale.tsx
2450
- import { jsx as jsx22 } from "react/jsx-runtime";
2486
+ import { jsx as jsx23 } from "react/jsx-runtime";
2451
2487
  var timeinfo = /* @__PURE__ */ new Map([
2452
2488
  [
2453
2489
  700,
@@ -2523,7 +2559,7 @@ function getScaleInfo(samplesPerPixel) {
2523
2559
  var SmartScale = ({ renderTimestamp }) => {
2524
2560
  const { samplesPerPixel, duration } = useContext7(PlaylistInfoContext);
2525
2561
  let config = getScaleInfo(samplesPerPixel);
2526
- return /* @__PURE__ */ jsx22(
2562
+ return /* @__PURE__ */ jsx23(
2527
2563
  StyledTimeScale,
2528
2564
  {
2529
2565
  marker: config.marker,
@@ -2537,7 +2573,7 @@ var SmartScale = ({ renderTimestamp }) => {
2537
2573
 
2538
2574
  // src/components/TimeFormatSelect.tsx
2539
2575
  import styled22 from "styled-components";
2540
- import { jsx as jsx23 } from "react/jsx-runtime";
2576
+ import { jsx as jsx24 } from "react/jsx-runtime";
2541
2577
  var SelectWrapper = styled22.div`
2542
2578
  display: inline-flex;
2543
2579
  align-items: center;
@@ -2560,7 +2596,7 @@ var TimeFormatSelect = ({
2560
2596
  const handleChange = (e) => {
2561
2597
  onChange(e.target.value);
2562
2598
  };
2563
- return /* @__PURE__ */ jsx23(SelectWrapper, { className, children: /* @__PURE__ */ jsx23(
2599
+ return /* @__PURE__ */ jsx24(SelectWrapper, { className, children: /* @__PURE__ */ jsx24(
2564
2600
  BaseSelect,
2565
2601
  {
2566
2602
  className: "time-format",
@@ -2568,14 +2604,14 @@ var TimeFormatSelect = ({
2568
2604
  onChange: handleChange,
2569
2605
  disabled,
2570
2606
  "aria-label": "Time format selection",
2571
- children: TIME_FORMAT_OPTIONS.map((option) => /* @__PURE__ */ jsx23("option", { value: option.value, children: option.label }, option.value))
2607
+ children: TIME_FORMAT_OPTIONS.map((option) => /* @__PURE__ */ jsx24("option", { value: option.value, children: option.label }, option.value))
2572
2608
  }
2573
2609
  ) });
2574
2610
  };
2575
2611
 
2576
2612
  // src/components/Track.tsx
2577
2613
  import styled23 from "styled-components";
2578
- import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
2614
+ import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
2579
2615
  var Container = styled23.div.attrs((props) => ({
2580
2616
  style: {
2581
2617
  height: `${props.$waveHeight * props.$numChannels + (props.$hasClipHeaders ? CLIP_HEADER_HEIGHT : 0)}px`
@@ -2641,7 +2677,7 @@ var Track = ({
2641
2677
  $hasClipHeaders: hasClipHeaders,
2642
2678
  $isSelected: isSelected,
2643
2679
  children: [
2644
- /* @__PURE__ */ jsx24(
2680
+ /* @__PURE__ */ jsx25(
2645
2681
  ControlsWrapper,
2646
2682
  {
2647
2683
  $controlWidth: show ? controlWidth : 0,
@@ -2649,7 +2685,7 @@ var Track = ({
2649
2685
  children: controls
2650
2686
  }
2651
2687
  ),
2652
- /* @__PURE__ */ jsx24(
2688
+ /* @__PURE__ */ jsx25(
2653
2689
  ChannelContainer,
2654
2690
  {
2655
2691
  $controlWidth: show ? controlWidth : 0,
@@ -2757,7 +2793,7 @@ var ButtonGroup = styled25.div`
2757
2793
  // src/components/TrackControls/CloseButton.tsx
2758
2794
  import styled26 from "styled-components";
2759
2795
  import { X as XIcon } from "@phosphor-icons/react";
2760
- import { jsx as jsx25 } from "react/jsx-runtime";
2796
+ import { jsx as jsx26 } from "react/jsx-runtime";
2761
2797
  var StyledCloseButton = styled26.button`
2762
2798
  position: absolute;
2763
2799
  left: 0;
@@ -2782,7 +2818,7 @@ var StyledCloseButton = styled26.button`
2782
2818
  var CloseButton = ({
2783
2819
  onClick,
2784
2820
  title = "Remove track"
2785
- }) => /* @__PURE__ */ jsx25(StyledCloseButton, { onClick, title, children: /* @__PURE__ */ jsx25(XIcon, { size: 12, weight: "bold" }) });
2821
+ }) => /* @__PURE__ */ jsx26(StyledCloseButton, { onClick, title, children: /* @__PURE__ */ jsx26(XIcon, { size: 12, weight: "bold" }) });
2786
2822
 
2787
2823
  // src/components/TrackControls/Controls.tsx
2788
2824
  import styled27 from "styled-components";
@@ -2818,23 +2854,23 @@ var Header = styled28.header`
2818
2854
 
2819
2855
  // src/components/TrackControls/VolumeDownIcon.tsx
2820
2856
  import { SpeakerLowIcon } from "@phosphor-icons/react";
2821
- import { jsx as jsx26 } from "react/jsx-runtime";
2822
- var VolumeDownIcon = (props) => /* @__PURE__ */ jsx26(SpeakerLowIcon, { weight: "light", ...props });
2857
+ import { jsx as jsx27 } from "react/jsx-runtime";
2858
+ var VolumeDownIcon = (props) => /* @__PURE__ */ jsx27(SpeakerLowIcon, { weight: "light", ...props });
2823
2859
 
2824
2860
  // src/components/TrackControls/VolumeUpIcon.tsx
2825
2861
  import { SpeakerHighIcon } from "@phosphor-icons/react";
2826
- import { jsx as jsx27 } from "react/jsx-runtime";
2827
- var VolumeUpIcon = (props) => /* @__PURE__ */ jsx27(SpeakerHighIcon, { weight: "light", ...props });
2862
+ import { jsx as jsx28 } from "react/jsx-runtime";
2863
+ var VolumeUpIcon = (props) => /* @__PURE__ */ jsx28(SpeakerHighIcon, { weight: "light", ...props });
2828
2864
 
2829
2865
  // src/components/TrackControls/TrashIcon.tsx
2830
2866
  import { TrashIcon as PhosphorTrashIcon } from "@phosphor-icons/react";
2831
- import { jsx as jsx28 } from "react/jsx-runtime";
2832
- var TrashIcon = (props) => /* @__PURE__ */ jsx28(PhosphorTrashIcon, { weight: "light", ...props });
2867
+ import { jsx as jsx29 } from "react/jsx-runtime";
2868
+ var TrashIcon = (props) => /* @__PURE__ */ jsx29(PhosphorTrashIcon, { weight: "light", ...props });
2833
2869
 
2834
2870
  // src/components/TrackControls/DotsIcon.tsx
2835
2871
  import { DotsThreeIcon } from "@phosphor-icons/react";
2836
- import { jsx as jsx29 } from "react/jsx-runtime";
2837
- var DotsIcon = (props) => /* @__PURE__ */ jsx29(DotsThreeIcon, { weight: "bold", ...props });
2872
+ import { jsx as jsx30 } from "react/jsx-runtime";
2873
+ var DotsIcon = (props) => /* @__PURE__ */ jsx30(DotsThreeIcon, { weight: "bold", ...props });
2838
2874
 
2839
2875
  // src/components/TrackControls/Slider.tsx
2840
2876
  import styled29 from "styled-components";
@@ -2902,10 +2938,10 @@ var SliderWrapper = styled30.label`
2902
2938
  `;
2903
2939
 
2904
2940
  // src/components/TrackMenu.tsx
2905
- import React14, { useState as useState6, useEffect as useEffect6, useRef as useRef7 } from "react";
2941
+ import React15, { useState as useState6, useEffect as useEffect6, useRef as useRef7 } from "react";
2906
2942
  import { createPortal } from "react-dom";
2907
2943
  import styled31 from "styled-components";
2908
- import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
2944
+ import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
2909
2945
  var MenuContainer = styled31.div`
2910
2946
  position: relative;
2911
2947
  display: inline-block;
@@ -2973,7 +3009,7 @@ var TrackMenu = ({
2973
3009
  return () => document.removeEventListener("mousedown", handleClick);
2974
3010
  }, [open]);
2975
3011
  return /* @__PURE__ */ jsxs12(MenuContainer, { children: [
2976
- /* @__PURE__ */ jsx30(
3012
+ /* @__PURE__ */ jsx31(
2977
3013
  MenuButton,
2978
3014
  {
2979
3015
  ref: buttonRef,
@@ -2984,19 +3020,19 @@ var TrackMenu = ({
2984
3020
  onMouseDown: (e) => e.stopPropagation(),
2985
3021
  title: "Track menu",
2986
3022
  "aria-label": "Track menu",
2987
- children: /* @__PURE__ */ jsx30(DotsIcon, { size: 16 })
3023
+ children: /* @__PURE__ */ jsx31(DotsIcon, { size: 16 })
2988
3024
  }
2989
3025
  ),
2990
3026
  open && typeof document !== "undefined" && createPortal(
2991
- /* @__PURE__ */ jsx30(
3027
+ /* @__PURE__ */ jsx31(
2992
3028
  Dropdown,
2993
3029
  {
2994
3030
  ref: dropdownRef,
2995
3031
  $top: dropdownPos.top,
2996
3032
  $left: dropdownPos.left,
2997
3033
  onMouseDown: (e) => e.stopPropagation(),
2998
- children: items.map((item, index) => /* @__PURE__ */ jsxs12(React14.Fragment, { children: [
2999
- index > 0 && /* @__PURE__ */ jsx30(Divider, {}),
3034
+ children: items.map((item, index) => /* @__PURE__ */ jsxs12(React15.Fragment, { children: [
3035
+ index > 0 && /* @__PURE__ */ jsx31(Divider, {}),
3000
3036
  item.content
3001
3037
  ] }, item.id))
3002
3038
  }
@@ -3040,6 +3076,7 @@ export {
3040
3076
  Playhead,
3041
3077
  PlayheadWithMarker,
3042
3078
  Playlist,
3079
+ PlaylistErrorBoundary,
3043
3080
  PlaylistInfoContext,
3044
3081
  PlayoutProvider,
3045
3082
  ScreenReaderOnly,