@industry-theme/backlogmd-kanban-panel 1.1.16 → 1.2.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.
@@ -466,7 +466,7 @@ function Accessibility(_ref) {
466
466
  }));
467
467
  return container ? createPortal(markup, container) : markup;
468
468
  }
469
- var Action$1;
469
+ var Action;
470
470
  (function(Action2) {
471
471
  Action2["DragStart"] = "dragStart";
472
472
  Action2["DragMove"] = "dragMove";
@@ -476,7 +476,7 @@ var Action$1;
476
476
  Action2["RegisterDroppable"] = "registerDroppable";
477
477
  Action2["SetDroppableDisabled"] = "setDroppableDisabled";
478
478
  Action2["UnregisterDroppable"] = "unregisterDroppable";
479
- })(Action$1 || (Action$1 = {}));
479
+ })(Action || (Action = {}));
480
480
  function noop() {
481
481
  }
482
482
  function useSensor(sensor, options) {
@@ -499,7 +499,7 @@ function useSensors() {
499
499
  [...sensors]
500
500
  );
501
501
  }
502
- const defaultCoordinates$1 = /* @__PURE__ */ Object.freeze({
502
+ const defaultCoordinates = /* @__PURE__ */ Object.freeze({
503
503
  x: 0,
504
504
  y: 0
505
505
  });
@@ -588,7 +588,7 @@ function getRectDelta(rect1, rect2) {
588
588
  return rect1 && rect2 ? {
589
589
  x: rect1.left - rect2.left,
590
590
  y: rect1.top - rect2.top
591
- } : defaultCoordinates$1;
591
+ } : defaultCoordinates;
592
592
  }
593
593
  function createRectAdjustmentFn(modifier) {
594
594
  return function adjustClientRect(rect) {
@@ -794,11 +794,11 @@ function getScrollCoordinates(element2) {
794
794
  y: getScrollYCoordinate(element2)
795
795
  };
796
796
  }
797
- var Direction$1;
797
+ var Direction;
798
798
  (function(Direction2) {
799
799
  Direction2[Direction2["Forward"] = 1] = "Forward";
800
800
  Direction2[Direction2["Backward"] = -1] = "Backward";
801
- })(Direction$1 || (Direction$1 = {}));
801
+ })(Direction || (Direction = {}));
802
802
  function isDocumentScrollingElement(element2) {
803
803
  if (!canUseDOM || !element2) {
804
804
  return false;
@@ -870,17 +870,17 @@ function getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref,
870
870
  width: scrollContainerRect.width * thresholdPercentage.x
871
871
  };
872
872
  if (!isTop && top <= scrollContainerRect.top + threshold.height) {
873
- direction.y = Direction$1.Backward;
873
+ direction.y = Direction.Backward;
874
874
  speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);
875
875
  } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {
876
- direction.y = Direction$1.Forward;
876
+ direction.y = Direction.Forward;
877
877
  speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);
878
878
  }
879
879
  if (!isRight && right >= scrollContainerRect.right - threshold.width) {
880
- direction.x = Direction$1.Forward;
880
+ direction.x = Direction.Forward;
881
881
  speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);
882
882
  } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {
883
- direction.x = Direction$1.Backward;
883
+ direction.x = Direction.Backward;
884
884
  speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);
885
885
  }
886
886
  return {
@@ -921,7 +921,7 @@ function getScrollElementRect(element2) {
921
921
  function getScrollOffsets(scrollableAncestors) {
922
922
  return scrollableAncestors.reduce((acc, node2) => {
923
923
  return add(acc, getScrollCoordinates(node2));
924
- }, defaultCoordinates$1);
924
+ }, defaultCoordinates);
925
925
  }
926
926
  function getScrollXOffset(scrollableAncestors) {
927
927
  return scrollableAncestors.reduce((acc, node2) => {
@@ -1032,7 +1032,7 @@ function hasExceededDistance(delta, measurement) {
1032
1032
  }
1033
1033
  return false;
1034
1034
  }
1035
- var EventName$1;
1035
+ var EventName;
1036
1036
  (function(EventName2) {
1037
1037
  EventName2["Click"] = "click";
1038
1038
  EventName2["DragStart"] = "dragstart";
@@ -1041,14 +1041,14 @@ var EventName$1;
1041
1041
  EventName2["Resize"] = "resize";
1042
1042
  EventName2["SelectionChange"] = "selectionchange";
1043
1043
  EventName2["VisibilityChange"] = "visibilitychange";
1044
- })(EventName$1 || (EventName$1 = {}));
1044
+ })(EventName || (EventName = {}));
1045
1045
  function preventDefault(event) {
1046
1046
  event.preventDefault();
1047
1047
  }
1048
1048
  function stopPropagation(event) {
1049
1049
  event.stopPropagation();
1050
1050
  }
1051
- var KeyboardCode$1;
1051
+ var KeyboardCode;
1052
1052
  (function(KeyboardCode2) {
1053
1053
  KeyboardCode2["Space"] = "Space";
1054
1054
  KeyboardCode2["Down"] = "ArrowDown";
@@ -1058,33 +1058,33 @@ var KeyboardCode$1;
1058
1058
  KeyboardCode2["Esc"] = "Escape";
1059
1059
  KeyboardCode2["Enter"] = "Enter";
1060
1060
  KeyboardCode2["Tab"] = "Tab";
1061
- })(KeyboardCode$1 || (KeyboardCode$1 = {}));
1061
+ })(KeyboardCode || (KeyboardCode = {}));
1062
1062
  const defaultKeyboardCodes = {
1063
- start: [KeyboardCode$1.Space, KeyboardCode$1.Enter],
1064
- cancel: [KeyboardCode$1.Esc],
1065
- end: [KeyboardCode$1.Space, KeyboardCode$1.Enter, KeyboardCode$1.Tab]
1063
+ start: [KeyboardCode.Space, KeyboardCode.Enter],
1064
+ cancel: [KeyboardCode.Esc],
1065
+ end: [KeyboardCode.Space, KeyboardCode.Enter, KeyboardCode.Tab]
1066
1066
  };
1067
1067
  const defaultKeyboardCoordinateGetter = (event, _ref) => {
1068
1068
  let {
1069
1069
  currentCoordinates
1070
1070
  } = _ref;
1071
1071
  switch (event.code) {
1072
- case KeyboardCode$1.Right:
1072
+ case KeyboardCode.Right:
1073
1073
  return {
1074
1074
  ...currentCoordinates,
1075
1075
  x: currentCoordinates.x + 25
1076
1076
  };
1077
- case KeyboardCode$1.Left:
1077
+ case KeyboardCode.Left:
1078
1078
  return {
1079
1079
  ...currentCoordinates,
1080
1080
  x: currentCoordinates.x - 25
1081
1081
  };
1082
- case KeyboardCode$1.Down:
1082
+ case KeyboardCode.Down:
1083
1083
  return {
1084
1084
  ...currentCoordinates,
1085
1085
  y: currentCoordinates.y + 25
1086
1086
  };
1087
- case KeyboardCode$1.Up:
1087
+ case KeyboardCode.Up:
1088
1088
  return {
1089
1089
  ...currentCoordinates,
1090
1090
  y: currentCoordinates.y - 25
@@ -1114,9 +1114,9 @@ class KeyboardSensor {
1114
1114
  }
1115
1115
  attach() {
1116
1116
  this.handleStart();
1117
- this.windowListeners.add(EventName$1.Resize, this.handleCancel);
1118
- this.windowListeners.add(EventName$1.VisibilityChange, this.handleCancel);
1119
- setTimeout(() => this.listeners.add(EventName$1.Keydown, this.handleKeyDown));
1117
+ this.windowListeners.add(EventName.Resize, this.handleCancel);
1118
+ this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
1119
+ setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));
1120
1120
  }
1121
1121
  handleStart() {
1122
1122
  const {
@@ -1127,7 +1127,7 @@ class KeyboardSensor {
1127
1127
  if (node2) {
1128
1128
  scrollIntoViewIfNeeded(node2);
1129
1129
  }
1130
- onStart(defaultCoordinates$1);
1130
+ onStart(defaultCoordinates);
1131
1131
  }
1132
1132
  handleKeyDown(event) {
1133
1133
  if (isKeyboardEvent(event)) {
@@ -1158,7 +1158,7 @@ class KeyboardSensor {
1158
1158
  const currentCoordinates = collisionRect ? {
1159
1159
  x: collisionRect.left,
1160
1160
  y: collisionRect.top
1161
- } : defaultCoordinates$1;
1161
+ } : defaultCoordinates;
1162
1162
  if (!this.referenceCoordinates) {
1163
1163
  this.referenceCoordinates = currentCoordinates;
1164
1164
  }
@@ -1188,14 +1188,14 @@ class KeyboardSensor {
1188
1188
  } = getScrollPosition(scrollContainer);
1189
1189
  const scrollElementRect = getScrollElementRect(scrollContainer);
1190
1190
  const clampedCoordinates = {
1191
- x: Math.min(direction === KeyboardCode$1.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode$1.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),
1192
- y: Math.min(direction === KeyboardCode$1.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode$1.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))
1191
+ x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),
1192
+ y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))
1193
1193
  };
1194
- const canScrollX = direction === KeyboardCode$1.Right && !isRight || direction === KeyboardCode$1.Left && !isLeft;
1195
- const canScrollY = direction === KeyboardCode$1.Down && !isBottom || direction === KeyboardCode$1.Up && !isTop;
1194
+ const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;
1195
+ const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;
1196
1196
  if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {
1197
1197
  const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;
1198
- const canScrollToNewCoordinates = direction === KeyboardCode$1.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode$1.Left && newScrollCoordinates >= minScroll.x;
1198
+ const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;
1199
1199
  if (canScrollToNewCoordinates && !coordinatesDelta.y) {
1200
1200
  scrollContainer.scrollTo({
1201
1201
  left: newScrollCoordinates,
@@ -1206,7 +1206,7 @@ class KeyboardSensor {
1206
1206
  if (canScrollToNewCoordinates) {
1207
1207
  scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;
1208
1208
  } else {
1209
- scrollDelta.x = direction === KeyboardCode$1.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;
1209
+ scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;
1210
1210
  }
1211
1211
  if (scrollDelta.x) {
1212
1212
  scrollContainer.scrollBy({
@@ -1217,7 +1217,7 @@ class KeyboardSensor {
1217
1217
  break;
1218
1218
  } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {
1219
1219
  const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;
1220
- const canScrollToNewCoordinates = direction === KeyboardCode$1.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode$1.Up && newScrollCoordinates >= minScroll.y;
1220
+ const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;
1221
1221
  if (canScrollToNewCoordinates && !coordinatesDelta.x) {
1222
1222
  scrollContainer.scrollTo({
1223
1223
  top: newScrollCoordinates,
@@ -1228,7 +1228,7 @@ class KeyboardSensor {
1228
1228
  if (canScrollToNewCoordinates) {
1229
1229
  scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;
1230
1230
  } else {
1231
- scrollDelta.y = direction === KeyboardCode$1.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;
1231
+ scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;
1232
1232
  }
1233
1233
  if (scrollDelta.y) {
1234
1234
  scrollContainer.scrollBy({
@@ -1334,7 +1334,7 @@ class AbstractPointerSensor {
1334
1334
  this.documentListeners = new Listeners(this.document);
1335
1335
  this.listeners = new Listeners(listenerTarget);
1336
1336
  this.windowListeners = new Listeners(getWindow(target));
1337
- this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates$1;
1337
+ this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;
1338
1338
  this.handleStart = this.handleStart.bind(this);
1339
1339
  this.handleMove = this.handleMove.bind(this);
1340
1340
  this.handleEnd = this.handleEnd.bind(this);
@@ -1360,11 +1360,11 @@ class AbstractPointerSensor {
1360
1360
  if (events2.cancel) {
1361
1361
  this.listeners.add(events2.cancel.name, this.handleCancel);
1362
1362
  }
1363
- this.windowListeners.add(EventName$1.Resize, this.handleCancel);
1364
- this.windowListeners.add(EventName$1.DragStart, preventDefault);
1365
- this.windowListeners.add(EventName$1.VisibilityChange, this.handleCancel);
1366
- this.windowListeners.add(EventName$1.ContextMenu, preventDefault);
1367
- this.documentListeners.add(EventName$1.Keydown, this.handleKeydown);
1363
+ this.windowListeners.add(EventName.Resize, this.handleCancel);
1364
+ this.windowListeners.add(EventName.DragStart, preventDefault);
1365
+ this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
1366
+ this.windowListeners.add(EventName.ContextMenu, preventDefault);
1367
+ this.documentListeners.add(EventName.Keydown, this.handleKeydown);
1368
1368
  if (activationConstraint) {
1369
1369
  if (bypassActivationConstraint != null && bypassActivationConstraint({
1370
1370
  event: this.props.event,
@@ -1410,11 +1410,11 @@ class AbstractPointerSensor {
1410
1410
  } = this.props;
1411
1411
  if (initialCoordinates) {
1412
1412
  this.activated = true;
1413
- this.documentListeners.add(EventName$1.Click, stopPropagation, {
1413
+ this.documentListeners.add(EventName.Click, stopPropagation, {
1414
1414
  capture: true
1415
1415
  });
1416
1416
  this.removeTextSelection();
1417
- this.documentListeners.add(EventName$1.SelectionChange, this.removeTextSelection);
1417
+ this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);
1418
1418
  onStart(initialCoordinates);
1419
1419
  }
1420
1420
  }
@@ -1434,7 +1434,7 @@ class AbstractPointerSensor {
1434
1434
  if (!initialCoordinates) {
1435
1435
  return;
1436
1436
  }
1437
- const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates$1;
1437
+ const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;
1438
1438
  const delta = subtract(initialCoordinates, coordinates);
1439
1439
  if (!activated && activationConstraint) {
1440
1440
  if (isDistanceConstraint(activationConstraint)) {
@@ -1481,7 +1481,7 @@ class AbstractPointerSensor {
1481
1481
  onCancel();
1482
1482
  }
1483
1483
  handleKeydown(event) {
1484
- if (event.code === KeyboardCode$1.Esc) {
1484
+ if (event.code === KeyboardCode.Esc) {
1485
1485
  this.handleCancel();
1486
1486
  }
1487
1487
  }
@@ -1536,10 +1536,10 @@ const events$1 = {
1536
1536
  name: "mouseup"
1537
1537
  }
1538
1538
  };
1539
- var MouseButton$1;
1539
+ var MouseButton;
1540
1540
  (function(MouseButton2) {
1541
1541
  MouseButton2[MouseButton2["RightClick"] = 2] = "RightClick";
1542
- })(MouseButton$1 || (MouseButton$1 = {}));
1542
+ })(MouseButton || (MouseButton = {}));
1543
1543
  class MouseSensor extends AbstractPointerSensor {
1544
1544
  constructor(props) {
1545
1545
  super(props, events$1, getOwnerDocument(props.event.target));
@@ -1554,7 +1554,7 @@ MouseSensor.activators = [{
1554
1554
  let {
1555
1555
  onActivation
1556
1556
  } = _ref2;
1557
- if (event.button === MouseButton$1.RightClick) {
1557
+ if (event.button === MouseButton.RightClick) {
1558
1558
  return false;
1559
1559
  }
1560
1560
  onActivation == null ? void 0 : onActivation({
@@ -1611,25 +1611,25 @@ TouchSensor.activators = [{
1611
1611
  return true;
1612
1612
  }
1613
1613
  }];
1614
- var AutoScrollActivator$1;
1614
+ var AutoScrollActivator;
1615
1615
  (function(AutoScrollActivator2) {
1616
1616
  AutoScrollActivator2[AutoScrollActivator2["Pointer"] = 0] = "Pointer";
1617
1617
  AutoScrollActivator2[AutoScrollActivator2["DraggableRect"] = 1] = "DraggableRect";
1618
- })(AutoScrollActivator$1 || (AutoScrollActivator$1 = {}));
1619
- var TraversalOrder$1;
1618
+ })(AutoScrollActivator || (AutoScrollActivator = {}));
1619
+ var TraversalOrder;
1620
1620
  (function(TraversalOrder2) {
1621
1621
  TraversalOrder2[TraversalOrder2["TreeOrder"] = 0] = "TreeOrder";
1622
1622
  TraversalOrder2[TraversalOrder2["ReversedTreeOrder"] = 1] = "ReversedTreeOrder";
1623
- })(TraversalOrder$1 || (TraversalOrder$1 = {}));
1623
+ })(TraversalOrder || (TraversalOrder = {}));
1624
1624
  function useAutoScroller(_ref) {
1625
1625
  let {
1626
1626
  acceleration,
1627
- activator = AutoScrollActivator$1.Pointer,
1627
+ activator = AutoScrollActivator.Pointer,
1628
1628
  canScroll,
1629
1629
  draggingRect,
1630
1630
  enabled,
1631
1631
  interval = 5,
1632
- order: order2 = TraversalOrder$1.TreeOrder,
1632
+ order: order2 = TraversalOrder.TreeOrder,
1633
1633
  pointerCoordinates,
1634
1634
  scrollableAncestors,
1635
1635
  scrollableAncestorRects,
@@ -1651,14 +1651,14 @@ function useAutoScroller(_ref) {
1651
1651
  });
1652
1652
  const rect = useMemo(() => {
1653
1653
  switch (activator) {
1654
- case AutoScrollActivator$1.Pointer:
1654
+ case AutoScrollActivator.Pointer:
1655
1655
  return pointerCoordinates ? {
1656
1656
  top: pointerCoordinates.y,
1657
1657
  bottom: pointerCoordinates.y,
1658
1658
  left: pointerCoordinates.x,
1659
1659
  right: pointerCoordinates.x
1660
1660
  } : null;
1661
- case AutoScrollActivator$1.DraggableRect:
1661
+ case AutoScrollActivator.DraggableRect:
1662
1662
  return draggingRect;
1663
1663
  }
1664
1664
  }, [activator, draggingRect, pointerCoordinates]);
@@ -1672,7 +1672,7 @@ function useAutoScroller(_ref) {
1672
1672
  const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;
1673
1673
  scrollContainer.scrollBy(scrollLeft, scrollTop);
1674
1674
  }, []);
1675
- const sortedScrollableAncestors = useMemo(() => order2 === TraversalOrder$1.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order2, scrollableAncestors]);
1675
+ const sortedScrollableAncestors = useMemo(() => order2 === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order2, scrollableAncestors]);
1676
1676
  useEffect(
1677
1677
  () => {
1678
1678
  if (!enabled || !scrollableAncestors.length || !rect) {
@@ -1740,12 +1740,12 @@ function useAutoScroller(_ref) {
1740
1740
  }
1741
1741
  const defaultScrollIntent = {
1742
1742
  x: {
1743
- [Direction$1.Backward]: false,
1744
- [Direction$1.Forward]: false
1743
+ [Direction.Backward]: false,
1744
+ [Direction.Forward]: false
1745
1745
  },
1746
1746
  y: {
1747
- [Direction$1.Backward]: false,
1748
- [Direction$1.Forward]: false
1747
+ [Direction.Backward]: false,
1748
+ [Direction.Forward]: false
1749
1749
  }
1750
1750
  };
1751
1751
  function useScrollIntent(_ref2) {
@@ -1764,12 +1764,12 @@ function useScrollIntent(_ref2) {
1764
1764
  };
1765
1765
  return {
1766
1766
  x: {
1767
- [Direction$1.Backward]: previousIntent.x[Direction$1.Backward] || direction.x === -1,
1768
- [Direction$1.Forward]: previousIntent.x[Direction$1.Forward] || direction.x === 1
1767
+ [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,
1768
+ [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1
1769
1769
  },
1770
1770
  y: {
1771
- [Direction$1.Backward]: previousIntent.y[Direction$1.Backward] || direction.y === -1,
1772
- [Direction$1.Forward]: previousIntent.y[Direction$1.Forward] || direction.y === 1
1771
+ [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,
1772
+ [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1
1773
1773
  }
1774
1774
  };
1775
1775
  }, [disabled, delta, previousDelta]);
@@ -1797,16 +1797,16 @@ function useCombineActivators(sensors, getSyntheticHandler) {
1797
1797
  return [...accumulator, ...sensorActivators];
1798
1798
  }, []), [sensors, getSyntheticHandler]);
1799
1799
  }
1800
- var MeasuringStrategy$1;
1800
+ var MeasuringStrategy;
1801
1801
  (function(MeasuringStrategy2) {
1802
1802
  MeasuringStrategy2[MeasuringStrategy2["Always"] = 0] = "Always";
1803
1803
  MeasuringStrategy2[MeasuringStrategy2["BeforeDragging"] = 1] = "BeforeDragging";
1804
1804
  MeasuringStrategy2[MeasuringStrategy2["WhileDragging"] = 2] = "WhileDragging";
1805
- })(MeasuringStrategy$1 || (MeasuringStrategy$1 = {}));
1806
- var MeasuringFrequency$1;
1805
+ })(MeasuringStrategy || (MeasuringStrategy = {}));
1806
+ var MeasuringFrequency;
1807
1807
  (function(MeasuringFrequency2) {
1808
1808
  MeasuringFrequency2["Optimized"] = "optimized";
1809
- })(MeasuringFrequency$1 || (MeasuringFrequency$1 = {}));
1809
+ })(MeasuringFrequency || (MeasuringFrequency = {}));
1810
1810
  const defaultValue = /* @__PURE__ */ new Map();
1811
1811
  function useDroppableMeasuring(containers, _ref) {
1812
1812
  let {
@@ -1905,9 +1905,9 @@ function useDroppableMeasuring(containers, _ref) {
1905
1905
  };
1906
1906
  function isDisabled() {
1907
1907
  switch (strategy) {
1908
- case MeasuringStrategy$1.Always:
1908
+ case MeasuringStrategy.Always:
1909
1909
  return false;
1910
- case MeasuringStrategy$1.BeforeDragging:
1910
+ case MeasuringStrategy.BeforeDragging:
1911
1911
  return dragging;
1912
1912
  default:
1913
1913
  return !dragging;
@@ -2098,9 +2098,9 @@ function useScrollOffsets(elements) {
2098
2098
  }, [handleScroll, elements]);
2099
2099
  return useMemo(() => {
2100
2100
  if (elements.length) {
2101
- return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates$1) : getScrollOffsets(elements);
2101
+ return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);
2102
2102
  }
2103
- return defaultCoordinates$1;
2103
+ return defaultCoordinates;
2104
2104
  }, [elements, scrollCoordinates]);
2105
2105
  }
2106
2106
  function useScrollOffsetsDelta(scrollOffsets, dependencies) {
@@ -2116,7 +2116,7 @@ function useScrollOffsetsDelta(scrollOffsets, dependencies) {
2116
2116
  dependencies
2117
2117
  );
2118
2118
  useEffect(() => {
2119
- const hasScrollOffsets = scrollOffsets !== defaultCoordinates$1;
2119
+ const hasScrollOffsets = scrollOffsets !== defaultCoordinates;
2120
2120
  if (hasScrollOffsets && !initialScrollOffsets.current) {
2121
2121
  initialScrollOffsets.current = scrollOffsets;
2122
2122
  }
@@ -2124,7 +2124,7 @@ function useScrollOffsetsDelta(scrollOffsets, dependencies) {
2124
2124
  initialScrollOffsets.current = null;
2125
2125
  }
2126
2126
  }, [scrollOffsets]);
2127
- return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates$1;
2127
+ return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;
2128
2128
  }
2129
2129
  function useSensorSetup(sensors) {
2130
2130
  useEffect(
@@ -2263,8 +2263,8 @@ const defaultMeasuringConfiguration = {
2263
2263
  },
2264
2264
  droppable: {
2265
2265
  measure: getTransformAgnosticClientRect,
2266
- strategy: MeasuringStrategy$1.WhileDragging,
2267
- frequency: MeasuringFrequency$1.Optimized
2266
+ strategy: MeasuringStrategy.WhileDragging,
2267
+ frequency: MeasuringFrequency.Optimized
2268
2268
  },
2269
2269
  dragOverlay: {
2270
2270
  measure: getClientRect
@@ -2352,7 +2352,7 @@ function getInitialState() {
2352
2352
  }
2353
2353
  function reducer(state, action) {
2354
2354
  switch (action.type) {
2355
- case Action$1.DragStart:
2355
+ case Action.DragStart:
2356
2356
  return {
2357
2357
  ...state,
2358
2358
  draggable: {
@@ -2361,7 +2361,7 @@ function reducer(state, action) {
2361
2361
  active: action.active
2362
2362
  }
2363
2363
  };
2364
- case Action$1.DragMove:
2364
+ case Action.DragMove:
2365
2365
  if (state.draggable.active == null) {
2366
2366
  return state;
2367
2367
  }
@@ -2375,8 +2375,8 @@ function reducer(state, action) {
2375
2375
  }
2376
2376
  }
2377
2377
  };
2378
- case Action$1.DragEnd:
2379
- case Action$1.DragCancel:
2378
+ case Action.DragEnd:
2379
+ case Action.DragCancel:
2380
2380
  return {
2381
2381
  ...state,
2382
2382
  draggable: {
@@ -2392,7 +2392,7 @@ function reducer(state, action) {
2392
2392
  }
2393
2393
  }
2394
2394
  };
2395
- case Action$1.RegisterDroppable: {
2395
+ case Action.RegisterDroppable: {
2396
2396
  const {
2397
2397
  element: element2
2398
2398
  } = action;
@@ -2409,7 +2409,7 @@ function reducer(state, action) {
2409
2409
  }
2410
2410
  };
2411
2411
  }
2412
- case Action$1.SetDroppableDisabled: {
2412
+ case Action.SetDroppableDisabled: {
2413
2413
  const {
2414
2414
  id,
2415
2415
  key: key2,
@@ -2432,7 +2432,7 @@ function reducer(state, action) {
2432
2432
  }
2433
2433
  };
2434
2434
  }
2435
- case Action$1.UnregisterDroppable: {
2435
+ case Action.UnregisterDroppable: {
2436
2436
  const {
2437
2437
  id,
2438
2438
  key: key2
@@ -2586,16 +2586,16 @@ function useLayoutShiftScrollCompensation(_ref) {
2586
2586
  }, [activeNode, x, y, initialRect, measure]);
2587
2587
  }
2588
2588
  const ActiveDraggableContext = /* @__PURE__ */ createContext({
2589
- ...defaultCoordinates$1,
2589
+ ...defaultCoordinates,
2590
2590
  scaleX: 1,
2591
2591
  scaleY: 1
2592
2592
  });
2593
- var Status$1;
2593
+ var Status;
2594
2594
  (function(Status2) {
2595
2595
  Status2[Status2["Uninitialized"] = 0] = "Uninitialized";
2596
2596
  Status2[Status2["Initializing"] = 1] = "Initializing";
2597
2597
  Status2[Status2["Initialized"] = 2] = "Initialized";
2598
- })(Status$1 || (Status$1 = {}));
2598
+ })(Status || (Status = {}));
2599
2599
  const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2600
2600
  var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;
2601
2601
  let {
@@ -2612,8 +2612,8 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2612
2612
  const store = useReducer(reducer, void 0, getInitialState);
2613
2613
  const [state, dispatch] = store;
2614
2614
  const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();
2615
- const [status, setStatus] = useState(Status$1.Uninitialized);
2616
- const isInitialized = status === Status$1.Initialized;
2615
+ const [status, setStatus] = useState(Status.Uninitialized);
2616
+ const isInitialized = status === Status.Initialized;
2617
2617
  const {
2618
2618
  draggable: {
2619
2619
  active: activeId,
@@ -2809,9 +2809,9 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2809
2809
  };
2810
2810
  unstable_batchedUpdates(() => {
2811
2811
  onDragStart == null ? void 0 : onDragStart(event2);
2812
- setStatus(Status$1.Initializing);
2812
+ setStatus(Status.Initializing);
2813
2813
  dispatch({
2814
- type: Action$1.DragStart,
2814
+ type: Action.DragStart,
2815
2815
  initialCoordinates,
2816
2816
  active: id2
2817
2817
  });
@@ -2825,12 +2825,12 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2825
2825
  },
2826
2826
  onMove(coordinates) {
2827
2827
  dispatch({
2828
- type: Action$1.DragMove,
2828
+ type: Action.DragMove,
2829
2829
  coordinates
2830
2830
  });
2831
2831
  },
2832
- onEnd: createHandler(Action$1.DragEnd),
2833
- onCancel: createHandler(Action$1.DragCancel)
2832
+ onEnd: createHandler(Action.DragEnd),
2833
+ onCancel: createHandler(Action.DragCancel)
2834
2834
  });
2835
2835
  activeSensorRef.current = sensorInstance;
2836
2836
  function createHandler(type) {
@@ -2853,10 +2853,10 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2853
2853
  delta: scrollAdjustedTranslate2,
2854
2854
  over: over2
2855
2855
  };
2856
- if (type === Action$1.DragEnd && typeof cancelDrop === "function") {
2856
+ if (type === Action.DragEnd && typeof cancelDrop === "function") {
2857
2857
  const shouldCancel = await Promise.resolve(cancelDrop(event2));
2858
2858
  if (shouldCancel) {
2859
- type = Action$1.DragCancel;
2859
+ type = Action.DragCancel;
2860
2860
  }
2861
2861
  }
2862
2862
  }
@@ -2865,12 +2865,12 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2865
2865
  dispatch({
2866
2866
  type
2867
2867
  });
2868
- setStatus(Status$1.Uninitialized);
2868
+ setStatus(Status.Uninitialized);
2869
2869
  setOver(null);
2870
2870
  setActiveSensor(null);
2871
2871
  setActivatorEvent(null);
2872
2872
  activeSensorRef.current = null;
2873
- const eventName = type === Action$1.DragEnd ? "onDragEnd" : "onDragCancel";
2873
+ const eventName = type === Action.DragEnd ? "onDragEnd" : "onDragCancel";
2874
2874
  if (event2) {
2875
2875
  const handler2 = latestProps.current[eventName];
2876
2876
  handler2 == null ? void 0 : handler2(event2);
@@ -2914,8 +2914,8 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2914
2914
  const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
2915
2915
  useSensorSetup(sensors);
2916
2916
  useIsomorphicLayoutEffect$2(() => {
2917
- if (activeNodeRect && status === Status$1.Initializing) {
2918
- setStatus(Status$1.Initialized);
2917
+ if (activeNodeRect && status === Status.Initializing) {
2918
+ setStatus(Status.Initialized);
2919
2919
  }
2920
2920
  }, [activeNodeRect, status]);
2921
2921
  useEffect(
@@ -3247,7 +3247,7 @@ function useDroppable(_ref) {
3247
3247
  useEffect(
3248
3248
  () => {
3249
3249
  dispatch({
3250
- type: Action$1.RegisterDroppable,
3250
+ type: Action.RegisterDroppable,
3251
3251
  element: {
3252
3252
  id,
3253
3253
  key: key2,
@@ -3258,7 +3258,7 @@ function useDroppable(_ref) {
3258
3258
  }
3259
3259
  });
3260
3260
  return () => dispatch({
3261
- type: Action$1.UnregisterDroppable,
3261
+ type: Action.UnregisterDroppable,
3262
3262
  key: key2,
3263
3263
  id
3264
3264
  });
@@ -3269,7 +3269,7 @@ function useDroppable(_ref) {
3269
3269
  useEffect(() => {
3270
3270
  if (disabled !== previous2.current.disabled) {
3271
3271
  dispatch({
3272
- type: Action$1.SetDroppableDisabled,
3272
+ type: Action.SetDroppableDisabled,
3273
3273
  id,
3274
3274
  key: key2,
3275
3275
  disabled
@@ -4054,6 +4054,159 @@ const __iconNode = [
4054
4054
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
4055
4055
  ];
4056
4056
  const X = createLucideIcon("x", __iconNode);
4057
+ var terminalTheme$1 = {
4058
+ space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
4059
+ fonts: {
4060
+ body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
4061
+ heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
4062
+ monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
4063
+ },
4064
+ fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
4065
+ fontScale: 1,
4066
+ fontWeights: {
4067
+ body: 400,
4068
+ heading: 500,
4069
+ bold: 600,
4070
+ light: 300,
4071
+ medium: 500,
4072
+ semibold: 600
4073
+ },
4074
+ lineHeights: {
4075
+ body: 1.6,
4076
+ heading: 1.3,
4077
+ tight: 1.4,
4078
+ relaxed: 1.8
4079
+ },
4080
+ breakpoints: ["640px", "768px", "1024px", "1280px"],
4081
+ sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
4082
+ radii: [0, 2, 4, 6, 8, 12, 16, 24],
4083
+ shadows: [
4084
+ "none",
4085
+ "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
4086
+ "0 2px 4px 0 rgba(0, 0, 0, 0.06)",
4087
+ "0 4px 6px 0 rgba(0, 0, 0, 0.07)",
4088
+ "0 8px 12px 0 rgba(0, 0, 0, 0.08)",
4089
+ "0 16px 24px 0 rgba(0, 0, 0, 0.10)"
4090
+ ],
4091
+ zIndices: [0, 1, 10, 20, 30, 40, 50],
4092
+ colors: {
4093
+ text: "#e4e4e4",
4094
+ background: "#0a0a0a",
4095
+ primary: "#66b3ff",
4096
+ secondary: "#80c4ff",
4097
+ accent: "#66ff99",
4098
+ highlight: "#18283d",
4099
+ muted: "#1a1a1a",
4100
+ success: "#66ff99",
4101
+ warning: "#ffcc66",
4102
+ error: "#ff6666",
4103
+ info: "#66b3ff",
4104
+ border: "#1a1a1a",
4105
+ backgroundSecondary: "#0f0f0f",
4106
+ backgroundTertiary: "#141414",
4107
+ backgroundLight: "#0d0d0d",
4108
+ backgroundHover: "#0d1520",
4109
+ surface: "#0f0f0f",
4110
+ textSecondary: "#b3b3b3",
4111
+ textTertiary: "#808080",
4112
+ textMuted: "#666666",
4113
+ highlightBg: "#40391e",
4114
+ highlightBorder: "#7f7530",
4115
+ textOnPrimary: "#ffffff"
4116
+ },
4117
+ modes: {
4118
+ light: {
4119
+ text: "#1a1a1a",
4120
+ background: "#ffffff",
4121
+ primary: "#0066cc",
4122
+ secondary: "#0052a3",
4123
+ accent: "#00cc88",
4124
+ highlight: "#e6f2ff",
4125
+ muted: "#f5f5f5",
4126
+ success: "#00cc88",
4127
+ warning: "#ffaa00",
4128
+ error: "#ff3333",
4129
+ info: "#0066cc",
4130
+ border: "#e6e6e6",
4131
+ backgroundSecondary: "#fafafa",
4132
+ backgroundTertiary: "#f5f5f5",
4133
+ backgroundLight: "#fafafa",
4134
+ backgroundHover: "#f5f9fd",
4135
+ surface: "#ffffff",
4136
+ textSecondary: "#666666",
4137
+ textTertiary: "#999999",
4138
+ textMuted: "#b3b3b3",
4139
+ highlightBg: "#fff9c4",
4140
+ highlightBorder: "#fff389"
4141
+ }
4142
+ },
4143
+ buttons: {
4144
+ primary: {
4145
+ color: "white",
4146
+ bg: "primary",
4147
+ borderWidth: 0,
4148
+ "&:hover": {
4149
+ bg: "secondary"
4150
+ }
4151
+ },
4152
+ secondary: {
4153
+ color: "primary",
4154
+ bg: "transparent",
4155
+ borderWidth: 1,
4156
+ borderStyle: "solid",
4157
+ borderColor: "primary",
4158
+ "&:hover": {
4159
+ bg: "highlight"
4160
+ }
4161
+ },
4162
+ ghost: {
4163
+ color: "text",
4164
+ bg: "transparent",
4165
+ "&:hover": {
4166
+ bg: "backgroundHover"
4167
+ }
4168
+ }
4169
+ },
4170
+ text: {
4171
+ heading: {
4172
+ fontFamily: "heading",
4173
+ fontWeight: "heading",
4174
+ lineHeight: "heading"
4175
+ },
4176
+ body: {
4177
+ fontFamily: "body",
4178
+ fontWeight: "body",
4179
+ lineHeight: "body"
4180
+ },
4181
+ caption: {
4182
+ fontSize: 1,
4183
+ color: "textSecondary"
4184
+ }
4185
+ },
4186
+ cards: {
4187
+ primary: {
4188
+ bg: "surface",
4189
+ border: "1px solid",
4190
+ borderColor: "border",
4191
+ borderRadius: 1
4192
+ },
4193
+ secondary: {
4194
+ bg: "backgroundSecondary",
4195
+ border: "1px solid",
4196
+ borderColor: "border",
4197
+ borderRadius: 1
4198
+ }
4199
+ }
4200
+ };
4201
+ function getMode(theme2, mode) {
4202
+ if (!mode || !theme2.modes || !theme2.modes[mode]) {
4203
+ return theme2.colors;
4204
+ }
4205
+ return {
4206
+ ...theme2.colors,
4207
+ ...theme2.modes[mode]
4208
+ };
4209
+ }
4057
4210
  var ThemeContext$1;
4058
4211
  var getThemeContext$1 = () => {
4059
4212
  if (typeof window !== "undefined") {
@@ -4077,6 +4230,46 @@ var useTheme = () => {
4077
4230
  }
4078
4231
  return context2;
4079
4232
  };
4233
+ var ThemeProvider = ({
4234
+ children: children2,
4235
+ theme: customTheme = theme$1,
4236
+ initialMode
4237
+ }) => {
4238
+ const [mode, setMode] = useState(initialMode);
4239
+ const activeTheme = React2__default.useMemo(() => {
4240
+ if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
4241
+ return customTheme;
4242
+ }
4243
+ return {
4244
+ ...customTheme,
4245
+ colors: getMode(customTheme, mode)
4246
+ };
4247
+ }, [customTheme, mode]);
4248
+ useEffect(() => {
4249
+ if (!initialMode) {
4250
+ const savedMode = localStorage.getItem("principlemd-theme-mode");
4251
+ if (savedMode) {
4252
+ setMode(savedMode);
4253
+ }
4254
+ }
4255
+ }, [initialMode]);
4256
+ useEffect(() => {
4257
+ if (mode) {
4258
+ localStorage.setItem("principlemd-theme-mode", mode);
4259
+ } else {
4260
+ localStorage.removeItem("principlemd-theme-mode");
4261
+ }
4262
+ }, [mode]);
4263
+ const value = {
4264
+ theme: activeTheme,
4265
+ mode,
4266
+ setMode
4267
+ };
4268
+ return /* @__PURE__ */ React2__default.createElement(ThemeContextSingleton.Provider, {
4269
+ value
4270
+ }, children2);
4271
+ };
4272
+ var theme$1 = terminalTheme$1;
4080
4273
  const PanelGroupContext$1 = createContext(null);
4081
4274
  PanelGroupContext$1.displayName = "PanelGroupContext";
4082
4275
  const DATA_ATTRIBUTES$1 = {
@@ -5564,266 +5757,100 @@ function panelDataHelper$1(panelDataArray, panelData, layout) {
5564
5757
  pivotIndices
5565
5758
  };
5566
5759
  }
5567
- function mapThemeToPanelVars(theme2) {
5568
- return {
5569
- "--panel-background": theme2.colors.background,
5570
- "--panel-border": theme2.colors.border,
5571
- "--panel-handle": theme2.colors.backgroundSecondary,
5572
- "--panel-handle-hover": theme2.colors.backgroundHover,
5573
- "--panel-handle-active": theme2.colors.primary,
5574
- "--panel-button-bg": theme2.colors.surface,
5575
- "--panel-button-hover": theme2.colors.backgroundHover,
5576
- "--panel-button-border": theme2.colors.border,
5577
- "--panel-button-icon": theme2.colors.textSecondary,
5578
- "--panel-accent-bg": theme2.colors.primary + "15"
5579
- // primary color with 15% opacity
5580
- };
5581
- }
5582
- const SnapCarousel = forwardRef(({
5583
- panels: panels2,
5584
- className = "",
5585
- style: style2,
5586
- theme: theme2,
5587
- minPanelWidth = 350,
5588
- idealPanelWidth = 0.333,
5589
- // 1/3 of container
5590
- showSeparator = false,
5591
- onPanelChange,
5592
- preventKeyboardScroll = true,
5593
- disableSwipe = false
5594
- }, ref) => {
5595
- const containerRef = useRef(null);
5596
- const isProgrammaticScrollRef = useRef(false);
5597
- const scrollTimeoutRef = useRef(null);
5598
- const themeStyles = mapThemeToPanelVars(theme2);
5599
- useImperativeHandle(ref, () => ({
5600
- scrollToPanel: (index2) => {
5601
- if (!containerRef.current) return;
5602
- const container = containerRef.current;
5603
- const targetPanel = container.children[index2];
5604
- if (targetPanel) {
5605
- isProgrammaticScrollRef.current = true;
5606
- if (scrollTimeoutRef.current) {
5607
- clearTimeout(scrollTimeoutRef.current);
5608
- }
5609
- const scrollLeft = targetPanel.offsetLeft;
5610
- container.scrollTo({
5611
- left: scrollLeft,
5612
- behavior: "smooth"
5613
- });
5614
- scrollTimeoutRef.current = setTimeout(() => {
5615
- isProgrammaticScrollRef.current = false;
5616
- }, 500);
5617
- }
5618
- },
5619
- getCurrentPanel: () => {
5620
- if (!containerRef.current || containerRef.current.children.length === 0) return 0;
5621
- const container = containerRef.current;
5622
- const containerRect = container.getBoundingClientRect();
5623
- const snapPointX = containerRect.left;
5624
- let closestIndex = 0;
5625
- let closestDistance = Infinity;
5626
- for (let i = 0; i < container.children.length; i++) {
5627
- const panel = container.children[i];
5628
- const panelRect = panel.getBoundingClientRect();
5629
- const distance = Math.abs(panelRect.left - snapPointX);
5630
- if (distance < closestDistance) {
5631
- closestDistance = distance;
5632
- closestIndex = i;
5633
- }
5634
- }
5635
- return closestIndex;
5760
+ function C$1(e) {
5761
+ return { "--panel-background": e.colors.background, "--panel-border": e.colors.border, "--panel-handle": e.colors.backgroundSecondary, "--panel-handle-hover": e.colors.backgroundHover, "--panel-handle-active": e.colors.primary, "--panel-button-bg": e.colors.surface, "--panel-button-hover": e.colors.backgroundHover, "--panel-button-border": e.colors.border, "--panel-button-icon": e.colors.textSecondary, "--panel-accent-bg": e.colors.primary + "15" };
5762
+ }
5763
+ const z$1 = forwardRef(({ panels: o, className: a = "", style: s2, theme: d, minPanelWidth: u = 350, idealPanelWidth: p2 = 0.333, showSeparator: h2 = false, onPanelChange: m, preventKeyboardScroll: f = true, disableSwipe: g = false }, v) => {
5764
+ const b = useRef(null), y = useRef(false), w = useRef(null), x = C$1(d);
5765
+ useImperativeHandle(v, () => ({ scrollToPanel: (e) => {
5766
+ if (!b.current) return;
5767
+ const t = b.current, n = t.children[e];
5768
+ if (n) {
5769
+ y.current = true, w.current && clearTimeout(w.current);
5770
+ const e2 = n.offsetLeft;
5771
+ t.scrollTo({ left: e2, behavior: "smooth" }), w.current = setTimeout(() => {
5772
+ y.current = false;
5773
+ }, 500);
5636
5774
  }
5637
- }));
5638
- const handleScroll = (_e2) => {
5639
- if (!onPanelChange || !containerRef.current || containerRef.current.children.length === 0) return;
5640
- if (isProgrammaticScrollRef.current) return;
5641
- const container = containerRef.current;
5642
- const containerRect = container.getBoundingClientRect();
5643
- const snapPointX = containerRect.left;
5644
- let closestIndex = 0;
5645
- let closestDistance = Infinity;
5646
- for (let i = 0; i < container.children.length; i++) {
5647
- const panel = container.children[i];
5648
- const panelRect = panel.getBoundingClientRect();
5649
- const distance = Math.abs(panelRect.left - snapPointX);
5650
- if (distance < closestDistance) {
5651
- closestDistance = distance;
5652
- closestIndex = i;
5653
- }
5654
- }
5655
- onPanelChange(closestIndex);
5656
- };
5775
+ }, getCurrentPanel: () => {
5776
+ if (!b.current || 0 === b.current.children.length) return 0;
5777
+ const e = b.current, t = e.getBoundingClientRect().left;
5778
+ let n = 0, r2 = 1 / 0;
5779
+ for (let o2 = 0; o2 < e.children.length; o2++) {
5780
+ const i = e.children[o2].getBoundingClientRect(), a2 = Math.abs(i.left - t);
5781
+ a2 < r2 && (r2 = a2, n = o2);
5782
+ }
5783
+ return n;
5784
+ } }));
5657
5785
  useEffect(() => {
5658
- if (!preventKeyboardScroll || !containerRef.current) return;
5659
- const container = containerRef.current;
5660
- const handleKeyDown = (e) => {
5661
- const target = e.target;
5662
- const isInteractive = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable || target.closest(".xterm") !== null || // Terminal elements
5663
- target.closest('[contenteditable="true"]') !== null;
5664
- if (isInteractive) {
5665
- return;
5666
- }
5667
- const scrollKeys = [" ", "Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown"];
5668
- if (scrollKeys.includes(e.key)) {
5669
- e.preventDefault();
5670
- }
5786
+ if (!f || !b.current) return;
5787
+ const e = b.current, t = (e2) => {
5788
+ const t2 = e2.target;
5789
+ if ("INPUT" === t2.tagName || "TEXTAREA" === t2.tagName || "SELECT" === t2.tagName || t2.isContentEditable || null !== t2.closest(".xterm") || null !== t2.closest('[contenteditable="true"]')) return;
5790
+ [" ", "Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown"].includes(e2.key) && e2.preventDefault();
5671
5791
  };
5672
- container.addEventListener("keydown", handleKeyDown);
5673
- return () => {
5674
- container.removeEventListener("keydown", handleKeyDown);
5675
- };
5676
- }, [preventKeyboardScroll]);
5677
- useEffect(() => {
5678
- return () => {
5679
- if (scrollTimeoutRef.current) {
5680
- clearTimeout(scrollTimeoutRef.current);
5681
- }
5792
+ return e.addEventListener("keydown", t), () => {
5793
+ e.removeEventListener("keydown", t);
5682
5794
  };
5795
+ }, [f]), useEffect(() => () => {
5796
+ w.current && clearTimeout(w.current);
5683
5797
  }, []);
5684
- const panelCount = panels2.length;
5685
- const twoPanelThreshold = minPanelWidth * 2;
5686
- let panelWidth;
5687
- if (panelCount === 1) {
5688
- panelWidth = "100%";
5689
- } else if (panelCount === 2) {
5690
- panelWidth = "100%";
5691
- } else {
5692
- panelWidth = `max(${minPanelWidth}px, ${idealPanelWidth * 100}%)`;
5693
- }
5694
- const carouselId = React2__default.useId().replace(/:/g, "_");
5695
- return /* @__PURE__ */ jsxs(Fragment, { children: [
5696
- panelCount === 2 && /* @__PURE__ */ jsx("style", { children: `
5697
- .snap-carousel-container[data-carousel-id="${carouselId}"][data-panel-count="2"] .snap-carousel-panel {
5798
+ const S = o.length, R = 2 * u;
5799
+ let N;
5800
+ N = 1 === S || 2 === S ? "100%" : `max(${u}px, ${100 * p2}%)`;
5801
+ const E = React2__default.useId().replace(/:/g, "_");
5802
+ return jsxs(Fragment, { children: [
5803
+ 2 === S && /* @__PURE__ */ jsx("style", { children: `
5804
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
5698
5805
  width: 100%;
5699
5806
  }
5700
- @container (min-width: ${twoPanelThreshold}px) {
5701
- .snap-carousel-container[data-carousel-id="${carouselId}"][data-panel-count="2"] .snap-carousel-panel {
5807
+ @container (min-width: ${R}px) {
5808
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
5702
5809
  width: 50%;
5703
5810
  }
5704
5811
  }
5705
5812
  ` }),
5706
- /* @__PURE__ */ jsx(
5707
- "div",
5708
- {
5709
- ref: containerRef,
5710
- className: `snap-carousel-container ${disableSwipe ? "swipe-disabled" : ""} ${className}`,
5711
- style: {
5712
- ...themeStyles,
5713
- ...style2,
5714
- "--snap-carousel-min-width": `${minPanelWidth}px`,
5715
- "--snap-carousel-ideal-width": `${idealPanelWidth * 100}%`,
5716
- "--snap-carousel-gap": showSeparator ? "1px" : "0px",
5717
- "--snap-carousel-panel-width": panelWidth,
5718
- "--snap-carousel-panel-count": panelCount,
5719
- "--snap-carousel-two-panel-threshold": `${twoPanelThreshold}px`
5720
- },
5721
- onScroll: handleScroll,
5722
- "data-panel-count": panelCount,
5723
- "data-carousel-id": carouselId,
5724
- children: panels2.map((panel, index2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: panel }, index2))
5725
- }
5726
- )
5813
+ /* @__PURE__ */ jsx("div", { ref: b, className: `snap-carousel-container ${g ? "swipe-disabled" : ""} ${a}`, style: { ...x, ...s2, "--snap-carousel-min-width": `${u}px`, "--snap-carousel-ideal-width": 100 * p2 + "%", "--snap-carousel-gap": h2 ? "1px" : "0px", "--snap-carousel-panel-width": N, "--snap-carousel-panel-count": S, "--snap-carousel-two-panel-threshold": `${R}px` }, onScroll: (e) => {
5814
+ if (!m || !b.current || 0 === b.current.children.length) return;
5815
+ if (y.current) return;
5816
+ const t = b.current, n = t.getBoundingClientRect().left;
5817
+ let r2 = 0, o2 = 1 / 0;
5818
+ for (let i = 0; i < t.children.length; i++) {
5819
+ const e2 = t.children[i].getBoundingClientRect(), a2 = Math.abs(e2.left - n);
5820
+ a2 < o2 && (o2 = a2, r2 = i);
5821
+ }
5822
+ m(r2);
5823
+ }, "data-panel-count": S, "data-carousel-id": E, children: o.map((t, n) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t }, n)) })
5727
5824
  ] });
5728
5825
  });
5729
- SnapCarousel.displayName = "SnapCarousel";
5730
- var Action;
5731
- (function(Action2) {
5732
- Action2["DragStart"] = "dragStart";
5733
- Action2["DragMove"] = "dragMove";
5734
- Action2["DragEnd"] = "dragEnd";
5735
- Action2["DragCancel"] = "dragCancel";
5736
- Action2["DragOver"] = "dragOver";
5737
- Action2["RegisterDroppable"] = "registerDroppable";
5738
- Action2["SetDroppableDisabled"] = "setDroppableDisabled";
5739
- Action2["UnregisterDroppable"] = "unregisterDroppable";
5740
- })(Action || (Action = {}));
5741
- const defaultCoordinates = /* @__PURE__ */ Object.freeze({
5742
- x: 0,
5743
- y: 0
5744
- });
5745
- var Direction;
5746
- (function(Direction2) {
5747
- Direction2[Direction2["Forward"] = 1] = "Forward";
5748
- Direction2[Direction2["Backward"] = -1] = "Backward";
5749
- })(Direction || (Direction = {}));
5750
- var EventName;
5751
- (function(EventName2) {
5752
- EventName2["Click"] = "click";
5753
- EventName2["DragStart"] = "dragstart";
5754
- EventName2["Keydown"] = "keydown";
5755
- EventName2["ContextMenu"] = "contextmenu";
5756
- EventName2["Resize"] = "resize";
5757
- EventName2["SelectionChange"] = "selectionchange";
5758
- EventName2["VisibilityChange"] = "visibilitychange";
5759
- })(EventName || (EventName = {}));
5760
- var KeyboardCode;
5761
- (function(KeyboardCode2) {
5762
- KeyboardCode2["Space"] = "Space";
5763
- KeyboardCode2["Down"] = "ArrowDown";
5764
- KeyboardCode2["Right"] = "ArrowRight";
5765
- KeyboardCode2["Left"] = "ArrowLeft";
5766
- KeyboardCode2["Up"] = "ArrowUp";
5767
- KeyboardCode2["Esc"] = "Escape";
5768
- KeyboardCode2["Enter"] = "Enter";
5769
- KeyboardCode2["Tab"] = "Tab";
5770
- })(KeyboardCode || (KeyboardCode = {}));
5771
- ({
5772
- start: [KeyboardCode.Space, KeyboardCode.Enter],
5773
- cancel: [KeyboardCode.Esc],
5774
- end: [KeyboardCode.Space, KeyboardCode.Enter, KeyboardCode.Tab]
5775
- });
5776
- var MouseButton;
5777
- (function(MouseButton2) {
5778
- MouseButton2[MouseButton2["RightClick"] = 2] = "RightClick";
5779
- })(MouseButton || (MouseButton = {}));
5780
- var AutoScrollActivator;
5781
- (function(AutoScrollActivator2) {
5782
- AutoScrollActivator2[AutoScrollActivator2["Pointer"] = 0] = "Pointer";
5783
- AutoScrollActivator2[AutoScrollActivator2["DraggableRect"] = 1] = "DraggableRect";
5784
- })(AutoScrollActivator || (AutoScrollActivator = {}));
5785
- var TraversalOrder;
5786
- (function(TraversalOrder2) {
5787
- TraversalOrder2[TraversalOrder2["TreeOrder"] = 0] = "TreeOrder";
5788
- TraversalOrder2[TraversalOrder2["ReversedTreeOrder"] = 1] = "ReversedTreeOrder";
5789
- })(TraversalOrder || (TraversalOrder = {}));
5790
- ({
5791
- x: {
5792
- [Direction.Backward]: false,
5793
- [Direction.Forward]: false
5794
- },
5795
- y: {
5796
- [Direction.Backward]: false,
5797
- [Direction.Forward]: false
5798
- }
5799
- });
5800
- var MeasuringStrategy;
5801
- (function(MeasuringStrategy2) {
5802
- MeasuringStrategy2[MeasuringStrategy2["Always"] = 0] = "Always";
5803
- MeasuringStrategy2[MeasuringStrategy2["BeforeDragging"] = 1] = "BeforeDragging";
5804
- MeasuringStrategy2[MeasuringStrategy2["WhileDragging"] = 2] = "WhileDragging";
5805
- })(MeasuringStrategy || (MeasuringStrategy = {}));
5806
- var MeasuringFrequency;
5807
- (function(MeasuringFrequency2) {
5808
- MeasuringFrequency2["Optimized"] = "optimized";
5809
- })(MeasuringFrequency || (MeasuringFrequency = {}));
5810
- ({
5811
- droppable: {
5812
- strategy: MeasuringStrategy.WhileDragging,
5813
- frequency: MeasuringFrequency.Optimized
5826
+ z$1.displayName = "SnapCarousel";
5827
+ var le$2, se$1;
5828
+ (se$1 = le$2 || (le$2 = {})).DragStart = "dragStart", se$1.DragMove = "dragMove", se$1.DragEnd = "dragEnd", se$1.DragCancel = "dragCancel", se$1.DragOver = "dragOver", se$1.RegisterDroppable = "registerDroppable", se$1.SetDroppableDisabled = "setDroppableDisabled", se$1.UnregisterDroppable = "unregisterDroppable";
5829
+ const de$1 = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
5830
+ var Te$1, Ae$1;
5831
+ (Ae$1 = Te$1 || (Te$1 = {}))[Ae$1.Forward = 1] = "Forward", Ae$1[Ae$1.Backward = -1] = "Backward";
5832
+ var _e$1, je$1, He$1, Ke$1;
5833
+ (je$1 = _e$1 || (_e$1 = {})).Click = "click", je$1.DragStart = "dragstart", je$1.Keydown = "keydown", je$1.ContextMenu = "contextmenu", je$1.Resize = "resize", je$1.SelectionChange = "selectionchange", je$1.VisibilityChange = "visibilitychange", (Ke$1 = He$1 || (He$1 = {})).Space = "Space", Ke$1.Down = "ArrowDown", Ke$1.Right = "ArrowRight", Ke$1.Left = "ArrowLeft", Ke$1.Up = "ArrowUp", Ke$1.Esc = "Escape", Ke$1.Enter = "Enter", Ke$1.Tab = "Tab";
5834
+ ({ start: [He$1.Space, He$1.Enter], cancel: [He$1.Esc], end: [He$1.Space, He$1.Enter, He$1.Tab] });
5835
+ var rt$1, ot$1;
5836
+ (ot$1 = rt$1 || (rt$1 = {}))[ot$1.RightClick = 2] = "RightClick";
5837
+ var at$1, lt$1, st$1, ct$1;
5838
+ (lt$1 = at$1 || (at$1 = {}))[lt$1.Pointer = 0] = "Pointer", lt$1[lt$1.DraggableRect = 1] = "DraggableRect", (ct$1 = st$1 || (st$1 = {}))[ct$1.TreeOrder = 0] = "TreeOrder", ct$1[ct$1.ReversedTreeOrder = 1] = "ReversedTreeOrder";
5839
+ ({ x: { [Te$1.Backward]: false, [Te$1.Forward]: false }, y: { [Te$1.Backward]: false, [Te$1.Forward]: false } });
5840
+ var pt$1, ht$1, mt$1;
5841
+ (ht$1 = pt$1 || (pt$1 = {}))[ht$1.Always = 0] = "Always", ht$1[ht$1.BeforeDragging = 1] = "BeforeDragging", ht$1[ht$1.WhileDragging = 2] = "WhileDragging", (mt$1 || (mt$1 = {})).Optimized = "optimized";
5842
+ ({ droppable: { strategy: pt$1.WhileDragging, frequency: mt$1.Optimized } });
5843
+ /* @__PURE__ */ createContext({ ...de$1, scaleX: 1, scaleY: 1 });
5844
+ var $t$1, Bt$1;
5845
+ (Bt$1 = $t$1 || ($t$1 = {}))[Bt$1.Uninitialized = 0] = "Uninitialized", Bt$1[Bt$1.Initializing = 1] = "Initializing", Bt$1[Bt$1.Initialized = 2] = "Initialized";
5846
+ var Ut$1;
5847
+ (() => {
5848
+ if ("undefined" != typeof window) {
5849
+ const e = window;
5850
+ return e.__principlemd_theme_context__ || (e.__principlemd_theme_context__ = createContext(void 0)), e.__principlemd_theme_context__;
5814
5851
  }
5815
- });
5816
- /* @__PURE__ */ createContext({
5817
- ...defaultCoordinates,
5818
- scaleX: 1,
5819
- scaleY: 1
5820
- });
5821
- var Status;
5822
- (function(Status2) {
5823
- Status2[Status2["Uninitialized"] = 0] = "Uninitialized";
5824
- Status2[Status2["Initializing"] = 1] = "Initializing";
5825
- Status2[Status2["Initialized"] = 2] = "Initialized";
5826
- })(Status || (Status = {}));
5852
+ return Ut$1 || (Ut$1 = createContext(void 0)), Ut$1;
5853
+ })();
5827
5854
  var Ee = Object.defineProperty;
5828
5855
  var Re = (o, e, t) => e in o ? Ee(o, e, { enumerable: true, configurable: true, writable: true, value: t }) : o[e] = t;
5829
5856
  var le$1 = (o, e, t) => Re(o, typeof e != "symbol" ? e + "" : e, t);
@@ -8456,7 +8483,7 @@ class Core {
8456
8483
  throw new Error("Core not initialized. Call initialize() or initializeLazy() first.");
8457
8484
  }
8458
8485
  }
8459
- const version = "1.1.16";
8486
+ const version = "1.2.1";
8460
8487
  const packageJson = {
8461
8488
  version
8462
8489
  };
@@ -8887,6 +8914,7 @@ const TaskCard = ({
8887
8914
  minHeight: "44px",
8888
8915
  touchAction: "none",
8889
8916
  userSelect: "none",
8917
+ fontFamily: theme2.fonts.body,
8890
8918
  // When dragging, the original card stays in place but becomes a placeholder
8891
8919
  // The DragOverlay handles the visual movement
8892
8920
  opacity: isDragging ? 0.4 : 1,
@@ -10888,7 +10916,7 @@ const KanbanPanel = ({
10888
10916
  }));
10889
10917
  const measuringConfig = {
10890
10918
  droppable: {
10891
- strategy: MeasuringStrategy$1.Always
10919
+ strategy: MeasuringStrategy.Always
10892
10920
  }
10893
10921
  };
10894
10922
  useLayoutEffect(() => {
@@ -11739,15 +11767,18 @@ const KanbanPanel = ({
11739
11767
  })
11740
11768
  })
11741
11769
  })]
11742
- }), typeof document !== "undefined" && createPortal(/* @__PURE__ */ jsx(DragOverlay, {
11743
- dropAnimation: {
11744
- duration: 200,
11745
- easing: "ease"
11746
- },
11747
- children: activeTask ? /* @__PURE__ */ jsx(TaskCard, {
11748
- task: activeTask,
11749
- isDragOverlay: true
11750
- }) : null
11770
+ }), typeof document !== "undefined" && createPortal(/* @__PURE__ */ jsx(ThemeProvider, {
11771
+ theme: theme2,
11772
+ children: /* @__PURE__ */ jsx(DragOverlay, {
11773
+ dropAnimation: {
11774
+ duration: 200,
11775
+ easing: "ease"
11776
+ },
11777
+ children: activeTask ? /* @__PURE__ */ jsx(TaskCard, {
11778
+ task: activeTask,
11779
+ isDragOverlay: true
11780
+ }) : null
11781
+ })
11751
11782
  }), document.body)]
11752
11783
  }) : (
11753
11784
  /* Milestones View - Two Column Layout */
@@ -56018,6 +56049,7 @@ var DocumentView = ({
56018
56049
  content: content2,
56019
56050
  onCheckboxChange,
56020
56051
  maxWidth = "900px",
56052
+ width,
56021
56053
  slideIdPrefix = "document",
56022
56054
  enableHtmlPopout = true,
56023
56055
  enableKeyboardScrolling = true,
@@ -56062,7 +56094,8 @@ var DocumentView = ({
56062
56094
  handlePromptCopy,
56063
56095
  repositoryInfo,
56064
56096
  transparentBackground,
56065
- editable
56097
+ editable,
56098
+ containerWidth: width
56066
56099
  })));
56067
56100
  };
56068
56101
  function getGitHubIssueFromRefs(references) {
@@ -56183,7 +56216,7 @@ const TaskDetailPanel = ({
56183
56216
  actions,
56184
56217
  config
56185
56218
  }) => {
56186
- var _a;
56219
+ var _a, _b;
56187
56220
  const {
56188
56221
  theme: theme2
56189
56222
  } = useTheme();
@@ -56203,8 +56236,7 @@ const TaskDetailPanel = ({
56203
56236
  var _a2;
56204
56237
  return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
56205
56238
  });
56206
- const repoCapabilities = context2.getRepositorySlice("repoCapabilities");
56207
- const hasClaudeWorkflow = ((_a = repoCapabilities == null ? void 0 : repoCapabilities.data) == null ? void 0 : _a.hasClaudeWorkflow) ?? false;
56239
+ const hasClaudeWorkflow = ((_b = (_a = context2.repoCapabilities) == null ? void 0 : _a.data) == null ? void 0 : _b.hasClaudeWorkflow) ?? false;
56208
56240
  const handleAssignToClaude = useCallback(() => {
56209
56241
  if (!events2 || !selectedTask) return;
56210
56242
  const tracer = getTracer();