@industry-theme/markdown-panels 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/panels.bundle.js +8 -140
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +3 -3
package/dist/panels.bundle.js
CHANGED
|
@@ -43503,8 +43503,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
|
|
|
43503
43503
|
}, [enableKeyboardScrolling, isVisible, slideIndex, scrollConfig]);
|
|
43504
43504
|
useEffect(() => {
|
|
43505
43505
|
if (autoFocusOnVisible && isVisible && slideRef.current) {
|
|
43506
|
-
|
|
43507
|
-
slideRef.current.focus();
|
|
43506
|
+
slideRef.current.focus({ preventScroll: true });
|
|
43508
43507
|
}
|
|
43509
43508
|
}, [autoFocusOnVisible, isVisible]);
|
|
43510
43509
|
const openPlaceholderModal = (placeholders, promptContent) => {
|
|
@@ -47497,12 +47496,8 @@ var SlidePresentationBook = ({
|
|
|
47497
47496
|
};
|
|
47498
47497
|
var DocumentView = ({
|
|
47499
47498
|
content: content2,
|
|
47500
|
-
showSegmented = false,
|
|
47501
47499
|
onCheckboxChange,
|
|
47502
|
-
onSectionClick,
|
|
47503
47500
|
maxWidth = "900px",
|
|
47504
|
-
showSectionHeaders = true,
|
|
47505
|
-
showSeparators = true,
|
|
47506
47501
|
slideIdPrefix = "document",
|
|
47507
47502
|
enableHtmlPopout = true,
|
|
47508
47503
|
enableKeyboardScrolling = true,
|
|
@@ -47516,90 +47511,7 @@ var DocumentView = ({
|
|
|
47516
47511
|
transparentBackground = false
|
|
47517
47512
|
}) => {
|
|
47518
47513
|
const containerRef = useRef(null);
|
|
47519
|
-
const sectionRefs = useRef([]);
|
|
47520
47514
|
const backgroundColor = transparentBackground ? "transparent" : theme2.colors.background;
|
|
47521
|
-
const scrollToSection = useCallback((sectionIndex) => {
|
|
47522
|
-
var _a;
|
|
47523
|
-
if (sectionRefs.current[sectionIndex]) {
|
|
47524
|
-
(_a = sectionRefs.current[sectionIndex]) == null ? void 0 : _a.scrollIntoView({
|
|
47525
|
-
behavior: "smooth",
|
|
47526
|
-
block: "start"
|
|
47527
|
-
});
|
|
47528
|
-
}
|
|
47529
|
-
}, []);
|
|
47530
|
-
const handleSectionClick = useCallback((index2) => {
|
|
47531
|
-
scrollToSection(index2);
|
|
47532
|
-
onSectionClick == null ? void 0 : onSectionClick(index2);
|
|
47533
|
-
}, [scrollToSection, onSectionClick]);
|
|
47534
|
-
if (typeof content2 === "string") {
|
|
47535
|
-
return /* @__PURE__ */ React2__default.createElement("div", {
|
|
47536
|
-
ref: containerRef,
|
|
47537
|
-
style: {
|
|
47538
|
-
height: "100%",
|
|
47539
|
-
overflow: "auto",
|
|
47540
|
-
backgroundColor
|
|
47541
|
-
}
|
|
47542
|
-
}, /* @__PURE__ */ React2__default.createElement("div", {
|
|
47543
|
-
style: {
|
|
47544
|
-
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
|
|
47545
|
-
margin: "0 auto",
|
|
47546
|
-
height: "100%"
|
|
47547
|
-
}
|
|
47548
|
-
}, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
|
|
47549
|
-
content: content2,
|
|
47550
|
-
slideIdPrefix,
|
|
47551
|
-
slideIndex: 0,
|
|
47552
|
-
isVisible: true,
|
|
47553
|
-
theme: theme2,
|
|
47554
|
-
onCheckboxChange,
|
|
47555
|
-
enableHtmlPopout,
|
|
47556
|
-
enableKeyboardScrolling,
|
|
47557
|
-
autoFocusOnVisible,
|
|
47558
|
-
onLinkClick,
|
|
47559
|
-
handleRunBashCommand,
|
|
47560
|
-
fontSizeScale,
|
|
47561
|
-
handlePromptCopy,
|
|
47562
|
-
repositoryInfo,
|
|
47563
|
-
transparentBackground
|
|
47564
|
-
})));
|
|
47565
|
-
}
|
|
47566
|
-
if (!showSegmented) {
|
|
47567
|
-
const fullContent = content2.join(`
|
|
47568
|
-
|
|
47569
|
-
---
|
|
47570
|
-
|
|
47571
|
-
`);
|
|
47572
|
-
return /* @__PURE__ */ React2__default.createElement("div", {
|
|
47573
|
-
ref: containerRef,
|
|
47574
|
-
style: {
|
|
47575
|
-
height: "100%",
|
|
47576
|
-
overflow: "auto",
|
|
47577
|
-
backgroundColor
|
|
47578
|
-
}
|
|
47579
|
-
}, /* @__PURE__ */ React2__default.createElement("div", {
|
|
47580
|
-
style: {
|
|
47581
|
-
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
|
|
47582
|
-
margin: "0 auto",
|
|
47583
|
-
height: "100%"
|
|
47584
|
-
}
|
|
47585
|
-
}, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
|
|
47586
|
-
content: fullContent,
|
|
47587
|
-
slideIdPrefix,
|
|
47588
|
-
slideIndex: 0,
|
|
47589
|
-
isVisible: true,
|
|
47590
|
-
theme: theme2,
|
|
47591
|
-
onCheckboxChange,
|
|
47592
|
-
enableHtmlPopout,
|
|
47593
|
-
enableKeyboardScrolling,
|
|
47594
|
-
autoFocusOnVisible,
|
|
47595
|
-
onLinkClick,
|
|
47596
|
-
handleRunBashCommand,
|
|
47597
|
-
fontSizeScale,
|
|
47598
|
-
handlePromptCopy,
|
|
47599
|
-
repositoryInfo,
|
|
47600
|
-
transparentBackground
|
|
47601
|
-
})));
|
|
47602
|
-
}
|
|
47603
47515
|
return /* @__PURE__ */ React2__default.createElement("div", {
|
|
47604
47516
|
ref: containerRef,
|
|
47605
47517
|
style: {
|
|
@@ -47610,49 +47522,13 @@ var DocumentView = ({
|
|
|
47610
47522
|
}, /* @__PURE__ */ React2__default.createElement("div", {
|
|
47611
47523
|
style: {
|
|
47612
47524
|
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
|
|
47613
|
-
margin: "0 auto"
|
|
47614
|
-
|
|
47615
|
-
}, content2.map((slideContent, index2) => /* @__PURE__ */ React2__default.createElement("div", {
|
|
47616
|
-
key: index2,
|
|
47617
|
-
ref: (el) => {
|
|
47618
|
-
if (el)
|
|
47619
|
-
sectionRefs.current[index2] = el;
|
|
47620
|
-
},
|
|
47621
|
-
style: {
|
|
47622
|
-
marginBottom: index2 < content2.length - 1 ? "48px" : "0",
|
|
47623
|
-
scrollMarginTop: "20px"
|
|
47624
|
-
}
|
|
47625
|
-
}, showSectionHeaders && /* @__PURE__ */ React2__default.createElement("div", {
|
|
47626
|
-
onClick: () => handleSectionClick(index2),
|
|
47627
|
-
style: {
|
|
47628
|
-
display: "flex",
|
|
47629
|
-
alignItems: "center",
|
|
47630
|
-
justifyContent: "space-between",
|
|
47631
|
-
marginBottom: "16px",
|
|
47632
|
-
paddingBottom: "8px",
|
|
47633
|
-
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
47634
|
-
opacity: 0.7,
|
|
47635
|
-
cursor: "pointer",
|
|
47636
|
-
transition: "opacity 0.2s ease"
|
|
47637
|
-
},
|
|
47638
|
-
onMouseOver: (e2) => {
|
|
47639
|
-
e2.currentTarget.style.opacity = "1";
|
|
47640
|
-
},
|
|
47641
|
-
onMouseOut: (e2) => {
|
|
47642
|
-
e2.currentTarget.style.opacity = "0.7";
|
|
47643
|
-
}
|
|
47644
|
-
}, /* @__PURE__ */ React2__default.createElement("span", {
|
|
47645
|
-
style: {
|
|
47646
|
-
fontSize: "11px",
|
|
47647
|
-
fontWeight: 600,
|
|
47648
|
-
color: theme2.colors.textSecondary,
|
|
47649
|
-
textTransform: "uppercase",
|
|
47650
|
-
letterSpacing: "0.5px"
|
|
47525
|
+
margin: "0 auto",
|
|
47526
|
+
height: "100%"
|
|
47651
47527
|
}
|
|
47652
|
-
},
|
|
47653
|
-
content:
|
|
47654
|
-
slideIdPrefix
|
|
47655
|
-
slideIndex:
|
|
47528
|
+
}, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
|
|
47529
|
+
content: content2,
|
|
47530
|
+
slideIdPrefix,
|
|
47531
|
+
slideIndex: 0,
|
|
47656
47532
|
isVisible: true,
|
|
47657
47533
|
theme: theme2,
|
|
47658
47534
|
onCheckboxChange,
|
|
@@ -47665,15 +47541,7 @@ var DocumentView = ({
|
|
|
47665
47541
|
handlePromptCopy,
|
|
47666
47542
|
repositoryInfo,
|
|
47667
47543
|
transparentBackground
|
|
47668
|
-
})
|
|
47669
|
-
style: {
|
|
47670
|
-
marginTop: "32px",
|
|
47671
|
-
marginBottom: "32px",
|
|
47672
|
-
height: "1px",
|
|
47673
|
-
backgroundColor: theme2.colors.border,
|
|
47674
|
-
opacity: 0.3
|
|
47675
|
-
}
|
|
47676
|
-
})))));
|
|
47544
|
+
})));
|
|
47677
47545
|
};
|
|
47678
47546
|
function parseMarkdownIntoPresentation2(markdownContent, repositoryInfo) {
|
|
47679
47547
|
return parseMarkdownIntoPresentation(markdownContent, repositoryInfo);
|