@industry-theme/markdown-panels 0.2.20 → 0.2.21
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.css +1 -1
- package/dist/panels.bundle.js +264 -158
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +2 -2
package/dist/panels.bundle.js
CHANGED
|
@@ -38366,20 +38366,20 @@ class EditMap {
|
|
|
38366
38366
|
this.map.length = 0;
|
|
38367
38367
|
}
|
|
38368
38368
|
}
|
|
38369
|
-
function addImplementation(editMap,
|
|
38369
|
+
function addImplementation(editMap, at2, remove, add) {
|
|
38370
38370
|
let index2 = 0;
|
|
38371
38371
|
if (remove === 0 && add.length === 0) {
|
|
38372
38372
|
return;
|
|
38373
38373
|
}
|
|
38374
38374
|
while (index2 < editMap.map.length) {
|
|
38375
|
-
if (editMap.map[index2][0] ===
|
|
38375
|
+
if (editMap.map[index2][0] === at2) {
|
|
38376
38376
|
editMap.map[index2][1] += remove;
|
|
38377
38377
|
editMap.map[index2][2].push(...add);
|
|
38378
38378
|
return;
|
|
38379
38379
|
}
|
|
38380
38380
|
index2 += 1;
|
|
38381
38381
|
}
|
|
38382
|
-
editMap.map.push([
|
|
38382
|
+
editMap.map.push([at2, remove, add]);
|
|
38383
38383
|
}
|
|
38384
38384
|
function gfmTableAlign(events, index2) {
|
|
38385
38385
|
let inDelimiterRow = false;
|
|
@@ -40536,7 +40536,7 @@ var css_248z = ".transform-component-module_wrapper__SPB86 {\n position: relati
|
|
|
40536
40536
|
var styles = { "wrapper": "transform-component-module_wrapper__SPB86", "content": "transform-component-module_content__FBWxo" };
|
|
40537
40537
|
styleInject(css_248z);
|
|
40538
40538
|
var TransformComponent = function(_a) {
|
|
40539
|
-
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,
|
|
40539
|
+
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;
|
|
40540
40540
|
var _f = useContext(Context), init = _f.init, cleanupWindowEvents = _f.cleanupWindowEvents;
|
|
40541
40541
|
var wrapperRef = useRef(null);
|
|
40542
40542
|
var contentRef = useRef(null);
|
|
@@ -40556,6 +40556,96 @@ var TransformComponent = function(_a) {
|
|
|
40556
40556
|
React2__default.createElement("div", __assign({}, contentProps, { ref: contentRef, className: "".concat(baseClasses.contentClass, " ").concat(styles.content, " ").concat(contentClass), style: contentStyle }), children2)
|
|
40557
40557
|
);
|
|
40558
40558
|
};
|
|
40559
|
+
var isInjected = false;
|
|
40560
|
+
function injectHighlightStyles() {
|
|
40561
|
+
if (isInjected || typeof document === "undefined") {
|
|
40562
|
+
return;
|
|
40563
|
+
}
|
|
40564
|
+
const existingStyle = document.getElementById("themed-markdown-highlight-css");
|
|
40565
|
+
if (existingStyle) {
|
|
40566
|
+
isInjected = true;
|
|
40567
|
+
return;
|
|
40568
|
+
}
|
|
40569
|
+
const css2 = `
|
|
40570
|
+
pre code.hljs {
|
|
40571
|
+
display: block;
|
|
40572
|
+
overflow-x: auto;
|
|
40573
|
+
padding: 1em
|
|
40574
|
+
}
|
|
40575
|
+
code.hljs {
|
|
40576
|
+
padding: 3px 5px
|
|
40577
|
+
}
|
|
40578
|
+
|
|
40579
|
+
.hljs {
|
|
40580
|
+
color: #abb2bf;
|
|
40581
|
+
background: #282c34
|
|
40582
|
+
}
|
|
40583
|
+
.hljs-comment,
|
|
40584
|
+
.hljs-quote {
|
|
40585
|
+
color: #5c6370;
|
|
40586
|
+
font-style: italic
|
|
40587
|
+
}
|
|
40588
|
+
.hljs-doctag,
|
|
40589
|
+
.hljs-keyword,
|
|
40590
|
+
.hljs-formula {
|
|
40591
|
+
color: #c678dd
|
|
40592
|
+
}
|
|
40593
|
+
.hljs-section,
|
|
40594
|
+
.hljs-name,
|
|
40595
|
+
.hljs-selector-tag,
|
|
40596
|
+
.hljs-deletion,
|
|
40597
|
+
.hljs-subst {
|
|
40598
|
+
color: #e06c75
|
|
40599
|
+
}
|
|
40600
|
+
.hljs-literal {
|
|
40601
|
+
color: #56b6c2
|
|
40602
|
+
}
|
|
40603
|
+
.hljs-string,
|
|
40604
|
+
.hljs-regexp,
|
|
40605
|
+
.hljs-addition,
|
|
40606
|
+
.hljs-attribute,
|
|
40607
|
+
.hljs-meta .hljs-string {
|
|
40608
|
+
color: #98c379
|
|
40609
|
+
}
|
|
40610
|
+
.hljs-attr,
|
|
40611
|
+
.hljs-variable,
|
|
40612
|
+
.hljs-template-variable,
|
|
40613
|
+
.hljs-type,
|
|
40614
|
+
.hljs-selector-class,
|
|
40615
|
+
.hljs-selector-attr,
|
|
40616
|
+
.hljs-selector-pseudo,
|
|
40617
|
+
.hljs-number {
|
|
40618
|
+
color: #d19a66
|
|
40619
|
+
}
|
|
40620
|
+
.hljs-symbol,
|
|
40621
|
+
.hljs-bullet,
|
|
40622
|
+
.hljs-link,
|
|
40623
|
+
.hljs-meta,
|
|
40624
|
+
.hljs-selector-id,
|
|
40625
|
+
.hljs-title {
|
|
40626
|
+
color: #61aeee
|
|
40627
|
+
}
|
|
40628
|
+
.hljs-built_in,
|
|
40629
|
+
.hljs-title.class_,
|
|
40630
|
+
.hljs-class .hljs-title {
|
|
40631
|
+
color: #e6c07b
|
|
40632
|
+
}
|
|
40633
|
+
.hljs-emphasis {
|
|
40634
|
+
font-style: italic
|
|
40635
|
+
}
|
|
40636
|
+
.hljs-strong {
|
|
40637
|
+
font-weight: bold
|
|
40638
|
+
}
|
|
40639
|
+
.hljs-link {
|
|
40640
|
+
text-decoration: underline
|
|
40641
|
+
}`;
|
|
40642
|
+
const styleElement2 = document.createElement("style");
|
|
40643
|
+
styleElement2.id = "themed-markdown-highlight-css";
|
|
40644
|
+
styleElement2.textContent = css2;
|
|
40645
|
+
document.head.appendChild(styleElement2);
|
|
40646
|
+
isInjected = true;
|
|
40647
|
+
}
|
|
40648
|
+
injectHighlightStyles();
|
|
40559
40649
|
var terminalTheme = {
|
|
40560
40650
|
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
40561
40651
|
fonts: {
|
|
@@ -40593,52 +40683,53 @@ var terminalTheme = {
|
|
|
40593
40683
|
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
40594
40684
|
colors: {
|
|
40595
40685
|
text: "#e4e4e4",
|
|
40596
|
-
background: "
|
|
40686
|
+
background: "#0a0a0a",
|
|
40597
40687
|
primary: "#66b3ff",
|
|
40598
40688
|
secondary: "#80c4ff",
|
|
40599
40689
|
accent: "#66ff99",
|
|
40600
|
-
highlight: "
|
|
40601
|
-
muted: "
|
|
40690
|
+
highlight: "#18283d",
|
|
40691
|
+
muted: "#1a1a1a",
|
|
40602
40692
|
success: "#66ff99",
|
|
40603
40693
|
warning: "#ffcc66",
|
|
40604
40694
|
error: "#ff6666",
|
|
40605
40695
|
info: "#66b3ff",
|
|
40606
|
-
border: "
|
|
40607
|
-
backgroundSecondary: "
|
|
40608
|
-
backgroundTertiary: "
|
|
40609
|
-
backgroundLight: "
|
|
40610
|
-
backgroundHover: "
|
|
40611
|
-
surface: "
|
|
40612
|
-
textSecondary: "
|
|
40613
|
-
textTertiary: "
|
|
40614
|
-
textMuted: "
|
|
40615
|
-
highlightBg: "
|
|
40616
|
-
highlightBorder: "
|
|
40696
|
+
border: "#1a1a1a",
|
|
40697
|
+
backgroundSecondary: "#0f0f0f",
|
|
40698
|
+
backgroundTertiary: "#141414",
|
|
40699
|
+
backgroundLight: "#0d0d0d",
|
|
40700
|
+
backgroundHover: "#0d1520",
|
|
40701
|
+
surface: "#0f0f0f",
|
|
40702
|
+
textSecondary: "#b3b3b3",
|
|
40703
|
+
textTertiary: "#808080",
|
|
40704
|
+
textMuted: "#666666",
|
|
40705
|
+
highlightBg: "#40391e",
|
|
40706
|
+
highlightBorder: "#7f7530",
|
|
40707
|
+
textOnPrimary: "#ffffff"
|
|
40617
40708
|
},
|
|
40618
40709
|
modes: {
|
|
40619
40710
|
light: {
|
|
40620
40711
|
text: "#1a1a1a",
|
|
40621
|
-
background: "
|
|
40712
|
+
background: "#ffffff",
|
|
40622
40713
|
primary: "#0066cc",
|
|
40623
40714
|
secondary: "#0052a3",
|
|
40624
40715
|
accent: "#00cc88",
|
|
40625
|
-
highlight: "
|
|
40626
|
-
muted: "
|
|
40716
|
+
highlight: "#e6f2ff",
|
|
40717
|
+
muted: "#f5f5f5",
|
|
40627
40718
|
success: "#00cc88",
|
|
40628
40719
|
warning: "#ffaa00",
|
|
40629
40720
|
error: "#ff3333",
|
|
40630
40721
|
info: "#0066cc",
|
|
40631
|
-
border: "
|
|
40632
|
-
backgroundSecondary: "
|
|
40633
|
-
backgroundTertiary: "
|
|
40634
|
-
backgroundLight: "
|
|
40635
|
-
backgroundHover: "
|
|
40636
|
-
surface: "
|
|
40637
|
-
textSecondary: "
|
|
40638
|
-
textTertiary: "
|
|
40639
|
-
textMuted: "
|
|
40640
|
-
highlightBg: "
|
|
40641
|
-
highlightBorder: "
|
|
40722
|
+
border: "#e6e6e6",
|
|
40723
|
+
backgroundSecondary: "#fafafa",
|
|
40724
|
+
backgroundTertiary: "#f5f5f5",
|
|
40725
|
+
backgroundLight: "#fafafa",
|
|
40726
|
+
backgroundHover: "#f5f9fd",
|
|
40727
|
+
surface: "#ffffff",
|
|
40728
|
+
textSecondary: "#666666",
|
|
40729
|
+
textTertiary: "#999999",
|
|
40730
|
+
textMuted: "#b3b3b3",
|
|
40731
|
+
highlightBg: "#fff9c4",
|
|
40732
|
+
highlightBorder: "#fff389"
|
|
40642
40733
|
}
|
|
40643
40734
|
},
|
|
40644
40735
|
buttons: {
|
|
@@ -42094,8 +42185,8 @@ var createIndustryMarkdownComponents = ({
|
|
|
42094
42185
|
};
|
|
42095
42186
|
const darkMode = getLuminance(theme2.colors.background) < 0.5;
|
|
42096
42187
|
const headerStyles = {};
|
|
42097
|
-
if (index2 === 0
|
|
42098
|
-
headerStyles.marginTop = `${slideHeaderMarginTopOverride}px
|
|
42188
|
+
if (index2 === 0) {
|
|
42189
|
+
headerStyles.marginTop = slideHeaderMarginTopOverride ? `${slideHeaderMarginTopOverride}px` : 0;
|
|
42099
42190
|
}
|
|
42100
42191
|
return {
|
|
42101
42192
|
h1: ({ children: children2, ...props2 }) => /* @__PURE__ */ React2__default.createElement("h1", {
|
|
@@ -42211,7 +42302,7 @@ var createIndustryMarkdownComponents = ({
|
|
|
42211
42302
|
...props2
|
|
42212
42303
|
}, children2),
|
|
42213
42304
|
li: ({ children: children2, ...props2 }) => {
|
|
42214
|
-
var _a, _b, _c, _d,
|
|
42305
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h;
|
|
42215
42306
|
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";
|
|
42216
42307
|
if (isTaskListItem) {
|
|
42217
42308
|
const checkbox = children2[0];
|
|
@@ -42226,7 +42317,7 @@ var createIndustryMarkdownComponents = ({
|
|
|
42226
42317
|
}
|
|
42227
42318
|
});
|
|
42228
42319
|
const checked = ((_c = checkbox == null ? void 0 : checkbox.props) == null ? void 0 : _c.checked) || false;
|
|
42229
|
-
const lineNumber = ((
|
|
42320
|
+
const lineNumber = ((_e2 = (_d = props2.sourcePosition) == null ? void 0 : _d.start) == null ? void 0 : _e2.line) || ((_h = (_g = (_f = props2.node) == null ? void 0 : _f.position) == null ? void 0 : _g.start) == null ? void 0 : _h.line) || 1;
|
|
42230
42321
|
const id = `${slideIdPrefix}-checkbox-${lineNumber}`;
|
|
42231
42322
|
const isChecked = checkedItems[id] ?? checked;
|
|
42232
42323
|
const handleChange = (e) => {
|
|
@@ -42371,7 +42462,7 @@ var createIndustryMarkdownComponents = ({
|
|
|
42371
42462
|
});
|
|
42372
42463
|
},
|
|
42373
42464
|
code: ({ node: node2, className, children: children2, ...props2 }) => {
|
|
42374
|
-
var _a, _b, _c, _d,
|
|
42465
|
+
var _a, _b, _c, _d, _e2, _f;
|
|
42375
42466
|
const hasLanguageClass = className && (className.includes("language-") || className.includes("hljs"));
|
|
42376
42467
|
const codeString = extractTextFromChildren(children2);
|
|
42377
42468
|
const matchLang = /language-(\w+)/.exec(className || "");
|
|
@@ -42583,7 +42674,7 @@ var createIndustryMarkdownComponents = ({
|
|
|
42583
42674
|
...props2
|
|
42584
42675
|
}, children2)));
|
|
42585
42676
|
}
|
|
42586
|
-
const cleanClassName = (_f = (
|
|
42677
|
+
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();
|
|
42587
42678
|
return /* @__PURE__ */ React2__default.createElement("code", {
|
|
42588
42679
|
style: {
|
|
42589
42680
|
color: theme2.colors.accent,
|
|
@@ -43281,29 +43372,25 @@ var fontTransitionCSS = `
|
|
|
43281
43372
|
font-size: 1rem !important; /* Fixed size for checkbox labels */
|
|
43282
43373
|
}
|
|
43283
43374
|
|
|
43284
|
-
/* Remove top margin from
|
|
43285
|
-
.markdown-slide >
|
|
43286
|
-
.markdown-slide >
|
|
43287
|
-
.markdown-slide > :first-child h3:first-child,
|
|
43288
|
-
.markdown-slide > :first-child h4:first-child,
|
|
43289
|
-
.markdown-slide > :first-child h5:first-child,
|
|
43290
|
-
.markdown-slide > :first-child h6:first-child {
|
|
43375
|
+
/* Remove top margin from any first element - must override inline styles */
|
|
43376
|
+
.markdown-slide > *:first-child,
|
|
43377
|
+
.markdown-slide > *:first-child > *:first-child {
|
|
43291
43378
|
margin-top: 0 !important;
|
|
43292
43379
|
}
|
|
43293
|
-
|
|
43294
|
-
/*
|
|
43295
|
-
.markdown-slide >
|
|
43296
|
-
.markdown-slide >
|
|
43297
|
-
.markdown-slide >
|
|
43298
|
-
.markdown-slide >
|
|
43299
|
-
.markdown-slide >
|
|
43300
|
-
.markdown-slide >
|
|
43301
|
-
.markdown-slide > p:first-child
|
|
43302
|
-
.markdown-slide >
|
|
43303
|
-
.markdown-slide >
|
|
43304
|
-
.markdown-slide >
|
|
43305
|
-
.markdown-slide >
|
|
43306
|
-
.markdown-slide >
|
|
43380
|
+
|
|
43381
|
+
/* Specifically target all possible first-child elements */
|
|
43382
|
+
.markdown-slide > h1:first-child,
|
|
43383
|
+
.markdown-slide > h2:first-child,
|
|
43384
|
+
.markdown-slide > h3:first-child,
|
|
43385
|
+
.markdown-slide > h4:first-child,
|
|
43386
|
+
.markdown-slide > h5:first-child,
|
|
43387
|
+
.markdown-slide > h6:first-child,
|
|
43388
|
+
.markdown-slide > p:first-child,
|
|
43389
|
+
.markdown-slide > ul:first-child,
|
|
43390
|
+
.markdown-slide > ol:first-child,
|
|
43391
|
+
.markdown-slide > div:first-child,
|
|
43392
|
+
.markdown-slide > blockquote:first-child,
|
|
43393
|
+
.markdown-slide > pre:first-child {
|
|
43307
43394
|
margin-top: 0 !important;
|
|
43308
43395
|
}
|
|
43309
43396
|
`;
|
|
@@ -43622,7 +43709,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
|
|
|
43622
43709
|
}
|
|
43623
43710
|
}, [slideIndex]);
|
|
43624
43711
|
const sanitizeSchema = useMemo(() => {
|
|
43625
|
-
var _a, _b, _c, _d,
|
|
43712
|
+
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;
|
|
43626
43713
|
return {
|
|
43627
43714
|
...defaultSchema,
|
|
43628
43715
|
tagNames: [...defaultSchema.tagNames || [], "picture", "source", "mark"],
|
|
@@ -43633,7 +43720,7 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
|
|
|
43633
43720
|
span: [...((_b = defaultSchema.attributes) == null ? void 0 : _b.span) || [], "className", "style"],
|
|
43634
43721
|
pre: [...((_c = defaultSchema.attributes) == null ? void 0 : _c.pre) || [], "className", "style"],
|
|
43635
43722
|
div: [...((_d = defaultSchema.attributes) == null ? void 0 : _d.div) || [], "style", "className", "id"],
|
|
43636
|
-
p: [...((
|
|
43723
|
+
p: [...((_e2 = defaultSchema.attributes) == null ? void 0 : _e2.p) || [], "style", "className", "id"],
|
|
43637
43724
|
h1: [...((_f = defaultSchema.attributes) == null ? void 0 : _f.h1) || [], "style", "className", "id"],
|
|
43638
43725
|
h2: [...((_g = defaultSchema.attributes) == null ? void 0 : _g.h2) || [], "style", "className", "id"],
|
|
43639
43726
|
h3: [...((_h = defaultSchema.attributes) == null ? void 0 : _h.h3) || [], "style", "className", "id"],
|
|
@@ -43994,12 +44081,12 @@ Panel.displayName = "forwardRef(Panel)";
|
|
|
43994
44081
|
var currentCursorStyle = null;
|
|
43995
44082
|
var prevRuleIndex = -1;
|
|
43996
44083
|
var styleElement = null;
|
|
43997
|
-
function getCursorStyle(state, constraintFlags) {
|
|
44084
|
+
function getCursorStyle(state, constraintFlags, isPointerDown2) {
|
|
44085
|
+
const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
|
|
44086
|
+
const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
|
|
44087
|
+
const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
|
|
44088
|
+
const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
|
|
43998
44089
|
if (constraintFlags) {
|
|
43999
|
-
const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
|
|
44000
|
-
const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
|
|
44001
|
-
const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
|
|
44002
|
-
const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
|
|
44003
44090
|
if (horizontalMin) {
|
|
44004
44091
|
if (verticalMin) {
|
|
44005
44092
|
return "se-resize";
|
|
@@ -44039,7 +44126,7 @@ function resetGlobalCursorStyle() {
|
|
|
44039
44126
|
prevRuleIndex = -1;
|
|
44040
44127
|
}
|
|
44041
44128
|
}
|
|
44042
|
-
function setGlobalCursorStyle(state, constraintFlags) {
|
|
44129
|
+
function setGlobalCursorStyle(state, constraintFlags, isPointerDown2) {
|
|
44043
44130
|
var _styleElement$sheet$i, _styleElement$sheet2;
|
|
44044
44131
|
const style2 = getCursorStyle(state, constraintFlags);
|
|
44045
44132
|
if (currentCursorStyle === style2) {
|
|
@@ -44253,6 +44340,7 @@ function handlePointerDown(event) {
|
|
|
44253
44340
|
updateListeners();
|
|
44254
44341
|
if (intersectingHandles.length > 0) {
|
|
44255
44342
|
updateResizeHandlerStates("down", event);
|
|
44343
|
+
updateCursor();
|
|
44256
44344
|
event.preventDefault();
|
|
44257
44345
|
if (!isWithinResizeHandle(target)) {
|
|
44258
44346
|
event.stopImmediatePropagation();
|
|
@@ -44264,7 +44352,7 @@ function handlePointerMove(event) {
|
|
|
44264
44352
|
x,
|
|
44265
44353
|
y
|
|
44266
44354
|
} = getResizeEventCoordinates(event);
|
|
44267
|
-
if (isPointerDown && event.buttons === 0) {
|
|
44355
|
+
if (isPointerDown && event.type !== "pointerleave" && event.buttons === 0) {
|
|
44268
44356
|
isPointerDown = false;
|
|
44269
44357
|
updateResizeHandlerStates("up", event);
|
|
44270
44358
|
}
|
|
@@ -44394,9 +44482,10 @@ function updateCursor() {
|
|
|
44394
44482
|
resetGlobalCursorStyle();
|
|
44395
44483
|
}
|
|
44396
44484
|
}
|
|
44397
|
-
var listenersAbortController
|
|
44485
|
+
var listenersAbortController;
|
|
44398
44486
|
function updateListeners() {
|
|
44399
|
-
|
|
44487
|
+
var _listenersAbortContro;
|
|
44488
|
+
(_listenersAbortContro = listenersAbortController) === null || _listenersAbortContro === void 0 || _listenersAbortContro.abort();
|
|
44400
44489
|
listenersAbortController = new AbortController();
|
|
44401
44490
|
const options = {
|
|
44402
44491
|
capture: true,
|
|
@@ -44418,8 +44507,13 @@ function updateListeners() {
|
|
|
44418
44507
|
}
|
|
44419
44508
|
});
|
|
44420
44509
|
}
|
|
44421
|
-
|
|
44422
|
-
|
|
44510
|
+
ownerDocumentCounts.forEach((_, ownerDocument) => {
|
|
44511
|
+
const {
|
|
44512
|
+
body
|
|
44513
|
+
} = ownerDocument;
|
|
44514
|
+
body.addEventListener("pointerup", handlePointerUp, options);
|
|
44515
|
+
body.addEventListener("pointercancel", handlePointerUp, options);
|
|
44516
|
+
});
|
|
44423
44517
|
} else {
|
|
44424
44518
|
ownerDocumentCounts.forEach((count, ownerDocument) => {
|
|
44425
44519
|
const {
|
|
@@ -44604,7 +44698,7 @@ function adjustLayoutByDelta({
|
|
|
44604
44698
|
if (!fuzzyNumbersEqual(prevSize, safeSize)) {
|
|
44605
44699
|
deltaApplied += prevSize - safeSize;
|
|
44606
44700
|
nextLayout[index2] = safeSize;
|
|
44607
|
-
if (deltaApplied.
|
|
44701
|
+
if (deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), void 0, {
|
|
44608
44702
|
numeric: true
|
|
44609
44703
|
}) >= 0) {
|
|
44610
44704
|
break;
|
|
@@ -44713,9 +44807,14 @@ function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
|
|
|
44713
44807
|
const index2 = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
|
|
44714
44808
|
return index2 != null ? [index2, index2 + 1] : [-1, -1];
|
|
44715
44809
|
}
|
|
44810
|
+
function isHTMLElement(target) {
|
|
44811
|
+
if (target instanceof HTMLElement) {
|
|
44812
|
+
return true;
|
|
44813
|
+
}
|
|
44814
|
+
return typeof target === "object" && target !== null && "tagName" in target && "getAttribute" in target;
|
|
44815
|
+
}
|
|
44716
44816
|
function getPanelGroupElement(id, rootElement = document) {
|
|
44717
|
-
|
|
44718
|
-
if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) {
|
|
44817
|
+
if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id) {
|
|
44719
44818
|
return rootElement;
|
|
44720
44819
|
}
|
|
44721
44820
|
const element2 = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
|
|
@@ -45033,11 +45132,11 @@ function computePanelFlexBoxStyle({
|
|
|
45033
45132
|
const size = layout[panelIndex];
|
|
45034
45133
|
let flexGrow;
|
|
45035
45134
|
if (size == null) {
|
|
45036
|
-
flexGrow = defaultSize != null ? defaultSize.
|
|
45135
|
+
flexGrow = defaultSize != null ? defaultSize.toFixed(precision) : "1";
|
|
45037
45136
|
} else if (panelData.length === 1) {
|
|
45038
45137
|
flexGrow = "1";
|
|
45039
45138
|
} else {
|
|
45040
|
-
flexGrow = size.
|
|
45139
|
+
flexGrow = size.toFixed(precision);
|
|
45041
45140
|
}
|
|
45042
45141
|
return {
|
|
45043
45142
|
flexBasis: 0,
|
|
@@ -46031,72 +46130,75 @@ function PanelResizeHandle({
|
|
|
46031
46130
|
});
|
|
46032
46131
|
}
|
|
46033
46132
|
PanelResizeHandle.displayName = "PanelResizeHandle";
|
|
46034
|
-
function
|
|
46133
|
+
function C(e2) {
|
|
46035
46134
|
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" };
|
|
46036
46135
|
}
|
|
46037
|
-
var R = ({ leftPanel: n2, rightPanel: r2, collapsibleSide: s2 = "left", defaultSize: c2 = 25, minSize: d2 = 5, className: u2 = "", collapsed: p2 = false, style: h2, showCollapseButton: m2 = false, animationDuration: f2 = 300, animationEasing: y2 = "cubic-bezier(0.4, 0, 0.2, 1)", onCollapseStart: w2, onCollapseComplete: x2, onExpandStart:
|
|
46038
|
-
const [E,
|
|
46039
|
-
if (
|
|
46136
|
+
var R = ({ leftPanel: n2, rightPanel: r2, collapsibleSide: s2 = "left", defaultSize: c2 = 25, minSize: d2 = 5, className: u2 = "", collapsed: p2 = false, style: h2, showCollapseButton: m2 = false, animationDuration: f2 = 300, animationEasing: y2 = "cubic-bezier(0.4, 0, 0.2, 1)", onCollapseStart: w2, onCollapseComplete: x2, onExpandStart: S, onExpandComplete: R2, theme: N }) => {
|
|
46137
|
+
const [E, D] = useState(p2), [z2, M] = useState(false), [T, A] = useState(false), [k, L] = useState(p2), [P, F] = useState(p2 ? 0 : c2), $2 = useRef(null), B = useRef(void 0), O = useRef(void 0), I = useRef(void 0), q = useCallback((e2, t2, n3) => {
|
|
46138
|
+
if (!$2.current)
|
|
46040
46139
|
return;
|
|
46041
46140
|
B.current && cancelAnimationFrame(B.current), O.current = performance.now();
|
|
46042
46141
|
const r3 = (o2) => {
|
|
46043
|
-
if (!O.current ||
|
|
46142
|
+
if (!O.current || !$2.current)
|
|
46044
46143
|
return;
|
|
46045
46144
|
const i2 = o2 - O.current, a2 = Math.min(i2 / f2, 1), l2 = a2 < 0.5 ? 4 * a2 * a2 * a2 : 1 - Math.pow(-2 * a2 + 2, 3) / 2, s3 = e2 + (t2 - e2) * l2;
|
|
46046
|
-
|
|
46145
|
+
$2.current.resize(s3), a2 < 1 ? B.current = requestAnimationFrame(r3) : (t2 === 0 ? $2.current.collapse() : $2.current.resize(t2), M(false), n3 && n3());
|
|
46047
46146
|
};
|
|
46048
46147
|
B.current = requestAnimationFrame(r3);
|
|
46049
46148
|
}, [f2]), W = useCallback(() => {
|
|
46050
|
-
|
|
46051
|
-
|
|
46149
|
+
z2 || T || (M(true), D(true), w2 && w2(), q(P, 0, () => {
|
|
46150
|
+
F(0), L(true), x2 && x2();
|
|
46052
46151
|
}));
|
|
46053
|
-
}, [
|
|
46054
|
-
|
|
46055
|
-
|
|
46152
|
+
}, [z2, T, P, q, w2, x2]), _ = useCallback(() => {
|
|
46153
|
+
z2 || T || (M(true), D(false), L(false), S && S(), q(0, c2, () => {
|
|
46154
|
+
F(c2), R2 && R2();
|
|
46056
46155
|
}));
|
|
46057
|
-
}, [
|
|
46156
|
+
}, [z2, T, c2, q, S, R2]), j = useCallback(() => {
|
|
46058
46157
|
E ? _() : W();
|
|
46059
46158
|
}, [E, W, _]), H = useCallback((e2) => {
|
|
46060
|
-
|
|
46061
|
-
}, [
|
|
46062
|
-
|
|
46159
|
+
z2 || (F(e2), e2 > 0 && D(false));
|
|
46160
|
+
}, [z2]), K = useCallback(() => {
|
|
46161
|
+
A(true);
|
|
46063
46162
|
}, []), U = useCallback(() => {
|
|
46064
|
-
|
|
46163
|
+
A(false);
|
|
46065
46164
|
}, []);
|
|
46066
46165
|
useEffect(() => {
|
|
46067
46166
|
p2 !== E && (p2 ? W() : _());
|
|
46068
46167
|
}, [p2]), useEffect(() => {
|
|
46069
|
-
p2 && !
|
|
46070
|
-
}, [p2,
|
|
46168
|
+
p2 && !z2 ? L(true) : p2 || z2 || L(false);
|
|
46169
|
+
}, [p2, z2]), useEffect(() => {
|
|
46071
46170
|
const e2 = B.current, t2 = I.current;
|
|
46072
46171
|
return () => {
|
|
46073
46172
|
e2 && cancelAnimationFrame(e2), t2 && clearTimeout(t2);
|
|
46074
46173
|
};
|
|
46075
46174
|
}, []);
|
|
46076
|
-
const
|
|
46175
|
+
const X2 = s2 === "left", Y = E ? X2 ? "▸" : "◂" : X2 ? "◂" : "▸", V = C(N), J = z2 && !T ? { transition: `flex ${f2}ms ${y2}` } : void 0, G = (e2) => {
|
|
46077
46176
|
let t2 = "hybrid-panel";
|
|
46078
|
-
return e2 && (t2 += " collapsible-panel",
|
|
46177
|
+
return e2 && (t2 += " collapsible-panel", z2 && !T && (t2 += " animating"), E && (t2 += " collapsed")), t2;
|
|
46079
46178
|
};
|
|
46080
|
-
return jsx("div", { className: `animated-resizable-layout ${u2}`, style: { ...
|
|
46081
|
-
/* @__PURE__ */ jsx(Panel, { ref:
|
|
46082
|
-
/* @__PURE__ */ jsx(PanelResizeHandle, { className: "resize-handle " + (k ? "collapsed" : ""), onDragging: K, style: k ? { visibility: "hidden", width: 0 } : void 0, children: m2 && /* @__PURE__ */ jsx("div", { className: "handle-bar", children: /* @__PURE__ */ jsx("button", { onClick: j, className: "collapse-toggle", disabled:
|
|
46083
|
-
/* @__PURE__ */ jsx(Panel, { ref:
|
|
46179
|
+
return jsx("div", { className: `animated-resizable-layout ${u2}`, style: { ...V, ...h2 }, children: /* @__PURE__ */ jsxs(PanelGroup, { direction: "horizontal", onLayout: U, children: [
|
|
46180
|
+
/* @__PURE__ */ jsx(Panel, { ref: X2 ? $2 : void 0, collapsible: X2, defaultSize: X2 ? p2 ? 0 : c2 : void 0, minSize: X2 ? d2 : 30, collapsedSize: 0, onResize: X2 ? H : void 0, onCollapse: X2 ? () => D(true) : void 0, onExpand: X2 ? () => D(false) : void 0, className: G(X2), style: X2 ? J : void 0, children: /* @__PURE__ */ jsx("div", { className: "panel-content-wrapper", style: { opacity: X2 && E ? 0 : 1, transition: z2 ? `opacity ${0.5 * f2}ms ${y2}` : "none" }, children: n2 }) }),
|
|
46181
|
+
/* @__PURE__ */ jsx(PanelResizeHandle, { className: "resize-handle " + (k ? "collapsed" : ""), onDragging: K, style: k ? { visibility: "hidden", width: 0 } : void 0, children: m2 && /* @__PURE__ */ jsx("div", { className: "handle-bar", children: /* @__PURE__ */ jsx("button", { onClick: j, className: "collapse-toggle", disabled: z2, "aria-label": E ? "Expand panel" : "Collapse panel", children: Y }) }) }),
|
|
46182
|
+
/* @__PURE__ */ jsx(Panel, { ref: X2 ? void 0 : $2, collapsible: !X2, defaultSize: X2 ? void 0 : p2 ? 0 : c2, minSize: X2 ? 30 : d2, collapsedSize: 0, onResize: X2 ? void 0 : H, onCollapse: X2 ? void 0 : () => D(true), onExpand: X2 ? void 0 : () => D(false), className: G(!X2), style: X2 ? void 0 : J, children: /* @__PURE__ */ jsx("div", { className: "panel-content-wrapper", style: { opacity: !X2 && E ? 0 : 1, transition: z2 ? `opacity ${0.5 * f2}ms ${y2}` : "none" }, children: r2 }) })
|
|
46084
46183
|
] }) });
|
|
46085
46184
|
};
|
|
46086
|
-
var
|
|
46087
|
-
const
|
|
46088
|
-
useImperativeHandle(
|
|
46089
|
-
if (!
|
|
46185
|
+
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) => {
|
|
46186
|
+
const b = useRef(null), y2 = useRef(false), w2 = useRef(null), x2 = C(d2);
|
|
46187
|
+
useImperativeHandle(v, () => ({ scrollToPanel: (e2) => {
|
|
46188
|
+
if (!b.current)
|
|
46090
46189
|
return;
|
|
46091
|
-
const t2 =
|
|
46190
|
+
const t2 = b.current, n2 = t2.children[e2];
|
|
46092
46191
|
if (n2) {
|
|
46192
|
+
y2.current = true, w2.current && clearTimeout(w2.current);
|
|
46093
46193
|
const e3 = n2.offsetLeft;
|
|
46094
|
-
t2.scrollTo({ left: e3, behavior: "smooth" })
|
|
46194
|
+
t2.scrollTo({ left: e3, behavior: "smooth" }), w2.current = setTimeout(() => {
|
|
46195
|
+
y2.current = false;
|
|
46196
|
+
}, 500);
|
|
46095
46197
|
}
|
|
46096
46198
|
}, getCurrentPanel: () => {
|
|
46097
|
-
if (!
|
|
46199
|
+
if (!b.current || b.current.children.length === 0)
|
|
46098
46200
|
return 0;
|
|
46099
|
-
const e2 =
|
|
46201
|
+
const e2 = b.current, t2 = e2.getBoundingClientRect().left;
|
|
46100
46202
|
let n2 = 0, r2 = 1 / 0;
|
|
46101
46203
|
for (let o3 = 0; o3 < e2.children.length; o3++) {
|
|
46102
46204
|
const i2 = e2.children[o3].getBoundingClientRect(), a3 = Math.abs(i2.left - t2);
|
|
@@ -46105,9 +46207,9 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
|
|
|
46105
46207
|
return n2;
|
|
46106
46208
|
} }));
|
|
46107
46209
|
useEffect(() => {
|
|
46108
|
-
if (!f2 || !
|
|
46210
|
+
if (!f2 || !b.current)
|
|
46109
46211
|
return;
|
|
46110
|
-
const e2 =
|
|
46212
|
+
const e2 = b.current, t2 = (e3) => {
|
|
46111
46213
|
const t3 = e3.target;
|
|
46112
46214
|
if (t3.tagName === "INPUT" || t3.tagName === "TEXTAREA" || t3.tagName === "SELECT" || t3.isContentEditable || t3.closest(".xterm") !== null || t3.closest('[contenteditable="true"]') !== null)
|
|
46113
46215
|
return;
|
|
@@ -46116,74 +46218,78 @@ var M = forwardRef(({ panels: o2, className: a2 = "", style: s2, theme: d2, minP
|
|
|
46116
46218
|
return e2.addEventListener("keydown", t2), () => {
|
|
46117
46219
|
e2.removeEventListener("keydown", t2);
|
|
46118
46220
|
};
|
|
46119
|
-
}, [f2])
|
|
46120
|
-
|
|
46121
|
-
|
|
46122
|
-
|
|
46123
|
-
|
|
46221
|
+
}, [f2]), useEffect(() => () => {
|
|
46222
|
+
w2.current && clearTimeout(w2.current);
|
|
46223
|
+
}, []);
|
|
46224
|
+
const S = o2.length, R2 = 2 * u2;
|
|
46225
|
+
let N;
|
|
46226
|
+
N = S === 1 || S === 2 ? "100%" : `max(${u2}px, ${100 * p2}%)`;
|
|
46227
|
+
const E = React2__default.useId().replace(/:/g, "_");
|
|
46124
46228
|
return jsxs(Fragment, { children: [
|
|
46125
|
-
|
|
46126
|
-
.snap-carousel-container[data-carousel-id="${
|
|
46229
|
+
S === 2 && /* @__PURE__ */ jsx("style", { children: `
|
|
46230
|
+
.snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
|
|
46127
46231
|
width: 100%;
|
|
46128
46232
|
}
|
|
46129
|
-
@container (min-width: ${
|
|
46130
|
-
.snap-carousel-container[data-carousel-id="${
|
|
46233
|
+
@container (min-width: ${R2}px) {
|
|
46234
|
+
.snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {
|
|
46131
46235
|
width: 50%;
|
|
46132
46236
|
}
|
|
46133
46237
|
}
|
|
46134
46238
|
` }),
|
|
46135
|
-
/* @__PURE__ */ jsx("div", { ref:
|
|
46136
|
-
if (!m2 || !
|
|
46239
|
+
/* @__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) => {
|
|
46240
|
+
if (!m2 || !b.current || b.current.children.length === 0)
|
|
46137
46241
|
return;
|
|
46138
|
-
|
|
46242
|
+
if (y2.current)
|
|
46243
|
+
return;
|
|
46244
|
+
const t2 = b.current, n2 = t2.getBoundingClientRect().left;
|
|
46139
46245
|
let r2 = 0, o3 = 1 / 0;
|
|
46140
46246
|
for (let i2 = 0; i2 < t2.children.length; i2++) {
|
|
46141
46247
|
const e3 = t2.children[i2].getBoundingClientRect(), a3 = Math.abs(e3.left - n2);
|
|
46142
46248
|
a3 < o3 && (o3 = a3, r2 = i2);
|
|
46143
46249
|
}
|
|
46144
46250
|
m2(r2);
|
|
46145
|
-
}, "data-panel-count":
|
|
46251
|
+
}, "data-panel-count": S, "data-carousel-id": E, children: o2.map((t2, n2) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
|
|
46146
46252
|
] });
|
|
46147
46253
|
});
|
|
46148
|
-
|
|
46254
|
+
z.displayName = "SnapCarousel";
|
|
46255
|
+
var le;
|
|
46149
46256
|
var se;
|
|
46150
|
-
|
|
46151
|
-
|
|
46152
|
-
var ue = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
|
|
46257
|
+
(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";
|
|
46258
|
+
var de = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
|
|
46153
46259
|
var Te;
|
|
46154
|
-
var
|
|
46155
|
-
(
|
|
46260
|
+
var Ae;
|
|
46261
|
+
(Ae = Te || (Te = {}))[Ae.Forward = 1] = "Forward", Ae[Ae.Backward = -1] = "Backward";
|
|
46262
|
+
var _e;
|
|
46156
46263
|
var je;
|
|
46157
46264
|
var He;
|
|
46158
46265
|
var Ke;
|
|
46159
|
-
|
|
46160
|
-
(
|
|
46161
|
-
|
|
46266
|
+
(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";
|
|
46267
|
+
({ start: [He.Space, He.Enter], cancel: [He.Esc], end: [He.Space, He.Enter, He.Tab] });
|
|
46268
|
+
var rt;
|
|
46162
46269
|
var ot;
|
|
46163
|
-
|
|
46164
|
-
|
|
46270
|
+
(ot = rt || (rt = {}))[ot.RightClick = 2] = "RightClick";
|
|
46271
|
+
var at;
|
|
46165
46272
|
var lt;
|
|
46166
46273
|
var st;
|
|
46167
46274
|
var ct;
|
|
46168
|
-
|
|
46169
|
-
(st = lt || (lt = {}))[st.Pointer = 0] = "Pointer", st[st.DraggableRect = 1] = "DraggableRect", (dt = ct || (ct = {}))[dt.TreeOrder = 0] = "TreeOrder", dt[dt.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
46275
|
+
(lt = at || (at = {}))[lt.Pointer = 0] = "Pointer", lt[lt.DraggableRect = 1] = "DraggableRect", (ct = st || (st = {}))[ct.TreeOrder = 0] = "TreeOrder", ct[ct.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
46170
46276
|
({ x: { [Te.Backward]: false, [Te.Forward]: false }, y: { [Te.Backward]: false, [Te.Forward]: false } });
|
|
46277
|
+
var pt;
|
|
46171
46278
|
var ht;
|
|
46172
46279
|
var mt;
|
|
46173
|
-
|
|
46174
|
-
(
|
|
46175
|
-
({
|
|
46176
|
-
|
|
46280
|
+
(ht = pt || (pt = {}))[ht.Always = 0] = "Always", ht[ht.BeforeDragging = 1] = "BeforeDragging", ht[ht.WhileDragging = 2] = "WhileDragging", (mt || (mt = {})).Optimized = "optimized";
|
|
46281
|
+
({ droppable: { strategy: pt.WhileDragging, frequency: mt.Optimized } });
|
|
46282
|
+
/* @__PURE__ */ createContext({ ...de, scaleX: 1, scaleY: 1 });
|
|
46283
|
+
var $t;
|
|
46177
46284
|
var Bt;
|
|
46178
|
-
|
|
46179
|
-
|
|
46180
|
-
var Vt;
|
|
46285
|
+
(Bt = $t || ($t = {}))[Bt.Uninitialized = 0] = "Uninitialized", Bt[Bt.Initializing = 1] = "Initializing", Bt[Bt.Initialized = 2] = "Initialized";
|
|
46286
|
+
var Ut;
|
|
46181
46287
|
(() => {
|
|
46182
46288
|
if (typeof window != "undefined") {
|
|
46183
46289
|
const e2 = window;
|
|
46184
46290
|
return e2.__principlemd_theme_context__ || (e2.__principlemd_theme_context__ = createContext(void 0)), e2.__principlemd_theme_context__;
|
|
46185
46291
|
}
|
|
46186
|
-
return
|
|
46292
|
+
return Ut || (Ut = createContext(void 0)), Ut;
|
|
46187
46293
|
})();
|
|
46188
46294
|
function extractSlideTitle2(content2, slideIndex) {
|
|
46189
46295
|
const lines = content2.split(`
|
|
@@ -47607,9 +47713,9 @@ const MarkdownPanel = ({
|
|
|
47607
47713
|
actions: _actions,
|
|
47608
47714
|
events
|
|
47609
47715
|
}) => {
|
|
47610
|
-
var _a, _b, _c, _d,
|
|
47716
|
+
var _a, _b, _c, _d, _e2, _f, _g;
|
|
47611
47717
|
const { theme: theme2 } = useTheme();
|
|
47612
|
-
const [viewMode, setViewMode] = useState("
|
|
47718
|
+
const [viewMode, setViewMode] = useState("document");
|
|
47613
47719
|
const [currentSlide, setCurrentSlide] = useState(0);
|
|
47614
47720
|
const [fontSizeScale, setFontSizeScale] = useState(1);
|
|
47615
47721
|
const [isMobile, setIsMobile] = useState(false);
|
|
@@ -47670,7 +47776,7 @@ const MarkdownPanel = ({
|
|
|
47670
47776
|
branch,
|
|
47671
47777
|
basePath: getBasePath(((_c2 = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _c2.path) || "")
|
|
47672
47778
|
};
|
|
47673
|
-
}, [(
|
|
47779
|
+
}, [(_e2 = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _e2.source, (_f = activeFile == null ? void 0 : activeFile.data) == null ? void 0 : _f.path]);
|
|
47674
47780
|
const handleFontSizeIncrease = () => {
|
|
47675
47781
|
setFontSizeScale((prev) => {
|
|
47676
47782
|
const newScale = Math.min(prev + 0.1, 3);
|
|
@@ -47873,11 +47979,11 @@ const MarkdownPanel = ({
|
|
|
47873
47979
|
/* @__PURE__ */ jsx(
|
|
47874
47980
|
"button",
|
|
47875
47981
|
{
|
|
47876
|
-
onClick: () => handleViewModeChange("
|
|
47877
|
-
title: "
|
|
47982
|
+
onClick: () => handleViewModeChange("document"),
|
|
47983
|
+
title: "Document",
|
|
47878
47984
|
style: {
|
|
47879
|
-
background: viewMode === "
|
|
47880
|
-
color: viewMode === "
|
|
47985
|
+
background: viewMode === "document" ? theme2.colors.primary : "transparent",
|
|
47986
|
+
color: viewMode === "document" ? theme2.colors.background : theme2.colors.textSecondary,
|
|
47881
47987
|
border: "none",
|
|
47882
47988
|
padding: isMobile ? "6px 8px" : "6px 12px",
|
|
47883
47989
|
cursor: "pointer",
|
|
@@ -47889,17 +47995,17 @@ const MarkdownPanel = ({
|
|
|
47889
47995
|
alignItems: "center",
|
|
47890
47996
|
gap: "4px"
|
|
47891
47997
|
},
|
|
47892
|
-
children: isMobile ? /* @__PURE__ */ jsx(
|
|
47998
|
+
children: isMobile ? /* @__PURE__ */ jsx(FileText, { size: 16 }) : "Document"
|
|
47893
47999
|
}
|
|
47894
48000
|
),
|
|
47895
48001
|
/* @__PURE__ */ jsx(
|
|
47896
48002
|
"button",
|
|
47897
48003
|
{
|
|
47898
|
-
onClick: () => handleViewModeChange("
|
|
47899
|
-
title: "
|
|
48004
|
+
onClick: () => handleViewModeChange("book"),
|
|
48005
|
+
title: "Sections",
|
|
47900
48006
|
style: {
|
|
47901
|
-
background: viewMode === "
|
|
47902
|
-
color: viewMode === "
|
|
48007
|
+
background: viewMode === "book" ? theme2.colors.primary : "transparent",
|
|
48008
|
+
color: viewMode === "book" ? theme2.colors.background : theme2.colors.textSecondary,
|
|
47903
48009
|
border: "none",
|
|
47904
48010
|
padding: isMobile ? "6px 8px" : "6px 12px",
|
|
47905
48011
|
cursor: "pointer",
|
|
@@ -47911,7 +48017,7 @@ const MarkdownPanel = ({
|
|
|
47911
48017
|
alignItems: "center",
|
|
47912
48018
|
gap: "4px"
|
|
47913
48019
|
},
|
|
47914
|
-
children: isMobile ? /* @__PURE__ */ jsx(
|
|
48020
|
+
children: isMobile ? /* @__PURE__ */ jsx(BookOpen, { size: 16 }) : "Sections"
|
|
47915
48021
|
}
|
|
47916
48022
|
)
|
|
47917
48023
|
]
|