@industry-theme/markdown-panels 0.2.19 → 0.2.21

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.
@@ -38366,20 +38366,20 @@ class EditMap {
38366
38366
  this.map.length = 0;
38367
38367
  }
38368
38368
  }
38369
- function addImplementation(editMap, at, remove, add) {
38369
+ function addImplementation(editMap, at2, remove, add) {
38370
38370
  let index2 = 0;
38371
38371
  if (remove === 0 && add.length === 0) {
38372
38372
  return;
38373
38373
  }
38374
38374
  while (index2 < editMap.map.length) {
38375
- if (editMap.map[index2][0] === at) {
38375
+ if (editMap.map[index2][0] === at2) {
38376
38376
  editMap.map[index2][1] += remove;
38377
38377
  editMap.map[index2][2].push(...add);
38378
38378
  return;
38379
38379
  }
38380
38380
  index2 += 1;
38381
38381
  }
38382
- editMap.map.push([at, remove, add]);
38382
+ editMap.map.push([at2, remove, add]);
38383
38383
  }
38384
38384
  function gfmTableAlign(events, index2) {
38385
38385
  let inDelimiterRow = false;
@@ -40536,7 +40536,7 @@ var css_248z = ".transform-component-module_wrapper__SPB86 {\n position: relati
40536
40536
  var styles = { "wrapper": "transform-component-module_wrapper__SPB86", "content": "transform-component-module_content__FBWxo" };
40537
40537
  styleInject(css_248z);
40538
40538
  var TransformComponent = function(_a) {
40539
- var children2 = _a.children, _b = _a.wrapperClass, wrapperClass = _b === void 0 ? "" : _b, _c = _a.contentClass, contentClass = _c === void 0 ? "" : _c, wrapperStyle = _a.wrapperStyle, contentStyle = _a.contentStyle, _d = _a.wrapperProps, wrapperProps = _d === void 0 ? {} : _d, _e = _a.contentProps, contentProps = _e === void 0 ? {} : _e;
40539
+ var children2 = _a.children, _b = _a.wrapperClass, wrapperClass = _b === void 0 ? "" : _b, _c = _a.contentClass, contentClass = _c === void 0 ? "" : _c, wrapperStyle = _a.wrapperStyle, contentStyle = _a.contentStyle, _d = _a.wrapperProps, wrapperProps = _d === void 0 ? {} : _d, _e2 = _a.contentProps, contentProps = _e2 === void 0 ? {} : _e2;
40540
40540
  var _f = useContext(Context), init = _f.init, cleanupWindowEvents = _f.cleanupWindowEvents;
40541
40541
  var wrapperRef = useRef(null);
40542
40542
  var contentRef = useRef(null);
@@ -40556,6 +40556,96 @@ var TransformComponent = function(_a) {
40556
40556
  React2__default.createElement("div", __assign({}, contentProps, { ref: contentRef, className: "".concat(baseClasses.contentClass, " ").concat(styles.content, " ").concat(contentClass), style: contentStyle }), children2)
40557
40557
  );
40558
40558
  };
40559
+ var isInjected = false;
40560
+ function injectHighlightStyles() {
40561
+ if (isInjected || typeof document === "undefined") {
40562
+ return;
40563
+ }
40564
+ const existingStyle = document.getElementById("themed-markdown-highlight-css");
40565
+ if (existingStyle) {
40566
+ isInjected = true;
40567
+ return;
40568
+ }
40569
+ const css2 = `
40570
+ pre code.hljs {
40571
+ display: block;
40572
+ overflow-x: auto;
40573
+ padding: 1em
40574
+ }
40575
+ code.hljs {
40576
+ padding: 3px 5px
40577
+ }
40578
+
40579
+ .hljs {
40580
+ color: #abb2bf;
40581
+ background: #282c34
40582
+ }
40583
+ .hljs-comment,
40584
+ .hljs-quote {
40585
+ color: #5c6370;
40586
+ font-style: italic
40587
+ }
40588
+ .hljs-doctag,
40589
+ .hljs-keyword,
40590
+ .hljs-formula {
40591
+ color: #c678dd
40592
+ }
40593
+ .hljs-section,
40594
+ .hljs-name,
40595
+ .hljs-selector-tag,
40596
+ .hljs-deletion,
40597
+ .hljs-subst {
40598
+ color: #e06c75
40599
+ }
40600
+ .hljs-literal {
40601
+ color: #56b6c2
40602
+ }
40603
+ .hljs-string,
40604
+ .hljs-regexp,
40605
+ .hljs-addition,
40606
+ .hljs-attribute,
40607
+ .hljs-meta .hljs-string {
40608
+ color: #98c379
40609
+ }
40610
+ .hljs-attr,
40611
+ .hljs-variable,
40612
+ .hljs-template-variable,
40613
+ .hljs-type,
40614
+ .hljs-selector-class,
40615
+ .hljs-selector-attr,
40616
+ .hljs-selector-pseudo,
40617
+ .hljs-number {
40618
+ color: #d19a66
40619
+ }
40620
+ .hljs-symbol,
40621
+ .hljs-bullet,
40622
+ .hljs-link,
40623
+ .hljs-meta,
40624
+ .hljs-selector-id,
40625
+ .hljs-title {
40626
+ color: #61aeee
40627
+ }
40628
+ .hljs-built_in,
40629
+ .hljs-title.class_,
40630
+ .hljs-class .hljs-title {
40631
+ color: #e6c07b
40632
+ }
40633
+ .hljs-emphasis {
40634
+ font-style: italic
40635
+ }
40636
+ .hljs-strong {
40637
+ font-weight: bold
40638
+ }
40639
+ .hljs-link {
40640
+ text-decoration: underline
40641
+ }`;
40642
+ const styleElement2 = document.createElement("style");
40643
+ styleElement2.id = "themed-markdown-highlight-css";
40644
+ styleElement2.textContent = css2;
40645
+ document.head.appendChild(styleElement2);
40646
+ isInjected = true;
40647
+ }
40648
+ injectHighlightStyles();
40559
40649
  var terminalTheme = {
40560
40650
  space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
40561
40651
  fonts: {
@@ -40593,52 +40683,53 @@ var terminalTheme = {
40593
40683
  zIndices: [0, 1, 10, 20, 30, 40, 50],
40594
40684
  colors: {
40595
40685
  text: "#e4e4e4",
40596
- background: "rgba(10, 10, 10, 0.85)",
40686
+ background: "#0a0a0a",
40597
40687
  primary: "#66b3ff",
40598
40688
  secondary: "#80c4ff",
40599
40689
  accent: "#66ff99",
40600
- highlight: "rgba(102, 179, 255, 0.15)",
40601
- muted: "rgba(26, 26, 26, 0.8)",
40690
+ highlight: "#18283d",
40691
+ muted: "#1a1a1a",
40602
40692
  success: "#66ff99",
40603
40693
  warning: "#ffcc66",
40604
40694
  error: "#ff6666",
40605
40695
  info: "#66b3ff",
40606
- border: "rgba(255, 255, 255, 0.1)",
40607
- backgroundSecondary: "rgba(15, 15, 15, 0.9)",
40608
- backgroundTertiary: "rgba(20, 20, 20, 0.9)",
40609
- backgroundLight: "rgba(255, 255, 255, 0.05)",
40610
- backgroundHover: "rgba(102, 179, 255, 0.08)",
40611
- surface: "rgba(15, 15, 15, 0.95)",
40612
- textSecondary: "rgba(255, 255, 255, 0.7)",
40613
- textTertiary: "rgba(255, 255, 255, 0.5)",
40614
- textMuted: "rgba(255, 255, 255, 0.4)",
40615
- highlightBg: "rgba(255, 235, 59, 0.25)",
40616
- highlightBorder: "rgba(255, 235, 59, 0.5)"
40696
+ border: "#1a1a1a",
40697
+ backgroundSecondary: "#0f0f0f",
40698
+ backgroundTertiary: "#141414",
40699
+ backgroundLight: "#0d0d0d",
40700
+ backgroundHover: "#0d1520",
40701
+ surface: "#0f0f0f",
40702
+ textSecondary: "#b3b3b3",
40703
+ textTertiary: "#808080",
40704
+ textMuted: "#666666",
40705
+ highlightBg: "#40391e",
40706
+ highlightBorder: "#7f7530",
40707
+ textOnPrimary: "#ffffff"
40617
40708
  },
40618
40709
  modes: {
40619
40710
  light: {
40620
40711
  text: "#1a1a1a",
40621
- background: "rgba(255, 255, 255, 0.9)",
40712
+ background: "#ffffff",
40622
40713
  primary: "#0066cc",
40623
40714
  secondary: "#0052a3",
40624
40715
  accent: "#00cc88",
40625
- highlight: "rgba(0, 102, 204, 0.08)",
40626
- muted: "rgba(245, 245, 245, 0.8)",
40716
+ highlight: "#e6f2ff",
40717
+ muted: "#f5f5f5",
40627
40718
  success: "#00cc88",
40628
40719
  warning: "#ffaa00",
40629
40720
  error: "#ff3333",
40630
40721
  info: "#0066cc",
40631
- border: "rgba(0, 0, 0, 0.1)",
40632
- backgroundSecondary: "rgba(250, 250, 250, 0.9)",
40633
- backgroundTertiary: "rgba(245, 245, 245, 0.9)",
40634
- backgroundLight: "rgba(0, 0, 0, 0.02)",
40635
- backgroundHover: "rgba(0, 102, 204, 0.04)",
40636
- surface: "rgba(255, 255, 255, 0.95)",
40637
- textSecondary: "rgba(0, 0, 0, 0.6)",
40638
- textTertiary: "rgba(0, 0, 0, 0.4)",
40639
- textMuted: "rgba(0, 0, 0, 0.3)",
40640
- highlightBg: "rgba(255, 235, 59, 0.3)",
40641
- highlightBorder: "rgba(255, 235, 59, 0.6)"
40722
+ border: "#e6e6e6",
40723
+ backgroundSecondary: "#fafafa",
40724
+ backgroundTertiary: "#f5f5f5",
40725
+ backgroundLight: "#fafafa",
40726
+ backgroundHover: "#f5f9fd",
40727
+ surface: "#ffffff",
40728
+ textSecondary: "#666666",
40729
+ textTertiary: "#999999",
40730
+ textMuted: "#b3b3b3",
40731
+ highlightBg: "#fff9c4",
40732
+ highlightBorder: "#fff389"
40642
40733
  }
40643
40734
  },
40644
40735
  buttons: {
@@ -42082,7 +42173,8 @@ var createIndustryMarkdownComponents = ({
42082
42173
  enableHtmlPopout,
42083
42174
  slideHeaderMarginTopOverride,
42084
42175
  index: index2,
42085
- repositoryInfo
42176
+ repositoryInfo,
42177
+ editable = false
42086
42178
  }) => {
42087
42179
  const getLuminance = (hex) => {
42088
42180
  const rgb = hex.replace("#", "").match(/.{2}/g);
@@ -42093,8 +42185,8 @@ var createIndustryMarkdownComponents = ({
42093
42185
  };
42094
42186
  const darkMode = getLuminance(theme2.colors.background) < 0.5;
42095
42187
  const headerStyles = {};
42096
- if (index2 === 0 && slideHeaderMarginTopOverride) {
42097
- headerStyles.marginTop = `${slideHeaderMarginTopOverride}px`;
42188
+ if (index2 === 0) {
42189
+ headerStyles.marginTop = slideHeaderMarginTopOverride ? `${slideHeaderMarginTopOverride}px` : 0;
42098
42190
  }
42099
42191
  return {
42100
42192
  h1: ({ children: children2, ...props2 }) => /* @__PURE__ */ React2__default.createElement("h1", {
@@ -42103,9 +42195,11 @@ var createIndustryMarkdownComponents = ({
42103
42195
  fontSize: theme2.fontSizes[5],
42104
42196
  lineHeight: theme2.lineHeights.heading,
42105
42197
  fontWeight: theme2.fontWeights.bold,
42106
- marginTop: index2 === 0 ? 0 : theme2.space[4],
42198
+ marginTop: theme2.space[4],
42107
42199
  marginBottom: theme2.space[4],
42108
42200
  fontFamily: theme2.fonts.heading,
42201
+ paddingBottom: theme2.space[2],
42202
+ borderBottom: `1px solid ${theme2.colors.border}`,
42109
42203
  ...headerStyles
42110
42204
  },
42111
42205
  ...props2
@@ -42116,9 +42210,11 @@ var createIndustryMarkdownComponents = ({
42116
42210
  fontSize: theme2.fontSizes[4],
42117
42211
  lineHeight: theme2.lineHeights.heading,
42118
42212
  fontWeight: theme2.fontWeights.bold,
42119
- marginTop: index2 === 0 ? 0 : theme2.space[4],
42213
+ marginTop: theme2.space[4],
42120
42214
  marginBottom: theme2.space[3],
42121
42215
  fontFamily: theme2.fonts.heading,
42216
+ paddingBottom: theme2.space[2],
42217
+ borderBottom: `1px solid ${theme2.colors.border}`,
42122
42218
  ...headerStyles
42123
42219
  },
42124
42220
  ...props2
@@ -42129,12 +42225,48 @@ var createIndustryMarkdownComponents = ({
42129
42225
  fontSize: theme2.fontSizes[3],
42130
42226
  lineHeight: theme2.lineHeights.heading,
42131
42227
  fontWeight: theme2.fontWeights.semibold,
42132
- marginTop: index2 === 0 ? 0 : theme2.space[4],
42228
+ marginTop: theme2.space[4],
42133
42229
  marginBottom: theme2.space[3],
42134
42230
  fontFamily: theme2.fonts.heading
42135
42231
  },
42136
42232
  ...props2
42137
42233
  }, children2),
42234
+ h4: ({ children: children2, ...props2 }) => /* @__PURE__ */ React2__default.createElement("h4", {
42235
+ style: {
42236
+ color: theme2.colors.text,
42237
+ fontSize: theme2.fontSizes[2],
42238
+ lineHeight: theme2.lineHeights.heading,
42239
+ fontWeight: theme2.fontWeights.semibold,
42240
+ marginTop: theme2.space[3],
42241
+ marginBottom: theme2.space[2],
42242
+ fontFamily: theme2.fonts.heading
42243
+ },
42244
+ ...props2
42245
+ }, children2),
42246
+ h5: ({ children: children2, ...props2 }) => /* @__PURE__ */ React2__default.createElement("h5", {
42247
+ style: {
42248
+ color: theme2.colors.text,
42249
+ fontSize: theme2.fontSizes[1],
42250
+ lineHeight: theme2.lineHeights.heading,
42251
+ fontWeight: theme2.fontWeights.semibold,
42252
+ marginTop: theme2.space[3],
42253
+ marginBottom: theme2.space[1],
42254
+ fontFamily: theme2.fonts.heading
42255
+ },
42256
+ ...props2
42257
+ }, children2),
42258
+ h6: ({ children: children2, ...props2 }) => /* @__PURE__ */ React2__default.createElement("h6", {
42259
+ style: {
42260
+ color: theme2.colors.text,
42261
+ fontSize: theme2.fontSizes[1],
42262
+ lineHeight: theme2.lineHeights.heading,
42263
+ fontWeight: theme2.fontWeights.medium,
42264
+ marginTop: theme2.space[3],
42265
+ marginBottom: theme2.space[1],
42266
+ fontFamily: theme2.fonts.heading
42267
+ },
42268
+ ...props2
42269
+ }, children2),
42138
42270
  p: ({ children: children2, ...props2 }) => /* @__PURE__ */ React2__default.createElement("p", {
42139
42271
  style: {
42140
42272
  color: theme2.colors.text,
@@ -42170,7 +42302,7 @@ var createIndustryMarkdownComponents = ({
42170
42302
  ...props2
42171
42303
  }, children2),
42172
42304
  li: ({ children: children2, ...props2 }) => {
42173
- var _a, _b, _c, _d, _e, _f, _g, _h;
42305
+ var _a, _b, _c, _d, _e2, _f, _g, _h;
42174
42306
  const isTaskListItem = Array.isArray(children2) && children2.length > 0 && React2__default.isValidElement(children2[0]) && ((_b = (_a = children2[0]) == null ? void 0 : _a.props) == null ? void 0 : _b.type) === "checkbox";
42175
42307
  if (isTaskListItem) {
42176
42308
  const checkbox = children2[0];
@@ -42185,7 +42317,7 @@ var createIndustryMarkdownComponents = ({
42185
42317
  }
42186
42318
  });
42187
42319
  const checked = ((_c = checkbox == null ? void 0 : checkbox.props) == null ? void 0 : _c.checked) || false;
42188
- const lineNumber = ((_e = (_d = props2.sourcePosition) == null ? void 0 : _d.start) == null ? void 0 : _e.line) || ((_h = (_g = (_f = props2.node) == null ? void 0 : _f.position) == null ? void 0 : _g.start) == null ? void 0 : _h.line) || 1;
42320
+ const lineNumber = ((_e2 = (_d = props2.sourcePosition) == null ? void 0 : _d.start) == null ? void 0 : _e2.line) || ((_h = (_g = (_f = props2.node) == null ? void 0 : _f.position) == null ? void 0 : _g.start) == null ? void 0 : _h.line) || 1;
42189
42321
  const id = `${slideIdPrefix}-checkbox-${lineNumber}`;
42190
42322
  const isChecked = checkedItems[id] ?? checked;
42191
42323
  const handleChange = (e) => {
@@ -42214,19 +42346,20 @@ var createIndustryMarkdownComponents = ({
42214
42346
  checked: isChecked,
42215
42347
  onChange: handleChange,
42216
42348
  onClick: (e) => e.stopPropagation(),
42349
+ disabled: !editable,
42217
42350
  style: {
42218
42351
  marginRight: theme2.space[2],
42219
42352
  marginTop: theme2.space[1],
42220
42353
  width: "16px",
42221
42354
  height: "16px",
42222
- cursor: "pointer"
42355
+ cursor: editable ? "pointer" : "default"
42223
42356
  },
42224
42357
  id
42225
42358
  }), /* @__PURE__ */ React2__default.createElement("label", {
42226
42359
  htmlFor: id,
42227
42360
  style: {
42228
42361
  flex: 1,
42229
- cursor: "pointer",
42362
+ cursor: editable ? "pointer" : "default",
42230
42363
  color: isChecked ? theme2.colors.textMuted : "inherit",
42231
42364
  lineHeight: theme2.lineHeights.relaxed
42232
42365
  }
@@ -42329,7 +42462,7 @@ var createIndustryMarkdownComponents = ({
42329
42462
  });
42330
42463
  },
42331
42464
  code: ({ node: node2, className, children: children2, ...props2 }) => {
42332
- var _a, _b, _c, _d, _e, _f;
42465
+ var _a, _b, _c, _d, _e2, _f;
42333
42466
  const hasLanguageClass = className && (className.includes("language-") || className.includes("hljs"));
42334
42467
  const codeString = extractTextFromChildren(children2);
42335
42468
  const matchLang = /language-(\w+)/.exec(className || "");
@@ -42496,7 +42629,7 @@ var createIndustryMarkdownComponents = ({
42496
42629
  }), "Fill & Copy (", placeholders.length, ")"))), isPrompt ? /* @__PURE__ */ React2__default.createElement("div", {
42497
42630
  style: {
42498
42631
  margin: 0,
42499
- padding: theme2.space[5],
42632
+ padding: theme2.space[1],
42500
42633
  backgroundColor: "transparent",
42501
42634
  fontSize: theme2.fontSizes[1],
42502
42635
  lineHeight: theme2.lineHeights.body,
@@ -42523,7 +42656,7 @@ var createIndustryMarkdownComponents = ({
42523
42656
  })) : /* @__PURE__ */ React2__default.createElement("pre", {
42524
42657
  style: {
42525
42658
  margin: 0,
42526
- padding: theme2.space[4],
42659
+ padding: theme2.space[1],
42527
42660
  backgroundColor: "transparent",
42528
42661
  overflow: "auto",
42529
42662
  fontSize: theme2.fontSizes[1],
@@ -42541,7 +42674,7 @@ var createIndustryMarkdownComponents = ({
42541
42674
  ...props2
42542
42675
  }, children2)));
42543
42676
  }
42544
- const cleanClassName = (_f = (_e = (_d = className == null ? void 0 : className.replace(/hljs(-\w+)?/g, "")) == null ? void 0 : _d.replace(/language-\w+/g, "")) == null ? void 0 : _e.replace(/\s+/g, " ")) == null ? void 0 : _f.trim();
42677
+ const cleanClassName = (_f = (_e2 = (_d = className == null ? void 0 : className.replace(/hljs(-\w+)?/g, "")) == null ? void 0 : _d.replace(/language-\w+/g, "")) == null ? void 0 : _e2.replace(/\s+/g, " ")) == null ? void 0 : _f.trim();
42545
42678
  return /* @__PURE__ */ React2__default.createElement("code", {
42546
42679
  style: {
42547
42680
  color: theme2.colors.accent,
@@ -43239,29 +43372,25 @@ var fontTransitionCSS = `
43239
43372
  font-size: 1rem !important; /* Fixed size for checkbox labels */
43240
43373
  }
43241
43374
 
43242
- /* Remove top margin from headings when they're the first element */
43243
- .markdown-slide > :first-child h1:first-child,
43244
- .markdown-slide > :first-child h2:first-child,
43245
- .markdown-slide > :first-child h3:first-child,
43246
- .markdown-slide > :first-child h4:first-child,
43247
- .markdown-slide > :first-child h5:first-child,
43248
- .markdown-slide > :first-child h6:first-child {
43375
+ /* Remove top margin from any first element - must override inline styles */
43376
+ .markdown-slide > *:first-child,
43377
+ .markdown-slide > *:first-child > *:first-child {
43249
43378
  margin-top: 0 !important;
43250
43379
  }
43251
-
43252
- /* Also handle when heading is inside the first paragraph/div from ReactMarkdown */
43253
- .markdown-slide > div:first-child > h1:first-child,
43254
- .markdown-slide > div:first-child > h2:first-child,
43255
- .markdown-slide > div:first-child > h3:first-child,
43256
- .markdown-slide > div:first-child > h4:first-child,
43257
- .markdown-slide > div:first-child > h5:first-child,
43258
- .markdown-slide > div:first-child > h6:first-child,
43259
- .markdown-slide > p:first-child > h1:first-child,
43260
- .markdown-slide > p:first-child > h2:first-child,
43261
- .markdown-slide > p:first-child > h3:first-child,
43262
- .markdown-slide > p:first-child > h4:first-child,
43263
- .markdown-slide > p:first-child > h5:first-child,
43264
- .markdown-slide > p:first-child > h6:first-child {
43380
+
43381
+ /* Specifically target all possible first-child elements */
43382
+ .markdown-slide > h1:first-child,
43383
+ .markdown-slide > h2:first-child,
43384
+ .markdown-slide > h3:first-child,
43385
+ .markdown-slide > h4:first-child,
43386
+ .markdown-slide > h5:first-child,
43387
+ .markdown-slide > h6:first-child,
43388
+ .markdown-slide > p:first-child,
43389
+ .markdown-slide > ul:first-child,
43390
+ .markdown-slide > ol:first-child,
43391
+ .markdown-slide > div:first-child,
43392
+ .markdown-slide > blockquote:first-child,
43393
+ .markdown-slide > pre:first-child {
43265
43394
  margin-top: 0 !important;
43266
43395
  }
43267
43396
  `;
@@ -43308,7 +43437,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
43308
43437
  maxScreenWidth: _maxScreenWidth,
43309
43438
  enableKeyboardScrolling = true,
43310
43439
  keyboardScrollConfig,
43311
- repositoryInfo
43440
+ repositoryInfo,
43441
+ editable = false
43312
43442
  }) {
43313
43443
  const slideRef = useRef(null);
43314
43444
  const scrollPositionsRef = useRef(/* @__PURE__ */ new Map());
@@ -43579,7 +43709,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
43579
43709
  }
43580
43710
  }, [slideIndex]);
43581
43711
  const sanitizeSchema = useMemo(() => {
43582
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J;
43712
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J;
43583
43713
  return {
43584
43714
  ...defaultSchema,
43585
43715
  tagNames: [...defaultSchema.tagNames || [], "picture", "source", "mark"],
@@ -43590,7 +43720,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
43590
43720
  span: [...((_b = defaultSchema.attributes) == null ? void 0 : _b.span) || [], "className", "style"],
43591
43721
  pre: [...((_c = defaultSchema.attributes) == null ? void 0 : _c.pre) || [], "className", "style"],
43592
43722
  div: [...((_d = defaultSchema.attributes) == null ? void 0 : _d.div) || [], "style", "className", "id"],
43593
- p: [...((_e = defaultSchema.attributes) == null ? void 0 : _e.p) || [], "style", "className", "id"],
43723
+ p: [...((_e2 = defaultSchema.attributes) == null ? void 0 : _e2.p) || [], "style", "className", "id"],
43594
43724
  h1: [...((_f = defaultSchema.attributes) == null ? void 0 : _f.h1) || [], "style", "className", "id"],
43595
43725
  h2: [...((_g = defaultSchema.attributes) == null ? void 0 : _g.h2) || [], "style", "className", "id"],
43596
43726
  h3: [...((_h = defaultSchema.attributes) == null ? void 0 : _h.h3) || [], "style", "className", "id"],
@@ -43664,7 +43794,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
43664
43794
  enableHtmlPopout,
43665
43795
  slideHeaderMarginTopOverride,
43666
43796
  index: chunkIndex,
43667
- repositoryInfo
43797
+ repositoryInfo,
43798
+ editable
43668
43799
  });
43669
43800
  if (searchQuery) {
43670
43801
  return {
@@ -43697,7 +43828,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
43697
43828
  enableHtmlPopout,
43698
43829
  slideHeaderMarginTopOverride,
43699
43830
  repositoryInfo,
43700
- searchQuery
43831
+ searchQuery,
43832
+ editable
43701
43833
  ]);
43702
43834
  return /* @__PURE__ */ React2__default.createElement("div", {
43703
43835
  className: "markdown-slide",
@@ -43949,12 +44081,12 @@ Panel.displayName = "forwardRef(Panel)";
43949
44081
  var currentCursorStyle = null;
43950
44082
  var prevRuleIndex = -1;
43951
44083
  var styleElement = null;
43952
- function getCursorStyle(state, constraintFlags) {
44084
+ function getCursorStyle(state, constraintFlags, isPointerDown2) {
44085
+ const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
44086
+ const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
44087
+ const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
44088
+ const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
43953
44089
  if (constraintFlags) {
43954
- const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
43955
- const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
43956
- const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
43957
- const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
43958
44090
  if (horizontalMin) {
43959
44091
  if (verticalMin) {
43960
44092
  return "se-resize";
@@ -43994,7 +44126,7 @@ function resetGlobalCursorStyle() {
43994
44126
  prevRuleIndex = -1;
43995
44127
  }
43996
44128
  }
43997
- function setGlobalCursorStyle(state, constraintFlags) {
44129
+ function setGlobalCursorStyle(state, constraintFlags, isPointerDown2) {
43998
44130
  var _styleElement$sheet$i, _styleElement$sheet2;
43999
44131
  const style2 = getCursorStyle(state, constraintFlags);
44000
44132
  if (currentCursorStyle === style2) {
@@ -44208,6 +44340,7 @@ function handlePointerDown(event) {
44208
44340
  updateListeners();
44209
44341
  if (intersectingHandles.length > 0) {
44210
44342
  updateResizeHandlerStates("down", event);
44343
+ updateCursor();
44211
44344
  event.preventDefault();
44212
44345
  if (!isWithinResizeHandle(target)) {
44213
44346
  event.stopImmediatePropagation();
@@ -44219,7 +44352,7 @@ function handlePointerMove(event) {
44219
44352
  x,
44220
44353
  y
44221
44354
  } = getResizeEventCoordinates(event);
44222
- if (isPointerDown && event.buttons === 0) {
44355
+ if (isPointerDown && event.type !== "pointerleave" && event.buttons === 0) {
44223
44356
  isPointerDown = false;
44224
44357
  updateResizeHandlerStates("up", event);
44225
44358
  }
@@ -44349,9 +44482,10 @@ function updateCursor() {
44349
44482
  resetGlobalCursorStyle();
44350
44483
  }
44351
44484
  }
44352
- var listenersAbortController = new AbortController();
44485
+ var listenersAbortController;
44353
44486
  function updateListeners() {
44354
- listenersAbortController.abort();
44487
+ var _listenersAbortContro;
44488
+ (_listenersAbortContro = listenersAbortController) === null || _listenersAbortContro === void 0 || _listenersAbortContro.abort();
44355
44489
  listenersAbortController = new AbortController();
44356
44490
  const options = {
44357
44491
  capture: true,
@@ -44373,8 +44507,13 @@ function updateListeners() {
44373
44507
  }
44374
44508
  });
44375
44509
  }
44376
- window.addEventListener("pointerup", handlePointerUp, options);
44377
- window.addEventListener("pointercancel", handlePointerUp, options);
44510
+ ownerDocumentCounts.forEach((_, ownerDocument) => {
44511
+ const {
44512
+ body
44513
+ } = ownerDocument;
44514
+ body.addEventListener("pointerup", handlePointerUp, options);
44515
+ body.addEventListener("pointercancel", handlePointerUp, options);
44516
+ });
44378
44517
  } else {
44379
44518
  ownerDocumentCounts.forEach((count, ownerDocument) => {
44380
44519
  const {
@@ -44559,7 +44698,7 @@ function adjustLayoutByDelta({
44559
44698
  if (!fuzzyNumbersEqual(prevSize, safeSize)) {
44560
44699
  deltaApplied += prevSize - safeSize;
44561
44700
  nextLayout[index2] = safeSize;
44562
- if (deltaApplied.toPrecision(3).localeCompare(Math.abs(delta).toPrecision(3), void 0, {
44701
+ if (deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), void 0, {
44563
44702
  numeric: true
44564
44703
  }) >= 0) {
44565
44704
  break;
@@ -44668,9 +44807,14 @@ function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
44668
44807
  const index2 = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
44669
44808
  return index2 != null ? [index2, index2 + 1] : [-1, -1];
44670
44809
  }
44810
+ function isHTMLElement(target) {
44811
+ if (target instanceof HTMLElement) {
44812
+ return true;
44813
+ }
44814
+ return typeof target === "object" && target !== null && "tagName" in target && "getAttribute" in target;
44815
+ }
44671
44816
  function getPanelGroupElement(id, rootElement = document) {
44672
- var _dataset;
44673
- if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) {
44817
+ if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id) {
44674
44818
  return rootElement;
44675
44819
  }
44676
44820
  const element2 = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
@@ -44988,11 +45132,11 @@ function computePanelFlexBoxStyle({
44988
45132
  const size = layout[panelIndex];
44989
45133
  let flexGrow;
44990
45134
  if (size == null) {
44991
- flexGrow = defaultSize != null ? defaultSize.toPrecision(precision) : "1";
45135
+ flexGrow = defaultSize != null ? defaultSize.toFixed(precision) : "1";
44992
45136
  } else if (panelData.length === 1) {
44993
45137
  flexGrow = "1";
44994
45138
  } else {
44995
- flexGrow = size.toPrecision(precision);
45139
+ flexGrow = size.toFixed(precision);
44996
45140
  }
44997
45141
  return {
44998
45142
  flexBasis: 0,
@@ -45986,72 +46130,75 @@ function PanelResizeHandle({
45986
46130
  });
45987
46131
  }
45988
46132
  PanelResizeHandle.displayName = "PanelResizeHandle";
45989
- function S(e2) {
46133
+ function C(e2) {
45990
46134
  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" };
45991
46135
  }
45992
- var R = ({ leftPanel: n2, rightPanel: r2, collapsibleSide: s2 = "left", defaultSize: c2 = 25, minSize: d2 = 5, className: u2 = "", collapsed: p2 = false, style: h2, showCollapseButton: m2 = false, animationDuration: f2 = 300, animationEasing: y2 = "cubic-bezier(0.4, 0, 0.2, 1)", onCollapseStart: w2, onCollapseComplete: x2, onExpandStart: C, onExpandComplete: R2, theme: N }) => {
45993
- const [E, z] = useState(p2), [D, M2] = useState(false), [A, T] = useState(false), [k, L] = useState(p2), [F, $2] = useState(p2 ? 0 : c2), P = useRef(null), B = useRef(void 0), O = useRef(void 0), I = useRef(void 0), q = useCallback((e2, t2, n3) => {
45994
- if (!P.current)
46136
+ var R = ({ leftPanel: n2, rightPanel: r2, collapsibleSide: s2 = "left", defaultSize: c2 = 25, minSize: d2 = 5, className: u2 = "", collapsed: p2 = false, style: h2, showCollapseButton: m2 = false, animationDuration: f2 = 300, animationEasing: y2 = "cubic-bezier(0.4, 0, 0.2, 1)", onCollapseStart: w2, onCollapseComplete: x2, onExpandStart: S, onExpandComplete: R2, theme: N }) => {
46137
+ const [E, D] = useState(p2), [z2, M] = useState(false), [T, A] = useState(false), [k, L] = useState(p2), [P, F] = useState(p2 ? 0 : c2), $2 = useRef(null), B = useRef(void 0), O = useRef(void 0), I = useRef(void 0), q = useCallback((e2, t2, n3) => {
46138
+ if (!$2.current)
45995
46139
  return;
45996
46140
  B.current && cancelAnimationFrame(B.current), O.current = performance.now();
45997
46141
  const r3 = (o2) => {
45998
- if (!O.current || !P.current)
46142
+ if (!O.current || !$2.current)
45999
46143
  return;
46000
46144
  const i2 = o2 - O.current, a2 = Math.min(i2 / f2, 1), l2 = a2 < 0.5 ? 4 * a2 * a2 * a2 : 1 - Math.pow(-2 * a2 + 2, 3) / 2, s3 = e2 + (t2 - e2) * l2;
46001
- P.current.resize(s3), a2 < 1 ? B.current = requestAnimationFrame(r3) : (t2 === 0 ? P.current.collapse() : P.current.resize(t2), M2(false), n3 && n3());
46145
+ $2.current.resize(s3), a2 < 1 ? B.current = requestAnimationFrame(r3) : (t2 === 0 ? $2.current.collapse() : $2.current.resize(t2), M(false), n3 && n3());
46002
46146
  };
46003
46147
  B.current = requestAnimationFrame(r3);
46004
46148
  }, [f2]), W = useCallback(() => {
46005
- D || A || (M2(true), z(true), w2 && w2(), q(F, 0, () => {
46006
- $2(0), L(true), x2 && x2();
46149
+ z2 || T || (M(true), D(true), w2 && w2(), q(P, 0, () => {
46150
+ F(0), L(true), x2 && x2();
46007
46151
  }));
46008
- }, [D, A, F, q, w2, x2]), _ = useCallback(() => {
46009
- D || A || (M2(true), z(false), L(false), C && C(), q(0, c2, () => {
46010
- $2(c2), R2 && R2();
46152
+ }, [z2, T, P, q, w2, x2]), _ = useCallback(() => {
46153
+ z2 || T || (M(true), D(false), L(false), S && S(), q(0, c2, () => {
46154
+ F(c2), R2 && R2();
46011
46155
  }));
46012
- }, [D, A, c2, q, C, R2]), j = useCallback(() => {
46156
+ }, [z2, T, c2, q, S, R2]), j = useCallback(() => {
46013
46157
  E ? _() : W();
46014
46158
  }, [E, W, _]), H = useCallback((e2) => {
46015
- D || ($2(e2), e2 > 0 && z(false));
46016
- }, [D]), K = useCallback(() => {
46017
- T(true);
46159
+ z2 || (F(e2), e2 > 0 && D(false));
46160
+ }, [z2]), K = useCallback(() => {
46161
+ A(true);
46018
46162
  }, []), U = useCallback(() => {
46019
- T(false);
46163
+ A(false);
46020
46164
  }, []);
46021
46165
  useEffect(() => {
46022
46166
  p2 !== E && (p2 ? W() : _());
46023
46167
  }, [p2]), useEffect(() => {
46024
- p2 && !D ? L(true) : p2 || D || L(false);
46025
- }, [p2, D]), useEffect(() => {
46168
+ p2 && !z2 ? L(true) : p2 || z2 || L(false);
46169
+ }, [p2, z2]), useEffect(() => {
46026
46170
  const e2 = B.current, t2 = I.current;
46027
46171
  return () => {
46028
46172
  e2 && cancelAnimationFrame(e2), t2 && clearTimeout(t2);
46029
46173
  };
46030
46174
  }, []);
46031
- const V = s2 === "left", X2 = E ? V ? "▸" : "◂" : V ? "◂" : "▸", Y = S(N), J = D && !A ? { transition: `flex ${f2}ms ${y2}` } : void 0, G = (e2) => {
46175
+ const X2 = s2 === "left", Y = E ? X2 ? "▸" : "◂" : X2 ? "◂" : "▸", V = C(N), J = z2 && !T ? { transition: `flex ${f2}ms ${y2}` } : void 0, G = (e2) => {
46032
46176
  let t2 = "hybrid-panel";
46033
- return e2 && (t2 += " collapsible-panel", D && !A && (t2 += " animating"), E && (t2 += " collapsed")), t2;
46177
+ return e2 && (t2 += " collapsible-panel", z2 && !T && (t2 += " animating"), E && (t2 += " collapsed")), t2;
46034
46178
  };
46035
- return jsx("div", { className: `animated-resizable-layout ${u2}`, style: { ...Y, ...h2 }, children: /* @__PURE__ */ jsxs(PanelGroup, { direction: "horizontal", onLayout: U, children: [
46036
- /* @__PURE__ */ jsx(Panel, { ref: V ? P : void 0, collapsible: V, defaultSize: V ? p2 ? 0 : c2 : void 0, minSize: V ? d2 : 30, collapsedSize: 0, onResize: V ? H : void 0, onCollapse: V ? () => z(true) : void 0, onExpand: V ? () => z(false) : void 0, className: G(V), style: V ? J : void 0, children: /* @__PURE__ */ jsx("div", { className: "panel-content-wrapper", style: { opacity: V && E ? 0 : 1, transition: D ? `opacity ${0.5 * f2}ms ${y2}` : "none" }, children: n2 }) }),
46037
- /* @__PURE__ */ jsx(PanelResizeHandle, { className: "resize-handle " + (k ? "collapsed" : ""), onDragging: K, style: k ? { visibility: "hidden", width: 0 } : void 0, children: m2 && /* @__PURE__ */ jsx("div", { className: "handle-bar", children: /* @__PURE__ */ jsx("button", { onClick: j, className: "collapse-toggle", disabled: D, "aria-label": E ? "Expand panel" : "Collapse panel", children: X2 }) }) }),
46038
- /* @__PURE__ */ jsx(Panel, { ref: V ? void 0 : P, collapsible: !V, defaultSize: V ? void 0 : p2 ? 0 : c2, minSize: V ? 30 : d2, collapsedSize: 0, onResize: V ? void 0 : H, onCollapse: V ? void 0 : () => z(true), onExpand: V ? void 0 : () => z(false), className: G(!V), style: V ? void 0 : J, children: /* @__PURE__ */ jsx("div", { className: "panel-content-wrapper", style: { opacity: !V && E ? 0 : 1, transition: D ? `opacity ${0.5 * f2}ms ${y2}` : "none" }, children: r2 }) })
46179
+ return jsx("div", { className: `animated-resizable-layout ${u2}`, style: { ...V, ...h2 }, children: /* @__PURE__ */ jsxs(PanelGroup, { direction: "horizontal", onLayout: U, children: [
46180
+ /* @__PURE__ */ jsx(Panel, { ref: X2 ? $2 : void 0, collapsible: X2, defaultSize: X2 ? p2 ? 0 : c2 : void 0, minSize: X2 ? d2 : 30, collapsedSize: 0, onResize: X2 ? H : void 0, onCollapse: X2 ? () => D(true) : void 0, onExpand: X2 ? () => D(false) : void 0, className: G(X2), style: X2 ? J : void 0, children: /* @__PURE__ */ jsx("div", { className: "panel-content-wrapper", style: { opacity: X2 && E ? 0 : 1, transition: z2 ? `opacity ${0.5 * f2}ms ${y2}` : "none" }, children: n2 }) }),
46181
+ /* @__PURE__ */ jsx(PanelResizeHandle, { className: "resize-handle " + (k ? "collapsed" : ""), onDragging: K, style: k ? { visibility: "hidden", width: 0 } : void 0, children: m2 && /* @__PURE__ */ jsx("div", { className: "handle-bar", children: /* @__PURE__ */ jsx("button", { onClick: j, className: "collapse-toggle", disabled: z2, "aria-label": E ? "Expand panel" : "Collapse panel", children: Y }) }) }),
46182
+ /* @__PURE__ */ jsx(Panel, { ref: X2 ? void 0 : $2, collapsible: !X2, defaultSize: X2 ? void 0 : p2 ? 0 : c2, minSize: X2 ? 30 : d2, collapsedSize: 0, onResize: X2 ? void 0 : H, onCollapse: X2 ? void 0 : () => D(true), onExpand: X2 ? void 0 : () => D(false), className: G(!X2), style: X2 ? void 0 : J, children: /* @__PURE__ */ jsx("div", { className: "panel-content-wrapper", style: { opacity: !X2 && E ? 0 : 1, transition: z2 ? `opacity ${0.5 * f2}ms ${y2}` : "none" }, children: r2 }) })
46039
46183
  ] }) });
46040
46184
  };
46041
- 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) => {
46042
- const v = useRef(null), b = S(d2);
46043
- useImperativeHandle(g, () => ({ scrollToPanel: (e2) => {
46044
- if (!v.current)
46185
+ 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) => {
46186
+ const b = useRef(null), y2 = useRef(false), w2 = useRef(null), x2 = C(d2);
46187
+ useImperativeHandle(v, () => ({ scrollToPanel: (e2) => {
46188
+ if (!b.current)
46045
46189
  return;
46046
- const t2 = v.current, n2 = t2.children[e2];
46190
+ const t2 = b.current, n2 = t2.children[e2];
46047
46191
  if (n2) {
46192
+ y2.current = true, w2.current && clearTimeout(w2.current);
46048
46193
  const e3 = n2.offsetLeft;
46049
- t2.scrollTo({ left: e3, behavior: "smooth" });
46194
+ t2.scrollTo({ left: e3, behavior: "smooth" }), w2.current = setTimeout(() => {
46195
+ y2.current = false;
46196
+ }, 500);
46050
46197
  }
46051
46198
  }, getCurrentPanel: () => {
46052
- if (!v.current || v.current.children.length === 0)
46199
+ if (!b.current || b.current.children.length === 0)
46053
46200
  return 0;
46054
- const e2 = v.current, t2 = e2.getBoundingClientRect().left;
46201
+ const e2 = b.current, t2 = e2.getBoundingClientRect().left;
46055
46202
  let n2 = 0, r2 = 1 / 0;
46056
46203
  for (let o3 = 0; o3 < e2.children.length; o3++) {
46057
46204
  const i2 = e2.children[o3].getBoundingClientRect(), a3 = Math.abs(i2.left - t2);
@@ -46060,9 +46207,9 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
46060
46207
  return n2;
46061
46208
  } }));
46062
46209
  useEffect(() => {
46063
- if (!f2 || !v.current)
46210
+ if (!f2 || !b.current)
46064
46211
  return;
46065
- const e2 = v.current, t2 = (e3) => {
46212
+ const e2 = b.current, t2 = (e3) => {
46066
46213
  const t3 = e3.target;
46067
46214
  if (t3.tagName === "INPUT" || t3.tagName === "TEXTAREA" || t3.tagName === "SELECT" || t3.isContentEditable || t3.closest(".xterm") !== null || t3.closest('[contenteditable="true"]') !== null)
46068
46215
  return;
@@ -46071,74 +46218,78 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
46071
46218
  return e2.addEventListener("keydown", t2), () => {
46072
46219
  e2.removeEventListener("keydown", t2);
46073
46220
  };
46074
- }, [f2]);
46075
- const y2 = o2.length, w2 = 2 * u2;
46076
- let x2;
46077
- x2 = y2 === 1 || y2 === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
46078
- const C = React2__default.useId().replace(/:/g, "_");
46221
+ }, [f2]), useEffect(() => () => {
46222
+ w2.current && clearTimeout(w2.current);
46223
+ }, []);
46224
+ const S = o2.length, R2 = 2 * u2;
46225
+ let N;
46226
+ N = S === 1 || S === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
46227
+ const E = React2__default.useId().replace(/:/g, "_");
46079
46228
  return jsxs(Fragment, { children: [
46080
- y2 === 2 && /* @__PURE__ */ jsx("style", { children: `
46081
- .snap-carousel-container[data-carousel-id="${C}"][data-panel-count="2"] .snap-carousel-panel {
46229
+ S === 2 && /* @__PURE__ */ jsx("style", { children: `
46230
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
46082
46231
  width: 100%;
46083
46232
  }
46084
- @container (min-width: ${w2}px) {
46085
- .snap-carousel-container[data-carousel-id="${C}"][data-panel-count="2"] .snap-carousel-panel {
46233
+ @container (min-width: ${R2}px) {
46234
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
46086
46235
  width: 50%;
46087
46236
  }
46088
46237
  }
46089
46238
  ` }),
46090
- /* @__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) => {
46091
- if (!m2 || !v.current || v.current.children.length === 0)
46239
+ /* @__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) => {
46240
+ if (!m2 || !b.current || b.current.children.length === 0)
46241
+ return;
46242
+ if (y2.current)
46092
46243
  return;
46093
- const t2 = v.current, n2 = t2.getBoundingClientRect().left;
46244
+ const t2 = b.current, n2 = t2.getBoundingClientRect().left;
46094
46245
  let r2 = 0, o3 = 1 / 0;
46095
46246
  for (let i2 = 0; i2 < t2.children.length; i2++) {
46096
46247
  const e3 = t2.children[i2].getBoundingClientRect(), a3 = Math.abs(e3.left - n2);
46097
46248
  a3 < o3 && (o3 = a3, r2 = i2);
46098
46249
  }
46099
46250
  m2(r2);
46100
- }, "data-panel-count": y2, "data-carousel-id": C, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
46251
+ }, "data-panel-count": S, "data-carousel-id": E, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
46101
46252
  ] });
46102
46253
  });
46103
- M.displayName = "SnapCarousel";
46254
+ z.displayName = "SnapCarousel";
46255
+ var le;
46104
46256
  var se;
46105
- var ce;
46106
- (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";
46107
- var ue = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
46257
+ (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";
46258
+ var de = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
46108
46259
  var Te;
46109
- var ke;
46110
- (ke = Te || (Te = {}))[ke.Forward = 1] = "Forward", ke[ke.Backward = -1] = "Backward";
46260
+ var Ae;
46261
+ (Ae = Te || (Te = {}))[Ae.Forward = 1] = "Forward", Ae[Ae.Backward = -1] = "Backward";
46262
+ var _e;
46111
46263
  var je;
46112
46264
  var He;
46113
46265
  var Ke;
46114
- var Ue;
46115
- (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";
46116
- ({ start: [Ke.Space, Ke.Enter], cancel: [Ke.Esc], end: [Ke.Space, Ke.Enter, Ke.Tab] });
46266
+ (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";
46267
+ ({ start: [He.Space, He.Enter], cancel: [He.Esc], end: [He.Space, He.Enter, He.Tab] });
46268
+ var rt;
46117
46269
  var ot;
46118
- var it;
46119
- (it = ot || (ot = {}))[it.RightClick = 2] = "RightClick";
46270
+ (ot = rt || (rt = {}))[ot.RightClick = 2] = "RightClick";
46271
+ var at;
46120
46272
  var lt;
46121
46273
  var st;
46122
46274
  var ct;
46123
- var dt;
46124
- (st = lt || (lt = {}))[st.Pointer = 0] = "Pointer", st[st.DraggableRect = 1] = "DraggableRect", (dt = ct || (ct = {}))[dt.TreeOrder = 0] = "TreeOrder", dt[dt.ReversedTreeOrder = 1] = "ReversedTreeOrder";
46275
+ (lt = at || (at = {}))[lt.Pointer = 0] = "Pointer", lt[lt.DraggableRect = 1] = "DraggableRect", (ct = st || (st = {}))[ct.TreeOrder = 0] = "TreeOrder", ct[ct.ReversedTreeOrder = 1] = "ReversedTreeOrder";
46125
46276
  ({ x: { [Te.Backward]: false, [Te.Forward]: false }, y: { [Te.Backward]: false, [Te.Forward]: false } });
46277
+ var pt;
46126
46278
  var ht;
46127
46279
  var mt;
46128
- var ft;
46129
- (mt = ht || (ht = {}))[mt.Always = 0] = "Always", mt[mt.BeforeDragging = 1] = "BeforeDragging", mt[mt.WhileDragging = 2] = "WhileDragging", (ft || (ft = {})).Optimized = "optimized";
46130
- ({ droppable: { strategy: ht.WhileDragging, frequency: ft.Optimized } });
46131
- /* @__PURE__ */ createContext({ ...ue, scaleX: 1, scaleY: 1 });
46280
+ (ht = pt || (pt = {}))[ht.Always = 0] = "Always", ht[ht.BeforeDragging = 1] = "BeforeDragging", ht[ht.WhileDragging = 2] = "WhileDragging", (mt || (mt = {})).Optimized = "optimized";
46281
+ ({ droppable: { strategy: pt.WhileDragging, frequency: mt.Optimized } });
46282
+ /* @__PURE__ */ createContext({ ...de, scaleX: 1, scaleY: 1 });
46283
+ var $t;
46132
46284
  var Bt;
46133
- var Ot;
46134
- (Ot = Bt || (Bt = {}))[Ot.Uninitialized = 0] = "Uninitialized", Ot[Ot.Initializing = 1] = "Initializing", Ot[Ot.Initialized = 2] = "Initialized";
46135
- var Vt;
46285
+ (Bt = $t || ($t = {}))[Bt.Uninitialized = 0] = "Uninitialized", Bt[Bt.Initializing = 1] = "Initializing", Bt[Bt.Initialized = 2] = "Initialized";
46286
+ var Ut;
46136
46287
  (() => {
46137
46288
  if (typeof window != "undefined") {
46138
46289
  const e2 = window;
46139
46290
  return e2.__principlemd_theme_context__ || (e2.__principlemd_theme_context__ = createContext(void 0)), e2.__principlemd_theme_context__;
46140
46291
  }
46141
- return Vt || (Vt = createContext(void 0)), Vt;
46292
+ return Ut || (Ut = createContext(void 0)), Ut;
46142
46293
  })();
46143
46294
  function extractSlideTitle2(content2, slideIndex) {
46144
46295
  const lines = content2.split(`
@@ -47508,7 +47659,8 @@ var DocumentView = ({
47508
47659
  repositoryInfo,
47509
47660
  fontSizeScale,
47510
47661
  theme: theme2,
47511
- transparentBackground = false
47662
+ transparentBackground = false,
47663
+ editable = false
47512
47664
  }) => {
47513
47665
  const containerRef = useRef(null);
47514
47666
  const backgroundColor = transparentBackground ? "transparent" : theme2.colors.background;
@@ -47540,7 +47692,8 @@ var DocumentView = ({
47540
47692
  fontSizeScale,
47541
47693
  handlePromptCopy,
47542
47694
  repositoryInfo,
47543
- transparentBackground
47695
+ transparentBackground,
47696
+ editable
47544
47697
  })));
47545
47698
  };
47546
47699
  function parseMarkdownIntoPresentation2(markdownContent, repositoryInfo) {
@@ -47560,9 +47713,9 @@ const MarkdownPanel = ({
47560
47713
  actions: _actions,
47561
47714
  events
47562
47715
  }) => {
47563
- var _a, _b, _c, _d, _e, _f, _g;
47716
+ var _a, _b, _c, _d, _e2, _f, _g;
47564
47717
  const { theme: theme2 } = useTheme();
47565
- const [viewMode, setViewMode] = useState("book");
47718
+ const [viewMode, setViewMode] = useState("document");
47566
47719
  const [currentSlide, setCurrentSlide] = useState(0);
47567
47720
  const [fontSizeScale, setFontSizeScale] = useState(1);
47568
47721
  const [isMobile, setIsMobile] = useState(false);
@@ -47623,7 +47776,7 @@ const MarkdownPanel = ({
47623
47776
  branch,
47624
47777
  basePath: getBasePath(((_c2 = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _c2.path) || "")
47625
47778
  };
47626
- }, [(_e = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _e.source, (_f = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _f.path]);
47779
+ }, [(_e2 = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _e2.source, (_f = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _f.path]);
47627
47780
  const handleFontSizeIncrease = () => {
47628
47781
  setFontSizeScale((prev) => {
47629
47782
  const newScale = Math.min(prev + 0.1, 3);
@@ -47826,11 +47979,11 @@ const MarkdownPanel = ({
47826
47979
  /* @__PURE__ */ jsx(
47827
47980
  "button",
47828
47981
  {
47829
- onClick: () => handleViewModeChange("book"),
47830
- title: "Sections",
47982
+ onClick: () => handleViewModeChange("document"),
47983
+ title: "Document",
47831
47984
  style: {
47832
- background: viewMode === "book" ? theme2.colors.primary : "transparent",
47833
- color: viewMode === "book" ? theme2.colors.background : theme2.colors.textSecondary,
47985
+ background: viewMode === "document" ? theme2.colors.primary : "transparent",
47986
+ color: viewMode === "document" ? theme2.colors.background : theme2.colors.textSecondary,
47834
47987
  border: "none",
47835
47988
  padding: isMobile ? "6px 8px" : "6px 12px",
47836
47989
  cursor: "pointer",
@@ -47842,17 +47995,17 @@ const MarkdownPanel = ({
47842
47995
  alignItems: "center",
47843
47996
  gap: "4px"
47844
47997
  },
47845
- children: isMobile ? /* @__PURE__ */ jsx(BookOpen, { size: 16 }) : "Sections"
47998
+ children: isMobile ? /* @__PURE__ */ jsx(FileText, { size: 16 }) : "Document"
47846
47999
  }
47847
48000
  ),
47848
48001
  /* @__PURE__ */ jsx(
47849
48002
  "button",
47850
48003
  {
47851
- onClick: () => handleViewModeChange("document"),
47852
- title: "Document",
48004
+ onClick: () => handleViewModeChange("book"),
48005
+ title: "Sections",
47853
48006
  style: {
47854
- background: viewMode === "document" ? theme2.colors.primary : "transparent",
47855
- color: viewMode === "document" ? theme2.colors.background : theme2.colors.textSecondary,
48007
+ background: viewMode === "book" ? theme2.colors.primary : "transparent",
48008
+ color: viewMode === "book" ? theme2.colors.background : theme2.colors.textSecondary,
47856
48009
  border: "none",
47857
48010
  padding: isMobile ? "6px 8px" : "6px 12px",
47858
48011
  cursor: "pointer",
@@ -47864,7 +48017,7 @@ const MarkdownPanel = ({
47864
48017
  alignItems: "center",
47865
48018
  gap: "4px"
47866
48019
  },
47867
- children: isMobile ? /* @__PURE__ */ jsx(FileText, { size: 16 }) : "Document"
48020
+ children: isMobile ? /* @__PURE__ */ jsx(BookOpen, { size: 16 }) : "Sections"
47868
48021
  }
47869
48022
  )
47870
48023
  ]