themed-markdown 0.1.9 → 0.1.11
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/index.js +146 -60
- package/dist/index.mjs +146 -60
- package/dist/industryMarkdown/components/DocumentView.stories.d.ts +13 -0
- package/dist/industryMarkdown/components/DocumentView.stories.d.ts.map +1 -0
- package/dist/industryMarkdown/components/IndustryEditableMarkdownSlide.d.ts.map +1 -1
- package/dist/industryMarkdown/components/IndustryEditableMarkdownSlide.stories.d.ts +19 -0
- package/dist/industryMarkdown/components/IndustryEditableMarkdownSlide.stories.d.ts.map +1 -0
- package/dist/industryMarkdown/components/IndustryEditableMermaidDiagram.d.ts +18 -0
- package/dist/industryMarkdown/components/IndustryEditableMermaidDiagram.d.ts.map +1 -0
- package/dist/industryMarkdown/components/IndustryEditableMermaidDiagram.stories.d.ts +18 -0
- package/dist/industryMarkdown/components/IndustryEditableMermaidDiagram.stories.d.ts.map +1 -0
- package/dist/industryMarkdown/components/IndustryMarkdownSlide.d.ts.map +1 -1
- package/dist/industryMarkdown/components/IndustryMermaidDiagram.d.ts.map +1 -1
- package/dist/industryMarkdown/components/IndustryZoomableMermaidDiagram.d.ts.map +1 -1
- package/dist/industryMarkdown/components/SlidePresentation.d.ts.map +1 -1
- package/dist/industryMarkdown/components/SlidePresentation.stories.d.ts +16 -0
- package/dist/industryMarkdown/components/SlidePresentation.stories.d.ts.map +1 -0
- package/dist/industryMarkdown/index.d.ts +2 -0
- package/dist/industryMarkdown/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -642,12 +642,20 @@ function IndustryMermaidDiagram({
|
|
|
642
642
|
svgElement.style.display = "block";
|
|
643
643
|
svgElement.style.margin = "0 auto";
|
|
644
644
|
if (isModalMode) {
|
|
645
|
-
svgElement.style.width = "
|
|
645
|
+
svgElement.style.width = "auto";
|
|
646
646
|
svgElement.style.height = "auto";
|
|
647
|
+
const viewBox = svgElement.getAttribute("viewBox");
|
|
648
|
+
if (viewBox) {
|
|
649
|
+
const [, , width, height] = viewBox.split(" ").map(Number);
|
|
650
|
+
if (width && height) {
|
|
651
|
+
svgElement.setAttribute("width", width.toString());
|
|
652
|
+
svgElement.setAttribute("height", height.toString());
|
|
653
|
+
}
|
|
654
|
+
}
|
|
647
655
|
} else {
|
|
648
656
|
svgElement.style.maxHeight = "360px";
|
|
649
657
|
svgElement.style.width = "auto";
|
|
650
|
-
svgElement.style.maxWidth = "
|
|
658
|
+
svgElement.style.maxWidth = "none";
|
|
651
659
|
}
|
|
652
660
|
} else {
|
|
653
661
|
console.warn("No SVG element found after mermaid render");
|
|
@@ -691,22 +699,25 @@ function IndustryMermaidDiagram({
|
|
|
691
699
|
const svgElement = containerElement.querySelector("svg");
|
|
692
700
|
if (svgElement) {
|
|
693
701
|
if (zoomLevel !== 1) {
|
|
694
|
-
const originalWidth = svgElement.scrollWidth || svgElement.clientWidth;
|
|
695
|
-
const originalHeight = svgElement.scrollHeight || svgElement.clientHeight;
|
|
696
702
|
svgElement.style.transform = `scale(${zoomLevel})`;
|
|
697
|
-
svgElement.style.transformOrigin = "top
|
|
698
|
-
|
|
699
|
-
|
|
703
|
+
svgElement.style.transformOrigin = "top center";
|
|
704
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
705
|
+
const svgRect = svgElement.getBoundingClientRect();
|
|
706
|
+
if (svgRect.width < containerRect.width) {
|
|
707
|
+
svgElement.style.margin = "0 auto";
|
|
708
|
+
}
|
|
700
709
|
} else {
|
|
701
710
|
svgElement.style.transform = "";
|
|
702
711
|
svgElement.style.transformOrigin = "";
|
|
703
|
-
svgElement.style.
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
712
|
+
svgElement.style.margin = "0 auto";
|
|
713
|
+
if (!isModalMode) {
|
|
714
|
+
svgElement.style.maxHeight = "360px";
|
|
715
|
+
svgElement.style.width = "auto";
|
|
716
|
+
svgElement.style.maxWidth = "none";
|
|
717
|
+
}
|
|
707
718
|
}
|
|
708
719
|
}
|
|
709
|
-
}, [zoomLevel, containerElement, hasRendered]);
|
|
720
|
+
}, [zoomLevel, containerElement, hasRendered, isModalMode]);
|
|
710
721
|
import_react3.useEffect(() => {
|
|
711
722
|
if (errorDetails && onCopyError) {
|
|
712
723
|
const handleKeyDown = (e) => {
|
|
@@ -723,7 +734,18 @@ function IndustryMermaidDiagram({
|
|
|
723
734
|
}
|
|
724
735
|
return;
|
|
725
736
|
}, [errorDetails, onCopyError, containerElement]);
|
|
726
|
-
const containerStyle = {
|
|
737
|
+
const containerStyle = isModalMode ? {
|
|
738
|
+
position: "relative",
|
|
739
|
+
width: "fit-content",
|
|
740
|
+
height: "fit-content",
|
|
741
|
+
display: "block",
|
|
742
|
+
backgroundColor: "transparent",
|
|
743
|
+
border: "none",
|
|
744
|
+
borderRadius: 0,
|
|
745
|
+
padding: 0,
|
|
746
|
+
margin: 0,
|
|
747
|
+
overflow: "visible"
|
|
748
|
+
} : {
|
|
727
749
|
position: "relative",
|
|
728
750
|
width: "100%",
|
|
729
751
|
minHeight: "200px",
|
|
@@ -734,7 +756,8 @@ function IndustryMermaidDiagram({
|
|
|
734
756
|
borderRadius: theme2.radii[2],
|
|
735
757
|
padding: hasRendered ? theme2.space[3] : theme2.space[4],
|
|
736
758
|
margin: `${theme2.space[4]}px 0`,
|
|
737
|
-
|
|
759
|
+
overflowX: hasRendered ? "auto" : "visible",
|
|
760
|
+
overflowY: hasRendered ? "auto" : "visible"
|
|
738
761
|
};
|
|
739
762
|
const placeholderStyle = {
|
|
740
763
|
textAlign: "center",
|
|
@@ -742,9 +765,17 @@ function IndustryMermaidDiagram({
|
|
|
742
765
|
fontSize: theme2.fontSizes[2],
|
|
743
766
|
fontFamily: theme2.fonts.body
|
|
744
767
|
};
|
|
745
|
-
return /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
768
|
+
return isModalMode ? /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
769
|
+
ref: containerRef,
|
|
770
|
+
style: containerStyle,
|
|
771
|
+
className: "mermaid-container"
|
|
772
|
+
}, !hasRendered && /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
773
|
+
style: placeholderStyle
|
|
774
|
+
}, /* @__PURE__ */ import_react3.default.createElement("div", null, "\uD83D\uDCCA Mermaid Diagram"), /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
775
|
+
style: { fontSize: theme2.fontSizes[1], marginTop: theme2.space[2], opacity: 0.7 }
|
|
776
|
+
}, "Loading..."))) : /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
746
777
|
style: { position: "relative" }
|
|
747
|
-
}, hasRendered &&
|
|
778
|
+
}, hasRendered && /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
748
779
|
style: {
|
|
749
780
|
position: "absolute",
|
|
750
781
|
top: theme2.space[2],
|
|
@@ -1920,8 +1951,11 @@ function IndustryZoomableMermaidDiagram({
|
|
|
1920
1951
|
initialScale: calculatedScale,
|
|
1921
1952
|
initialPositionX: 0,
|
|
1922
1953
|
initialPositionY: 0,
|
|
1923
|
-
centerOnInit: true
|
|
1924
|
-
|
|
1954
|
+
centerOnInit: true,
|
|
1955
|
+
centerZoomedOut: true,
|
|
1956
|
+
alignmentAnimation: { disabled: true },
|
|
1957
|
+
zoomAnimation: { disabled: false, size: 0.2 }
|
|
1958
|
+
}, ({ centerView, instance }) => /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1925
1959
|
style: {
|
|
1926
1960
|
position: "absolute",
|
|
1927
1961
|
top: theme2.space[3],
|
|
@@ -1931,19 +1965,29 @@ function IndustryZoomableMermaidDiagram({
|
|
|
1931
1965
|
gap: theme2.space[2]
|
|
1932
1966
|
}
|
|
1933
1967
|
}, /* @__PURE__ */ import_react8.default.createElement("button", {
|
|
1934
|
-
onClick: () =>
|
|
1968
|
+
onClick: () => {
|
|
1969
|
+
const { scale } = instance.transformState;
|
|
1970
|
+
const newScale = Math.min(scale * 1.2, 10);
|
|
1971
|
+
centerView(newScale, 200, "easeOut");
|
|
1972
|
+
},
|
|
1935
1973
|
style: buttonStyle,
|
|
1936
1974
|
onMouseEnter: handleButtonHover,
|
|
1937
1975
|
onMouseLeave: handleButtonLeave,
|
|
1938
1976
|
title: "Zoom in"
|
|
1939
1977
|
}, "+"), /* @__PURE__ */ import_react8.default.createElement("button", {
|
|
1940
|
-
onClick: () =>
|
|
1978
|
+
onClick: () => {
|
|
1979
|
+
const { scale } = instance.transformState;
|
|
1980
|
+
const newScale = Math.max(scale * 0.833, 0.3);
|
|
1981
|
+
centerView(newScale, 200, "easeOut");
|
|
1982
|
+
},
|
|
1941
1983
|
style: buttonStyle,
|
|
1942
1984
|
onMouseEnter: handleButtonHover,
|
|
1943
1985
|
onMouseLeave: handleButtonLeave,
|
|
1944
1986
|
title: "Zoom out"
|
|
1945
1987
|
}, "−"), /* @__PURE__ */ import_react8.default.createElement("button", {
|
|
1946
|
-
onClick: () =>
|
|
1988
|
+
onClick: () => {
|
|
1989
|
+
centerView(calculatedScale, 200, "easeOut");
|
|
1990
|
+
},
|
|
1947
1991
|
style: buttonStyle,
|
|
1948
1992
|
onMouseEnter: handleButtonHover,
|
|
1949
1993
|
onMouseLeave: handleButtonLeave,
|
|
@@ -1956,34 +2000,36 @@ function IndustryZoomableMermaidDiagram({
|
|
|
1956
2000
|
fontFamily: theme2.fonts.body
|
|
1957
2001
|
}
|
|
1958
2002
|
}, "Optimizing view...")), /* @__PURE__ */ import_react8.default.createElement(import_react_zoom_pan_pinch.TransformComponent, {
|
|
1959
|
-
wrapperStyle: {
|
|
1960
|
-
contentStyle: {
|
|
2003
|
+
wrapperStyle: {
|
|
1961
2004
|
width: "100%",
|
|
1962
2005
|
height: "100%",
|
|
2006
|
+
overflow: "hidden"
|
|
2007
|
+
},
|
|
2008
|
+
contentStyle: {
|
|
2009
|
+
width: "fit-content",
|
|
2010
|
+
height: "fit-content",
|
|
1963
2011
|
display: "flex",
|
|
1964
2012
|
alignItems: "center",
|
|
1965
|
-
justifyContent: "center"
|
|
2013
|
+
justifyContent: "center",
|
|
2014
|
+
minWidth: "100%",
|
|
2015
|
+
minHeight: "100%"
|
|
1966
2016
|
}
|
|
1967
2017
|
}, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1968
2018
|
ref: diagramRef,
|
|
1969
2019
|
style: {
|
|
1970
|
-
width: "100%",
|
|
1971
|
-
height: "100%",
|
|
1972
2020
|
display: "flex",
|
|
1973
2021
|
alignItems: "center",
|
|
1974
|
-
justifyContent: "center"
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
height: "100%",
|
|
1980
|
-
overflow: "visible"
|
|
2022
|
+
justifyContent: "center",
|
|
2023
|
+
width: "fit-content",
|
|
2024
|
+
height: "fit-content",
|
|
2025
|
+
minWidth: "100%",
|
|
2026
|
+
minHeight: "100%"
|
|
1981
2027
|
}
|
|
1982
2028
|
}, /* @__PURE__ */ import_react8.default.createElement(IndustryMermaidDiagram, {
|
|
1983
2029
|
code,
|
|
1984
2030
|
id,
|
|
1985
2031
|
isModalMode: true
|
|
1986
|
-
}))))))
|
|
2032
|
+
}))))));
|
|
1987
2033
|
}
|
|
1988
2034
|
|
|
1989
2035
|
// industryMarkdown/components/IndustryMermaidModal.tsx
|
|
@@ -2686,9 +2732,9 @@ var IndustryMarkdownSlide = import_react11.default.memo(function IndustryMarkdow
|
|
|
2686
2732
|
tagNames: [...import_hast_util_sanitize.defaultSchema.tagNames || [], "picture", "source"],
|
|
2687
2733
|
attributes: {
|
|
2688
2734
|
...import_hast_util_sanitize.defaultSchema.attributes,
|
|
2689
|
-
code: [...import_hast_util_sanitize.defaultSchema.attributes?.code || [], "className"],
|
|
2690
|
-
span: [...import_hast_util_sanitize.defaultSchema.attributes?.span || [], "className"],
|
|
2691
|
-
pre: [...import_hast_util_sanitize.defaultSchema.attributes?.pre || [], "className"],
|
|
2735
|
+
code: [...import_hast_util_sanitize.defaultSchema.attributes?.code || [], "className", "style"],
|
|
2736
|
+
span: [...import_hast_util_sanitize.defaultSchema.attributes?.span || [], "className", "style"],
|
|
2737
|
+
pre: [...import_hast_util_sanitize.defaultSchema.attributes?.pre || [], "className", "style"],
|
|
2692
2738
|
div: [...import_hast_util_sanitize.defaultSchema.attributes?.div || [], "style", "className", "id"],
|
|
2693
2739
|
p: [...import_hast_util_sanitize.defaultSchema.attributes?.p || [], "style", "className", "id"],
|
|
2694
2740
|
h1: [...import_hast_util_sanitize.defaultSchema.attributes?.h1 || [], "style", "className", "id"],
|
|
@@ -2721,7 +2767,15 @@ var IndustryMarkdownSlide = import_react11.default.memo(function IndustryMarkdow
|
|
|
2721
2767
|
th: [...import_hast_util_sanitize.defaultSchema.attributes?.th || [], "style", "className"],
|
|
2722
2768
|
td: [...import_hast_util_sanitize.defaultSchema.attributes?.td || [], "style", "className"],
|
|
2723
2769
|
blockquote: [...import_hast_util_sanitize.defaultSchema.attributes?.blockquote || [], "style", "className"],
|
|
2724
|
-
hr: [...import_hast_util_sanitize.defaultSchema.attributes?.hr || [], "style", "className"]
|
|
2770
|
+
hr: [...import_hast_util_sanitize.defaultSchema.attributes?.hr || [], "style", "className"],
|
|
2771
|
+
label: [...import_hast_util_sanitize.defaultSchema.attributes?.label || [], "style", "className", "for"],
|
|
2772
|
+
input: [...import_hast_util_sanitize.defaultSchema.attributes?.input || [], "style", "className", "type", "placeholder", "value", "checked", "disabled"],
|
|
2773
|
+
button: [...import_hast_util_sanitize.defaultSchema.attributes?.button || [], "style", "className", "type", "disabled"],
|
|
2774
|
+
details: [...import_hast_util_sanitize.defaultSchema.attributes?.details || [], "style", "className", "open"],
|
|
2775
|
+
summary: [...import_hast_util_sanitize.defaultSchema.attributes?.summary || [], "style", "className"],
|
|
2776
|
+
footer: [...import_hast_util_sanitize.defaultSchema.attributes?.footer || [], "style", "className"],
|
|
2777
|
+
header: [...import_hast_util_sanitize.defaultSchema.attributes?.header || [], "style", "className"],
|
|
2778
|
+
section: [...import_hast_util_sanitize.defaultSchema.attributes?.section || [], "style", "className"]
|
|
2725
2779
|
}
|
|
2726
2780
|
}), []);
|
|
2727
2781
|
const rootMargin = isVisible ? "0px" : "100px";
|
|
@@ -2872,6 +2926,17 @@ var SlidePresentation = ({
|
|
|
2872
2926
|
const goToNextSlide = import_react12.useCallback(() => {
|
|
2873
2927
|
navigateToSlide(currentSlide + 1);
|
|
2874
2928
|
}, [currentSlide, navigateToSlide]);
|
|
2929
|
+
const toggleFullscreen = import_react12.useCallback(() => {
|
|
2930
|
+
if (!containerRef.current)
|
|
2931
|
+
return;
|
|
2932
|
+
if (!isFullscreen) {
|
|
2933
|
+
containerRef.current.requestFullscreen?.();
|
|
2934
|
+
setIsFullscreen(true);
|
|
2935
|
+
} else {
|
|
2936
|
+
document.exitFullscreen?.();
|
|
2937
|
+
setIsFullscreen(false);
|
|
2938
|
+
}
|
|
2939
|
+
}, [isFullscreen]);
|
|
2875
2940
|
import_react12.useEffect(() => {
|
|
2876
2941
|
const handleKeyDown = (event) => {
|
|
2877
2942
|
if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {
|
|
@@ -2879,33 +2944,52 @@ var SlidePresentation = ({
|
|
|
2879
2944
|
}
|
|
2880
2945
|
switch (event.key) {
|
|
2881
2946
|
case "ArrowLeft":
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
goToPreviousSlide();
|
|
2885
|
-
}
|
|
2947
|
+
event.preventDefault();
|
|
2948
|
+
goToPreviousSlide();
|
|
2886
2949
|
break;
|
|
2887
2950
|
case "ArrowRight":
|
|
2888
|
-
|
|
2951
|
+
event.preventDefault();
|
|
2952
|
+
goToNextSlide();
|
|
2953
|
+
break;
|
|
2954
|
+
case " ":
|
|
2955
|
+
event.preventDefault();
|
|
2956
|
+
goToNextSlide();
|
|
2957
|
+
break;
|
|
2958
|
+
case "Enter":
|
|
2959
|
+
event.preventDefault();
|
|
2960
|
+
goToNextSlide();
|
|
2961
|
+
break;
|
|
2962
|
+
case "Backspace":
|
|
2963
|
+
event.preventDefault();
|
|
2964
|
+
goToPreviousSlide();
|
|
2965
|
+
break;
|
|
2966
|
+
case "Home":
|
|
2967
|
+
event.preventDefault();
|
|
2968
|
+
navigateToSlide(0);
|
|
2969
|
+
break;
|
|
2970
|
+
case "End":
|
|
2971
|
+
event.preventDefault();
|
|
2972
|
+
navigateToSlide(slides.length - 1);
|
|
2973
|
+
break;
|
|
2974
|
+
case "f":
|
|
2975
|
+
case "F":
|
|
2976
|
+
if (!event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
2889
2977
|
event.preventDefault();
|
|
2890
|
-
|
|
2978
|
+
toggleFullscreen();
|
|
2891
2979
|
}
|
|
2892
2980
|
break;
|
|
2893
2981
|
}
|
|
2982
|
+
if (!event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
2983
|
+
const num = parseInt(event.key);
|
|
2984
|
+
if (num >= 1 && num <= 9 && num <= slides.length) {
|
|
2985
|
+
event.preventDefault();
|
|
2986
|
+
navigateToSlide(num - 1);
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2894
2989
|
};
|
|
2895
2990
|
window.addEventListener("keydown", handleKeyDown);
|
|
2896
2991
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2897
|
-
}, [goToPreviousSlide, goToNextSlide]);
|
|
2898
|
-
const toggleFullscreen = import_react12.useCallback(() => {
|
|
2899
|
-
if (!containerRef.current)
|
|
2900
|
-
return;
|
|
2901
|
-
if (!isFullscreen) {
|
|
2902
|
-
containerRef.current.requestFullscreen?.();
|
|
2903
|
-
setIsFullscreen(true);
|
|
2904
|
-
} else {
|
|
2905
|
-
document.exitFullscreen?.();
|
|
2906
|
-
setIsFullscreen(false);
|
|
2907
|
-
}
|
|
2908
|
-
}, [isFullscreen]);
|
|
2992
|
+
}, [goToPreviousSlide, goToNextSlide, navigateToSlide, slides.length, toggleFullscreen]);
|
|
2909
2993
|
import_react12.useEffect(() => {
|
|
2910
2994
|
if (currentSlide >= slides.length && slides.length > 0) {
|
|
2911
2995
|
setCurrentSlide(slides.length - 1);
|
|
@@ -3304,7 +3388,7 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3304
3388
|
clearTimeout(saveTimeoutRef.current);
|
|
3305
3389
|
}
|
|
3306
3390
|
saveTimeoutRef.current = setTimeout(() => {
|
|
3307
|
-
handleSave();
|
|
3391
|
+
handleSave(false);
|
|
3308
3392
|
}, autoSaveDelay);
|
|
3309
3393
|
}
|
|
3310
3394
|
return () => {
|
|
@@ -3324,7 +3408,7 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3324
3408
|
setEditContent(content);
|
|
3325
3409
|
setIsEditing(false);
|
|
3326
3410
|
}, [content]);
|
|
3327
|
-
const handleSave = import_react14.useCallback(async () => {
|
|
3411
|
+
const handleSave = import_react14.useCallback(async (exitEditMode = true) => {
|
|
3328
3412
|
if (onContentChange) {
|
|
3329
3413
|
onContentChange(editContent);
|
|
3330
3414
|
}
|
|
@@ -3338,7 +3422,9 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3338
3422
|
setIsSaving(false);
|
|
3339
3423
|
}
|
|
3340
3424
|
}
|
|
3341
|
-
|
|
3425
|
+
if (exitEditMode) {
|
|
3426
|
+
setIsEditing(false);
|
|
3427
|
+
}
|
|
3342
3428
|
}, [editContent, onContentChange, onSave]);
|
|
3343
3429
|
const handleKeyDown = import_react14.useCallback((e) => {
|
|
3344
3430
|
if (e.key === "Escape") {
|
|
@@ -3388,7 +3474,7 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3388
3474
|
gap: theme2.space[2]
|
|
3389
3475
|
}
|
|
3390
3476
|
}, /* @__PURE__ */ import_react14.default.createElement("button", {
|
|
3391
|
-
onClick: handleSave,
|
|
3477
|
+
onClick: () => handleSave(),
|
|
3392
3478
|
disabled: isSaving,
|
|
3393
3479
|
style: {
|
|
3394
3480
|
display: "flex",
|
package/dist/index.mjs
CHANGED
|
@@ -560,12 +560,20 @@ function IndustryMermaidDiagram({
|
|
|
560
560
|
svgElement.style.display = "block";
|
|
561
561
|
svgElement.style.margin = "0 auto";
|
|
562
562
|
if (isModalMode) {
|
|
563
|
-
svgElement.style.width = "
|
|
563
|
+
svgElement.style.width = "auto";
|
|
564
564
|
svgElement.style.height = "auto";
|
|
565
|
+
const viewBox = svgElement.getAttribute("viewBox");
|
|
566
|
+
if (viewBox) {
|
|
567
|
+
const [, , width, height] = viewBox.split(" ").map(Number);
|
|
568
|
+
if (width && height) {
|
|
569
|
+
svgElement.setAttribute("width", width.toString());
|
|
570
|
+
svgElement.setAttribute("height", height.toString());
|
|
571
|
+
}
|
|
572
|
+
}
|
|
565
573
|
} else {
|
|
566
574
|
svgElement.style.maxHeight = "360px";
|
|
567
575
|
svgElement.style.width = "auto";
|
|
568
|
-
svgElement.style.maxWidth = "
|
|
576
|
+
svgElement.style.maxWidth = "none";
|
|
569
577
|
}
|
|
570
578
|
} else {
|
|
571
579
|
console.warn("No SVG element found after mermaid render");
|
|
@@ -609,22 +617,25 @@ function IndustryMermaidDiagram({
|
|
|
609
617
|
const svgElement = containerElement.querySelector("svg");
|
|
610
618
|
if (svgElement) {
|
|
611
619
|
if (zoomLevel !== 1) {
|
|
612
|
-
const originalWidth = svgElement.scrollWidth || svgElement.clientWidth;
|
|
613
|
-
const originalHeight = svgElement.scrollHeight || svgElement.clientHeight;
|
|
614
620
|
svgElement.style.transform = `scale(${zoomLevel})`;
|
|
615
|
-
svgElement.style.transformOrigin = "top
|
|
616
|
-
|
|
617
|
-
|
|
621
|
+
svgElement.style.transformOrigin = "top center";
|
|
622
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
623
|
+
const svgRect = svgElement.getBoundingClientRect();
|
|
624
|
+
if (svgRect.width < containerRect.width) {
|
|
625
|
+
svgElement.style.margin = "0 auto";
|
|
626
|
+
}
|
|
618
627
|
} else {
|
|
619
628
|
svgElement.style.transform = "";
|
|
620
629
|
svgElement.style.transformOrigin = "";
|
|
621
|
-
svgElement.style.
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
630
|
+
svgElement.style.margin = "0 auto";
|
|
631
|
+
if (!isModalMode) {
|
|
632
|
+
svgElement.style.maxHeight = "360px";
|
|
633
|
+
svgElement.style.width = "auto";
|
|
634
|
+
svgElement.style.maxWidth = "none";
|
|
635
|
+
}
|
|
625
636
|
}
|
|
626
637
|
}
|
|
627
|
-
}, [zoomLevel, containerElement, hasRendered]);
|
|
638
|
+
}, [zoomLevel, containerElement, hasRendered, isModalMode]);
|
|
628
639
|
useEffect2(() => {
|
|
629
640
|
if (errorDetails && onCopyError) {
|
|
630
641
|
const handleKeyDown = (e) => {
|
|
@@ -641,7 +652,18 @@ function IndustryMermaidDiagram({
|
|
|
641
652
|
}
|
|
642
653
|
return;
|
|
643
654
|
}, [errorDetails, onCopyError, containerElement]);
|
|
644
|
-
const containerStyle = {
|
|
655
|
+
const containerStyle = isModalMode ? {
|
|
656
|
+
position: "relative",
|
|
657
|
+
width: "fit-content",
|
|
658
|
+
height: "fit-content",
|
|
659
|
+
display: "block",
|
|
660
|
+
backgroundColor: "transparent",
|
|
661
|
+
border: "none",
|
|
662
|
+
borderRadius: 0,
|
|
663
|
+
padding: 0,
|
|
664
|
+
margin: 0,
|
|
665
|
+
overflow: "visible"
|
|
666
|
+
} : {
|
|
645
667
|
position: "relative",
|
|
646
668
|
width: "100%",
|
|
647
669
|
minHeight: "200px",
|
|
@@ -652,7 +674,8 @@ function IndustryMermaidDiagram({
|
|
|
652
674
|
borderRadius: theme2.radii[2],
|
|
653
675
|
padding: hasRendered ? theme2.space[3] : theme2.space[4],
|
|
654
676
|
margin: `${theme2.space[4]}px 0`,
|
|
655
|
-
|
|
677
|
+
overflowX: hasRendered ? "auto" : "visible",
|
|
678
|
+
overflowY: hasRendered ? "auto" : "visible"
|
|
656
679
|
};
|
|
657
680
|
const placeholderStyle = {
|
|
658
681
|
textAlign: "center",
|
|
@@ -660,9 +683,17 @@ function IndustryMermaidDiagram({
|
|
|
660
683
|
fontSize: theme2.fontSizes[2],
|
|
661
684
|
fontFamily: theme2.fonts.body
|
|
662
685
|
};
|
|
663
|
-
return /* @__PURE__ */ React3.createElement("div", {
|
|
686
|
+
return isModalMode ? /* @__PURE__ */ React3.createElement("div", {
|
|
687
|
+
ref: containerRef,
|
|
688
|
+
style: containerStyle,
|
|
689
|
+
className: "mermaid-container"
|
|
690
|
+
}, !hasRendered && /* @__PURE__ */ React3.createElement("div", {
|
|
691
|
+
style: placeholderStyle
|
|
692
|
+
}, /* @__PURE__ */ React3.createElement("div", null, "\uD83D\uDCCA Mermaid Diagram"), /* @__PURE__ */ React3.createElement("div", {
|
|
693
|
+
style: { fontSize: theme2.fontSizes[1], marginTop: theme2.space[2], opacity: 0.7 }
|
|
694
|
+
}, "Loading..."))) : /* @__PURE__ */ React3.createElement("div", {
|
|
664
695
|
style: { position: "relative" }
|
|
665
|
-
}, hasRendered &&
|
|
696
|
+
}, hasRendered && /* @__PURE__ */ React3.createElement("div", {
|
|
666
697
|
style: {
|
|
667
698
|
position: "absolute",
|
|
668
699
|
top: theme2.space[2],
|
|
@@ -1838,8 +1869,11 @@ function IndustryZoomableMermaidDiagram({
|
|
|
1838
1869
|
initialScale: calculatedScale,
|
|
1839
1870
|
initialPositionX: 0,
|
|
1840
1871
|
initialPositionY: 0,
|
|
1841
|
-
centerOnInit: true
|
|
1842
|
-
|
|
1872
|
+
centerOnInit: true,
|
|
1873
|
+
centerZoomedOut: true,
|
|
1874
|
+
alignmentAnimation: { disabled: true },
|
|
1875
|
+
zoomAnimation: { disabled: false, size: 0.2 }
|
|
1876
|
+
}, ({ centerView, instance }) => /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("div", {
|
|
1843
1877
|
style: {
|
|
1844
1878
|
position: "absolute",
|
|
1845
1879
|
top: theme2.space[3],
|
|
@@ -1849,19 +1883,29 @@ function IndustryZoomableMermaidDiagram({
|
|
|
1849
1883
|
gap: theme2.space[2]
|
|
1850
1884
|
}
|
|
1851
1885
|
}, /* @__PURE__ */ React8.createElement("button", {
|
|
1852
|
-
onClick: () =>
|
|
1886
|
+
onClick: () => {
|
|
1887
|
+
const { scale } = instance.transformState;
|
|
1888
|
+
const newScale = Math.min(scale * 1.2, 10);
|
|
1889
|
+
centerView(newScale, 200, "easeOut");
|
|
1890
|
+
},
|
|
1853
1891
|
style: buttonStyle,
|
|
1854
1892
|
onMouseEnter: handleButtonHover,
|
|
1855
1893
|
onMouseLeave: handleButtonLeave,
|
|
1856
1894
|
title: "Zoom in"
|
|
1857
1895
|
}, "+"), /* @__PURE__ */ React8.createElement("button", {
|
|
1858
|
-
onClick: () =>
|
|
1896
|
+
onClick: () => {
|
|
1897
|
+
const { scale } = instance.transformState;
|
|
1898
|
+
const newScale = Math.max(scale * 0.833, 0.3);
|
|
1899
|
+
centerView(newScale, 200, "easeOut");
|
|
1900
|
+
},
|
|
1859
1901
|
style: buttonStyle,
|
|
1860
1902
|
onMouseEnter: handleButtonHover,
|
|
1861
1903
|
onMouseLeave: handleButtonLeave,
|
|
1862
1904
|
title: "Zoom out"
|
|
1863
1905
|
}, "−"), /* @__PURE__ */ React8.createElement("button", {
|
|
1864
|
-
onClick: () =>
|
|
1906
|
+
onClick: () => {
|
|
1907
|
+
centerView(calculatedScale, 200, "easeOut");
|
|
1908
|
+
},
|
|
1865
1909
|
style: buttonStyle,
|
|
1866
1910
|
onMouseEnter: handleButtonHover,
|
|
1867
1911
|
onMouseLeave: handleButtonLeave,
|
|
@@ -1874,34 +1918,36 @@ function IndustryZoomableMermaidDiagram({
|
|
|
1874
1918
|
fontFamily: theme2.fonts.body
|
|
1875
1919
|
}
|
|
1876
1920
|
}, "Optimizing view...")), /* @__PURE__ */ React8.createElement(TransformComponent, {
|
|
1877
|
-
wrapperStyle: {
|
|
1878
|
-
contentStyle: {
|
|
1921
|
+
wrapperStyle: {
|
|
1879
1922
|
width: "100%",
|
|
1880
1923
|
height: "100%",
|
|
1924
|
+
overflow: "hidden"
|
|
1925
|
+
},
|
|
1926
|
+
contentStyle: {
|
|
1927
|
+
width: "fit-content",
|
|
1928
|
+
height: "fit-content",
|
|
1881
1929
|
display: "flex",
|
|
1882
1930
|
alignItems: "center",
|
|
1883
|
-
justifyContent: "center"
|
|
1931
|
+
justifyContent: "center",
|
|
1932
|
+
minWidth: "100%",
|
|
1933
|
+
minHeight: "100%"
|
|
1884
1934
|
}
|
|
1885
1935
|
}, /* @__PURE__ */ React8.createElement("div", {
|
|
1886
1936
|
ref: diagramRef,
|
|
1887
1937
|
style: {
|
|
1888
|
-
width: "100%",
|
|
1889
|
-
height: "100%",
|
|
1890
1938
|
display: "flex",
|
|
1891
1939
|
alignItems: "center",
|
|
1892
|
-
justifyContent: "center"
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
height: "100%",
|
|
1898
|
-
overflow: "visible"
|
|
1940
|
+
justifyContent: "center",
|
|
1941
|
+
width: "fit-content",
|
|
1942
|
+
height: "fit-content",
|
|
1943
|
+
minWidth: "100%",
|
|
1944
|
+
minHeight: "100%"
|
|
1899
1945
|
}
|
|
1900
1946
|
}, /* @__PURE__ */ React8.createElement(IndustryMermaidDiagram, {
|
|
1901
1947
|
code,
|
|
1902
1948
|
id,
|
|
1903
1949
|
isModalMode: true
|
|
1904
|
-
}))))))
|
|
1950
|
+
}))))));
|
|
1905
1951
|
}
|
|
1906
1952
|
|
|
1907
1953
|
// industryMarkdown/components/IndustryMermaidModal.tsx
|
|
@@ -2604,9 +2650,9 @@ var IndustryMarkdownSlide = React11.memo(function IndustryMarkdownSlide2({
|
|
|
2604
2650
|
tagNames: [...defaultSchema.tagNames || [], "picture", "source"],
|
|
2605
2651
|
attributes: {
|
|
2606
2652
|
...defaultSchema.attributes,
|
|
2607
|
-
code: [...defaultSchema.attributes?.code || [], "className"],
|
|
2608
|
-
span: [...defaultSchema.attributes?.span || [], "className"],
|
|
2609
|
-
pre: [...defaultSchema.attributes?.pre || [], "className"],
|
|
2653
|
+
code: [...defaultSchema.attributes?.code || [], "className", "style"],
|
|
2654
|
+
span: [...defaultSchema.attributes?.span || [], "className", "style"],
|
|
2655
|
+
pre: [...defaultSchema.attributes?.pre || [], "className", "style"],
|
|
2610
2656
|
div: [...defaultSchema.attributes?.div || [], "style", "className", "id"],
|
|
2611
2657
|
p: [...defaultSchema.attributes?.p || [], "style", "className", "id"],
|
|
2612
2658
|
h1: [...defaultSchema.attributes?.h1 || [], "style", "className", "id"],
|
|
@@ -2639,7 +2685,15 @@ var IndustryMarkdownSlide = React11.memo(function IndustryMarkdownSlide2({
|
|
|
2639
2685
|
th: [...defaultSchema.attributes?.th || [], "style", "className"],
|
|
2640
2686
|
td: [...defaultSchema.attributes?.td || [], "style", "className"],
|
|
2641
2687
|
blockquote: [...defaultSchema.attributes?.blockquote || [], "style", "className"],
|
|
2642
|
-
hr: [...defaultSchema.attributes?.hr || [], "style", "className"]
|
|
2688
|
+
hr: [...defaultSchema.attributes?.hr || [], "style", "className"],
|
|
2689
|
+
label: [...defaultSchema.attributes?.label || [], "style", "className", "for"],
|
|
2690
|
+
input: [...defaultSchema.attributes?.input || [], "style", "className", "type", "placeholder", "value", "checked", "disabled"],
|
|
2691
|
+
button: [...defaultSchema.attributes?.button || [], "style", "className", "type", "disabled"],
|
|
2692
|
+
details: [...defaultSchema.attributes?.details || [], "style", "className", "open"],
|
|
2693
|
+
summary: [...defaultSchema.attributes?.summary || [], "style", "className"],
|
|
2694
|
+
footer: [...defaultSchema.attributes?.footer || [], "style", "className"],
|
|
2695
|
+
header: [...defaultSchema.attributes?.header || [], "style", "className"],
|
|
2696
|
+
section: [...defaultSchema.attributes?.section || [], "style", "className"]
|
|
2643
2697
|
}
|
|
2644
2698
|
}), []);
|
|
2645
2699
|
const rootMargin = isVisible ? "0px" : "100px";
|
|
@@ -2790,6 +2844,17 @@ var SlidePresentation = ({
|
|
|
2790
2844
|
const goToNextSlide = useCallback2(() => {
|
|
2791
2845
|
navigateToSlide(currentSlide + 1);
|
|
2792
2846
|
}, [currentSlide, navigateToSlide]);
|
|
2847
|
+
const toggleFullscreen = useCallback2(() => {
|
|
2848
|
+
if (!containerRef.current)
|
|
2849
|
+
return;
|
|
2850
|
+
if (!isFullscreen) {
|
|
2851
|
+
containerRef.current.requestFullscreen?.();
|
|
2852
|
+
setIsFullscreen(true);
|
|
2853
|
+
} else {
|
|
2854
|
+
document.exitFullscreen?.();
|
|
2855
|
+
setIsFullscreen(false);
|
|
2856
|
+
}
|
|
2857
|
+
}, [isFullscreen]);
|
|
2793
2858
|
useEffect8(() => {
|
|
2794
2859
|
const handleKeyDown = (event) => {
|
|
2795
2860
|
if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {
|
|
@@ -2797,33 +2862,52 @@ var SlidePresentation = ({
|
|
|
2797
2862
|
}
|
|
2798
2863
|
switch (event.key) {
|
|
2799
2864
|
case "ArrowLeft":
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
goToPreviousSlide();
|
|
2803
|
-
}
|
|
2865
|
+
event.preventDefault();
|
|
2866
|
+
goToPreviousSlide();
|
|
2804
2867
|
break;
|
|
2805
2868
|
case "ArrowRight":
|
|
2806
|
-
|
|
2869
|
+
event.preventDefault();
|
|
2870
|
+
goToNextSlide();
|
|
2871
|
+
break;
|
|
2872
|
+
case " ":
|
|
2873
|
+
event.preventDefault();
|
|
2874
|
+
goToNextSlide();
|
|
2875
|
+
break;
|
|
2876
|
+
case "Enter":
|
|
2877
|
+
event.preventDefault();
|
|
2878
|
+
goToNextSlide();
|
|
2879
|
+
break;
|
|
2880
|
+
case "Backspace":
|
|
2881
|
+
event.preventDefault();
|
|
2882
|
+
goToPreviousSlide();
|
|
2883
|
+
break;
|
|
2884
|
+
case "Home":
|
|
2885
|
+
event.preventDefault();
|
|
2886
|
+
navigateToSlide(0);
|
|
2887
|
+
break;
|
|
2888
|
+
case "End":
|
|
2889
|
+
event.preventDefault();
|
|
2890
|
+
navigateToSlide(slides.length - 1);
|
|
2891
|
+
break;
|
|
2892
|
+
case "f":
|
|
2893
|
+
case "F":
|
|
2894
|
+
if (!event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
2807
2895
|
event.preventDefault();
|
|
2808
|
-
|
|
2896
|
+
toggleFullscreen();
|
|
2809
2897
|
}
|
|
2810
2898
|
break;
|
|
2811
2899
|
}
|
|
2900
|
+
if (!event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
2901
|
+
const num = parseInt(event.key);
|
|
2902
|
+
if (num >= 1 && num <= 9 && num <= slides.length) {
|
|
2903
|
+
event.preventDefault();
|
|
2904
|
+
navigateToSlide(num - 1);
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2812
2907
|
};
|
|
2813
2908
|
window.addEventListener("keydown", handleKeyDown);
|
|
2814
2909
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2815
|
-
}, [goToPreviousSlide, goToNextSlide]);
|
|
2816
|
-
const toggleFullscreen = useCallback2(() => {
|
|
2817
|
-
if (!containerRef.current)
|
|
2818
|
-
return;
|
|
2819
|
-
if (!isFullscreen) {
|
|
2820
|
-
containerRef.current.requestFullscreen?.();
|
|
2821
|
-
setIsFullscreen(true);
|
|
2822
|
-
} else {
|
|
2823
|
-
document.exitFullscreen?.();
|
|
2824
|
-
setIsFullscreen(false);
|
|
2825
|
-
}
|
|
2826
|
-
}, [isFullscreen]);
|
|
2910
|
+
}, [goToPreviousSlide, goToNextSlide, navigateToSlide, slides.length, toggleFullscreen]);
|
|
2827
2911
|
useEffect8(() => {
|
|
2828
2912
|
if (currentSlide >= slides.length && slides.length > 0) {
|
|
2829
2913
|
setCurrentSlide(slides.length - 1);
|
|
@@ -3222,7 +3306,7 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3222
3306
|
clearTimeout(saveTimeoutRef.current);
|
|
3223
3307
|
}
|
|
3224
3308
|
saveTimeoutRef.current = setTimeout(() => {
|
|
3225
|
-
handleSave();
|
|
3309
|
+
handleSave(false);
|
|
3226
3310
|
}, autoSaveDelay);
|
|
3227
3311
|
}
|
|
3228
3312
|
return () => {
|
|
@@ -3242,7 +3326,7 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3242
3326
|
setEditContent(content);
|
|
3243
3327
|
setIsEditing(false);
|
|
3244
3328
|
}, [content]);
|
|
3245
|
-
const handleSave = useCallback4(async () => {
|
|
3329
|
+
const handleSave = useCallback4(async (exitEditMode = true) => {
|
|
3246
3330
|
if (onContentChange) {
|
|
3247
3331
|
onContentChange(editContent);
|
|
3248
3332
|
}
|
|
@@ -3256,7 +3340,9 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3256
3340
|
setIsSaving(false);
|
|
3257
3341
|
}
|
|
3258
3342
|
}
|
|
3259
|
-
|
|
3343
|
+
if (exitEditMode) {
|
|
3344
|
+
setIsEditing(false);
|
|
3345
|
+
}
|
|
3260
3346
|
}, [editContent, onContentChange, onSave]);
|
|
3261
3347
|
const handleKeyDown = useCallback4((e) => {
|
|
3262
3348
|
if (e.key === "Escape") {
|
|
@@ -3306,7 +3392,7 @@ var IndustryEditableMarkdownSlide = ({
|
|
|
3306
3392
|
gap: theme2.space[2]
|
|
3307
3393
|
}
|
|
3308
3394
|
}, /* @__PURE__ */ React14.createElement("button", {
|
|
3309
|
-
onClick: handleSave,
|
|
3395
|
+
onClick: () => handleSave(),
|
|
3310
3396
|
disabled: isSaving,
|
|
3311
3397
|
style: {
|
|
3312
3398
|
display: "flex",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { DocumentView } from './DocumentView';
|
|
3
|
+
declare const meta: Meta<typeof DocumentView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const SingleDocument: Story;
|
|
7
|
+
export declare const SegmentedDocument: Story;
|
|
8
|
+
export declare const DarkThemeDocument: Story;
|
|
9
|
+
export declare const WideDocument: Story;
|
|
10
|
+
export declare const CompactSegments: Story;
|
|
11
|
+
export declare const InteractiveDocument: Story;
|
|
12
|
+
export declare const MermaidDiagramDocument: Story;
|
|
13
|
+
//# sourceMappingURL=DocumentView.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentView.stories.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/DocumentView.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAyBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA6InC,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAW/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAiEjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAkKpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndustryEditableMarkdownSlide.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryEditableMarkdownSlide.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,KAAK,EAAY,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAyB,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE5F,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,kCAAkC,
|
|
1
|
+
{"version":3,"file":"IndustryEditableMarkdownSlide.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryEditableMarkdownSlide.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,KAAK,EAAY,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAyB,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE5F,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,kCAAkC,CAyQtF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { IndustryEditableMarkdownSlide } from './IndustryEditableMarkdownSlide';
|
|
3
|
+
declare const meta: Meta<typeof IndustryEditableMarkdownSlide>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithAutoSave: Story;
|
|
8
|
+
export declare const DarkTheme: Story;
|
|
9
|
+
export declare const ReadOnly: Story;
|
|
10
|
+
export declare const NoAutoSave: Story;
|
|
11
|
+
export declare const Interactive: Story;
|
|
12
|
+
export declare const WithComplexContent: Story;
|
|
13
|
+
export declare const ErrorHandling: Story;
|
|
14
|
+
export declare const HybridEditing: Story;
|
|
15
|
+
export declare const PracticalDocumentationExample: Story;
|
|
16
|
+
export declare const WithBadgesAndLabels: Story;
|
|
17
|
+
export declare const WithHTMLContent: Story;
|
|
18
|
+
export declare const CustomStyling: Story;
|
|
19
|
+
//# sourceMappingURL=IndustryEditableMarkdownSlide.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndustryEditableMarkdownSlide.stories.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryEditableMarkdownSlide.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAGhF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,6BAA6B,CA4BpD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA+BnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAkC1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAC;AAwDF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAgFhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA8B3B,CAAC;AAwEF,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,KAgG3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA+GjC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAmH7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA2B3B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from '../../industryTheme';
|
|
3
|
+
export interface IndustryEditableMermaidDiagramProps {
|
|
4
|
+
code: string;
|
|
5
|
+
id: string;
|
|
6
|
+
theme: Theme;
|
|
7
|
+
onCodeChange?: (newCode: string) => void;
|
|
8
|
+
onSave?: (code: string) => Promise<void>;
|
|
9
|
+
autoSaveDelay?: number;
|
|
10
|
+
editable?: boolean;
|
|
11
|
+
showEditButton?: boolean;
|
|
12
|
+
onCopyError?: (mermaidCode: string, errorMessage: string) => void;
|
|
13
|
+
onError?: (hasError: boolean) => void;
|
|
14
|
+
rootMargin?: string;
|
|
15
|
+
isModalMode?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const IndustryEditableMermaidDiagram: React.FC<IndustryEditableMermaidDiagramProps>;
|
|
18
|
+
//# sourceMappingURL=IndustryEditableMermaidDiagram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndustryEditableMermaidDiagram.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryEditableMermaidDiagram.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5C,MAAM,WAAW,mCAAmC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,8BAA8B,EAAE,KAAK,CAAC,EAAE,CAAC,mCAAmC,CA0UxF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { IndustryEditableMermaidDiagram } from './IndustryEditableMermaidDiagram';
|
|
3
|
+
declare const meta: Meta<typeof IndustryEditableMermaidDiagram>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithAutoSave: Story;
|
|
8
|
+
export declare const DarkTheme: Story;
|
|
9
|
+
export declare const ReadOnly: Story;
|
|
10
|
+
export declare const NoAutoSave: Story;
|
|
11
|
+
export declare const Interactive: Story;
|
|
12
|
+
export declare const SequenceDiagram: Story;
|
|
13
|
+
export declare const ClassDiagram: Story;
|
|
14
|
+
export declare const GanttChart: Story;
|
|
15
|
+
export declare const ComplexFlowchart: Story;
|
|
16
|
+
export declare const ErrorHandling: Story;
|
|
17
|
+
export declare const ModalMode: Story;
|
|
18
|
+
//# sourceMappingURL=IndustryEditableMermaidDiagram.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndustryEditableMermaidDiagram.stories.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryEditableMermaidDiagram.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,8BAA8B,CA4BrD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAyDnC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAyDF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA0B9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAsB3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndustryMarkdownSlide.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryMarkdownSlide.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAGH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAQjF,OAAO,EAA0B,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACpE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wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,eAAe,EAAE,CA8D7F;AAED,eAAO,MAAM,qBAAqB,wDAgmBhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndustryMermaidDiagram.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryMermaidDiagram.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,KAAK,EAAyB,MAAM,qBAAqB,CAAC;AAEnE,UAAU,2BAA2B;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAmBD,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,EAAE,EACF,KAAK,EAAE,aAAa,EACpB,WAAW,EACX,OAAO,EACP,UAAoB,EACpB,WAAmB,GACpB,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"IndustryMermaidDiagram.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryMermaidDiagram.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,KAAK,EAAyB,MAAM,qBAAqB,CAAC;AAEnE,UAAU,2BAA2B;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAmBD,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,EAAE,EACF,KAAK,EAAE,aAAa,EACpB,WAAW,EACX,OAAO,EACP,UAAoB,EACpB,WAAmB,GACpB,EAAE,2BAA2B,qBAyX7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndustryZoomableMermaidDiagram.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryZoomableMermaidDiagram.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAY,MAAM,qBAAqB,CAAC;AAItD,UAAU,mCAAmC;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,EAAE,EACF,KAAK,EAAE,aAAa,EACpB,WAAuB,EACvB,OAAc,GACf,EAAE,mCAAmC,
|
|
1
|
+
{"version":3,"file":"IndustryZoomableMermaidDiagram.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/IndustryZoomableMermaidDiagram.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAY,MAAM,qBAAqB,CAAC;AAItD,UAAU,mCAAmC;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC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OAAO,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrG,gBAAgB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA0W9D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SlidePresentation } from './SlidePresentation';
|
|
3
|
+
declare const meta: Meta<typeof SlidePresentation>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const BasicPresentation: Story;
|
|
7
|
+
export declare const KeyboardShortcuts: Story;
|
|
8
|
+
export declare const DarkThemePresentation: Story;
|
|
9
|
+
export declare const TechnicalPresentation: Story;
|
|
10
|
+
export declare const MinimalNavigation: Story;
|
|
11
|
+
export declare const NoNavigation: Story;
|
|
12
|
+
export declare const InteractiveSlides: Story;
|
|
13
|
+
export declare const SingleSlide: Story;
|
|
14
|
+
export declare const CustomHeight: Story;
|
|
15
|
+
export declare const StartFromMiddle: Story;
|
|
16
|
+
//# sourceMappingURL=SlidePresentation.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlidePresentation.stories.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/components/SlidePresentation.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CA4BxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqTnC,eAAO,MAAM,iBAAiB,EAAE,KAU/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KA8D/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAUnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAUnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAU/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KA6D/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAU1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC"}
|
|
@@ -6,6 +6,8 @@ export { DocumentView } from './components/DocumentView';
|
|
|
6
6
|
export type { DocumentViewProps } from './components/DocumentView';
|
|
7
7
|
export { IndustryEditableMarkdownSlide } from './components/IndustryEditableMarkdownSlide';
|
|
8
8
|
export type { IndustryEditableMarkdownSlideProps } from './components/IndustryEditableMarkdownSlide';
|
|
9
|
+
export { IndustryEditableMermaidDiagram } from './components/IndustryEditableMermaidDiagram';
|
|
10
|
+
export type { IndustryEditableMermaidDiagramProps } from './components/IndustryEditableMermaidDiagram';
|
|
9
11
|
export { createIndustryMarkdownComponents } from './components/IndustryMarkdownComponents';
|
|
10
12
|
export { IndustryHtmlModal, useIndustryHtmlModal } from './components/IndustryHtmlModal';
|
|
11
13
|
export { IndustryPlaceholderModal } from './components/IndustryPlaceholderModal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../industryMarkdown/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAA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