pptx-react-viewer 4.30.0 → 4.30.1
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/CHANGELOG.md +12 -0
- package/dist/{AiChatPanel-6VWCT6NE.js → AiChatPanel-7XZQQZ4P.js} +9 -9
- package/dist/AiChatPanel-7XZQQZ4P.js.br +0 -0
- package/dist/AiChatPanel-7XZQQZ4P.js.gz +0 -0
- package/dist/{AiChatPanel-42FL4CPM.mjs → AiChatPanel-XI272UTZ.mjs} +1 -1
- package/dist/AiChatPanel-XI272UTZ.mjs.br +0 -0
- package/dist/AiChatPanel-XI272UTZ.mjs.gz +0 -0
- package/dist/{chunk-MFGD7XVJ.js → chunk-355ICDU6.js} +259 -249
- package/dist/chunk-355ICDU6.js.br +0 -0
- package/dist/chunk-355ICDU6.js.gz +0 -0
- package/dist/{chunk-ZIBAN7RL.mjs → chunk-ATGP75C4.mjs} +35 -16
- package/dist/chunk-ATGP75C4.mjs.br +0 -0
- package/dist/chunk-ATGP75C4.mjs.gz +0 -0
- package/dist/{chunk-KRXS36RB.mjs → chunk-CHZJORUW.mjs} +16 -6
- package/dist/chunk-CHZJORUW.mjs.br +0 -0
- package/dist/chunk-CHZJORUW.mjs.gz +0 -0
- package/dist/{chunk-GXMGJ5A3.mjs → chunk-FPACF36E.mjs} +14 -8
- package/dist/chunk-FPACF36E.mjs.br +0 -0
- package/dist/chunk-FPACF36E.mjs.gz +0 -0
- package/dist/{chunk-XKV2QDAO.js → chunk-M2AKDETN.js} +394 -388
- package/dist/chunk-M2AKDETN.js.br +0 -0
- package/dist/chunk-M2AKDETN.js.gz +0 -0
- package/dist/{chunk-RHNJ4IU2.js → chunk-XRFJ7TAF.js} +34 -15
- package/dist/chunk-XRFJ7TAF.js.br +0 -0
- package/dist/chunk-XRFJ7TAF.js.gz +0 -0
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-42FL4CPM.mjs.br +0 -0
- package/dist/AiChatPanel-42FL4CPM.mjs.gz +0 -0
- package/dist/AiChatPanel-6VWCT6NE.js.br +0 -0
- package/dist/AiChatPanel-6VWCT6NE.js.gz +0 -0
- package/dist/chunk-GXMGJ5A3.mjs.br +0 -0
- package/dist/chunk-GXMGJ5A3.mjs.gz +0 -0
- package/dist/chunk-KRXS36RB.mjs.br +0 -0
- package/dist/chunk-KRXS36RB.mjs.gz +0 -0
- package/dist/chunk-MFGD7XVJ.js.br +0 -0
- package/dist/chunk-MFGD7XVJ.js.gz +0 -0
- package/dist/chunk-RHNJ4IU2.js.br +0 -0
- package/dist/chunk-RHNJ4IU2.js.gz +0 -0
- package/dist/chunk-XKV2QDAO.js.br +0 -0
- package/dist/chunk-XKV2QDAO.js.gz +0 -0
- package/dist/chunk-ZIBAN7RL.mjs.br +0 -0
- package/dist/chunk-ZIBAN7RL.mjs.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk355ICDU6_js = require('./chunk-355ICDU6.js');
|
|
4
|
+
var chunkXRFJ7TAF_js = require('./chunk-XRFJ7TAF.js');
|
|
5
5
|
var pptx = require('ooxml-ui/pptx');
|
|
6
6
|
var React97 = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -307,7 +307,7 @@ function SlideTemplatePreview({
|
|
|
307
307
|
transformOrigin: "top left"
|
|
308
308
|
},
|
|
309
309
|
children: previewSlide.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
-
|
|
310
|
+
chunk355ICDU6_js.StaticElementRenderer,
|
|
311
311
|
{
|
|
312
312
|
element,
|
|
313
313
|
activeSlide: previewSlide,
|
|
@@ -376,7 +376,7 @@ function SlideTemplateGalleryDialog({
|
|
|
376
376
|
scheme
|
|
377
377
|
}) {
|
|
378
378
|
const { t } = reactI18next.useTranslation();
|
|
379
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
379
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
380
380
|
const [selected, setSelected] = React97.useState(null);
|
|
381
381
|
const dialogRef = React97.useRef(null);
|
|
382
382
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
@@ -459,7 +459,7 @@ function SlideTemplateGalleryDialog({
|
|
|
459
459
|
onInsert(spec.id);
|
|
460
460
|
onClose();
|
|
461
461
|
},
|
|
462
|
-
className:
|
|
462
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
463
463
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
464
464
|
selected === spec.id ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
465
465
|
),
|
|
@@ -723,7 +723,7 @@ function WebHomeControls({
|
|
|
723
723
|
function ShapeArrangeExtras(p) {
|
|
724
724
|
const commands = useShapeFormatContext();
|
|
725
725
|
const crop = commands?.crop;
|
|
726
|
-
const { isHidden } =
|
|
726
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(p.hiddenActions);
|
|
727
727
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
728
728
|
const controls = React97.useMemo(
|
|
729
729
|
() => pptx.arrangeShapeHomeControls({
|
|
@@ -1056,7 +1056,7 @@ function TransitionsSection(p) {
|
|
|
1056
1056
|
case "soundPreview": {
|
|
1057
1057
|
const url = pptx.ribbonTransitionStockSoundUrl(transition);
|
|
1058
1058
|
if (url) {
|
|
1059
|
-
|
|
1059
|
+
chunk355ICDU6_js.playAnimationSound(url);
|
|
1060
1060
|
}
|
|
1061
1061
|
break;
|
|
1062
1062
|
}
|
|
@@ -1215,7 +1215,7 @@ function AccountPage() {
|
|
|
1215
1215
|
return void 0;
|
|
1216
1216
|
});
|
|
1217
1217
|
};
|
|
1218
|
-
const version = "4.30.
|
|
1218
|
+
const version = "4.30.1" ;
|
|
1219
1219
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1220
1220
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
1221
1221
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1255,7 +1255,7 @@ function AccountPage() {
|
|
|
1255
1255
|
"aria-label": color,
|
|
1256
1256
|
"aria-pressed": profile.avatarColor === color,
|
|
1257
1257
|
onClick: () => updateProfile({ avatarColor: color }),
|
|
1258
|
-
className:
|
|
1258
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
1259
1259
|
"size-7 rounded-full border-2 transition-transform",
|
|
1260
1260
|
profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
|
|
1261
1261
|
),
|
|
@@ -1478,7 +1478,7 @@ function FileSection(p) {
|
|
|
1478
1478
|
const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
|
|
1479
1479
|
const [query, setQuery] = React97.useState("");
|
|
1480
1480
|
const [recent, setRecent] = React97.useState([]);
|
|
1481
|
-
const { isHidden } =
|
|
1481
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(p.hiddenActions);
|
|
1482
1482
|
const exportHidden = isHidden("export");
|
|
1483
1483
|
React97.useEffect(() => {
|
|
1484
1484
|
void pptx.listBackstageRecentFiles(t, p.recentPresentationsCount).then(setRecent);
|
|
@@ -1708,7 +1708,7 @@ function RibbonMenu({
|
|
|
1708
1708
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1709
1709
|
"div",
|
|
1710
1710
|
{
|
|
1711
|
-
className:
|
|
1711
|
+
className: chunkXRFJ7TAF_js.cn("fixed z-50", className),
|
|
1712
1712
|
style: pos ? { left: pos.left, top: pos.top } : { visibility: "hidden" },
|
|
1713
1713
|
children
|
|
1714
1714
|
}
|
|
@@ -1734,7 +1734,7 @@ function LayoutGalleryMenu(p) {
|
|
|
1734
1734
|
type: "button",
|
|
1735
1735
|
"aria-current": isCurrent ? "true" : void 0,
|
|
1736
1736
|
title: isCurrent ? `${layout.name} (${t("pptx.layoutGallery.current")})` : layout.name,
|
|
1737
|
-
className:
|
|
1737
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
1738
1738
|
"relative flex min-w-0 flex-col items-center gap-1 rounded border-2 p-1 text-xs text-foreground transition-colors hover:bg-muted",
|
|
1739
1739
|
isCurrent ? "border-primary bg-primary/10" : "border-transparent"
|
|
1740
1740
|
),
|
|
@@ -1808,7 +1808,7 @@ function LayoutArtwork({
|
|
|
1808
1808
|
backgroundColor
|
|
1809
1809
|
};
|
|
1810
1810
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (preview?.elements ?? []).slice(0, MAX_PREVIEW_ELEMENTS).map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1811
|
-
|
|
1811
|
+
chunk355ICDU6_js.StaticElementRenderer,
|
|
1812
1812
|
{
|
|
1813
1813
|
element,
|
|
1814
1814
|
activeSlide: slide,
|
|
@@ -2370,7 +2370,7 @@ function CustomShowsControls({
|
|
|
2370
2370
|
{
|
|
2371
2371
|
type: "button",
|
|
2372
2372
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
2373
|
-
className:
|
|
2373
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
2374
2374
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
2375
2375
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
2376
2376
|
),
|
|
@@ -2425,7 +2425,7 @@ function SlideShowOptions({
|
|
|
2425
2425
|
}
|
|
2426
2426
|
function SubtitleSettingsControl() {
|
|
2427
2427
|
const { t } = reactI18next.useTranslation();
|
|
2428
|
-
const supplied = React97.useContext(
|
|
2428
|
+
const supplied = React97.useContext(chunk355ICDU6_js.ViewerOptionsStoreContext);
|
|
2429
2429
|
const fallback = React97.useRef(null);
|
|
2430
2430
|
if (!supplied) {
|
|
2431
2431
|
fallback.current ??= pptx.createViewerOptionsStore({ persist: false });
|
|
@@ -2459,7 +2459,7 @@ function SubtitleSettingsControl() {
|
|
|
2459
2459
|
}
|
|
2460
2460
|
function SlideShowSection(p) {
|
|
2461
2461
|
const { t } = reactI18next.useTranslation();
|
|
2462
|
-
const { isHidden } =
|
|
2462
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(p.hiddenActions);
|
|
2463
2463
|
const [showsOpen, setShowsOpen] = React97.useState(false);
|
|
2464
2464
|
const showsRef = React97.useRef(null);
|
|
2465
2465
|
React97.useEffect(() => {
|
|
@@ -2540,7 +2540,7 @@ function extractFontInfo(element, themeFonts) {
|
|
|
2540
2540
|
fontFamily: pptx.resolveDefaultFontFamily(placeholderType, themeFonts),
|
|
2541
2541
|
fontSize: "24"
|
|
2542
2542
|
};
|
|
2543
|
-
if (!element || !(0,
|
|
2543
|
+
if (!element || !(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
2544
2544
|
return defaults;
|
|
2545
2545
|
}
|
|
2546
2546
|
const segStyle = element.textSegments?.[0]?.style;
|
|
@@ -2561,7 +2561,7 @@ function getEffectiveTextStyle(element, tableEditorState) {
|
|
|
2561
2561
|
if (!element) {
|
|
2562
2562
|
return void 0;
|
|
2563
2563
|
}
|
|
2564
|
-
if ((0,
|
|
2564
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
2565
2565
|
return element.textStyle;
|
|
2566
2566
|
}
|
|
2567
2567
|
if (element.type === "table" && tableEditorState && element.tableData) {
|
|
@@ -2574,7 +2574,7 @@ function isTextDecorationFlag(id) {
|
|
|
2574
2574
|
return pptx.TEXT_DECORATION_FLAGS.includes(id);
|
|
2575
2575
|
}
|
|
2576
2576
|
function textSectionFlags(element, tableEditorState, readSelection) {
|
|
2577
|
-
if (element && (0,
|
|
2577
|
+
if (element && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
2578
2578
|
const result = readSelection ? pptx.getInlineEditorSelectionResult(element.textSegments) : null;
|
|
2579
2579
|
const current = result?.kind === "supported" && (!result.snapshot || result.snapshot.elementId === element.id) ? result : null;
|
|
2580
2580
|
return pptx.getSelectionTextStyleFlags(
|
|
@@ -2590,7 +2590,7 @@ function textSectionFlags(element, tableEditorState, readSelection) {
|
|
|
2590
2590
|
);
|
|
2591
2591
|
}
|
|
2592
2592
|
function textSectionBulletKind(element, tableEditorState) {
|
|
2593
|
-
if (element && (0,
|
|
2593
|
+
if (element && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
2594
2594
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments, { preserveCaret: true });
|
|
2595
2595
|
return result.kind === "supported" && (!result.snapshot || result.snapshot.elementId === element.id) ? pptx.selectionBulletKind(element, result.selection, result.snapshot?.textSegments) : pptx.elementBulletKind(element);
|
|
2596
2596
|
}
|
|
@@ -2827,7 +2827,7 @@ function subscribe(onChange) {
|
|
|
2827
2827
|
}
|
|
2828
2828
|
function useParagraphListKind(element) {
|
|
2829
2829
|
const read = React97.useCallback(() => {
|
|
2830
|
-
if (!element || !(0,
|
|
2830
|
+
if (!element || !(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
2831
2831
|
return "none";
|
|
2832
2832
|
}
|
|
2833
2833
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments, { preserveCaret: true });
|
|
@@ -2850,7 +2850,7 @@ function TextSection(p) {
|
|
|
2850
2850
|
const hasSel = Boolean(p.selectedElement);
|
|
2851
2851
|
const canMut = hasSel && p.canEdit;
|
|
2852
2852
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
2853
|
-
const isTextEl = hasSel && p.selectedElement !== null && (0,
|
|
2853
|
+
const isTextEl = hasSel && p.selectedElement !== null && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(p.selectedElement);
|
|
2854
2854
|
const isTable = hasSel && p.selectedElement?.type === "table";
|
|
2855
2855
|
const canFormat = isTextEl || isTable;
|
|
2856
2856
|
const effectiveTs = getEffectiveTextStyle(p.selectedElement, p.tableEditorState);
|
|
@@ -2860,15 +2860,15 @@ function TextSection(p) {
|
|
|
2860
2860
|
if (!p.canEdit || !canFormat || !p.selectedElement) {
|
|
2861
2861
|
return;
|
|
2862
2862
|
}
|
|
2863
|
-
if ((0,
|
|
2863
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(p.selectedElement)) {
|
|
2864
2864
|
p.onToggleBullets(kind);
|
|
2865
2865
|
return;
|
|
2866
2866
|
}
|
|
2867
2867
|
p.onUpdateTextStyle({ listType: effectiveTs?.listType === kind ? "none" : kind });
|
|
2868
2868
|
};
|
|
2869
|
-
const currentColor = isTextEl && p.selectedElement && (0,
|
|
2870
|
-
const currentColorThemeRef = isTextEl && p.selectedElement && (0,
|
|
2871
|
-
const currentHighlight = isTextEl && p.selectedElement && (0,
|
|
2869
|
+
const currentColor = isTextEl && p.selectedElement && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.color ?? p.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
|
|
2870
|
+
const currentColorThemeRef = isTextEl && p.selectedElement && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.colorRef ?? p.selectedElement.textStyle?.colorRef : void 0;
|
|
2871
|
+
const currentHighlight = isTextEl && p.selectedElement && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
|
|
2872
2872
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2873
2873
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.font"), children: [
|
|
2874
2874
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "font-controls", children: [
|
|
@@ -2883,7 +2883,7 @@ function TextSection(p) {
|
|
|
2883
2883
|
customFonts: p.customFontFamilies,
|
|
2884
2884
|
onFamily: (family) => p.onUpdateTextStyle({ fontFamily: family }),
|
|
2885
2885
|
onSize: (size) => p.onUpdateTextStyle({
|
|
2886
|
-
fontSize: p.selectedElement && (0,
|
|
2886
|
+
fontSize: p.selectedElement && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(p.selectedElement) ? pptx.textFontSizePtToPx(size) : size
|
|
2887
2887
|
})
|
|
2888
2888
|
}
|
|
2889
2889
|
),
|
|
@@ -2993,7 +2993,7 @@ function MobileSheet({
|
|
|
2993
2993
|
}) {
|
|
2994
2994
|
const sheetRef = React97.useRef(null);
|
|
2995
2995
|
const { t } = reactI18next.useTranslation();
|
|
2996
|
-
const { dragY, dragging, handlers } =
|
|
2996
|
+
const { dragY, dragging, handlers } = chunk355ICDU6_js.useSheetDismissDrag(onClose);
|
|
2997
2997
|
useModalFocus(open, sheetRef, onClose);
|
|
2998
2998
|
if (!open) {
|
|
2999
2999
|
return null;
|
|
@@ -3017,7 +3017,7 @@ function MobileSheet({
|
|
|
3017
3017
|
"aria-modal": "true",
|
|
3018
3018
|
"aria-label": typeof title === "string" ? title : t("pptx.mobileSheet.ariaLabel"),
|
|
3019
3019
|
tabIndex: -1,
|
|
3020
|
-
className:
|
|
3020
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3021
3021
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
3022
3022
|
"animate-in slide-in-from-bottom duration-200",
|
|
3023
3023
|
className
|
|
@@ -3081,7 +3081,7 @@ function MobileMenuSheet(props) {
|
|
|
3081
3081
|
const { t } = reactI18next.useTranslation();
|
|
3082
3082
|
const { open, onClose } = props;
|
|
3083
3083
|
const [active, setActive] = React97.useState("home");
|
|
3084
|
-
const { isTabVisible } =
|
|
3084
|
+
const { isTabVisible } = chunk355ICDU6_js.useToolbarVisibility(props.hiddenActions);
|
|
3085
3085
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3086
3086
|
MobileSheet,
|
|
3087
3087
|
{
|
|
@@ -3095,7 +3095,7 @@ function MobileMenuSheet(props) {
|
|
|
3095
3095
|
{
|
|
3096
3096
|
type: "button",
|
|
3097
3097
|
onClick: () => setActive(active === key ? null : key),
|
|
3098
|
-
className:
|
|
3098
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3099
3099
|
"inline-flex items-center gap-1.5 shrink-0 px-3 py-2 rounded-full text-[12px] font-medium border transition-colors min-h-[36px]",
|
|
3100
3100
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
3101
3101
|
),
|
|
@@ -3362,7 +3362,7 @@ function MobileToolbar(props) {
|
|
|
3362
3362
|
const { t } = reactI18next.useTranslation();
|
|
3363
3363
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
3364
3364
|
const [menuOpen, setMenuOpen] = React97.useState(false);
|
|
3365
|
-
const { isHidden } =
|
|
3365
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(props.hiddenActions);
|
|
3366
3366
|
const showEdit = mode === "edit" || mode === "master";
|
|
3367
3367
|
const hidden = [];
|
|
3368
3368
|
if (isHidden("undo")) {
|
|
@@ -3427,7 +3427,7 @@ function DrawingGroup(p) {
|
|
|
3427
3427
|
const { recentColors, pushColor } = useRecentColors();
|
|
3428
3428
|
const themeColors = useThemeColorMap();
|
|
3429
3429
|
const commands = useRibbonGalleryCommands();
|
|
3430
|
-
const style = p.selectedElement && (0,
|
|
3430
|
+
const style = p.selectedElement && (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(p.selectedElement) ? p.selectedElement.shapeStyle : void 0;
|
|
3431
3431
|
const { onMoveLayer, onMoveLayerToEdge, onSetNewShapeType, onAddShape, onUpdateElementStyle } = p;
|
|
3432
3432
|
const hasSelection = Boolean(p.selectedElement);
|
|
3433
3433
|
const controls = React97.useMemo(
|
|
@@ -3530,7 +3530,7 @@ var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap t
|
|
|
3530
3530
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
3531
3531
|
function RibbonTabBar(p) {
|
|
3532
3532
|
const { t } = reactI18next.useTranslation();
|
|
3533
|
-
const viewerOptions =
|
|
3533
|
+
const viewerOptions = chunk355ICDU6_js.useViewerOptionsContext();
|
|
3534
3534
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3535
3535
|
"div",
|
|
3536
3536
|
{
|
|
@@ -3538,7 +3538,7 @@ function RibbonTabBar(p) {
|
|
|
3538
3538
|
"data-pptx-chrome": "ribbon-tabs",
|
|
3539
3539
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
3540
3540
|
children: [
|
|
3541
|
-
|
|
3541
|
+
chunkXRFJ7TAF_js.TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
3542
3542
|
const selected = p.activeSection === s.id;
|
|
3543
3543
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3544
3544
|
"button",
|
|
@@ -3548,7 +3548,7 @@ function RibbonTabBar(p) {
|
|
|
3548
3548
|
"aria-selected": selected,
|
|
3549
3549
|
title: pptx.resolveScreenTip(viewerOptions, t(s.labelKey)),
|
|
3550
3550
|
onClick: () => p.onSelectSection(s.id),
|
|
3551
|
-
className:
|
|
3551
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3552
3552
|
TAB_BASE,
|
|
3553
3553
|
selected ? s.id === "file" ? "text-white bg-primary/80 rounded-sm" : `text-foreground ${TAB_UNDERLINE}` : s.id === "file" ? "text-primary hover:bg-primary/15 rounded-sm" : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
3554
3554
|
),
|
|
@@ -3569,7 +3569,7 @@ function RibbonTabBar(p) {
|
|
|
3569
3569
|
...{ [pptx.RIBBON_CONTEXTUAL_TAB_ATTR]: id },
|
|
3570
3570
|
title: pptx.resolveScreenTip(viewerOptions, label),
|
|
3571
3571
|
onClick: () => p.onSelectContextual(id),
|
|
3572
|
-
className:
|
|
3572
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3573
3573
|
TAB_BASE,
|
|
3574
3574
|
"text-primary",
|
|
3575
3575
|
selected ? TAB_UNDERLINE : "hover:bg-primary/10"
|
|
@@ -3587,9 +3587,9 @@ function RibbonTabBar(p) {
|
|
|
3587
3587
|
}
|
|
3588
3588
|
function TabRowActions(p) {
|
|
3589
3589
|
const { t } = reactI18next.useTranslation();
|
|
3590
|
-
const collab =
|
|
3590
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
3591
3591
|
const isCollaborating = collab && collab.status === "connected";
|
|
3592
|
-
const { isHidden } =
|
|
3592
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(p.hiddenActions);
|
|
3593
3593
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 pr-1", children: [
|
|
3594
3594
|
p.onEnterRehearsalMode && !isHidden("record") && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3595
3595
|
"button",
|
|
@@ -3610,7 +3610,7 @@ function TabRowActions(p) {
|
|
|
3610
3610
|
{
|
|
3611
3611
|
type: "button",
|
|
3612
3612
|
onClick: p.onOpenShareDialog,
|
|
3613
|
-
className:
|
|
3613
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3614
3614
|
"relative inline-flex items-center gap-1 px-2.5 py-1 rounded-sm text-[11px] font-medium transition-colors whitespace-nowrap",
|
|
3615
3615
|
isCollaborating ? "bg-green-600 hover:bg-green-500 text-white" : "bg-primary hover:bg-primary/90 text-white"
|
|
3616
3616
|
),
|
|
@@ -3626,7 +3626,7 @@ function TabRowActions(p) {
|
|
|
3626
3626
|
}
|
|
3627
3627
|
function TitleBarElement(p) {
|
|
3628
3628
|
const { t } = reactI18next.useTranslation();
|
|
3629
|
-
const options =
|
|
3629
|
+
const options = chunk355ICDU6_js.useViewerOptionsContext();
|
|
3630
3630
|
const customization = useViewerCustomizationContext();
|
|
3631
3631
|
const ref = React97.useRef(null);
|
|
3632
3632
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -3699,7 +3699,7 @@ function PresentDropdown({
|
|
|
3699
3699
|
{
|
|
3700
3700
|
type: "button",
|
|
3701
3701
|
onClick: onPresent,
|
|
3702
|
-
className:
|
|
3702
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3703
3703
|
"px-2 py-1 transition-colors",
|
|
3704
3704
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
3705
3705
|
),
|
|
@@ -3712,7 +3712,7 @@ function PresentDropdown({
|
|
|
3712
3712
|
{
|
|
3713
3713
|
type: "button",
|
|
3714
3714
|
onClick: () => setOpen((prev) => !prev),
|
|
3715
|
-
className:
|
|
3715
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3716
3716
|
"inline-flex items-center px-1 transition-colors border-l border-border",
|
|
3717
3717
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
3718
3718
|
),
|
|
@@ -3915,7 +3915,7 @@ function OverflowMenu(p) {
|
|
|
3915
3915
|
{
|
|
3916
3916
|
type: "button",
|
|
3917
3917
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
3918
|
-
className:
|
|
3918
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3919
3919
|
"p-1.5 rounded transition-colors",
|
|
3920
3920
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
3921
3921
|
),
|
|
@@ -3962,7 +3962,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
3962
3962
|
onToggleSidebar,
|
|
3963
3963
|
onToggleInspector
|
|
3964
3964
|
} = p;
|
|
3965
|
-
const collab =
|
|
3965
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
3966
3966
|
const customization = useViewerCustomizationContext();
|
|
3967
3967
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
3968
3968
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -3981,7 +3981,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
3981
3981
|
{
|
|
3982
3982
|
type: "button",
|
|
3983
3983
|
onClick: onToggleSidebar,
|
|
3984
|
-
className:
|
|
3984
|
+
className: chunkXRFJ7TAF_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
3985
3985
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
3986
3986
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
3987
3987
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic })
|
|
@@ -3993,7 +3993,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
3993
3993
|
{
|
|
3994
3994
|
type: "button",
|
|
3995
3995
|
onClick: p.onToggleComments,
|
|
3996
|
-
className:
|
|
3996
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
3997
3997
|
qab,
|
|
3998
3998
|
"relative max-md:hidden",
|
|
3999
3999
|
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
@@ -4060,7 +4060,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4060
4060
|
{
|
|
4061
4061
|
type: "button",
|
|
4062
4062
|
onClick: onToggleInspector,
|
|
4063
|
-
className:
|
|
4063
|
+
className: chunkXRFJ7TAF_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
4064
4064
|
title: t("pptx.toolbar.toggleInspector"),
|
|
4065
4065
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
4066
4066
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic })
|
|
@@ -4071,7 +4071,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4071
4071
|
{
|
|
4072
4072
|
type: "button",
|
|
4073
4073
|
onClick: p.onToggleAiPanel,
|
|
4074
|
-
className:
|
|
4074
|
+
className: chunkXRFJ7TAF_js.cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
4075
4075
|
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
4076
4076
|
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
4077
4077
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic })
|
|
@@ -4082,7 +4082,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4082
4082
|
{
|
|
4083
4083
|
type: "button",
|
|
4084
4084
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
4085
|
-
className:
|
|
4085
|
+
className: chunkXRFJ7TAF_js.cn(qab, "text-muted-foreground"),
|
|
4086
4086
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
4087
4087
|
"aria-label": t("pptx.toolbar.settings"),
|
|
4088
4088
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -4279,8 +4279,8 @@ function ToolbarLateTabs({
|
|
|
4279
4279
|
function Toolbar(p) {
|
|
4280
4280
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
4281
4281
|
const { t } = reactI18next.useTranslation();
|
|
4282
|
-
const { isTabVisible } =
|
|
4283
|
-
const viewerOptions =
|
|
4282
|
+
const { isTabVisible } = chunk355ICDU6_js.useToolbarVisibility(p.hiddenActions);
|
|
4283
|
+
const viewerOptions = chunk355ICDU6_js.useViewerOptionsContext();
|
|
4284
4284
|
const customization = useViewerCustomizationContext();
|
|
4285
4285
|
const belowInput = React97.useMemo(
|
|
4286
4286
|
() => ({
|
|
@@ -4362,7 +4362,7 @@ function Toolbar(p) {
|
|
|
4362
4362
|
{
|
|
4363
4363
|
type: "button",
|
|
4364
4364
|
onClick: p.onToggleCompactToolbar,
|
|
4365
|
-
className:
|
|
4365
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
4366
4366
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
4367
4367
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
4368
4368
|
),
|
|
@@ -4388,7 +4388,7 @@ function Toolbar(p) {
|
|
|
4388
4388
|
{
|
|
4389
4389
|
ref: attachOverflow,
|
|
4390
4390
|
"data-pptx-chrome": "ribbon-content",
|
|
4391
|
-
className:
|
|
4391
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
4392
4392
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
4393
4393
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
4394
4394
|
// children are this row's flex items too and must not shrink (a shrunk
|
|
@@ -5241,7 +5241,7 @@ function DrawingOverlaySvg({
|
|
|
5241
5241
|
onPointerDown,
|
|
5242
5242
|
onPointerMove,
|
|
5243
5243
|
onPointerUp,
|
|
5244
|
-
children: isStrokeActive && liveStrokeView ?
|
|
5244
|
+
children: isStrokeActive && liveStrokeView ? chunk355ICDU6_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5245
5245
|
"path",
|
|
5246
5246
|
{
|
|
5247
5247
|
d: liveStrokeD,
|
|
@@ -5256,7 +5256,7 @@ function DrawingOverlaySvg({
|
|
|
5256
5256
|
}
|
|
5257
5257
|
);
|
|
5258
5258
|
}
|
|
5259
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
5259
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkXRFJ7TAF_js.GRID_SIZE, visible }) {
|
|
5260
5260
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
5261
5261
|
const patternId = React97.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
5262
5262
|
if (!visible) {
|
|
@@ -5820,7 +5820,7 @@ function PictureCropOverlay({
|
|
|
5820
5820
|
};
|
|
5821
5821
|
};
|
|
5822
5822
|
const { ghost, frame, handles } = overlay;
|
|
5823
|
-
const src =
|
|
5823
|
+
const src = chunk355ICDU6_js.imgSrc(element);
|
|
5824
5824
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5825
5825
|
"div",
|
|
5826
5826
|
{
|
|
@@ -6233,10 +6233,10 @@ function SelectionHandleOverlay({
|
|
|
6233
6233
|
position: "absolute",
|
|
6234
6234
|
left: element.x,
|
|
6235
6235
|
top: element.y,
|
|
6236
|
-
width: Math.max(element.width,
|
|
6237
|
-
height: Math.max(element.height,
|
|
6238
|
-
["--pptx-selection-width"]: `${Math.max(element.width,
|
|
6239
|
-
["--pptx-selection-height"]: `${Math.max(element.height,
|
|
6236
|
+
width: Math.max(element.width, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE),
|
|
6237
|
+
height: Math.max(element.height, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE),
|
|
6238
|
+
["--pptx-selection-width"]: `${Math.max(element.width, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE)}px`,
|
|
6239
|
+
["--pptx-selection-height"]: `${Math.max(element.height, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE)}px`,
|
|
6240
6240
|
// Every slide element carries an explicit numeric `zIndex` (see
|
|
6241
6241
|
// `getContainerStyle`), so a sibling with no z-index at all paints
|
|
6242
6242
|
// at the CSS "z-index: 0" level regardless of DOM order: any
|
|
@@ -6248,7 +6248,7 @@ function SelectionHandleOverlay({
|
|
|
6248
6248
|
// (marquee z-50, connector overlay z-55/56) to match, well clear of
|
|
6249
6249
|
// any realistic per-slide element count.
|
|
6250
6250
|
zIndex: 58,
|
|
6251
|
-
transform:
|
|
6251
|
+
transform: chunkXRFJ7TAF_js.getElementTransform(element),
|
|
6252
6252
|
transformOrigin: "center",
|
|
6253
6253
|
// Transparent everywhere a handle button is not, so a click that
|
|
6254
6254
|
// misses every handle still reaches the shape (or whatever is
|
|
@@ -6260,14 +6260,14 @@ function SelectionHandleOverlay({
|
|
|
6260
6260
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
6261
6261
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
6262
6262
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6263
|
-
|
|
6263
|
+
chunk355ICDU6_js.ResizeHandles,
|
|
6264
6264
|
{
|
|
6265
6265
|
elementId: element.id,
|
|
6266
6266
|
adjustmentHandles,
|
|
6267
6267
|
onResizePointerDown,
|
|
6268
6268
|
onAdjustmentPointerDown,
|
|
6269
6269
|
rotation: element.rotation,
|
|
6270
|
-
nonRotationTransform:
|
|
6270
|
+
nonRotationTransform: chunkXRFJ7TAF_js.getElementTransformWithoutRotation(element),
|
|
6271
6271
|
onRotate: allow.rotatable ? onRotate : void 0,
|
|
6272
6272
|
forcePointerEvents: true
|
|
6273
6273
|
}
|
|
@@ -6970,7 +6970,7 @@ function SlideCanvas(props) {
|
|
|
6970
6970
|
props.registerInlineEditReader
|
|
6971
6971
|
]
|
|
6972
6972
|
);
|
|
6973
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6973
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
6974
6974
|
}
|
|
6975
6975
|
function SlideCanvasContent({
|
|
6976
6976
|
imagePaste,
|
|
@@ -7211,6 +7211,8 @@ function SlideCanvasContent({
|
|
|
7211
7211
|
width: canvasSize.width,
|
|
7212
7212
|
height: canvasSize.height,
|
|
7213
7213
|
transform: `scale(${zoom.editorScale})`,
|
|
7214
|
+
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
7215
|
+
...pptx.deviceStrokeStageStyle(zoom.editorScale),
|
|
7214
7216
|
transformOrigin: "top left",
|
|
7215
7217
|
["--pptx-handle-inverse-scale"]: 1 / zoom.editorScale,
|
|
7216
7218
|
// Motion-path keyframes translate by a fraction of the SLIDE, so
|
|
@@ -7237,7 +7239,7 @@ function SlideCanvasContent({
|
|
|
7237
7239
|
onPointerMove: handleStagePointerMove,
|
|
7238
7240
|
onPointerUp: handleStagePointerUp,
|
|
7239
7241
|
children: [
|
|
7240
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7242
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
7241
7243
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
7242
7244
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
7243
7245
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7249,7 +7251,7 @@ function SlideCanvasContent({
|
|
|
7249
7251
|
}
|
|
7250
7252
|
),
|
|
7251
7253
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7252
|
-
|
|
7254
|
+
chunk355ICDU6_js.ElementRenderer,
|
|
7253
7255
|
{
|
|
7254
7256
|
element,
|
|
7255
7257
|
activeSlide,
|
|
@@ -7271,7 +7273,7 @@ function SlideCanvasContent({
|
|
|
7271
7273
|
),
|
|
7272
7274
|
renderInk: false,
|
|
7273
7275
|
renderGroups: true,
|
|
7274
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7276
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkXRFJ7TAF_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7275
7277
|
onResizePointerDown: stableResizePointerDown,
|
|
7276
7278
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7277
7279
|
onRotate: stableRotate,
|
|
@@ -7293,7 +7295,7 @@ function SlideCanvasContent({
|
|
|
7293
7295
|
`tpl-${element.id}`
|
|
7294
7296
|
)),
|
|
7295
7297
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7296
|
-
|
|
7298
|
+
chunk355ICDU6_js.ElementRenderer,
|
|
7297
7299
|
{
|
|
7298
7300
|
element,
|
|
7299
7301
|
activeSlide,
|
|
@@ -7315,7 +7317,7 @@ function SlideCanvasContent({
|
|
|
7315
7317
|
),
|
|
7316
7318
|
renderInk: true,
|
|
7317
7319
|
renderGroups: true,
|
|
7318
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7320
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkXRFJ7TAF_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7319
7321
|
onResizePointerDown: stableResizePointerDown,
|
|
7320
7322
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7321
7323
|
onRotate: stableRotate,
|
|
@@ -7359,7 +7361,7 @@ function SlideCanvasContent({
|
|
|
7359
7361
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7360
7362
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
7361
7363
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7362
|
-
|
|
7364
|
+
chunk355ICDU6_js.ElementRenderer,
|
|
7363
7365
|
{
|
|
7364
7366
|
element: editingMember.member,
|
|
7365
7367
|
activeSlide,
|
|
@@ -7394,11 +7396,11 @@ function SlideCanvasContent({
|
|
|
7394
7396
|
`group-member-edit-${editingMember.member.id}`
|
|
7395
7397
|
)
|
|
7396
7398
|
] }),
|
|
7397
|
-
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !
|
|
7399
|
+
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !chunkXRFJ7TAF_js.isConnectorOrLineElement(selectedElement) && outlineAuthoring?.editPointsElementId !== selectedElement.id && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7398
7400
|
SelectionHandleOverlay,
|
|
7399
7401
|
{
|
|
7400
7402
|
element: selectedElement,
|
|
7401
|
-
adjustmentHandles:
|
|
7403
|
+
adjustmentHandles: chunkXRFJ7TAF_js.getShapeAdjustmentHandleDescriptors(selectedElement),
|
|
7402
7404
|
onResizePointerDown: stableResizePointerDown,
|
|
7403
7405
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7404
7406
|
onRotate: stableRotate,
|
|
@@ -7512,7 +7514,7 @@ function LoadingState({ className }) {
|
|
|
7512
7514
|
role: "status",
|
|
7513
7515
|
"aria-live": "polite",
|
|
7514
7516
|
"aria-atomic": "true",
|
|
7515
|
-
className:
|
|
7517
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7516
7518
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
7517
7519
|
className
|
|
7518
7520
|
),
|
|
@@ -7535,7 +7537,7 @@ function ErrorState({ className, error }) {
|
|
|
7535
7537
|
{
|
|
7536
7538
|
role: "alert",
|
|
7537
7539
|
"aria-live": "assertive",
|
|
7538
|
-
className:
|
|
7540
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7539
7541
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
7540
7542
|
className
|
|
7541
7543
|
),
|
|
@@ -7566,7 +7568,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
7566
7568
|
}
|
|
7567
7569
|
)
|
|
7568
7570
|
] }),
|
|
7569
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
7571
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunkXRFJ7TAF_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7570
7572
|
"div",
|
|
7571
7573
|
{
|
|
7572
7574
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -7626,14 +7628,14 @@ function AccessibilityPanel({
|
|
|
7626
7628
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
7627
7629
|
"aria-checked": reducedMotion ?? false,
|
|
7628
7630
|
onClick: onToggleReducedMotion,
|
|
7629
|
-
className:
|
|
7631
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7630
7632
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
7631
7633
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
7632
7634
|
),
|
|
7633
7635
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7634
7636
|
"span",
|
|
7635
7637
|
{
|
|
7636
|
-
className:
|
|
7638
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7637
7639
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
7638
7640
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
7639
7641
|
)
|
|
@@ -7652,7 +7654,7 @@ function AccessibilityPanel({
|
|
|
7652
7654
|
"div",
|
|
7653
7655
|
{
|
|
7654
7656
|
role: "listitem",
|
|
7655
|
-
className:
|
|
7657
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7656
7658
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
7657
7659
|
/* Severity-based background and text colouring */
|
|
7658
7660
|
issue.severity === "error" ? "bg-red-900/30 text-red-300" : issue.severity === "warning" ? "bg-amber-900/30 text-amber-300" : "bg-muted/50 text-muted-foreground"
|
|
@@ -7812,7 +7814,7 @@ function ResizeHandle({
|
|
|
7812
7814
|
{
|
|
7813
7815
|
role: "separator",
|
|
7814
7816
|
"aria-orientation": direction,
|
|
7815
|
-
className:
|
|
7817
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7816
7818
|
// Outer container: generous hit area for easy clicking.
|
|
7817
7819
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
7818
7820
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -7823,7 +7825,7 @@ function ResizeHandle({
|
|
|
7823
7825
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7824
7826
|
"div",
|
|
7825
7827
|
{
|
|
7826
|
-
className:
|
|
7828
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
7827
7829
|
"absolute transition-colors",
|
|
7828
7830
|
direction === "horizontal" ? "top-0 bottom-0 left-1/2 -translate-x-1/2 w-0.5 group-hover:w-1 group-hover:bg-primary/40 group-active:w-1 group-active:bg-primary/60" : "left-0 right-0 top-1/2 -translate-y-1/2 h-0.5 group-hover:h-1 group-hover:bg-primary/40 group-active:h-1 group-active:bg-primary/60"
|
|
7829
7831
|
)
|
|
@@ -7842,14 +7844,14 @@ function SlideThumbnailImpl({
|
|
|
7842
7844
|
}) {
|
|
7843
7845
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
7844
7846
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
7845
|
-
const width = previewWidth ??
|
|
7847
|
+
const width = previewWidth ?? chunkXRFJ7TAF_js.SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
7846
7848
|
const scale = width / safeCanvasWidth;
|
|
7847
7849
|
const previewHeight = pptx.editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
7848
7850
|
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
7849
7851
|
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
7850
7852
|
const { t } = reactI18next.useTranslation();
|
|
7851
7853
|
const transitionLabel = slide.transition ? (() => {
|
|
7852
|
-
const opt =
|
|
7854
|
+
const opt = chunkXRFJ7TAF_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
7853
7855
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
7854
7856
|
})() : void 0;
|
|
7855
7857
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7871,10 +7873,11 @@ function SlideThumbnailImpl({
|
|
|
7871
7873
|
width: safeCanvasWidth,
|
|
7872
7874
|
height: safeCanvasHeight,
|
|
7873
7875
|
transform: `scale(${scale})`,
|
|
7874
|
-
transformOrigin: "top left"
|
|
7876
|
+
transformOrigin: "top left",
|
|
7877
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
7875
7878
|
},
|
|
7876
7879
|
children: [
|
|
7877
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7880
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.SlideBackgroundImageLayer, { slide }),
|
|
7878
7881
|
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7879
7882
|
"div",
|
|
7880
7883
|
{
|
|
@@ -7884,7 +7887,7 @@ function SlideThumbnailImpl({
|
|
|
7884
7887
|
}
|
|
7885
7888
|
),
|
|
7886
7889
|
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7887
|
-
|
|
7890
|
+
chunk355ICDU6_js.StaticElementRenderer,
|
|
7888
7891
|
{
|
|
7889
7892
|
element,
|
|
7890
7893
|
activeSlide: slide,
|
|
@@ -8440,7 +8443,7 @@ function SectionHeader({
|
|
|
8440
8443
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8441
8444
|
lu.LuChevronDown,
|
|
8442
8445
|
{
|
|
8443
|
-
className:
|
|
8446
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
8444
8447
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
8445
8448
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
8446
8449
|
)
|
|
@@ -8591,7 +8594,7 @@ function LazyThumbnailInner({
|
|
|
8591
8594
|
}
|
|
8592
8595
|
var LazyThumbnail = React97__default.default.memo(LazyThumbnailInner);
|
|
8593
8596
|
function declaredSectionFacts(groups, sectionId) {
|
|
8594
|
-
const declared = groups.filter((group) => group.id !==
|
|
8597
|
+
const declared = groups.filter((group) => group.id !== chunkXRFJ7TAF_js.DEFAULT_SECTION_GROUP_ID && group.id !== chunkXRFJ7TAF_js.UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
8595
8598
|
return {
|
|
8596
8599
|
isDeclared: declared.includes(sectionId),
|
|
8597
8600
|
index: declared.indexOf(sectionId),
|
|
@@ -8676,7 +8679,7 @@ function SlideItemInner({
|
|
|
8676
8679
|
"data-pptx-chrome": "slide-row",
|
|
8677
8680
|
"aria-describedby": cue.labelId,
|
|
8678
8681
|
"data-pptx-slide-hidden": cue.marker,
|
|
8679
|
-
className:
|
|
8682
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
8680
8683
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
8681
8684
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
8682
8685
|
isSelected && !isActive && "bg-accent/20 ring-1 ring-inset ring-primary/50",
|
|
@@ -8698,7 +8701,7 @@ function SlideItemInner({
|
|
|
8698
8701
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8699
8702
|
"span",
|
|
8700
8703
|
{
|
|
8701
|
-
className:
|
|
8704
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
8702
8705
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
8703
8706
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
8704
8707
|
),
|
|
@@ -8721,7 +8724,7 @@ function SlideItemInner({
|
|
|
8721
8724
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8722
8725
|
"div",
|
|
8723
8726
|
{
|
|
8724
|
-
className:
|
|
8727
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
8725
8728
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
8726
8729
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
8727
8730
|
),
|
|
@@ -8920,7 +8923,7 @@ function SlidesPaneSidebar({
|
|
|
8920
8923
|
tableStyleContext
|
|
8921
8924
|
}) {
|
|
8922
8925
|
const { t } = reactI18next.useTranslation();
|
|
8923
|
-
const collab =
|
|
8926
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
8924
8927
|
const slideRefs = React97.useRef(/* @__PURE__ */ new Map());
|
|
8925
8928
|
const renameInputRef = React97.useRef(null);
|
|
8926
8929
|
const slidePresenceMap = React97.useMemo(() => {
|
|
@@ -8945,7 +8948,7 @@ function SlidesPaneSidebar({
|
|
|
8945
8948
|
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
8946
8949
|
[canvasSize.width, canvasSize.height, previewWidth]
|
|
8947
8950
|
);
|
|
8948
|
-
const showSectionHeaders = sectionGroups.some((group) => group.id !==
|
|
8951
|
+
const showSectionHeaders = sectionGroups.some((group) => group.id !== chunkXRFJ7TAF_js.DEFAULT_SECTION_GROUP_ID);
|
|
8949
8952
|
const {
|
|
8950
8953
|
collapsedSections,
|
|
8951
8954
|
renamingSectionId,
|
|
@@ -9015,7 +9018,7 @@ function SlidesPaneSidebar({
|
|
|
9015
9018
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
9016
9019
|
);
|
|
9017
9020
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
9018
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
9021
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunk355ICDU6_js.useVirtualizedSlides({
|
|
9019
9022
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
9020
9023
|
itemHeight: estimatedItemHeight
|
|
9021
9024
|
});
|
|
@@ -9272,7 +9275,7 @@ function HandoutMasterPanel({
|
|
|
9272
9275
|
{
|
|
9273
9276
|
type: "button",
|
|
9274
9277
|
"aria-pressed": slidesPerPage === count,
|
|
9275
|
-
className:
|
|
9278
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
9276
9279
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
9277
9280
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
9278
9281
|
),
|
|
@@ -9390,7 +9393,7 @@ function SlideMastersList({
|
|
|
9390
9393
|
ref: isMasterActive ? activeRef : void 0,
|
|
9391
9394
|
"aria-pressed": isMasterActive,
|
|
9392
9395
|
"aria-label": master.name || t("pptx.master.master"),
|
|
9393
|
-
className:
|
|
9396
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
9394
9397
|
"group relative block w-full cursor-pointer rounded-lg border-2 p-1 text-left transition-all",
|
|
9395
9398
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
9396
9399
|
),
|
|
@@ -9407,7 +9410,7 @@ function SlideMastersList({
|
|
|
9407
9410
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9408
9411
|
"span",
|
|
9409
9412
|
{
|
|
9410
|
-
className:
|
|
9413
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
9411
9414
|
"text-[10px] font-medium",
|
|
9412
9415
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
9413
9416
|
),
|
|
@@ -9426,7 +9429,7 @@ function SlideMastersList({
|
|
|
9426
9429
|
ref: isLayoutActive ? activeRef : void 0,
|
|
9427
9430
|
"aria-pressed": isLayoutActive,
|
|
9428
9431
|
"aria-label": layout.name || t("pptx.master.layout"),
|
|
9429
|
-
className:
|
|
9432
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
9430
9433
|
"group relative block w-full cursor-pointer rounded-md border-2 p-0.5 text-left transition-all",
|
|
9431
9434
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
9432
9435
|
),
|
|
@@ -9443,7 +9446,7 @@ function SlideMastersList({
|
|
|
9443
9446
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9444
9447
|
"span",
|
|
9445
9448
|
{
|
|
9446
|
-
className:
|
|
9449
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
9447
9450
|
"text-[9px]",
|
|
9448
9451
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
9449
9452
|
),
|
|
@@ -9535,7 +9538,7 @@ function MasterViewSidebar({
|
|
|
9535
9538
|
type: "button",
|
|
9536
9539
|
role: "tab",
|
|
9537
9540
|
"aria-selected": masterViewTab === tab.key,
|
|
9538
|
-
className:
|
|
9541
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
9539
9542
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
9540
9543
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
9541
9544
|
),
|
|
@@ -10038,7 +10041,7 @@ function SectionBlock({
|
|
|
10038
10041
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10039
10042
|
lu.LuChevronDown,
|
|
10040
10043
|
{
|
|
10041
|
-
className:
|
|
10044
|
+
className: chunkXRFJ7TAF_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
10042
10045
|
}
|
|
10043
10046
|
),
|
|
10044
10047
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -10087,7 +10090,7 @@ function SlideCardImpl({
|
|
|
10087
10090
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10088
10091
|
"div",
|
|
10089
10092
|
{
|
|
10090
|
-
className:
|
|
10093
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
10091
10094
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
10092
10095
|
isDragTarget ? "border-primary bg-primary/20" : isSelected ? "border-primary bg-primary/10 ring-1 ring-primary/50" : isActive ? "border-primary/50 bg-primary/5" : "border-border bg-background/50 hover:border-border",
|
|
10093
10096
|
slide.hidden && "opacity-40"
|
|
@@ -10110,7 +10113,7 @@ function SlideCardImpl({
|
|
|
10110
10113
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10111
10114
|
"span",
|
|
10112
10115
|
{
|
|
10113
|
-
className:
|
|
10116
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
10114
10117
|
"text-[11px] font-medium px-0.5",
|
|
10115
10118
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
10116
10119
|
),
|
|
@@ -10852,7 +10855,7 @@ function ReadingViewStage({
|
|
|
10852
10855
|
"div",
|
|
10853
10856
|
{
|
|
10854
10857
|
className: "absolute inset-0",
|
|
10855
|
-
style: { backgroundColor:
|
|
10858
|
+
style: { backgroundColor: chunkXRFJ7TAF_js.normalizeHexColor(slide.backgroundColor, "#ffffff") }
|
|
10856
10859
|
}
|
|
10857
10860
|
),
|
|
10858
10861
|
slide.backgroundImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10869,9 +10872,9 @@ function ReadingViewStage({
|
|
|
10869
10872
|
"div",
|
|
10870
10873
|
{
|
|
10871
10874
|
className: "absolute left-0 top-0 origin-top-left",
|
|
10872
|
-
style: { width, height, transform: `scale(${scale})
|
|
10875
|
+
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
10873
10876
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10874
|
-
|
|
10877
|
+
chunk355ICDU6_js.StaticElementRenderer,
|
|
10875
10878
|
{
|
|
10876
10879
|
element,
|
|
10877
10880
|
activeSlide: slide,
|
|
@@ -11083,7 +11086,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11083
11086
|
if (segment.style.fontFamily) {
|
|
11084
11087
|
style.fontFamily = segment.style.fontFamily;
|
|
11085
11088
|
}
|
|
11086
|
-
if (segment.style.hyperlink &&
|
|
11089
|
+
if (segment.style.hyperlink && chunkXRFJ7TAF_js.isUrlSafe(segment.style.hyperlink)) {
|
|
11087
11090
|
const safeHref = segment.style.hyperlink;
|
|
11088
11091
|
style.color = "#4a9eff";
|
|
11089
11092
|
style.textDecoration = "underline";
|
|
@@ -11096,7 +11099,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11096
11099
|
style,
|
|
11097
11100
|
onClick: (e) => {
|
|
11098
11101
|
e.preventDefault();
|
|
11099
|
-
|
|
11102
|
+
chunkXRFJ7TAF_js.safeOpenUrl(safeHref);
|
|
11100
11103
|
},
|
|
11101
11104
|
children: segment.text
|
|
11102
11105
|
},
|
|
@@ -11445,7 +11448,7 @@ function useSlideNotes({
|
|
|
11445
11448
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
11446
11449
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
11447
11450
|
e.preventDefault();
|
|
11448
|
-
|
|
11451
|
+
chunkXRFJ7TAF_js.safeOpenUrl(href);
|
|
11449
11452
|
}
|
|
11450
11453
|
}, []);
|
|
11451
11454
|
return {
|
|
@@ -11526,7 +11529,7 @@ function SlideNotesPanel({
|
|
|
11526
11529
|
});
|
|
11527
11530
|
const hasNotes = draft.trim().length > 0;
|
|
11528
11531
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
11529
|
-
const { dragY, handlers: dragHandlers } =
|
|
11532
|
+
const { dragY, handlers: dragHandlers } = chunk355ICDU6_js.useSheetDismissDrag(onToggle);
|
|
11530
11533
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11531
11534
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11532
11535
|
"button",
|
|
@@ -11542,7 +11545,7 @@ function SlideNotesPanel({
|
|
|
11542
11545
|
{
|
|
11543
11546
|
ref: rootRef,
|
|
11544
11547
|
"data-pptx-chrome": "notes",
|
|
11545
|
-
className:
|
|
11548
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
11546
11549
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
11547
11550
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
11548
11551
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -11906,7 +11909,7 @@ function SlideDiffRow({
|
|
|
11906
11909
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11907
11910
|
"div",
|
|
11908
11911
|
{
|
|
11909
|
-
className:
|
|
11912
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
11910
11913
|
"rounded-lg border transition-colors",
|
|
11911
11914
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
11912
11915
|
),
|
|
@@ -11920,7 +11923,7 @@ function SlideDiffRow({
|
|
|
11920
11923
|
children: [
|
|
11921
11924
|
expanded ? /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronRight, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
|
|
11922
11925
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
11923
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
11926
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkXRFJ7TAF_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
11924
11927
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
11925
11928
|
diff.changes.length,
|
|
11926
11929
|
" ",
|
|
@@ -11930,7 +11933,7 @@ function SlideDiffRow({
|
|
|
11930
11933
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11931
11934
|
"span",
|
|
11932
11935
|
{
|
|
11933
|
-
className:
|
|
11936
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
11934
11937
|
"text-[10px] font-medium",
|
|
11935
11938
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
11936
11939
|
),
|
|
@@ -11958,7 +11961,7 @@ function SlideDiffRow({
|
|
|
11958
11961
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11959
11962
|
"div",
|
|
11960
11963
|
{
|
|
11961
|
-
className:
|
|
11964
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
11962
11965
|
"rounded border overflow-hidden",
|
|
11963
11966
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
11964
11967
|
),
|
|
@@ -12663,7 +12666,7 @@ function DocumentPropertiesDialog({
|
|
|
12663
12666
|
const handleClose = React97.useCallback(() => {
|
|
12664
12667
|
onClose();
|
|
12665
12668
|
}, [onClose]);
|
|
12666
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
12669
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(handleClose);
|
|
12667
12670
|
if (!isOpen) {
|
|
12668
12671
|
return null;
|
|
12669
12672
|
}
|
|
@@ -13260,7 +13263,7 @@ function PresentationSubtitleBar({
|
|
|
13260
13263
|
}) {
|
|
13261
13264
|
const { t } = reactI18next.useTranslation();
|
|
13262
13265
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13263
|
-
pptx.subtitleSettingsFromOptions(
|
|
13266
|
+
pptx.subtitleSettingsFromOptions(chunk355ICDU6_js.useViewerOptionsContext()),
|
|
13264
13267
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13265
13268
|
);
|
|
13266
13269
|
const [captionText, setCaptionText] = React97.useState("");
|
|
@@ -13428,7 +13431,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13428
13431
|
{
|
|
13429
13432
|
className: "absolute inset-0",
|
|
13430
13433
|
style: {
|
|
13431
|
-
backgroundColor:
|
|
13434
|
+
backgroundColor: chunkXRFJ7TAF_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
13432
13435
|
}
|
|
13433
13436
|
}
|
|
13434
13437
|
),
|
|
@@ -13450,10 +13453,11 @@ function ScaledSlidePreviewImpl({
|
|
|
13450
13453
|
width: safeCanvasWidth,
|
|
13451
13454
|
height: safeCanvasHeight,
|
|
13452
13455
|
transform: `scale(${scale})`,
|
|
13453
|
-
transformOrigin: "top left"
|
|
13456
|
+
transformOrigin: "top left",
|
|
13457
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
13454
13458
|
},
|
|
13455
13459
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13456
|
-
|
|
13460
|
+
chunk355ICDU6_js.StaticElementRenderer,
|
|
13457
13461
|
{
|
|
13458
13462
|
element,
|
|
13459
13463
|
activeSlide: slide,
|
|
@@ -14170,7 +14174,7 @@ function getElementDisplayName(element, index) {
|
|
|
14170
14174
|
if (element.name && element.name.trim().length > 0) {
|
|
14171
14175
|
return element.name.trim();
|
|
14172
14176
|
}
|
|
14173
|
-
if ((0,
|
|
14177
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) && element.text && element.text.trim().length > 0) {
|
|
14174
14178
|
return element.text.trim().slice(0, 32);
|
|
14175
14179
|
}
|
|
14176
14180
|
const label = TYPE_LABELS[element.type] ?? "Object";
|
|
@@ -14343,7 +14347,7 @@ function SelectionPane({
|
|
|
14343
14347
|
setDragIndex(null);
|
|
14344
14348
|
setDragOverIndex(null);
|
|
14345
14349
|
},
|
|
14346
|
-
className:
|
|
14350
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14347
14351
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
14348
14352
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
14349
14353
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -14397,13 +14401,13 @@ function SelectionPane({
|
|
|
14397
14401
|
}
|
|
14398
14402
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14399
14403
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14400
|
-
var ENTRANCE_PRESETS =
|
|
14404
|
+
var ENTRANCE_PRESETS = chunkXRFJ7TAF_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14401
14405
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
14402
14406
|
);
|
|
14403
|
-
var EXIT_PRESETS =
|
|
14407
|
+
var EXIT_PRESETS = chunkXRFJ7TAF_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14404
14408
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
14405
14409
|
);
|
|
14406
|
-
var EMPHASIS_PRESETS =
|
|
14410
|
+
var EMPHASIS_PRESETS = chunkXRFJ7TAF_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14407
14411
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
14408
14412
|
);
|
|
14409
14413
|
var TIMING_CURVE_OPTIONS = [
|
|
@@ -14569,7 +14573,7 @@ function AnimationTimelineSection({
|
|
|
14569
14573
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14570
14574
|
"div",
|
|
14571
14575
|
{
|
|
14572
|
-
className:
|
|
14576
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14573
14577
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
14574
14578
|
animationTypeColor(bar.anim),
|
|
14575
14579
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -14598,7 +14602,7 @@ function AnimationTimelineSection({
|
|
|
14598
14602
|
onDragLeave: handleDragLeave,
|
|
14599
14603
|
onDrop: (e) => handleDrop(index, e),
|
|
14600
14604
|
title: t("pptx.animation.nativeEffectHint"),
|
|
14601
|
-
className:
|
|
14605
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14602
14606
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] italic",
|
|
14603
14607
|
"bg-muted/20 text-muted-foreground/70",
|
|
14604
14608
|
isDragOver && "border-t-2 border-primary"
|
|
@@ -14637,7 +14641,7 @@ function AnimationTimelineSection({
|
|
|
14637
14641
|
onDragEnd: handleDragEnd,
|
|
14638
14642
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
14639
14643
|
onMouseLeave: handleAnimationHoverEnd,
|
|
14640
|
-
className:
|
|
14644
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14641
14645
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
14642
14646
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
14643
14647
|
isDragging && "opacity-40",
|
|
@@ -14769,7 +14773,7 @@ function EffectSoundRow({
|
|
|
14769
14773
|
}
|
|
14770
14774
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
14771
14775
|
if (asset) {
|
|
14772
|
-
|
|
14776
|
+
chunk355ICDU6_js.playAnimationSound(asset.dataUrl);
|
|
14773
14777
|
}
|
|
14774
14778
|
};
|
|
14775
14779
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -14944,7 +14948,7 @@ function useAnimationPreview({
|
|
|
14944
14948
|
}) {
|
|
14945
14949
|
const handleAnimationHover = React97.useCallback((anim) => {
|
|
14946
14950
|
if (anim.motionPath) {
|
|
14947
|
-
|
|
14951
|
+
chunkXRFJ7TAF_js.startMotionPathPreview(anim.elementId, anim.motionPath, {
|
|
14948
14952
|
durationMs: anim.durationMs,
|
|
14949
14953
|
delayMs: anim.delayMs,
|
|
14950
14954
|
timingCurve: anim.timingCurve
|
|
@@ -14955,19 +14959,19 @@ function useAnimationPreview({
|
|
|
14955
14959
|
if (!preset || preset === "none") {
|
|
14956
14960
|
return;
|
|
14957
14961
|
}
|
|
14958
|
-
|
|
14962
|
+
chunkXRFJ7TAF_js.startPreviewAnimation(anim.elementId, preset, {
|
|
14959
14963
|
direction: anim.direction,
|
|
14960
14964
|
durationMs: anim.durationMs ?? 500,
|
|
14961
14965
|
timingCurve: anim.timingCurve
|
|
14962
14966
|
});
|
|
14963
14967
|
}, []);
|
|
14964
|
-
const handleAnimationHoverEnd = React97.useCallback(() =>
|
|
14968
|
+
const handleAnimationHoverEnd = React97.useCallback(() => chunkXRFJ7TAF_js.stopPreviewAnimation(), []);
|
|
14965
14969
|
const handlePreviewClick = React97.useCallback(() => {
|
|
14966
14970
|
if (!selectedElementAnimation) {
|
|
14967
14971
|
return;
|
|
14968
14972
|
}
|
|
14969
14973
|
if (selectedElementAnimation.motionPath) {
|
|
14970
|
-
|
|
14974
|
+
chunkXRFJ7TAF_js.startMotionPathPreview(selectedElementId, selectedElementAnimation.motionPath, {
|
|
14971
14975
|
durationMs: selectedElementAnimation.durationMs,
|
|
14972
14976
|
delayMs: selectedElementAnimation.delayMs,
|
|
14973
14977
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -14978,7 +14982,7 @@ function useAnimationPreview({
|
|
|
14978
14982
|
if (!preset || preset === "none") {
|
|
14979
14983
|
return;
|
|
14980
14984
|
}
|
|
14981
|
-
|
|
14985
|
+
chunkXRFJ7TAF_js.startPreviewAnimation(selectedElementId, preset, {
|
|
14982
14986
|
direction: selectedElementAnimation.direction,
|
|
14983
14987
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
14984
14988
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15212,8 +15216,8 @@ function useAnimationHandlers({
|
|
|
15212
15216
|
if (!el) {
|
|
15213
15217
|
return anim.elementId.slice(0, 8);
|
|
15214
15218
|
}
|
|
15215
|
-
const text = (0,
|
|
15216
|
-
return text ||
|
|
15219
|
+
const text = (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? el.text : void 0;
|
|
15220
|
+
return text || chunkXRFJ7TAF_js.getElementLabel(el);
|
|
15217
15221
|
},
|
|
15218
15222
|
[activeSlide.elements]
|
|
15219
15223
|
);
|
|
@@ -15223,8 +15227,8 @@ function useAnimationHandlers({
|
|
|
15223
15227
|
if (!el) {
|
|
15224
15228
|
return id.slice(0, 8);
|
|
15225
15229
|
}
|
|
15226
|
-
const text = (0,
|
|
15227
|
-
return text ||
|
|
15230
|
+
const text = (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? el.text : void 0;
|
|
15231
|
+
return text || chunkXRFJ7TAF_js.getElementLabel(el);
|
|
15228
15232
|
}).join(", "),
|
|
15229
15233
|
[activeSlide.elements]
|
|
15230
15234
|
);
|
|
@@ -15281,7 +15285,7 @@ function AnimationPanel({
|
|
|
15281
15285
|
onUpdateSlide
|
|
15282
15286
|
}) {
|
|
15283
15287
|
const { t } = reactI18next.useTranslation();
|
|
15284
|
-
const { viewportWidth } =
|
|
15288
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
15285
15289
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15286
15290
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15287
15291
|
const handlers = useAnimationHandlers({
|
|
@@ -15409,7 +15413,7 @@ function AnimationPanel({
|
|
|
15409
15413
|
type: "button",
|
|
15410
15414
|
disabled: !canEdit,
|
|
15411
15415
|
style: { minWidth: directionBtnPx, minHeight: directionBtnPx },
|
|
15412
|
-
className:
|
|
15416
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
15413
15417
|
"flex items-center justify-center rounded border transition-colors",
|
|
15414
15418
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
15415
15419
|
),
|
|
@@ -15487,7 +15491,7 @@ function AnimationPanel({
|
|
|
15487
15491
|
style: fieldStyle,
|
|
15488
15492
|
children: [
|
|
15489
15493
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
15490
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
15494
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunkXRFJ7TAF_js.getElementLabel(el) }, el.id))
|
|
15491
15495
|
]
|
|
15492
15496
|
}
|
|
15493
15497
|
)
|
|
@@ -15635,7 +15639,7 @@ function ActionTargetFields({
|
|
|
15635
15639
|
type: "text",
|
|
15636
15640
|
disabled: !canEdit,
|
|
15637
15641
|
"aria-label": t(urlLabelKey),
|
|
15638
|
-
className:
|
|
15642
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-full"),
|
|
15639
15643
|
placeholder: "https://...",
|
|
15640
15644
|
value: url ?? "",
|
|
15641
15645
|
onChange: (e) => onChange({ url: e.target.value })
|
|
@@ -15649,7 +15653,7 @@ function ActionTargetFields({
|
|
|
15649
15653
|
type: "number",
|
|
15650
15654
|
disabled: !canEdit,
|
|
15651
15655
|
"aria-label": t("pptx.action.gotoSlide"),
|
|
15652
|
-
className:
|
|
15656
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-full"),
|
|
15653
15657
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
15654
15658
|
min: 1,
|
|
15655
15659
|
max: slideCount,
|
|
@@ -15671,7 +15675,7 @@ function ActionTargetFields({
|
|
|
15671
15675
|
"data-testid": "pptx-action-custom-show",
|
|
15672
15676
|
disabled: !canEdit,
|
|
15673
15677
|
"aria-label": t("pptx.hyperlink.customShowLabel"),
|
|
15674
|
-
className:
|
|
15678
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-full"),
|
|
15675
15679
|
value: customShowId ?? "",
|
|
15676
15680
|
onChange: (e) => onChange({ customShowId: e.target.value, returnAfter }),
|
|
15677
15681
|
children: [
|
|
@@ -15704,11 +15708,11 @@ function ActionSettingsPanel({
|
|
|
15704
15708
|
onUpdateElement
|
|
15705
15709
|
}) {
|
|
15706
15710
|
const { t } = reactI18next.useTranslation();
|
|
15707
|
-
const clickAction = selectedElement.actionClick ? (0,
|
|
15708
|
-
const hoverAction = selectedElement.actionHover ? (0,
|
|
15711
|
+
const clickAction = selectedElement.actionClick ? (0, chunkXRFJ7TAF_js.dist_exports.pptxActionToElementAction)(selectedElement.actionClick, "click") : void 0;
|
|
15712
|
+
const hoverAction = selectedElement.actionHover ? (0, chunkXRFJ7TAF_js.dist_exports.pptxActionToElementAction)(selectedElement.actionHover, "hover") : void 0;
|
|
15709
15713
|
const updateAction = (trigger, type, patch) => {
|
|
15710
15714
|
const ea = { trigger, type, ...patch };
|
|
15711
|
-
const pa = (0,
|
|
15715
|
+
const pa = (0, chunkXRFJ7TAF_js.dist_exports.elementActionToPptxAction)(ea);
|
|
15712
15716
|
if (trigger === "click") {
|
|
15713
15717
|
onUpdateElement({ actionClick: pa });
|
|
15714
15718
|
} else {
|
|
@@ -15793,7 +15797,7 @@ function ActionTriggerSection({
|
|
|
15793
15797
|
{
|
|
15794
15798
|
disabled: !canEdit,
|
|
15795
15799
|
"aria-label": label,
|
|
15796
|
-
className:
|
|
15800
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-full"),
|
|
15797
15801
|
value: effectiveType,
|
|
15798
15802
|
onChange: (e) => changeType(e.target.value),
|
|
15799
15803
|
children: pptx.ELEMENT_ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.labelKey) }, o.value))
|
|
@@ -16181,7 +16185,7 @@ function ChartDataGrid({
|
|
|
16181
16185
|
}) {
|
|
16182
16186
|
const { t } = reactI18next.useTranslation();
|
|
16183
16187
|
const highlightRef = React97.useRef(null);
|
|
16184
|
-
const { viewportWidth } =
|
|
16188
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
16185
16189
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
16186
16190
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
16187
16191
|
const rowHeaderClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10 bg-card" : "";
|
|
@@ -17538,8 +17542,8 @@ function ChartUserShapeOptions({
|
|
|
17538
17542
|
}
|
|
17539
17543
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17540
17544
|
const chartData = selectedElement.chartData;
|
|
17541
|
-
const followDataPoint =
|
|
17542
|
-
const { selection: partSelection } =
|
|
17545
|
+
const followDataPoint = chunk355ICDU6_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17546
|
+
const { selection: partSelection } = chunk355ICDU6_js.useChartPartSelection();
|
|
17543
17547
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17544
17548
|
const title = chartData?.title;
|
|
17545
17549
|
const chartType = chartData?.chartType;
|
|
@@ -17753,40 +17757,40 @@ function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
|
17753
17757
|
[chartData, selectedElement, replaceChartData]
|
|
17754
17758
|
);
|
|
17755
17759
|
const setAxisLogScale = React97.useCallback(
|
|
17756
|
-
(axisType, opts) => applyChartOp((el) => (0,
|
|
17760
|
+
(axisType, opts) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartAxisLogScale)(el, axisType, opts)),
|
|
17757
17761
|
[applyChartOp]
|
|
17758
17762
|
);
|
|
17759
17763
|
const setAxisTitleStyle = React97.useCallback(
|
|
17760
|
-
(axisType, edit) => applyChartOp((el) => (0,
|
|
17764
|
+
(axisType, edit) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartAxisTitleStyle)(el, axisType, edit)),
|
|
17761
17765
|
[applyChartOp]
|
|
17762
17766
|
);
|
|
17763
17767
|
const setGridlineStyle = React97.useCallback(
|
|
17764
|
-
(axisType, which, edit) => applyChartOp((el) => (0,
|
|
17768
|
+
(axisType, which, edit) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartAxisGridlineStyle)(el, axisType, which, edit)),
|
|
17765
17769
|
[applyChartOp]
|
|
17766
17770
|
);
|
|
17767
17771
|
const setSeriesMarker = React97.useCallback(
|
|
17768
|
-
(index, marker) => applyChartOp((el) => (0,
|
|
17772
|
+
(index, marker) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartSeriesMarker)(el, index, marker)),
|
|
17769
17773
|
[applyChartOp]
|
|
17770
17774
|
);
|
|
17771
17775
|
const setSeriesType = React97.useCallback(
|
|
17772
|
-
(index, seriesType) => applyChartOp((el) => (0,
|
|
17776
|
+
(index, seriesType) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartSeriesChartType)(el, index, seriesType)),
|
|
17773
17777
|
[applyChartOp]
|
|
17774
17778
|
);
|
|
17775
17779
|
const setPointFill = React97.useCallback(
|
|
17776
|
-
(seriesIndex, pointIndex, color) => applyChartOp((el) => (0,
|
|
17780
|
+
(seriesIndex, pointIndex, color) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartDataPointFill)(el, seriesIndex, pointIndex, color)),
|
|
17777
17781
|
[applyChartOp]
|
|
17778
17782
|
);
|
|
17779
17783
|
const setPointExplosion = React97.useCallback(
|
|
17780
|
-
(seriesIndex, pointIndex, explosion) => applyChartOp((el) => (0,
|
|
17784
|
+
(seriesIndex, pointIndex, explosion) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartDataPointExplosion)(el, seriesIndex, pointIndex, explosion)),
|
|
17781
17785
|
[applyChartOp]
|
|
17782
17786
|
);
|
|
17783
17787
|
const setPointMarker = React97.useCallback(
|
|
17784
|
-
(seriesIndex, pointIndex, marker) => applyChartOp((el) => (0,
|
|
17788
|
+
(seriesIndex, pointIndex, marker) => applyChartOp((el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartDataPointMarker)(el, seriesIndex, pointIndex, marker)),
|
|
17785
17789
|
[applyChartOp]
|
|
17786
17790
|
);
|
|
17787
17791
|
const setPointLabel = React97.useCallback(
|
|
17788
17792
|
(seriesIndex, pointIndex, text) => applyChartOp(
|
|
17789
|
-
(el) => (0,
|
|
17793
|
+
(el) => (0, chunkXRFJ7TAF_js.dist_exports.setChartDataPointLabel)(el, seriesIndex, pointIndex, text !== null ? { text } : null)
|
|
17790
17794
|
),
|
|
17791
17795
|
[applyChartOp]
|
|
17792
17796
|
);
|
|
@@ -18054,17 +18058,17 @@ function OleEditorDialog({
|
|
|
18054
18058
|
const kind = descriptor.contentTab.kind;
|
|
18055
18059
|
const load = async () => {
|
|
18056
18060
|
if (kind === "sheet") {
|
|
18057
|
-
const value = await (0,
|
|
18061
|
+
const value = await (0, chunkXRFJ7TAF_js.dist_exports.getOleSheetGrid)(element);
|
|
18058
18062
|
if (!cancelled) {
|
|
18059
18063
|
setGrid(value);
|
|
18060
18064
|
}
|
|
18061
18065
|
} else if (kind === "document") {
|
|
18062
|
-
const value = await (0,
|
|
18066
|
+
const value = await (0, chunkXRFJ7TAF_js.dist_exports.getOleDocumentParagraphs)(element);
|
|
18063
18067
|
if (!cancelled) {
|
|
18064
18068
|
setParagraphs(value);
|
|
18065
18069
|
}
|
|
18066
18070
|
} else if (kind === "deck") {
|
|
18067
|
-
const value = await (0,
|
|
18071
|
+
const value = await (0, chunkXRFJ7TAF_js.dist_exports.getOleNestedDeckDetail)(element);
|
|
18068
18072
|
if (!cancelled) {
|
|
18069
18073
|
setDeckSlides(value);
|
|
18070
18074
|
}
|
|
@@ -18090,9 +18094,9 @@ function OleEditorDialog({
|
|
|
18090
18094
|
const handleCellEdit = React97.useCallback(
|
|
18091
18095
|
async (row, col, value) => {
|
|
18092
18096
|
try {
|
|
18093
|
-
const updated = await (0,
|
|
18097
|
+
const updated = await (0, chunkXRFJ7TAF_js.dist_exports.applyOleSheetCellEdit)(element, { row, col, value });
|
|
18094
18098
|
commit(updated);
|
|
18095
|
-
const refreshed = await (0,
|
|
18099
|
+
const refreshed = await (0, chunkXRFJ7TAF_js.dist_exports.getOleSheetGrid)(updated);
|
|
18096
18100
|
if (mountedRef.current) {
|
|
18097
18101
|
setGrid(refreshed);
|
|
18098
18102
|
}
|
|
@@ -18107,9 +18111,9 @@ function OleEditorDialog({
|
|
|
18107
18111
|
const handleParagraphEdit = React97.useCallback(
|
|
18108
18112
|
async (index, text) => {
|
|
18109
18113
|
try {
|
|
18110
|
-
const updated = await (0,
|
|
18114
|
+
const updated = await (0, chunkXRFJ7TAF_js.dist_exports.applyOleDocumentParagraphEdit)(element, index, text);
|
|
18111
18115
|
commit(updated);
|
|
18112
|
-
const refreshed = await (0,
|
|
18116
|
+
const refreshed = await (0, chunkXRFJ7TAF_js.dist_exports.getOleDocumentParagraphs)(updated);
|
|
18113
18117
|
if (mountedRef.current) {
|
|
18114
18118
|
setParagraphs(refreshed);
|
|
18115
18119
|
}
|
|
@@ -18124,14 +18128,14 @@ function OleEditorDialog({
|
|
|
18124
18128
|
const handleDeckElementEdit = React97.useCallback(
|
|
18125
18129
|
async (slideIndex, deckElementId, text) => {
|
|
18126
18130
|
try {
|
|
18127
|
-
const updated = await (0,
|
|
18131
|
+
const updated = await (0, chunkXRFJ7TAF_js.dist_exports.applyOleNestedDeckElementTextEdit)(
|
|
18128
18132
|
element,
|
|
18129
18133
|
slideIndex,
|
|
18130
18134
|
deckElementId,
|
|
18131
18135
|
text
|
|
18132
18136
|
);
|
|
18133
18137
|
commit(updated);
|
|
18134
|
-
const refreshed = await (0,
|
|
18138
|
+
const refreshed = await (0, chunkXRFJ7TAF_js.dist_exports.getOleNestedDeckDetail)(updated);
|
|
18135
18139
|
if (mountedRef.current) {
|
|
18136
18140
|
setDeckSlides(refreshed);
|
|
18137
18141
|
}
|
|
@@ -18147,7 +18151,7 @@ function OleEditorDialog({
|
|
|
18147
18151
|
async (file) => {
|
|
18148
18152
|
try {
|
|
18149
18153
|
const bytes = new Uint8Array(await file.arrayBuffer());
|
|
18150
|
-
const updated = await (0,
|
|
18154
|
+
const updated = await (0, chunkXRFJ7TAF_js.dist_exports.replaceOleFile)(element, bytes, file.name);
|
|
18151
18155
|
commit(updated);
|
|
18152
18156
|
if (mountedRef.current) {
|
|
18153
18157
|
onClose();
|
|
@@ -18296,7 +18300,7 @@ function ConnectorArrowsSection({
|
|
|
18296
18300
|
},
|
|
18297
18301
|
disabled: !canEdit,
|
|
18298
18302
|
className: SELECT_CLS2,
|
|
18299
|
-
children:
|
|
18303
|
+
children: chunkXRFJ7TAF_js.CONNECTOR_ARROW_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18300
18304
|
}
|
|
18301
18305
|
)
|
|
18302
18306
|
] }, end);
|
|
@@ -18320,7 +18324,7 @@ function ConnectorArrowsSection({
|
|
|
18320
18324
|
},
|
|
18321
18325
|
disabled: !canEdit,
|
|
18322
18326
|
className: SELECT_CLS2,
|
|
18323
|
-
children:
|
|
18327
|
+
children: chunkXRFJ7TAF_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18324
18328
|
}
|
|
18325
18329
|
)
|
|
18326
18330
|
] }),
|
|
@@ -18339,7 +18343,7 @@ function ConnectorArrowsSection({
|
|
|
18339
18343
|
},
|
|
18340
18344
|
disabled: !canEdit,
|
|
18341
18345
|
className: SELECT_CLS2,
|
|
18342
|
-
children:
|
|
18346
|
+
children: chunkXRFJ7TAF_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18343
18347
|
}
|
|
18344
18348
|
)
|
|
18345
18349
|
] })
|
|
@@ -18419,7 +18423,7 @@ function OlePropertiesPanel({
|
|
|
18419
18423
|
] }),
|
|
18420
18424
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18421
18425
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.type") }),
|
|
18422
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground truncate", children: (0,
|
|
18426
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground truncate", children: (0, chunkXRFJ7TAF_js.dist_exports.getOleObjectTypeLabel)(ole.oleObjectType) })
|
|
18423
18427
|
] }),
|
|
18424
18428
|
ole.fileName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18425
18429
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.fileName") }),
|
|
@@ -18430,7 +18434,7 @@ function OlePropertiesPanel({
|
|
|
18430
18434
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18431
18435
|
"span",
|
|
18432
18436
|
{
|
|
18433
|
-
className:
|
|
18437
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
18434
18438
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
18435
18439
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
18436
18440
|
),
|
|
@@ -18498,7 +18502,7 @@ function LayerOrderButtons({
|
|
|
18498
18502
|
"button",
|
|
18499
18503
|
{
|
|
18500
18504
|
type: "button",
|
|
18501
|
-
className:
|
|
18505
|
+
className: chunkXRFJ7TAF_js.cn("flex-1", BTN2),
|
|
18502
18506
|
disabled: !canEdit,
|
|
18503
18507
|
onClick: () => onMoveLayer("forward"),
|
|
18504
18508
|
children: "\u2191 Forward"
|
|
@@ -18508,7 +18512,7 @@ function LayerOrderButtons({
|
|
|
18508
18512
|
"button",
|
|
18509
18513
|
{
|
|
18510
18514
|
type: "button",
|
|
18511
|
-
className:
|
|
18515
|
+
className: chunkXRFJ7TAF_js.cn("flex-1", BTN2),
|
|
18512
18516
|
disabled: !canEdit,
|
|
18513
18517
|
onClick: () => onMoveLayer("backward"),
|
|
18514
18518
|
children: "\u2193 Backward"
|
|
@@ -18532,7 +18536,7 @@ function ArtisticEffectsGallery({
|
|
|
18532
18536
|
{
|
|
18533
18537
|
type: "button",
|
|
18534
18538
|
disabled: !canEdit,
|
|
18535
|
-
className:
|
|
18539
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
18536
18540
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
18537
18541
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
18538
18542
|
),
|
|
@@ -18594,7 +18598,7 @@ function ColorChangeSection({
|
|
|
18594
18598
|
DebouncedColorInput,
|
|
18595
18599
|
{
|
|
18596
18600
|
disabled: !canEdit,
|
|
18597
|
-
value:
|
|
18601
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
18598
18602
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18599
18603
|
onCommit: (hex) => updateEffects({
|
|
18600
18604
|
clrChange: {
|
|
@@ -18612,7 +18616,7 @@ function ColorChangeSection({
|
|
|
18612
18616
|
DebouncedColorInput,
|
|
18613
18617
|
{
|
|
18614
18618
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
18615
|
-
value:
|
|
18619
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
18616
18620
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18617
18621
|
onCommit: (hex) => updateEffects({
|
|
18618
18622
|
clrChange: {
|
|
@@ -18672,7 +18676,7 @@ function ColorWashSection({
|
|
|
18672
18676
|
DebouncedColorInput,
|
|
18673
18677
|
{
|
|
18674
18678
|
disabled: !canEdit,
|
|
18675
|
-
value:
|
|
18679
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
18676
18680
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18677
18681
|
onCommit: (hex) => updateEffects({
|
|
18678
18682
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -18775,8 +18779,8 @@ function DuotonePanel({
|
|
|
18775
18779
|
}
|
|
18776
18780
|
});
|
|
18777
18781
|
}, [effects, onUpdateElement]);
|
|
18778
|
-
const shadowColor =
|
|
18779
|
-
const highlightColor =
|
|
18782
|
+
const shadowColor = chunkXRFJ7TAF_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
18783
|
+
const highlightColor = chunkXRFJ7TAF_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
18780
18784
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
18781
18785
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
18782
18786
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -18807,7 +18811,7 @@ function DuotonePanel({
|
|
|
18807
18811
|
] }),
|
|
18808
18812
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
18809
18813
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
18810
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
18814
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunk355ICDU6_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18811
18815
|
"button",
|
|
18812
18816
|
{
|
|
18813
18817
|
type: "button",
|
|
@@ -18945,7 +18949,7 @@ function ImageCropSection({
|
|
|
18945
18949
|
onUpdateElement
|
|
18946
18950
|
}) {
|
|
18947
18951
|
const { t } = reactI18next.useTranslation();
|
|
18948
|
-
if (!(0,
|
|
18952
|
+
if (!(0, chunkXRFJ7TAF_js.dist_exports.isImageLikeElement)(selectedElement)) {
|
|
18949
18953
|
return null;
|
|
18950
18954
|
}
|
|
18951
18955
|
const croppable = pptx.cropResetState(selectedElement, canEdit, true).enabled;
|
|
@@ -18962,7 +18966,7 @@ function ImageCropSection({
|
|
|
18962
18966
|
max: MAX_CROP_PERCENT,
|
|
18963
18967
|
disabled: !croppable,
|
|
18964
18968
|
className: "accent-primary",
|
|
18965
|
-
value: Math.round(
|
|
18969
|
+
value: Math.round(chunkXRFJ7TAF_js.clampCropValue(selectedElement[key]) * 100),
|
|
18966
18970
|
onChange: (e) => onUpdateElement({
|
|
18967
18971
|
[key]: Number(e.target.value) / 100
|
|
18968
18972
|
})
|
|
@@ -19026,7 +19030,7 @@ function ImagePropertiesPanel({
|
|
|
19026
19030
|
{
|
|
19027
19031
|
rows: 2,
|
|
19028
19032
|
disabled: !canEdit,
|
|
19029
|
-
className:
|
|
19033
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
19030
19034
|
value: selectedElement.altText ?? "",
|
|
19031
19035
|
onChange: (e) => onUpdateElement({
|
|
19032
19036
|
altText: e.target.value
|
|
@@ -19966,7 +19970,7 @@ function AccessibilityTextSection({
|
|
|
19966
19970
|
rows: 2,
|
|
19967
19971
|
disabled: !canEdit,
|
|
19968
19972
|
placeholder: t("pptx.elementAccessibility.altTextPlaceholder"),
|
|
19969
|
-
className:
|
|
19973
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
19970
19974
|
value: fields.altText,
|
|
19971
19975
|
onChange: (e) => onUpdateElement({ altText: e.target.value })
|
|
19972
19976
|
}
|
|
@@ -19980,7 +19984,7 @@ function AccessibilityTextSection({
|
|
|
19980
19984
|
type: "text",
|
|
19981
19985
|
disabled: !canEdit,
|
|
19982
19986
|
placeholder: t("pptx.elementAccessibility.titlePlaceholder"),
|
|
19983
|
-
className:
|
|
19987
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "text-[11px]"),
|
|
19984
19988
|
value: fields.title,
|
|
19985
19989
|
onChange: (e) => onUpdateElement({ title: e.target.value })
|
|
19986
19990
|
}
|
|
@@ -20096,7 +20100,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20096
20100
|
angle = (Math.atan2(offsetY, offsetX) * 180 / Math.PI + 360) % 360;
|
|
20097
20101
|
}
|
|
20098
20102
|
return {
|
|
20099
|
-
shadowColor:
|
|
20103
|
+
shadowColor: chunkXRFJ7TAF_js.normalizeHexColor(s?.shadowColor, "#000000"),
|
|
20100
20104
|
shadowOpacity: s?.shadowOpacity ?? 0.35,
|
|
20101
20105
|
shadowBlur: s?.shadowBlur ?? 6,
|
|
20102
20106
|
shadowAngle: angle,
|
|
@@ -20112,7 +20116,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20112
20116
|
key: "sc",
|
|
20113
20117
|
label: "Shadow Color",
|
|
20114
20118
|
type: "color",
|
|
20115
|
-
read: (s) =>
|
|
20119
|
+
read: (s) => chunkXRFJ7TAF_js.normalizeHexColor(s?.shadowColor, "#000000"),
|
|
20116
20120
|
write: (v) => ({ shadowColor: String(v) })
|
|
20117
20121
|
},
|
|
20118
20122
|
{
|
|
@@ -20248,7 +20252,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20248
20252
|
label: "Inner Shadow",
|
|
20249
20253
|
isOn: (s) => Boolean(s?.innerShadowColor) && s?.innerShadowColor !== "transparent",
|
|
20250
20254
|
onEnable: (s) => ({
|
|
20251
|
-
innerShadowColor:
|
|
20255
|
+
innerShadowColor: chunkXRFJ7TAF_js.normalizeHexColor(s?.innerShadowColor, "#000000"),
|
|
20252
20256
|
innerShadowOpacity: s?.innerShadowOpacity ?? 0.5,
|
|
20253
20257
|
innerShadowBlur: s?.innerShadowBlur ?? 5,
|
|
20254
20258
|
innerShadowOffsetX: s?.innerShadowOffsetX ?? 0,
|
|
@@ -20260,7 +20264,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20260
20264
|
key: "isc",
|
|
20261
20265
|
label: "Color",
|
|
20262
20266
|
type: "color",
|
|
20263
|
-
read: (s) =>
|
|
20267
|
+
read: (s) => chunkXRFJ7TAF_js.normalizeHexColor(s?.innerShadowColor, "#000000"),
|
|
20264
20268
|
write: (v) => ({ innerShadowColor: String(v) })
|
|
20265
20269
|
},
|
|
20266
20270
|
{
|
|
@@ -20770,7 +20774,7 @@ function ColorPickerRow({
|
|
|
20770
20774
|
pushColor(color);
|
|
20771
20775
|
};
|
|
20772
20776
|
const handleEyedropper = async () => {
|
|
20773
|
-
const color = await
|
|
20777
|
+
const color = await chunkXRFJ7TAF_js.openNativeEyeDropper();
|
|
20774
20778
|
if (color) {
|
|
20775
20779
|
commit(color);
|
|
20776
20780
|
}
|
|
@@ -20853,9 +20857,9 @@ function GradientStopRow({
|
|
|
20853
20857
|
"input",
|
|
20854
20858
|
{
|
|
20855
20859
|
type: "color",
|
|
20856
|
-
value:
|
|
20860
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(stop2.color, "#3b82f6"),
|
|
20857
20861
|
onChange: (e) => {
|
|
20858
|
-
const hex =
|
|
20862
|
+
const hex = chunkXRFJ7TAF_js.normalizeHexColor(e.target.value, "#3b82f6");
|
|
20859
20863
|
patchStop({ color: hex, colorRef: void 0 });
|
|
20860
20864
|
pushColor(hex);
|
|
20861
20865
|
},
|
|
@@ -20980,7 +20984,7 @@ function FillAdvancedControls({
|
|
|
20980
20984
|
onClick: () => onUpdateGradientStops([
|
|
20981
20985
|
...gradientStops,
|
|
20982
20986
|
{
|
|
20983
|
-
color:
|
|
20987
|
+
color: chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR),
|
|
20984
20988
|
position: 50,
|
|
20985
20989
|
opacity: 1
|
|
20986
20990
|
}
|
|
@@ -20994,9 +20998,9 @@ function FillAdvancedControls({
|
|
|
20994
20998
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${COL2} flex flex-col gap-2`, children: [
|
|
20995
20999
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: "Pattern" }),
|
|
20996
21000
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-8 gap-1 max-h-48 overflow-y-auto rounded border border-border p-2", children: PATTERN_PRESET_OPTIONS.map((opt) => {
|
|
20997
|
-
const fgColor =
|
|
20998
|
-
const bgColor =
|
|
20999
|
-
const svgPattern =
|
|
21001
|
+
const fgColor = chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR);
|
|
21002
|
+
const bgColor = chunkXRFJ7TAF_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff");
|
|
21003
|
+
const svgPattern = chunkXRFJ7TAF_js.getPatternSvg(opt.value, fgColor, bgColor);
|
|
21000
21004
|
const isSelected = (style.fillPatternPreset || "pct20") === opt.value;
|
|
21001
21005
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21002
21006
|
"button",
|
|
@@ -21029,7 +21033,7 @@ function FillAdvancedControls({
|
|
|
21029
21033
|
{
|
|
21030
21034
|
label: t("pptx.fillAdvanced.foregroundColor"),
|
|
21031
21035
|
prefix: "pattern-fg",
|
|
21032
|
-
value:
|
|
21036
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR),
|
|
21033
21037
|
disabled: isLine,
|
|
21034
21038
|
onChange: (color) => onUpdateShapeStyle({ fillMode: "pattern", fillColor: color })
|
|
21035
21039
|
}
|
|
@@ -21039,7 +21043,7 @@ function FillAdvancedControls({
|
|
|
21039
21043
|
{
|
|
21040
21044
|
label: t("pptx.fillAdvanced.backgroundColor"),
|
|
21041
21045
|
prefix: "pattern-bg",
|
|
21042
|
-
value:
|
|
21046
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff"),
|
|
21043
21047
|
disabled: isLine,
|
|
21044
21048
|
onChange: (color) => onUpdateShapeStyle({
|
|
21045
21049
|
fillMode: "pattern",
|
|
@@ -21106,11 +21110,11 @@ function QuickStylesGallery({
|
|
|
21106
21110
|
onUpdateShapeStyle
|
|
21107
21111
|
}) {
|
|
21108
21112
|
const { t } = reactI18next.useTranslation();
|
|
21109
|
-
const { viewportWidth } =
|
|
21113
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
21110
21114
|
const swatchMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
21111
21115
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
21112
21116
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: t("pptx.shape.quickStyles") }),
|
|
21113
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-6 gap-1", children:
|
|
21117
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-6 gap-1", children: chunkXRFJ7TAF_js.SHAPE_QUICK_STYLES.map((qs, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
21114
21118
|
"button",
|
|
21115
21119
|
{
|
|
21116
21120
|
type: "button",
|
|
@@ -21137,7 +21141,7 @@ function StrokeEffectsSection({
|
|
|
21137
21141
|
{
|
|
21138
21142
|
label: t("pptx.inspector.stroke"),
|
|
21139
21143
|
prefix: "stroke",
|
|
21140
|
-
value:
|
|
21144
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(style?.strokeColor, chunkXRFJ7TAF_js.DEFAULT_STROKE_COLOR),
|
|
21141
21145
|
selectedRef: style?.strokeColorRef,
|
|
21142
21146
|
onChange: onSetStrokeColor
|
|
21143
21147
|
}
|
|
@@ -21200,7 +21204,7 @@ function StrokeEffectsSection({
|
|
|
21200
21204
|
strokeDash: e.target.value
|
|
21201
21205
|
}),
|
|
21202
21206
|
className: SEL,
|
|
21203
|
-
children:
|
|
21207
|
+
children: chunkXRFJ7TAF_js.STROKE_DASH_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
21204
21208
|
}
|
|
21205
21209
|
)
|
|
21206
21210
|
] }),
|
|
@@ -21290,10 +21294,10 @@ function FillStrokeProperties({
|
|
|
21290
21294
|
return;
|
|
21291
21295
|
}
|
|
21292
21296
|
if (nextMode === "gradient") {
|
|
21293
|
-
const existing =
|
|
21297
|
+
const existing = chunkXRFJ7TAF_js.sanitizeGradientStops(style?.fillGradientStops);
|
|
21294
21298
|
const stops = existing.length >= 2 ? existing : [
|
|
21295
21299
|
{
|
|
21296
|
-
color:
|
|
21300
|
+
color: chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR),
|
|
21297
21301
|
position: 0,
|
|
21298
21302
|
opacity: 1
|
|
21299
21303
|
},
|
|
@@ -21318,7 +21322,7 @@ function FillStrokeProperties({
|
|
|
21318
21322
|
onUpdateShapeStyle({ fillMode: "solid" });
|
|
21319
21323
|
};
|
|
21320
21324
|
const gradientStops = selectedGradientStops.length > 0 ? selectedGradientStops : [
|
|
21321
|
-
{ color:
|
|
21325
|
+
{ color: chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR, position: 0 },
|
|
21322
21326
|
{ color: "#ffffff", position: 100 }
|
|
21323
21327
|
];
|
|
21324
21328
|
const showGradient = style?.fillMode === "gradient" || selectedGradientStops.length > 0;
|
|
@@ -21345,7 +21349,7 @@ function FillStrokeProperties({
|
|
|
21345
21349
|
{
|
|
21346
21350
|
label: t("pptx.fill.fill"),
|
|
21347
21351
|
prefix: "fill",
|
|
21348
|
-
value:
|
|
21352
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR),
|
|
21349
21353
|
selectedRef: style?.fillColorRef,
|
|
21350
21354
|
disabled: line,
|
|
21351
21355
|
onChange: onSetFillColor
|
|
@@ -21429,7 +21433,7 @@ function Text3DProperties({
|
|
|
21429
21433
|
"input",
|
|
21430
21434
|
{
|
|
21431
21435
|
type: "color",
|
|
21432
|
-
value:
|
|
21436
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(t3d?.extrusionColor, "#888888"),
|
|
21433
21437
|
onChange: (e) => {
|
|
21434
21438
|
update3d({ extrusionColor: e.target.value });
|
|
21435
21439
|
pushColor(e.target.value);
|
|
@@ -21620,7 +21624,7 @@ function AdvancedTextFormatting({
|
|
|
21620
21624
|
"input",
|
|
21621
21625
|
{
|
|
21622
21626
|
type: "color",
|
|
21623
|
-
value:
|
|
21627
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(ts?.highlightColor, "#ffff00"),
|
|
21624
21628
|
onChange: (e) => {
|
|
21625
21629
|
onUpdateTextStyle({ highlightColor: e.target.value });
|
|
21626
21630
|
pushColor(e.target.value);
|
|
@@ -21924,7 +21928,7 @@ function TextEffectsPanel({
|
|
|
21924
21928
|
"input",
|
|
21925
21929
|
{
|
|
21926
21930
|
type: "color",
|
|
21927
|
-
value:
|
|
21931
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(ts?.textShadowColor, "#000000"),
|
|
21928
21932
|
onChange: (e) => {
|
|
21929
21933
|
onUpdateTextStyle({ textShadowColor: e.target.value });
|
|
21930
21934
|
pushColor(e.target.value);
|
|
@@ -22031,7 +22035,7 @@ function TextEffectsPanel({
|
|
|
22031
22035
|
"input",
|
|
22032
22036
|
{
|
|
22033
22037
|
type: "color",
|
|
22034
|
-
value:
|
|
22038
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(ts?.textGlowColor, "#ffff00"),
|
|
22035
22039
|
onChange: (e) => {
|
|
22036
22040
|
onUpdateTextStyle({ textGlowColor: e.target.value });
|
|
22037
22041
|
pushColor(e.target.value);
|
|
@@ -22130,7 +22134,7 @@ function TextAdvancedSections({
|
|
|
22130
22134
|
canEdit,
|
|
22131
22135
|
onUpdateTextStyle
|
|
22132
22136
|
}) {
|
|
22133
|
-
if (!(0,
|
|
22137
|
+
if (!(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
22134
22138
|
return null;
|
|
22135
22139
|
}
|
|
22136
22140
|
const ts = selectedElement.textStyle;
|
|
@@ -22159,22 +22163,22 @@ function ShapeTextPanels({
|
|
|
22159
22163
|
}) {
|
|
22160
22164
|
const { t } = reactI18next.useTranslation();
|
|
22161
22165
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22162
|
-
(0,
|
|
22166
|
+
(0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
22163
22167
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.type", "Shape Type") }),
|
|
22164
22168
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22165
22169
|
WebSelect,
|
|
22166
22170
|
{
|
|
22167
22171
|
value: selectedElement.shapeType || "rect",
|
|
22168
22172
|
disabled: !canEdit,
|
|
22169
|
-
className:
|
|
22173
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-full"),
|
|
22170
22174
|
onChange: (e) => onUpdateElement({
|
|
22171
22175
|
shapeType: e.target.value
|
|
22172
22176
|
}),
|
|
22173
|
-
children:
|
|
22177
|
+
children: chunkXRFJ7TAF_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
22174
22178
|
}
|
|
22175
22179
|
)
|
|
22176
22180
|
] }),
|
|
22177
|
-
(0,
|
|
22181
|
+
(0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, "data-pptx-fill-stroke": true, "data-pptx-inspector-section": "fill-stroke", children: [
|
|
22178
22182
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.fillStroke", "Fill & Stroke") }),
|
|
22179
22183
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22180
22184
|
FillStrokeProperties,
|
|
@@ -22182,7 +22186,7 @@ function ShapeTextPanels({
|
|
|
22182
22186
|
selectedElement,
|
|
22183
22187
|
selectedShapeStyle: selectedElement.shapeStyle,
|
|
22184
22188
|
selectedShapeType: selectedElement.shapeType,
|
|
22185
|
-
selectedGradientStops:
|
|
22189
|
+
selectedGradientStops: chunkXRFJ7TAF_js.sanitizeGradientStops(
|
|
22186
22190
|
selectedElement.shapeStyle?.fillGradientStops
|
|
22187
22191
|
),
|
|
22188
22192
|
canEdit,
|
|
@@ -22192,7 +22196,7 @@ function ShapeTextPanels({
|
|
|
22192
22196
|
}
|
|
22193
22197
|
)
|
|
22194
22198
|
] }),
|
|
22195
|
-
(0,
|
|
22199
|
+
(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, "data-pptx-text-card": true, children: [
|
|
22196
22200
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.text.title", "Text") }),
|
|
22197
22201
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5 text-[11px]", children: [
|
|
22198
22202
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -22218,7 +22222,7 @@ function ShapeTextPanels({
|
|
|
22218
22222
|
{
|
|
22219
22223
|
disabled: !canEdit,
|
|
22220
22224
|
ariaLabel: "Text Color",
|
|
22221
|
-
value:
|
|
22225
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
22222
22226
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22223
22227
|
onCommit: (hex) => onUpdateTextStyle({ color: hex, colorRef: void 0 })
|
|
22224
22228
|
}
|
|
@@ -22310,7 +22314,7 @@ function TextFormatToggle({
|
|
|
22310
22314
|
{
|
|
22311
22315
|
type: "button",
|
|
22312
22316
|
disabled,
|
|
22313
|
-
className:
|
|
22317
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
22314
22318
|
"px-2 py-1 rounded text-[11px] transition-colors max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
22315
22319
|
italic && "italic",
|
|
22316
22320
|
underline && "underline",
|
|
@@ -22468,7 +22472,7 @@ var THUMB_COMPONENTS = {
|
|
|
22468
22472
|
chevron: ChevronThumb,
|
|
22469
22473
|
bending: BendingThumb
|
|
22470
22474
|
};
|
|
22471
|
-
var LAYOUT_DESCRIPTORS =
|
|
22475
|
+
var LAYOUT_DESCRIPTORS = chunkXRFJ7TAF_js.dist_exports.SWITCHABLE_LAYOUT_TYPES.map((type) => ({
|
|
22472
22476
|
type,
|
|
22473
22477
|
i18nKey: `pptx.smartart.category.${type}`
|
|
22474
22478
|
}));
|
|
@@ -22496,7 +22500,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22496
22500
|
type: "button",
|
|
22497
22501
|
"data-testid": `smartart-layout-${type}`,
|
|
22498
22502
|
disabled: !canEdit,
|
|
22499
|
-
className:
|
|
22503
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
22500
22504
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
22501
22505
|
"text-[9px] leading-tight",
|
|
22502
22506
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -22575,7 +22579,7 @@ function SmartArtNodeStyleControls({
|
|
|
22575
22579
|
disabled: !canEdit,
|
|
22576
22580
|
"aria-label": `Bold ${label}`,
|
|
22577
22581
|
"aria-pressed": bold,
|
|
22578
|
-
className:
|
|
22582
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
22579
22583
|
EMPHASIS_BTN,
|
|
22580
22584
|
"font-bold",
|
|
22581
22585
|
bold ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -22591,7 +22595,7 @@ function SmartArtNodeStyleControls({
|
|
|
22591
22595
|
disabled: !canEdit,
|
|
22592
22596
|
"aria-label": `Italic ${label}`,
|
|
22593
22597
|
"aria-pressed": italic,
|
|
22594
|
-
className:
|
|
22598
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
22595
22599
|
EMPHASIS_BTN,
|
|
22596
22600
|
"italic",
|
|
22597
22601
|
italic ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -22630,7 +22634,7 @@ function SmartArtNodeRow({
|
|
|
22630
22634
|
"div",
|
|
22631
22635
|
{
|
|
22632
22636
|
role: "listitem",
|
|
22633
|
-
className:
|
|
22637
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
22634
22638
|
"rounded border bg-background/60 p-1.5",
|
|
22635
22639
|
isChild ? "border-border/60 ml-4" : "border-border"
|
|
22636
22640
|
),
|
|
@@ -22645,7 +22649,7 @@ function SmartArtNodeRow({
|
|
|
22645
22649
|
"data-testid": "smartart-node-text",
|
|
22646
22650
|
disabled: !canEdit,
|
|
22647
22651
|
"aria-label": label,
|
|
22648
|
-
className:
|
|
22652
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "flex-1 text-[11px] py-0.5"),
|
|
22649
22653
|
value: text,
|
|
22650
22654
|
onChange: (e) => onChangeText(nodeId, e.target.value),
|
|
22651
22655
|
onKeyDown: (e) => onKeyDown(e, nodeId),
|
|
@@ -22694,7 +22698,7 @@ function SmartArtNodeRow({
|
|
|
22694
22698
|
{
|
|
22695
22699
|
type: "button",
|
|
22696
22700
|
disabled: !canEdit || removeDisabled,
|
|
22697
|
-
className:
|
|
22701
|
+
className: chunkXRFJ7TAF_js.cn(MINI_BTN, "hover:text-red-400"),
|
|
22698
22702
|
onClick: () => onRemove(nodeId),
|
|
22699
22703
|
"aria-label": `Remove ${label}`,
|
|
22700
22704
|
title: removeDisabled ? t("pptx.smartArt.layoutMinimum") : t("pptx.smartArt.remove"),
|
|
@@ -22737,7 +22741,7 @@ function SmartArtStyleControls({
|
|
|
22737
22741
|
disabled: !canEdit,
|
|
22738
22742
|
"data-testid": "smartart-color-scheme",
|
|
22739
22743
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
22740
|
-
className:
|
|
22744
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-full"),
|
|
22741
22745
|
value: colorScheme,
|
|
22742
22746
|
onChange: (e) => onChangeColorScheme(e.target.value),
|
|
22743
22747
|
children: colorSchemes.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: pptx.schemaLabel(pptx.SMARTART_COLOR_SCHEME_LABEL_KEYS, cs, translate) }, cs))
|
|
@@ -22752,7 +22756,7 @@ function SmartArtStyleControls({
|
|
|
22752
22756
|
type: "button",
|
|
22753
22757
|
disabled: !canEdit,
|
|
22754
22758
|
"aria-pressed": style === s,
|
|
22755
|
-
className:
|
|
22759
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
22756
22760
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
22757
22761
|
style === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
22758
22762
|
),
|
|
@@ -22798,7 +22802,7 @@ function SmartArtPropertiesPanel({
|
|
|
22798
22802
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
22799
22803
|
newData,
|
|
22800
22804
|
newData.layout,
|
|
22801
|
-
|
|
22805
|
+
chunk355ICDU6_js.resolveSmartArtDataPalette(newData),
|
|
22802
22806
|
newData.style ?? "flat",
|
|
22803
22807
|
"inspector",
|
|
22804
22808
|
box
|
|
@@ -22809,10 +22813,10 @@ function SmartArtPropertiesPanel({
|
|
|
22809
22813
|
applySmartArtData({ ...smartArtData, ...patch });
|
|
22810
22814
|
};
|
|
22811
22815
|
const handleUpdateNodeText = (nodeId, text) => {
|
|
22812
|
-
applySmartArtData((0,
|
|
22816
|
+
applySmartArtData((0, chunkXRFJ7TAF_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text));
|
|
22813
22817
|
};
|
|
22814
22818
|
const handleChangeNodeStyle = (nodeId, patch) => {
|
|
22815
|
-
const next = (0,
|
|
22819
|
+
const next = (0, chunkXRFJ7TAF_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, patch);
|
|
22816
22820
|
if (next !== smartArtData) {
|
|
22817
22821
|
applySmartArtData(next);
|
|
22818
22822
|
}
|
|
@@ -22821,17 +22825,17 @@ function SmartArtPropertiesPanel({
|
|
|
22821
22825
|
if (!pptx.canAddTopLevelNode(layout, topLevelCount)) {
|
|
22822
22826
|
return;
|
|
22823
22827
|
}
|
|
22824
|
-
applySmartArtData((0,
|
|
22828
|
+
applySmartArtData((0, chunkXRFJ7TAF_js.dist_exports.addSmartArtNodeAsChild)(smartArtData));
|
|
22825
22829
|
};
|
|
22826
22830
|
const addSubItem = (parentId) => {
|
|
22827
|
-
applySmartArtData((0,
|
|
22831
|
+
applySmartArtData((0, chunkXRFJ7TAF_js.dist_exports.addSmartArtNodeAsChild)(smartArtData, parentId, "Sub-item"));
|
|
22828
22832
|
};
|
|
22829
22833
|
const removeNode = (nodeId) => {
|
|
22830
22834
|
const isTopLevel = !nodes.find((n) => n.id === nodeId)?.parentId;
|
|
22831
22835
|
if (isTopLevel && !pptx.canRemoveTopLevelNode(layout, topLevelCount)) {
|
|
22832
22836
|
return;
|
|
22833
22837
|
}
|
|
22834
|
-
applySmartArtData((0,
|
|
22838
|
+
applySmartArtData((0, chunkXRFJ7TAF_js.dist_exports.removeSmartArtNode)(smartArtData, nodeId));
|
|
22835
22839
|
};
|
|
22836
22840
|
const moveNode = (nodeId, direction) => {
|
|
22837
22841
|
const next = pptx.reorder(smartArtData, nodeId, direction);
|
|
@@ -22987,7 +22991,7 @@ function TableDataGrid({
|
|
|
22987
22991
|
}) {
|
|
22988
22992
|
const { t } = reactI18next.useTranslation();
|
|
22989
22993
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
22990
|
-
const { viewportWidth } =
|
|
22994
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
22991
22995
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
22992
22996
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
22993
22997
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -23399,7 +23403,7 @@ function TableCellColorField({
|
|
|
23399
23403
|
disabled,
|
|
23400
23404
|
onCommit
|
|
23401
23405
|
}) {
|
|
23402
|
-
const hex =
|
|
23406
|
+
const hex = chunkXRFJ7TAF_js.normalizeHexColor(value, fallback);
|
|
23403
23407
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
23404
23408
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
|
|
23405
23409
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23510,7 +23514,7 @@ function TableCellFormattingPanel({
|
|
|
23510
23514
|
{
|
|
23511
23515
|
type: "button",
|
|
23512
23516
|
disabled: !canEdit,
|
|
23513
|
-
className:
|
|
23517
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
23514
23518
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23515
23519
|
cls,
|
|
23516
23520
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -23529,7 +23533,7 @@ function TableCellFormattingPanel({
|
|
|
23529
23533
|
{
|
|
23530
23534
|
type: "button",
|
|
23531
23535
|
disabled: !canEdit,
|
|
23532
|
-
className:
|
|
23536
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
23533
23537
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23534
23538
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23535
23539
|
),
|
|
@@ -23547,7 +23551,7 @@ function TableCellFormattingPanel({
|
|
|
23547
23551
|
{
|
|
23548
23552
|
type: "button",
|
|
23549
23553
|
disabled: !canEdit,
|
|
23550
|
-
className:
|
|
23554
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
23551
23555
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23552
23556
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23553
23557
|
),
|
|
@@ -23570,7 +23574,7 @@ function TableCellFormattingPanel({
|
|
|
23570
23574
|
DebouncedColorInput,
|
|
23571
23575
|
{
|
|
23572
23576
|
disabled: !canEdit,
|
|
23573
|
-
value:
|
|
23577
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
23574
23578
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
23575
23579
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
23576
23580
|
}
|
|
@@ -23580,7 +23584,7 @@ function TableCellFormattingPanel({
|
|
|
23580
23584
|
{
|
|
23581
23585
|
type: "number",
|
|
23582
23586
|
disabled: !canEdit,
|
|
23583
|
-
className:
|
|
23587
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-14"),
|
|
23584
23588
|
min: 0,
|
|
23585
23589
|
max: 10,
|
|
23586
23590
|
value: cs[widthKey] ?? 1,
|
|
@@ -23596,7 +23600,7 @@ function TableCellFormattingPanel({
|
|
|
23596
23600
|
{
|
|
23597
23601
|
type: "button",
|
|
23598
23602
|
disabled: !canEdit,
|
|
23599
|
-
className:
|
|
23603
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "text-center"),
|
|
23600
23604
|
onClick: () => {
|
|
23601
23605
|
const newRows = pptx.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
23602
23606
|
if (newRows) {
|
|
@@ -23611,7 +23615,7 @@ function TableCellFormattingPanel({
|
|
|
23611
23615
|
{
|
|
23612
23616
|
type: "button",
|
|
23613
23617
|
disabled: !canEdit,
|
|
23614
|
-
className:
|
|
23618
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "text-center"),
|
|
23615
23619
|
onClick: () => {
|
|
23616
23620
|
const newRows = pptx.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
23617
23621
|
if (newRows) {
|
|
@@ -23626,7 +23630,7 @@ function TableCellFormattingPanel({
|
|
|
23626
23630
|
{
|
|
23627
23631
|
type: "button",
|
|
23628
23632
|
disabled: !canEdit,
|
|
23629
|
-
className:
|
|
23633
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "text-center"),
|
|
23630
23634
|
onClick: () => {
|
|
23631
23635
|
const newRows = pptx.computeSplitCell(td, rowIndex, columnIndex);
|
|
23632
23636
|
if (newRows) {
|
|
@@ -23812,7 +23816,7 @@ function TableStyleEditor({
|
|
|
23812
23816
|
const { t } = reactI18next.useTranslation();
|
|
23813
23817
|
const themeColorMap = useThemeColorMap();
|
|
23814
23818
|
const [activeStyleId, setActiveStyleId] = React97.useState(
|
|
23815
|
-
styleId ? (0,
|
|
23819
|
+
styleId ? (0, chunkXRFJ7TAF_js.dist_exports.normalizeTableStyleGuid)(styleId) : ""
|
|
23816
23820
|
);
|
|
23817
23821
|
const [selectedPart, setSelectedPart] = React97.useState("wholeTbl");
|
|
23818
23822
|
const entry = activeStyleId ? styleMap?.[activeStyleId] : void 0;
|
|
@@ -23833,8 +23837,8 @@ function TableStyleEditor({
|
|
|
23833
23837
|
return;
|
|
23834
23838
|
}
|
|
23835
23839
|
const nextMap = { ...styleMap ?? {} };
|
|
23836
|
-
const created = (0,
|
|
23837
|
-
(0,
|
|
23840
|
+
const created = (0, chunkXRFJ7TAF_js.dist_exports.createTableStyleEntry)(nextMap, { styleName: name, basedOn: entry });
|
|
23841
|
+
(0, chunkXRFJ7TAF_js.dist_exports.addTableStyleToMap)(nextMap, created);
|
|
23838
23842
|
onStyleMapChange(nextMap);
|
|
23839
23843
|
setActiveStyleId(created.styleId);
|
|
23840
23844
|
onAssignStyle?.(created.styleId);
|
|
@@ -23844,7 +23848,7 @@ function TableStyleEditor({
|
|
|
23844
23848
|
return;
|
|
23845
23849
|
}
|
|
23846
23850
|
const nextMap = { ...styleMap };
|
|
23847
|
-
(0,
|
|
23851
|
+
(0, chunkXRFJ7TAF_js.dist_exports.deleteTableStyleFromMap)(nextMap, entry.styleId);
|
|
23848
23852
|
onStyleMapChange(nextMap);
|
|
23849
23853
|
onDeleteStyle(entry.styleId);
|
|
23850
23854
|
onClose();
|
|
@@ -23898,7 +23902,7 @@ function TablePropertiesPanel({
|
|
|
23898
23902
|
const updateMergeRows = (rows) => {
|
|
23899
23903
|
const tableData = { ...td, rows };
|
|
23900
23904
|
const updates = { tableData };
|
|
23901
|
-
const rawXml = (0,
|
|
23905
|
+
const rawXml = (0, chunkXRFJ7TAF_js.dist_exports.updateMergeAttrsInRawXml)(tableElement, tableData);
|
|
23902
23906
|
if (rawXml) {
|
|
23903
23907
|
updates.rawXml = rawXml;
|
|
23904
23908
|
}
|
|
@@ -23964,7 +23968,7 @@ function TablePropertiesPanel({
|
|
|
23964
23968
|
] }),
|
|
23965
23969
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
23966
23970
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.table.stylePresets") }),
|
|
23967
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
23971
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunkXRFJ7TAF_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23968
23972
|
"button",
|
|
23969
23973
|
{
|
|
23970
23974
|
type: "button",
|
|
@@ -24192,7 +24196,7 @@ function ElementInspectorBody({
|
|
|
24192
24196
|
box: { width: selectedElement.width, height: selectedElement.height }
|
|
24193
24197
|
}
|
|
24194
24198
|
),
|
|
24195
|
-
(0,
|
|
24199
|
+
(0, chunkXRFJ7TAF_js.dist_exports.isImageLikeElement)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24196
24200
|
ImagePropertiesPanel,
|
|
24197
24201
|
{
|
|
24198
24202
|
selectedElement,
|
|
@@ -24357,7 +24361,7 @@ function CommentMentionTextarea({
|
|
|
24357
24361
|
"data-testid": "pptx-comment-mention-option",
|
|
24358
24362
|
role: "option",
|
|
24359
24363
|
"aria-selected": index === safeHighlighted,
|
|
24360
|
-
className:
|
|
24364
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
24361
24365
|
"block w-full px-2 py-1 text-left text-[11px] hover:bg-accent",
|
|
24362
24366
|
index === safeHighlighted && "bg-accent"
|
|
24363
24367
|
),
|
|
@@ -24480,7 +24484,7 @@ function InspectorCommentRow({
|
|
|
24480
24484
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24481
24485
|
"div",
|
|
24482
24486
|
{
|
|
24483
|
-
className:
|
|
24487
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
24484
24488
|
"rounded border border-border bg-card p-2",
|
|
24485
24489
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
24486
24490
|
),
|
|
@@ -24493,7 +24497,7 @@ function InspectorCommentRow({
|
|
|
24493
24497
|
t("pptx.comments.resolved")
|
|
24494
24498
|
] })
|
|
24495
24499
|
] }),
|
|
24496
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
24500
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunkXRFJ7TAF_js.formatCommentTimestamp(comment.createdAt) })
|
|
24497
24501
|
] }),
|
|
24498
24502
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24499
24503
|
"button",
|
|
@@ -24501,12 +24505,12 @@ function InspectorCommentRow({
|
|
|
24501
24505
|
type: "button",
|
|
24502
24506
|
className: "mt-1 inline-flex items-center gap-1 rounded bg-primary/20 px-1.5 py-0.5 text-[10px] text-primary hover:bg-primary/30 transition-colors",
|
|
24503
24507
|
title: t("pptx.comments.commentingOn", {
|
|
24504
|
-
element:
|
|
24508
|
+
element: chunkXRFJ7TAF_js.getElementLabel(targetElement)
|
|
24505
24509
|
}),
|
|
24506
24510
|
onClick: () => onSelectElement(targetElement.id),
|
|
24507
24511
|
children: [
|
|
24508
24512
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24509
|
-
|
|
24513
|
+
chunkXRFJ7TAF_js.getElementLabel(targetElement)
|
|
24510
24514
|
]
|
|
24511
24515
|
}
|
|
24512
24516
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 inline-flex items-center gap-1 rounded bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground", children: t("pptx.comments.deletedElement") })),
|
|
@@ -24575,7 +24579,7 @@ function InspectorCommentRow({
|
|
|
24575
24579
|
"button",
|
|
24576
24580
|
{
|
|
24577
24581
|
type: "button",
|
|
24578
|
-
className:
|
|
24582
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
24579
24583
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
24580
24584
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
24581
24585
|
),
|
|
@@ -24718,7 +24722,7 @@ function InspectorCommentsSection({
|
|
|
24718
24722
|
selectedElement && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1 rounded bg-primary/20 px-1.5 py-0.5 text-[10px] text-primary", children: [
|
|
24719
24723
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24720
24724
|
t("pptx.comments.commentingOn", {
|
|
24721
|
-
element:
|
|
24725
|
+
element: chunkXRFJ7TAF_js.getElementLabel(selectedElement)
|
|
24722
24726
|
})
|
|
24723
24727
|
] }),
|
|
24724
24728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24729,7 +24733,7 @@ function InspectorCommentsSection({
|
|
|
24729
24733
|
authors: commentAuthors,
|
|
24730
24734
|
rows: 2,
|
|
24731
24735
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
24732
|
-
element:
|
|
24736
|
+
element: chunkXRFJ7TAF_js.getElementLabel(selectedElement)
|
|
24733
24737
|
}) : t("pptx.comments.addPlaceholder"),
|
|
24734
24738
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
24735
24739
|
onChange: onSetCommentDraft,
|
|
@@ -24742,7 +24746,7 @@ function InspectorCommentsSection({
|
|
|
24742
24746
|
type: "button",
|
|
24743
24747
|
onClick: onAddComment,
|
|
24744
24748
|
disabled: !commentDraft.trim(),
|
|
24745
|
-
className:
|
|
24749
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
24746
24750
|
"w-full inline-flex items-center justify-center gap-1 rounded px-2 py-1 text-[11px] font-medium transition-colors max-md:min-h-[44px]!",
|
|
24747
24751
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
24748
24752
|
),
|
|
@@ -24756,7 +24760,7 @@ function InspectorCommentsSection({
|
|
|
24756
24760
|
] });
|
|
24757
24761
|
}
|
|
24758
24762
|
function elementLabel(element) {
|
|
24759
|
-
const text = (0,
|
|
24763
|
+
const text = (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) ? (element.text || "").slice(0, 24) : void 0;
|
|
24760
24764
|
return text || element.type;
|
|
24761
24765
|
}
|
|
24762
24766
|
function InspectorElementsTab({
|
|
@@ -24783,13 +24787,13 @@ function InspectorElementsTab({
|
|
|
24783
24787
|
};
|
|
24784
24788
|
if (!activeSlide) {
|
|
24785
24789
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24786
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24790
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkXRFJ7TAF_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24787
24791
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground italic", children: t("pptx.inspector.noSlideSelected") })
|
|
24788
24792
|
] });
|
|
24789
24793
|
}
|
|
24790
24794
|
const elements = activeSlide.elements || [];
|
|
24791
24795
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", "data-pptx-elements-tab": true, children: [
|
|
24792
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24796
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkXRFJ7TAF_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24793
24797
|
[...elements].reverse().map((el, reversedIndex) => {
|
|
24794
24798
|
const index = elements.length - 1 - reversedIndex;
|
|
24795
24799
|
const selected = selectedElementId === el.id || selectedElementIds.includes(el.id);
|
|
@@ -24797,7 +24801,7 @@ function InspectorElementsTab({
|
|
|
24797
24801
|
"div",
|
|
24798
24802
|
{
|
|
24799
24803
|
title: `${el.type} - ${el.id}`,
|
|
24800
|
-
className:
|
|
24804
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
24801
24805
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
24802
24806
|
selected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
24803
24807
|
),
|
|
@@ -24834,7 +24838,7 @@ function InspectorPaneHeader({
|
|
|
24834
24838
|
onClose
|
|
24835
24839
|
}) {
|
|
24836
24840
|
const { t } = reactI18next.useTranslation();
|
|
24837
|
-
const { viewportWidth } =
|
|
24841
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
24838
24842
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
24839
24843
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
24840
24844
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -24857,7 +24861,7 @@ function InspectorPaneHeader({
|
|
|
24857
24861
|
type: "button",
|
|
24858
24862
|
title: t(labelKey),
|
|
24859
24863
|
style: touchBtnStyle,
|
|
24860
|
-
className:
|
|
24864
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
24861
24865
|
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
24862
24866
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
24863
24867
|
),
|
|
@@ -24971,7 +24975,7 @@ function CustomPropertiesBlock({
|
|
|
24971
24975
|
"button",
|
|
24972
24976
|
{
|
|
24973
24977
|
type: "button",
|
|
24974
|
-
className:
|
|
24978
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
24975
24979
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
24976
24980
|
children: "\xD7"
|
|
24977
24981
|
}
|
|
@@ -25299,7 +25303,7 @@ function PresentationSettingsCard({
|
|
|
25299
25303
|
min: 1,
|
|
25300
25304
|
max: 16,
|
|
25301
25305
|
disabled: !canEdit,
|
|
25302
|
-
className:
|
|
25306
|
+
className: chunkXRFJ7TAF_js.cn(INPUT2, "w-20"),
|
|
25303
25307
|
value: pptx.printPropertiesSlidesPerPage(presentationProperties.printProperties),
|
|
25304
25308
|
onChange: (e) => onUpdate({
|
|
25305
25309
|
printProperties: pptx.withSlidesPerPage(
|
|
@@ -25387,14 +25391,14 @@ function SlideThemeOverridePanel({
|
|
|
25387
25391
|
const translate = React97.useCallback((key) => t(key), [t]);
|
|
25388
25392
|
const override = activeSlide?.clrMapOverride;
|
|
25389
25393
|
const isOverrideActive = override !== void 0;
|
|
25390
|
-
const targetSlotOptions = React97.useMemo(() => [...
|
|
25394
|
+
const targetSlotOptions = React97.useMemo(() => [...chunkXRFJ7TAF_js.dist_exports.THEME_COLOR_SCHEME_KEYS], []);
|
|
25391
25395
|
const commitOverride = React97.useCallback(
|
|
25392
25396
|
(nextOverride) => {
|
|
25393
25397
|
if (!activeSlide || !theme?.colorScheme) {
|
|
25394
25398
|
onUpdateSlide({ clrMapOverride: nextOverride });
|
|
25395
25399
|
return;
|
|
25396
25400
|
}
|
|
25397
|
-
const nextSlide = (0,
|
|
25401
|
+
const nextSlide = (0, chunkXRFJ7TAF_js.dist_exports.applyThemeOverrideToSlide)(activeSlide, theme.colorScheme, nextOverride);
|
|
25398
25402
|
onUpdateSlide({
|
|
25399
25403
|
clrMapOverride: nextSlide.clrMapOverride,
|
|
25400
25404
|
backgroundColor: nextSlide.backgroundColor,
|
|
@@ -25407,8 +25411,8 @@ function SlideThemeOverridePanel({
|
|
|
25407
25411
|
(enabled) => {
|
|
25408
25412
|
if (enabled) {
|
|
25409
25413
|
const defaultMap = {};
|
|
25410
|
-
for (const key of
|
|
25411
|
-
defaultMap[key] =
|
|
25414
|
+
for (const key of chunkXRFJ7TAF_js.dist_exports.COLOR_MAP_ALIAS_KEYS) {
|
|
25415
|
+
defaultMap[key] = chunkXRFJ7TAF_js.dist_exports.DEFAULT_COLOR_MAP[key];
|
|
25412
25416
|
}
|
|
25413
25417
|
commitOverride(defaultMap);
|
|
25414
25418
|
} else {
|
|
@@ -25421,9 +25425,9 @@ function SlideThemeOverridePanel({
|
|
|
25421
25425
|
(alias, targetSlot) => {
|
|
25422
25426
|
const current = override ?? {};
|
|
25423
25427
|
const next = { ...current, [alias]: targetSlot };
|
|
25424
|
-
for (const key of
|
|
25428
|
+
for (const key of chunkXRFJ7TAF_js.dist_exports.COLOR_MAP_ALIAS_KEYS) {
|
|
25425
25429
|
if (!next[key]) {
|
|
25426
|
-
next[key] =
|
|
25430
|
+
next[key] = chunkXRFJ7TAF_js.dist_exports.DEFAULT_COLOR_MAP[key];
|
|
25427
25431
|
}
|
|
25428
25432
|
}
|
|
25429
25433
|
commitOverride(next);
|
|
@@ -25455,8 +25459,8 @@ function SlideThemeOverridePanel({
|
|
|
25455
25459
|
),
|
|
25456
25460
|
t("pptx.themeOverride.enableOverride")
|
|
25457
25461
|
] }),
|
|
25458
|
-
isOverrideActive && override && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children:
|
|
25459
|
-
const currentTarget = override[alias] ??
|
|
25462
|
+
isOverrideActive && override && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: chunkXRFJ7TAF_js.dist_exports.COLOR_MAP_ALIAS_KEYS.map((alias) => {
|
|
25463
|
+
const currentTarget = override[alias] ?? chunkXRFJ7TAF_js.dist_exports.DEFAULT_COLOR_MAP[alias];
|
|
25460
25464
|
const resolvedHex = resolveSlotColor(currentTarget);
|
|
25461
25465
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25462
25466
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-24 truncate text-muted-foreground", title: ALIAS_LABELS[alias], children: ALIAS_LABELS[alias] }),
|
|
@@ -25535,7 +25539,7 @@ function TransitionPreview({
|
|
|
25535
25539
|
const { t } = reactI18next.useTranslation();
|
|
25536
25540
|
const durationMs = transition.durationMs ?? 500;
|
|
25537
25541
|
const animations = React97.useMemo(
|
|
25538
|
-
() =>
|
|
25542
|
+
() => chunk355ICDU6_js.getSlideTransitionAnimations(
|
|
25539
25543
|
transition.type,
|
|
25540
25544
|
durationMs,
|
|
25541
25545
|
transition.direction,
|
|
@@ -25604,7 +25608,7 @@ function TransitionPreview({
|
|
|
25604
25608
|
]
|
|
25605
25609
|
}
|
|
25606
25610
|
),
|
|
25607
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25611
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk355ICDU6_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
25608
25612
|
] });
|
|
25609
25613
|
}
|
|
25610
25614
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -25621,13 +25625,13 @@ function SlideTransitionSection({
|
|
|
25621
25625
|
return null;
|
|
25622
25626
|
}
|
|
25623
25627
|
const transitionType = activeSlide.transition?.type ?? "none";
|
|
25624
|
-
const validDirections =
|
|
25628
|
+
const validDirections = chunkXRFJ7TAF_js.dist_exports.TRANSITION_VALID_DIRECTIONS[transitionType];
|
|
25625
25629
|
const hasDirections = validDirections !== void 0 && validDirections.length > 0;
|
|
25626
25630
|
const usesOrientation = pptx.TRANSITION_ORIENTATION_TYPES.has(transitionType);
|
|
25627
25631
|
const isWheel = transitionType === "wheel";
|
|
25628
25632
|
const isMorph = transitionType === "morph";
|
|
25629
|
-
const patternOptions =
|
|
25630
|
-
const hasThruBlk =
|
|
25633
|
+
const patternOptions = chunkXRFJ7TAF_js.dist_exports.TRANSITION_PATTERN_OPTIONS[transitionType];
|
|
25634
|
+
const hasThruBlk = chunkXRFJ7TAF_js.dist_exports.TRANSITION_THRUBLK_TYPES.has(transitionType);
|
|
25631
25635
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25632
25636
|
"div",
|
|
25633
25637
|
{
|
|
@@ -25647,7 +25651,7 @@ function SlideTransitionSection({
|
|
|
25647
25651
|
type: e.target.value
|
|
25648
25652
|
}),
|
|
25649
25653
|
className: "bg-muted border border-border rounded px-2 py-1 max-md:min-h-[44px]!",
|
|
25650
|
-
children:
|
|
25654
|
+
children: chunkXRFJ7TAF_js.SLIDE_TRANSITION_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
25651
25655
|
}
|
|
25652
25656
|
)
|
|
25653
25657
|
] }),
|
|
@@ -25863,7 +25867,7 @@ function TagsSection({
|
|
|
25863
25867
|
"button",
|
|
25864
25868
|
{
|
|
25865
25869
|
type: "button",
|
|
25866
|
-
className:
|
|
25870
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25867
25871
|
title: t("pptx.tags.deleteTag"),
|
|
25868
25872
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
25869
25873
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -25992,7 +25996,7 @@ function PresentationPropertiesPanel({
|
|
|
25992
25996
|
canEdit
|
|
25993
25997
|
}
|
|
25994
25998
|
),
|
|
25995
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25999
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkXRFJ7TAF_js.cn(CARD2, "space-y-1"), children: [
|
|
25996
26000
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: "Slide" }),
|
|
25997
26001
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
25998
26002
|
activeSlide.elements?.length ?? 0,
|
|
@@ -26013,14 +26017,14 @@ function SlideBackgroundPanel({
|
|
|
26013
26017
|
const { t } = reactI18next.useTranslation();
|
|
26014
26018
|
const bgImageInputRef = React97.useRef(null);
|
|
26015
26019
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
26016
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
26020
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkXRFJ7TAF_js.cn(CARD2, "space-y-2"), children: [
|
|
26017
26021
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.viewer.background") }),
|
|
26018
26022
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
26019
26023
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: t("pptx.slideBackground.colour") }),
|
|
26020
26024
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26021
26025
|
DebouncedColorInput,
|
|
26022
26026
|
{
|
|
26023
|
-
value:
|
|
26027
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
26024
26028
|
disabled: !canEdit,
|
|
26025
26029
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26026
26030
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -26059,7 +26063,7 @@ function SlideBackgroundPanel({
|
|
|
26059
26063
|
"button",
|
|
26060
26064
|
{
|
|
26061
26065
|
type: "button",
|
|
26062
|
-
className:
|
|
26066
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "flex-1 text-center"),
|
|
26063
26067
|
disabled: !canEdit,
|
|
26064
26068
|
onClick: () => bgImageInputRef.current?.click(),
|
|
26065
26069
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -26092,7 +26096,7 @@ function SlideBackgroundPanel({
|
|
|
26092
26096
|
"button",
|
|
26093
26097
|
{
|
|
26094
26098
|
type: "button",
|
|
26095
|
-
className:
|
|
26099
|
+
className: chunkXRFJ7TAF_js.cn(BTN2, "w-full text-center text-red-400 hover:text-red-300"),
|
|
26096
26100
|
disabled: !pptx.slideBackgroundClearState(activeSlide, canEdit).enabled,
|
|
26097
26101
|
onClick: () => onUpdateSlide(pptx.slideBackgroundClearPatch()),
|
|
26098
26102
|
children: t("pptx.slideBackground.clearBackground")
|
|
@@ -26136,14 +26140,14 @@ function TemplateBackgroundCard({
|
|
|
26136
26140
|
t("pptx.master.layout"),
|
|
26137
26141
|
t("pptx.master.master")
|
|
26138
26142
|
);
|
|
26139
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
26143
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkXRFJ7TAF_js.cn(CARD2, "space-y-2"), children: [
|
|
26140
26144
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
26141
26145
|
rows.layout && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
26142
26146
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-14 shrink-0 truncate", title: rows.layout.title, children: t("pptx.master.layout") }),
|
|
26143
26147
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26144
26148
|
DebouncedColorInput,
|
|
26145
26149
|
{
|
|
26146
|
-
value:
|
|
26150
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.layout.path), "#ffffff"),
|
|
26147
26151
|
disabled: !canEdit,
|
|
26148
26152
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26149
26153
|
onCommit: (hex) => onSetTemplateBackground(rows.layout.path, hex)
|
|
@@ -26156,7 +26160,7 @@ function TemplateBackgroundCard({
|
|
|
26156
26160
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26157
26161
|
DebouncedColorInput,
|
|
26158
26162
|
{
|
|
26159
|
-
value:
|
|
26163
|
+
value: chunkXRFJ7TAF_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.master.path), "#ffffff"),
|
|
26160
26164
|
disabled: !canEdit,
|
|
26161
26165
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26162
26166
|
onCommit: (hex) => onSetTemplateBackground(rows.master.path, hex)
|
|
@@ -26267,7 +26271,7 @@ function InspectorPane(props) {
|
|
|
26267
26271
|
} = props;
|
|
26268
26272
|
const hasSelection = selectedElement !== null;
|
|
26269
26273
|
const { t } = reactI18next.useTranslation();
|
|
26270
|
-
const { dragY, handlers: dragHandlers } =
|
|
26274
|
+
const { dragY, handlers: dragHandlers } = chunk355ICDU6_js.useSheetDismissDrag(onClose);
|
|
26271
26275
|
const {
|
|
26272
26276
|
animationPanelHeight,
|
|
26273
26277
|
effectiveThemeOptions,
|
|
@@ -26289,7 +26293,7 @@ function InspectorPane(props) {
|
|
|
26289
26293
|
"div",
|
|
26290
26294
|
{
|
|
26291
26295
|
"data-pptx-chrome": "inspector",
|
|
26292
|
-
className:
|
|
26296
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
26293
26297
|
// Shared styles
|
|
26294
26298
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
26295
26299
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -26680,7 +26684,7 @@ function PresentationTouchControls({
|
|
|
26680
26684
|
hideNavigation = false
|
|
26681
26685
|
}) {
|
|
26682
26686
|
const { t } = reactI18next.useTranslation();
|
|
26683
|
-
const { isTouchDevice } =
|
|
26687
|
+
const { isTouchDevice } = chunk355ICDU6_js.useIsMobile();
|
|
26684
26688
|
if (!isTouchDevice) {
|
|
26685
26689
|
return null;
|
|
26686
26690
|
}
|
|
@@ -26985,13 +26989,13 @@ function PrintPreview({
|
|
|
26985
26989
|
}) {
|
|
26986
26990
|
const { t } = reactI18next.useTranslation();
|
|
26987
26991
|
const pages = React97.useMemo(
|
|
26988
|
-
() =>
|
|
26992
|
+
() => chunkXRFJ7TAF_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
26989
26993
|
[slideIndices, slidesPerPage, orientation]
|
|
26990
26994
|
);
|
|
26991
|
-
const printable = React97.useMemo(() =>
|
|
26995
|
+
const printable = React97.useMemo(() => chunkXRFJ7TAF_js.getPrintableArea(orientation), [orientation]);
|
|
26992
26996
|
const visiblePages = pages.slice(0, maxPages);
|
|
26993
26997
|
const isThreePerPage = slidesPerPage === 3;
|
|
26994
|
-
const noteLineCount =
|
|
26998
|
+
const noteLineCount = chunkXRFJ7TAF_js.generateNoteLineCount();
|
|
26995
26999
|
const scaledW = printable.width * PREVIEW_SCALE3;
|
|
26996
27000
|
const scaledH = printable.height * PREVIEW_SCALE3;
|
|
26997
27001
|
const noteAreaFraction = 0.5;
|
|
@@ -27326,11 +27330,11 @@ function PrintDialog({
|
|
|
27326
27330
|
defaultFrameSlides
|
|
27327
27331
|
}) {
|
|
27328
27332
|
const { t } = reactI18next.useTranslation();
|
|
27329
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27330
|
-
const { viewportWidth } =
|
|
27333
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
27334
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
27331
27335
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27332
27336
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27333
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
27337
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunk355ICDU6_js.useViewerOptionsContext());
|
|
27334
27338
|
const [printWhat, setPrintWhat] = React97.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
27335
27339
|
const [orientation, setOrientation] = React97.useState("landscape");
|
|
27336
27340
|
const [colorMode, setColorMode] = React97.useState(
|
|
@@ -27833,14 +27837,14 @@ function BroadcastDialog({
|
|
|
27833
27837
|
defaultServerUrl
|
|
27834
27838
|
}) {
|
|
27835
27839
|
const { t } = reactI18next.useTranslation();
|
|
27836
|
-
const collab =
|
|
27840
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
27837
27841
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
27838
27842
|
const [roomId, setRoomId] = React97.useState("");
|
|
27839
27843
|
const [userName, setUserName] = React97.useState("");
|
|
27840
27844
|
const [serverUrl, setServerUrl] = React97.useState("");
|
|
27841
27845
|
const [copied, setCopied] = React97.useState(false);
|
|
27842
27846
|
const dialogRef = React97.useRef(null);
|
|
27843
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27847
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
27844
27848
|
useModalFocus(open, dialogRef, onClose);
|
|
27845
27849
|
React97.useEffect(() => {
|
|
27846
27850
|
if (open && !isBroadcasting) {
|
|
@@ -28143,7 +28147,7 @@ function ActiveSessionView({
|
|
|
28143
28147
|
onCopyRoomId,
|
|
28144
28148
|
onStopCollaboration
|
|
28145
28149
|
}) {
|
|
28146
|
-
const { t } = reactI18next.useTranslation(), viewerOptions =
|
|
28150
|
+
const { t } = reactI18next.useTranslation(), viewerOptions = chunk355ICDU6_js.useViewerOptionsContext(), statusColor = collab.status === "connected" ? "text-green-400" : collab.status === "connecting" ? "text-yellow-400" : "text-red-400", statusIcon = collab.status === "connected" || collab.status === "connecting" ? /* @__PURE__ */ jsxRuntime.jsx(lu.LuWifi, { className: "w-4 h-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lu.LuWifiOff, { className: "w-4 h-4" }), sessionUsers = pptx.buildActiveSessionUsers({
|
|
28147
28151
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
28148
28152
|
localUserInitials: viewerOptions.general.userInitials,
|
|
28149
28153
|
localUserColor: collab.config.userColor,
|
|
@@ -28242,7 +28246,7 @@ function StartSessionForm({
|
|
|
28242
28246
|
onRetry
|
|
28243
28247
|
}) {
|
|
28244
28248
|
const { t } = reactI18next.useTranslation();
|
|
28245
|
-
const { viewportWidth } =
|
|
28249
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
28246
28250
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
28247
28251
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
28248
28252
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -28376,7 +28380,7 @@ function ShareDialog({
|
|
|
28376
28380
|
defaultUserName,
|
|
28377
28381
|
defaultServerUrl
|
|
28378
28382
|
}) {
|
|
28379
|
-
const collab =
|
|
28383
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
28380
28384
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
28381
28385
|
const { t } = reactI18next.useTranslation();
|
|
28382
28386
|
const [roomId, setRoomId] = React97.useState(defaultRoomId ?? "");
|
|
@@ -28386,9 +28390,9 @@ function ShareDialog({
|
|
|
28386
28390
|
const [invitation, setInvitation] = React97.useState("");
|
|
28387
28391
|
const [copied, setCopied] = React97.useState(false);
|
|
28388
28392
|
const dialogRef = React97.useRef(null);
|
|
28389
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28393
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
28390
28394
|
useModalFocus(open, dialogRef, onClose);
|
|
28391
|
-
const { viewportWidth, viewportHeight } =
|
|
28395
|
+
const { viewportWidth, viewportHeight } = chunk355ICDU6_js.useIsMobile();
|
|
28392
28396
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
28393
28397
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
28394
28398
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -28671,12 +28675,12 @@ function HyperlinkEditDialog({
|
|
|
28671
28675
|
onCancel
|
|
28672
28676
|
}) {
|
|
28673
28677
|
const { t } = reactI18next.useTranslation();
|
|
28674
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28678
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onCancel);
|
|
28675
28679
|
const inputRef = React97.useRef(null);
|
|
28676
|
-
const detectedType =
|
|
28677
|
-
const emailParts =
|
|
28678
|
-
const detectedSlide =
|
|
28679
|
-
const detectedVerb = initialAction ?
|
|
28680
|
+
const detectedType = chunk355ICDU6_js.detectTargetType(initialUrl, initialAction);
|
|
28681
|
+
const emailParts = chunk355ICDU6_js.parseEmailUrl(initialUrl || "");
|
|
28682
|
+
const detectedSlide = chunk355ICDU6_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
28683
|
+
const detectedVerb = initialAction ? chunk355ICDU6_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28680
28684
|
const [targetType, setTargetType] = React97.useState(detectedType);
|
|
28681
28685
|
const [url, setUrl] = React97.useState(
|
|
28682
28686
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28707,7 +28711,7 @@ function HyperlinkEditDialog({
|
|
|
28707
28711
|
actionVerb
|
|
28708
28712
|
});
|
|
28709
28713
|
};
|
|
28710
|
-
const tabCls = (active) =>
|
|
28714
|
+
const tabCls = (active) => chunkXRFJ7TAF_js.cn(
|
|
28711
28715
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
28712
28716
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
28713
28717
|
);
|
|
@@ -28944,7 +28948,7 @@ function ViewerBottomPanels({
|
|
|
28944
28948
|
notesStyle,
|
|
28945
28949
|
onNotesHeightChange
|
|
28946
28950
|
}) {
|
|
28947
|
-
const { isHidden } =
|
|
28951
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(hiddenActions);
|
|
28948
28952
|
const customization = useViewerCustomizationContext();
|
|
28949
28953
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
28950
28954
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -29290,7 +29294,7 @@ function ViewerToolbarSection(props) {
|
|
|
29290
29294
|
[activeSlide, propertyHandlers]
|
|
29291
29295
|
);
|
|
29292
29296
|
const scopedLayoutOptions = React97__default.default.useMemo(
|
|
29293
|
-
() =>
|
|
29297
|
+
() => chunk355ICDU6_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
29294
29298
|
[s.layoutOptions, activeSlide]
|
|
29295
29299
|
);
|
|
29296
29300
|
const handleResetSlide = React97.useCallback(() => {
|
|
@@ -29694,7 +29698,7 @@ function ViewerToolbarSection(props) {
|
|
|
29694
29698
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
29695
29699
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29696
29700
|
formatPainterActive: s.formatPainterActive,
|
|
29697
|
-
canActivateFormatPainter:
|
|
29701
|
+
canActivateFormatPainter: chunkXRFJ7TAF_js.hasCopyableFormat(selectedElement),
|
|
29698
29702
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29699
29703
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29700
29704
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29781,7 +29785,7 @@ function EquationEditorDialog({
|
|
|
29781
29785
|
existingOmml
|
|
29782
29786
|
}) {
|
|
29783
29787
|
const { t } = reactI18next.useTranslation();
|
|
29784
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29788
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
29785
29789
|
const initialLatex = React97.useMemo(() => {
|
|
29786
29790
|
if (!existingOmml) {
|
|
29787
29791
|
return "";
|
|
@@ -29903,7 +29907,7 @@ function EquationEditorDialog({
|
|
|
29903
29907
|
{
|
|
29904
29908
|
type: "button",
|
|
29905
29909
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
29906
|
-
className:
|
|
29910
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
29907
29911
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
29908
29912
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
29909
29913
|
),
|
|
@@ -29969,7 +29973,7 @@ function getPreviewForLayout(layout) {
|
|
|
29969
29973
|
transform: `scale(${scale})`,
|
|
29970
29974
|
transformOrigin: "top left"
|
|
29971
29975
|
},
|
|
29972
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29976
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.SmartArtRenderer, { element: pptx.buildSmartArtPreviewElement(layout) })
|
|
29973
29977
|
}
|
|
29974
29978
|
)
|
|
29975
29979
|
}
|
|
@@ -29981,7 +29985,7 @@ function InsertSmartArtDialog({
|
|
|
29981
29985
|
onInsert
|
|
29982
29986
|
}) {
|
|
29983
29987
|
const { t } = reactI18next.useTranslation();
|
|
29984
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29988
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
29985
29989
|
const [activeCategory, setActiveCategory] = React97.useState("list");
|
|
29986
29990
|
const [selectedLayout, setSelectedLayout] = React97.useState(null);
|
|
29987
29991
|
const dialogRef = React97.useRef(null);
|
|
@@ -30062,7 +30066,7 @@ function InsertSmartArtDialog({
|
|
|
30062
30066
|
setActiveCategory(cat.id);
|
|
30063
30067
|
setSelectedLayout(null);
|
|
30064
30068
|
},
|
|
30065
|
-
className:
|
|
30069
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
30066
30070
|
"w-full text-left px-3 py-1.5 text-xs transition-colors",
|
|
30067
30071
|
activeCategory === cat.id ? "bg-primary text-white" : "text-foreground hover:bg-muted"
|
|
30068
30072
|
),
|
|
@@ -30090,7 +30094,7 @@ function InsertSmartArtDialog({
|
|
|
30090
30094
|
onInsert(preset.layout, preset.defaultItems);
|
|
30091
30095
|
onClose();
|
|
30092
30096
|
},
|
|
30093
|
-
className:
|
|
30097
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
30094
30098
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
30095
30099
|
selectedLayout === preset.layout ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
30096
30100
|
),
|
|
@@ -30575,6 +30579,8 @@ function PresentationStage({
|
|
|
30575
30579
|
height: safeHeight,
|
|
30576
30580
|
transform: `scale(${scale})`,
|
|
30577
30581
|
transformOrigin: "top left",
|
|
30582
|
+
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
30583
|
+
...pptx.deviceStrokeStageStyle(scale),
|
|
30578
30584
|
// Motion-path keyframes translate by a fraction of the SLIDE, so
|
|
30579
30585
|
// the stage publishes its own size for those calc() offsets.
|
|
30580
30586
|
"--pptx-slide-w": `${safeWidth}px`,
|
|
@@ -30585,11 +30591,11 @@ function PresentationStage({
|
|
|
30585
30591
|
})
|
|
30586
30592
|
},
|
|
30587
30593
|
children: [
|
|
30588
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30594
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
30589
30595
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
30590
30596
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
30591
30597
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30592
|
-
|
|
30598
|
+
chunk355ICDU6_js.ElementRenderer,
|
|
30593
30599
|
{
|
|
30594
30600
|
element,
|
|
30595
30601
|
activeSlide,
|
|
@@ -30626,7 +30632,7 @@ function PresentationStage({
|
|
|
30626
30632
|
`tpl-${element.id}`
|
|
30627
30633
|
)),
|
|
30628
30634
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30629
|
-
|
|
30635
|
+
chunk355ICDU6_js.ElementRenderer,
|
|
30630
30636
|
{
|
|
30631
30637
|
element,
|
|
30632
30638
|
activeSlide,
|
|
@@ -30747,8 +30753,8 @@ function ViewerCanvasArea(props) {
|
|
|
30747
30753
|
aiCanvasActive = false
|
|
30748
30754
|
} = props;
|
|
30749
30755
|
const { t } = reactI18next.useTranslation();
|
|
30750
|
-
const { isHidden } =
|
|
30751
|
-
const viewerOptions =
|
|
30756
|
+
const { isHidden } = chunk355ICDU6_js.useToolbarVisibility(hiddenActions);
|
|
30757
|
+
const viewerOptions = chunk355ICDU6_js.useViewerOptionsContext();
|
|
30752
30758
|
const outlineAuthoring = useOutlineAuthoring({
|
|
30753
30759
|
state: s,
|
|
30754
30760
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -30777,7 +30783,7 @@ function ViewerCanvasArea(props) {
|
|
|
30777
30783
|
${url}`)) {
|
|
30778
30784
|
return;
|
|
30779
30785
|
}
|
|
30780
|
-
|
|
30786
|
+
chunkXRFJ7TAF_js.safeOpenUrl(url);
|
|
30781
30787
|
},
|
|
30782
30788
|
[viewerOptions, t]
|
|
30783
30789
|
);
|
|
@@ -30798,9 +30804,9 @@ ${url}`)) {
|
|
|
30798
30804
|
);
|
|
30799
30805
|
const handleHyperlinkClick = React97.useCallback(
|
|
30800
30806
|
(url) => {
|
|
30801
|
-
if (
|
|
30807
|
+
if (chunkXRFJ7TAF_js.isPpactionUrl(url)) {
|
|
30802
30808
|
if (mode === "present") {
|
|
30803
|
-
const parsed =
|
|
30809
|
+
const parsed = chunkXRFJ7TAF_js.parsePpactionUrl(url);
|
|
30804
30810
|
if (parsed) {
|
|
30805
30811
|
const action = {
|
|
30806
30812
|
action: parsed.action,
|
|
@@ -30885,7 +30891,7 @@ ${url}`)) {
|
|
|
30885
30891
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30886
30892
|
}
|
|
30887
30893
|
}, [mode, presentation, s]);
|
|
30888
|
-
const swipe =
|
|
30894
|
+
const swipe = chunk355ICDU6_js.useSwipeNavigation({
|
|
30889
30895
|
enabled: swipeEnabled,
|
|
30890
30896
|
onNext: handleSwipeNext,
|
|
30891
30897
|
onPrev: handleSwipePrev
|
|
@@ -30959,7 +30965,7 @@ ${url}`)) {
|
|
|
30959
30965
|
),
|
|
30960
30966
|
children: (stageScale) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30961
30967
|
presentation.transitionOverlay && slides[presentation.transitionOverlay.outgoingSlideIndex] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30962
|
-
|
|
30968
|
+
chunk355ICDU6_js.PresentationTransitionOverlay,
|
|
30963
30969
|
{
|
|
30964
30970
|
outgoingSlide: slides[presentation.transitionOverlay.outgoingSlideIndex],
|
|
30965
30971
|
templateElements,
|
|
@@ -31070,14 +31076,14 @@ ${url}`)) {
|
|
|
31070
31076
|
outlineAuthoring,
|
|
31071
31077
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31072
31078
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31073
|
-
|
|
31079
|
+
chunk355ICDU6_js.RemoteSelectionOverlay,
|
|
31074
31080
|
{
|
|
31075
31081
|
elements: effectiveSlide?.elements ?? [],
|
|
31076
31082
|
activeSlideIndex
|
|
31077
31083
|
}
|
|
31078
31084
|
),
|
|
31079
31085
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31080
|
-
|
|
31086
|
+
chunk355ICDU6_js.CollaborationCursorOverlay,
|
|
31081
31087
|
{
|
|
31082
31088
|
activeSlideIndex,
|
|
31083
31089
|
canvasWidth: canvasSize.width,
|
|
@@ -31217,7 +31223,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
31217
31223
|
var AiChatPanel = React97.lazy(async () => {
|
|
31218
31224
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
31219
31225
|
import('@ai-sdk/react'),
|
|
31220
|
-
import('./AiChatPanel-
|
|
31226
|
+
import('./AiChatPanel-7XZQQZ4P.js')
|
|
31221
31227
|
]);
|
|
31222
31228
|
function BoundAiChatPanel(props) {
|
|
31223
31229
|
return /* @__PURE__ */ jsxRuntime.jsx(Panel, { ...props, useChat });
|
|
@@ -31378,7 +31384,7 @@ function MobileDismissSheet({
|
|
|
31378
31384
|
children
|
|
31379
31385
|
}) {
|
|
31380
31386
|
const { t } = reactI18next.useTranslation();
|
|
31381
|
-
const { dragY, handlers } =
|
|
31387
|
+
const { dragY, handlers } = chunk355ICDU6_js.useSheetDismissDrag(onClose);
|
|
31382
31388
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31383
31389
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31384
31390
|
"button",
|
|
@@ -31647,7 +31653,7 @@ function ThemeThumbnail({
|
|
|
31647
31653
|
{
|
|
31648
31654
|
type: "button",
|
|
31649
31655
|
onClick,
|
|
31650
|
-
className:
|
|
31656
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
31651
31657
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
31652
31658
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
31653
31659
|
),
|
|
@@ -31833,7 +31839,7 @@ function ViewerSidePanels(props) {
|
|
|
31833
31839
|
const customization = useViewerCustomizationContext();
|
|
31834
31840
|
const inspectorOpen = (mode === "edit" || mode === "master") && s.isInspectorPaneOpen && pptx.isPanelVisible(customization, "inspector");
|
|
31835
31841
|
const currentBuiltInTheme = BUILT_IN_THEMES.find(
|
|
31836
|
-
(candidate) => (0,
|
|
31842
|
+
(candidate) => (0, chunkXRFJ7TAF_js.dist_exports.themeColorSchemesEqual)(s.theme?.colorScheme, candidate.colorScheme)
|
|
31837
31843
|
) ?? null;
|
|
31838
31844
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31839
31845
|
inspectorOpen && onResizeRight && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { direction: "horizontal", onResize: onResizeRight }),
|
|
@@ -32119,7 +32125,7 @@ function ViewerMainContent(props) {
|
|
|
32119
32125
|
);
|
|
32120
32126
|
const layoutGalleryAnchorRef = React97.useRef(null);
|
|
32121
32127
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
32122
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32128
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
32123
32129
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32124
32130
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32125
32131
|
SlidesPaneSidebar,
|
|
@@ -32609,7 +32615,7 @@ function MobileChromeOverlay(props) {
|
|
|
32609
32615
|
slideSectionGroups,
|
|
32610
32616
|
canEdit,
|
|
32611
32617
|
commentCount
|
|
32612
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
32618
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunk355ICDU6_js.useKeyboardInsets(), activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
32613
32619
|
s.setIsSlidesPaneOpen(false);
|
|
32614
32620
|
s.setIsInspectorPaneOpen(false);
|
|
32615
32621
|
s.setIsSlideNotesCollapsed(true);
|
|
@@ -32815,7 +32821,7 @@ function AddinTable({
|
|
|
32815
32821
|
"tr",
|
|
32816
32822
|
{
|
|
32817
32823
|
onClick: () => onSelect(row.id),
|
|
32818
|
-
className:
|
|
32824
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
32819
32825
|
"cursor-pointer border-b border-border/40 transition-colors",
|
|
32820
32826
|
selectedId === row.id ? "bg-primary/10" : "hover:bg-accent"
|
|
32821
32827
|
),
|
|
@@ -32882,18 +32888,18 @@ function ControlRow({
|
|
|
32882
32888
|
onOptionChange: emitChange
|
|
32883
32889
|
}) {
|
|
32884
32890
|
const { t } = reactI18next.useTranslation();
|
|
32885
|
-
const { viewportWidth } =
|
|
32891
|
+
const { viewportWidth } = chunk355ICDU6_js.useIsMobile();
|
|
32886
32892
|
const fieldMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
32887
32893
|
const value = readValue(options, control);
|
|
32888
32894
|
const label = t(control.labelKey);
|
|
32889
32895
|
const info = control.infoKey ? /* @__PURE__ */ jsxRuntime.jsx(InfoTip, { text: t(control.infoKey) }) : null;
|
|
32890
|
-
const rowClass =
|
|
32896
|
+
const rowClass = chunkXRFJ7TAF_js.cn("flex items-center justify-between gap-3 py-1.5", control.indent && "pl-6");
|
|
32891
32897
|
const rowStyle = { minHeight: fieldMinHeight };
|
|
32892
32898
|
const locked = control.readOnly === true;
|
|
32893
32899
|
const lockedTitle = locked ? t("pptx.options.lockedByHost") : void 0;
|
|
32894
32900
|
const onOptionChange = locked ? IGNORE_CHANGE : emitChange;
|
|
32895
32901
|
if (control.kind === "toggle") {
|
|
32896
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className:
|
|
32902
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: chunkXRFJ7TAF_js.cn(rowClass, "cursor-pointer select-none"), style: rowStyle, children: [
|
|
32897
32903
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-foreground", children: [
|
|
32898
32904
|
label,
|
|
32899
32905
|
info
|
|
@@ -33045,7 +33051,7 @@ function CommandList({
|
|
|
33045
33051
|
role: "option",
|
|
33046
33052
|
"aria-selected": selectedId === id,
|
|
33047
33053
|
onClick: () => onSelect(id),
|
|
33048
|
-
className:
|
|
33054
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33049
33055
|
"flex w-full items-center rounded px-2 py-1.5 text-left text-sm transition-colors",
|
|
33050
33056
|
selectedId === id ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent"
|
|
33051
33057
|
),
|
|
@@ -33189,7 +33195,7 @@ function OptionsRibbonPane({
|
|
|
33189
33195
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33190
33196
|
"label",
|
|
33191
33197
|
{
|
|
33192
|
-
className:
|
|
33198
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33193
33199
|
"flex items-center gap-2 rounded px-2 py-1.5",
|
|
33194
33200
|
isFile ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-accent"
|
|
33195
33201
|
),
|
|
@@ -33223,7 +33229,7 @@ function OptionsRibbonPane({
|
|
|
33223
33229
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: pptx.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33224
33230
|
"div",
|
|
33225
33231
|
{
|
|
33226
|
-
className:
|
|
33232
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33227
33233
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
33228
33234
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
33229
33235
|
),
|
|
@@ -33244,7 +33250,7 @@ async function exportAiChatLogs(options) {
|
|
|
33244
33250
|
chats,
|
|
33245
33251
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
33246
33252
|
(filename, content, mime) => {
|
|
33247
|
-
|
|
33253
|
+
chunk355ICDU6_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
33248
33254
|
}
|
|
33249
33255
|
);
|
|
33250
33256
|
}
|
|
@@ -33352,7 +33358,7 @@ function SettingsAppearanceTab({
|
|
|
33352
33358
|
type: "button",
|
|
33353
33359
|
onClick: () => onSelectTheme(entry.key),
|
|
33354
33360
|
"aria-pressed": isActive,
|
|
33355
|
-
className:
|
|
33361
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33356
33362
|
"flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
|
|
33357
33363
|
isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
|
|
33358
33364
|
),
|
|
@@ -33369,7 +33375,7 @@ function SettingsAppearanceTab({
|
|
|
33369
33375
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33370
33376
|
"span",
|
|
33371
33377
|
{
|
|
33372
|
-
className:
|
|
33378
|
+
className: chunkXRFJ7TAF_js.cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
|
|
33373
33379
|
children: t(entry.labelKey)
|
|
33374
33380
|
}
|
|
33375
33381
|
)
|
|
@@ -33449,7 +33455,7 @@ function SettingsLanguageTab({
|
|
|
33449
33455
|
type: "button",
|
|
33450
33456
|
onClick: () => onSelectLocale(locale.code),
|
|
33451
33457
|
"aria-pressed": isActive,
|
|
33452
|
-
className:
|
|
33458
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33453
33459
|
"flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
|
|
33454
33460
|
isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
|
|
33455
33461
|
),
|
|
@@ -33489,8 +33495,8 @@ function SettingsDialog({
|
|
|
33489
33495
|
const [activeTabId, setActiveTabId] = React97.useState("general");
|
|
33490
33496
|
const { t } = reactI18next.useTranslation();
|
|
33491
33497
|
const customization = useViewerCustomizationContext();
|
|
33492
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
33493
|
-
const { viewportWidth, viewportHeight } =
|
|
33498
|
+
const { panelStyle, handlers: dragHandlers } = chunk355ICDU6_js.useModalDismissDrag(onClose);
|
|
33499
|
+
const { viewportWidth, viewportHeight } = chunk355ICDU6_js.useIsMobile();
|
|
33494
33500
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
33495
33501
|
const navBtnStyle = { minHeight: touchTargetPx, minWidth: touchTargetPx };
|
|
33496
33502
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
@@ -33598,7 +33604,7 @@ function SettingsDialog({
|
|
|
33598
33604
|
onClick: () => setActiveTabId(tab.id),
|
|
33599
33605
|
"aria-current": currentTabId === tab.id,
|
|
33600
33606
|
style: navBtnStyle,
|
|
33601
|
-
className:
|
|
33607
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33602
33608
|
"flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
|
|
33603
33609
|
currentTabId === tab.id ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
|
|
33604
33610
|
),
|
|
@@ -33613,7 +33619,7 @@ function SettingsDialog({
|
|
|
33613
33619
|
onClick: () => setActiveTabId(AI_TAB_ID),
|
|
33614
33620
|
"aria-current": aiActive,
|
|
33615
33621
|
style: navBtnStyle,
|
|
33616
|
-
className:
|
|
33622
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
33617
33623
|
"flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
|
|
33618
33624
|
aiActive ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
|
|
33619
33625
|
),
|
|
@@ -33759,7 +33765,7 @@ function ViewerOptionsProvider({
|
|
|
33759
33765
|
store,
|
|
33760
33766
|
children
|
|
33761
33767
|
}) {
|
|
33762
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33768
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
33763
33769
|
}
|
|
33764
33770
|
function useAiBridge(input) {
|
|
33765
33771
|
const ref = React97.useRef(input);
|
|
@@ -34080,7 +34086,7 @@ function useMasterViewCrud(input) {
|
|
|
34080
34086
|
if (id === "renameLayout" || id === "renameMaster") {
|
|
34081
34087
|
const master = slideMasters[target.masterIndex];
|
|
34082
34088
|
const current = id === "renameLayout" ? master?.layouts?.[target.layoutIndex ?? -1]?.name ?? "" : master?.name ?? "";
|
|
34083
|
-
const next =
|
|
34089
|
+
const next = chunk355ICDU6_js.safePrompt(t("pptx.masterView.renamePrompt"), current)?.trim();
|
|
34084
34090
|
if (!next) {
|
|
34085
34091
|
return;
|
|
34086
34092
|
}
|
|
@@ -34539,7 +34545,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34539
34545
|
}
|
|
34540
34546
|
})();
|
|
34541
34547
|
}, []);
|
|
34542
|
-
const { optionsStore, options: viewerOptions } =
|
|
34548
|
+
const { optionsStore, options: viewerOptions } = chunk355ICDU6_js.useViewerOptions();
|
|
34543
34549
|
const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
|
|
34544
34550
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
34545
34551
|
const aiEnabled = Boolean(ai) && pptx.isFeatureEnabled(customizationResolved, "ai");
|
|
@@ -34553,8 +34559,8 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34553
34559
|
const handleEnableEditing = React97.useCallback(() => {
|
|
34554
34560
|
setProtectedViewOverridden(true);
|
|
34555
34561
|
}, []);
|
|
34556
|
-
const readOnlyRec =
|
|
34557
|
-
const compatToastsState =
|
|
34562
|
+
const readOnlyRec = chunk355ICDU6_js.useReadOnlyRecommendationState(content);
|
|
34563
|
+
const compatToastsState = chunk355ICDU6_js.useCompatibilityToastsState();
|
|
34558
34564
|
const [notesBarHeight, setNotesBarHeight] = React97.useState(0);
|
|
34559
34565
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
34560
34566
|
const [collaborationReadOnly, setCollaborationReadOnly] = React97.useState(Boolean(collaboration));
|
|
@@ -34569,8 +34575,8 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34569
34575
|
filePath
|
|
34570
34576
|
});
|
|
34571
34577
|
const [isShareDialogOpen, setIsShareDialogOpen] = React97.useState(false);
|
|
34572
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
34573
|
-
const state =
|
|
34578
|
+
const { reducedMotion, toggleReducedMotion } = chunk355ICDU6_js.useReducedMotion();
|
|
34579
|
+
const state = chunk355ICDU6_js.useViewerState({ content, canEdit });
|
|
34574
34580
|
const {
|
|
34575
34581
|
containerRef,
|
|
34576
34582
|
mode,
|
|
@@ -34594,7 +34600,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34594
34600
|
[state.recentColors, pushColor]
|
|
34595
34601
|
);
|
|
34596
34602
|
const themeColorMapValue = React97.useMemo(
|
|
34597
|
-
() => state.theme?.colorScheme ? (0,
|
|
34603
|
+
() => state.theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
34598
34604
|
[state.theme?.colorScheme]
|
|
34599
34605
|
);
|
|
34600
34606
|
const settings = React97.useMemo(
|
|
@@ -34681,16 +34687,16 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34681
34687
|
}
|
|
34682
34688
|
}, [settings, optionsStore]);
|
|
34683
34689
|
const handleClearOptionsCache2 = useAutosaveCacheMaintenance(viewerOptions);
|
|
34684
|
-
const mobile =
|
|
34690
|
+
const mobile = chunk355ICDU6_js.useIsMobile();
|
|
34685
34691
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
34686
|
-
const resizablePanels =
|
|
34692
|
+
const resizablePanels = chunk355ICDU6_js.useResizablePanels();
|
|
34687
34693
|
const {
|
|
34688
34694
|
gridSpacingPx,
|
|
34689
34695
|
visibleSlideIndexes,
|
|
34690
34696
|
slideSectionGroups,
|
|
34691
34697
|
masterPseudoSlide,
|
|
34692
34698
|
authoredRange
|
|
34693
|
-
} =
|
|
34699
|
+
} = chunk355ICDU6_js.useDerivedSlideState({
|
|
34694
34700
|
slides,
|
|
34695
34701
|
sections: state.sections,
|
|
34696
34702
|
customShows: state.customShows,
|
|
@@ -34715,7 +34721,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34715
34721
|
state.cropSessionRef
|
|
34716
34722
|
]
|
|
34717
34723
|
);
|
|
34718
|
-
const zoom =
|
|
34724
|
+
const zoom = chunk355ICDU6_js.useZoomViewport({
|
|
34719
34725
|
canvasSize,
|
|
34720
34726
|
selectedElements: state.selectedElements,
|
|
34721
34727
|
fitPadding: props.fitPadding,
|
|
@@ -34725,7 +34731,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34725
34731
|
const markDocumentDirty = React97.useCallback(() => {
|
|
34726
34732
|
setIsDirty(true);
|
|
34727
34733
|
}, [setIsDirty]);
|
|
34728
|
-
const history =
|
|
34734
|
+
const history = chunk355ICDU6_js.useEditorHistory({
|
|
34729
34735
|
slides,
|
|
34730
34736
|
canvasSize,
|
|
34731
34737
|
activeSlideIndex,
|
|
@@ -34751,7 +34757,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34751
34757
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
34752
34758
|
setHeaderFooter: state.setHeaderFooter
|
|
34753
34759
|
});
|
|
34754
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
34760
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunk355ICDU6_js.usePresentationSetup({
|
|
34755
34761
|
mode,
|
|
34756
34762
|
slides,
|
|
34757
34763
|
visibleSlideIndexes,
|
|
@@ -34793,7 +34799,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34793
34799
|
onSetActiveCustomShowId: state.setActiveCustomShowId,
|
|
34794
34800
|
onAddRunProgramNotice: runProgramNoticesState.addNotice
|
|
34795
34801
|
});
|
|
34796
|
-
|
|
34802
|
+
chunk355ICDU6_js.useTouchGestures({
|
|
34797
34803
|
targetRef: zoom.canvasViewportRef,
|
|
34798
34804
|
currentScale: zoom.scale,
|
|
34799
34805
|
callbacks: {
|
|
@@ -34815,7 +34821,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34815
34821
|
},
|
|
34816
34822
|
enabled: isTouchDevice
|
|
34817
34823
|
});
|
|
34818
|
-
const dialogs =
|
|
34824
|
+
const dialogs = chunk355ICDU6_js.useViewerDialogs({
|
|
34819
34825
|
mode,
|
|
34820
34826
|
slides,
|
|
34821
34827
|
activeSlide,
|
|
@@ -34864,7 +34870,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34864
34870
|
zoom.handleZoomToFit();
|
|
34865
34871
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
34866
34872
|
}, [mode]);
|
|
34867
|
-
const editorOps =
|
|
34873
|
+
const editorOps = chunk355ICDU6_js.useEditorOperations({
|
|
34868
34874
|
state,
|
|
34869
34875
|
history,
|
|
34870
34876
|
zoom,
|
|
@@ -34906,7 +34912,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34906
34912
|
setIsEncryptedDialogOpen,
|
|
34907
34913
|
handlerRef,
|
|
34908
34914
|
loadVersion
|
|
34909
|
-
} =
|
|
34915
|
+
} = chunk355ICDU6_js.useViewerIntegration({
|
|
34910
34916
|
transformCommittedText: (text) => pptx.applyAutoCorrect(text, viewerOptions.proofing),
|
|
34911
34917
|
state,
|
|
34912
34918
|
zoom,
|
|
@@ -34980,7 +34986,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
34980
34986
|
updateThemeFontScheme: themeHandlers.handleUpdateThemeFontScheme
|
|
34981
34987
|
});
|
|
34982
34988
|
const ribbonScope = useRibbonScopeToken();
|
|
34983
|
-
const viewPreferencesSync =
|
|
34989
|
+
const viewPreferencesSync = chunk355ICDU6_js.useViewPreferencesSync({
|
|
34984
34990
|
loadVersion,
|
|
34985
34991
|
viewProperties: state.viewProperties,
|
|
34986
34992
|
setViewProperties: state.setViewProperties,
|
|
@@ -35018,7 +35024,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
35018
35024
|
},
|
|
35019
35025
|
[state]
|
|
35020
35026
|
);
|
|
35021
|
-
const layoutSwitching =
|
|
35027
|
+
const layoutSwitching = chunk355ICDU6_js.useLayoutSwitching({
|
|
35022
35028
|
handler: handlerRef.current,
|
|
35023
35029
|
slides,
|
|
35024
35030
|
activeSlideIndex,
|
|
@@ -35114,7 +35120,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
35114
35120
|
"data-pptx-editor-chrome": "",
|
|
35115
35121
|
...{ [pptx.RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
35116
35122
|
"aria-busy": loading,
|
|
35117
|
-
className:
|
|
35123
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
35118
35124
|
"h-full w-full bg-background text-foreground relative",
|
|
35119
35125
|
...pptx.resolveOptionRootClasses(viewerOptions, "pptx")
|
|
35120
35126
|
),
|
|
@@ -35505,8 +35511,8 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
35505
35511
|
// Nothing previously provided it, so every one of those consumers was
|
|
35506
35512
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
35507
35513
|
// the user changed in the Options dialog.
|
|
35508
|
-
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35509
|
-
|
|
35514
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(chunk355ICDU6_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35515
|
+
chunk355ICDU6_js.CollaborationProvider,
|
|
35510
35516
|
{
|
|
35511
35517
|
config: collaboration,
|
|
35512
35518
|
canvasWidth: canvasSize.width,
|
|
@@ -35564,7 +35570,7 @@ var PowerPointViewer = React97.forwardRef(
|
|
|
35564
35570
|
);
|
|
35565
35571
|
PowerPointViewer.displayName = "PowerPointViewer";
|
|
35566
35572
|
function CollaborationStatusStrip() {
|
|
35567
|
-
const collab =
|
|
35573
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
35568
35574
|
if (!collab) {
|
|
35569
35575
|
return null;
|
|
35570
35576
|
}
|
|
@@ -35588,8 +35594,8 @@ function CollaborationDocumentSync({
|
|
|
35588
35594
|
deckSaveState,
|
|
35589
35595
|
onReadOnlyChange
|
|
35590
35596
|
}) {
|
|
35591
|
-
const collab =
|
|
35592
|
-
|
|
35597
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
35598
|
+
chunk355ICDU6_js.useCollaborationDocumentSync({
|
|
35593
35599
|
collaboration: collab,
|
|
35594
35600
|
slides,
|
|
35595
35601
|
templateElementsBySlideId,
|
|
@@ -35608,14 +35614,14 @@ function CollaborationFollowLayer({
|
|
|
35608
35614
|
setActiveSlideIndex,
|
|
35609
35615
|
slideCount
|
|
35610
35616
|
}) {
|
|
35611
|
-
const collab =
|
|
35612
|
-
const { followedClientId, followUser } =
|
|
35617
|
+
const collab = chunk355ICDU6_js.useCollaboration();
|
|
35618
|
+
const { followedClientId, followUser } = chunk355ICDU6_js.useFollowMode({
|
|
35613
35619
|
collab,
|
|
35614
35620
|
activeSlideIndex,
|
|
35615
35621
|
setActiveSlideIndex,
|
|
35616
35622
|
slideCount
|
|
35617
35623
|
});
|
|
35618
|
-
|
|
35624
|
+
chunk355ICDU6_js.useBroadcastFollower({
|
|
35619
35625
|
collab,
|
|
35620
35626
|
activeSlideIndex,
|
|
35621
35627
|
setActiveSlideIndex,
|