@industry-theme/github-panels 0.1.45 → 0.1.46

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.
@@ -44530,8 +44530,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
44530
44530
  }, [enableKeyboardScrolling, isVisible, slideIndex, scrollConfig]);
44531
44531
  useEffect(() => {
44532
44532
  if (autoFocusOnVisible && isVisible && slideRef.current) {
44533
- console.log("🎯 Auto-focusing slide container");
44534
- slideRef.current.focus();
44533
+ slideRef.current.focus({ preventScroll: true });
44535
44534
  }
44536
44535
  }, [autoFocusOnVisible, isVisible]);
44537
44536
  const openPlaceholderModal = (placeholders, promptContent) => {
@@ -46498,12 +46497,8 @@ var Vt;
46498
46497
  })();
46499
46498
  var DocumentView = ({
46500
46499
  content: content2,
46501
- showSegmented = false,
46502
46500
  onCheckboxChange,
46503
- onSectionClick,
46504
46501
  maxWidth = "900px",
46505
- showSectionHeaders = true,
46506
- showSeparators = true,
46507
46502
  slideIdPrefix = "document",
46508
46503
  enableHtmlPopout = true,
46509
46504
  enableKeyboardScrolling = true,
@@ -46517,90 +46512,7 @@ var DocumentView = ({
46517
46512
  transparentBackground = false
46518
46513
  }) => {
46519
46514
  const containerRef = useRef(null);
46520
- const sectionRefs = useRef([]);
46521
46515
  const backgroundColor = transparentBackground ? "transparent" : theme2.colors.background;
46522
- const scrollToSection = useCallback((sectionIndex) => {
46523
- var _a;
46524
- if (sectionRefs.current[sectionIndex]) {
46525
- (_a = sectionRefs.current[sectionIndex]) == null ? void 0 : _a.scrollIntoView({
46526
- behavior: "smooth",
46527
- block: "start"
46528
- });
46529
- }
46530
- }, []);
46531
- const handleSectionClick = useCallback((index2) => {
46532
- scrollToSection(index2);
46533
- onSectionClick == null ? void 0 : onSectionClick(index2);
46534
- }, [scrollToSection, onSectionClick]);
46535
- if (typeof content2 === "string") {
46536
- return /* @__PURE__ */ React2__default.createElement("div", {
46537
- ref: containerRef,
46538
- style: {
46539
- height: "100%",
46540
- overflow: "auto",
46541
- backgroundColor
46542
- }
46543
- }, /* @__PURE__ */ React2__default.createElement("div", {
46544
- style: {
46545
- maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
46546
- margin: "0 auto",
46547
- height: "100%"
46548
- }
46549
- }, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
46550
- content: content2,
46551
- slideIdPrefix,
46552
- slideIndex: 0,
46553
- isVisible: true,
46554
- theme: theme2,
46555
- onCheckboxChange,
46556
- enableHtmlPopout,
46557
- enableKeyboardScrolling,
46558
- autoFocusOnVisible,
46559
- onLinkClick,
46560
- handleRunBashCommand,
46561
- fontSizeScale,
46562
- handlePromptCopy,
46563
- repositoryInfo,
46564
- transparentBackground
46565
- })));
46566
- }
46567
- if (!showSegmented) {
46568
- const fullContent = content2.join(`
46569
-
46570
- ---
46571
-
46572
- `);
46573
- return /* @__PURE__ */ React2__default.createElement("div", {
46574
- ref: containerRef,
46575
- style: {
46576
- height: "100%",
46577
- overflow: "auto",
46578
- backgroundColor
46579
- }
46580
- }, /* @__PURE__ */ React2__default.createElement("div", {
46581
- style: {
46582
- maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
46583
- margin: "0 auto",
46584
- height: "100%"
46585
- }
46586
- }, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
46587
- content: fullContent,
46588
- slideIdPrefix,
46589
- slideIndex: 0,
46590
- isVisible: true,
46591
- theme: theme2,
46592
- onCheckboxChange,
46593
- enableHtmlPopout,
46594
- enableKeyboardScrolling,
46595
- autoFocusOnVisible,
46596
- onLinkClick,
46597
- handleRunBashCommand,
46598
- fontSizeScale,
46599
- handlePromptCopy,
46600
- repositoryInfo,
46601
- transparentBackground
46602
- })));
46603
- }
46604
46516
  return /* @__PURE__ */ React2__default.createElement("div", {
46605
46517
  ref: containerRef,
46606
46518
  style: {
@@ -46611,49 +46523,13 @@ var DocumentView = ({
46611
46523
  }, /* @__PURE__ */ React2__default.createElement("div", {
46612
46524
  style: {
46613
46525
  maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
46614
- margin: "0 auto"
46615
- }
46616
- }, content2.map((slideContent, index2) => /* @__PURE__ */ React2__default.createElement("div", {
46617
- key: index2,
46618
- ref: (el) => {
46619
- if (el)
46620
- sectionRefs.current[index2] = el;
46621
- },
46622
- style: {
46623
- marginBottom: index2 < content2.length - 1 ? "48px" : "0",
46624
- scrollMarginTop: "20px"
46526
+ margin: "0 auto",
46527
+ height: "100%"
46625
46528
  }
46626
- }, showSectionHeaders && /* @__PURE__ */ React2__default.createElement("div", {
46627
- onClick: () => handleSectionClick(index2),
46628
- style: {
46629
- display: "flex",
46630
- alignItems: "center",
46631
- justifyContent: "space-between",
46632
- marginBottom: "16px",
46633
- paddingBottom: "8px",
46634
- borderBottom: `1px solid ${theme2.colors.border}`,
46635
- opacity: 0.7,
46636
- cursor: "pointer",
46637
- transition: "opacity 0.2s ease"
46638
- },
46639
- onMouseOver: (e2) => {
46640
- e2.currentTarget.style.opacity = "1";
46641
- },
46642
- onMouseOut: (e2) => {
46643
- e2.currentTarget.style.opacity = "0.7";
46644
- }
46645
- }, /* @__PURE__ */ React2__default.createElement("span", {
46646
- style: {
46647
- fontSize: "11px",
46648
- fontWeight: 600,
46649
- color: theme2.colors.textSecondary,
46650
- textTransform: "uppercase",
46651
- letterSpacing: "0.5px"
46652
- }
46653
- }, "Section ", index2 + 1, " of ", content2.length)), /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
46654
- content: slideContent,
46655
- slideIdPrefix: `${slideIdPrefix}-${index2}`,
46656
- slideIndex: index2,
46529
+ }, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
46530
+ content: content2,
46531
+ slideIdPrefix,
46532
+ slideIndex: 0,
46657
46533
  isVisible: true,
46658
46534
  theme: theme2,
46659
46535
  onCheckboxChange,
@@ -46666,15 +46542,7 @@ var DocumentView = ({
46666
46542
  handlePromptCopy,
46667
46543
  repositoryInfo,
46668
46544
  transparentBackground
46669
- }), showSeparators && index2 < content2.length - 1 && /* @__PURE__ */ React2__default.createElement("div", {
46670
- style: {
46671
- marginTop: "32px",
46672
- marginBottom: "32px",
46673
- height: "1px",
46674
- backgroundColor: theme2.colors.border,
46675
- opacity: 0.3
46676
- }
46677
- })))));
46545
+ })));
46678
46546
  };
46679
46547
  const formatDate$1 = (dateString) => {
46680
46548
  const date = new Date(dateString);