@waveform-playlist/ui-components 5.0.0-alpha.5 → 5.0.0-alpha.7

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.js CHANGED
@@ -56,6 +56,8 @@ __export(index_exports, {
56
56
  FadeOverlay: () => FadeOverlay,
57
57
  Header: () => Header,
58
58
  InlineLabel: () => InlineLabel,
59
+ LoopRegion: () => LoopRegion,
60
+ LoopRegionMarkers: () => LoopRegionMarkers,
59
61
  MasterVolumeControl: () => MasterVolumeControl,
60
62
  Playhead: () => Playhead,
61
63
  PlayheadWithMarker: () => PlayheadWithMarker,
@@ -74,6 +76,7 @@ __export(index_exports, {
74
76
  TimeFormatSelect: () => TimeFormatSelect,
75
77
  TimeInput: () => TimeInput,
76
78
  TimeScale: () => TimeScale,
79
+ TimescaleLoopRegion: () => TimescaleLoopRegion,
77
80
  Track: () => Track,
78
81
  TrackControlsContext: () => TrackControlsContext,
79
82
  TrackControlsWithDelete: () => TrackControlsWithDelete,
@@ -462,6 +465,10 @@ var defaultTheme = {
462
465
  playheadColor: "#f00",
463
466
  selectionColor: "rgba(255, 105, 180, 0.7)",
464
467
  // hot pink - high contrast on light backgrounds
468
+ loopRegionColor: "rgba(59, 130, 246, 0.3)",
469
+ // Blue - distinct from pink selection
470
+ loopMarkerColor: "#3b82f6",
471
+ // Blue marker triangles
465
472
  clipHeaderBackgroundColor: "rgba(0, 0, 0, 0.1)",
466
473
  clipHeaderBorderColor: "rgba(0, 0, 0, 0.2)",
467
474
  clipHeaderTextColor: "#333",
@@ -533,6 +540,10 @@ var darkTheme = {
533
540
  // Darker Ampelmännchen green playhead
534
541
  selectionColor: "rgba(60, 140, 58, 0.6)",
535
542
  // Darker Ampelmännchen green selection - visible on dark backgrounds
543
+ loopRegionColor: "rgba(96, 165, 250, 0.35)",
544
+ // Light blue - distinct from green selection
545
+ loopMarkerColor: "#60a5fa",
546
+ // Light blue marker triangles
536
547
  clipHeaderBackgroundColor: "rgba(20, 16, 12, 0.85)",
537
548
  // Dark background for clip headers
538
549
  clipHeaderBorderColor: "rgba(200, 160, 120, 0.25)",
@@ -1309,7 +1320,8 @@ var TimescaleWrapper = import_styled_components16.default.div.attrs((props) => (
1309
1320
  }))`
1310
1321
  background: ${(props) => props.$backgroundColor || "white"};
1311
1322
  width: 100%;
1312
- overflow: visible;
1323
+ position: relative;
1324
+ overflow: hidden; /* Constrain loop region to timescale area */
1313
1325
  `;
1314
1326
  var TracksContainer = import_styled_components16.default.div.attrs((props) => ({
1315
1327
  style: props.$width !== void 0 ? { minWidth: `${props.$width}px` } : {}
@@ -1325,7 +1337,8 @@ var ClickOverlay = import_styled_components16.default.div`
1325
1337
  right: 0;
1326
1338
  bottom: 0;
1327
1339
  cursor: crosshair;
1328
- z-index: 1; /* Low z-index - clip headers and boundaries have higher z-index */
1340
+ /* When selecting, raise z-index above clip boundaries (z-index: 105) to prevent interference */
1341
+ z-index: ${(props) => props.$isSelecting ? 110 : 1};
1329
1342
  `;
1330
1343
  var Playlist = ({
1331
1344
  children,
@@ -1340,7 +1353,8 @@ var Playlist = ({
1340
1353
  onTracksMouseDown,
1341
1354
  onTracksMouseMove,
1342
1355
  onTracksMouseUp,
1343
- scrollContainerRef
1356
+ scrollContainerRef,
1357
+ isSelecting
1344
1358
  }) => {
1345
1359
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Wrapper2, { "data-scroll-container": "true", ref: scrollContainerRef, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1346
1360
  ScrollContainer,
@@ -1355,6 +1369,7 @@ var Playlist = ({
1355
1369
  ClickOverlay,
1356
1370
  {
1357
1371
  $controlsWidth: controlsWidth,
1372
+ $isSelecting: isSelecting,
1358
1373
  onClick: onTracksClick,
1359
1374
  onMouseDown: onTracksMouseDown,
1360
1375
  onMouseMove: onTracksMouseMove,
@@ -1397,11 +1412,341 @@ var Selection = ({
1397
1412
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectionOverlay, { $left: startPosition, $width: width, $color: color, "data-selection": true });
1398
1413
  };
1399
1414
 
1415
+ // src/components/LoopRegion.tsx
1416
+ var import_react4 = require("react");
1417
+ var import_styled_components18 = __toESM(require("styled-components"));
1418
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1419
+ var LoopRegionOverlayDiv = import_styled_components18.default.div.attrs((props) => ({
1420
+ style: {
1421
+ left: `${props.$left}px`,
1422
+ width: `${props.$width}px`
1423
+ }
1424
+ }))`
1425
+ position: absolute;
1426
+ top: 0;
1427
+ background: ${(props) => props.$color};
1428
+ height: 100%;
1429
+ z-index: 55; /* Between clips (z-index: 50) and selection (z-index: 60) */
1430
+ pointer-events: none;
1431
+ `;
1432
+ var LoopMarker = import_styled_components18.default.div.attrs((props) => ({
1433
+ style: {
1434
+ left: `${props.$left}px`
1435
+ }
1436
+ }))`
1437
+ position: absolute;
1438
+ top: 0;
1439
+ width: 2px;
1440
+ height: 100%;
1441
+ background: ${(props) => props.$color};
1442
+ z-index: 90; /* Below playhead (z-index: 100) */
1443
+ pointer-events: none;
1444
+
1445
+ /* Triangle marker at top */
1446
+ &::before {
1447
+ content: '';
1448
+ position: absolute;
1449
+ top: 0;
1450
+ ${(props) => props.$isStart ? "left: 0" : "right: 0"};
1451
+ width: 0;
1452
+ height: 0;
1453
+ border-top: 8px solid ${(props) => props.$color};
1454
+ ${(props) => props.$isStart ? "border-right: 8px solid transparent;" : "border-left: 8px solid transparent;"}
1455
+ }
1456
+ `;
1457
+ var LoopRegion = ({
1458
+ startPosition,
1459
+ endPosition,
1460
+ regionColor = "rgba(59, 130, 246, 0.3)",
1461
+ markerColor = "#3b82f6"
1462
+ }) => {
1463
+ const width = Math.max(0, endPosition - startPosition);
1464
+ if (width <= 0) {
1465
+ return null;
1466
+ }
1467
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1468
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1469
+ LoopRegionOverlayDiv,
1470
+ {
1471
+ $left: startPosition,
1472
+ $width: width,
1473
+ $color: regionColor,
1474
+ "data-loop-region": true
1475
+ }
1476
+ ),
1477
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1478
+ LoopMarker,
1479
+ {
1480
+ $left: startPosition,
1481
+ $color: markerColor,
1482
+ $isStart: true,
1483
+ "data-loop-marker": "start"
1484
+ }
1485
+ ),
1486
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1487
+ LoopMarker,
1488
+ {
1489
+ $left: endPosition - 2,
1490
+ $color: markerColor,
1491
+ $isStart: false,
1492
+ "data-loop-marker": "end"
1493
+ }
1494
+ )
1495
+ ] });
1496
+ };
1497
+ var DraggableMarkerHandle = import_styled_components18.default.div.attrs((props) => ({
1498
+ style: {
1499
+ left: `${props.$left}px`
1500
+ }
1501
+ }))`
1502
+ position: absolute;
1503
+ top: 0;
1504
+ width: 12px;
1505
+ height: 100%;
1506
+ cursor: ew-resize;
1507
+ z-index: 100;
1508
+ /* Center the handle on the marker position */
1509
+ transform: translateX(-5px);
1510
+
1511
+ /* Visual marker line */
1512
+ &::before {
1513
+ content: '';
1514
+ position: absolute;
1515
+ top: 0;
1516
+ left: 5px;
1517
+ width: 2px;
1518
+ height: 100%;
1519
+ background: ${(props) => props.$color};
1520
+ opacity: ${(props) => props.$isDragging ? 1 : 0.8};
1521
+ }
1522
+
1523
+ /* Triangle marker at top */
1524
+ &::after {
1525
+ content: '';
1526
+ position: absolute;
1527
+ top: 0;
1528
+ ${(props) => props.$isStart ? "left: 5px" : "left: -1px"};
1529
+ width: 0;
1530
+ height: 0;
1531
+ border-top: 10px solid ${(props) => props.$color};
1532
+ ${(props) => props.$isStart ? "border-right: 10px solid transparent;" : "border-left: 10px solid transparent;"}
1533
+ }
1534
+
1535
+ &:hover::before {
1536
+ opacity: 1;
1537
+ }
1538
+ `;
1539
+ var TimescaleLoopShade = import_styled_components18.default.div.attrs((props) => ({
1540
+ style: {
1541
+ left: `${props.$left}px`,
1542
+ width: `${props.$width}px`
1543
+ }
1544
+ }))`
1545
+ position: absolute;
1546
+ top: 0;
1547
+ height: 100%;
1548
+ background: ${(props) => props.$color};
1549
+ z-index: 50;
1550
+ cursor: grab;
1551
+
1552
+ &:active {
1553
+ cursor: grabbing;
1554
+ }
1555
+ `;
1556
+ var LoopRegionMarkers = ({
1557
+ startPosition,
1558
+ endPosition,
1559
+ markerColor = "#3b82f6",
1560
+ regionColor = "rgba(59, 130, 246, 0.3)",
1561
+ onLoopStartChange,
1562
+ onLoopEndChange,
1563
+ onLoopRegionMove,
1564
+ minPosition = 0,
1565
+ maxPosition = Infinity
1566
+ }) => {
1567
+ const [draggingMarker, setDraggingMarker] = (0, import_react4.useState)(null);
1568
+ const dragStartX = (0, import_react4.useRef)(0);
1569
+ const dragStartPosition = (0, import_react4.useRef)(0);
1570
+ const dragStartEnd = (0, import_react4.useRef)(0);
1571
+ const width = Math.max(0, endPosition - startPosition);
1572
+ const handleMarkerMouseDown = (0, import_react4.useCallback)((e, marker) => {
1573
+ e.preventDefault();
1574
+ e.stopPropagation();
1575
+ setDraggingMarker(marker);
1576
+ dragStartX.current = e.clientX;
1577
+ dragStartPosition.current = marker === "start" ? startPosition : endPosition;
1578
+ const handleMouseMove = (moveEvent) => {
1579
+ const delta = moveEvent.clientX - dragStartX.current;
1580
+ const newPosition = dragStartPosition.current + delta;
1581
+ if (marker === "start") {
1582
+ const clampedPosition = Math.max(minPosition, Math.min(endPosition - 10, newPosition));
1583
+ onLoopStartChange?.(clampedPosition);
1584
+ } else {
1585
+ const clampedPosition = Math.max(startPosition + 10, Math.min(maxPosition, newPosition));
1586
+ onLoopEndChange?.(clampedPosition);
1587
+ }
1588
+ };
1589
+ const handleMouseUp = () => {
1590
+ setDraggingMarker(null);
1591
+ document.removeEventListener("mousemove", handleMouseMove);
1592
+ document.removeEventListener("mouseup", handleMouseUp);
1593
+ };
1594
+ document.addEventListener("mousemove", handleMouseMove);
1595
+ document.addEventListener("mouseup", handleMouseUp);
1596
+ }, [startPosition, endPosition, minPosition, maxPosition, onLoopStartChange, onLoopEndChange]);
1597
+ const handleRegionMouseDown = (0, import_react4.useCallback)((e) => {
1598
+ e.preventDefault();
1599
+ e.stopPropagation();
1600
+ setDraggingMarker("region");
1601
+ dragStartX.current = e.clientX;
1602
+ dragStartPosition.current = startPosition;
1603
+ dragStartEnd.current = endPosition;
1604
+ const regionWidth = endPosition - startPosition;
1605
+ const handleMouseMove = (moveEvent) => {
1606
+ const delta = moveEvent.clientX - dragStartX.current;
1607
+ let newStart = dragStartPosition.current + delta;
1608
+ let newEnd = dragStartEnd.current + delta;
1609
+ if (newStart < minPosition) {
1610
+ newStart = minPosition;
1611
+ newEnd = minPosition + regionWidth;
1612
+ }
1613
+ if (newEnd > maxPosition) {
1614
+ newEnd = maxPosition;
1615
+ newStart = maxPosition - regionWidth;
1616
+ }
1617
+ onLoopRegionMove?.(newStart, newEnd);
1618
+ };
1619
+ const handleMouseUp = () => {
1620
+ setDraggingMarker(null);
1621
+ document.removeEventListener("mousemove", handleMouseMove);
1622
+ document.removeEventListener("mouseup", handleMouseUp);
1623
+ };
1624
+ document.addEventListener("mousemove", handleMouseMove);
1625
+ document.addEventListener("mouseup", handleMouseUp);
1626
+ }, [startPosition, endPosition, minPosition, maxPosition, onLoopRegionMove]);
1627
+ if (width <= 0) {
1628
+ return null;
1629
+ }
1630
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1631
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1632
+ TimescaleLoopShade,
1633
+ {
1634
+ $left: startPosition,
1635
+ $width: width,
1636
+ $color: regionColor,
1637
+ $isDragging: draggingMarker === "region",
1638
+ onMouseDown: handleRegionMouseDown,
1639
+ "data-loop-region-timescale": true
1640
+ }
1641
+ ),
1642
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1643
+ DraggableMarkerHandle,
1644
+ {
1645
+ $left: startPosition,
1646
+ $color: markerColor,
1647
+ $isStart: true,
1648
+ $isDragging: draggingMarker === "start",
1649
+ onMouseDown: (e) => handleMarkerMouseDown(e, "start"),
1650
+ "data-loop-marker-handle": "start"
1651
+ }
1652
+ ),
1653
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1654
+ DraggableMarkerHandle,
1655
+ {
1656
+ $left: endPosition,
1657
+ $color: markerColor,
1658
+ $isStart: false,
1659
+ $isDragging: draggingMarker === "end",
1660
+ onMouseDown: (e) => handleMarkerMouseDown(e, "end"),
1661
+ "data-loop-marker-handle": "end"
1662
+ }
1663
+ )
1664
+ ] });
1665
+ };
1666
+ var TimescaleLoopCreator = import_styled_components18.default.div.attrs((props) => ({
1667
+ style: {
1668
+ left: `${props.$leftOffset || 0}px`
1669
+ }
1670
+ }))`
1671
+ position: absolute;
1672
+ top: 0;
1673
+ right: 0;
1674
+ height: 100%; /* Stay within timescale bounds, don't extend into tracks */
1675
+ cursor: crosshair;
1676
+ z-index: 40; /* Below markers and shading */
1677
+ `;
1678
+ var TimescaleLoopRegion = ({
1679
+ startPosition,
1680
+ endPosition,
1681
+ markerColor = "#3b82f6",
1682
+ regionColor = "rgba(59, 130, 246, 0.3)",
1683
+ onLoopRegionChange,
1684
+ minPosition = 0,
1685
+ maxPosition = Infinity,
1686
+ controlsOffset = 0
1687
+ }) => {
1688
+ const [isCreating, setIsCreating] = (0, import_react4.useState)(false);
1689
+ const createStartX = (0, import_react4.useRef)(0);
1690
+ const containerRef = (0, import_react4.useRef)(null);
1691
+ const hasLoopRegion = endPosition > startPosition;
1692
+ const handleBackgroundMouseDown = (0, import_react4.useCallback)((e) => {
1693
+ const target = e.target;
1694
+ if (target.closest("[data-loop-marker-handle]") || target.closest("[data-loop-region-timescale]")) {
1695
+ return;
1696
+ }
1697
+ e.preventDefault();
1698
+ setIsCreating(true);
1699
+ const rect = containerRef.current?.getBoundingClientRect();
1700
+ if (!rect) return;
1701
+ const clickX = e.clientX - rect.left;
1702
+ const clampedX = Math.max(minPosition, Math.min(maxPosition, clickX));
1703
+ createStartX.current = clampedX;
1704
+ onLoopRegionChange?.(clampedX, clampedX);
1705
+ const handleMouseMove = (moveEvent) => {
1706
+ const currentX = moveEvent.clientX - rect.left;
1707
+ const clampedCurrentX = Math.max(minPosition, Math.min(maxPosition, currentX));
1708
+ const newStart = Math.min(createStartX.current, clampedCurrentX);
1709
+ const newEnd = Math.max(createStartX.current, clampedCurrentX);
1710
+ onLoopRegionChange?.(newStart, newEnd);
1711
+ };
1712
+ const handleMouseUp = () => {
1713
+ setIsCreating(false);
1714
+ document.removeEventListener("mousemove", handleMouseMove);
1715
+ document.removeEventListener("mouseup", handleMouseUp);
1716
+ };
1717
+ document.addEventListener("mousemove", handleMouseMove);
1718
+ document.addEventListener("mouseup", handleMouseUp);
1719
+ }, [minPosition, maxPosition, onLoopRegionChange]);
1720
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1721
+ TimescaleLoopCreator,
1722
+ {
1723
+ ref: containerRef,
1724
+ $leftOffset: controlsOffset,
1725
+ onMouseDown: handleBackgroundMouseDown,
1726
+ "data-timescale-loop-creator": true,
1727
+ children: hasLoopRegion && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1728
+ LoopRegionMarkers,
1729
+ {
1730
+ startPosition,
1731
+ endPosition,
1732
+ markerColor,
1733
+ regionColor,
1734
+ minPosition,
1735
+ maxPosition,
1736
+ onLoopStartChange: (newStart) => onLoopRegionChange?.(newStart, endPosition),
1737
+ onLoopEndChange: (newEnd) => onLoopRegionChange?.(startPosition, newEnd),
1738
+ onLoopRegionMove: (newStart, newEnd) => onLoopRegionChange?.(newStart, newEnd)
1739
+ }
1740
+ )
1741
+ }
1742
+ );
1743
+ };
1744
+
1400
1745
  // src/components/SelectionTimeInputs.tsx
1401
- var import_react5 = require("react");
1746
+ var import_react6 = require("react");
1402
1747
 
1403
1748
  // src/components/TimeInput.tsx
1404
- var import_react4 = require("react");
1749
+ var import_react5 = require("react");
1405
1750
 
1406
1751
  // src/utils/timeFormat.ts
1407
1752
  function clockFormat(seconds, decimals) {
@@ -1451,7 +1796,7 @@ function parseTime(timeStr, format) {
1451
1796
  }
1452
1797
 
1453
1798
  // src/components/TimeInput.tsx
1454
- var import_jsx_runtime12 = require("react/jsx-runtime");
1799
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1455
1800
  var TimeInput = ({
1456
1801
  id,
1457
1802
  label,
@@ -1461,8 +1806,8 @@ var TimeInput = ({
1461
1806
  onChange,
1462
1807
  readOnly = false
1463
1808
  }) => {
1464
- const [displayValue, setDisplayValue] = (0, import_react4.useState)("");
1465
- (0, import_react4.useEffect)(() => {
1809
+ const [displayValue, setDisplayValue] = (0, import_react5.useState)("");
1810
+ (0, import_react5.useEffect)(() => {
1466
1811
  const formatted = formatTime(value, format);
1467
1812
  setDisplayValue(formatted);
1468
1813
  }, [value, format, id]);
@@ -1482,9 +1827,9 @@ var TimeInput = ({
1482
1827
  e.currentTarget.blur();
1483
1828
  }
1484
1829
  };
1485
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1486
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScreenReaderOnly, { as: "label", htmlFor: id, children: label }),
1487
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1830
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1831
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ScreenReaderOnly, { as: "label", htmlFor: id, children: label }),
1832
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1488
1833
  BaseInput,
1489
1834
  {
1490
1835
  type: "text",
@@ -1501,15 +1846,15 @@ var TimeInput = ({
1501
1846
  };
1502
1847
 
1503
1848
  // src/components/SelectionTimeInputs.tsx
1504
- var import_jsx_runtime13 = require("react/jsx-runtime");
1849
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1505
1850
  var SelectionTimeInputs = ({
1506
1851
  selectionStart,
1507
1852
  selectionEnd,
1508
1853
  onSelectionChange,
1509
1854
  className
1510
1855
  }) => {
1511
- const [timeFormat, setTimeFormat] = (0, import_react5.useState)("hh:mm:ss.uuu");
1512
- (0, import_react5.useEffect)(() => {
1856
+ const [timeFormat, setTimeFormat] = (0, import_react6.useState)("hh:mm:ss.uuu");
1857
+ (0, import_react6.useEffect)(() => {
1513
1858
  const timeFormatSelect = document.querySelector(".time-format");
1514
1859
  const handleFormatChange = () => {
1515
1860
  if (timeFormatSelect) {
@@ -1534,8 +1879,8 @@ var SelectionTimeInputs = ({
1534
1879
  onSelectionChange(selectionStart, value);
1535
1880
  }
1536
1881
  };
1537
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1538
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1882
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1883
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1539
1884
  TimeInput,
1540
1885
  {
1541
1886
  id: "audio_start",
@@ -1546,7 +1891,7 @@ var SelectionTimeInputs = ({
1546
1891
  onChange: handleStartChange
1547
1892
  }
1548
1893
  ),
1549
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1894
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1550
1895
  TimeInput,
1551
1896
  {
1552
1897
  id: "audio_end",
@@ -1561,14 +1906,14 @@ var SelectionTimeInputs = ({
1561
1906
  };
1562
1907
 
1563
1908
  // src/contexts/DevicePixelRatio.tsx
1564
- var import_react6 = require("react");
1565
- var import_jsx_runtime14 = require("react/jsx-runtime");
1909
+ var import_react7 = require("react");
1910
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1566
1911
  function getScale() {
1567
1912
  return window.devicePixelRatio;
1568
1913
  }
1569
- var DevicePixelRatioContext = (0, import_react6.createContext)(getScale());
1914
+ var DevicePixelRatioContext = (0, import_react7.createContext)(getScale());
1570
1915
  var DevicePixelRatioProvider = ({ children }) => {
1571
- const [scale, setScale] = (0, import_react6.useState)(getScale());
1916
+ const [scale, setScale] = (0, import_react7.useState)(getScale());
1572
1917
  matchMedia(`(resolution: ${getScale()}dppx)`).addEventListener(
1573
1918
  "change",
1574
1919
  () => {
@@ -1576,13 +1921,13 @@ var DevicePixelRatioProvider = ({ children }) => {
1576
1921
  },
1577
1922
  { once: true }
1578
1923
  );
1579
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DevicePixelRatioContext.Provider, { value: Math.ceil(scale), children });
1924
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DevicePixelRatioContext.Provider, { value: Math.ceil(scale), children });
1580
1925
  };
1581
- var useDevicePixelRatio = () => (0, import_react6.useContext)(DevicePixelRatioContext);
1926
+ var useDevicePixelRatio = () => (0, import_react7.useContext)(DevicePixelRatioContext);
1582
1927
 
1583
1928
  // src/contexts/PlaylistInfo.tsx
1584
- var import_react7 = require("react");
1585
- var PlaylistInfoContext = (0, import_react7.createContext)({
1929
+ var import_react8 = require("react");
1930
+ var PlaylistInfoContext = (0, import_react8.createContext)({
1586
1931
  sampleRate: 48e3,
1587
1932
  samplesPerPixel: 1e3,
1588
1933
  zoomLevels: [1e3, 1500, 2e3, 2500],
@@ -1596,22 +1941,22 @@ var PlaylistInfoContext = (0, import_react7.createContext)({
1596
1941
  barWidth: 1,
1597
1942
  barGap: 0
1598
1943
  });
1599
- var usePlaylistInfo = () => (0, import_react7.useContext)(PlaylistInfoContext);
1944
+ var usePlaylistInfo = () => (0, import_react8.useContext)(PlaylistInfoContext);
1600
1945
 
1601
1946
  // src/contexts/Theme.tsx
1602
- var import_react8 = require("react");
1603
- var import_styled_components18 = require("styled-components");
1604
- var useTheme2 = () => (0, import_react8.useContext)(import_styled_components18.ThemeContext);
1605
-
1606
- // src/contexts/TrackControls.tsx
1607
1947
  var import_react9 = require("react");
1608
- var import_jsx_runtime15 = require("react/jsx-runtime");
1609
- var TrackControlsContext = (0, import_react9.createContext)(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react9.Fragment, {}));
1610
- var useTrackControls = () => (0, import_react9.useContext)(TrackControlsContext);
1948
+ var import_styled_components19 = require("styled-components");
1949
+ var useTheme2 = () => (0, import_react9.useContext)(import_styled_components19.ThemeContext);
1611
1950
 
1612
- // src/contexts/Playout.tsx
1951
+ // src/contexts/TrackControls.tsx
1613
1952
  var import_react10 = require("react");
1614
1953
  var import_jsx_runtime16 = require("react/jsx-runtime");
1954
+ var TrackControlsContext = (0, import_react10.createContext)(/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react10.Fragment, {}));
1955
+ var useTrackControls = () => (0, import_react10.useContext)(TrackControlsContext);
1956
+
1957
+ // src/contexts/Playout.tsx
1958
+ var import_react11 = require("react");
1959
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1615
1960
  var defaultProgress = 0;
1616
1961
  var defaultIsPlaying = false;
1617
1962
  var defaultSelectionStart = 0;
@@ -1622,8 +1967,8 @@ var defaultPlayout = {
1622
1967
  selectionStart: defaultSelectionStart,
1623
1968
  selectionEnd: defaultSelectionEnd
1624
1969
  };
1625
- var PlayoutStatusContext = (0, import_react10.createContext)(defaultPlayout);
1626
- var PlayoutStatusUpdateContext = (0, import_react10.createContext)({
1970
+ var PlayoutStatusContext = (0, import_react11.createContext)(defaultPlayout);
1971
+ var PlayoutStatusUpdateContext = (0, import_react11.createContext)({
1627
1972
  setIsPlaying: () => {
1628
1973
  },
1629
1974
  setProgress: () => {
@@ -1632,21 +1977,21 @@ var PlayoutStatusUpdateContext = (0, import_react10.createContext)({
1632
1977
  }
1633
1978
  });
1634
1979
  var PlayoutProvider = ({ children }) => {
1635
- const [isPlaying, setIsPlaying] = (0, import_react10.useState)(defaultIsPlaying);
1636
- const [progress, setProgress] = (0, import_react10.useState)(defaultProgress);
1637
- const [selectionStart, setSelectionStart] = (0, import_react10.useState)(defaultSelectionStart);
1638
- const [selectionEnd, setSelectionEnd] = (0, import_react10.useState)(defaultSelectionEnd);
1980
+ const [isPlaying, setIsPlaying] = (0, import_react11.useState)(defaultIsPlaying);
1981
+ const [progress, setProgress] = (0, import_react11.useState)(defaultProgress);
1982
+ const [selectionStart, setSelectionStart] = (0, import_react11.useState)(defaultSelectionStart);
1983
+ const [selectionEnd, setSelectionEnd] = (0, import_react11.useState)(defaultSelectionEnd);
1639
1984
  const setSelection = (start, end) => {
1640
1985
  setSelectionStart(start);
1641
1986
  setSelectionEnd(end);
1642
1987
  };
1643
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PlayoutStatusUpdateContext.Provider, { value: { setIsPlaying, setProgress, setSelection }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PlayoutStatusContext.Provider, { value: { isPlaying, progress, selectionStart, selectionEnd }, children }) });
1988
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PlayoutStatusUpdateContext.Provider, { value: { setIsPlaying, setProgress, setSelection }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PlayoutStatusContext.Provider, { value: { isPlaying, progress, selectionStart, selectionEnd }, children }) });
1644
1989
  };
1645
- var usePlayoutStatus = () => (0, import_react10.useContext)(PlayoutStatusContext);
1646
- var usePlayoutStatusUpdate = () => (0, import_react10.useContext)(PlayoutStatusUpdateContext);
1990
+ var usePlayoutStatus = () => (0, import_react11.useContext)(PlayoutStatusContext);
1991
+ var usePlayoutStatusUpdate = () => (0, import_react11.useContext)(PlayoutStatusUpdateContext);
1647
1992
 
1648
1993
  // src/components/SmartChannel.tsx
1649
- var import_jsx_runtime17 = require("react/jsx-runtime");
1994
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1650
1995
  var SmartChannel = ({ isSelected, transparentBackground, ...props }) => {
1651
1996
  const theme = useTheme2();
1652
1997
  const { waveHeight, barWidth, barGap } = usePlaylistInfo();
@@ -1654,7 +1999,7 @@ var SmartChannel = ({ isSelected, transparentBackground, ...props }) => {
1654
1999
  const waveOutlineColor = isSelected && theme ? theme.selectedWaveOutlineColor : theme?.waveOutlineColor;
1655
2000
  const waveFillColor = isSelected && theme ? theme.selectedWaveFillColor : theme?.waveFillColor;
1656
2001
  const drawMode = theme?.waveformDrawMode || "inverted";
1657
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2002
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1658
2003
  Channel,
1659
2004
  {
1660
2005
  ...props,
@@ -1672,11 +2017,11 @@ var SmartChannel = ({ isSelected, transparentBackground, ...props }) => {
1672
2017
  };
1673
2018
 
1674
2019
  // src/components/SmartScale.tsx
1675
- var import_react12 = require("react");
2020
+ var import_react13 = require("react");
1676
2021
 
1677
2022
  // src/components/TimeScale.tsx
1678
- var import_react11 = __toESM(require("react"));
1679
- var import_styled_components19 = __toESM(require("styled-components"));
2023
+ var import_react12 = __toESM(require("react"));
2024
+ var import_styled_components20 = __toESM(require("styled-components"));
1680
2025
 
1681
2026
  // src/utils/conversions.ts
1682
2027
  function samplesToSeconds(samples, sampleRate) {
@@ -1699,14 +2044,14 @@ function secondsToPixels(seconds, samplesPerPixel, sampleRate) {
1699
2044
  }
1700
2045
 
1701
2046
  // src/components/TimeScale.tsx
1702
- var import_jsx_runtime18 = require("react/jsx-runtime");
2047
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1703
2048
  function formatTime2(milliseconds) {
1704
2049
  const seconds = Math.floor(milliseconds / 1e3);
1705
2050
  const s = seconds % 60;
1706
2051
  const m = (seconds - s) / 60;
1707
2052
  return `${m}:${String(s).padStart(2, "0")}`;
1708
2053
  }
1709
- var PlaylistTimeScaleScroll = import_styled_components19.default.div.attrs((props) => ({
2054
+ var PlaylistTimeScaleScroll = import_styled_components20.default.div.attrs((props) => ({
1710
2055
  style: {
1711
2056
  width: `${props.$cssWidth}px`,
1712
2057
  marginLeft: `${props.$controlWidth}px`,
@@ -1718,7 +2063,7 @@ var PlaylistTimeScaleScroll = import_styled_components19.default.div.attrs((prop
1718
2063
  border-bottom: 1px solid ${(props) => props.theme.timeColor};
1719
2064
  box-sizing: border-box;
1720
2065
  `;
1721
- var TimeTicks = import_styled_components19.default.canvas.attrs((props) => ({
2066
+ var TimeTicks = import_styled_components20.default.canvas.attrs((props) => ({
1722
2067
  style: {
1723
2068
  width: `${props.$cssWidth}px`,
1724
2069
  height: `${props.$timeScaleHeight}px`
@@ -1729,7 +2074,7 @@ var TimeTicks = import_styled_components19.default.canvas.attrs((props) => ({
1729
2074
  right: 0;
1730
2075
  bottom: 0;
1731
2076
  `;
1732
- var TimeStamp = import_styled_components19.default.div.attrs((props) => ({
2077
+ var TimeStamp = import_styled_components20.default.div.attrs((props) => ({
1733
2078
  style: {
1734
2079
  left: `${props.$left + 4}px`
1735
2080
  // Offset 4px to the right of the tick
@@ -1751,15 +2096,15 @@ var TimeScale = (props) => {
1751
2096
  } = props;
1752
2097
  const canvasInfo = /* @__PURE__ */ new Map();
1753
2098
  const timeMarkers = [];
1754
- const canvasRef = (0, import_react11.useRef)(null);
2099
+ const canvasRef = (0, import_react12.useRef)(null);
1755
2100
  const {
1756
2101
  sampleRate,
1757
2102
  samplesPerPixel,
1758
2103
  timeScaleHeight,
1759
2104
  controls: { show: showControls, width: controlWidth }
1760
- } = (0, import_react11.useContext)(PlaylistInfoContext);
2105
+ } = (0, import_react12.useContext)(PlaylistInfoContext);
1761
2106
  const devicePixelRatio = useDevicePixelRatio();
1762
- (0, import_react11.useEffect)(() => {
2107
+ (0, import_react12.useEffect)(() => {
1763
2108
  if (canvasRef.current !== null) {
1764
2109
  const canvas = canvasRef.current;
1765
2110
  const ctx = canvas.getContext("2d");
@@ -1793,7 +2138,7 @@ var TimeScale = (props) => {
1793
2138
  if (counter % marker === 0) {
1794
2139
  const timeMs = counter;
1795
2140
  const timestamp = formatTime2(timeMs);
1796
- const timestampContent = renderTimestamp ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react11.default.Fragment, { children: renderTimestamp(timeMs, pix) }, `timestamp-${counter}`) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TimeStamp, { $left: pix, children: timestamp }, timestamp);
2141
+ const timestampContent = renderTimestamp ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react12.default.Fragment, { children: renderTimestamp(timeMs, pix) }, `timestamp-${counter}`) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TimeStamp, { $left: pix, children: timestamp }, timestamp);
1797
2142
  timeMarkers.push(timestampContent);
1798
2143
  canvasInfo.set(pix, timeScaleHeight);
1799
2144
  } else if (counter % bigStep === 0) {
@@ -1803,7 +2148,7 @@ var TimeScale = (props) => {
1803
2148
  }
1804
2149
  counter += secondStep;
1805
2150
  }
1806
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2151
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1807
2152
  PlaylistTimeScaleScroll,
1808
2153
  {
1809
2154
  $cssWidth: widthX,
@@ -1811,7 +2156,7 @@ var TimeScale = (props) => {
1811
2156
  $timeScaleHeight: timeScaleHeight,
1812
2157
  children: [
1813
2158
  timeMarkers,
1814
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2159
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1815
2160
  TimeTicks,
1816
2161
  {
1817
2162
  $cssWidth: widthX,
@@ -1825,10 +2170,10 @@ var TimeScale = (props) => {
1825
2170
  }
1826
2171
  );
1827
2172
  };
1828
- var StyledTimeScale = (0, import_styled_components19.withTheme)(TimeScale);
2173
+ var StyledTimeScale = (0, import_styled_components20.withTheme)(TimeScale);
1829
2174
 
1830
2175
  // src/components/SmartScale.tsx
1831
- var import_jsx_runtime19 = require("react/jsx-runtime");
2176
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1832
2177
  var timeinfo = /* @__PURE__ */ new Map([
1833
2178
  [
1834
2179
  700,
@@ -1902,9 +2247,9 @@ function getScaleInfo(samplesPerPixel) {
1902
2247
  return config;
1903
2248
  }
1904
2249
  var SmartScale = () => {
1905
- const { samplesPerPixel, duration } = (0, import_react12.useContext)(PlaylistInfoContext);
2250
+ const { samplesPerPixel, duration } = (0, import_react13.useContext)(PlaylistInfoContext);
1906
2251
  let config = getScaleInfo(samplesPerPixel);
1907
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2252
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1908
2253
  StyledTimeScale,
1909
2254
  {
1910
2255
  marker: config.marker,
@@ -1916,9 +2261,9 @@ var SmartScale = () => {
1916
2261
  };
1917
2262
 
1918
2263
  // src/components/TimeFormatSelect.tsx
1919
- var import_styled_components20 = __toESM(require("styled-components"));
1920
- var import_jsx_runtime20 = require("react/jsx-runtime");
1921
- var SelectWrapper = import_styled_components20.default.div`
2264
+ var import_styled_components21 = __toESM(require("styled-components"));
2265
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2266
+ var SelectWrapper = import_styled_components21.default.div`
1922
2267
  display: inline-flex;
1923
2268
  align-items: center;
1924
2269
  gap: 0.5rem;
@@ -1940,7 +2285,7 @@ var TimeFormatSelect = ({
1940
2285
  const handleChange = (e) => {
1941
2286
  onChange(e.target.value);
1942
2287
  };
1943
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectWrapper, { className, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2288
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectWrapper, { className, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1944
2289
  BaseSelect,
1945
2290
  {
1946
2291
  className: "time-format",
@@ -1948,15 +2293,15 @@ var TimeFormatSelect = ({
1948
2293
  onChange: handleChange,
1949
2294
  disabled,
1950
2295
  "aria-label": "Time format selection",
1951
- children: TIME_FORMAT_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: option.value, children: option.label }, option.value))
2296
+ children: TIME_FORMAT_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: option.value, children: option.label }, option.value))
1952
2297
  }
1953
2298
  ) });
1954
2299
  };
1955
2300
 
1956
2301
  // src/components/Track.tsx
1957
- var import_styled_components21 = __toESM(require("styled-components"));
1958
- var import_jsx_runtime21 = require("react/jsx-runtime");
1959
- var Container = import_styled_components21.default.div.attrs((props) => ({
2302
+ var import_styled_components22 = __toESM(require("styled-components"));
2303
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2304
+ var Container = import_styled_components22.default.div.attrs((props) => ({
1960
2305
  style: {
1961
2306
  height: `${props.$waveHeight * props.$numChannels + (props.$hasClipHeaders ? CLIP_HEADER_HEIGHT : 0)}px`
1962
2307
  }
@@ -1965,7 +2310,7 @@ var Container = import_styled_components21.default.div.attrs((props) => ({
1965
2310
  display: flex;
1966
2311
  ${(props) => props.$width !== void 0 && `width: ${props.$width}px;`}
1967
2312
  `;
1968
- var ChannelContainer = import_styled_components21.default.div.attrs((props) => ({
2313
+ var ChannelContainer = import_styled_components22.default.div.attrs((props) => ({
1969
2314
  style: {
1970
2315
  paddingLeft: `${props.$offset || 0}px`
1971
2316
  }
@@ -1974,7 +2319,7 @@ var ChannelContainer = import_styled_components21.default.div.attrs((props) => (
1974
2319
  background: ${(props) => props.$backgroundColor || "transparent"};
1975
2320
  flex: 1;
1976
2321
  `;
1977
- var ControlsWrapper = import_styled_components21.default.div.attrs((props) => ({
2322
+ var ControlsWrapper = import_styled_components22.default.div.attrs((props) => ({
1978
2323
  style: {
1979
2324
  width: `${props.$controlWidth}px`
1980
2325
  }
@@ -2010,7 +2355,7 @@ var Track = ({
2010
2355
  controls: { show, width: controlWidth }
2011
2356
  } = usePlaylistInfo();
2012
2357
  const controls = useTrackControls();
2013
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2358
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2014
2359
  Container,
2015
2360
  {
2016
2361
  $numChannels: numChannels,
@@ -2021,7 +2366,7 @@ var Track = ({
2021
2366
  $hasClipHeaders: hasClipHeaders,
2022
2367
  $isSelected: isSelected,
2023
2368
  children: [
2024
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2369
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2025
2370
  ControlsWrapper,
2026
2371
  {
2027
2372
  $controlWidth: show ? controlWidth : 0,
@@ -2029,7 +2374,7 @@ var Track = ({
2029
2374
  children: controls
2030
2375
  }
2031
2376
  ),
2032
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2377
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2033
2378
  ChannelContainer,
2034
2379
  {
2035
2380
  $controlWidth: show ? controlWidth : 0,
@@ -2046,8 +2391,8 @@ var Track = ({
2046
2391
  };
2047
2392
 
2048
2393
  // src/components/TrackControls/Button.tsx
2049
- var import_styled_components22 = __toESM(require("styled-components"));
2050
- var Button = import_styled_components22.default.button.attrs({
2394
+ var import_styled_components23 = __toESM(require("styled-components"));
2395
+ var Button = import_styled_components23.default.button.attrs({
2051
2396
  type: "button"
2052
2397
  })`
2053
2398
  display: inline-block;
@@ -2119,8 +2464,8 @@ var Button = import_styled_components22.default.button.attrs({
2119
2464
  `;
2120
2465
 
2121
2466
  // src/components/TrackControls/ButtonGroup.tsx
2122
- var import_styled_components23 = __toESM(require("styled-components"));
2123
- var ButtonGroup = import_styled_components23.default.div`
2467
+ var import_styled_components24 = __toESM(require("styled-components"));
2468
+ var ButtonGroup = import_styled_components24.default.div`
2124
2469
  margin-bottom: 0.3rem;
2125
2470
 
2126
2471
  button:not(:first-child) {
@@ -2135,8 +2480,8 @@ var ButtonGroup = import_styled_components23.default.div`
2135
2480
  `;
2136
2481
 
2137
2482
  // src/components/TrackControls/Controls.tsx
2138
- var import_styled_components24 = __toESM(require("styled-components"));
2139
- var Controls = import_styled_components24.default.div`
2483
+ var import_styled_components25 = __toESM(require("styled-components"));
2484
+ var Controls = import_styled_components25.default.div`
2140
2485
  background: transparent;
2141
2486
  width: 100%;
2142
2487
  height: 100%;
@@ -2152,8 +2497,8 @@ var Controls = import_styled_components24.default.div`
2152
2497
  `;
2153
2498
 
2154
2499
  // src/components/TrackControls/Header.tsx
2155
- var import_styled_components25 = __toESM(require("styled-components"));
2156
- var Header = import_styled_components25.default.header`
2500
+ var import_styled_components26 = __toESM(require("styled-components"));
2501
+ var Header = import_styled_components26.default.header`
2157
2502
  overflow: hidden;
2158
2503
  height: 26px;
2159
2504
  width: 100%;
@@ -2167,23 +2512,23 @@ var Header = import_styled_components25.default.header`
2167
2512
  `;
2168
2513
 
2169
2514
  // src/components/TrackControls/VolumeDownIcon.tsx
2170
- var import_react13 = require("@phosphor-icons/react");
2171
- var import_jsx_runtime22 = require("react/jsx-runtime");
2172
- var VolumeDownIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react13.SpeakerLowIcon, { weight: "light", ...props });
2173
-
2174
- // src/components/TrackControls/VolumeUpIcon.tsx
2175
2515
  var import_react14 = require("@phosphor-icons/react");
2176
2516
  var import_jsx_runtime23 = require("react/jsx-runtime");
2177
- var VolumeUpIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react14.SpeakerHighIcon, { weight: "light", ...props });
2517
+ var VolumeDownIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react14.SpeakerLowIcon, { weight: "light", ...props });
2178
2518
 
2179
- // src/components/TrackControls/TrashIcon.tsx
2519
+ // src/components/TrackControls/VolumeUpIcon.tsx
2180
2520
  var import_react15 = require("@phosphor-icons/react");
2181
2521
  var import_jsx_runtime24 = require("react/jsx-runtime");
2182
- var TrashIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react15.TrashIcon, { weight: "light", ...props });
2522
+ var VolumeUpIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react15.SpeakerHighIcon, { weight: "light", ...props });
2523
+
2524
+ // src/components/TrackControls/TrashIcon.tsx
2525
+ var import_react16 = require("@phosphor-icons/react");
2526
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2527
+ var TrashIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react16.TrashIcon, { weight: "light", ...props });
2183
2528
 
2184
2529
  // src/components/TrackControls/Slider.tsx
2185
- var import_styled_components26 = __toESM(require("styled-components"));
2186
- var Slider = (0, import_styled_components26.default)(BaseSlider)`
2530
+ var import_styled_components27 = __toESM(require("styled-components"));
2531
+ var Slider = (0, import_styled_components27.default)(BaseSlider)`
2187
2532
  width: 75%;
2188
2533
  height: 5px;
2189
2534
  background: ${(props) => props.theme.sliderTrackColor};
@@ -2235,8 +2580,8 @@ var Slider = (0, import_styled_components26.default)(BaseSlider)`
2235
2580
  `;
2236
2581
 
2237
2582
  // src/components/TrackControls/SliderWrapper.tsx
2238
- var import_styled_components27 = __toESM(require("styled-components"));
2239
- var SliderWrapper = import_styled_components27.default.label`
2583
+ var import_styled_components28 = __toESM(require("styled-components"));
2584
+ var SliderWrapper = import_styled_components28.default.label`
2240
2585
  width: 100%;
2241
2586
  display: flex;
2242
2587
  justify-content: space-between;
@@ -2247,15 +2592,15 @@ var SliderWrapper = import_styled_components27.default.label`
2247
2592
  `;
2248
2593
 
2249
2594
  // src/components/TrackControlsWithDelete.tsx
2250
- var import_styled_components28 = __toESM(require("styled-components"));
2251
- var import_jsx_runtime25 = require("react/jsx-runtime");
2252
- var HeaderContainer2 = import_styled_components28.default.div`
2595
+ var import_styled_components29 = __toESM(require("styled-components"));
2596
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2597
+ var HeaderContainer2 = import_styled_components29.default.div`
2253
2598
  display: flex;
2254
2599
  align-items: center;
2255
2600
  gap: 0.25rem;
2256
2601
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
2257
2602
  `;
2258
- var TrackNameSpan = import_styled_components28.default.span`
2603
+ var TrackNameSpan = import_styled_components29.default.span`
2259
2604
  flex: 1;
2260
2605
  font-weight: 600;
2261
2606
  font-size: 0.875rem;
@@ -2264,7 +2609,7 @@ var TrackNameSpan = import_styled_components28.default.span`
2264
2609
  white-space: nowrap;
2265
2610
  margin: 0 0.25rem;
2266
2611
  `;
2267
- var DeleteIconButton = import_styled_components28.default.button`
2612
+ var DeleteIconButton = import_styled_components29.default.button`
2268
2613
  display: flex;
2269
2614
  align-items: center;
2270
2615
  justify-content: center;
@@ -2302,13 +2647,13 @@ var TrackControlsWithDelete = ({
2302
2647
  onPanChange,
2303
2648
  onDelete
2304
2649
  }) => {
2305
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Controls, { children: [
2306
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(HeaderContainer2, { children: [
2307
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DeleteIconButton, { onClick: onDelete, title: "Delete track", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TrashIcon, {}) }),
2308
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TrackNameSpan, { children: trackName })
2650
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Controls, { children: [
2651
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(HeaderContainer2, { children: [
2652
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeleteIconButton, { onClick: onDelete, title: "Delete track", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TrashIcon, {}) }),
2653
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TrackNameSpan, { children: trackName })
2309
2654
  ] }),
2310
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ButtonGroup, { children: [
2311
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2655
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ButtonGroup, { children: [
2656
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2312
2657
  Button,
2313
2658
  {
2314
2659
  $variant: muted ? "danger" : "outline",
@@ -2316,7 +2661,7 @@ var TrackControlsWithDelete = ({
2316
2661
  children: "Mute"
2317
2662
  }
2318
2663
  ),
2319
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2664
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2320
2665
  Button,
2321
2666
  {
2322
2667
  $variant: soloed ? "info" : "outline",
@@ -2325,9 +2670,9 @@ var TrackControlsWithDelete = ({
2325
2670
  }
2326
2671
  )
2327
2672
  ] }),
2328
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(SliderWrapper, { children: [
2329
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VolumeDownIcon, {}),
2330
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2673
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(SliderWrapper, { children: [
2674
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VolumeDownIcon, {}),
2675
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2331
2676
  Slider,
2332
2677
  {
2333
2678
  min: "0",
@@ -2337,11 +2682,11 @@ var TrackControlsWithDelete = ({
2337
2682
  onChange: (e) => onVolumeChange(parseFloat(e.target.value))
2338
2683
  }
2339
2684
  ),
2340
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VolumeUpIcon, {})
2685
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VolumeUpIcon, {})
2341
2686
  ] }),
2342
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(SliderWrapper, { children: [
2343
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "L" }),
2344
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2687
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(SliderWrapper, { children: [
2688
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "L" }),
2689
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2345
2690
  Slider,
2346
2691
  {
2347
2692
  min: "-1",
@@ -2351,7 +2696,7 @@ var TrackControlsWithDelete = ({
2351
2696
  onChange: (e) => onPanChange(parseFloat(e.target.value))
2352
2697
  }
2353
2698
  ),
2354
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "R" })
2699
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "R" })
2355
2700
  ] })
2356
2701
  ] });
2357
2702
  };
@@ -2383,6 +2728,8 @@ var TrackControlsWithDelete = ({
2383
2728
  FadeOverlay,
2384
2729
  Header,
2385
2730
  InlineLabel,
2731
+ LoopRegion,
2732
+ LoopRegionMarkers,
2386
2733
  MasterVolumeControl,
2387
2734
  Playhead,
2388
2735
  PlayheadWithMarker,
@@ -2401,6 +2748,7 @@ var TrackControlsWithDelete = ({
2401
2748
  TimeFormatSelect,
2402
2749
  TimeInput,
2403
2750
  TimeScale,
2751
+ TimescaleLoopRegion,
2404
2752
  Track,
2405
2753
  TrackControlsContext,
2406
2754
  TrackControlsWithDelete,