@industry-theme/github-panels 0.1.58 → 0.1.60

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.
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
5
  import * as React2 from "react";
3
6
  import React2__default, { createContext, useContext, forwardRef, createElement, useState, useRef, useEffect, useCallback, useMemo, useLayoutEffect, useImperativeHandle } from "react";
@@ -1477,6 +1480,101 @@ const RepositoryAvatar = ({
1477
1480
  }
1478
1481
  );
1479
1482
  };
1483
+ createContext(null);
1484
+ class PanelErrorBoundary extends React2__default.Component {
1485
+ constructor(props) {
1486
+ super(props);
1487
+ __publicField(this, "reset", () => {
1488
+ this.setState({ error: null });
1489
+ });
1490
+ this.state = { error: null };
1491
+ }
1492
+ static getDerivedStateFromError(error) {
1493
+ return { error };
1494
+ }
1495
+ componentDidCatch(error, errorInfo) {
1496
+ console.error("Panel error:", error, errorInfo);
1497
+ }
1498
+ render() {
1499
+ if (this.state.error) {
1500
+ const Fallback = this.props.fallback;
1501
+ return /* @__PURE__ */ jsx(Fallback, {
1502
+ error: this.state.error,
1503
+ reset: this.reset
1504
+ });
1505
+ }
1506
+ return this.props.children;
1507
+ }
1508
+ }
1509
+ var PANEL_DATA_MIME_TYPE = "application/x-panel-data";
1510
+ function createDragPreview(content2, options) {
1511
+ const preview = document.createElement("div");
1512
+ preview.style.cssText = `
1513
+ position: absolute;
1514
+ top: -1000px;
1515
+ left: -1000px;
1516
+ padding: 8px 12px;
1517
+ background: ${"#3b82f6"};
1518
+ color: ${"white"};
1519
+ border-radius: 6px;
1520
+ font-size: 12px;
1521
+ box-shadow: 0 2px 8px rgba(0,0,0,0.2);
1522
+ display: flex;
1523
+ align-items: center;
1524
+ gap: 8px;
1525
+ white-space: nowrap;
1526
+ `;
1527
+ const text2 = document.createElement("span");
1528
+ text2.textContent = content2;
1529
+ preview.appendChild(text2);
1530
+ return preview;
1531
+ }
1532
+ function useDraggable(config) {
1533
+ const [isDragging, setIsDragging] = useState(false);
1534
+ const handleDragStart = useCallback((e) => {
1535
+ var _a;
1536
+ setIsDragging(true);
1537
+ e.dataTransfer.setData("text/plain", config.primaryData);
1538
+ const panelData = {
1539
+ sourcePanel: config.sourcePanel || "unknown",
1540
+ dataType: config.dataType,
1541
+ primaryData: config.primaryData,
1542
+ metadata: config.metadata,
1543
+ suggestedActions: config.suggestedActions,
1544
+ version: "1.0"
1545
+ };
1546
+ e.dataTransfer.setData(PANEL_DATA_MIME_TYPE, JSON.stringify(panelData));
1547
+ e.dataTransfer.effectAllowed = "copy";
1548
+ if (e.currentTarget instanceof HTMLElement) {
1549
+ e.currentTarget.style.opacity = "0.5";
1550
+ }
1551
+ if (config.dragPreview) {
1552
+ if (config.dragPreview instanceof HTMLElement) {
1553
+ e.dataTransfer.setDragImage(config.dragPreview, 0, 0);
1554
+ } else {
1555
+ const preview = createDragPreview(config.dragPreview);
1556
+ document.body.appendChild(preview);
1557
+ e.dataTransfer.setDragImage(preview, 0, 0);
1558
+ setTimeout(() => document.body.removeChild(preview), 0);
1559
+ }
1560
+ }
1561
+ (_a = config.onDragStart) == null ? void 0 : _a.call(config, e);
1562
+ }, [config]);
1563
+ const handleDragEnd = useCallback((e) => {
1564
+ var _a;
1565
+ setIsDragging(false);
1566
+ if (e.currentTarget instanceof HTMLElement) {
1567
+ e.currentTarget.style.opacity = "1";
1568
+ }
1569
+ (_a = config.onDragEnd) == null ? void 0 : _a.call(config, e);
1570
+ }, [config]);
1571
+ return {
1572
+ draggable: true,
1573
+ onDragStart: handleDragStart,
1574
+ onDragEnd: handleDragEnd,
1575
+ isDragging
1576
+ };
1577
+ }
1480
1578
  const GitHubRepositoryCard = ({
1481
1579
  repository,
1482
1580
  localRepo,
@@ -1492,6 +1590,23 @@ const GitHubRepositoryCard = ({
1492
1590
  const { theme: theme2 } = useTheme();
1493
1591
  const [isHovered, setIsHovered] = useState(false);
1494
1592
  const isCloned = Boolean(localRepo);
1593
+ const { isDragging, ...dragProps } = useDraggable({
1594
+ dataType: "repository-github",
1595
+ primaryData: repository.full_name,
1596
+ metadata: {
1597
+ name: repository.name,
1598
+ owner: repository.owner.login,
1599
+ description: repository.description,
1600
+ language: repository.language,
1601
+ stars: repository.stargazers_count,
1602
+ isPrivate: repository.private,
1603
+ htmlUrl: repository.html_url,
1604
+ cloneUrl: repository.clone_url
1605
+ },
1606
+ suggestedActions: ["add-to-collection"],
1607
+ sourcePanel: "github-repositories",
1608
+ dragPreview: repository.full_name
1609
+ });
1495
1610
  const handleClone = useCallback(
1496
1611
  (e) => {
1497
1612
  e.stopPropagation();
@@ -1549,6 +1664,7 @@ const GitHubRepositoryCard = ({
1549
1664
  onClick: handleClick,
1550
1665
  onMouseEnter: () => setIsHovered(true),
1551
1666
  onMouseLeave: () => setIsHovered(false),
1667
+ ...isInCollection ? {} : dragProps,
1552
1668
  style: {
1553
1669
  display: "flex",
1554
1670
  alignItems: "flex-start",
@@ -1557,8 +1673,9 @@ const GitHubRepositoryCard = ({
1557
1673
  borderRadius: "8px",
1558
1674
  backgroundColor: isSelected ? `${theme2.colors.primary}15` : isHovered ? theme2.colors.backgroundTertiary : "transparent",
1559
1675
  border: `1px solid ${isSelected ? theme2.colors.primary : "transparent"}`,
1560
- cursor: onSelect ? "pointer" : "default",
1561
- transition: "background-color 0.15s, border-color 0.15s"
1676
+ cursor: isInCollection ? "not-allowed" : isDragging ? "grabbing" : onSelect ? "grab" : "default",
1677
+ opacity: isDragging ? 0.5 : isInCollection ? 0.7 : 1,
1678
+ transition: "background-color 0.15s, border-color 0.15s, opacity 0.15s"
1562
1679
  },
1563
1680
  children: [
1564
1681
  /* @__PURE__ */ jsx(
@@ -2667,14 +2784,14 @@ function determinePivotIndices$1(groupId, dragHandleId, panelGroupElement) {
2667
2784
  const index2 = getResizeHandleElementIndex$1(groupId, dragHandleId, panelGroupElement);
2668
2785
  return index2 != null ? [index2, index2 + 1] : [-1, -1];
2669
2786
  }
2670
- function isHTMLElement(target) {
2787
+ function isHTMLElement$1(target) {
2671
2788
  if (target instanceof HTMLElement) {
2672
2789
  return true;
2673
2790
  }
2674
2791
  return typeof target === "object" && target !== null && "tagName" in target && "getAttribute" in target;
2675
2792
  }
2676
2793
  function getPanelGroupElement$1(id, rootElement = document) {
2677
- if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id) {
2794
+ if (isHTMLElement$1(rootElement) && rootElement.dataset.panelGroupId == id) {
2678
2795
  return rootElement;
2679
2796
  }
2680
2797
  const element2 = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
@@ -3683,11 +3800,11 @@ function panelDataHelper$1(panelDataArray, panelData, layout) {
3683
3800
  pivotIndices
3684
3801
  };
3685
3802
  }
3686
- function C(e) {
3803
+ function C$1(e) {
3687
3804
  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" };
3688
3805
  }
3689
- const z = 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) => {
3690
- const b = useRef(null), y = C(d);
3806
+ 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) => {
3807
+ const b = useRef(null), y = C$1(d);
3691
3808
  useImperativeHandle(v, () => ({ scrollToPanel: (e) => {
3692
3809
  if (!b.current) return;
3693
3810
  const t = b.current, n = t.children[e];
@@ -3717,8 +3834,8 @@ const z = forwardRef(({ panels: o, className: a = "", style: s2, theme: d, minPa
3717
3834
  };
3718
3835
  }, [f]);
3719
3836
  const w = o.length, x = 2 * u;
3720
- let S2;
3721
- S2 = 1 === w || 2 === w ? "100%" : `max(${u}px, ${100 * p2}%)`;
3837
+ let S;
3838
+ S = 1 === w || 2 === w ? "100%" : `max(${u}px, ${100 * p2}%)`;
3722
3839
  const R = React2__default.useId().replace(/:/g, "_");
3723
3840
  return jsxs(Fragment, { children: [
3724
3841
  2 === w && /* @__PURE__ */ jsx("style", { children: `
@@ -3731,7 +3848,7 @@ const z = forwardRef(({ panels: o, className: a = "", style: s2, theme: d, minPa
3731
3848
  }
3732
3849
  }
3733
3850
  ` }),
3734
- /* @__PURE__ */ jsx("div", { ref: b, className: `snap-carousel-container ${g ? "swipe-disabled" : ""} ${a}`, style: { ...y, ...s2, "--snap-carousel-min-width": `${u}px`, "--snap-carousel-ideal-width": 100 * p2 + "%", "--snap-carousel-gap": h2 ? "1px" : "0px", "--snap-carousel-panel-width": S2, "--snap-carousel-panel-count": w, "--snap-carousel-two-panel-threshold": `${x}px` }, onScroll: (e) => {
3851
+ /* @__PURE__ */ jsx("div", { ref: b, className: `snap-carousel-container ${g ? "swipe-disabled" : ""} ${a}`, style: { ...y, ...s2, "--snap-carousel-min-width": `${u}px`, "--snap-carousel-ideal-width": 100 * p2 + "%", "--snap-carousel-gap": h2 ? "1px" : "0px", "--snap-carousel-panel-width": S, "--snap-carousel-panel-count": w, "--snap-carousel-two-panel-threshold": `${x}px` }, onScroll: (e) => {
3735
3852
  if (!m || !b.current || 0 === b.current.children.length) return;
3736
3853
  const t = b.current, n = t.getBoundingClientRect().left;
3737
3854
  let r2 = 0, o2 = 1 / 0;
@@ -3743,41 +3860,41 @@ const z = forwardRef(({ panels: o, className: a = "", style: s2, theme: d, minPa
3743
3860
  }, "data-panel-count": w, "data-carousel-id": R, children: o.map((t, n) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t }, n)) })
3744
3861
  ] });
3745
3862
  });
3746
- z.displayName = "SnapCarousel";
3747
- var le$1, se$1;
3748
- (se$1 = le$1 || (le$1 = {})).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";
3749
- const de = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
3750
- var Te$1, Ae;
3751
- (Ae = Te$1 || (Te$1 = {}))[Ae.Forward = 1] = "Forward", Ae[Ae.Backward = -1] = "Backward";
3752
- var _e$1, je$1, He$1, Ke$1;
3753
- (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";
3863
+ z$1.displayName = "SnapCarousel";
3864
+ var le$2, se$1;
3865
+ (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";
3866
+ const de$1 = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
3867
+ var Te$1, Ae$1;
3868
+ (Ae$1 = Te$1 || (Te$1 = {}))[Ae$1.Forward = 1] = "Forward", Ae$1[Ae$1.Backward = -1] = "Backward";
3869
+ var _e$2, je$1, He$1, Ke$1;
3870
+ (je$1 = _e$2 || (_e$2 = {})).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";
3754
3871
  ({ start: [He$1.Space, He$1.Enter], cancel: [He$1.Esc], end: [He$1.Space, He$1.Enter, He$1.Tab] });
3755
- var rt, ot$1;
3756
- (ot$1 = rt || (rt = {}))[ot$1.RightClick = 2] = "RightClick";
3757
- var at, lt$1, st$1, ct$1;
3758
- (lt$1 = at || (at = {}))[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";
3872
+ var rt$1, ot$1;
3873
+ (ot$1 = rt$1 || (rt$1 = {}))[ot$1.RightClick = 2] = "RightClick";
3874
+ var at$1, lt$1, st$1, ct$1;
3875
+ (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";
3759
3876
  ({ x: { [Te$1.Backward]: false, [Te$1.Forward]: false }, y: { [Te$1.Backward]: false, [Te$1.Forward]: false } });
3760
- var pt, ht$1, mt$1;
3761
- (ht$1 = pt || (pt = {}))[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";
3762
- ({ droppable: { strategy: pt.WhileDragging, frequency: mt$1.Optimized } });
3763
- /* @__PURE__ */ createContext({ ...de, scaleX: 1, scaleY: 1 });
3764
- var $t, Bt$1;
3765
- (Bt$1 = $t || ($t = {}))[Bt$1.Uninitialized = 0] = "Uninitialized", Bt$1[Bt$1.Initializing = 1] = "Initializing", Bt$1[Bt$1.Initialized = 2] = "Initialized";
3766
- var Ut;
3877
+ var pt$1, ht$1, mt$1;
3878
+ (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";
3879
+ ({ droppable: { strategy: pt$1.WhileDragging, frequency: mt$1.Optimized } });
3880
+ /* @__PURE__ */ createContext({ ...de$1, scaleX: 1, scaleY: 1 });
3881
+ var $t$1, Bt$1;
3882
+ (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";
3883
+ var Ut$1;
3767
3884
  (() => {
3768
3885
  if ("undefined" != typeof window) {
3769
3886
  const e = window;
3770
3887
  return e.__principlemd_theme_context__ || (e.__principlemd_theme_context__ = createContext(void 0)), e.__principlemd_theme_context__;
3771
3888
  }
3772
- return Ut || (Ut = createContext(void 0)), Ut;
3889
+ return Ut$1 || (Ut$1 = createContext(void 0)), Ut$1;
3773
3890
  })();
3774
- var _e = Object.defineProperty;
3775
- var Ee = (o, e, t) => e in o ? _e(o, e, { enumerable: true, configurable: true, writable: true, value: t }) : o[e] = t;
3776
- var le = (o, e, t) => Ee(o, typeof e != "symbol" ? e + "" : e, t);
3891
+ var _e$1 = Object.defineProperty;
3892
+ var Ee = (o, e, t) => e in o ? _e$1(o, e, { enumerable: true, configurable: true, writable: true, value: t }) : o[e] = t;
3893
+ var le$1 = (o, e, t) => Ee(o, typeof e != "symbol" ? e + "" : e, t);
3777
3894
  class De {
3778
3895
  constructor() {
3779
- le(this, "PRESETS_KEY", "panel-layouts:workspace-presets");
3780
- le(this, "REPO_STATE_PREFIX", "panel-layouts:repo-state:");
3896
+ le$1(this, "PRESETS_KEY", "panel-layouts:workspace-presets");
3897
+ le$1(this, "REPO_STATE_PREFIX", "panel-layouts:repo-state:");
3781
3898
  }
3782
3899
  /**
3783
3900
  * Load all user-created workspace presets
@@ -4244,7 +4361,7 @@ class O {
4244
4361
  Object.keys(e).length;
4245
4362
  }
4246
4363
  }
4247
- le(O, "adapter", new De());
4364
+ le$1(O, "adapter", new De());
4248
4365
  function gt(o, e, t, r2) {
4249
4366
  useEffect(() => {
4250
4367
  const s2 = e.on(
@@ -44329,6 +44446,96 @@ var TransformComponent = function(_a) {
44329
44446
  React2__default.createElement("div", __assign({}, contentProps, { ref: contentRef, className: "".concat(baseClasses.contentClass, " ").concat(styles.content, " ").concat(contentClass), style: contentStyle }), children2)
44330
44447
  );
44331
44448
  };
44449
+ var isInjected = false;
44450
+ function injectHighlightStyles() {
44451
+ if (isInjected || typeof document === "undefined") {
44452
+ return;
44453
+ }
44454
+ const existingStyle = document.getElementById("themed-markdown-highlight-css");
44455
+ if (existingStyle) {
44456
+ isInjected = true;
44457
+ return;
44458
+ }
44459
+ const css2 = `
44460
+ pre code.hljs {
44461
+ display: block;
44462
+ overflow-x: auto;
44463
+ padding: 1em
44464
+ }
44465
+ code.hljs {
44466
+ padding: 3px 5px
44467
+ }
44468
+
44469
+ .hljs {
44470
+ color: #abb2bf;
44471
+ background: #282c34
44472
+ }
44473
+ .hljs-comment,
44474
+ .hljs-quote {
44475
+ color: #5c6370;
44476
+ font-style: italic
44477
+ }
44478
+ .hljs-doctag,
44479
+ .hljs-keyword,
44480
+ .hljs-formula {
44481
+ color: #c678dd
44482
+ }
44483
+ .hljs-section,
44484
+ .hljs-name,
44485
+ .hljs-selector-tag,
44486
+ .hljs-deletion,
44487
+ .hljs-subst {
44488
+ color: #e06c75
44489
+ }
44490
+ .hljs-literal {
44491
+ color: #56b6c2
44492
+ }
44493
+ .hljs-string,
44494
+ .hljs-regexp,
44495
+ .hljs-addition,
44496
+ .hljs-attribute,
44497
+ .hljs-meta .hljs-string {
44498
+ color: #98c379
44499
+ }
44500
+ .hljs-attr,
44501
+ .hljs-variable,
44502
+ .hljs-template-variable,
44503
+ .hljs-type,
44504
+ .hljs-selector-class,
44505
+ .hljs-selector-attr,
44506
+ .hljs-selector-pseudo,
44507
+ .hljs-number {
44508
+ color: #d19a66
44509
+ }
44510
+ .hljs-symbol,
44511
+ .hljs-bullet,
44512
+ .hljs-link,
44513
+ .hljs-meta,
44514
+ .hljs-selector-id,
44515
+ .hljs-title {
44516
+ color: #61aeee
44517
+ }
44518
+ .hljs-built_in,
44519
+ .hljs-title.class_,
44520
+ .hljs-class .hljs-title {
44521
+ color: #e6c07b
44522
+ }
44523
+ .hljs-emphasis {
44524
+ font-style: italic
44525
+ }
44526
+ .hljs-strong {
44527
+ font-weight: bold
44528
+ }
44529
+ .hljs-link {
44530
+ text-decoration: underline
44531
+ }`;
44532
+ const styleElement = document.createElement("style");
44533
+ styleElement.id = "themed-markdown-highlight-css";
44534
+ styleElement.textContent = css2;
44535
+ document.head.appendChild(styleElement);
44536
+ isInjected = true;
44537
+ }
44538
+ injectHighlightStyles();
44332
44539
  var terminalTheme = {
44333
44540
  space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
44334
44541
  fonts: {
@@ -44366,52 +44573,53 @@ var terminalTheme = {
44366
44573
  zIndices: [0, 1, 10, 20, 30, 40, 50],
44367
44574
  colors: {
44368
44575
  text: "#e4e4e4",
44369
- background: "rgba(10, 10, 10, 0.85)",
44576
+ background: "#0a0a0a",
44370
44577
  primary: "#66b3ff",
44371
44578
  secondary: "#80c4ff",
44372
44579
  accent: "#66ff99",
44373
- highlight: "rgba(102, 179, 255, 0.15)",
44374
- muted: "rgba(26, 26, 26, 0.8)",
44580
+ highlight: "#18283d",
44581
+ muted: "#1a1a1a",
44375
44582
  success: "#66ff99",
44376
44583
  warning: "#ffcc66",
44377
44584
  error: "#ff6666",
44378
44585
  info: "#66b3ff",
44379
- border: "rgba(255, 255, 255, 0.1)",
44380
- backgroundSecondary: "rgba(15, 15, 15, 0.9)",
44381
- backgroundTertiary: "rgba(20, 20, 20, 0.9)",
44382
- backgroundLight: "rgba(255, 255, 255, 0.05)",
44383
- backgroundHover: "rgba(102, 179, 255, 0.08)",
44384
- surface: "rgba(15, 15, 15, 0.95)",
44385
- textSecondary: "rgba(255, 255, 255, 0.7)",
44386
- textTertiary: "rgba(255, 255, 255, 0.5)",
44387
- textMuted: "rgba(255, 255, 255, 0.4)",
44388
- highlightBg: "rgba(255, 235, 59, 0.25)",
44389
- highlightBorder: "rgba(255, 235, 59, 0.5)"
44586
+ border: "#1a1a1a",
44587
+ backgroundSecondary: "#0f0f0f",
44588
+ backgroundTertiary: "#141414",
44589
+ backgroundLight: "#0d0d0d",
44590
+ backgroundHover: "#0d1520",
44591
+ surface: "#0f0f0f",
44592
+ textSecondary: "#b3b3b3",
44593
+ textTertiary: "#808080",
44594
+ textMuted: "#666666",
44595
+ highlightBg: "#40391e",
44596
+ highlightBorder: "#7f7530",
44597
+ textOnPrimary: "#ffffff"
44390
44598
  },
44391
44599
  modes: {
44392
44600
  light: {
44393
44601
  text: "#1a1a1a",
44394
- background: "rgba(255, 255, 255, 0.9)",
44602
+ background: "#ffffff",
44395
44603
  primary: "#0066cc",
44396
44604
  secondary: "#0052a3",
44397
44605
  accent: "#00cc88",
44398
- highlight: "rgba(0, 102, 204, 0.08)",
44399
- muted: "rgba(245, 245, 245, 0.8)",
44606
+ highlight: "#e6f2ff",
44607
+ muted: "#f5f5f5",
44400
44608
  success: "#00cc88",
44401
44609
  warning: "#ffaa00",
44402
44610
  error: "#ff3333",
44403
44611
  info: "#0066cc",
44404
- border: "rgba(0, 0, 0, 0.1)",
44405
- backgroundSecondary: "rgba(250, 250, 250, 0.9)",
44406
- backgroundTertiary: "rgba(245, 245, 245, 0.9)",
44407
- backgroundLight: "rgba(0, 0, 0, 0.02)",
44408
- backgroundHover: "rgba(0, 102, 204, 0.04)",
44409
- surface: "rgba(255, 255, 255, 0.95)",
44410
- textSecondary: "rgba(0, 0, 0, 0.6)",
44411
- textTertiary: "rgba(0, 0, 0, 0.4)",
44412
- textMuted: "rgba(0, 0, 0, 0.3)",
44413
- highlightBg: "rgba(255, 235, 59, 0.3)",
44414
- highlightBorder: "rgba(255, 235, 59, 0.6)"
44612
+ border: "#e6e6e6",
44613
+ backgroundSecondary: "#fafafa",
44614
+ backgroundTertiary: "#f5f5f5",
44615
+ backgroundLight: "#fafafa",
44616
+ backgroundHover: "#f5f9fd",
44617
+ surface: "#ffffff",
44618
+ textSecondary: "#666666",
44619
+ textTertiary: "#999999",
44620
+ textMuted: "#b3b3b3",
44621
+ highlightBg: "#fff9c4",
44622
+ highlightBorder: "#fff389"
44415
44623
  }
44416
44624
  },
44417
44625
  buttons: {
@@ -45728,8 +45936,8 @@ var createIndustryMarkdownComponents = ({
45728
45936
  };
45729
45937
  const darkMode = getLuminance(theme2.colors.background) < 0.5;
45730
45938
  const headerStyles = {};
45731
- if (index2 === 0 && slideHeaderMarginTopOverride) {
45732
- headerStyles.marginTop = `${slideHeaderMarginTopOverride}px`;
45939
+ if (index2 === 0) {
45940
+ headerStyles.marginTop = slideHeaderMarginTopOverride ? `${slideHeaderMarginTopOverride}px` : 0;
45733
45941
  }
45734
45942
  return {
45735
45943
  h1: ({ children: children2, ...props }) => /* @__PURE__ */ React2__default.createElement("h1", {
@@ -46915,29 +47123,25 @@ var fontTransitionCSS = `
46915
47123
  font-size: 1rem !important; /* Fixed size for checkbox labels */
46916
47124
  }
46917
47125
 
46918
- /* Remove top margin from headings when they're the first element */
46919
- .markdown-slide > :first-child h1:first-child,
46920
- .markdown-slide > :first-child h2:first-child,
46921
- .markdown-slide > :first-child h3:first-child,
46922
- .markdown-slide > :first-child h4:first-child,
46923
- .markdown-slide > :first-child h5:first-child,
46924
- .markdown-slide > :first-child h6:first-child {
47126
+ /* Remove top margin from any first element - must override inline styles */
47127
+ .markdown-slide > *:first-child,
47128
+ .markdown-slide > *:first-child > *:first-child {
46925
47129
  margin-top: 0 !important;
46926
47130
  }
46927
-
46928
- /* Also handle when heading is inside the first paragraph/div from ReactMarkdown */
46929
- .markdown-slide > div:first-child > h1:first-child,
46930
- .markdown-slide > div:first-child > h2:first-child,
46931
- .markdown-slide > div:first-child > h3:first-child,
46932
- .markdown-slide > div:first-child > h4:first-child,
46933
- .markdown-slide > div:first-child > h5:first-child,
46934
- .markdown-slide > div:first-child > h6:first-child,
46935
- .markdown-slide > p:first-child > h1:first-child,
46936
- .markdown-slide > p:first-child > h2:first-child,
46937
- .markdown-slide > p:first-child > h3:first-child,
46938
- .markdown-slide > p:first-child > h4:first-child,
46939
- .markdown-slide > p:first-child > h5:first-child,
46940
- .markdown-slide > p:first-child > h6:first-child {
47131
+
47132
+ /* Specifically target all possible first-child elements */
47133
+ .markdown-slide > h1:first-child,
47134
+ .markdown-slide > h2:first-child,
47135
+ .markdown-slide > h3:first-child,
47136
+ .markdown-slide > h4:first-child,
47137
+ .markdown-slide > h5:first-child,
47138
+ .markdown-slide > h6:first-child,
47139
+ .markdown-slide > p:first-child,
47140
+ .markdown-slide > ul:first-child,
47141
+ .markdown-slide > ol:first-child,
47142
+ .markdown-slide > div:first-child,
47143
+ .markdown-slide > blockquote:first-child,
47144
+ .markdown-slide > pre:first-child {
46941
47145
  margin-top: 0 !important;
46942
47146
  }
46943
47147
  `;
@@ -47663,7 +47867,6 @@ var panelConstraintFlags = /* @__PURE__ */ new Map();
47663
47867
  function reportConstraintsViolation(resizeHandleId, flag) {
47664
47868
  panelConstraintFlags.set(resizeHandleId, flag);
47665
47869
  }
47666
- new AbortController();
47667
47870
  function useForceUpdate() {
47668
47871
  const [_, setCount] = useState(0);
47669
47872
  return useCallback(() => setCount((prevCount) => prevCount + 1), []);
@@ -47827,7 +48030,7 @@ function adjustLayoutByDelta({
47827
48030
  if (!fuzzyNumbersEqual(prevSize, safeSize)) {
47828
48031
  deltaApplied += prevSize - safeSize;
47829
48032
  nextLayout[index2] = safeSize;
47830
- if (deltaApplied.toPrecision(3).localeCompare(Math.abs(delta).toPrecision(3), void 0, {
48033
+ if (deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), void 0, {
47831
48034
  numeric: true
47832
48035
  }) >= 0) {
47833
48036
  break;
@@ -47936,9 +48139,14 @@ function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
47936
48139
  const index2 = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
47937
48140
  return index2 != null ? [index2, index2 + 1] : [-1, -1];
47938
48141
  }
48142
+ function isHTMLElement(target) {
48143
+ if (target instanceof HTMLElement) {
48144
+ return true;
48145
+ }
48146
+ return typeof target === "object" && target !== null && "tagName" in target && "getAttribute" in target;
48147
+ }
47939
48148
  function getPanelGroupElement(id, rootElement = document) {
47940
- var _dataset;
47941
- if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) {
48149
+ if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id) {
47942
48150
  return rootElement;
47943
48151
  }
47944
48152
  const element2 = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
@@ -48256,11 +48464,11 @@ function computePanelFlexBoxStyle({
48256
48464
  const size = layout[panelIndex];
48257
48465
  let flexGrow;
48258
48466
  if (size == null) {
48259
- flexGrow = defaultSize != null ? defaultSize.toPrecision(precision) : "1";
48467
+ flexGrow = defaultSize != null ? defaultSize.toFixed(precision) : "1";
48260
48468
  } else if (panelData.length === 1) {
48261
48469
  flexGrow = "1";
48262
48470
  } else {
48263
- flexGrow = size.toPrecision(precision);
48471
+ flexGrow = size.toFixed(precision);
48264
48472
  }
48265
48473
  return {
48266
48474
  flexBasis: 0,
@@ -49042,23 +49250,26 @@ function panelDataHelper(panelDataArray, panelData, layout) {
49042
49250
  pivotIndices
49043
49251
  };
49044
49252
  }
49045
- function S(e2) {
49253
+ function C(e2) {
49046
49254
  return { "--panel-background": e2.colors.background, "--panel-border": e2.colors.border, "--panel-handle": e2.colors.backgroundSecondary, "--panel-handle-hover": e2.colors.backgroundHover, "--panel-handle-active": e2.colors.primary, "--panel-button-bg": e2.colors.surface, "--panel-button-hover": e2.colors.backgroundHover, "--panel-button-border": e2.colors.border, "--panel-button-icon": e2.colors.textSecondary, "--panel-accent-bg": e2.colors.primary + "15" };
49047
49255
  }
49048
- var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minPanelWidth: u2 = 350, idealPanelWidth: p2 = 0.333, showSeparator: h2 = false, onPanelChange: m2, preventKeyboardScroll: f2 = true }, g) => {
49049
- const v = useRef(null), b = S(d2);
49050
- useImperativeHandle(g, () => ({ scrollToPanel: (e2) => {
49051
- if (!v.current)
49256
+ var z = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minPanelWidth: u2 = 350, idealPanelWidth: p2 = 0.333, showSeparator: h2 = false, onPanelChange: m2, preventKeyboardScroll: f2 = true, disableSwipe: g = false }, v) => {
49257
+ const b = useRef(null), y2 = useRef(false), w2 = useRef(null), x2 = C(d2);
49258
+ useImperativeHandle(v, () => ({ scrollToPanel: (e2) => {
49259
+ if (!b.current)
49052
49260
  return;
49053
- const t2 = v.current, n2 = t2.children[e2];
49261
+ const t2 = b.current, n2 = t2.children[e2];
49054
49262
  if (n2) {
49263
+ y2.current = true, w2.current && clearTimeout(w2.current);
49055
49264
  const e3 = n2.offsetLeft;
49056
- t2.scrollTo({ left: e3, behavior: "smooth" });
49265
+ t2.scrollTo({ left: e3, behavior: "smooth" }), w2.current = setTimeout(() => {
49266
+ y2.current = false;
49267
+ }, 500);
49057
49268
  }
49058
49269
  }, getCurrentPanel: () => {
49059
- if (!v.current || v.current.children.length === 0)
49270
+ if (!b.current || b.current.children.length === 0)
49060
49271
  return 0;
49061
- const e2 = v.current, t2 = e2.getBoundingClientRect().left;
49272
+ const e2 = b.current, t2 = e2.getBoundingClientRect().left;
49062
49273
  let n2 = 0, r2 = 1 / 0;
49063
49274
  for (let o3 = 0; o3 < e2.children.length; o3++) {
49064
49275
  const i2 = e2.children[o3].getBoundingClientRect(), a3 = Math.abs(i2.left - t2);
@@ -49067,9 +49278,9 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
49067
49278
  return n2;
49068
49279
  } }));
49069
49280
  useEffect(() => {
49070
- if (!f2 || !v.current)
49281
+ if (!f2 || !b.current)
49071
49282
  return;
49072
- const e2 = v.current, t2 = (e3) => {
49283
+ const e2 = b.current, t2 = (e3) => {
49073
49284
  const t3 = e3.target;
49074
49285
  if (t3.tagName === "INPUT" || t3.tagName === "TEXTAREA" || t3.tagName === "SELECT" || t3.isContentEditable || t3.closest(".xterm") !== null || t3.closest('[contenteditable="true"]') !== null)
49075
49286
  return;
@@ -49078,74 +49289,78 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
49078
49289
  return e2.addEventListener("keydown", t2), () => {
49079
49290
  e2.removeEventListener("keydown", t2);
49080
49291
  };
49081
- }, [f2]);
49082
- const y2 = o2.length, w2 = 2 * u2;
49083
- let x2;
49084
- x2 = y2 === 1 || y2 === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
49085
- const C2 = React2__default.useId().replace(/:/g, "_");
49292
+ }, [f2]), useEffect(() => () => {
49293
+ w2.current && clearTimeout(w2.current);
49294
+ }, []);
49295
+ const S = o2.length, R2 = 2 * u2;
49296
+ let N;
49297
+ N = S === 1 || S === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
49298
+ const E = React2__default.useId().replace(/:/g, "_");
49086
49299
  return jsxs(Fragment, { children: [
49087
- y2 === 2 && /* @__PURE__ */ jsx("style", { children: `
49088
- .snap-carousel-container[data-carousel-id="${C2}"][data-panel-count="2"] .snap-carousel-panel {
49300
+ S === 2 && /* @__PURE__ */ jsx("style", { children: `
49301
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
49089
49302
  width: 100%;
49090
49303
  }
49091
- @container (min-width: ${w2}px) {
49092
- .snap-carousel-container[data-carousel-id="${C2}"][data-panel-count="2"] .snap-carousel-panel {
49304
+ @container (min-width: ${R2}px) {
49305
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
49093
49306
  width: 50%;
49094
49307
  }
49095
49308
  }
49096
49309
  ` }),
49097
- /* @__PURE__ */ jsx("div", { ref: v, className: `snap-carousel-container ${a2}`, style: { ...b, ...s2, "--snap-carousel-min-width": `${u2}px`, "--snap-carousel-ideal-width": 100 * p2 + "%", "--snap-carousel-gap": h2 ? "1px" : "0px", "--snap-carousel-panel-width": x2, "--snap-carousel-panel-count": y2, "--snap-carousel-two-panel-threshold": `${w2}px` }, onScroll: (e2) => {
49098
- if (!m2 || !v.current || v.current.children.length === 0)
49310
+ /* @__PURE__ */ jsx("div", { ref: b, className: `snap-carousel-container ${g ? "swipe-disabled" : ""} ${a2}`, style: { ...x2, ...s2, "--snap-carousel-min-width": `${u2}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": `${R2}px` }, onScroll: (e2) => {
49311
+ if (!m2 || !b.current || b.current.children.length === 0)
49312
+ return;
49313
+ if (y2.current)
49099
49314
  return;
49100
- const t2 = v.current, n2 = t2.getBoundingClientRect().left;
49315
+ const t2 = b.current, n2 = t2.getBoundingClientRect().left;
49101
49316
  let r2 = 0, o3 = 1 / 0;
49102
49317
  for (let i2 = 0; i2 < t2.children.length; i2++) {
49103
49318
  const e3 = t2.children[i2].getBoundingClientRect(), a3 = Math.abs(e3.left - n2);
49104
49319
  a3 < o3 && (o3 = a3, r2 = i2);
49105
49320
  }
49106
49321
  m2(r2);
49107
- }, "data-panel-count": y2, "data-carousel-id": C2, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
49322
+ }, "data-panel-count": S, "data-carousel-id": E, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
49108
49323
  ] });
49109
49324
  });
49110
- M.displayName = "SnapCarousel";
49325
+ z.displayName = "SnapCarousel";
49326
+ var le;
49111
49327
  var se;
49112
- var ce;
49113
- (ce = se || (se = {})).DragStart = "dragStart", ce.DragMove = "dragMove", ce.DragEnd = "dragEnd", ce.DragCancel = "dragCancel", ce.DragOver = "dragOver", ce.RegisterDroppable = "registerDroppable", ce.SetDroppableDisabled = "setDroppableDisabled", ce.UnregisterDroppable = "unregisterDroppable";
49114
- var ue = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
49328
+ (se = le || (le = {})).DragStart = "dragStart", se.DragMove = "dragMove", se.DragEnd = "dragEnd", se.DragCancel = "dragCancel", se.DragOver = "dragOver", se.RegisterDroppable = "registerDroppable", se.SetDroppableDisabled = "setDroppableDisabled", se.UnregisterDroppable = "unregisterDroppable";
49329
+ var de = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
49115
49330
  var Te;
49116
- var ke;
49117
- (ke = Te || (Te = {}))[ke.Forward = 1] = "Forward", ke[ke.Backward = -1] = "Backward";
49331
+ var Ae;
49332
+ (Ae = Te || (Te = {}))[Ae.Forward = 1] = "Forward", Ae[Ae.Backward = -1] = "Backward";
49333
+ var _e;
49118
49334
  var je;
49119
49335
  var He;
49120
49336
  var Ke;
49121
- var Ue;
49122
- (He = je || (je = {})).Click = "click", He.DragStart = "dragstart", He.Keydown = "keydown", He.ContextMenu = "contextmenu", He.Resize = "resize", He.SelectionChange = "selectionchange", He.VisibilityChange = "visibilitychange", (Ue = Ke || (Ke = {})).Space = "Space", Ue.Down = "ArrowDown", Ue.Right = "ArrowRight", Ue.Left = "ArrowLeft", Ue.Up = "ArrowUp", Ue.Esc = "Escape", Ue.Enter = "Enter", Ue.Tab = "Tab";
49123
- ({ start: [Ke.Space, Ke.Enter], cancel: [Ke.Esc], end: [Ke.Space, Ke.Enter, Ke.Tab] });
49337
+ (je = _e || (_e = {})).Click = "click", je.DragStart = "dragstart", je.Keydown = "keydown", je.ContextMenu = "contextmenu", je.Resize = "resize", je.SelectionChange = "selectionchange", je.VisibilityChange = "visibilitychange", (Ke = He || (He = {})).Space = "Space", Ke.Down = "ArrowDown", Ke.Right = "ArrowRight", Ke.Left = "ArrowLeft", Ke.Up = "ArrowUp", Ke.Esc = "Escape", Ke.Enter = "Enter", Ke.Tab = "Tab";
49338
+ ({ start: [He.Space, He.Enter], cancel: [He.Esc], end: [He.Space, He.Enter, He.Tab] });
49339
+ var rt;
49124
49340
  var ot;
49125
- var it;
49126
- (it = ot || (ot = {}))[it.RightClick = 2] = "RightClick";
49341
+ (ot = rt || (rt = {}))[ot.RightClick = 2] = "RightClick";
49342
+ var at;
49127
49343
  var lt;
49128
49344
  var st;
49129
49345
  var ct;
49130
- var dt;
49131
- (st = lt || (lt = {}))[st.Pointer = 0] = "Pointer", st[st.DraggableRect = 1] = "DraggableRect", (dt = ct || (ct = {}))[dt.TreeOrder = 0] = "TreeOrder", dt[dt.ReversedTreeOrder = 1] = "ReversedTreeOrder";
49346
+ (lt = at || (at = {}))[lt.Pointer = 0] = "Pointer", lt[lt.DraggableRect = 1] = "DraggableRect", (ct = st || (st = {}))[ct.TreeOrder = 0] = "TreeOrder", ct[ct.ReversedTreeOrder = 1] = "ReversedTreeOrder";
49132
49347
  ({ x: { [Te.Backward]: false, [Te.Forward]: false }, y: { [Te.Backward]: false, [Te.Forward]: false } });
49348
+ var pt;
49133
49349
  var ht;
49134
49350
  var mt;
49135
- var ft;
49136
- (mt = ht || (ht = {}))[mt.Always = 0] = "Always", mt[mt.BeforeDragging = 1] = "BeforeDragging", mt[mt.WhileDragging = 2] = "WhileDragging", (ft || (ft = {})).Optimized = "optimized";
49137
- ({ droppable: { strategy: ht.WhileDragging, frequency: ft.Optimized } });
49138
- /* @__PURE__ */ createContext({ ...ue, scaleX: 1, scaleY: 1 });
49351
+ (ht = pt || (pt = {}))[ht.Always = 0] = "Always", ht[ht.BeforeDragging = 1] = "BeforeDragging", ht[ht.WhileDragging = 2] = "WhileDragging", (mt || (mt = {})).Optimized = "optimized";
49352
+ ({ droppable: { strategy: pt.WhileDragging, frequency: mt.Optimized } });
49353
+ /* @__PURE__ */ createContext({ ...de, scaleX: 1, scaleY: 1 });
49354
+ var $t;
49139
49355
  var Bt;
49140
- var Ot;
49141
- (Ot = Bt || (Bt = {}))[Ot.Uninitialized = 0] = "Uninitialized", Ot[Ot.Initializing = 1] = "Initializing", Ot[Ot.Initialized = 2] = "Initialized";
49142
- var Vt;
49356
+ (Bt = $t || ($t = {}))[Bt.Uninitialized = 0] = "Uninitialized", Bt[Bt.Initializing = 1] = "Initializing", Bt[Bt.Initialized = 2] = "Initialized";
49357
+ var Ut;
49143
49358
  (() => {
49144
49359
  if (typeof window != "undefined") {
49145
49360
  const e2 = window;
49146
49361
  return e2.__principlemd_theme_context__ || (e2.__principlemd_theme_context__ = createContext(void 0)), e2.__principlemd_theme_context__;
49147
49362
  }
49148
- return Vt || (Vt = createContext(void 0)), Vt;
49363
+ return Ut || (Ut = createContext(void 0)), Ut;
49149
49364
  })();
49150
49365
  var DocumentView = ({
49151
49366
  content: content2,