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