@industry-theme/git-panels 0.1.18 → 0.1.20

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.
@@ -403,9 +403,9 @@ const GitCommitHistoryPanel = ({
403
403
  const { theme: theme2 } = useTheme();
404
404
  const [limit, setLimit] = useState(25);
405
405
  const [selectedHash, setSelectedHash] = useState(null);
406
- const commitsSlice = context.getSlice("commits");
407
- const hasCommits = context.hasSlice("commits");
408
- const isLoading = context.isSliceLoading("commits");
406
+ const { commits: commitsSlice } = context;
407
+ const hasCommits = !!commitsSlice;
408
+ const isLoading = (commitsSlice == null ? void 0 : commitsSlice.loading) ?? false;
409
409
  const commits = ((_a = commitsSlice == null ? void 0 : commitsSlice.data) == null ? void 0 : _a.commits) ?? [];
410
410
  const sortedCommits = useMemo(() => {
411
411
  return commits.slice(0, limit).sort((a, b) => {
@@ -37547,20 +37547,20 @@ class EditMap {
37547
37547
  this.map.length = 0;
37548
37548
  }
37549
37549
  }
37550
- function addImplementation(editMap, at, remove, add) {
37550
+ function addImplementation(editMap, at2, remove, add) {
37551
37551
  let index2 = 0;
37552
37552
  if (remove === 0 && add.length === 0) {
37553
37553
  return;
37554
37554
  }
37555
37555
  while (index2 < editMap.map.length) {
37556
- if (editMap.map[index2][0] === at) {
37556
+ if (editMap.map[index2][0] === at2) {
37557
37557
  editMap.map[index2][1] += remove;
37558
37558
  editMap.map[index2][2].push(...add);
37559
37559
  return;
37560
37560
  }
37561
37561
  index2 += 1;
37562
37562
  }
37563
- editMap.map.push([at, remove, add]);
37563
+ editMap.map.push([at2, remove, add]);
37564
37564
  }
37565
37565
  function gfmTableAlign(events, index2) {
37566
37566
  let inDelimiterRow = false;
@@ -39717,7 +39717,7 @@ var css_248z = ".transform-component-module_wrapper__SPB86 {\n position: relati
39717
39717
  var styles = { "wrapper": "transform-component-module_wrapper__SPB86", "content": "transform-component-module_content__FBWxo" };
39718
39718
  styleInject(css_248z);
39719
39719
  var TransformComponent = function(_a) {
39720
- 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;
39720
+ 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;
39721
39721
  var _f = useContext(Context), init = _f.init, cleanupWindowEvents = _f.cleanupWindowEvents;
39722
39722
  var wrapperRef = useRef(null);
39723
39723
  var contentRef = useRef(null);
@@ -39737,6 +39737,96 @@ var TransformComponent = function(_a) {
39737
39737
  React2__default.createElement("div", __assign({}, contentProps, { ref: contentRef, className: "".concat(baseClasses.contentClass, " ").concat(styles.content, " ").concat(contentClass), style: contentStyle }), children2)
39738
39738
  );
39739
39739
  };
39740
+ var isInjected = false;
39741
+ function injectHighlightStyles() {
39742
+ if (isInjected || typeof document === "undefined") {
39743
+ return;
39744
+ }
39745
+ const existingStyle = document.getElementById("themed-markdown-highlight-css");
39746
+ if (existingStyle) {
39747
+ isInjected = true;
39748
+ return;
39749
+ }
39750
+ const css2 = `
39751
+ pre code.hljs {
39752
+ display: block;
39753
+ overflow-x: auto;
39754
+ padding: 1em
39755
+ }
39756
+ code.hljs {
39757
+ padding: 3px 5px
39758
+ }
39759
+
39760
+ .hljs {
39761
+ color: #abb2bf;
39762
+ background: #282c34
39763
+ }
39764
+ .hljs-comment,
39765
+ .hljs-quote {
39766
+ color: #5c6370;
39767
+ font-style: italic
39768
+ }
39769
+ .hljs-doctag,
39770
+ .hljs-keyword,
39771
+ .hljs-formula {
39772
+ color: #c678dd
39773
+ }
39774
+ .hljs-section,
39775
+ .hljs-name,
39776
+ .hljs-selector-tag,
39777
+ .hljs-deletion,
39778
+ .hljs-subst {
39779
+ color: #e06c75
39780
+ }
39781
+ .hljs-literal {
39782
+ color: #56b6c2
39783
+ }
39784
+ .hljs-string,
39785
+ .hljs-regexp,
39786
+ .hljs-addition,
39787
+ .hljs-attribute,
39788
+ .hljs-meta .hljs-string {
39789
+ color: #98c379
39790
+ }
39791
+ .hljs-attr,
39792
+ .hljs-variable,
39793
+ .hljs-template-variable,
39794
+ .hljs-type,
39795
+ .hljs-selector-class,
39796
+ .hljs-selector-attr,
39797
+ .hljs-selector-pseudo,
39798
+ .hljs-number {
39799
+ color: #d19a66
39800
+ }
39801
+ .hljs-symbol,
39802
+ .hljs-bullet,
39803
+ .hljs-link,
39804
+ .hljs-meta,
39805
+ .hljs-selector-id,
39806
+ .hljs-title {
39807
+ color: #61aeee
39808
+ }
39809
+ .hljs-built_in,
39810
+ .hljs-title.class_,
39811
+ .hljs-class .hljs-title {
39812
+ color: #e6c07b
39813
+ }
39814
+ .hljs-emphasis {
39815
+ font-style: italic
39816
+ }
39817
+ .hljs-strong {
39818
+ font-weight: bold
39819
+ }
39820
+ .hljs-link {
39821
+ text-decoration: underline
39822
+ }`;
39823
+ const styleElement = document.createElement("style");
39824
+ styleElement.id = "themed-markdown-highlight-css";
39825
+ styleElement.textContent = css2;
39826
+ document.head.appendChild(styleElement);
39827
+ isInjected = true;
39828
+ }
39829
+ injectHighlightStyles();
39740
39830
  var terminalTheme = {
39741
39831
  space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
39742
39832
  fonts: {
@@ -39774,52 +39864,53 @@ var terminalTheme = {
39774
39864
  zIndices: [0, 1, 10, 20, 30, 40, 50],
39775
39865
  colors: {
39776
39866
  text: "#e4e4e4",
39777
- background: "rgba(10, 10, 10, 0.85)",
39867
+ background: "#0a0a0a",
39778
39868
  primary: "#66b3ff",
39779
39869
  secondary: "#80c4ff",
39780
39870
  accent: "#66ff99",
39781
- highlight: "rgba(102, 179, 255, 0.15)",
39782
- muted: "rgba(26, 26, 26, 0.8)",
39871
+ highlight: "#18283d",
39872
+ muted: "#1a1a1a",
39783
39873
  success: "#66ff99",
39784
39874
  warning: "#ffcc66",
39785
39875
  error: "#ff6666",
39786
39876
  info: "#66b3ff",
39787
- border: "rgba(255, 255, 255, 0.1)",
39788
- backgroundSecondary: "rgba(15, 15, 15, 0.9)",
39789
- backgroundTertiary: "rgba(20, 20, 20, 0.9)",
39790
- backgroundLight: "rgba(255, 255, 255, 0.05)",
39791
- backgroundHover: "rgba(102, 179, 255, 0.08)",
39792
- surface: "rgba(15, 15, 15, 0.95)",
39793
- textSecondary: "rgba(255, 255, 255, 0.7)",
39794
- textTertiary: "rgba(255, 255, 255, 0.5)",
39795
- textMuted: "rgba(255, 255, 255, 0.4)",
39796
- highlightBg: "rgba(255, 235, 59, 0.25)",
39797
- highlightBorder: "rgba(255, 235, 59, 0.5)"
39877
+ border: "#1a1a1a",
39878
+ backgroundSecondary: "#0f0f0f",
39879
+ backgroundTertiary: "#141414",
39880
+ backgroundLight: "#0d0d0d",
39881
+ backgroundHover: "#0d1520",
39882
+ surface: "#0f0f0f",
39883
+ textSecondary: "#b3b3b3",
39884
+ textTertiary: "#808080",
39885
+ textMuted: "#666666",
39886
+ highlightBg: "#40391e",
39887
+ highlightBorder: "#7f7530",
39888
+ textOnPrimary: "#ffffff"
39798
39889
  },
39799
39890
  modes: {
39800
39891
  light: {
39801
39892
  text: "#1a1a1a",
39802
- background: "rgba(255, 255, 255, 0.9)",
39893
+ background: "#ffffff",
39803
39894
  primary: "#0066cc",
39804
39895
  secondary: "#0052a3",
39805
39896
  accent: "#00cc88",
39806
- highlight: "rgba(0, 102, 204, 0.08)",
39807
- muted: "rgba(245, 245, 245, 0.8)",
39897
+ highlight: "#e6f2ff",
39898
+ muted: "#f5f5f5",
39808
39899
  success: "#00cc88",
39809
39900
  warning: "#ffaa00",
39810
39901
  error: "#ff3333",
39811
39902
  info: "#0066cc",
39812
- border: "rgba(0, 0, 0, 0.1)",
39813
- backgroundSecondary: "rgba(250, 250, 250, 0.9)",
39814
- backgroundTertiary: "rgba(245, 245, 245, 0.9)",
39815
- backgroundLight: "rgba(0, 0, 0, 0.02)",
39816
- backgroundHover: "rgba(0, 102, 204, 0.04)",
39817
- surface: "rgba(255, 255, 255, 0.95)",
39818
- textSecondary: "rgba(0, 0, 0, 0.6)",
39819
- textTertiary: "rgba(0, 0, 0, 0.4)",
39820
- textMuted: "rgba(0, 0, 0, 0.3)",
39821
- highlightBg: "rgba(255, 235, 59, 0.3)",
39822
- highlightBorder: "rgba(255, 235, 59, 0.6)"
39903
+ border: "#e6e6e6",
39904
+ backgroundSecondary: "#fafafa",
39905
+ backgroundTertiary: "#f5f5f5",
39906
+ backgroundLight: "#fafafa",
39907
+ backgroundHover: "#f5f9fd",
39908
+ surface: "#ffffff",
39909
+ textSecondary: "#666666",
39910
+ textTertiary: "#999999",
39911
+ textMuted: "#b3b3b3",
39912
+ highlightBg: "#fff9c4",
39913
+ highlightBorder: "#fff389"
39823
39914
  }
39824
39915
  },
39825
39916
  buttons: {
@@ -41124,7 +41215,8 @@ var createIndustryMarkdownComponents = ({
41124
41215
  enableHtmlPopout,
41125
41216
  slideHeaderMarginTopOverride,
41126
41217
  index: index2,
41127
- repositoryInfo
41218
+ repositoryInfo,
41219
+ editable = false
41128
41220
  }) => {
41129
41221
  const getLuminance = (hex) => {
41130
41222
  const rgb = hex.replace("#", "").match(/.{2}/g);
@@ -41135,8 +41227,8 @@ var createIndustryMarkdownComponents = ({
41135
41227
  };
41136
41228
  const darkMode = getLuminance(theme2.colors.background) < 0.5;
41137
41229
  const headerStyles = {};
41138
- if (index2 === 0 && slideHeaderMarginTopOverride) {
41139
- headerStyles.marginTop = `${slideHeaderMarginTopOverride}px`;
41230
+ if (index2 === 0) {
41231
+ headerStyles.marginTop = slideHeaderMarginTopOverride ? `${slideHeaderMarginTopOverride}px` : 0;
41140
41232
  }
41141
41233
  return {
41142
41234
  h1: ({ children: children2, ...props }) => /* @__PURE__ */ React2__default.createElement("h1", {
@@ -41145,9 +41237,11 @@ var createIndustryMarkdownComponents = ({
41145
41237
  fontSize: theme2.fontSizes[5],
41146
41238
  lineHeight: theme2.lineHeights.heading,
41147
41239
  fontWeight: theme2.fontWeights.bold,
41148
- marginTop: index2 === 0 ? 0 : theme2.space[4],
41240
+ marginTop: theme2.space[4],
41149
41241
  marginBottom: theme2.space[4],
41150
41242
  fontFamily: theme2.fonts.heading,
41243
+ paddingBottom: theme2.space[2],
41244
+ borderBottom: `1px solid ${theme2.colors.border}`,
41151
41245
  ...headerStyles
41152
41246
  },
41153
41247
  ...props
@@ -41158,9 +41252,11 @@ var createIndustryMarkdownComponents = ({
41158
41252
  fontSize: theme2.fontSizes[4],
41159
41253
  lineHeight: theme2.lineHeights.heading,
41160
41254
  fontWeight: theme2.fontWeights.bold,
41161
- marginTop: index2 === 0 ? 0 : theme2.space[4],
41255
+ marginTop: theme2.space[4],
41162
41256
  marginBottom: theme2.space[3],
41163
41257
  fontFamily: theme2.fonts.heading,
41258
+ paddingBottom: theme2.space[2],
41259
+ borderBottom: `1px solid ${theme2.colors.border}`,
41164
41260
  ...headerStyles
41165
41261
  },
41166
41262
  ...props
@@ -41171,12 +41267,48 @@ var createIndustryMarkdownComponents = ({
41171
41267
  fontSize: theme2.fontSizes[3],
41172
41268
  lineHeight: theme2.lineHeights.heading,
41173
41269
  fontWeight: theme2.fontWeights.semibold,
41174
- marginTop: index2 === 0 ? 0 : theme2.space[4],
41270
+ marginTop: theme2.space[4],
41175
41271
  marginBottom: theme2.space[3],
41176
41272
  fontFamily: theme2.fonts.heading
41177
41273
  },
41178
41274
  ...props
41179
41275
  }, children2),
41276
+ h4: ({ children: children2, ...props }) => /* @__PURE__ */ React2__default.createElement("h4", {
41277
+ style: {
41278
+ color: theme2.colors.text,
41279
+ fontSize: theme2.fontSizes[2],
41280
+ lineHeight: theme2.lineHeights.heading,
41281
+ fontWeight: theme2.fontWeights.semibold,
41282
+ marginTop: theme2.space[3],
41283
+ marginBottom: theme2.space[2],
41284
+ fontFamily: theme2.fonts.heading
41285
+ },
41286
+ ...props
41287
+ }, children2),
41288
+ h5: ({ children: children2, ...props }) => /* @__PURE__ */ React2__default.createElement("h5", {
41289
+ style: {
41290
+ color: theme2.colors.text,
41291
+ fontSize: theme2.fontSizes[1],
41292
+ lineHeight: theme2.lineHeights.heading,
41293
+ fontWeight: theme2.fontWeights.semibold,
41294
+ marginTop: theme2.space[3],
41295
+ marginBottom: theme2.space[1],
41296
+ fontFamily: theme2.fonts.heading
41297
+ },
41298
+ ...props
41299
+ }, children2),
41300
+ h6: ({ children: children2, ...props }) => /* @__PURE__ */ React2__default.createElement("h6", {
41301
+ style: {
41302
+ color: theme2.colors.text,
41303
+ fontSize: theme2.fontSizes[1],
41304
+ lineHeight: theme2.lineHeights.heading,
41305
+ fontWeight: theme2.fontWeights.medium,
41306
+ marginTop: theme2.space[3],
41307
+ marginBottom: theme2.space[1],
41308
+ fontFamily: theme2.fonts.heading
41309
+ },
41310
+ ...props
41311
+ }, children2),
41180
41312
  p: ({ children: children2, ...props }) => /* @__PURE__ */ React2__default.createElement("p", {
41181
41313
  style: {
41182
41314
  color: theme2.colors.text,
@@ -41212,7 +41344,7 @@ var createIndustryMarkdownComponents = ({
41212
41344
  ...props
41213
41345
  }, children2),
41214
41346
  li: ({ children: children2, ...props }) => {
41215
- var _a, _b, _c, _d, _e, _f, _g, _h;
41347
+ var _a, _b, _c, _d, _e2, _f, _g, _h;
41216
41348
  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";
41217
41349
  if (isTaskListItem) {
41218
41350
  const checkbox = children2[0];
@@ -41227,7 +41359,7 @@ var createIndustryMarkdownComponents = ({
41227
41359
  }
41228
41360
  });
41229
41361
  const checked = ((_c = checkbox == null ? void 0 : checkbox.props) == null ? void 0 : _c.checked) || false;
41230
- const lineNumber = ((_e = (_d = props.sourcePosition) == null ? void 0 : _d.start) == null ? void 0 : _e.line) || ((_h = (_g = (_f = props.node) == null ? void 0 : _f.position) == null ? void 0 : _g.start) == null ? void 0 : _h.line) || 1;
41362
+ const lineNumber = ((_e2 = (_d = props.sourcePosition) == null ? void 0 : _d.start) == null ? void 0 : _e2.line) || ((_h = (_g = (_f = props.node) == null ? void 0 : _f.position) == null ? void 0 : _g.start) == null ? void 0 : _h.line) || 1;
41231
41363
  const id = `${slideIdPrefix}-checkbox-${lineNumber}`;
41232
41364
  const isChecked = checkedItems[id] ?? checked;
41233
41365
  const handleChange = (e) => {
@@ -41256,19 +41388,20 @@ var createIndustryMarkdownComponents = ({
41256
41388
  checked: isChecked,
41257
41389
  onChange: handleChange,
41258
41390
  onClick: (e) => e.stopPropagation(),
41391
+ disabled: !editable,
41259
41392
  style: {
41260
41393
  marginRight: theme2.space[2],
41261
41394
  marginTop: theme2.space[1],
41262
41395
  width: "16px",
41263
41396
  height: "16px",
41264
- cursor: "pointer"
41397
+ cursor: editable ? "pointer" : "default"
41265
41398
  },
41266
41399
  id
41267
41400
  }), /* @__PURE__ */ React2__default.createElement("label", {
41268
41401
  htmlFor: id,
41269
41402
  style: {
41270
41403
  flex: 1,
41271
- cursor: "pointer",
41404
+ cursor: editable ? "pointer" : "default",
41272
41405
  color: isChecked ? theme2.colors.textMuted : "inherit",
41273
41406
  lineHeight: theme2.lineHeights.relaxed
41274
41407
  }
@@ -41371,7 +41504,7 @@ var createIndustryMarkdownComponents = ({
41371
41504
  });
41372
41505
  },
41373
41506
  code: ({ node: node2, className, children: children2, ...props }) => {
41374
- var _a, _b, _c, _d, _e, _f;
41507
+ var _a, _b, _c, _d, _e2, _f;
41375
41508
  const hasLanguageClass = className && (className.includes("language-") || className.includes("hljs"));
41376
41509
  const codeString = extractTextFromChildren(children2);
41377
41510
  const matchLang = /language-(\w+)/.exec(className || "");
@@ -41538,7 +41671,7 @@ var createIndustryMarkdownComponents = ({
41538
41671
  }), "Fill & Copy (", placeholders.length, ")"))), isPrompt ? /* @__PURE__ */ React2__default.createElement("div", {
41539
41672
  style: {
41540
41673
  margin: 0,
41541
- padding: theme2.space[5],
41674
+ padding: theme2.space[1],
41542
41675
  backgroundColor: "transparent",
41543
41676
  fontSize: theme2.fontSizes[1],
41544
41677
  lineHeight: theme2.lineHeights.body,
@@ -41565,7 +41698,7 @@ var createIndustryMarkdownComponents = ({
41565
41698
  })) : /* @__PURE__ */ React2__default.createElement("pre", {
41566
41699
  style: {
41567
41700
  margin: 0,
41568
- padding: theme2.space[4],
41701
+ padding: theme2.space[1],
41569
41702
  backgroundColor: "transparent",
41570
41703
  overflow: "auto",
41571
41704
  fontSize: theme2.fontSizes[1],
@@ -41583,7 +41716,7 @@ var createIndustryMarkdownComponents = ({
41583
41716
  ...props
41584
41717
  }, children2)));
41585
41718
  }
41586
- 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();
41719
+ 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();
41587
41720
  return /* @__PURE__ */ React2__default.createElement("code", {
41588
41721
  style: {
41589
41722
  color: theme2.colors.accent,
@@ -42281,29 +42414,25 @@ var fontTransitionCSS = `
42281
42414
  font-size: 1rem !important; /* Fixed size for checkbox labels */
42282
42415
  }
42283
42416
 
42284
- /* Remove top margin from headings when they're the first element */
42285
- .markdown-slide > :first-child h1:first-child,
42286
- .markdown-slide > :first-child h2:first-child,
42287
- .markdown-slide > :first-child h3:first-child,
42288
- .markdown-slide > :first-child h4:first-child,
42289
- .markdown-slide > :first-child h5:first-child,
42290
- .markdown-slide > :first-child h6:first-child {
42417
+ /* Remove top margin from any first element - must override inline styles */
42418
+ .markdown-slide > *:first-child,
42419
+ .markdown-slide > *:first-child > *:first-child {
42291
42420
  margin-top: 0 !important;
42292
42421
  }
42293
-
42294
- /* Also handle when heading is inside the first paragraph/div from ReactMarkdown */
42295
- .markdown-slide > div:first-child > h1:first-child,
42296
- .markdown-slide > div:first-child > h2:first-child,
42297
- .markdown-slide > div:first-child > h3:first-child,
42298
- .markdown-slide > div:first-child > h4:first-child,
42299
- .markdown-slide > div:first-child > h5:first-child,
42300
- .markdown-slide > div:first-child > h6:first-child,
42301
- .markdown-slide > p:first-child > h1:first-child,
42302
- .markdown-slide > p:first-child > h2:first-child,
42303
- .markdown-slide > p:first-child > h3:first-child,
42304
- .markdown-slide > p:first-child > h4:first-child,
42305
- .markdown-slide > p:first-child > h5:first-child,
42306
- .markdown-slide > p:first-child > h6:first-child {
42422
+
42423
+ /* Specifically target all possible first-child elements */
42424
+ .markdown-slide > h1:first-child,
42425
+ .markdown-slide > h2:first-child,
42426
+ .markdown-slide > h3:first-child,
42427
+ .markdown-slide > h4:first-child,
42428
+ .markdown-slide > h5:first-child,
42429
+ .markdown-slide > h6:first-child,
42430
+ .markdown-slide > p:first-child,
42431
+ .markdown-slide > ul:first-child,
42432
+ .markdown-slide > ol:first-child,
42433
+ .markdown-slide > div:first-child,
42434
+ .markdown-slide > blockquote:first-child,
42435
+ .markdown-slide > pre:first-child {
42307
42436
  margin-top: 0 !important;
42308
42437
  }
42309
42438
  `;
@@ -42350,7 +42479,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
42350
42479
  maxScreenWidth: _maxScreenWidth,
42351
42480
  enableKeyboardScrolling = true,
42352
42481
  keyboardScrollConfig,
42353
- repositoryInfo
42482
+ repositoryInfo,
42483
+ editable = false
42354
42484
  }) {
42355
42485
  const slideRef = useRef(null);
42356
42486
  const scrollPositionsRef = useRef(/* @__PURE__ */ new Map());
@@ -42621,7 +42751,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
42621
42751
  }
42622
42752
  }, [slideIndex]);
42623
42753
  const sanitizeSchema = useMemo(() => {
42624
- 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;
42754
+ 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;
42625
42755
  return {
42626
42756
  ...defaultSchema,
42627
42757
  tagNames: [...defaultSchema.tagNames || [], "picture", "source", "mark"],
@@ -42632,7 +42762,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
42632
42762
  span: [...((_b = defaultSchema.attributes) == null ? void 0 : _b.span) || [], "className", "style"],
42633
42763
  pre: [...((_c = defaultSchema.attributes) == null ? void 0 : _c.pre) || [], "className", "style"],
42634
42764
  div: [...((_d = defaultSchema.attributes) == null ? void 0 : _d.div) || [], "style", "className", "id"],
42635
- p: [...((_e = defaultSchema.attributes) == null ? void 0 : _e.p) || [], "style", "className", "id"],
42765
+ p: [...((_e2 = defaultSchema.attributes) == null ? void 0 : _e2.p) || [], "style", "className", "id"],
42636
42766
  h1: [...((_f = defaultSchema.attributes) == null ? void 0 : _f.h1) || [], "style", "className", "id"],
42637
42767
  h2: [...((_g = defaultSchema.attributes) == null ? void 0 : _g.h2) || [], "style", "className", "id"],
42638
42768
  h3: [...((_h = defaultSchema.attributes) == null ? void 0 : _h.h3) || [], "style", "className", "id"],
@@ -42706,7 +42836,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
42706
42836
  enableHtmlPopout,
42707
42837
  slideHeaderMarginTopOverride,
42708
42838
  index: chunkIndex,
42709
- repositoryInfo
42839
+ repositoryInfo,
42840
+ editable
42710
42841
  });
42711
42842
  if (searchQuery) {
42712
42843
  return {
@@ -42739,7 +42870,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
42739
42870
  enableHtmlPopout,
42740
42871
  slideHeaderMarginTopOverride,
42741
42872
  repositoryInfo,
42742
- searchQuery
42873
+ searchQuery,
42874
+ editable
42743
42875
  ]);
42744
42876
  return /* @__PURE__ */ React2__default.createElement("div", {
42745
42877
  className: "markdown-slide",
@@ -43026,7 +43158,6 @@ var panelConstraintFlags = /* @__PURE__ */ new Map();
43026
43158
  function reportConstraintsViolation(resizeHandleId, flag) {
43027
43159
  panelConstraintFlags.set(resizeHandleId, flag);
43028
43160
  }
43029
- new AbortController();
43030
43161
  function useForceUpdate() {
43031
43162
  const [_, setCount] = useState(0);
43032
43163
  return useCallback(() => setCount((prevCount) => prevCount + 1), []);
@@ -43190,7 +43321,7 @@ function adjustLayoutByDelta({
43190
43321
  if (!fuzzyNumbersEqual(prevSize, safeSize)) {
43191
43322
  deltaApplied += prevSize - safeSize;
43192
43323
  nextLayout[index2] = safeSize;
43193
- if (deltaApplied.toPrecision(3).localeCompare(Math.abs(delta).toPrecision(3), void 0, {
43324
+ if (deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), void 0, {
43194
43325
  numeric: true
43195
43326
  }) >= 0) {
43196
43327
  break;
@@ -43299,9 +43430,14 @@ function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
43299
43430
  const index2 = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
43300
43431
  return index2 != null ? [index2, index2 + 1] : [-1, -1];
43301
43432
  }
43433
+ function isHTMLElement(target) {
43434
+ if (target instanceof HTMLElement) {
43435
+ return true;
43436
+ }
43437
+ return typeof target === "object" && target !== null && "tagName" in target && "getAttribute" in target;
43438
+ }
43302
43439
  function getPanelGroupElement(id, rootElement = document) {
43303
- var _dataset;
43304
- if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) {
43440
+ if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id) {
43305
43441
  return rootElement;
43306
43442
  }
43307
43443
  const element2 = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
@@ -43619,11 +43755,11 @@ function computePanelFlexBoxStyle({
43619
43755
  const size = layout[panelIndex];
43620
43756
  let flexGrow;
43621
43757
  if (size == null) {
43622
- flexGrow = defaultSize != null ? defaultSize.toPrecision(precision) : "1";
43758
+ flexGrow = defaultSize != null ? defaultSize.toFixed(precision) : "1";
43623
43759
  } else if (panelData.length === 1) {
43624
43760
  flexGrow = "1";
43625
43761
  } else {
43626
- flexGrow = size.toPrecision(precision);
43762
+ flexGrow = size.toFixed(precision);
43627
43763
  }
43628
43764
  return {
43629
43765
  flexBasis: 0,
@@ -44405,23 +44541,26 @@ function panelDataHelper(panelDataArray, panelData, layout) {
44405
44541
  pivotIndices
44406
44542
  };
44407
44543
  }
44408
- function S(e2) {
44544
+ function C(e2) {
44409
44545
  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" };
44410
44546
  }
44411
- 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) => {
44412
- const v = useRef(null), b = S(d2);
44413
- useImperativeHandle(g, () => ({ scrollToPanel: (e2) => {
44414
- if (!v.current)
44547
+ 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) => {
44548
+ const b = useRef(null), y2 = useRef(false), w2 = useRef(null), x2 = C(d2);
44549
+ useImperativeHandle(v, () => ({ scrollToPanel: (e2) => {
44550
+ if (!b.current)
44415
44551
  return;
44416
- const t2 = v.current, n2 = t2.children[e2];
44552
+ const t2 = b.current, n2 = t2.children[e2];
44417
44553
  if (n2) {
44554
+ y2.current = true, w2.current && clearTimeout(w2.current);
44418
44555
  const e3 = n2.offsetLeft;
44419
- t2.scrollTo({ left: e3, behavior: "smooth" });
44556
+ t2.scrollTo({ left: e3, behavior: "smooth" }), w2.current = setTimeout(() => {
44557
+ y2.current = false;
44558
+ }, 500);
44420
44559
  }
44421
44560
  }, getCurrentPanel: () => {
44422
- if (!v.current || v.current.children.length === 0)
44561
+ if (!b.current || b.current.children.length === 0)
44423
44562
  return 0;
44424
- const e2 = v.current, t2 = e2.getBoundingClientRect().left;
44563
+ const e2 = b.current, t2 = e2.getBoundingClientRect().left;
44425
44564
  let n2 = 0, r2 = 1 / 0;
44426
44565
  for (let o3 = 0; o3 < e2.children.length; o3++) {
44427
44566
  const i2 = e2.children[o3].getBoundingClientRect(), a3 = Math.abs(i2.left - t2);
@@ -44430,9 +44569,9 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
44430
44569
  return n2;
44431
44570
  } }));
44432
44571
  useEffect(() => {
44433
- if (!f2 || !v.current)
44572
+ if (!f2 || !b.current)
44434
44573
  return;
44435
- const e2 = v.current, t2 = (e3) => {
44574
+ const e2 = b.current, t2 = (e3) => {
44436
44575
  const t3 = e3.target;
44437
44576
  if (t3.tagName === "INPUT" || t3.tagName === "TEXTAREA" || t3.tagName === "SELECT" || t3.isContentEditable || t3.closest(".xterm") !== null || t3.closest('[contenteditable="true"]') !== null)
44438
44577
  return;
@@ -44441,79 +44580,84 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
44441
44580
  return e2.addEventListener("keydown", t2), () => {
44442
44581
  e2.removeEventListener("keydown", t2);
44443
44582
  };
44444
- }, [f2]);
44445
- const y2 = o2.length, w2 = 2 * u2;
44446
- let x2;
44447
- x2 = y2 === 1 || y2 === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
44448
- const C = React2__default.useId().replace(/:/g, "_");
44583
+ }, [f2]), useEffect(() => () => {
44584
+ w2.current && clearTimeout(w2.current);
44585
+ }, []);
44586
+ const S = o2.length, R2 = 2 * u2;
44587
+ let N;
44588
+ N = S === 1 || S === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
44589
+ const E = React2__default.useId().replace(/:/g, "_");
44449
44590
  return jsxs(Fragment, { children: [
44450
- y2 === 2 && /* @__PURE__ */ jsx("style", { children: `
44451
- .snap-carousel-container[data-carousel-id="${C}"][data-panel-count="2"] .snap-carousel-panel {
44591
+ S === 2 && /* @__PURE__ */ jsx("style", { children: `
44592
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
44452
44593
  width: 100%;
44453
44594
  }
44454
- @container (min-width: ${w2}px) {
44455
- .snap-carousel-container[data-carousel-id="${C}"][data-panel-count="2"] .snap-carousel-panel {
44595
+ @container (min-width: ${R2}px) {
44596
+ .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
44456
44597
  width: 50%;
44457
44598
  }
44458
44599
  }
44459
44600
  ` }),
44460
- /* @__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) => {
44461
- if (!m2 || !v.current || v.current.children.length === 0)
44601
+ /* @__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) => {
44602
+ if (!m2 || !b.current || b.current.children.length === 0)
44462
44603
  return;
44463
- const t2 = v.current, n2 = t2.getBoundingClientRect().left;
44604
+ if (y2.current)
44605
+ return;
44606
+ const t2 = b.current, n2 = t2.getBoundingClientRect().left;
44464
44607
  let r2 = 0, o3 = 1 / 0;
44465
44608
  for (let i2 = 0; i2 < t2.children.length; i2++) {
44466
44609
  const e3 = t2.children[i2].getBoundingClientRect(), a3 = Math.abs(e3.left - n2);
44467
44610
  a3 < o3 && (o3 = a3, r2 = i2);
44468
44611
  }
44469
44612
  m2(r2);
44470
- }, "data-panel-count": y2, "data-carousel-id": C, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
44613
+ }, "data-panel-count": S, "data-carousel-id": E, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
44471
44614
  ] });
44472
44615
  });
44473
- M.displayName = "SnapCarousel";
44616
+ z.displayName = "SnapCarousel";
44617
+ var le;
44474
44618
  var se;
44475
- var ce;
44476
- (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";
44477
- var ue = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
44619
+ (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";
44620
+ var de = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
44478
44621
  var Te;
44479
- var ke;
44480
- (ke = Te || (Te = {}))[ke.Forward = 1] = "Forward", ke[ke.Backward = -1] = "Backward";
44622
+ var Ae;
44623
+ (Ae = Te || (Te = {}))[Ae.Forward = 1] = "Forward", Ae[Ae.Backward = -1] = "Backward";
44624
+ var _e;
44481
44625
  var je;
44482
44626
  var He;
44483
44627
  var Ke;
44484
- var Ue;
44485
- (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";
44486
- ({ start: [Ke.Space, Ke.Enter], cancel: [Ke.Esc], end: [Ke.Space, Ke.Enter, Ke.Tab] });
44628
+ (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";
44629
+ ({ start: [He.Space, He.Enter], cancel: [He.Esc], end: [He.Space, He.Enter, He.Tab] });
44630
+ var rt;
44487
44631
  var ot;
44488
- var it;
44489
- (it = ot || (ot = {}))[it.RightClick = 2] = "RightClick";
44632
+ (ot = rt || (rt = {}))[ot.RightClick = 2] = "RightClick";
44633
+ var at;
44490
44634
  var lt;
44491
44635
  var st;
44492
44636
  var ct;
44493
- var dt;
44494
- (st = lt || (lt = {}))[st.Pointer = 0] = "Pointer", st[st.DraggableRect = 1] = "DraggableRect", (dt = ct || (ct = {}))[dt.TreeOrder = 0] = "TreeOrder", dt[dt.ReversedTreeOrder = 1] = "ReversedTreeOrder";
44637
+ (lt = at || (at = {}))[lt.Pointer = 0] = "Pointer", lt[lt.DraggableRect = 1] = "DraggableRect", (ct = st || (st = {}))[ct.TreeOrder = 0] = "TreeOrder", ct[ct.ReversedTreeOrder = 1] = "ReversedTreeOrder";
44495
44638
  ({ x: { [Te.Backward]: false, [Te.Forward]: false }, y: { [Te.Backward]: false, [Te.Forward]: false } });
44639
+ var pt;
44496
44640
  var ht;
44497
44641
  var mt;
44498
- var ft;
44499
- (mt = ht || (ht = {}))[mt.Always = 0] = "Always", mt[mt.BeforeDragging = 1] = "BeforeDragging", mt[mt.WhileDragging = 2] = "WhileDragging", (ft || (ft = {})).Optimized = "optimized";
44500
- ({ droppable: { strategy: ht.WhileDragging, frequency: ft.Optimized } });
44501
- /* @__PURE__ */ createContext({ ...ue, scaleX: 1, scaleY: 1 });
44642
+ (ht = pt || (pt = {}))[ht.Always = 0] = "Always", ht[ht.BeforeDragging = 1] = "BeforeDragging", ht[ht.WhileDragging = 2] = "WhileDragging", (mt || (mt = {})).Optimized = "optimized";
44643
+ ({ droppable: { strategy: pt.WhileDragging, frequency: mt.Optimized } });
44644
+ /* @__PURE__ */ createContext({ ...de, scaleX: 1, scaleY: 1 });
44645
+ var $t;
44502
44646
  var Bt;
44503
- var Ot;
44504
- (Ot = Bt || (Bt = {}))[Ot.Uninitialized = 0] = "Uninitialized", Ot[Ot.Initializing = 1] = "Initializing", Ot[Ot.Initialized = 2] = "Initialized";
44505
- var Vt;
44647
+ (Bt = $t || ($t = {}))[Bt.Uninitialized = 0] = "Uninitialized", Bt[Bt.Initializing = 1] = "Initializing", Bt[Bt.Initialized = 2] = "Initialized";
44648
+ var Ut;
44506
44649
  (() => {
44507
44650
  if (typeof window != "undefined") {
44508
44651
  const e2 = window;
44509
44652
  return e2.__principlemd_theme_context__ || (e2.__principlemd_theme_context__ = createContext(void 0)), e2.__principlemd_theme_context__;
44510
44653
  }
44511
- return Vt || (Vt = createContext(void 0)), Vt;
44654
+ return Ut || (Ut = createContext(void 0)), Ut;
44512
44655
  })();
44513
44656
  var DocumentView = ({
44514
44657
  content: content2,
44515
44658
  onCheckboxChange,
44516
44659
  maxWidth = "900px",
44660
+ width,
44517
44661
  slideIdPrefix = "document",
44518
44662
  enableHtmlPopout = true,
44519
44663
  enableKeyboardScrolling = true,
@@ -44524,7 +44668,8 @@ var DocumentView = ({
44524
44668
  repositoryInfo,
44525
44669
  fontSizeScale,
44526
44670
  theme: theme2,
44527
- transparentBackground = false
44671
+ transparentBackground = false,
44672
+ editable = false
44528
44673
  }) => {
44529
44674
  const containerRef = useRef(null);
44530
44675
  const backgroundColor = transparentBackground ? "transparent" : theme2.colors.background;
@@ -44556,7 +44701,9 @@ var DocumentView = ({
44556
44701
  fontSizeScale,
44557
44702
  handlePromptCopy,
44558
44703
  repositoryInfo,
44559
- transparentBackground
44704
+ transparentBackground,
44705
+ editable,
44706
+ containerWidth: width
44560
44707
  })));
44561
44708
  };
44562
44709
  const GitCommitDetailPanelContent = ({
@@ -45016,9 +45163,9 @@ const GitPullRequestsPanel = ({
45016
45163
  const { theme: theme2 } = useTheme();
45017
45164
  const [selectedPrId, setSelectedPrId] = useState(null);
45018
45165
  const [showDrafts, setShowDrafts] = useState(false);
45019
- const prSlice = context.getSlice("pullRequests");
45020
- const hasPRs = context.hasSlice("pullRequests");
45021
- const isLoading = context.isSliceLoading("pullRequests");
45166
+ const { pullRequests: prSlice } = context;
45167
+ const hasPRs = !!prSlice;
45168
+ const isLoading = (prSlice == null ? void 0 : prSlice.loading) ?? false;
45022
45169
  const pullRequests = ((_a = prSlice == null ? void 0 : prSlice.data) == null ? void 0 : _a.pullRequests) ?? [];
45023
45170
  useEffect(() => {
45024
45171
  const unsubscribers = [
@@ -46095,7 +46242,8 @@ const panels = [
46095
46242
  },
46096
46243
  component: GitCommitHistoryPanel,
46097
46244
  onMount: async (context) => {
46098
- if (context.hasSlice("commits") && !context.isSliceLoading("commits")) {
46245
+ const commitsSlice = context.getSlice("commits");
46246
+ if (commitsSlice && !commitsSlice.loading) {
46099
46247
  await context.refresh("repository", "commits");
46100
46248
  }
46101
46249
  }
@@ -46127,7 +46275,8 @@ const panels = [
46127
46275
  },
46128
46276
  component: GitPullRequestsPanel,
46129
46277
  onMount: async (context) => {
46130
- if (context.hasSlice("pullRequests") && !context.isSliceLoading("pullRequests")) {
46278
+ const pullRequestsSlice = context.getSlice("pullRequests");
46279
+ if (pullRequestsSlice && !pullRequestsSlice.loading) {
46131
46280
  await context.refresh("repository", "pullRequests");
46132
46281
  }
46133
46282
  }