pptx-react-viewer 4.36.2 → 4.36.3
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 +7 -0
- package/dist/{AiChatPanel-CX74JT77.mjs → AiChatPanel-5O6PHRSH.mjs} +1 -1
- package/dist/AiChatPanel-5O6PHRSH.mjs.br +0 -0
- package/dist/AiChatPanel-5O6PHRSH.mjs.gz +0 -0
- package/dist/{AiChatPanel-PVRSPIAY.js → AiChatPanel-FNHDAKPB.js} +9 -9
- package/dist/AiChatPanel-FNHDAKPB.js.br +0 -0
- package/dist/AiChatPanel-FNHDAKPB.js.gz +0 -0
- package/dist/{chunk-4MGJUBY7.js → chunk-43TOUP5U.js} +6 -3
- package/dist/chunk-43TOUP5U.js.br +0 -0
- package/dist/chunk-43TOUP5U.js.gz +0 -0
- package/dist/{chunk-BOLHGVKE.mjs → chunk-F76MGAHF.mjs} +1 -1
- package/dist/chunk-F76MGAHF.mjs.br +0 -0
- package/dist/chunk-F76MGAHF.mjs.gz +0 -0
- package/dist/{chunk-KRBHBPI7.mjs → chunk-JPVT7TY7.mjs} +13 -10
- package/dist/chunk-JPVT7TY7.mjs.br +0 -0
- package/dist/chunk-JPVT7TY7.mjs.gz +0 -0
- package/dist/{chunk-UL6QTOEA.js → chunk-ODFNNB5X.js} +245 -245
- package/dist/chunk-ODFNNB5X.js.br +0 -0
- package/dist/chunk-ODFNNB5X.js.gz +0 -0
- package/dist/{chunk-SMPZ552M.mjs → chunk-UC2VQORY.mjs} +6 -3
- package/dist/chunk-UC2VQORY.mjs.br +0 -0
- package/dist/chunk-UC2VQORY.mjs.gz +0 -0
- package/dist/{chunk-XX5NMBNB.js → chunk-VCRUM3NE.js} +393 -390
- package/dist/chunk-VCRUM3NE.js.br +0 -0
- package/dist/chunk-VCRUM3NE.js.gz +0 -0
- package/dist/i18n/de.cjs +76 -1
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +76 -1
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +76 -1
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +76 -1
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +76 -1
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +76 -1
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +76 -1
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +76 -1
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.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-CX74JT77.mjs.br +0 -0
- package/dist/AiChatPanel-CX74JT77.mjs.gz +0 -0
- package/dist/AiChatPanel-PVRSPIAY.js.br +0 -0
- package/dist/AiChatPanel-PVRSPIAY.js.gz +0 -0
- package/dist/chunk-4MGJUBY7.js.br +0 -0
- package/dist/chunk-4MGJUBY7.js.gz +0 -0
- package/dist/chunk-BOLHGVKE.mjs.br +0 -0
- package/dist/chunk-BOLHGVKE.mjs.gz +0 -0
- package/dist/chunk-KRBHBPI7.mjs.br +0 -0
- package/dist/chunk-KRBHBPI7.mjs.gz +0 -0
- package/dist/chunk-SMPZ552M.mjs.br +0 -0
- package/dist/chunk-SMPZ552M.mjs.gz +0 -0
- package/dist/chunk-UL6QTOEA.js.br +0 -0
- package/dist/chunk-UL6QTOEA.js.gz +0 -0
- package/dist/chunk-XX5NMBNB.js.br +0 -0
- package/dist/chunk-XX5NMBNB.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkODFNNB5X_js = require('./chunk-ODFNNB5X.js');
|
|
4
|
+
var chunk43TOUP5U_js = require('./chunk-43TOUP5U.js');
|
|
5
5
|
var pptx = require('ooxml-ui/pptx');
|
|
6
6
|
var React102 = 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
|
+
chunkODFNNB5X_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 } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
380
380
|
const [selected, setSelected] = React102.useState(null);
|
|
381
381
|
const dialogRef = React102.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: chunk43TOUP5U_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
|
),
|
|
@@ -733,7 +733,7 @@ function WebHomeControls({
|
|
|
733
733
|
function ShapeArrangeExtras(p) {
|
|
734
734
|
const commands = useShapeFormatContext();
|
|
735
735
|
const crop = commands?.crop;
|
|
736
|
-
const { isHidden } =
|
|
736
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(p.hiddenActions);
|
|
737
737
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
738
738
|
const controls = React102.useMemo(
|
|
739
739
|
() => 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
|
+
chunkODFNNB5X_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.36.
|
|
1218
|
+
const version = "4.36.3" ;
|
|
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: chunk43TOUP5U_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] = React102.useState("");
|
|
1480
1480
|
const [recent, setRecent] = React102.useState([]);
|
|
1481
|
-
const { isHidden } =
|
|
1481
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(p.hiddenActions);
|
|
1482
1482
|
const exportHidden = isHidden("export");
|
|
1483
1483
|
React102.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: chunk43TOUP5U_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: chunk43TOUP5U_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
|
+
chunkODFNNB5X_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: chunk43TOUP5U_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 = React102.useContext(
|
|
2428
|
+
const supplied = React102.useContext(chunkODFNNB5X_js.ViewerOptionsStoreContext);
|
|
2429
2429
|
const fallback = React102.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 } = chunkODFNNB5X_js.useToolbarVisibility(p.hiddenActions);
|
|
2463
2463
|
const [showsOpen, setShowsOpen] = React102.useState(false);
|
|
2464
2464
|
const showsRef = React102.useRef(null);
|
|
2465
2465
|
React102.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, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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 = React102.useCallback(() => {
|
|
2830
|
-
if (!element || !(0,
|
|
2830
|
+
if (!element || !(0, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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, chunk43TOUP5U_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 = React102.useRef(null);
|
|
2995
2995
|
const { t } = reactI18next.useTranslation();
|
|
2996
|
-
const { dragY, dragging, handlers } =
|
|
2996
|
+
const { dragY, dragging, handlers } = chunkODFNNB5X_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: chunk43TOUP5U_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] = React102.useState("home");
|
|
3084
|
-
const { isTabVisible } =
|
|
3084
|
+
const { isTabVisible } = chunkODFNNB5X_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: chunk43TOUP5U_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] = React102.useState(false);
|
|
3365
|
-
const { isHidden } =
|
|
3365
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(props.hiddenActions);
|
|
3366
3366
|
const showEdit = mode === "edit" || mode === "master";
|
|
3367
3367
|
const hidden = [];
|
|
3368
3368
|
if (isHidden("undo")) {
|
|
@@ -3410,7 +3410,7 @@ function PictureSizeStrip({
|
|
|
3410
3410
|
hiddenActions
|
|
3411
3411
|
}) {
|
|
3412
3412
|
const crop = useShapeFormatContext()?.crop;
|
|
3413
|
-
const { isHidden } =
|
|
3413
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(hiddenActions);
|
|
3414
3414
|
const controls = React102.useMemo(
|
|
3415
3415
|
() => pptx.pictureSizeHomeControls({
|
|
3416
3416
|
editable: Boolean(crop),
|
|
@@ -3453,7 +3453,7 @@ function DrawingGroup(p) {
|
|
|
3453
3453
|
const { recentColors, pushColor } = useRecentColors();
|
|
3454
3454
|
const themeColors = useThemeColorMap();
|
|
3455
3455
|
const commands = useRibbonGalleryCommands();
|
|
3456
|
-
const style = p.selectedElement && (0,
|
|
3456
|
+
const style = p.selectedElement && (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(p.selectedElement) ? p.selectedElement.shapeStyle : void 0;
|
|
3457
3457
|
const { onMoveLayer, onMoveLayerToEdge, onSetNewShapeType, onAddShape, onUpdateElementStyle } = p;
|
|
3458
3458
|
const hasSelection = Boolean(p.selectedElement);
|
|
3459
3459
|
const controls = React102.useMemo(
|
|
@@ -3582,7 +3582,7 @@ var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap t
|
|
|
3582
3582
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
3583
3583
|
function RibbonTabBar(p) {
|
|
3584
3584
|
const { t } = reactI18next.useTranslation();
|
|
3585
|
-
const viewerOptions =
|
|
3585
|
+
const viewerOptions = chunkODFNNB5X_js.useViewerOptionsContext();
|
|
3586
3586
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3587
3587
|
"div",
|
|
3588
3588
|
{
|
|
@@ -3590,7 +3590,7 @@ function RibbonTabBar(p) {
|
|
|
3590
3590
|
"data-pptx-chrome": "ribbon-tabs",
|
|
3591
3591
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
3592
3592
|
children: [
|
|
3593
|
-
|
|
3593
|
+
chunk43TOUP5U_js.TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
3594
3594
|
const selected = p.activeSection === s.id;
|
|
3595
3595
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3596
3596
|
"button",
|
|
@@ -3600,7 +3600,7 @@ function RibbonTabBar(p) {
|
|
|
3600
3600
|
"aria-selected": selected,
|
|
3601
3601
|
title: pptx.resolveScreenTip(viewerOptions, t(s.labelKey)),
|
|
3602
3602
|
onClick: () => p.onSelectSection(s.id),
|
|
3603
|
-
className:
|
|
3603
|
+
className: chunk43TOUP5U_js.cn(
|
|
3604
3604
|
TAB_BASE,
|
|
3605
3605
|
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"
|
|
3606
3606
|
),
|
|
@@ -3620,7 +3620,7 @@ function RibbonTabBar(p) {
|
|
|
3620
3620
|
...{ [pptx.RIBBON_ADD_IN_TAB_ATTR]: tab.id },
|
|
3621
3621
|
title: pptx.resolveScreenTip(viewerOptions, tab.label),
|
|
3622
3622
|
onClick: () => p.onSelectAddIn?.(tab.id),
|
|
3623
|
-
className:
|
|
3623
|
+
className: chunk43TOUP5U_js.cn(
|
|
3624
3624
|
TAB_BASE,
|
|
3625
3625
|
selected ? `text-foreground ${TAB_UNDERLINE}` : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
3626
3626
|
),
|
|
@@ -3641,7 +3641,7 @@ function RibbonTabBar(p) {
|
|
|
3641
3641
|
...{ [pptx.RIBBON_CONTEXTUAL_TAB_ATTR]: id },
|
|
3642
3642
|
title: pptx.resolveScreenTip(viewerOptions, label),
|
|
3643
3643
|
onClick: () => p.onSelectContextual(id),
|
|
3644
|
-
className:
|
|
3644
|
+
className: chunk43TOUP5U_js.cn(
|
|
3645
3645
|
TAB_BASE,
|
|
3646
3646
|
"text-primary",
|
|
3647
3647
|
selected ? TAB_UNDERLINE : "hover:bg-primary/10"
|
|
@@ -3659,9 +3659,9 @@ function RibbonTabBar(p) {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
function TabRowActions(p) {
|
|
3661
3661
|
const { t } = reactI18next.useTranslation();
|
|
3662
|
-
const collab =
|
|
3662
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
3663
3663
|
const isCollaborating = Boolean(collab && collab.status === "connected");
|
|
3664
|
-
const { isHidden } =
|
|
3664
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(p.hiddenActions);
|
|
3665
3665
|
const customization = useViewerCustomizationContext();
|
|
3666
3666
|
const ref = React102.useRef(null);
|
|
3667
3667
|
const handlers = React102.useRef(p);
|
|
@@ -3716,7 +3716,7 @@ function TabRowActions(p) {
|
|
|
3716
3716
|
}
|
|
3717
3717
|
function TitleBarElement(p) {
|
|
3718
3718
|
const { t } = reactI18next.useTranslation();
|
|
3719
|
-
const options =
|
|
3719
|
+
const options = chunkODFNNB5X_js.useViewerOptionsContext();
|
|
3720
3720
|
const customization = useViewerCustomizationContext();
|
|
3721
3721
|
const ref = React102.useRef(null);
|
|
3722
3722
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -3789,7 +3789,7 @@ function PresentDropdown({
|
|
|
3789
3789
|
{
|
|
3790
3790
|
type: "button",
|
|
3791
3791
|
onClick: onPresent,
|
|
3792
|
-
className:
|
|
3792
|
+
className: chunk43TOUP5U_js.cn(
|
|
3793
3793
|
"px-2 py-1 transition-colors",
|
|
3794
3794
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
3795
3795
|
),
|
|
@@ -3802,7 +3802,7 @@ function PresentDropdown({
|
|
|
3802
3802
|
{
|
|
3803
3803
|
type: "button",
|
|
3804
3804
|
onClick: () => setOpen((prev) => !prev),
|
|
3805
|
-
className:
|
|
3805
|
+
className: chunk43TOUP5U_js.cn(
|
|
3806
3806
|
"inline-flex items-center px-1 transition-colors border-l border-border",
|
|
3807
3807
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
3808
3808
|
),
|
|
@@ -4005,7 +4005,7 @@ function OverflowMenu(p) {
|
|
|
4005
4005
|
{
|
|
4006
4006
|
type: "button",
|
|
4007
4007
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
4008
|
-
className:
|
|
4008
|
+
className: chunk43TOUP5U_js.cn(
|
|
4009
4009
|
"p-1.5 rounded transition-colors",
|
|
4010
4010
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
4011
4011
|
),
|
|
@@ -4052,7 +4052,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4052
4052
|
onToggleSidebar,
|
|
4053
4053
|
onToggleInspector
|
|
4054
4054
|
} = p;
|
|
4055
|
-
const collab =
|
|
4055
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
4056
4056
|
const customization = useViewerCustomizationContext();
|
|
4057
4057
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
4058
4058
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -4070,7 +4070,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4070
4070
|
{
|
|
4071
4071
|
type: "button",
|
|
4072
4072
|
onClick: onToggleSidebar,
|
|
4073
|
-
className:
|
|
4073
|
+
className: chunk43TOUP5U_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
4074
4074
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
4075
4075
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
4076
4076
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic })
|
|
@@ -4131,7 +4131,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4131
4131
|
{
|
|
4132
4132
|
type: "button",
|
|
4133
4133
|
onClick: onToggleInspector,
|
|
4134
|
-
className:
|
|
4134
|
+
className: chunk43TOUP5U_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
4135
4135
|
title: t("pptx.toolbar.toggleInspector"),
|
|
4136
4136
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
4137
4137
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic })
|
|
@@ -4142,7 +4142,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4142
4142
|
{
|
|
4143
4143
|
type: "button",
|
|
4144
4144
|
onClick: p.onToggleAiPanel,
|
|
4145
|
-
className:
|
|
4145
|
+
className: chunk43TOUP5U_js.cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
4146
4146
|
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
4147
4147
|
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
4148
4148
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic })
|
|
@@ -4153,7 +4153,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4153
4153
|
{
|
|
4154
4154
|
type: "button",
|
|
4155
4155
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
4156
|
-
className:
|
|
4156
|
+
className: chunk43TOUP5U_js.cn(qab, "text-muted-foreground"),
|
|
4157
4157
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
4158
4158
|
"aria-label": t("pptx.toolbar.settings"),
|
|
4159
4159
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -4350,8 +4350,8 @@ function ToolbarLateTabs({
|
|
|
4350
4350
|
function Toolbar(p) {
|
|
4351
4351
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
4352
4352
|
const { t } = reactI18next.useTranslation();
|
|
4353
|
-
const { isTabVisible } =
|
|
4354
|
-
const viewerOptions =
|
|
4353
|
+
const { isTabVisible } = chunkODFNNB5X_js.useToolbarVisibility(p.hiddenActions);
|
|
4354
|
+
const viewerOptions = chunkODFNNB5X_js.useViewerOptionsContext();
|
|
4355
4355
|
const customization = useViewerCustomizationContext();
|
|
4356
4356
|
const belowInput = React102.useMemo(
|
|
4357
4357
|
() => ({
|
|
@@ -4448,7 +4448,7 @@ function Toolbar(p) {
|
|
|
4448
4448
|
{
|
|
4449
4449
|
type: "button",
|
|
4450
4450
|
onClick: p.onToggleCompactToolbar,
|
|
4451
|
-
className:
|
|
4451
|
+
className: chunk43TOUP5U_js.cn(
|
|
4452
4452
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
4453
4453
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
4454
4454
|
),
|
|
@@ -4474,7 +4474,7 @@ function Toolbar(p) {
|
|
|
4474
4474
|
{
|
|
4475
4475
|
ref: attachOverflow,
|
|
4476
4476
|
"data-pptx-chrome": "ribbon-content",
|
|
4477
|
-
className:
|
|
4477
|
+
className: chunk43TOUP5U_js.cn(
|
|
4478
4478
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
4479
4479
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
4480
4480
|
// children are this row's flex items too and must not shrink (a shrunk
|
|
@@ -5328,7 +5328,7 @@ function DrawingOverlaySvg({
|
|
|
5328
5328
|
onPointerDown,
|
|
5329
5329
|
onPointerMove,
|
|
5330
5330
|
onPointerUp,
|
|
5331
|
-
children: isStrokeActive && liveStrokeView ?
|
|
5331
|
+
children: isStrokeActive && liveStrokeView ? chunkODFNNB5X_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5332
5332
|
"path",
|
|
5333
5333
|
{
|
|
5334
5334
|
d: liveStrokeD,
|
|
@@ -5343,7 +5343,7 @@ function DrawingOverlaySvg({
|
|
|
5343
5343
|
}
|
|
5344
5344
|
);
|
|
5345
5345
|
}
|
|
5346
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
5346
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunk43TOUP5U_js.GRID_SIZE, visible }) {
|
|
5347
5347
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
5348
5348
|
const patternId = React102.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
5349
5349
|
if (!visible) {
|
|
@@ -5907,7 +5907,7 @@ function PictureCropOverlay({
|
|
|
5907
5907
|
};
|
|
5908
5908
|
};
|
|
5909
5909
|
const { ghost, frame, handles } = overlay;
|
|
5910
|
-
const src =
|
|
5910
|
+
const src = chunkODFNNB5X_js.imgSrc(element);
|
|
5911
5911
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5912
5912
|
"div",
|
|
5913
5913
|
{
|
|
@@ -6320,10 +6320,10 @@ function SelectionHandleOverlay({
|
|
|
6320
6320
|
position: "absolute",
|
|
6321
6321
|
left: element.x,
|
|
6322
6322
|
top: element.y,
|
|
6323
|
-
width: Math.max(element.width,
|
|
6324
|
-
height: Math.max(element.height,
|
|
6325
|
-
["--pptx-selection-width"]: `${Math.max(element.width,
|
|
6326
|
-
["--pptx-selection-height"]: `${Math.max(element.height,
|
|
6323
|
+
width: Math.max(element.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE),
|
|
6324
|
+
height: Math.max(element.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE),
|
|
6325
|
+
["--pptx-selection-width"]: `${Math.max(element.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE)}px`,
|
|
6326
|
+
["--pptx-selection-height"]: `${Math.max(element.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE)}px`,
|
|
6327
6327
|
// Every slide element carries an explicit numeric `zIndex` (see
|
|
6328
6328
|
// `getContainerStyle`), so a sibling with no z-index at all paints
|
|
6329
6329
|
// at the CSS "z-index: 0" level regardless of DOM order: any
|
|
@@ -6335,7 +6335,7 @@ function SelectionHandleOverlay({
|
|
|
6335
6335
|
// (marquee z-50, connector overlay z-55/56) to match, well clear of
|
|
6336
6336
|
// any realistic per-slide element count.
|
|
6337
6337
|
zIndex: 58,
|
|
6338
|
-
transform:
|
|
6338
|
+
transform: chunk43TOUP5U_js.getElementTransform(element),
|
|
6339
6339
|
transformOrigin: "center",
|
|
6340
6340
|
// Transparent everywhere a handle button is not, so a click that
|
|
6341
6341
|
// misses every handle still reaches the shape (or whatever is
|
|
@@ -6347,14 +6347,14 @@ function SelectionHandleOverlay({
|
|
|
6347
6347
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
6348
6348
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
6349
6349
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6350
|
-
|
|
6350
|
+
chunkODFNNB5X_js.ResizeHandles,
|
|
6351
6351
|
{
|
|
6352
6352
|
elementId: element.id,
|
|
6353
6353
|
adjustmentHandles,
|
|
6354
6354
|
onResizePointerDown,
|
|
6355
6355
|
onAdjustmentPointerDown,
|
|
6356
6356
|
rotation: element.rotation,
|
|
6357
|
-
nonRotationTransform:
|
|
6357
|
+
nonRotationTransform: chunk43TOUP5U_js.getElementTransformWithoutRotation(element),
|
|
6358
6358
|
onRotate: allow.rotatable ? onRotate : void 0,
|
|
6359
6359
|
forcePointerEvents: true
|
|
6360
6360
|
}
|
|
@@ -7058,7 +7058,7 @@ function SlideCanvas(props) {
|
|
|
7058
7058
|
props.registerInlineEditReader
|
|
7059
7059
|
]
|
|
7060
7060
|
);
|
|
7061
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7061
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
7062
7062
|
}
|
|
7063
7063
|
function SlideCanvasContent({
|
|
7064
7064
|
imagePaste,
|
|
@@ -7327,7 +7327,7 @@ function SlideCanvasContent({
|
|
|
7327
7327
|
onPointerMove: handleStagePointerMove,
|
|
7328
7328
|
onPointerUp: handleStagePointerUp,
|
|
7329
7329
|
children: [
|
|
7330
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7330
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
7331
7331
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
7332
7332
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
7333
7333
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7339,7 +7339,7 @@ function SlideCanvasContent({
|
|
|
7339
7339
|
}
|
|
7340
7340
|
),
|
|
7341
7341
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7342
|
-
|
|
7342
|
+
chunkODFNNB5X_js.ElementRenderer,
|
|
7343
7343
|
{
|
|
7344
7344
|
element,
|
|
7345
7345
|
activeSlide,
|
|
@@ -7361,7 +7361,7 @@ function SlideCanvasContent({
|
|
|
7361
7361
|
),
|
|
7362
7362
|
renderInk: false,
|
|
7363
7363
|
renderGroups: true,
|
|
7364
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7364
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunk43TOUP5U_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7365
7365
|
onResizePointerDown: stableResizePointerDown,
|
|
7366
7366
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7367
7367
|
onRotate: stableRotate,
|
|
@@ -7383,7 +7383,7 @@ function SlideCanvasContent({
|
|
|
7383
7383
|
`tpl-${element.id}`
|
|
7384
7384
|
)),
|
|
7385
7385
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7386
|
-
|
|
7386
|
+
chunkODFNNB5X_js.ElementRenderer,
|
|
7387
7387
|
{
|
|
7388
7388
|
element,
|
|
7389
7389
|
activeSlide,
|
|
@@ -7405,7 +7405,7 @@ function SlideCanvasContent({
|
|
|
7405
7405
|
),
|
|
7406
7406
|
renderInk: true,
|
|
7407
7407
|
renderGroups: true,
|
|
7408
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7408
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunk43TOUP5U_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7409
7409
|
onResizePointerDown: stableResizePointerDown,
|
|
7410
7410
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7411
7411
|
onRotate: stableRotate,
|
|
@@ -7449,7 +7449,7 @@ function SlideCanvasContent({
|
|
|
7449
7449
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7450
7450
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
7451
7451
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7452
|
-
|
|
7452
|
+
chunkODFNNB5X_js.ElementRenderer,
|
|
7453
7453
|
{
|
|
7454
7454
|
element: editingMember.member,
|
|
7455
7455
|
activeSlide,
|
|
@@ -7484,11 +7484,11 @@ function SlideCanvasContent({
|
|
|
7484
7484
|
`group-member-edit-${editingMember.member.id}`
|
|
7485
7485
|
)
|
|
7486
7486
|
] }),
|
|
7487
|
-
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !
|
|
7487
|
+
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !chunk43TOUP5U_js.isConnectorOrLineElement(selectedElement) && outlineAuthoring?.editPointsElementId !== selectedElement.id && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7488
7488
|
SelectionHandleOverlay,
|
|
7489
7489
|
{
|
|
7490
7490
|
element: selectedElement,
|
|
7491
|
-
adjustmentHandles:
|
|
7491
|
+
adjustmentHandles: chunk43TOUP5U_js.getShapeAdjustmentHandleDescriptors(selectedElement),
|
|
7492
7492
|
onResizePointerDown: stableResizePointerDown,
|
|
7493
7493
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7494
7494
|
onRotate: stableRotate,
|
|
@@ -7602,7 +7602,7 @@ function LoadingState({ className }) {
|
|
|
7602
7602
|
role: "status",
|
|
7603
7603
|
"aria-live": "polite",
|
|
7604
7604
|
"aria-atomic": "true",
|
|
7605
|
-
className:
|
|
7605
|
+
className: chunk43TOUP5U_js.cn(
|
|
7606
7606
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
7607
7607
|
className
|
|
7608
7608
|
),
|
|
@@ -7625,7 +7625,7 @@ function ErrorState({ className, error }) {
|
|
|
7625
7625
|
{
|
|
7626
7626
|
role: "alert",
|
|
7627
7627
|
"aria-live": "assertive",
|
|
7628
|
-
className:
|
|
7628
|
+
className: chunk43TOUP5U_js.cn(
|
|
7629
7629
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
7630
7630
|
className
|
|
7631
7631
|
),
|
|
@@ -7656,7 +7656,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
7656
7656
|
}
|
|
7657
7657
|
)
|
|
7658
7658
|
] }),
|
|
7659
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
7659
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunk43TOUP5U_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7660
7660
|
"div",
|
|
7661
7661
|
{
|
|
7662
7662
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -7716,14 +7716,14 @@ function AccessibilityPanel({
|
|
|
7716
7716
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
7717
7717
|
"aria-checked": reducedMotion ?? false,
|
|
7718
7718
|
onClick: onToggleReducedMotion,
|
|
7719
|
-
className:
|
|
7719
|
+
className: chunk43TOUP5U_js.cn(
|
|
7720
7720
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
7721
7721
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
7722
7722
|
),
|
|
7723
7723
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7724
7724
|
"span",
|
|
7725
7725
|
{
|
|
7726
|
-
className:
|
|
7726
|
+
className: chunk43TOUP5U_js.cn(
|
|
7727
7727
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
7728
7728
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
7729
7729
|
)
|
|
@@ -7742,7 +7742,7 @@ function AccessibilityPanel({
|
|
|
7742
7742
|
"div",
|
|
7743
7743
|
{
|
|
7744
7744
|
role: "listitem",
|
|
7745
|
-
className:
|
|
7745
|
+
className: chunk43TOUP5U_js.cn(
|
|
7746
7746
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
7747
7747
|
/* Severity-based background and text colouring */
|
|
7748
7748
|
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"
|
|
@@ -7902,7 +7902,7 @@ function ResizeHandle({
|
|
|
7902
7902
|
{
|
|
7903
7903
|
role: "separator",
|
|
7904
7904
|
"aria-orientation": direction,
|
|
7905
|
-
className:
|
|
7905
|
+
className: chunk43TOUP5U_js.cn(
|
|
7906
7906
|
// Outer container: generous hit area for easy clicking.
|
|
7907
7907
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
7908
7908
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -7913,7 +7913,7 @@ function ResizeHandle({
|
|
|
7913
7913
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7914
7914
|
"div",
|
|
7915
7915
|
{
|
|
7916
|
-
className:
|
|
7916
|
+
className: chunk43TOUP5U_js.cn(
|
|
7917
7917
|
"absolute transition-colors",
|
|
7918
7918
|
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"
|
|
7919
7919
|
)
|
|
@@ -7932,14 +7932,14 @@ function SlideThumbnailImpl({
|
|
|
7932
7932
|
}) {
|
|
7933
7933
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
7934
7934
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
7935
|
-
const width = previewWidth ??
|
|
7935
|
+
const width = previewWidth ?? chunk43TOUP5U_js.SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
7936
7936
|
const scale = width / safeCanvasWidth;
|
|
7937
7937
|
const previewHeight = pptx.editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
7938
7938
|
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
7939
7939
|
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
7940
7940
|
const { t } = reactI18next.useTranslation();
|
|
7941
7941
|
const transitionLabel = slide.transition ? (() => {
|
|
7942
|
-
const opt =
|
|
7942
|
+
const opt = chunk43TOUP5U_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
7943
7943
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
7944
7944
|
})() : void 0;
|
|
7945
7945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7965,7 +7965,7 @@ function SlideThumbnailImpl({
|
|
|
7965
7965
|
...pptx.deviceStrokeStageStyle(scale)
|
|
7966
7966
|
},
|
|
7967
7967
|
children: [
|
|
7968
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7968
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.SlideBackgroundImageLayer, { slide }),
|
|
7969
7969
|
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7970
7970
|
"div",
|
|
7971
7971
|
{
|
|
@@ -7975,7 +7975,7 @@ function SlideThumbnailImpl({
|
|
|
7975
7975
|
}
|
|
7976
7976
|
),
|
|
7977
7977
|
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7978
|
-
|
|
7978
|
+
chunkODFNNB5X_js.StaticElementRenderer,
|
|
7979
7979
|
{
|
|
7980
7980
|
element,
|
|
7981
7981
|
activeSlide: slide,
|
|
@@ -8574,7 +8574,7 @@ function SectionHeader({
|
|
|
8574
8574
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8575
8575
|
lu.LuChevronDown,
|
|
8576
8576
|
{
|
|
8577
|
-
className:
|
|
8577
|
+
className: chunk43TOUP5U_js.cn(
|
|
8578
8578
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
8579
8579
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
8580
8580
|
)
|
|
@@ -8725,7 +8725,7 @@ function LazyThumbnailInner({
|
|
|
8725
8725
|
}
|
|
8726
8726
|
var LazyThumbnail = React102__default.default.memo(LazyThumbnailInner);
|
|
8727
8727
|
function declaredSectionFacts(groups, sectionId) {
|
|
8728
|
-
const declared = groups.filter((group) => group.id !==
|
|
8728
|
+
const declared = groups.filter((group) => group.id !== chunk43TOUP5U_js.DEFAULT_SECTION_GROUP_ID && group.id !== chunk43TOUP5U_js.UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
8729
8729
|
return {
|
|
8730
8730
|
isDeclared: declared.includes(sectionId),
|
|
8731
8731
|
index: declared.indexOf(sectionId),
|
|
@@ -8810,7 +8810,7 @@ function SlideItemInner({
|
|
|
8810
8810
|
"data-pptx-chrome": "slide-row",
|
|
8811
8811
|
"aria-describedby": cue.labelId,
|
|
8812
8812
|
"data-pptx-slide-hidden": cue.marker,
|
|
8813
|
-
className:
|
|
8813
|
+
className: chunk43TOUP5U_js.cn(
|
|
8814
8814
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
8815
8815
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
8816
8816
|
isSelected && !isActive && "bg-accent/20 ring-1 ring-inset ring-primary/50",
|
|
@@ -8832,7 +8832,7 @@ function SlideItemInner({
|
|
|
8832
8832
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8833
8833
|
"span",
|
|
8834
8834
|
{
|
|
8835
|
-
className:
|
|
8835
|
+
className: chunk43TOUP5U_js.cn(
|
|
8836
8836
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
8837
8837
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
8838
8838
|
),
|
|
@@ -8855,7 +8855,7 @@ function SlideItemInner({
|
|
|
8855
8855
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8856
8856
|
"div",
|
|
8857
8857
|
{
|
|
8858
|
-
className:
|
|
8858
|
+
className: chunk43TOUP5U_js.cn(
|
|
8859
8859
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
8860
8860
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
8861
8861
|
),
|
|
@@ -9054,7 +9054,7 @@ function SlidesPaneSidebar({
|
|
|
9054
9054
|
tableStyleContext
|
|
9055
9055
|
}) {
|
|
9056
9056
|
const { t } = reactI18next.useTranslation();
|
|
9057
|
-
const collab =
|
|
9057
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
9058
9058
|
const slideRefs = React102.useRef(/* @__PURE__ */ new Map());
|
|
9059
9059
|
const renameInputRef = React102.useRef(null);
|
|
9060
9060
|
const slidePresenceMap = React102.useMemo(() => {
|
|
@@ -9079,7 +9079,7 @@ function SlidesPaneSidebar({
|
|
|
9079
9079
|
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
9080
9080
|
[canvasSize.width, canvasSize.height, previewWidth]
|
|
9081
9081
|
);
|
|
9082
|
-
const showSectionHeaders = sectionGroups.some((group) => group.id !==
|
|
9082
|
+
const showSectionHeaders = sectionGroups.some((group) => group.id !== chunk43TOUP5U_js.DEFAULT_SECTION_GROUP_ID);
|
|
9083
9083
|
const {
|
|
9084
9084
|
collapsedSections,
|
|
9085
9085
|
renamingSectionId,
|
|
@@ -9149,7 +9149,7 @@ function SlidesPaneSidebar({
|
|
|
9149
9149
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
9150
9150
|
);
|
|
9151
9151
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
9152
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
9152
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkODFNNB5X_js.useVirtualizedSlides({
|
|
9153
9153
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
9154
9154
|
itemHeight: estimatedItemHeight
|
|
9155
9155
|
});
|
|
@@ -9406,7 +9406,7 @@ function HandoutMasterPanel({
|
|
|
9406
9406
|
{
|
|
9407
9407
|
type: "button",
|
|
9408
9408
|
"aria-pressed": slidesPerPage === count,
|
|
9409
|
-
className:
|
|
9409
|
+
className: chunk43TOUP5U_js.cn(
|
|
9410
9410
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
9411
9411
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
9412
9412
|
),
|
|
@@ -9524,7 +9524,7 @@ function SlideMastersList({
|
|
|
9524
9524
|
ref: isMasterActive ? activeRef : void 0,
|
|
9525
9525
|
"aria-pressed": isMasterActive,
|
|
9526
9526
|
"aria-label": master.name || t("pptx.master.master"),
|
|
9527
|
-
className:
|
|
9527
|
+
className: chunk43TOUP5U_js.cn(
|
|
9528
9528
|
"group relative block w-full cursor-pointer rounded-lg border-2 p-1 text-left transition-all",
|
|
9529
9529
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
9530
9530
|
),
|
|
@@ -9541,7 +9541,7 @@ function SlideMastersList({
|
|
|
9541
9541
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9542
9542
|
"span",
|
|
9543
9543
|
{
|
|
9544
|
-
className:
|
|
9544
|
+
className: chunk43TOUP5U_js.cn(
|
|
9545
9545
|
"text-[10px] font-medium",
|
|
9546
9546
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
9547
9547
|
),
|
|
@@ -9560,7 +9560,7 @@ function SlideMastersList({
|
|
|
9560
9560
|
ref: isLayoutActive ? activeRef : void 0,
|
|
9561
9561
|
"aria-pressed": isLayoutActive,
|
|
9562
9562
|
"aria-label": layout.name || t("pptx.master.layout"),
|
|
9563
|
-
className:
|
|
9563
|
+
className: chunk43TOUP5U_js.cn(
|
|
9564
9564
|
"group relative block w-full cursor-pointer rounded-md border-2 p-0.5 text-left transition-all",
|
|
9565
9565
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
9566
9566
|
),
|
|
@@ -9577,7 +9577,7 @@ function SlideMastersList({
|
|
|
9577
9577
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9578
9578
|
"span",
|
|
9579
9579
|
{
|
|
9580
|
-
className:
|
|
9580
|
+
className: chunk43TOUP5U_js.cn(
|
|
9581
9581
|
"text-[9px]",
|
|
9582
9582
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
9583
9583
|
),
|
|
@@ -9669,7 +9669,7 @@ function MasterViewSidebar({
|
|
|
9669
9669
|
type: "button",
|
|
9670
9670
|
role: "tab",
|
|
9671
9671
|
"aria-selected": masterViewTab === tab.key,
|
|
9672
|
-
className:
|
|
9672
|
+
className: chunk43TOUP5U_js.cn(
|
|
9673
9673
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
9674
9674
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
9675
9675
|
),
|
|
@@ -10172,7 +10172,7 @@ function SectionBlock({
|
|
|
10172
10172
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10173
10173
|
lu.LuChevronDown,
|
|
10174
10174
|
{
|
|
10175
|
-
className:
|
|
10175
|
+
className: chunk43TOUP5U_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
10176
10176
|
}
|
|
10177
10177
|
),
|
|
10178
10178
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -10221,7 +10221,7 @@ function SlideCardImpl({
|
|
|
10221
10221
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10222
10222
|
"div",
|
|
10223
10223
|
{
|
|
10224
|
-
className:
|
|
10224
|
+
className: chunk43TOUP5U_js.cn(
|
|
10225
10225
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
10226
10226
|
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",
|
|
10227
10227
|
slide.hidden && "opacity-40"
|
|
@@ -10244,7 +10244,7 @@ function SlideCardImpl({
|
|
|
10244
10244
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10245
10245
|
"span",
|
|
10246
10246
|
{
|
|
10247
|
-
className:
|
|
10247
|
+
className: chunk43TOUP5U_js.cn(
|
|
10248
10248
|
"text-[11px] font-medium px-0.5",
|
|
10249
10249
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
10250
10250
|
),
|
|
@@ -11014,7 +11014,7 @@ function ReadingViewStage({
|
|
|
11014
11014
|
"div",
|
|
11015
11015
|
{
|
|
11016
11016
|
className: "absolute inset-0",
|
|
11017
|
-
style: { backgroundColor:
|
|
11017
|
+
style: { backgroundColor: chunk43TOUP5U_js.normalizeHexColor(slide.backgroundColor, "#ffffff") }
|
|
11018
11018
|
}
|
|
11019
11019
|
),
|
|
11020
11020
|
slide.backgroundImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11033,7 +11033,7 @@ function ReadingViewStage({
|
|
|
11033
11033
|
className: "absolute left-0 top-0 origin-top-left",
|
|
11034
11034
|
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
11035
11035
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11036
|
-
|
|
11036
|
+
chunkODFNNB5X_js.StaticElementRenderer,
|
|
11037
11037
|
{
|
|
11038
11038
|
element,
|
|
11039
11039
|
activeSlide: slide,
|
|
@@ -11245,7 +11245,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11245
11245
|
if (segment.style.fontFamily) {
|
|
11246
11246
|
style.fontFamily = segment.style.fontFamily;
|
|
11247
11247
|
}
|
|
11248
|
-
if (segment.style.hyperlink &&
|
|
11248
|
+
if (segment.style.hyperlink && chunk43TOUP5U_js.isUrlSafe(segment.style.hyperlink)) {
|
|
11249
11249
|
const safeHref = segment.style.hyperlink;
|
|
11250
11250
|
style.color = "#4a9eff";
|
|
11251
11251
|
style.textDecoration = "underline";
|
|
@@ -11258,7 +11258,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11258
11258
|
style,
|
|
11259
11259
|
onClick: (e) => {
|
|
11260
11260
|
e.preventDefault();
|
|
11261
|
-
|
|
11261
|
+
chunk43TOUP5U_js.safeOpenUrl(safeHref);
|
|
11262
11262
|
},
|
|
11263
11263
|
children: segment.text
|
|
11264
11264
|
},
|
|
@@ -11607,7 +11607,7 @@ function useSlideNotes({
|
|
|
11607
11607
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
11608
11608
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
11609
11609
|
e.preventDefault();
|
|
11610
|
-
|
|
11610
|
+
chunk43TOUP5U_js.safeOpenUrl(href);
|
|
11611
11611
|
}
|
|
11612
11612
|
}, []);
|
|
11613
11613
|
return {
|
|
@@ -11688,7 +11688,7 @@ function SlideNotesPanel({
|
|
|
11688
11688
|
});
|
|
11689
11689
|
const hasNotes = draft.trim().length > 0;
|
|
11690
11690
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
11691
|
-
const { dragY, handlers: dragHandlers } =
|
|
11691
|
+
const { dragY, handlers: dragHandlers } = chunkODFNNB5X_js.useSheetDismissDrag(onToggle);
|
|
11692
11692
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11693
11693
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11694
11694
|
"button",
|
|
@@ -11704,7 +11704,7 @@ function SlideNotesPanel({
|
|
|
11704
11704
|
{
|
|
11705
11705
|
ref: rootRef,
|
|
11706
11706
|
"data-pptx-chrome": "notes",
|
|
11707
|
-
className:
|
|
11707
|
+
className: chunk43TOUP5U_js.cn(
|
|
11708
11708
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
11709
11709
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
11710
11710
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -12068,7 +12068,7 @@ function SlideDiffRow({
|
|
|
12068
12068
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12069
12069
|
"div",
|
|
12070
12070
|
{
|
|
12071
|
-
className:
|
|
12071
|
+
className: chunk43TOUP5U_js.cn(
|
|
12072
12072
|
"rounded-lg border transition-colors",
|
|
12073
12073
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
12074
12074
|
),
|
|
@@ -12082,7 +12082,7 @@ function SlideDiffRow({
|
|
|
12082
12082
|
children: [
|
|
12083
12083
|
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" }),
|
|
12084
12084
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
12085
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
12085
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk43TOUP5U_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
12086
12086
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
12087
12087
|
diff.changes.length,
|
|
12088
12088
|
" ",
|
|
@@ -12092,7 +12092,7 @@ function SlideDiffRow({
|
|
|
12092
12092
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12093
12093
|
"span",
|
|
12094
12094
|
{
|
|
12095
|
-
className:
|
|
12095
|
+
className: chunk43TOUP5U_js.cn(
|
|
12096
12096
|
"text-[10px] font-medium",
|
|
12097
12097
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
12098
12098
|
),
|
|
@@ -12120,7 +12120,7 @@ function SlideDiffRow({
|
|
|
12120
12120
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12121
12121
|
"div",
|
|
12122
12122
|
{
|
|
12123
|
-
className:
|
|
12123
|
+
className: chunk43TOUP5U_js.cn(
|
|
12124
12124
|
"rounded border overflow-hidden",
|
|
12125
12125
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
12126
12126
|
),
|
|
@@ -12825,7 +12825,7 @@ function DocumentPropertiesDialog({
|
|
|
12825
12825
|
const handleClose = React102.useCallback(() => {
|
|
12826
12826
|
onClose();
|
|
12827
12827
|
}, [onClose]);
|
|
12828
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
12828
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(handleClose);
|
|
12829
12829
|
if (!isOpen) {
|
|
12830
12830
|
return null;
|
|
12831
12831
|
}
|
|
@@ -13422,7 +13422,7 @@ function PresentationSubtitleBar({
|
|
|
13422
13422
|
}) {
|
|
13423
13423
|
const { t } = reactI18next.useTranslation();
|
|
13424
13424
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13425
|
-
pptx.subtitleSettingsFromOptions(
|
|
13425
|
+
pptx.subtitleSettingsFromOptions(chunkODFNNB5X_js.useViewerOptionsContext()),
|
|
13426
13426
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13427
13427
|
);
|
|
13428
13428
|
const [captionText, setCaptionText] = React102.useState("");
|
|
@@ -13590,7 +13590,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13590
13590
|
{
|
|
13591
13591
|
className: "absolute inset-0",
|
|
13592
13592
|
style: {
|
|
13593
|
-
backgroundColor:
|
|
13593
|
+
backgroundColor: chunk43TOUP5U_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
13594
13594
|
}
|
|
13595
13595
|
}
|
|
13596
13596
|
),
|
|
@@ -13616,7 +13616,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13616
13616
|
...pptx.deviceStrokeStageStyle(scale)
|
|
13617
13617
|
},
|
|
13618
13618
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13619
|
-
|
|
13619
|
+
chunkODFNNB5X_js.StaticElementRenderer,
|
|
13620
13620
|
{
|
|
13621
13621
|
element,
|
|
13622
13622
|
activeSlide: slide,
|
|
@@ -14333,7 +14333,7 @@ function getElementDisplayName(element, index) {
|
|
|
14333
14333
|
if (element.name && element.name.trim().length > 0) {
|
|
14334
14334
|
return element.name.trim();
|
|
14335
14335
|
}
|
|
14336
|
-
if ((0,
|
|
14336
|
+
if ((0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) && element.text && element.text.trim().length > 0) {
|
|
14337
14337
|
return element.text.trim().slice(0, 32);
|
|
14338
14338
|
}
|
|
14339
14339
|
const label = TYPE_LABELS[element.type] ?? "Object";
|
|
@@ -14506,7 +14506,7 @@ function SelectionPane({
|
|
|
14506
14506
|
setDragIndex(null);
|
|
14507
14507
|
setDragOverIndex(null);
|
|
14508
14508
|
},
|
|
14509
|
-
className:
|
|
14509
|
+
className: chunk43TOUP5U_js.cn(
|
|
14510
14510
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
14511
14511
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
14512
14512
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -14560,13 +14560,13 @@ function SelectionPane({
|
|
|
14560
14560
|
}
|
|
14561
14561
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14562
14562
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14563
|
-
var ENTRANCE_PRESETS =
|
|
14563
|
+
var ENTRANCE_PRESETS = chunk43TOUP5U_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14564
14564
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
14565
14565
|
);
|
|
14566
|
-
var EXIT_PRESETS =
|
|
14566
|
+
var EXIT_PRESETS = chunk43TOUP5U_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14567
14567
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
14568
14568
|
);
|
|
14569
|
-
var EMPHASIS_PRESETS =
|
|
14569
|
+
var EMPHASIS_PRESETS = chunk43TOUP5U_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14570
14570
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
14571
14571
|
);
|
|
14572
14572
|
var TIMING_CURVE_OPTIONS = [
|
|
@@ -14733,7 +14733,7 @@ function AnimationTimelineSection({
|
|
|
14733
14733
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14734
14734
|
"div",
|
|
14735
14735
|
{
|
|
14736
|
-
className:
|
|
14736
|
+
className: chunk43TOUP5U_js.cn(
|
|
14737
14737
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
14738
14738
|
animationTypeColor(bar.anim),
|
|
14739
14739
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -14762,7 +14762,7 @@ function AnimationTimelineSection({
|
|
|
14762
14762
|
onDragLeave: handleDragLeave,
|
|
14763
14763
|
onDrop: (e) => handleDrop(index, e),
|
|
14764
14764
|
title: t("pptx.animation.nativeEffectHint"),
|
|
14765
|
-
className:
|
|
14765
|
+
className: chunk43TOUP5U_js.cn(
|
|
14766
14766
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] italic",
|
|
14767
14767
|
"bg-muted/20 text-muted-foreground/70",
|
|
14768
14768
|
isDragOver && "border-t-2 border-primary"
|
|
@@ -14801,7 +14801,7 @@ function AnimationTimelineSection({
|
|
|
14801
14801
|
onDragEnd: handleDragEnd,
|
|
14802
14802
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
14803
14803
|
onMouseLeave: handleAnimationHoverEnd,
|
|
14804
|
-
className:
|
|
14804
|
+
className: chunk43TOUP5U_js.cn(
|
|
14805
14805
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
14806
14806
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
14807
14807
|
isDragging && "opacity-40",
|
|
@@ -14933,7 +14933,7 @@ function EffectSoundRow({
|
|
|
14933
14933
|
}
|
|
14934
14934
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
14935
14935
|
if (asset) {
|
|
14936
|
-
|
|
14936
|
+
chunkODFNNB5X_js.playAnimationSound(asset.dataUrl);
|
|
14937
14937
|
}
|
|
14938
14938
|
};
|
|
14939
14939
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15108,7 +15108,7 @@ function useAnimationPreview({
|
|
|
15108
15108
|
}) {
|
|
15109
15109
|
const handleAnimationHover = React102.useCallback((anim) => {
|
|
15110
15110
|
if (anim.motionPath) {
|
|
15111
|
-
|
|
15111
|
+
chunk43TOUP5U_js.startMotionPathPreview(anim.elementId, anim.motionPath, {
|
|
15112
15112
|
durationMs: anim.durationMs,
|
|
15113
15113
|
delayMs: anim.delayMs,
|
|
15114
15114
|
timingCurve: anim.timingCurve
|
|
@@ -15119,19 +15119,19 @@ function useAnimationPreview({
|
|
|
15119
15119
|
if (!preset || preset === "none") {
|
|
15120
15120
|
return;
|
|
15121
15121
|
}
|
|
15122
|
-
|
|
15122
|
+
chunk43TOUP5U_js.startPreviewAnimation(anim.elementId, preset, {
|
|
15123
15123
|
direction: anim.direction,
|
|
15124
15124
|
durationMs: anim.durationMs ?? 500,
|
|
15125
15125
|
timingCurve: anim.timingCurve
|
|
15126
15126
|
});
|
|
15127
15127
|
}, []);
|
|
15128
|
-
const handleAnimationHoverEnd = React102.useCallback(() =>
|
|
15128
|
+
const handleAnimationHoverEnd = React102.useCallback(() => chunk43TOUP5U_js.stopPreviewAnimation(), []);
|
|
15129
15129
|
const handlePreviewClick = React102.useCallback(() => {
|
|
15130
15130
|
if (!selectedElementAnimation) {
|
|
15131
15131
|
return;
|
|
15132
15132
|
}
|
|
15133
15133
|
if (selectedElementAnimation.motionPath) {
|
|
15134
|
-
|
|
15134
|
+
chunk43TOUP5U_js.startMotionPathPreview(selectedElementId, selectedElementAnimation.motionPath, {
|
|
15135
15135
|
durationMs: selectedElementAnimation.durationMs,
|
|
15136
15136
|
delayMs: selectedElementAnimation.delayMs,
|
|
15137
15137
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15142,7 +15142,7 @@ function useAnimationPreview({
|
|
|
15142
15142
|
if (!preset || preset === "none") {
|
|
15143
15143
|
return;
|
|
15144
15144
|
}
|
|
15145
|
-
|
|
15145
|
+
chunk43TOUP5U_js.startPreviewAnimation(selectedElementId, preset, {
|
|
15146
15146
|
direction: selectedElementAnimation.direction,
|
|
15147
15147
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
15148
15148
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15376,8 +15376,8 @@ function useAnimationHandlers({
|
|
|
15376
15376
|
if (!el) {
|
|
15377
15377
|
return anim.elementId.slice(0, 8);
|
|
15378
15378
|
}
|
|
15379
|
-
const text = (0,
|
|
15380
|
-
return text ||
|
|
15379
|
+
const text = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el.text : void 0;
|
|
15380
|
+
return text || chunk43TOUP5U_js.getElementLabel(el);
|
|
15381
15381
|
},
|
|
15382
15382
|
[activeSlide.elements]
|
|
15383
15383
|
);
|
|
@@ -15387,8 +15387,8 @@ function useAnimationHandlers({
|
|
|
15387
15387
|
if (!el) {
|
|
15388
15388
|
return id.slice(0, 8);
|
|
15389
15389
|
}
|
|
15390
|
-
const text = (0,
|
|
15391
|
-
return text ||
|
|
15390
|
+
const text = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el.text : void 0;
|
|
15391
|
+
return text || chunk43TOUP5U_js.getElementLabel(el);
|
|
15392
15392
|
}).join(", "),
|
|
15393
15393
|
[activeSlide.elements]
|
|
15394
15394
|
);
|
|
@@ -15445,7 +15445,7 @@ function AnimationPanel({
|
|
|
15445
15445
|
onUpdateSlide
|
|
15446
15446
|
}) {
|
|
15447
15447
|
const { t } = reactI18next.useTranslation();
|
|
15448
|
-
const { viewportWidth } =
|
|
15448
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
15449
15449
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15450
15450
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15451
15451
|
const handlers = useAnimationHandlers({
|
|
@@ -15573,7 +15573,7 @@ function AnimationPanel({
|
|
|
15573
15573
|
type: "button",
|
|
15574
15574
|
disabled: !canEdit,
|
|
15575
15575
|
style: { minWidth: directionBtnPx, minHeight: directionBtnPx },
|
|
15576
|
-
className:
|
|
15576
|
+
className: chunk43TOUP5U_js.cn(
|
|
15577
15577
|
"flex items-center justify-center rounded border transition-colors",
|
|
15578
15578
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
15579
15579
|
),
|
|
@@ -15639,7 +15639,7 @@ function AnimationPanel({
|
|
|
15639
15639
|
style: fieldStyle,
|
|
15640
15640
|
children: [
|
|
15641
15641
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
15642
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
15642
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunk43TOUP5U_js.getElementLabel(el) }, el.id))
|
|
15643
15643
|
]
|
|
15644
15644
|
}
|
|
15645
15645
|
)
|
|
@@ -15798,7 +15798,7 @@ function ActionTargetFields({
|
|
|
15798
15798
|
type: "text",
|
|
15799
15799
|
disabled: !canEdit,
|
|
15800
15800
|
"aria-label": t(urlLabelKey),
|
|
15801
|
-
className:
|
|
15801
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-full"),
|
|
15802
15802
|
placeholder: "https://...",
|
|
15803
15803
|
value: url ?? "",
|
|
15804
15804
|
onChange: (e) => onChange({ url: e.target.value })
|
|
@@ -15812,7 +15812,7 @@ function ActionTargetFields({
|
|
|
15812
15812
|
type: "number",
|
|
15813
15813
|
disabled: !canEdit,
|
|
15814
15814
|
"aria-label": t("pptx.action.gotoSlide"),
|
|
15815
|
-
className:
|
|
15815
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-full"),
|
|
15816
15816
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
15817
15817
|
min: 1,
|
|
15818
15818
|
max: slideCount,
|
|
@@ -15834,7 +15834,7 @@ function ActionTargetFields({
|
|
|
15834
15834
|
"data-testid": "pptx-action-custom-show",
|
|
15835
15835
|
disabled: !canEdit,
|
|
15836
15836
|
"aria-label": t("pptx.hyperlink.customShowLabel"),
|
|
15837
|
-
className:
|
|
15837
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-full"),
|
|
15838
15838
|
value: customShowId ?? "",
|
|
15839
15839
|
onChange: (e) => onChange({ customShowId: e.target.value, returnAfter }),
|
|
15840
15840
|
children: [
|
|
@@ -15867,11 +15867,11 @@ function ActionSettingsPanel({
|
|
|
15867
15867
|
onUpdateElement
|
|
15868
15868
|
}) {
|
|
15869
15869
|
const { t } = reactI18next.useTranslation();
|
|
15870
|
-
const clickAction = selectedElement.actionClick ? (0,
|
|
15871
|
-
const hoverAction = selectedElement.actionHover ? (0,
|
|
15870
|
+
const clickAction = selectedElement.actionClick ? (0, chunk43TOUP5U_js.dist_exports.pptxActionToElementAction)(selectedElement.actionClick, "click") : void 0;
|
|
15871
|
+
const hoverAction = selectedElement.actionHover ? (0, chunk43TOUP5U_js.dist_exports.pptxActionToElementAction)(selectedElement.actionHover, "hover") : void 0;
|
|
15872
15872
|
const updateAction = (trigger, type, patch) => {
|
|
15873
15873
|
const ea = { trigger, type, ...patch };
|
|
15874
|
-
const pa = (0,
|
|
15874
|
+
const pa = (0, chunk43TOUP5U_js.dist_exports.elementActionToPptxAction)(ea);
|
|
15875
15875
|
if (trigger === "click") {
|
|
15876
15876
|
onUpdateElement({ actionClick: pa });
|
|
15877
15877
|
} else {
|
|
@@ -15956,7 +15956,7 @@ function ActionTriggerSection({
|
|
|
15956
15956
|
{
|
|
15957
15957
|
disabled: !canEdit,
|
|
15958
15958
|
"aria-label": label,
|
|
15959
|
-
className:
|
|
15959
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-full"),
|
|
15960
15960
|
value: effectiveType,
|
|
15961
15961
|
onChange: (e) => changeType(e.target.value),
|
|
15962
15962
|
children: pptx.ELEMENT_ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.labelKey) }, o.value))
|
|
@@ -16344,7 +16344,7 @@ function ChartDataGrid({
|
|
|
16344
16344
|
}) {
|
|
16345
16345
|
const { t } = reactI18next.useTranslation();
|
|
16346
16346
|
const highlightRef = React102.useRef(null);
|
|
16347
|
-
const { viewportWidth } =
|
|
16347
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
16348
16348
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
16349
16349
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
16350
16350
|
const rowHeaderClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10 bg-card" : "";
|
|
@@ -17701,8 +17701,8 @@ function ChartUserShapeOptions({
|
|
|
17701
17701
|
}
|
|
17702
17702
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17703
17703
|
const chartData = selectedElement.chartData;
|
|
17704
|
-
const followDataPoint =
|
|
17705
|
-
const { selection: partSelection } =
|
|
17704
|
+
const followDataPoint = chunkODFNNB5X_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17705
|
+
const { selection: partSelection } = chunkODFNNB5X_js.useChartPartSelection();
|
|
17706
17706
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17707
17707
|
const title = chartData?.title;
|
|
17708
17708
|
const chartType = chartData?.chartType;
|
|
@@ -17916,40 +17916,40 @@ function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
|
17916
17916
|
[chartData, selectedElement, replaceChartData]
|
|
17917
17917
|
);
|
|
17918
17918
|
const setAxisLogScale = React102.useCallback(
|
|
17919
|
-
(axisType, opts) => applyChartOp((el) => (0,
|
|
17919
|
+
(axisType, opts) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartAxisLogScale)(el, axisType, opts)),
|
|
17920
17920
|
[applyChartOp]
|
|
17921
17921
|
);
|
|
17922
17922
|
const setAxisTitleStyle = React102.useCallback(
|
|
17923
|
-
(axisType, edit) => applyChartOp((el) => (0,
|
|
17923
|
+
(axisType, edit) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartAxisTitleStyle)(el, axisType, edit)),
|
|
17924
17924
|
[applyChartOp]
|
|
17925
17925
|
);
|
|
17926
17926
|
const setGridlineStyle = React102.useCallback(
|
|
17927
|
-
(axisType, which, edit) => applyChartOp((el) => (0,
|
|
17927
|
+
(axisType, which, edit) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartAxisGridlineStyle)(el, axisType, which, edit)),
|
|
17928
17928
|
[applyChartOp]
|
|
17929
17929
|
);
|
|
17930
17930
|
const setSeriesMarker = React102.useCallback(
|
|
17931
|
-
(index, marker) => applyChartOp((el) => (0,
|
|
17931
|
+
(index, marker) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartSeriesMarker)(el, index, marker)),
|
|
17932
17932
|
[applyChartOp]
|
|
17933
17933
|
);
|
|
17934
17934
|
const setSeriesType = React102.useCallback(
|
|
17935
|
-
(index, seriesType) => applyChartOp((el) => (0,
|
|
17935
|
+
(index, seriesType) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartSeriesChartType)(el, index, seriesType)),
|
|
17936
17936
|
[applyChartOp]
|
|
17937
17937
|
);
|
|
17938
17938
|
const setPointFill = React102.useCallback(
|
|
17939
|
-
(seriesIndex, pointIndex, color) => applyChartOp((el) => (0,
|
|
17939
|
+
(seriesIndex, pointIndex, color) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartDataPointFill)(el, seriesIndex, pointIndex, color)),
|
|
17940
17940
|
[applyChartOp]
|
|
17941
17941
|
);
|
|
17942
17942
|
const setPointExplosion = React102.useCallback(
|
|
17943
|
-
(seriesIndex, pointIndex, explosion) => applyChartOp((el) => (0,
|
|
17943
|
+
(seriesIndex, pointIndex, explosion) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartDataPointExplosion)(el, seriesIndex, pointIndex, explosion)),
|
|
17944
17944
|
[applyChartOp]
|
|
17945
17945
|
);
|
|
17946
17946
|
const setPointMarker = React102.useCallback(
|
|
17947
|
-
(seriesIndex, pointIndex, marker) => applyChartOp((el) => (0,
|
|
17947
|
+
(seriesIndex, pointIndex, marker) => applyChartOp((el) => (0, chunk43TOUP5U_js.dist_exports.setChartDataPointMarker)(el, seriesIndex, pointIndex, marker)),
|
|
17948
17948
|
[applyChartOp]
|
|
17949
17949
|
);
|
|
17950
17950
|
const setPointLabel = React102.useCallback(
|
|
17951
17951
|
(seriesIndex, pointIndex, text) => applyChartOp(
|
|
17952
|
-
(el) => (0,
|
|
17952
|
+
(el) => (0, chunk43TOUP5U_js.dist_exports.setChartDataPointLabel)(el, seriesIndex, pointIndex, text !== null ? { text } : null)
|
|
17953
17953
|
),
|
|
17954
17954
|
[applyChartOp]
|
|
17955
17955
|
);
|
|
@@ -18217,17 +18217,17 @@ function OleEditorDialog({
|
|
|
18217
18217
|
const kind = descriptor.contentTab.kind;
|
|
18218
18218
|
const load = async () => {
|
|
18219
18219
|
if (kind === "sheet") {
|
|
18220
|
-
const value = await (0,
|
|
18220
|
+
const value = await (0, chunk43TOUP5U_js.dist_exports.getOleSheetGrid)(element);
|
|
18221
18221
|
if (!cancelled) {
|
|
18222
18222
|
setGrid(value);
|
|
18223
18223
|
}
|
|
18224
18224
|
} else if (kind === "document") {
|
|
18225
|
-
const value = await (0,
|
|
18225
|
+
const value = await (0, chunk43TOUP5U_js.dist_exports.getOleDocumentParagraphs)(element);
|
|
18226
18226
|
if (!cancelled) {
|
|
18227
18227
|
setParagraphs(value);
|
|
18228
18228
|
}
|
|
18229
18229
|
} else if (kind === "deck") {
|
|
18230
|
-
const value = await (0,
|
|
18230
|
+
const value = await (0, chunk43TOUP5U_js.dist_exports.getOleNestedDeckDetail)(element);
|
|
18231
18231
|
if (!cancelled) {
|
|
18232
18232
|
setDeckSlides(value);
|
|
18233
18233
|
}
|
|
@@ -18253,9 +18253,9 @@ function OleEditorDialog({
|
|
|
18253
18253
|
const handleCellEdit = React102.useCallback(
|
|
18254
18254
|
async (row, col, value) => {
|
|
18255
18255
|
try {
|
|
18256
|
-
const updated = await (0,
|
|
18256
|
+
const updated = await (0, chunk43TOUP5U_js.dist_exports.applyOleSheetCellEdit)(element, { row, col, value });
|
|
18257
18257
|
commit(updated);
|
|
18258
|
-
const refreshed = await (0,
|
|
18258
|
+
const refreshed = await (0, chunk43TOUP5U_js.dist_exports.getOleSheetGrid)(updated);
|
|
18259
18259
|
if (mountedRef.current) {
|
|
18260
18260
|
setGrid(refreshed);
|
|
18261
18261
|
}
|
|
@@ -18270,9 +18270,9 @@ function OleEditorDialog({
|
|
|
18270
18270
|
const handleParagraphEdit = React102.useCallback(
|
|
18271
18271
|
async (index, text) => {
|
|
18272
18272
|
try {
|
|
18273
|
-
const updated = await (0,
|
|
18273
|
+
const updated = await (0, chunk43TOUP5U_js.dist_exports.applyOleDocumentParagraphEdit)(element, index, text);
|
|
18274
18274
|
commit(updated);
|
|
18275
|
-
const refreshed = await (0,
|
|
18275
|
+
const refreshed = await (0, chunk43TOUP5U_js.dist_exports.getOleDocumentParagraphs)(updated);
|
|
18276
18276
|
if (mountedRef.current) {
|
|
18277
18277
|
setParagraphs(refreshed);
|
|
18278
18278
|
}
|
|
@@ -18287,14 +18287,14 @@ function OleEditorDialog({
|
|
|
18287
18287
|
const handleDeckElementEdit = React102.useCallback(
|
|
18288
18288
|
async (slideIndex, deckElementId, text) => {
|
|
18289
18289
|
try {
|
|
18290
|
-
const updated = await (0,
|
|
18290
|
+
const updated = await (0, chunk43TOUP5U_js.dist_exports.applyOleNestedDeckElementTextEdit)(
|
|
18291
18291
|
element,
|
|
18292
18292
|
slideIndex,
|
|
18293
18293
|
deckElementId,
|
|
18294
18294
|
text
|
|
18295
18295
|
);
|
|
18296
18296
|
commit(updated);
|
|
18297
|
-
const refreshed = await (0,
|
|
18297
|
+
const refreshed = await (0, chunk43TOUP5U_js.dist_exports.getOleNestedDeckDetail)(updated);
|
|
18298
18298
|
if (mountedRef.current) {
|
|
18299
18299
|
setDeckSlides(refreshed);
|
|
18300
18300
|
}
|
|
@@ -18310,7 +18310,7 @@ function OleEditorDialog({
|
|
|
18310
18310
|
async (file) => {
|
|
18311
18311
|
try {
|
|
18312
18312
|
const bytes = new Uint8Array(await file.arrayBuffer());
|
|
18313
|
-
const updated = await (0,
|
|
18313
|
+
const updated = await (0, chunk43TOUP5U_js.dist_exports.replaceOleFile)(element, bytes, file.name);
|
|
18314
18314
|
commit(updated);
|
|
18315
18315
|
if (mountedRef.current) {
|
|
18316
18316
|
onClose();
|
|
@@ -18459,7 +18459,7 @@ function ConnectorArrowsSection({
|
|
|
18459
18459
|
},
|
|
18460
18460
|
disabled: !canEdit,
|
|
18461
18461
|
className: SELECT_CLS2,
|
|
18462
|
-
children:
|
|
18462
|
+
children: chunk43TOUP5U_js.CONNECTOR_ARROW_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18463
18463
|
}
|
|
18464
18464
|
)
|
|
18465
18465
|
] }, end);
|
|
@@ -18483,7 +18483,7 @@ function ConnectorArrowsSection({
|
|
|
18483
18483
|
},
|
|
18484
18484
|
disabled: !canEdit,
|
|
18485
18485
|
className: SELECT_CLS2,
|
|
18486
|
-
children:
|
|
18486
|
+
children: chunk43TOUP5U_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18487
18487
|
}
|
|
18488
18488
|
)
|
|
18489
18489
|
] }),
|
|
@@ -18502,7 +18502,7 @@ function ConnectorArrowsSection({
|
|
|
18502
18502
|
},
|
|
18503
18503
|
disabled: !canEdit,
|
|
18504
18504
|
className: SELECT_CLS2,
|
|
18505
|
-
children:
|
|
18505
|
+
children: chunk43TOUP5U_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18506
18506
|
}
|
|
18507
18507
|
)
|
|
18508
18508
|
] })
|
|
@@ -18582,7 +18582,7 @@ function OlePropertiesPanel({
|
|
|
18582
18582
|
] }),
|
|
18583
18583
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18584
18584
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.type") }),
|
|
18585
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground truncate", children: (0,
|
|
18585
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground truncate", children: (0, chunk43TOUP5U_js.dist_exports.getOleObjectTypeLabel)(ole.oleObjectType) })
|
|
18586
18586
|
] }),
|
|
18587
18587
|
ole.fileName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18588
18588
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.fileName") }),
|
|
@@ -18593,7 +18593,7 @@ function OlePropertiesPanel({
|
|
|
18593
18593
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18594
18594
|
"span",
|
|
18595
18595
|
{
|
|
18596
|
-
className:
|
|
18596
|
+
className: chunk43TOUP5U_js.cn(
|
|
18597
18597
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
18598
18598
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
18599
18599
|
),
|
|
@@ -18661,7 +18661,7 @@ function LayerOrderButtons({
|
|
|
18661
18661
|
"button",
|
|
18662
18662
|
{
|
|
18663
18663
|
type: "button",
|
|
18664
|
-
className:
|
|
18664
|
+
className: chunk43TOUP5U_js.cn("flex-1", BTN2),
|
|
18665
18665
|
disabled: !canEdit,
|
|
18666
18666
|
onClick: () => onMoveLayer("forward"),
|
|
18667
18667
|
children: "\u2191 Forward"
|
|
@@ -18671,7 +18671,7 @@ function LayerOrderButtons({
|
|
|
18671
18671
|
"button",
|
|
18672
18672
|
{
|
|
18673
18673
|
type: "button",
|
|
18674
|
-
className:
|
|
18674
|
+
className: chunk43TOUP5U_js.cn("flex-1", BTN2),
|
|
18675
18675
|
disabled: !canEdit,
|
|
18676
18676
|
onClick: () => onMoveLayer("backward"),
|
|
18677
18677
|
children: "\u2193 Backward"
|
|
@@ -18695,7 +18695,7 @@ function ArtisticEffectsGallery({
|
|
|
18695
18695
|
{
|
|
18696
18696
|
type: "button",
|
|
18697
18697
|
disabled: !canEdit,
|
|
18698
|
-
className:
|
|
18698
|
+
className: chunk43TOUP5U_js.cn(
|
|
18699
18699
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
18700
18700
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
18701
18701
|
),
|
|
@@ -18757,7 +18757,7 @@ function ColorChangeSection({
|
|
|
18757
18757
|
DebouncedColorInput,
|
|
18758
18758
|
{
|
|
18759
18759
|
disabled: !canEdit,
|
|
18760
|
-
value:
|
|
18760
|
+
value: chunk43TOUP5U_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
18761
18761
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18762
18762
|
onCommit: (hex) => updateEffects({
|
|
18763
18763
|
clrChange: {
|
|
@@ -18775,7 +18775,7 @@ function ColorChangeSection({
|
|
|
18775
18775
|
DebouncedColorInput,
|
|
18776
18776
|
{
|
|
18777
18777
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
18778
|
-
value:
|
|
18778
|
+
value: chunk43TOUP5U_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
18779
18779
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18780
18780
|
onCommit: (hex) => updateEffects({
|
|
18781
18781
|
clrChange: {
|
|
@@ -18835,7 +18835,7 @@ function ColorWashSection({
|
|
|
18835
18835
|
DebouncedColorInput,
|
|
18836
18836
|
{
|
|
18837
18837
|
disabled: !canEdit,
|
|
18838
|
-
value:
|
|
18838
|
+
value: chunk43TOUP5U_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
18839
18839
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18840
18840
|
onCommit: (hex) => updateEffects({
|
|
18841
18841
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -18938,8 +18938,8 @@ function DuotonePanel({
|
|
|
18938
18938
|
}
|
|
18939
18939
|
});
|
|
18940
18940
|
}, [effects, onUpdateElement]);
|
|
18941
|
-
const shadowColor =
|
|
18942
|
-
const highlightColor =
|
|
18941
|
+
const shadowColor = chunk43TOUP5U_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
18942
|
+
const highlightColor = chunk43TOUP5U_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
18943
18943
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
18944
18944
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
18945
18945
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -18970,7 +18970,7 @@ function DuotonePanel({
|
|
|
18970
18970
|
] }),
|
|
18971
18971
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
18972
18972
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
18973
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
18973
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkODFNNB5X_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18974
18974
|
"button",
|
|
18975
18975
|
{
|
|
18976
18976
|
type: "button",
|
|
@@ -19108,7 +19108,7 @@ function ImageCropSection({
|
|
|
19108
19108
|
onUpdateElement
|
|
19109
19109
|
}) {
|
|
19110
19110
|
const { t } = reactI18next.useTranslation();
|
|
19111
|
-
if (!(0,
|
|
19111
|
+
if (!(0, chunk43TOUP5U_js.dist_exports.isImageLikeElement)(selectedElement)) {
|
|
19112
19112
|
return null;
|
|
19113
19113
|
}
|
|
19114
19114
|
const croppable = pptx.cropResetState(selectedElement, canEdit, true).enabled;
|
|
@@ -19125,7 +19125,7 @@ function ImageCropSection({
|
|
|
19125
19125
|
max: MAX_CROP_PERCENT,
|
|
19126
19126
|
disabled: !croppable,
|
|
19127
19127
|
className: "accent-primary",
|
|
19128
|
-
value: Math.round(
|
|
19128
|
+
value: Math.round(chunk43TOUP5U_js.clampCropValue(selectedElement[key]) * 100),
|
|
19129
19129
|
onChange: (e) => onUpdateElement({
|
|
19130
19130
|
[key]: Number(e.target.value) / 100
|
|
19131
19131
|
})
|
|
@@ -19189,7 +19189,7 @@ function ImagePropertiesPanel({
|
|
|
19189
19189
|
{
|
|
19190
19190
|
rows: 2,
|
|
19191
19191
|
disabled: !canEdit,
|
|
19192
|
-
className:
|
|
19192
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
19193
19193
|
value: selectedElement.altText ?? "",
|
|
19194
19194
|
onChange: (e) => onUpdateElement({
|
|
19195
19195
|
altText: e.target.value
|
|
@@ -20129,7 +20129,7 @@ function AccessibilityTextSection({
|
|
|
20129
20129
|
rows: 2,
|
|
20130
20130
|
disabled: !canEdit,
|
|
20131
20131
|
placeholder: t("pptx.elementAccessibility.altTextPlaceholder"),
|
|
20132
|
-
className:
|
|
20132
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
20133
20133
|
value: fields.altText,
|
|
20134
20134
|
onChange: (e) => onUpdateElement({ altText: e.target.value })
|
|
20135
20135
|
}
|
|
@@ -20143,7 +20143,7 @@ function AccessibilityTextSection({
|
|
|
20143
20143
|
type: "text",
|
|
20144
20144
|
disabled: !canEdit,
|
|
20145
20145
|
placeholder: t("pptx.elementAccessibility.titlePlaceholder"),
|
|
20146
|
-
className:
|
|
20146
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "text-[11px]"),
|
|
20147
20147
|
value: fields.title,
|
|
20148
20148
|
onChange: (e) => onUpdateElement({ title: e.target.value })
|
|
20149
20149
|
}
|
|
@@ -20259,7 +20259,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20259
20259
|
angle = (Math.atan2(offsetY, offsetX) * 180 / Math.PI + 360) % 360;
|
|
20260
20260
|
}
|
|
20261
20261
|
return {
|
|
20262
|
-
shadowColor:
|
|
20262
|
+
shadowColor: chunk43TOUP5U_js.normalizeHexColor(s?.shadowColor, "#000000"),
|
|
20263
20263
|
shadowOpacity: s?.shadowOpacity ?? 0.35,
|
|
20264
20264
|
shadowBlur: s?.shadowBlur ?? 6,
|
|
20265
20265
|
shadowAngle: angle,
|
|
@@ -20275,7 +20275,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20275
20275
|
key: "sc",
|
|
20276
20276
|
label: "Shadow Color",
|
|
20277
20277
|
type: "color",
|
|
20278
|
-
read: (s) =>
|
|
20278
|
+
read: (s) => chunk43TOUP5U_js.normalizeHexColor(s?.shadowColor, "#000000"),
|
|
20279
20279
|
write: (v) => ({ shadowColor: String(v) })
|
|
20280
20280
|
},
|
|
20281
20281
|
{
|
|
@@ -20411,7 +20411,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20411
20411
|
label: "Inner Shadow",
|
|
20412
20412
|
isOn: (s) => Boolean(s?.innerShadowColor) && s?.innerShadowColor !== "transparent",
|
|
20413
20413
|
onEnable: (s) => ({
|
|
20414
|
-
innerShadowColor:
|
|
20414
|
+
innerShadowColor: chunk43TOUP5U_js.normalizeHexColor(s?.innerShadowColor, "#000000"),
|
|
20415
20415
|
innerShadowOpacity: s?.innerShadowOpacity ?? 0.5,
|
|
20416
20416
|
innerShadowBlur: s?.innerShadowBlur ?? 5,
|
|
20417
20417
|
innerShadowOffsetX: s?.innerShadowOffsetX ?? 0,
|
|
@@ -20423,7 +20423,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20423
20423
|
key: "isc",
|
|
20424
20424
|
label: "Color",
|
|
20425
20425
|
type: "color",
|
|
20426
|
-
read: (s) =>
|
|
20426
|
+
read: (s) => chunk43TOUP5U_js.normalizeHexColor(s?.innerShadowColor, "#000000"),
|
|
20427
20427
|
write: (v) => ({ innerShadowColor: String(v) })
|
|
20428
20428
|
},
|
|
20429
20429
|
{
|
|
@@ -20763,7 +20763,10 @@ function ThemeColorSwatchGrid({
|
|
|
20763
20763
|
}) {
|
|
20764
20764
|
const { t } = reactI18next.useTranslation();
|
|
20765
20765
|
const themeColorMap = useThemeColorMap();
|
|
20766
|
-
const columns = React102.useMemo(
|
|
20766
|
+
const columns = React102.useMemo(
|
|
20767
|
+
() => pptx.buildThemeColorSwatchGrid(themeColorMap, (key, params) => t(key, params)),
|
|
20768
|
+
[themeColorMap, t]
|
|
20769
|
+
);
|
|
20767
20770
|
const rows = React102.useMemo(() => pptx.themeColorSwatchRows(columns), [columns]);
|
|
20768
20771
|
const selected = React102.useMemo(
|
|
20769
20772
|
() => pptx.findSelectedThemeSwatch(columns, selectedRef, selectedHex),
|
|
@@ -20933,7 +20936,7 @@ function ColorPickerRow({
|
|
|
20933
20936
|
pushColor(color);
|
|
20934
20937
|
};
|
|
20935
20938
|
const handleEyedropper = async () => {
|
|
20936
|
-
const color = await
|
|
20939
|
+
const color = await chunk43TOUP5U_js.openNativeEyeDropper();
|
|
20937
20940
|
if (color) {
|
|
20938
20941
|
commit(color);
|
|
20939
20942
|
}
|
|
@@ -20985,8 +20988,8 @@ function ColorPickerRow({
|
|
|
20985
20988
|
type: "button",
|
|
20986
20989
|
className: `${SWATCH} ${DIS}`,
|
|
20987
20990
|
style: { backgroundColor: c.hex },
|
|
20988
|
-
title: `${label} ${c
|
|
20989
|
-
"aria-label": `${label} ${c
|
|
20991
|
+
title: `${label} ${pptx.officeColorSwatchLabel(c, (key) => t(key))}`,
|
|
20992
|
+
"aria-label": `${label} ${pptx.officeColorSwatchLabel(c, (key) => t(key))}`,
|
|
20990
20993
|
"data-pptx-compact": true,
|
|
20991
20994
|
disabled,
|
|
20992
20995
|
onClick: () => commit(c.hex)
|
|
@@ -21016,9 +21019,9 @@ function GradientStopRow({
|
|
|
21016
21019
|
"input",
|
|
21017
21020
|
{
|
|
21018
21021
|
type: "color",
|
|
21019
|
-
value:
|
|
21022
|
+
value: chunk43TOUP5U_js.normalizeHexColor(stop2.color, "#3b82f6"),
|
|
21020
21023
|
onChange: (e) => {
|
|
21021
|
-
const hex =
|
|
21024
|
+
const hex = chunk43TOUP5U_js.normalizeHexColor(e.target.value, "#3b82f6");
|
|
21022
21025
|
patchStop({ color: hex, colorRef: void 0 });
|
|
21023
21026
|
pushColor(hex);
|
|
21024
21027
|
},
|
|
@@ -21143,7 +21146,7 @@ function FillAdvancedControls({
|
|
|
21143
21146
|
onClick: () => onUpdateGradientStops([
|
|
21144
21147
|
...gradientStops,
|
|
21145
21148
|
{
|
|
21146
|
-
color:
|
|
21149
|
+
color: chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR),
|
|
21147
21150
|
position: 50,
|
|
21148
21151
|
opacity: 1
|
|
21149
21152
|
}
|
|
@@ -21157,9 +21160,9 @@ function FillAdvancedControls({
|
|
|
21157
21160
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${COL2} flex flex-col gap-2`, children: [
|
|
21158
21161
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: "Pattern" }),
|
|
21159
21162
|
/* @__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) => {
|
|
21160
|
-
const fgColor =
|
|
21161
|
-
const bgColor =
|
|
21162
|
-
const svgPattern =
|
|
21163
|
+
const fgColor = chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR);
|
|
21164
|
+
const bgColor = chunk43TOUP5U_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff");
|
|
21165
|
+
const svgPattern = chunk43TOUP5U_js.getPatternSvg(opt.value, fgColor, bgColor);
|
|
21163
21166
|
const isSelected = (style.fillPatternPreset || "pct20") === opt.value;
|
|
21164
21167
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21165
21168
|
"button",
|
|
@@ -21192,7 +21195,7 @@ function FillAdvancedControls({
|
|
|
21192
21195
|
{
|
|
21193
21196
|
label: t("pptx.fillAdvanced.foregroundColor"),
|
|
21194
21197
|
prefix: "pattern-fg",
|
|
21195
|
-
value:
|
|
21198
|
+
value: chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR),
|
|
21196
21199
|
disabled: isLine,
|
|
21197
21200
|
onChange: (color) => onUpdateShapeStyle({ fillMode: "pattern", fillColor: color })
|
|
21198
21201
|
}
|
|
@@ -21202,7 +21205,7 @@ function FillAdvancedControls({
|
|
|
21202
21205
|
{
|
|
21203
21206
|
label: t("pptx.fillAdvanced.backgroundColor"),
|
|
21204
21207
|
prefix: "pattern-bg",
|
|
21205
|
-
value:
|
|
21208
|
+
value: chunk43TOUP5U_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff"),
|
|
21206
21209
|
disabled: isLine,
|
|
21207
21210
|
onChange: (color) => onUpdateShapeStyle({
|
|
21208
21211
|
fillMode: "pattern",
|
|
@@ -21269,16 +21272,16 @@ function QuickStylesGallery({
|
|
|
21269
21272
|
onUpdateShapeStyle
|
|
21270
21273
|
}) {
|
|
21271
21274
|
const { t } = reactI18next.useTranslation();
|
|
21272
|
-
const { viewportWidth } =
|
|
21275
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
21273
21276
|
const swatchMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
21274
21277
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
21275
21278
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: t("pptx.shape.quickStyles") }),
|
|
21276
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-6 gap-1", children:
|
|
21279
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-6 gap-1", children: chunk43TOUP5U_js.SHAPE_QUICK_STYLES.map((qs, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
21277
21280
|
"button",
|
|
21278
21281
|
{
|
|
21279
21282
|
type: "button",
|
|
21280
|
-
title: qs
|
|
21281
|
-
"aria-label": qs
|
|
21283
|
+
title: pptx.shapeQuickStyleLabel(qs, (key) => t(key)),
|
|
21284
|
+
"aria-label": pptx.shapeQuickStyleLabel(qs, (key) => t(key)),
|
|
21282
21285
|
className: "w-full rounded border border-border hover:border-primary transition-colors",
|
|
21283
21286
|
style: { ...pptx.quickStyleSwatchCss(qs), minHeight: swatchMinHeight },
|
|
21284
21287
|
onClick: () => onUpdateShapeStyle(qs.style)
|
|
@@ -21300,7 +21303,7 @@ function StrokeEffectsSection({
|
|
|
21300
21303
|
{
|
|
21301
21304
|
label: t("pptx.inspector.stroke"),
|
|
21302
21305
|
prefix: "stroke",
|
|
21303
|
-
value:
|
|
21306
|
+
value: chunk43TOUP5U_js.normalizeHexColor(style?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR),
|
|
21304
21307
|
selectedRef: style?.strokeColorRef,
|
|
21305
21308
|
onChange: onSetStrokeColor
|
|
21306
21309
|
}
|
|
@@ -21363,7 +21366,7 @@ function StrokeEffectsSection({
|
|
|
21363
21366
|
strokeDash: e.target.value
|
|
21364
21367
|
}),
|
|
21365
21368
|
className: SEL,
|
|
21366
|
-
children:
|
|
21369
|
+
children: chunk43TOUP5U_js.STROKE_DASH_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
21367
21370
|
}
|
|
21368
21371
|
)
|
|
21369
21372
|
] }),
|
|
@@ -21453,10 +21456,10 @@ function FillStrokeProperties({
|
|
|
21453
21456
|
return;
|
|
21454
21457
|
}
|
|
21455
21458
|
if (nextMode === "gradient") {
|
|
21456
|
-
const existing =
|
|
21459
|
+
const existing = chunk43TOUP5U_js.sanitizeGradientStops(style?.fillGradientStops);
|
|
21457
21460
|
const stops = existing.length >= 2 ? existing : [
|
|
21458
21461
|
{
|
|
21459
|
-
color:
|
|
21462
|
+
color: chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR),
|
|
21460
21463
|
position: 0,
|
|
21461
21464
|
opacity: 1
|
|
21462
21465
|
},
|
|
@@ -21481,7 +21484,7 @@ function FillStrokeProperties({
|
|
|
21481
21484
|
onUpdateShapeStyle({ fillMode: "solid" });
|
|
21482
21485
|
};
|
|
21483
21486
|
const gradientStops = selectedGradientStops.length > 0 ? selectedGradientStops : [
|
|
21484
|
-
{ color:
|
|
21487
|
+
{ color: chunk43TOUP5U_js.DEFAULT_FILL_COLOR, position: 0 },
|
|
21485
21488
|
{ color: "#ffffff", position: 100 }
|
|
21486
21489
|
];
|
|
21487
21490
|
const showGradient = style?.fillMode === "gradient" || selectedGradientStops.length > 0;
|
|
@@ -21508,7 +21511,7 @@ function FillStrokeProperties({
|
|
|
21508
21511
|
{
|
|
21509
21512
|
label: t("pptx.fill.fill"),
|
|
21510
21513
|
prefix: "fill",
|
|
21511
|
-
value:
|
|
21514
|
+
value: chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR),
|
|
21512
21515
|
selectedRef: style?.fillColorRef,
|
|
21513
21516
|
disabled: line,
|
|
21514
21517
|
onChange: onSetFillColor
|
|
@@ -21592,7 +21595,7 @@ function Text3DProperties({
|
|
|
21592
21595
|
"input",
|
|
21593
21596
|
{
|
|
21594
21597
|
type: "color",
|
|
21595
|
-
value:
|
|
21598
|
+
value: chunk43TOUP5U_js.normalizeHexColor(t3d?.extrusionColor, "#888888"),
|
|
21596
21599
|
onChange: (e) => {
|
|
21597
21600
|
update3d({ extrusionColor: e.target.value });
|
|
21598
21601
|
pushColor(e.target.value);
|
|
@@ -21783,7 +21786,7 @@ function AdvancedTextFormatting({
|
|
|
21783
21786
|
"input",
|
|
21784
21787
|
{
|
|
21785
21788
|
type: "color",
|
|
21786
|
-
value:
|
|
21789
|
+
value: chunk43TOUP5U_js.normalizeHexColor(ts?.highlightColor, "#ffff00"),
|
|
21787
21790
|
onChange: (e) => {
|
|
21788
21791
|
onUpdateTextStyle({ highlightColor: e.target.value });
|
|
21789
21792
|
pushColor(e.target.value);
|
|
@@ -22087,7 +22090,7 @@ function TextEffectsPanel({
|
|
|
22087
22090
|
"input",
|
|
22088
22091
|
{
|
|
22089
22092
|
type: "color",
|
|
22090
|
-
value:
|
|
22093
|
+
value: chunk43TOUP5U_js.normalizeHexColor(ts?.textShadowColor, "#000000"),
|
|
22091
22094
|
onChange: (e) => {
|
|
22092
22095
|
onUpdateTextStyle({ textShadowColor: e.target.value });
|
|
22093
22096
|
pushColor(e.target.value);
|
|
@@ -22194,7 +22197,7 @@ function TextEffectsPanel({
|
|
|
22194
22197
|
"input",
|
|
22195
22198
|
{
|
|
22196
22199
|
type: "color",
|
|
22197
|
-
value:
|
|
22200
|
+
value: chunk43TOUP5U_js.normalizeHexColor(ts?.textGlowColor, "#ffff00"),
|
|
22198
22201
|
onChange: (e) => {
|
|
22199
22202
|
onUpdateTextStyle({ textGlowColor: e.target.value });
|
|
22200
22203
|
pushColor(e.target.value);
|
|
@@ -22293,7 +22296,7 @@ function TextAdvancedSections({
|
|
|
22293
22296
|
canEdit,
|
|
22294
22297
|
onUpdateTextStyle
|
|
22295
22298
|
}) {
|
|
22296
|
-
if (!(0,
|
|
22299
|
+
if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
22297
22300
|
return null;
|
|
22298
22301
|
}
|
|
22299
22302
|
const ts = selectedElement.textStyle;
|
|
@@ -22322,22 +22325,22 @@ function ShapeTextPanels({
|
|
|
22322
22325
|
}) {
|
|
22323
22326
|
const { t } = reactI18next.useTranslation();
|
|
22324
22327
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22325
|
-
(0,
|
|
22328
|
+
(0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
22326
22329
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.type", "Shape Type") }),
|
|
22327
22330
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22328
22331
|
WebSelect,
|
|
22329
22332
|
{
|
|
22330
22333
|
value: selectedElement.shapeType || "rect",
|
|
22331
22334
|
disabled: !canEdit,
|
|
22332
|
-
className:
|
|
22335
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-full"),
|
|
22333
22336
|
onChange: (e) => onUpdateElement({
|
|
22334
22337
|
shapeType: e.target.value
|
|
22335
22338
|
}),
|
|
22336
|
-
children:
|
|
22339
|
+
children: chunk43TOUP5U_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
22337
22340
|
}
|
|
22338
22341
|
)
|
|
22339
22342
|
] }),
|
|
22340
|
-
(0,
|
|
22343
|
+
(0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, "data-pptx-fill-stroke": true, "data-pptx-inspector-section": "fill-stroke", children: [
|
|
22341
22344
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.fillStroke", "Fill & Stroke") }),
|
|
22342
22345
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22343
22346
|
FillStrokeProperties,
|
|
@@ -22345,7 +22348,7 @@ function ShapeTextPanels({
|
|
|
22345
22348
|
selectedElement,
|
|
22346
22349
|
selectedShapeStyle: selectedElement.shapeStyle,
|
|
22347
22350
|
selectedShapeType: selectedElement.shapeType,
|
|
22348
|
-
selectedGradientStops:
|
|
22351
|
+
selectedGradientStops: chunk43TOUP5U_js.sanitizeGradientStops(
|
|
22349
22352
|
selectedElement.shapeStyle?.fillGradientStops
|
|
22350
22353
|
),
|
|
22351
22354
|
canEdit,
|
|
@@ -22355,7 +22358,7 @@ function ShapeTextPanels({
|
|
|
22355
22358
|
}
|
|
22356
22359
|
)
|
|
22357
22360
|
] }),
|
|
22358
|
-
(0,
|
|
22361
|
+
(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, "data-pptx-text-card": true, children: [
|
|
22359
22362
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.text.title", "Text") }),
|
|
22360
22363
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5 text-[11px]", children: [
|
|
22361
22364
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -22381,7 +22384,7 @@ function ShapeTextPanels({
|
|
|
22381
22384
|
{
|
|
22382
22385
|
disabled: !canEdit,
|
|
22383
22386
|
ariaLabel: "Text Color",
|
|
22384
|
-
value:
|
|
22387
|
+
value: chunk43TOUP5U_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
22385
22388
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22386
22389
|
onCommit: (hex) => onUpdateTextStyle({ color: hex, colorRef: void 0 })
|
|
22387
22390
|
}
|
|
@@ -22473,7 +22476,7 @@ function TextFormatToggle({
|
|
|
22473
22476
|
{
|
|
22474
22477
|
type: "button",
|
|
22475
22478
|
disabled,
|
|
22476
|
-
className:
|
|
22479
|
+
className: chunk43TOUP5U_js.cn(
|
|
22477
22480
|
"px-2 py-1 rounded text-[11px] transition-colors max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
22478
22481
|
italic && "italic",
|
|
22479
22482
|
underline && "underline",
|
|
@@ -22631,7 +22634,7 @@ var THUMB_COMPONENTS = {
|
|
|
22631
22634
|
chevron: ChevronThumb,
|
|
22632
22635
|
bending: BendingThumb
|
|
22633
22636
|
};
|
|
22634
|
-
var LAYOUT_DESCRIPTORS =
|
|
22637
|
+
var LAYOUT_DESCRIPTORS = chunk43TOUP5U_js.dist_exports.SWITCHABLE_LAYOUT_TYPES.map((type) => ({
|
|
22635
22638
|
type,
|
|
22636
22639
|
i18nKey: `pptx.smartart.category.${type}`
|
|
22637
22640
|
}));
|
|
@@ -22659,7 +22662,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22659
22662
|
type: "button",
|
|
22660
22663
|
"data-testid": `smartart-layout-${type}`,
|
|
22661
22664
|
disabled: !canEdit,
|
|
22662
|
-
className:
|
|
22665
|
+
className: chunk43TOUP5U_js.cn(
|
|
22663
22666
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
22664
22667
|
"text-[9px] leading-tight",
|
|
22665
22668
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -22738,7 +22741,7 @@ function SmartArtNodeStyleControls({
|
|
|
22738
22741
|
disabled: !canEdit,
|
|
22739
22742
|
"aria-label": `Bold ${label}`,
|
|
22740
22743
|
"aria-pressed": bold,
|
|
22741
|
-
className:
|
|
22744
|
+
className: chunk43TOUP5U_js.cn(
|
|
22742
22745
|
EMPHASIS_BTN,
|
|
22743
22746
|
"font-bold",
|
|
22744
22747
|
bold ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -22754,7 +22757,7 @@ function SmartArtNodeStyleControls({
|
|
|
22754
22757
|
disabled: !canEdit,
|
|
22755
22758
|
"aria-label": `Italic ${label}`,
|
|
22756
22759
|
"aria-pressed": italic,
|
|
22757
|
-
className:
|
|
22760
|
+
className: chunk43TOUP5U_js.cn(
|
|
22758
22761
|
EMPHASIS_BTN,
|
|
22759
22762
|
"italic",
|
|
22760
22763
|
italic ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -22793,7 +22796,7 @@ function SmartArtNodeRow({
|
|
|
22793
22796
|
"div",
|
|
22794
22797
|
{
|
|
22795
22798
|
role: "listitem",
|
|
22796
|
-
className:
|
|
22799
|
+
className: chunk43TOUP5U_js.cn(
|
|
22797
22800
|
"rounded border bg-background/60 p-1.5",
|
|
22798
22801
|
isChild ? "border-border/60 ml-4" : "border-border"
|
|
22799
22802
|
),
|
|
@@ -22808,7 +22811,7 @@ function SmartArtNodeRow({
|
|
|
22808
22811
|
"data-testid": "smartart-node-text",
|
|
22809
22812
|
disabled: !canEdit,
|
|
22810
22813
|
"aria-label": label,
|
|
22811
|
-
className:
|
|
22814
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "flex-1 text-[11px] py-0.5"),
|
|
22812
22815
|
value: text,
|
|
22813
22816
|
onChange: (e) => onChangeText(nodeId, e.target.value),
|
|
22814
22817
|
onKeyDown: (e) => onKeyDown(e, nodeId),
|
|
@@ -22857,7 +22860,7 @@ function SmartArtNodeRow({
|
|
|
22857
22860
|
{
|
|
22858
22861
|
type: "button",
|
|
22859
22862
|
disabled: !canEdit || removeDisabled,
|
|
22860
|
-
className:
|
|
22863
|
+
className: chunk43TOUP5U_js.cn(MINI_BTN, "hover:text-red-400"),
|
|
22861
22864
|
onClick: () => onRemove(nodeId),
|
|
22862
22865
|
"aria-label": `Remove ${label}`,
|
|
22863
22866
|
title: removeDisabled ? t("pptx.smartArt.layoutMinimum") : t("pptx.smartArt.remove"),
|
|
@@ -22900,7 +22903,7 @@ function SmartArtStyleControls({
|
|
|
22900
22903
|
disabled: !canEdit,
|
|
22901
22904
|
"data-testid": "smartart-color-scheme",
|
|
22902
22905
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
22903
|
-
className:
|
|
22906
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-full"),
|
|
22904
22907
|
value: colorScheme,
|
|
22905
22908
|
onChange: (e) => onChangeColorScheme(e.target.value),
|
|
22906
22909
|
children: colorSchemes.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: pptx.schemaLabel(pptx.SMARTART_COLOR_SCHEME_LABEL_KEYS, cs, translate) }, cs))
|
|
@@ -22915,7 +22918,7 @@ function SmartArtStyleControls({
|
|
|
22915
22918
|
type: "button",
|
|
22916
22919
|
disabled: !canEdit,
|
|
22917
22920
|
"aria-pressed": style === s,
|
|
22918
|
-
className:
|
|
22921
|
+
className: chunk43TOUP5U_js.cn(
|
|
22919
22922
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
22920
22923
|
style === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
22921
22924
|
),
|
|
@@ -22961,7 +22964,7 @@ function SmartArtPropertiesPanel({
|
|
|
22961
22964
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
22962
22965
|
newData,
|
|
22963
22966
|
newData.layout,
|
|
22964
|
-
|
|
22967
|
+
chunkODFNNB5X_js.resolveSmartArtDataPalette(newData),
|
|
22965
22968
|
newData.style ?? "flat",
|
|
22966
22969
|
"inspector",
|
|
22967
22970
|
box
|
|
@@ -22972,10 +22975,10 @@ function SmartArtPropertiesPanel({
|
|
|
22972
22975
|
applySmartArtData({ ...smartArtData, ...patch });
|
|
22973
22976
|
};
|
|
22974
22977
|
const handleUpdateNodeText = (nodeId, text) => {
|
|
22975
|
-
applySmartArtData((0,
|
|
22978
|
+
applySmartArtData((0, chunk43TOUP5U_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text));
|
|
22976
22979
|
};
|
|
22977
22980
|
const handleChangeNodeStyle = (nodeId, patch) => {
|
|
22978
|
-
const next = (0,
|
|
22981
|
+
const next = (0, chunk43TOUP5U_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, patch);
|
|
22979
22982
|
if (next !== smartArtData) {
|
|
22980
22983
|
applySmartArtData(next);
|
|
22981
22984
|
}
|
|
@@ -22984,17 +22987,17 @@ function SmartArtPropertiesPanel({
|
|
|
22984
22987
|
if (!pptx.canAddTopLevelNode(layout, topLevelCount)) {
|
|
22985
22988
|
return;
|
|
22986
22989
|
}
|
|
22987
|
-
applySmartArtData((0,
|
|
22990
|
+
applySmartArtData((0, chunk43TOUP5U_js.dist_exports.addSmartArtNodeAsChild)(smartArtData));
|
|
22988
22991
|
};
|
|
22989
22992
|
const addSubItem = (parentId) => {
|
|
22990
|
-
applySmartArtData((0,
|
|
22993
|
+
applySmartArtData((0, chunk43TOUP5U_js.dist_exports.addSmartArtNodeAsChild)(smartArtData, parentId, "Sub-item"));
|
|
22991
22994
|
};
|
|
22992
22995
|
const removeNode = (nodeId) => {
|
|
22993
22996
|
const isTopLevel = !nodes.find((n) => n.id === nodeId)?.parentId;
|
|
22994
22997
|
if (isTopLevel && !pptx.canRemoveTopLevelNode(layout, topLevelCount)) {
|
|
22995
22998
|
return;
|
|
22996
22999
|
}
|
|
22997
|
-
applySmartArtData((0,
|
|
23000
|
+
applySmartArtData((0, chunk43TOUP5U_js.dist_exports.removeSmartArtNode)(smartArtData, nodeId));
|
|
22998
23001
|
};
|
|
22999
23002
|
const moveNode = (nodeId, direction) => {
|
|
23000
23003
|
const next = pptx.reorder(smartArtData, nodeId, direction);
|
|
@@ -23150,7 +23153,7 @@ function TableDataGrid({
|
|
|
23150
23153
|
}) {
|
|
23151
23154
|
const { t } = reactI18next.useTranslation();
|
|
23152
23155
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
23153
|
-
const { viewportWidth } =
|
|
23156
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
23154
23157
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
23155
23158
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
23156
23159
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -23562,7 +23565,7 @@ function TableCellColorField({
|
|
|
23562
23565
|
disabled,
|
|
23563
23566
|
onCommit
|
|
23564
23567
|
}) {
|
|
23565
|
-
const hex =
|
|
23568
|
+
const hex = chunk43TOUP5U_js.normalizeHexColor(value, fallback);
|
|
23566
23569
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
23567
23570
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
|
|
23568
23571
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23673,7 +23676,7 @@ function TableCellFormattingPanel({
|
|
|
23673
23676
|
{
|
|
23674
23677
|
type: "button",
|
|
23675
23678
|
disabled: !canEdit,
|
|
23676
|
-
className:
|
|
23679
|
+
className: chunk43TOUP5U_js.cn(
|
|
23677
23680
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23678
23681
|
cls,
|
|
23679
23682
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -23692,7 +23695,7 @@ function TableCellFormattingPanel({
|
|
|
23692
23695
|
{
|
|
23693
23696
|
type: "button",
|
|
23694
23697
|
disabled: !canEdit,
|
|
23695
|
-
className:
|
|
23698
|
+
className: chunk43TOUP5U_js.cn(
|
|
23696
23699
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23697
23700
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23698
23701
|
),
|
|
@@ -23710,7 +23713,7 @@ function TableCellFormattingPanel({
|
|
|
23710
23713
|
{
|
|
23711
23714
|
type: "button",
|
|
23712
23715
|
disabled: !canEdit,
|
|
23713
|
-
className:
|
|
23716
|
+
className: chunk43TOUP5U_js.cn(
|
|
23714
23717
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23715
23718
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23716
23719
|
),
|
|
@@ -23733,7 +23736,7 @@ function TableCellFormattingPanel({
|
|
|
23733
23736
|
DebouncedColorInput,
|
|
23734
23737
|
{
|
|
23735
23738
|
disabled: !canEdit,
|
|
23736
|
-
value:
|
|
23739
|
+
value: chunk43TOUP5U_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
23737
23740
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
23738
23741
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
23739
23742
|
}
|
|
@@ -23743,7 +23746,7 @@ function TableCellFormattingPanel({
|
|
|
23743
23746
|
{
|
|
23744
23747
|
type: "number",
|
|
23745
23748
|
disabled: !canEdit,
|
|
23746
|
-
className:
|
|
23749
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-14"),
|
|
23747
23750
|
min: 0,
|
|
23748
23751
|
max: 10,
|
|
23749
23752
|
value: pptx.inspectorNumber(cs[widthKey], 1),
|
|
@@ -23759,7 +23762,7 @@ function TableCellFormattingPanel({
|
|
|
23759
23762
|
{
|
|
23760
23763
|
type: "button",
|
|
23761
23764
|
disabled: !canEdit,
|
|
23762
|
-
className:
|
|
23765
|
+
className: chunk43TOUP5U_js.cn(BTN2, "text-center"),
|
|
23763
23766
|
onClick: () => {
|
|
23764
23767
|
const newRows = pptx.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
23765
23768
|
if (newRows) {
|
|
@@ -23774,7 +23777,7 @@ function TableCellFormattingPanel({
|
|
|
23774
23777
|
{
|
|
23775
23778
|
type: "button",
|
|
23776
23779
|
disabled: !canEdit,
|
|
23777
|
-
className:
|
|
23780
|
+
className: chunk43TOUP5U_js.cn(BTN2, "text-center"),
|
|
23778
23781
|
onClick: () => {
|
|
23779
23782
|
const newRows = pptx.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
23780
23783
|
if (newRows) {
|
|
@@ -23789,7 +23792,7 @@ function TableCellFormattingPanel({
|
|
|
23789
23792
|
{
|
|
23790
23793
|
type: "button",
|
|
23791
23794
|
disabled: !canEdit,
|
|
23792
|
-
className:
|
|
23795
|
+
className: chunk43TOUP5U_js.cn(BTN2, "text-center"),
|
|
23793
23796
|
onClick: () => {
|
|
23794
23797
|
const newRows = pptx.computeSplitCell(td, rowIndex, columnIndex);
|
|
23795
23798
|
if (newRows) {
|
|
@@ -23975,7 +23978,7 @@ function TableStyleEditor({
|
|
|
23975
23978
|
const { t } = reactI18next.useTranslation();
|
|
23976
23979
|
const themeColorMap = useThemeColorMap();
|
|
23977
23980
|
const [activeStyleId, setActiveStyleId] = React102.useState(
|
|
23978
|
-
styleId ? (0,
|
|
23981
|
+
styleId ? (0, chunk43TOUP5U_js.dist_exports.normalizeTableStyleGuid)(styleId) : ""
|
|
23979
23982
|
);
|
|
23980
23983
|
const [selectedPart, setSelectedPart] = React102.useState("wholeTbl");
|
|
23981
23984
|
const entry = activeStyleId ? styleMap?.[activeStyleId] : void 0;
|
|
@@ -23996,8 +23999,8 @@ function TableStyleEditor({
|
|
|
23996
23999
|
return;
|
|
23997
24000
|
}
|
|
23998
24001
|
const nextMap = { ...styleMap ?? {} };
|
|
23999
|
-
const created = (0,
|
|
24000
|
-
(0,
|
|
24002
|
+
const created = (0, chunk43TOUP5U_js.dist_exports.createTableStyleEntry)(nextMap, { styleName: name, basedOn: entry });
|
|
24003
|
+
(0, chunk43TOUP5U_js.dist_exports.addTableStyleToMap)(nextMap, created);
|
|
24001
24004
|
onStyleMapChange(nextMap);
|
|
24002
24005
|
setActiveStyleId(created.styleId);
|
|
24003
24006
|
onAssignStyle?.(created.styleId);
|
|
@@ -24007,7 +24010,7 @@ function TableStyleEditor({
|
|
|
24007
24010
|
return;
|
|
24008
24011
|
}
|
|
24009
24012
|
const nextMap = { ...styleMap };
|
|
24010
|
-
(0,
|
|
24013
|
+
(0, chunk43TOUP5U_js.dist_exports.deleteTableStyleFromMap)(nextMap, entry.styleId);
|
|
24011
24014
|
onStyleMapChange(nextMap);
|
|
24012
24015
|
onDeleteStyle(entry.styleId);
|
|
24013
24016
|
onClose();
|
|
@@ -24061,7 +24064,7 @@ function TablePropertiesPanel({
|
|
|
24061
24064
|
const updateMergeRows = (rows) => {
|
|
24062
24065
|
const tableData = { ...td, rows };
|
|
24063
24066
|
const updates = { tableData };
|
|
24064
|
-
const rawXml = (0,
|
|
24067
|
+
const rawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(tableElement, tableData);
|
|
24065
24068
|
if (rawXml) {
|
|
24066
24069
|
updates.rawXml = rawXml;
|
|
24067
24070
|
}
|
|
@@ -24127,7 +24130,7 @@ function TablePropertiesPanel({
|
|
|
24127
24130
|
] }),
|
|
24128
24131
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24129
24132
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.table.stylePresets") }),
|
|
24130
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
24133
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunk43TOUP5U_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24131
24134
|
"button",
|
|
24132
24135
|
{
|
|
24133
24136
|
type: "button",
|
|
@@ -24355,7 +24358,7 @@ function ElementInspectorBody({
|
|
|
24355
24358
|
box: { width: selectedElement.width, height: selectedElement.height }
|
|
24356
24359
|
}
|
|
24357
24360
|
),
|
|
24358
|
-
(0,
|
|
24361
|
+
(0, chunk43TOUP5U_js.dist_exports.isImageLikeElement)(selectedElement) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24359
24362
|
ImagePropertiesPanel,
|
|
24360
24363
|
{
|
|
24361
24364
|
selectedElement,
|
|
@@ -24520,7 +24523,7 @@ function CommentMentionTextarea({
|
|
|
24520
24523
|
"data-testid": "pptx-comment-mention-option",
|
|
24521
24524
|
role: "option",
|
|
24522
24525
|
"aria-selected": index === safeHighlighted,
|
|
24523
|
-
className:
|
|
24526
|
+
className: chunk43TOUP5U_js.cn(
|
|
24524
24527
|
"block w-full px-2 py-1 text-left text-[11px] hover:bg-accent",
|
|
24525
24528
|
index === safeHighlighted && "bg-accent"
|
|
24526
24529
|
),
|
|
@@ -24643,7 +24646,7 @@ function InspectorCommentRow({
|
|
|
24643
24646
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24644
24647
|
"div",
|
|
24645
24648
|
{
|
|
24646
|
-
className:
|
|
24649
|
+
className: chunk43TOUP5U_js.cn(
|
|
24647
24650
|
"rounded border border-border bg-card p-2",
|
|
24648
24651
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
24649
24652
|
),
|
|
@@ -24656,7 +24659,7 @@ function InspectorCommentRow({
|
|
|
24656
24659
|
t("pptx.comments.resolved")
|
|
24657
24660
|
] })
|
|
24658
24661
|
] }),
|
|
24659
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
24662
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunk43TOUP5U_js.formatCommentTimestamp(comment.createdAt) })
|
|
24660
24663
|
] }),
|
|
24661
24664
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24662
24665
|
"button",
|
|
@@ -24664,12 +24667,12 @@ function InspectorCommentRow({
|
|
|
24664
24667
|
type: "button",
|
|
24665
24668
|
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",
|
|
24666
24669
|
title: t("pptx.comments.commentingOn", {
|
|
24667
|
-
element:
|
|
24670
|
+
element: chunk43TOUP5U_js.getElementLabel(targetElement)
|
|
24668
24671
|
}),
|
|
24669
24672
|
onClick: () => onSelectElement(targetElement.id),
|
|
24670
24673
|
children: [
|
|
24671
24674
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24672
|
-
|
|
24675
|
+
chunk43TOUP5U_js.getElementLabel(targetElement)
|
|
24673
24676
|
]
|
|
24674
24677
|
}
|
|
24675
24678
|
) : /* @__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") })),
|
|
@@ -24738,7 +24741,7 @@ function InspectorCommentRow({
|
|
|
24738
24741
|
"button",
|
|
24739
24742
|
{
|
|
24740
24743
|
type: "button",
|
|
24741
|
-
className:
|
|
24744
|
+
className: chunk43TOUP5U_js.cn(
|
|
24742
24745
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
24743
24746
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
24744
24747
|
),
|
|
@@ -24881,7 +24884,7 @@ function InspectorCommentsSection({
|
|
|
24881
24884
|
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: [
|
|
24882
24885
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24883
24886
|
t("pptx.comments.commentingOn", {
|
|
24884
|
-
element:
|
|
24887
|
+
element: chunk43TOUP5U_js.getElementLabel(selectedElement)
|
|
24885
24888
|
})
|
|
24886
24889
|
] }),
|
|
24887
24890
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24892,7 +24895,7 @@ function InspectorCommentsSection({
|
|
|
24892
24895
|
authors: commentAuthors,
|
|
24893
24896
|
rows: 2,
|
|
24894
24897
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
24895
|
-
element:
|
|
24898
|
+
element: chunk43TOUP5U_js.getElementLabel(selectedElement)
|
|
24896
24899
|
}) : t("pptx.comments.addPlaceholder"),
|
|
24897
24900
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
24898
24901
|
onChange: onSetCommentDraft,
|
|
@@ -24905,7 +24908,7 @@ function InspectorCommentsSection({
|
|
|
24905
24908
|
type: "button",
|
|
24906
24909
|
onClick: onAddComment,
|
|
24907
24910
|
disabled: !commentDraft.trim(),
|
|
24908
|
-
className:
|
|
24911
|
+
className: chunk43TOUP5U_js.cn(
|
|
24909
24912
|
"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]!",
|
|
24910
24913
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
24911
24914
|
),
|
|
@@ -24919,7 +24922,7 @@ function InspectorCommentsSection({
|
|
|
24919
24922
|
] });
|
|
24920
24923
|
}
|
|
24921
24924
|
function elementLabel(element) {
|
|
24922
|
-
const text = (0,
|
|
24925
|
+
const text = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) ? (element.text || "").slice(0, 24) : void 0;
|
|
24923
24926
|
return text || element.type;
|
|
24924
24927
|
}
|
|
24925
24928
|
function InspectorElementsTab({
|
|
@@ -24946,13 +24949,13 @@ function InspectorElementsTab({
|
|
|
24946
24949
|
};
|
|
24947
24950
|
if (!activeSlide) {
|
|
24948
24951
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24949
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24952
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk43TOUP5U_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24950
24953
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground italic", children: t("pptx.inspector.noSlideSelected") })
|
|
24951
24954
|
] });
|
|
24952
24955
|
}
|
|
24953
24956
|
const elements = activeSlide.elements || [];
|
|
24954
24957
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", "data-pptx-elements-tab": true, children: [
|
|
24955
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24958
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk43TOUP5U_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24956
24959
|
[...elements].reverse().map((el, reversedIndex) => {
|
|
24957
24960
|
const index = elements.length - 1 - reversedIndex;
|
|
24958
24961
|
const selected = selectedElementId === el.id || selectedElementIds.includes(el.id);
|
|
@@ -24960,7 +24963,7 @@ function InspectorElementsTab({
|
|
|
24960
24963
|
"div",
|
|
24961
24964
|
{
|
|
24962
24965
|
title: `${el.type} - ${el.id}`,
|
|
24963
|
-
className:
|
|
24966
|
+
className: chunk43TOUP5U_js.cn(
|
|
24964
24967
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
24965
24968
|
selected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
24966
24969
|
),
|
|
@@ -24997,7 +25000,7 @@ function InspectorPaneHeader({
|
|
|
24997
25000
|
onClose
|
|
24998
25001
|
}) {
|
|
24999
25002
|
const { t } = reactI18next.useTranslation();
|
|
25000
|
-
const { viewportWidth } =
|
|
25003
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
25001
25004
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
25002
25005
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
25003
25006
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -25020,7 +25023,7 @@ function InspectorPaneHeader({
|
|
|
25020
25023
|
type: "button",
|
|
25021
25024
|
title: t(labelKey),
|
|
25022
25025
|
style: touchBtnStyle,
|
|
25023
|
-
className:
|
|
25026
|
+
className: chunk43TOUP5U_js.cn(
|
|
25024
25027
|
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
25025
25028
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
25026
25029
|
),
|
|
@@ -25134,7 +25137,7 @@ function CustomPropertiesBlock({
|
|
|
25134
25137
|
"button",
|
|
25135
25138
|
{
|
|
25136
25139
|
type: "button",
|
|
25137
|
-
className:
|
|
25140
|
+
className: chunk43TOUP5U_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25138
25141
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
25139
25142
|
children: "\xD7"
|
|
25140
25143
|
}
|
|
@@ -25462,7 +25465,7 @@ function PresentationSettingsCard({
|
|
|
25462
25465
|
min: 1,
|
|
25463
25466
|
max: 16,
|
|
25464
25467
|
disabled: !canEdit,
|
|
25465
|
-
className:
|
|
25468
|
+
className: chunk43TOUP5U_js.cn(INPUT2, "w-20"),
|
|
25466
25469
|
value: pptx.printPropertiesSlidesPerPage(presentationProperties.printProperties),
|
|
25467
25470
|
onChange: (e) => onUpdate({
|
|
25468
25471
|
printProperties: pptx.withSlidesPerPage(
|
|
@@ -25550,14 +25553,14 @@ function SlideThemeOverridePanel({
|
|
|
25550
25553
|
const translate = React102.useCallback((key) => t(key), [t]);
|
|
25551
25554
|
const override = activeSlide?.clrMapOverride;
|
|
25552
25555
|
const isOverrideActive = override !== void 0;
|
|
25553
|
-
const targetSlotOptions = React102.useMemo(() => [...
|
|
25556
|
+
const targetSlotOptions = React102.useMemo(() => [...chunk43TOUP5U_js.dist_exports.THEME_COLOR_SCHEME_KEYS], []);
|
|
25554
25557
|
const commitOverride = React102.useCallback(
|
|
25555
25558
|
(nextOverride) => {
|
|
25556
25559
|
if (!activeSlide || !theme?.colorScheme) {
|
|
25557
25560
|
onUpdateSlide({ clrMapOverride: nextOverride });
|
|
25558
25561
|
return;
|
|
25559
25562
|
}
|
|
25560
|
-
const nextSlide = (0,
|
|
25563
|
+
const nextSlide = (0, chunk43TOUP5U_js.dist_exports.applyThemeOverrideToSlide)(activeSlide, theme.colorScheme, nextOverride);
|
|
25561
25564
|
onUpdateSlide({
|
|
25562
25565
|
clrMapOverride: nextSlide.clrMapOverride,
|
|
25563
25566
|
backgroundColor: nextSlide.backgroundColor,
|
|
@@ -25570,8 +25573,8 @@ function SlideThemeOverridePanel({
|
|
|
25570
25573
|
(enabled) => {
|
|
25571
25574
|
if (enabled) {
|
|
25572
25575
|
const defaultMap = {};
|
|
25573
|
-
for (const key of
|
|
25574
|
-
defaultMap[key] =
|
|
25576
|
+
for (const key of chunk43TOUP5U_js.dist_exports.COLOR_MAP_ALIAS_KEYS) {
|
|
25577
|
+
defaultMap[key] = chunk43TOUP5U_js.dist_exports.DEFAULT_COLOR_MAP[key];
|
|
25575
25578
|
}
|
|
25576
25579
|
commitOverride(defaultMap);
|
|
25577
25580
|
} else {
|
|
@@ -25584,9 +25587,9 @@ function SlideThemeOverridePanel({
|
|
|
25584
25587
|
(alias, targetSlot) => {
|
|
25585
25588
|
const current = override ?? {};
|
|
25586
25589
|
const next = { ...current, [alias]: targetSlot };
|
|
25587
|
-
for (const key of
|
|
25590
|
+
for (const key of chunk43TOUP5U_js.dist_exports.COLOR_MAP_ALIAS_KEYS) {
|
|
25588
25591
|
if (!next[key]) {
|
|
25589
|
-
next[key] =
|
|
25592
|
+
next[key] = chunk43TOUP5U_js.dist_exports.DEFAULT_COLOR_MAP[key];
|
|
25590
25593
|
}
|
|
25591
25594
|
}
|
|
25592
25595
|
commitOverride(next);
|
|
@@ -25618,8 +25621,8 @@ function SlideThemeOverridePanel({
|
|
|
25618
25621
|
),
|
|
25619
25622
|
t("pptx.themeOverride.enableOverride")
|
|
25620
25623
|
] }),
|
|
25621
|
-
isOverrideActive && override && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children:
|
|
25622
|
-
const currentTarget = override[alias] ??
|
|
25624
|
+
isOverrideActive && override && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: chunk43TOUP5U_js.dist_exports.COLOR_MAP_ALIAS_KEYS.map((alias) => {
|
|
25625
|
+
const currentTarget = override[alias] ?? chunk43TOUP5U_js.dist_exports.DEFAULT_COLOR_MAP[alias];
|
|
25623
25626
|
const resolvedHex = resolveSlotColor(currentTarget);
|
|
25624
25627
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25625
25628
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-24 truncate text-muted-foreground", title: ALIAS_LABELS[alias], children: ALIAS_LABELS[alias] }),
|
|
@@ -25698,7 +25701,7 @@ function TransitionPreview({
|
|
|
25698
25701
|
const { t } = reactI18next.useTranslation();
|
|
25699
25702
|
const durationMs = transition.durationMs ?? 500;
|
|
25700
25703
|
const animations = React102.useMemo(
|
|
25701
|
-
() =>
|
|
25704
|
+
() => chunkODFNNB5X_js.getSlideTransitionAnimations(
|
|
25702
25705
|
transition.type,
|
|
25703
25706
|
durationMs,
|
|
25704
25707
|
transition.direction,
|
|
@@ -25767,7 +25770,7 @@ function TransitionPreview({
|
|
|
25767
25770
|
]
|
|
25768
25771
|
}
|
|
25769
25772
|
),
|
|
25770
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25773
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkODFNNB5X_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
25771
25774
|
] });
|
|
25772
25775
|
}
|
|
25773
25776
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -25784,13 +25787,13 @@ function SlideTransitionSection({
|
|
|
25784
25787
|
return null;
|
|
25785
25788
|
}
|
|
25786
25789
|
const transitionType = activeSlide.transition?.type ?? "none";
|
|
25787
|
-
const validDirections =
|
|
25790
|
+
const validDirections = chunk43TOUP5U_js.dist_exports.TRANSITION_VALID_DIRECTIONS[transitionType];
|
|
25788
25791
|
const hasDirections = validDirections !== void 0 && validDirections.length > 0;
|
|
25789
25792
|
const usesOrientation = pptx.TRANSITION_ORIENTATION_TYPES.has(transitionType);
|
|
25790
25793
|
const isWheel = transitionType === "wheel";
|
|
25791
25794
|
const isMorph = transitionType === "morph";
|
|
25792
|
-
const patternOptions =
|
|
25793
|
-
const hasThruBlk =
|
|
25795
|
+
const patternOptions = chunk43TOUP5U_js.dist_exports.TRANSITION_PATTERN_OPTIONS[transitionType];
|
|
25796
|
+
const hasThruBlk = chunk43TOUP5U_js.dist_exports.TRANSITION_THRUBLK_TYPES.has(transitionType);
|
|
25794
25797
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25795
25798
|
"div",
|
|
25796
25799
|
{
|
|
@@ -25810,7 +25813,7 @@ function SlideTransitionSection({
|
|
|
25810
25813
|
type: e.target.value
|
|
25811
25814
|
}),
|
|
25812
25815
|
className: "bg-muted border border-border rounded px-2 py-1 max-md:min-h-[44px]!",
|
|
25813
|
-
children:
|
|
25816
|
+
children: chunk43TOUP5U_js.SLIDE_TRANSITION_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
25814
25817
|
}
|
|
25815
25818
|
)
|
|
25816
25819
|
] }),
|
|
@@ -26026,7 +26029,7 @@ function TagsSection({
|
|
|
26026
26029
|
"button",
|
|
26027
26030
|
{
|
|
26028
26031
|
type: "button",
|
|
26029
|
-
className:
|
|
26032
|
+
className: chunk43TOUP5U_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
26030
26033
|
title: t("pptx.tags.deleteTag"),
|
|
26031
26034
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
26032
26035
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -26155,7 +26158,7 @@ function PresentationPropertiesPanel({
|
|
|
26155
26158
|
canEdit
|
|
26156
26159
|
}
|
|
26157
26160
|
) }),
|
|
26158
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className:
|
|
26161
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className: chunk43TOUP5U_js.cn(CARD2, "space-y-1"), children: [
|
|
26159
26162
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: "Slide" }),
|
|
26160
26163
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
26161
26164
|
activeSlide.elements?.length ?? 0,
|
|
@@ -26176,14 +26179,14 @@ function SlideBackgroundPanel({
|
|
|
26176
26179
|
const { t } = reactI18next.useTranslation();
|
|
26177
26180
|
const bgImageInputRef = React102.useRef(null);
|
|
26178
26181
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
26179
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
26182
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk43TOUP5U_js.cn(CARD2, "space-y-2"), children: [
|
|
26180
26183
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.viewer.background") }),
|
|
26181
26184
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
26182
26185
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: t("pptx.slideBackground.colour") }),
|
|
26183
26186
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26184
26187
|
DebouncedColorInput,
|
|
26185
26188
|
{
|
|
26186
|
-
value:
|
|
26189
|
+
value: chunk43TOUP5U_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
26187
26190
|
disabled: !canEdit,
|
|
26188
26191
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26189
26192
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -26222,7 +26225,7 @@ function SlideBackgroundPanel({
|
|
|
26222
26225
|
"button",
|
|
26223
26226
|
{
|
|
26224
26227
|
type: "button",
|
|
26225
|
-
className:
|
|
26228
|
+
className: chunk43TOUP5U_js.cn(BTN2, "flex-1 text-center"),
|
|
26226
26229
|
disabled: !canEdit,
|
|
26227
26230
|
onClick: () => bgImageInputRef.current?.click(),
|
|
26228
26231
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -26255,7 +26258,7 @@ function SlideBackgroundPanel({
|
|
|
26255
26258
|
"button",
|
|
26256
26259
|
{
|
|
26257
26260
|
type: "button",
|
|
26258
|
-
className:
|
|
26261
|
+
className: chunk43TOUP5U_js.cn(BTN2, "w-full text-center text-red-400 hover:text-red-300"),
|
|
26259
26262
|
disabled: !pptx.slideBackgroundClearState(activeSlide, canEdit).enabled,
|
|
26260
26263
|
onClick: () => onUpdateSlide(pptx.slideBackgroundClearPatch()),
|
|
26261
26264
|
children: t("pptx.slideBackground.clearBackground")
|
|
@@ -26299,14 +26302,14 @@ function TemplateBackgroundCard({
|
|
|
26299
26302
|
t("pptx.master.layout"),
|
|
26300
26303
|
t("pptx.master.master")
|
|
26301
26304
|
);
|
|
26302
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
26305
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk43TOUP5U_js.cn(CARD2, "space-y-2"), children: [
|
|
26303
26306
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
26304
26307
|
rows.layout && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
26305
26308
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-14 shrink-0 truncate", title: rows.layout.title, children: t("pptx.master.layout") }),
|
|
26306
26309
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26307
26310
|
DebouncedColorInput,
|
|
26308
26311
|
{
|
|
26309
|
-
value:
|
|
26312
|
+
value: chunk43TOUP5U_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.layout.path), "#ffffff"),
|
|
26310
26313
|
disabled: !canEdit,
|
|
26311
26314
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26312
26315
|
onCommit: (hex) => onSetTemplateBackground(rows.layout.path, hex)
|
|
@@ -26319,7 +26322,7 @@ function TemplateBackgroundCard({
|
|
|
26319
26322
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26320
26323
|
DebouncedColorInput,
|
|
26321
26324
|
{
|
|
26322
|
-
value:
|
|
26325
|
+
value: chunk43TOUP5U_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.master.path), "#ffffff"),
|
|
26323
26326
|
disabled: !canEdit,
|
|
26324
26327
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26325
26328
|
onCommit: (hex) => onSetTemplateBackground(rows.master.path, hex)
|
|
@@ -26430,7 +26433,7 @@ function InspectorPane(props) {
|
|
|
26430
26433
|
} = props;
|
|
26431
26434
|
const hasSelection = selectedElement !== null;
|
|
26432
26435
|
const { t } = reactI18next.useTranslation();
|
|
26433
|
-
const { dragY, handlers: dragHandlers } =
|
|
26436
|
+
const { dragY, handlers: dragHandlers } = chunkODFNNB5X_js.useSheetDismissDrag(onClose);
|
|
26434
26437
|
const {
|
|
26435
26438
|
animationPanelHeight,
|
|
26436
26439
|
effectiveThemeOptions,
|
|
@@ -26452,7 +26455,7 @@ function InspectorPane(props) {
|
|
|
26452
26455
|
"div",
|
|
26453
26456
|
{
|
|
26454
26457
|
"data-pptx-chrome": "inspector",
|
|
26455
|
-
className:
|
|
26458
|
+
className: chunk43TOUP5U_js.cn(
|
|
26456
26459
|
// Shared styles
|
|
26457
26460
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
26458
26461
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -26843,7 +26846,7 @@ function PresentationTouchControls({
|
|
|
26843
26846
|
hideNavigation = false
|
|
26844
26847
|
}) {
|
|
26845
26848
|
const { t } = reactI18next.useTranslation();
|
|
26846
|
-
const { isTouchDevice } =
|
|
26849
|
+
const { isTouchDevice } = chunkODFNNB5X_js.useIsMobile();
|
|
26847
26850
|
if (!isTouchDevice) {
|
|
26848
26851
|
return null;
|
|
26849
26852
|
}
|
|
@@ -27148,13 +27151,13 @@ function PrintPreview({
|
|
|
27148
27151
|
}) {
|
|
27149
27152
|
const { t } = reactI18next.useTranslation();
|
|
27150
27153
|
const pages = React102.useMemo(
|
|
27151
|
-
() =>
|
|
27154
|
+
() => chunk43TOUP5U_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
27152
27155
|
[slideIndices, slidesPerPage, orientation]
|
|
27153
27156
|
);
|
|
27154
|
-
const printable = React102.useMemo(() =>
|
|
27157
|
+
const printable = React102.useMemo(() => chunk43TOUP5U_js.getPrintableArea(orientation), [orientation]);
|
|
27155
27158
|
const visiblePages = pages.slice(0, maxPages);
|
|
27156
27159
|
const isThreePerPage = slidesPerPage === 3;
|
|
27157
|
-
const noteLineCount =
|
|
27160
|
+
const noteLineCount = chunk43TOUP5U_js.generateNoteLineCount();
|
|
27158
27161
|
const scaledW = printable.width * PREVIEW_SCALE3;
|
|
27159
27162
|
const scaledH = printable.height * PREVIEW_SCALE3;
|
|
27160
27163
|
const noteAreaFraction = 0.5;
|
|
@@ -27489,11 +27492,11 @@ function PrintDialog({
|
|
|
27489
27492
|
defaultFrameSlides
|
|
27490
27493
|
}) {
|
|
27491
27494
|
const { t } = reactI18next.useTranslation();
|
|
27492
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27493
|
-
const { viewportWidth } =
|
|
27495
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
27496
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
27494
27497
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27495
27498
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27496
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
27499
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunkODFNNB5X_js.useViewerOptionsContext());
|
|
27497
27500
|
const [printWhat, setPrintWhat] = React102.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
27498
27501
|
const [orientation, setOrientation] = React102.useState("landscape");
|
|
27499
27502
|
const [colorMode, setColorMode] = React102.useState(
|
|
@@ -27996,14 +27999,14 @@ function BroadcastDialog({
|
|
|
27996
27999
|
defaultServerUrl
|
|
27997
28000
|
}) {
|
|
27998
28001
|
const { t } = reactI18next.useTranslation();
|
|
27999
|
-
const collab =
|
|
28002
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
28000
28003
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
28001
28004
|
const [roomId, setRoomId] = React102.useState("");
|
|
28002
28005
|
const [userName, setUserName] = React102.useState("");
|
|
28003
28006
|
const [serverUrl, setServerUrl] = React102.useState("");
|
|
28004
28007
|
const [copied, setCopied] = React102.useState(false);
|
|
28005
28008
|
const dialogRef = React102.useRef(null);
|
|
28006
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28009
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
28007
28010
|
useModalFocus(open, dialogRef, onClose);
|
|
28008
28011
|
React102.useEffect(() => {
|
|
28009
28012
|
if (open && !isBroadcasting) {
|
|
@@ -28306,7 +28309,7 @@ function ActiveSessionView({
|
|
|
28306
28309
|
onCopyRoomId,
|
|
28307
28310
|
onStopCollaboration
|
|
28308
28311
|
}) {
|
|
28309
|
-
const { t } = reactI18next.useTranslation(), viewerOptions =
|
|
28312
|
+
const { t } = reactI18next.useTranslation(), viewerOptions = chunkODFNNB5X_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({
|
|
28310
28313
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
28311
28314
|
localUserInitials: viewerOptions.general.userInitials,
|
|
28312
28315
|
localUserColor: collab.config.userColor,
|
|
@@ -28405,7 +28408,7 @@ function StartSessionForm({
|
|
|
28405
28408
|
onRetry
|
|
28406
28409
|
}) {
|
|
28407
28410
|
const { t } = reactI18next.useTranslation();
|
|
28408
|
-
const { viewportWidth } =
|
|
28411
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
28409
28412
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
28410
28413
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
28411
28414
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -28539,7 +28542,7 @@ function ShareDialog({
|
|
|
28539
28542
|
defaultUserName,
|
|
28540
28543
|
defaultServerUrl
|
|
28541
28544
|
}) {
|
|
28542
|
-
const collab =
|
|
28545
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
28543
28546
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
28544
28547
|
const { t } = reactI18next.useTranslation();
|
|
28545
28548
|
const [roomId, setRoomId] = React102.useState(defaultRoomId ?? "");
|
|
@@ -28549,9 +28552,9 @@ function ShareDialog({
|
|
|
28549
28552
|
const [invitation, setInvitation] = React102.useState("");
|
|
28550
28553
|
const [copied, setCopied] = React102.useState(false);
|
|
28551
28554
|
const dialogRef = React102.useRef(null);
|
|
28552
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28555
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
28553
28556
|
useModalFocus(open, dialogRef, onClose);
|
|
28554
|
-
const { viewportWidth, viewportHeight } =
|
|
28557
|
+
const { viewportWidth, viewportHeight } = chunkODFNNB5X_js.useIsMobile();
|
|
28555
28558
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
28556
28559
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
28557
28560
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -28834,12 +28837,12 @@ function HyperlinkEditDialog({
|
|
|
28834
28837
|
onCancel
|
|
28835
28838
|
}) {
|
|
28836
28839
|
const { t } = reactI18next.useTranslation();
|
|
28837
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28840
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onCancel);
|
|
28838
28841
|
const inputRef = React102.useRef(null);
|
|
28839
|
-
const detectedType =
|
|
28840
|
-
const emailParts =
|
|
28841
|
-
const detectedSlide =
|
|
28842
|
-
const detectedVerb = initialAction ?
|
|
28842
|
+
const detectedType = chunkODFNNB5X_js.detectTargetType(initialUrl, initialAction);
|
|
28843
|
+
const emailParts = chunkODFNNB5X_js.parseEmailUrl(initialUrl || "");
|
|
28844
|
+
const detectedSlide = chunkODFNNB5X_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
28845
|
+
const detectedVerb = initialAction ? chunkODFNNB5X_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28843
28846
|
const [targetType, setTargetType] = React102.useState(detectedType);
|
|
28844
28847
|
const [url, setUrl] = React102.useState(
|
|
28845
28848
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28870,7 +28873,7 @@ function HyperlinkEditDialog({
|
|
|
28870
28873
|
actionVerb
|
|
28871
28874
|
});
|
|
28872
28875
|
};
|
|
28873
|
-
const tabCls = (active) =>
|
|
28876
|
+
const tabCls = (active) => chunk43TOUP5U_js.cn(
|
|
28874
28877
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
28875
28878
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
28876
28879
|
);
|
|
@@ -29115,7 +29118,7 @@ function ViewerBottomPanels({
|
|
|
29115
29118
|
notesStyle,
|
|
29116
29119
|
onNotesHeightChange
|
|
29117
29120
|
}) {
|
|
29118
|
-
const { isHidden } =
|
|
29121
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(hiddenActions);
|
|
29119
29122
|
const customization = useViewerCustomizationContext();
|
|
29120
29123
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
29121
29124
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -29461,7 +29464,7 @@ function ViewerToolbarSection(props) {
|
|
|
29461
29464
|
[activeSlide, propertyHandlers]
|
|
29462
29465
|
);
|
|
29463
29466
|
const scopedLayoutOptions = React102__default.default.useMemo(
|
|
29464
|
-
() =>
|
|
29467
|
+
() => chunkODFNNB5X_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
29465
29468
|
[s.layoutOptions, activeSlide]
|
|
29466
29469
|
);
|
|
29467
29470
|
const handleResetSlide = React102.useCallback(() => {
|
|
@@ -29865,7 +29868,7 @@ function ViewerToolbarSection(props) {
|
|
|
29865
29868
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
29866
29869
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29867
29870
|
formatPainterActive: s.formatPainterActive,
|
|
29868
|
-
canActivateFormatPainter:
|
|
29871
|
+
canActivateFormatPainter: chunk43TOUP5U_js.hasCopyableFormat(selectedElement),
|
|
29869
29872
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29870
29873
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29871
29874
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29952,7 +29955,7 @@ function EquationEditorDialog({
|
|
|
29952
29955
|
existingOmml
|
|
29953
29956
|
}) {
|
|
29954
29957
|
const { t } = reactI18next.useTranslation();
|
|
29955
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29958
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
29956
29959
|
const initialLatex = React102.useMemo(() => {
|
|
29957
29960
|
if (!existingOmml) {
|
|
29958
29961
|
return "";
|
|
@@ -30074,7 +30077,7 @@ function EquationEditorDialog({
|
|
|
30074
30077
|
{
|
|
30075
30078
|
type: "button",
|
|
30076
30079
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
30077
|
-
className:
|
|
30080
|
+
className: chunk43TOUP5U_js.cn(
|
|
30078
30081
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
30079
30082
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
30080
30083
|
),
|
|
@@ -30140,7 +30143,7 @@ function getPreviewForLayout(layout) {
|
|
|
30140
30143
|
transform: `scale(${scale})`,
|
|
30141
30144
|
transformOrigin: "top left"
|
|
30142
30145
|
},
|
|
30143
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30146
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.SmartArtRenderer, { element: pptx.buildSmartArtPreviewElement(layout) })
|
|
30144
30147
|
}
|
|
30145
30148
|
)
|
|
30146
30149
|
}
|
|
@@ -30152,7 +30155,7 @@ function InsertSmartArtDialog({
|
|
|
30152
30155
|
onInsert
|
|
30153
30156
|
}) {
|
|
30154
30157
|
const { t } = reactI18next.useTranslation();
|
|
30155
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
30158
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
30156
30159
|
const [activeCategory, setActiveCategory] = React102.useState("list");
|
|
30157
30160
|
const [selectedLayout, setSelectedLayout] = React102.useState(null);
|
|
30158
30161
|
const dialogRef = React102.useRef(null);
|
|
@@ -30233,7 +30236,7 @@ function InsertSmartArtDialog({
|
|
|
30233
30236
|
setActiveCategory(cat.id);
|
|
30234
30237
|
setSelectedLayout(null);
|
|
30235
30238
|
},
|
|
30236
|
-
className:
|
|
30239
|
+
className: chunk43TOUP5U_js.cn(
|
|
30237
30240
|
"w-full text-left px-3 py-1.5 text-xs transition-colors",
|
|
30238
30241
|
activeCategory === cat.id ? "bg-primary text-white" : "text-foreground hover:bg-muted"
|
|
30239
30242
|
),
|
|
@@ -30261,7 +30264,7 @@ function InsertSmartArtDialog({
|
|
|
30261
30264
|
onInsert(preset.layout, preset.defaultItems);
|
|
30262
30265
|
onClose();
|
|
30263
30266
|
},
|
|
30264
|
-
className:
|
|
30267
|
+
className: chunk43TOUP5U_js.cn(
|
|
30265
30268
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
30266
30269
|
selectedLayout === preset.layout ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
30267
30270
|
),
|
|
@@ -30758,11 +30761,11 @@ function PresentationStage({
|
|
|
30758
30761
|
})
|
|
30759
30762
|
},
|
|
30760
30763
|
children: [
|
|
30761
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30764
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
30762
30765
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
30763
30766
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
30764
30767
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30765
|
-
|
|
30768
|
+
chunkODFNNB5X_js.ElementRenderer,
|
|
30766
30769
|
{
|
|
30767
30770
|
element,
|
|
30768
30771
|
activeSlide,
|
|
@@ -30799,7 +30802,7 @@ function PresentationStage({
|
|
|
30799
30802
|
`tpl-${element.id}`
|
|
30800
30803
|
)),
|
|
30801
30804
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30802
|
-
|
|
30805
|
+
chunkODFNNB5X_js.ElementRenderer,
|
|
30803
30806
|
{
|
|
30804
30807
|
element,
|
|
30805
30808
|
activeSlide,
|
|
@@ -30920,8 +30923,8 @@ function ViewerCanvasArea(props) {
|
|
|
30920
30923
|
aiCanvasActive = false
|
|
30921
30924
|
} = props;
|
|
30922
30925
|
const { t } = reactI18next.useTranslation();
|
|
30923
|
-
const { isHidden } =
|
|
30924
|
-
const viewerOptions =
|
|
30926
|
+
const { isHidden } = chunkODFNNB5X_js.useToolbarVisibility(hiddenActions);
|
|
30927
|
+
const viewerOptions = chunkODFNNB5X_js.useViewerOptionsContext();
|
|
30925
30928
|
const outlineAuthoring = useOutlineAuthoring({
|
|
30926
30929
|
state: s,
|
|
30927
30930
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -30951,7 +30954,7 @@ function ViewerCanvasArea(props) {
|
|
|
30951
30954
|
${url}`)) {
|
|
30952
30955
|
return;
|
|
30953
30956
|
}
|
|
30954
|
-
|
|
30957
|
+
chunk43TOUP5U_js.safeOpenUrl(url);
|
|
30955
30958
|
},
|
|
30956
30959
|
[viewerOptions, t]
|
|
30957
30960
|
);
|
|
@@ -30972,9 +30975,9 @@ ${url}`)) {
|
|
|
30972
30975
|
);
|
|
30973
30976
|
const handleHyperlinkClick = React102.useCallback(
|
|
30974
30977
|
(url) => {
|
|
30975
|
-
if (
|
|
30978
|
+
if (chunk43TOUP5U_js.isPpactionUrl(url)) {
|
|
30976
30979
|
if (mode === "present") {
|
|
30977
|
-
const parsed =
|
|
30980
|
+
const parsed = chunk43TOUP5U_js.parsePpactionUrl(url);
|
|
30978
30981
|
if (parsed) {
|
|
30979
30982
|
const action = {
|
|
30980
30983
|
action: parsed.action,
|
|
@@ -31059,7 +31062,7 @@ ${url}`)) {
|
|
|
31059
31062
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
31060
31063
|
}
|
|
31061
31064
|
}, [mode, presentation, s]);
|
|
31062
|
-
const swipe =
|
|
31065
|
+
const swipe = chunkODFNNB5X_js.useSwipeNavigation({
|
|
31063
31066
|
enabled: swipeEnabled,
|
|
31064
31067
|
onNext: handleSwipeNext,
|
|
31065
31068
|
onPrev: handleSwipePrev
|
|
@@ -31139,7 +31142,7 @@ ${url}`)) {
|
|
|
31139
31142
|
),
|
|
31140
31143
|
children: (stageScale) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31141
31144
|
presentation.transitionOverlay && slides[presentation.transitionOverlay.outgoingSlideIndex] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31142
|
-
|
|
31145
|
+
chunkODFNNB5X_js.PresentationTransitionOverlay,
|
|
31143
31146
|
{
|
|
31144
31147
|
outgoingSlide: slides[presentation.transitionOverlay.outgoingSlideIndex],
|
|
31145
31148
|
templateElements,
|
|
@@ -31250,14 +31253,14 @@ ${url}`)) {
|
|
|
31250
31253
|
outlineAuthoring,
|
|
31251
31254
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31252
31255
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31253
|
-
|
|
31256
|
+
chunkODFNNB5X_js.RemoteSelectionOverlay,
|
|
31254
31257
|
{
|
|
31255
31258
|
elements: effectiveSlide?.elements ?? [],
|
|
31256
31259
|
activeSlideIndex
|
|
31257
31260
|
}
|
|
31258
31261
|
),
|
|
31259
31262
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31260
|
-
|
|
31263
|
+
chunkODFNNB5X_js.CollaborationCursorOverlay,
|
|
31261
31264
|
{
|
|
31262
31265
|
activeSlideIndex,
|
|
31263
31266
|
canvasWidth: canvasSize.width,
|
|
@@ -31397,7 +31400,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
31397
31400
|
var AiChatPanel = React102.lazy(async () => {
|
|
31398
31401
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
31399
31402
|
import('@ai-sdk/react'),
|
|
31400
|
-
import('./AiChatPanel-
|
|
31403
|
+
import('./AiChatPanel-FNHDAKPB.js')
|
|
31401
31404
|
]);
|
|
31402
31405
|
function BoundAiChatPanel(props) {
|
|
31403
31406
|
return /* @__PURE__ */ jsxRuntime.jsx(Panel, { ...props, useChat });
|
|
@@ -31558,7 +31561,7 @@ function MobileDismissSheet({
|
|
|
31558
31561
|
children
|
|
31559
31562
|
}) {
|
|
31560
31563
|
const { t } = reactI18next.useTranslation();
|
|
31561
|
-
const { dragY, handlers } =
|
|
31564
|
+
const { dragY, handlers } = chunkODFNNB5X_js.useSheetDismissDrag(onClose);
|
|
31562
31565
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31563
31566
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31564
31567
|
"button",
|
|
@@ -31827,7 +31830,7 @@ function ThemeThumbnail({
|
|
|
31827
31830
|
{
|
|
31828
31831
|
type: "button",
|
|
31829
31832
|
onClick,
|
|
31830
|
-
className:
|
|
31833
|
+
className: chunk43TOUP5U_js.cn(
|
|
31831
31834
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
31832
31835
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
31833
31836
|
),
|
|
@@ -32013,7 +32016,7 @@ function ViewerSidePanels(props) {
|
|
|
32013
32016
|
const customization = useViewerCustomizationContext();
|
|
32014
32017
|
const inspectorOpen = (mode === "edit" || mode === "master") && s.isInspectorPaneOpen && pptx.isPanelVisible(customization, "inspector");
|
|
32015
32018
|
const currentBuiltInTheme = BUILT_IN_THEMES.find(
|
|
32016
|
-
(candidate) => (0,
|
|
32019
|
+
(candidate) => (0, chunk43TOUP5U_js.dist_exports.themeColorSchemesEqual)(s.theme?.colorScheme, candidate.colorScheme)
|
|
32017
32020
|
) ?? null;
|
|
32018
32021
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32019
32022
|
inspectorOpen && onResizeRight && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { direction: "horizontal", onResize: onResizeRight }),
|
|
@@ -32296,7 +32299,7 @@ function ViewerMainContent(props) {
|
|
|
32296
32299
|
);
|
|
32297
32300
|
const layoutGalleryAnchorRef = React102.useRef(null);
|
|
32298
32301
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
32299
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32302
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
32300
32303
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32301
32304
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32302
32305
|
SlidesPaneSidebar,
|
|
@@ -32786,7 +32789,7 @@ function MobileChromeOverlay(props) {
|
|
|
32786
32789
|
slideSectionGroups,
|
|
32787
32790
|
canEdit,
|
|
32788
32791
|
commentCount
|
|
32789
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
32792
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunkODFNNB5X_js.useKeyboardInsets(), activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
32790
32793
|
s.setIsSlidesPaneOpen(false);
|
|
32791
32794
|
s.setIsInspectorPaneOpen(false);
|
|
32792
32795
|
s.setIsSlideNotesCollapsed(true);
|
|
@@ -32992,7 +32995,7 @@ function AddinTable({
|
|
|
32992
32995
|
"tr",
|
|
32993
32996
|
{
|
|
32994
32997
|
onClick: () => onSelect(row.id),
|
|
32995
|
-
className:
|
|
32998
|
+
className: chunk43TOUP5U_js.cn(
|
|
32996
32999
|
"cursor-pointer border-b border-border/40 transition-colors",
|
|
32997
33000
|
selectedId === row.id ? "bg-primary/10" : "hover:bg-accent"
|
|
32998
33001
|
),
|
|
@@ -33059,18 +33062,18 @@ function ControlRow({
|
|
|
33059
33062
|
onOptionChange: emitChange
|
|
33060
33063
|
}) {
|
|
33061
33064
|
const { t } = reactI18next.useTranslation();
|
|
33062
|
-
const { viewportWidth } =
|
|
33065
|
+
const { viewportWidth } = chunkODFNNB5X_js.useIsMobile();
|
|
33063
33066
|
const fieldMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
33064
33067
|
const value = readValue(options, control);
|
|
33065
33068
|
const label = t(control.labelKey);
|
|
33066
33069
|
const info = control.infoKey ? /* @__PURE__ */ jsxRuntime.jsx(InfoTip, { text: t(control.infoKey) }) : null;
|
|
33067
|
-
const rowClass =
|
|
33070
|
+
const rowClass = chunk43TOUP5U_js.cn("flex items-center justify-between gap-3 py-1.5", control.indent && "pl-6");
|
|
33068
33071
|
const rowStyle = { minHeight: fieldMinHeight };
|
|
33069
33072
|
const locked = control.readOnly === true;
|
|
33070
33073
|
const lockedTitle = locked ? t("pptx.options.lockedByHost") : void 0;
|
|
33071
33074
|
const onOptionChange = locked ? IGNORE_CHANGE : emitChange;
|
|
33072
33075
|
if (control.kind === "toggle") {
|
|
33073
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className:
|
|
33076
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: chunk43TOUP5U_js.cn(rowClass, "cursor-pointer select-none"), style: rowStyle, children: [
|
|
33074
33077
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-foreground", children: [
|
|
33075
33078
|
label,
|
|
33076
33079
|
info
|
|
@@ -33222,7 +33225,7 @@ function CommandList({
|
|
|
33222
33225
|
role: "option",
|
|
33223
33226
|
"aria-selected": selectedId === id,
|
|
33224
33227
|
onClick: () => onSelect(id),
|
|
33225
|
-
className:
|
|
33228
|
+
className: chunk43TOUP5U_js.cn(
|
|
33226
33229
|
"flex w-full items-center rounded px-2 py-1.5 text-left text-sm transition-colors",
|
|
33227
33230
|
selectedId === id ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent"
|
|
33228
33231
|
),
|
|
@@ -33366,7 +33369,7 @@ function OptionsRibbonPane({
|
|
|
33366
33369
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33367
33370
|
"label",
|
|
33368
33371
|
{
|
|
33369
|
-
className:
|
|
33372
|
+
className: chunk43TOUP5U_js.cn(
|
|
33370
33373
|
"flex items-center gap-2 rounded px-2 py-1.5",
|
|
33371
33374
|
isFile ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-accent"
|
|
33372
33375
|
),
|
|
@@ -33400,7 +33403,7 @@ function OptionsRibbonPane({
|
|
|
33400
33403
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: pptx.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33401
33404
|
"div",
|
|
33402
33405
|
{
|
|
33403
|
-
className:
|
|
33406
|
+
className: chunk43TOUP5U_js.cn(
|
|
33404
33407
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
33405
33408
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
33406
33409
|
),
|
|
@@ -33421,7 +33424,7 @@ async function exportAiChatLogs(options) {
|
|
|
33421
33424
|
chats,
|
|
33422
33425
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
33423
33426
|
(filename, content, mime) => {
|
|
33424
|
-
|
|
33427
|
+
chunkODFNNB5X_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
33425
33428
|
}
|
|
33426
33429
|
);
|
|
33427
33430
|
}
|
|
@@ -33529,7 +33532,7 @@ function SettingsAppearanceTab({
|
|
|
33529
33532
|
type: "button",
|
|
33530
33533
|
onClick: () => onSelectTheme(entry.key),
|
|
33531
33534
|
"aria-pressed": isActive,
|
|
33532
|
-
className:
|
|
33535
|
+
className: chunk43TOUP5U_js.cn(
|
|
33533
33536
|
"flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
|
|
33534
33537
|
isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
|
|
33535
33538
|
),
|
|
@@ -33546,7 +33549,7 @@ function SettingsAppearanceTab({
|
|
|
33546
33549
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33547
33550
|
"span",
|
|
33548
33551
|
{
|
|
33549
|
-
className:
|
|
33552
|
+
className: chunk43TOUP5U_js.cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
|
|
33550
33553
|
children: t(entry.labelKey)
|
|
33551
33554
|
}
|
|
33552
33555
|
)
|
|
@@ -33626,7 +33629,7 @@ function SettingsLanguageTab({
|
|
|
33626
33629
|
type: "button",
|
|
33627
33630
|
onClick: () => onSelectLocale(locale.code),
|
|
33628
33631
|
"aria-pressed": isActive,
|
|
33629
|
-
className:
|
|
33632
|
+
className: chunk43TOUP5U_js.cn(
|
|
33630
33633
|
"flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
|
|
33631
33634
|
isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
|
|
33632
33635
|
),
|
|
@@ -33666,8 +33669,8 @@ function SettingsDialog({
|
|
|
33666
33669
|
const [activeTabId, setActiveTabId] = React102.useState("general");
|
|
33667
33670
|
const { t } = reactI18next.useTranslation();
|
|
33668
33671
|
const customization = useViewerCustomizationContext();
|
|
33669
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
33670
|
-
const { viewportWidth, viewportHeight } =
|
|
33672
|
+
const { panelStyle, handlers: dragHandlers } = chunkODFNNB5X_js.useModalDismissDrag(onClose);
|
|
33673
|
+
const { viewportWidth, viewportHeight } = chunkODFNNB5X_js.useIsMobile();
|
|
33671
33674
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
33672
33675
|
const navBtnStyle = { minHeight: touchTargetPx, minWidth: touchTargetPx };
|
|
33673
33676
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
@@ -33775,7 +33778,7 @@ function SettingsDialog({
|
|
|
33775
33778
|
onClick: () => setActiveTabId(tab.id),
|
|
33776
33779
|
"aria-current": currentTabId === tab.id,
|
|
33777
33780
|
style: navBtnStyle,
|
|
33778
|
-
className:
|
|
33781
|
+
className: chunk43TOUP5U_js.cn(
|
|
33779
33782
|
"flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
|
|
33780
33783
|
currentTabId === tab.id ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
|
|
33781
33784
|
),
|
|
@@ -33790,7 +33793,7 @@ function SettingsDialog({
|
|
|
33790
33793
|
onClick: () => setActiveTabId(AI_TAB_ID),
|
|
33791
33794
|
"aria-current": aiActive,
|
|
33792
33795
|
style: navBtnStyle,
|
|
33793
|
-
className:
|
|
33796
|
+
className: chunk43TOUP5U_js.cn(
|
|
33794
33797
|
"flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
|
|
33795
33798
|
aiActive ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
|
|
33796
33799
|
),
|
|
@@ -33936,7 +33939,7 @@ function ViewerOptionsProvider({
|
|
|
33936
33939
|
store,
|
|
33937
33940
|
children
|
|
33938
33941
|
}) {
|
|
33939
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33942
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
33940
33943
|
}
|
|
33941
33944
|
function useAiBridge(input) {
|
|
33942
33945
|
const ref = React102.useRef(input);
|
|
@@ -34257,7 +34260,7 @@ function useMasterViewCrud(input) {
|
|
|
34257
34260
|
if (id === "renameLayout" || id === "renameMaster") {
|
|
34258
34261
|
const master = slideMasters[target.masterIndex];
|
|
34259
34262
|
const current = id === "renameLayout" ? master?.layouts?.[target.layoutIndex ?? -1]?.name ?? "" : master?.name ?? "";
|
|
34260
|
-
const next =
|
|
34263
|
+
const next = chunkODFNNB5X_js.safePrompt(t("pptx.masterView.renamePrompt"), current)?.trim();
|
|
34261
34264
|
if (!next) {
|
|
34262
34265
|
return;
|
|
34263
34266
|
}
|
|
@@ -34718,7 +34721,7 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34718
34721
|
}
|
|
34719
34722
|
})();
|
|
34720
34723
|
}, []);
|
|
34721
|
-
const { optionsStore, options: viewerOptions } =
|
|
34724
|
+
const { optionsStore, options: viewerOptions } = chunkODFNNB5X_js.useViewerOptions();
|
|
34722
34725
|
const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
|
|
34723
34726
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
34724
34727
|
const aiEnabled = Boolean(ai) && pptx.isFeatureEnabled(customizationResolved, "ai");
|
|
@@ -34732,8 +34735,8 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34732
34735
|
const handleEnableEditing = React102.useCallback(() => {
|
|
34733
34736
|
setProtectedViewOverridden(true);
|
|
34734
34737
|
}, []);
|
|
34735
|
-
const readOnlyRec =
|
|
34736
|
-
const compatToastsState =
|
|
34738
|
+
const readOnlyRec = chunkODFNNB5X_js.useReadOnlyRecommendationState(content);
|
|
34739
|
+
const compatToastsState = chunkODFNNB5X_js.useCompatibilityToastsState();
|
|
34737
34740
|
const [notesBarHeight, setNotesBarHeight] = React102.useState(0);
|
|
34738
34741
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
34739
34742
|
const [collaborationReadOnly, setCollaborationReadOnly] = React102.useState(Boolean(collaboration));
|
|
@@ -34748,8 +34751,8 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34748
34751
|
filePath
|
|
34749
34752
|
});
|
|
34750
34753
|
const [isShareDialogOpen, setIsShareDialogOpen] = React102.useState(false);
|
|
34751
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
34752
|
-
const state =
|
|
34754
|
+
const { reducedMotion, toggleReducedMotion } = chunkODFNNB5X_js.useReducedMotion();
|
|
34755
|
+
const state = chunkODFNNB5X_js.useViewerState({
|
|
34753
34756
|
content,
|
|
34754
34757
|
canEdit,
|
|
34755
34758
|
inspectorInitiallyOpen: props.inspectorInitiallyOpen
|
|
@@ -34778,7 +34781,7 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34778
34781
|
[state.recentColors, pushColor]
|
|
34779
34782
|
);
|
|
34780
34783
|
const themeColorMapValue = React102.useMemo(
|
|
34781
|
-
() => state.theme?.colorScheme ? (0,
|
|
34784
|
+
() => state.theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
34782
34785
|
[state.theme?.colorScheme]
|
|
34783
34786
|
);
|
|
34784
34787
|
const settings = React102.useMemo(
|
|
@@ -34865,16 +34868,16 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34865
34868
|
}
|
|
34866
34869
|
}, [settings, optionsStore]);
|
|
34867
34870
|
const handleClearOptionsCache2 = useAutosaveCacheMaintenance(viewerOptions);
|
|
34868
|
-
const mobile =
|
|
34871
|
+
const mobile = chunkODFNNB5X_js.useIsMobile();
|
|
34869
34872
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
34870
|
-
const resizablePanels =
|
|
34873
|
+
const resizablePanels = chunkODFNNB5X_js.useResizablePanels();
|
|
34871
34874
|
const {
|
|
34872
34875
|
gridSpacingPx,
|
|
34873
34876
|
visibleSlideIndexes,
|
|
34874
34877
|
slideSectionGroups,
|
|
34875
34878
|
masterPseudoSlide,
|
|
34876
34879
|
authoredRange
|
|
34877
|
-
} =
|
|
34880
|
+
} = chunkODFNNB5X_js.useDerivedSlideState({
|
|
34878
34881
|
slides,
|
|
34879
34882
|
sections: state.sections,
|
|
34880
34883
|
customShows: state.customShows,
|
|
@@ -34899,7 +34902,7 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34899
34902
|
state.cropSessionRef
|
|
34900
34903
|
]
|
|
34901
34904
|
);
|
|
34902
|
-
const zoom =
|
|
34905
|
+
const zoom = chunkODFNNB5X_js.useZoomViewport({
|
|
34903
34906
|
canvasSize,
|
|
34904
34907
|
selectedElements: state.selectedElements,
|
|
34905
34908
|
fitPadding: props.fitPadding,
|
|
@@ -34909,7 +34912,7 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34909
34912
|
const markDocumentDirty = React102.useCallback(() => {
|
|
34910
34913
|
setIsDirty(true);
|
|
34911
34914
|
}, [setIsDirty]);
|
|
34912
|
-
const history =
|
|
34915
|
+
const history = chunkODFNNB5X_js.useEditorHistory({
|
|
34913
34916
|
slides,
|
|
34914
34917
|
canvasSize,
|
|
34915
34918
|
activeSlideIndex,
|
|
@@ -34935,7 +34938,7 @@ var PowerPointViewer = React102.forwardRef(
|
|
|
34935
34938
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
34936
34939
|
setHeaderFooter: state.setHeaderFooter
|
|
34937
34940
|
});
|
|
34938
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
34941
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunkODFNNB5X_js.usePresentationSetup({
|
|
34939
34942
|
mode,
|
|
34940
34943
|
slides,
|
|
34941
34944
|
visibleSlideIndexes,
|
|
@@ -35010,7 +35013,7 @@ ${url}`)
|
|
|
35010
35013
|
loading,
|
|
35011
35014
|
error
|
|
35012
35015
|
]);
|
|
35013
|
-
|
|
35016
|
+
chunkODFNNB5X_js.useTouchGestures({
|
|
35014
35017
|
targetRef: zoom.canvasViewportRef,
|
|
35015
35018
|
currentScale: zoom.scale,
|
|
35016
35019
|
callbacks: {
|
|
@@ -35032,7 +35035,7 @@ ${url}`)
|
|
|
35032
35035
|
},
|
|
35033
35036
|
enabled: isTouchDevice
|
|
35034
35037
|
});
|
|
35035
|
-
const dialogs =
|
|
35038
|
+
const dialogs = chunkODFNNB5X_js.useViewerDialogs({
|
|
35036
35039
|
mode,
|
|
35037
35040
|
slides,
|
|
35038
35041
|
activeSlide,
|
|
@@ -35081,7 +35084,7 @@ ${url}`)
|
|
|
35081
35084
|
zoom.handleZoomToFit();
|
|
35082
35085
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
35083
35086
|
}, [mode]);
|
|
35084
|
-
const editorOps =
|
|
35087
|
+
const editorOps = chunkODFNNB5X_js.useEditorOperations({
|
|
35085
35088
|
state,
|
|
35086
35089
|
history,
|
|
35087
35090
|
zoom,
|
|
@@ -35123,7 +35126,7 @@ ${url}`)
|
|
|
35123
35126
|
setIsEncryptedDialogOpen,
|
|
35124
35127
|
handlerRef,
|
|
35125
35128
|
loadVersion
|
|
35126
|
-
} =
|
|
35129
|
+
} = chunkODFNNB5X_js.useViewerIntegration({
|
|
35127
35130
|
transformCommittedText: (text) => pptx.applyAutoCorrect(text, viewerOptions.proofing),
|
|
35128
35131
|
state,
|
|
35129
35132
|
zoom,
|
|
@@ -35226,7 +35229,7 @@ ${url}`)
|
|
|
35226
35229
|
updateThemeFontScheme: themeHandlers.handleUpdateThemeFontScheme
|
|
35227
35230
|
});
|
|
35228
35231
|
const ribbonScope = useRibbonScopeToken();
|
|
35229
|
-
const viewPreferencesSync =
|
|
35232
|
+
const viewPreferencesSync = chunkODFNNB5X_js.useViewPreferencesSync({
|
|
35230
35233
|
loadVersion,
|
|
35231
35234
|
viewProperties: state.viewProperties,
|
|
35232
35235
|
setViewProperties: state.setViewProperties,
|
|
@@ -35264,7 +35267,7 @@ ${url}`)
|
|
|
35264
35267
|
},
|
|
35265
35268
|
[state]
|
|
35266
35269
|
);
|
|
35267
|
-
const layoutSwitching =
|
|
35270
|
+
const layoutSwitching = chunkODFNNB5X_js.useLayoutSwitching({
|
|
35268
35271
|
handler: handlerRef.current,
|
|
35269
35272
|
slides,
|
|
35270
35273
|
activeSlideIndex,
|
|
@@ -35360,7 +35363,7 @@ ${url}`)
|
|
|
35360
35363
|
"data-pptx-editor-chrome": "",
|
|
35361
35364
|
...{ [pptx.RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
35362
35365
|
"aria-busy": loading,
|
|
35363
|
-
className:
|
|
35366
|
+
className: chunk43TOUP5U_js.cn(
|
|
35364
35367
|
"h-full w-full bg-background text-foreground relative",
|
|
35365
35368
|
...pptx.resolveOptionRootClasses(viewerOptions, "pptx")
|
|
35366
35369
|
),
|
|
@@ -35755,8 +35758,8 @@ ${url}`)
|
|
|
35755
35758
|
// Nothing previously provided it, so every one of those consumers was
|
|
35756
35759
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
35757
35760
|
// the user changed in the Options dialog.
|
|
35758
|
-
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35759
|
-
|
|
35761
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(chunkODFNNB5X_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35762
|
+
chunkODFNNB5X_js.CollaborationProvider,
|
|
35760
35763
|
{
|
|
35761
35764
|
config: collaboration,
|
|
35762
35765
|
canvasWidth: canvasSize.width,
|
|
@@ -35814,7 +35817,7 @@ ${url}`)
|
|
|
35814
35817
|
);
|
|
35815
35818
|
PowerPointViewer.displayName = "PowerPointViewer";
|
|
35816
35819
|
function CollaborationStatusStrip() {
|
|
35817
|
-
const collab =
|
|
35820
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
35818
35821
|
if (!collab) {
|
|
35819
35822
|
return null;
|
|
35820
35823
|
}
|
|
@@ -35838,8 +35841,8 @@ function CollaborationDocumentSync({
|
|
|
35838
35841
|
deckSaveState,
|
|
35839
35842
|
onReadOnlyChange
|
|
35840
35843
|
}) {
|
|
35841
|
-
const collab =
|
|
35842
|
-
|
|
35844
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
35845
|
+
chunkODFNNB5X_js.useCollaborationDocumentSync({
|
|
35843
35846
|
collaboration: collab,
|
|
35844
35847
|
slides,
|
|
35845
35848
|
templateElementsBySlideId,
|
|
@@ -35858,14 +35861,14 @@ function CollaborationFollowLayer({
|
|
|
35858
35861
|
setActiveSlideIndex,
|
|
35859
35862
|
slideCount
|
|
35860
35863
|
}) {
|
|
35861
|
-
const collab =
|
|
35862
|
-
const { followedClientId, followUser } =
|
|
35864
|
+
const collab = chunkODFNNB5X_js.useCollaboration();
|
|
35865
|
+
const { followedClientId, followUser } = chunkODFNNB5X_js.useFollowMode({
|
|
35863
35866
|
collab,
|
|
35864
35867
|
activeSlideIndex,
|
|
35865
35868
|
setActiveSlideIndex,
|
|
35866
35869
|
slideCount
|
|
35867
35870
|
});
|
|
35868
|
-
|
|
35871
|
+
chunkODFNNB5X_js.useBroadcastFollower({
|
|
35869
35872
|
collab,
|
|
35870
35873
|
activeSlideIndex,
|
|
35871
35874
|
setActiveSlideIndex,
|