pptx-react-viewer 4.45.0 → 4.47.0
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 +50 -0
- package/README.md +5 -2
- package/dist/{AiChatPanel-Z5VHI4WA.mjs → AiChatPanel-6S4LWXGM.mjs} +2 -2
- package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
- package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
- package/dist/{AiChatPanel-TGZQBH3L.js → AiChatPanel-IEM43TTZ.js} +10 -10
- package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
- package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
- package/dist/{Model3DScene-5HLXSIIK.js → Model3DScene-CCIG67DJ.js} +1 -1
- package/dist/Model3DScene-CCIG67DJ.js.br +0 -0
- package/dist/Model3DScene-CCIG67DJ.js.gz +0 -0
- package/dist/{Model3DScene-MSC4LEKG.mjs → Model3DScene-NUJH2UKM.mjs} +1 -1
- package/dist/Model3DScene-NUJH2UKM.mjs.br +0 -0
- package/dist/Model3DScene-NUJH2UKM.mjs.gz +0 -0
- package/dist/{chunk-FBN7UFW2.mjs → chunk-BVQSH5SS.mjs} +36 -43
- package/dist/chunk-BVQSH5SS.mjs.br +0 -0
- package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
- package/dist/{chunk-66APV3YZ.mjs → chunk-HDOR67HF.mjs} +258 -130
- package/dist/chunk-HDOR67HF.mjs.br +0 -0
- package/dist/chunk-HDOR67HF.mjs.gz +0 -0
- package/dist/{chunk-VJZJESNT.js → chunk-MA2BI7LX.js} +45 -61
- package/dist/chunk-MA2BI7LX.js.br +0 -0
- package/dist/chunk-MA2BI7LX.js.gz +0 -0
- package/dist/{chunk-2YCROYR6.js → chunk-MRSGNERC.js} +432 -302
- package/dist/chunk-MRSGNERC.js.br +0 -0
- package/dist/chunk-MRSGNERC.js.gz +0 -0
- package/dist/{chunk-VUE3EPTJ.mjs → chunk-OWZSRPAH.mjs} +248 -162
- package/dist/chunk-OWZSRPAH.mjs.br +0 -0
- package/dist/chunk-OWZSRPAH.mjs.gz +0 -0
- package/dist/{chunk-W2IMY5SY.js → chunk-PIRHQTI4.js} +0 -2
- package/dist/chunk-PIRHQTI4.js.br +0 -0
- package/dist/chunk-PIRHQTI4.js.gz +0 -0
- package/dist/{chunk-KUQRWMIK.js → chunk-SSANGQ35.js} +550 -464
- package/dist/chunk-SSANGQ35.js.br +0 -0
- package/dist/chunk-SSANGQ35.js.gz +0 -0
- package/dist/{chunk-Q3DHYOLK.mjs → chunk-UV2HVMKZ.mjs} +1 -2
- package/dist/chunk-UV2HVMKZ.mjs.br +0 -0
- package/dist/chunk-UV2HVMKZ.mjs.gz +0 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.br +2 -2
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +1 -1
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +47 -6
- package/dist/index.js +25 -25
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +74 -8
- package/dist/internals.js +82 -82
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +2 -0
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{three.module-JPZUM7AI.mjs → three.module-EBJVANGB.mjs} +1 -1
- package/dist/three.module-EBJVANGB.mjs.br +0 -0
- package/dist/three.module-EBJVANGB.mjs.gz +0 -0
- package/dist/{three.module-RIUI7P3J.js → three.module-MBFHAT6M.js} +1 -1
- package/dist/three.module-MBFHAT6M.js.br +0 -0
- package/dist/three.module-MBFHAT6M.js.gz +0 -0
- package/dist/viewer/index.d.ts +49 -10
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-CCA4HVZZ.mjs → y-webrtc-2H7UYAQD.mjs} +1 -1
- package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
- package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
- package/dist/{y-webrtc-MB5ZXFBA.js → y-webrtc-DVPQNFLL.js} +5 -5
- package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
- package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
- package/dist/{y-websocket-JQQZVAMX.js → y-websocket-TN4OKPXQ.js} +1 -1
- package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
- package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
- package/dist/{y-websocket-SCLLNICY.mjs → y-websocket-WORVRRQS.mjs} +1 -1
- package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
- package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
- package/package.json +7 -5
- package/dist/AiChatPanel-TGZQBH3L.js.br +0 -0
- package/dist/AiChatPanel-TGZQBH3L.js.gz +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.br +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.gz +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.br +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.gz +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.br +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.gz +0 -0
- package/dist/chunk-2YCROYR6.js.br +0 -0
- package/dist/chunk-2YCROYR6.js.gz +0 -0
- package/dist/chunk-66APV3YZ.mjs.br +0 -0
- package/dist/chunk-66APV3YZ.mjs.gz +0 -0
- package/dist/chunk-FBN7UFW2.mjs.br +0 -0
- package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
- package/dist/chunk-KUQRWMIK.js.br +0 -0
- package/dist/chunk-KUQRWMIK.js.gz +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.br +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.gz +0 -0
- package/dist/chunk-VJZJESNT.js.br +0 -0
- package/dist/chunk-VJZJESNT.js.gz +0 -0
- package/dist/chunk-VUE3EPTJ.mjs.br +0 -0
- package/dist/chunk-VUE3EPTJ.mjs.gz +0 -0
- package/dist/chunk-W2IMY5SY.js.br +0 -0
- package/dist/chunk-W2IMY5SY.js.gz +0 -0
- package/dist/three.module-JPZUM7AI.mjs.br +0 -0
- package/dist/three.module-JPZUM7AI.mjs.gz +0 -0
- package/dist/three.module-RIUI7P3J.js.br +0 -0
- package/dist/three.module-RIUI7P3J.js.gz +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.br +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.gz +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.br +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.gz +0 -0
- package/dist/y-websocket-JQQZVAMX.js.br +0 -0
- package/dist/y-websocket-JQQZVAMX.js.gz +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.br +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.gz +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkMRSGNERC_js = require('./chunk-MRSGNERC.js');
|
|
4
|
+
var chunkMA2BI7LX_js = require('./chunk-MA2BI7LX.js');
|
|
5
5
|
var pptx = require('ooxml-ui/pptx');
|
|
6
6
|
var React106 = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var lu = require('react-icons/lu');
|
|
10
10
|
var reactDom = require('react-dom');
|
|
11
|
+
var pptx$1 = require('ooxml-core/pptx');
|
|
11
12
|
var i18n = require('ooxml-ui/pptx/i18n');
|
|
12
13
|
var ai = require('ooxml-ui/pptx/ai');
|
|
13
14
|
|
|
@@ -15,7 +16,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
15
16
|
|
|
16
17
|
var React106__default = /*#__PURE__*/_interopDefault(React106);
|
|
17
18
|
|
|
18
|
-
var ViewerThemeContext = React106.createContext(void 0);
|
|
19
|
+
var ViewerThemeContext = /* @__PURE__ */ React106.createContext(void 0);
|
|
19
20
|
function ViewerThemeProvider({ theme, children }) {
|
|
20
21
|
return /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeContext.Provider, { value: theme, children });
|
|
21
22
|
}
|
|
@@ -290,6 +291,7 @@ function SlideTemplatePreview({
|
|
|
290
291
|
"div",
|
|
291
292
|
{
|
|
292
293
|
"aria-hidden": "true",
|
|
294
|
+
"data-pptx-scope": "",
|
|
293
295
|
className: "overflow-hidden pointer-events-none rounded",
|
|
294
296
|
style: {
|
|
295
297
|
width: PREVIEW_TILE_WIDTH,
|
|
@@ -307,7 +309,7 @@ function SlideTemplatePreview({
|
|
|
307
309
|
transformOrigin: "top left"
|
|
308
310
|
},
|
|
309
311
|
children: previewSlide.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
-
|
|
312
|
+
chunkMRSGNERC_js.StaticElementRenderer,
|
|
311
313
|
{
|
|
312
314
|
element,
|
|
313
315
|
activeSlide: previewSlide,
|
|
@@ -376,7 +378,7 @@ function SlideTemplateGalleryDialog({
|
|
|
376
378
|
scheme
|
|
377
379
|
}) {
|
|
378
380
|
const { t } = reactI18next.useTranslation();
|
|
379
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
381
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onClose);
|
|
380
382
|
const [selected, setSelected] = React106.useState(null);
|
|
381
383
|
const dialogRef = React106.useRef(null);
|
|
382
384
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
@@ -395,6 +397,7 @@ function SlideTemplateGalleryDialog({
|
|
|
395
397
|
"button",
|
|
396
398
|
{
|
|
397
399
|
type: "button",
|
|
400
|
+
"data-pptx-scope": "",
|
|
398
401
|
style: { zIndex: 1200 },
|
|
399
402
|
className: "fixed inset-0 bg-black/50",
|
|
400
403
|
onClick: onClose,
|
|
@@ -404,6 +407,7 @@ function SlideTemplateGalleryDialog({
|
|
|
404
407
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
405
408
|
"div",
|
|
406
409
|
{
|
|
410
|
+
"data-pptx-scope": "",
|
|
407
411
|
style: { zIndex: 1201 },
|
|
408
412
|
className: "fixed inset-0 flex items-center justify-center pointer-events-none",
|
|
409
413
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -459,7 +463,7 @@ function SlideTemplateGalleryDialog({
|
|
|
459
463
|
onInsert(spec.id);
|
|
460
464
|
onClose();
|
|
461
465
|
},
|
|
462
|
-
className:
|
|
466
|
+
className: chunkMA2BI7LX_js.cn(
|
|
463
467
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
464
468
|
selected === spec.id ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
465
469
|
),
|
|
@@ -715,7 +719,7 @@ function DateTimeFieldDialog(p) {
|
|
|
715
719
|
}
|
|
716
720
|
);
|
|
717
721
|
}
|
|
718
|
-
var ViewerCustomizationContext = React106.createContext(
|
|
722
|
+
var ViewerCustomizationContext = /* @__PURE__ */ React106.createContext(
|
|
719
723
|
pptx.EMPTY_RESOLVED_CUSTOMIZATION
|
|
720
724
|
);
|
|
721
725
|
function useViewerCustomizationContext() {
|
|
@@ -868,7 +872,7 @@ function MobileSheet({
|
|
|
868
872
|
}) {
|
|
869
873
|
const sheetRef = React106.useRef(null);
|
|
870
874
|
const { t } = reactI18next.useTranslation();
|
|
871
|
-
const { dragY, dragging, handlers } =
|
|
875
|
+
const { dragY, dragging, handlers } = chunkMRSGNERC_js.useSheetDismissDrag(onClose);
|
|
872
876
|
useModalFocus(open, sheetRef, onClose);
|
|
873
877
|
if (!open) {
|
|
874
878
|
return null;
|
|
@@ -892,7 +896,7 @@ function MobileSheet({
|
|
|
892
896
|
"aria-modal": "true",
|
|
893
897
|
"aria-label": typeof title === "string" ? title : t("pptx.mobileSheet.ariaLabel"),
|
|
894
898
|
tabIndex: -1,
|
|
895
|
-
className:
|
|
899
|
+
className: chunkMA2BI7LX_js.cn(
|
|
896
900
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
897
901
|
"animate-in slide-in-from-bottom duration-200",
|
|
898
902
|
className
|
|
@@ -1074,7 +1078,7 @@ function RibbonGroupScope({
|
|
|
1074
1078
|
}) {
|
|
1075
1079
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "contents", ...groupAttr(id), children });
|
|
1076
1080
|
}
|
|
1077
|
-
var ShapeFormatContext = React106.createContext(null);
|
|
1081
|
+
var ShapeFormatContext = /* @__PURE__ */ React106.createContext(null);
|
|
1078
1082
|
function useShapeFormatContext() {
|
|
1079
1083
|
return React106.useContext(ShapeFormatContext);
|
|
1080
1084
|
}
|
|
@@ -1136,7 +1140,7 @@ function WebHomeControls({
|
|
|
1136
1140
|
function ShapeArrangeExtras(p) {
|
|
1137
1141
|
const commands = useShapeFormatContext();
|
|
1138
1142
|
const crop = commands?.crop;
|
|
1139
|
-
const { isHidden } =
|
|
1143
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(p.hiddenActions);
|
|
1140
1144
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
1141
1145
|
const controls = React106.useMemo(
|
|
1142
1146
|
() => pptx.arrangeShapeHomeControls({
|
|
@@ -1284,7 +1288,7 @@ function ArrangeSection(p) {
|
|
|
1284
1288
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-pptx-chrome": "ribbon-group-label", children: t("pptx.arrange.groupLabel") })
|
|
1285
1289
|
] });
|
|
1286
1290
|
}
|
|
1287
|
-
var RibbonGalleryCommandsContext = React106.createContext(null);
|
|
1291
|
+
var RibbonGalleryCommandsContext = /* @__PURE__ */ React106.createContext(null);
|
|
1288
1292
|
function useRibbonGalleryCommands() {
|
|
1289
1293
|
return React106.useContext(RibbonGalleryCommandsContext);
|
|
1290
1294
|
}
|
|
@@ -1471,7 +1475,7 @@ function TransitionsSection(p) {
|
|
|
1471
1475
|
case "soundPreview": {
|
|
1472
1476
|
const url = pptx.ribbonTransitionStockSoundUrl(transition);
|
|
1473
1477
|
if (url) {
|
|
1474
|
-
|
|
1478
|
+
chunkMRSGNERC_js.playAnimationSound(url);
|
|
1475
1479
|
}
|
|
1476
1480
|
break;
|
|
1477
1481
|
}
|
|
@@ -1547,7 +1551,7 @@ var DEFAULT_VALUE = {
|
|
|
1547
1551
|
pushColor: () => {
|
|
1548
1552
|
}
|
|
1549
1553
|
};
|
|
1550
|
-
var RecentColorsContext = React106.createContext(DEFAULT_VALUE);
|
|
1554
|
+
var RecentColorsContext = /* @__PURE__ */ React106.createContext(DEFAULT_VALUE);
|
|
1551
1555
|
var RecentColorsProvider = RecentColorsContext.Provider;
|
|
1552
1556
|
function useRecentColors() {
|
|
1553
1557
|
return React106.useContext(RecentColorsContext);
|
|
@@ -1599,7 +1603,11 @@ function DrawSection(p) {
|
|
|
1599
1603
|
}, [p, pushColor]);
|
|
1600
1604
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-ribbon-draw", { ref });
|
|
1601
1605
|
}
|
|
1602
|
-
var
|
|
1606
|
+
var ViewerStorageContext = React106.createContext(void 0);
|
|
1607
|
+
function useViewerStorage() {
|
|
1608
|
+
return React106.useContext(ViewerStorageContext);
|
|
1609
|
+
}
|
|
1610
|
+
var ViewerRegionBaseContext = /* @__PURE__ */ React106.createContext(null);
|
|
1603
1611
|
function useRegionRenderer(id) {
|
|
1604
1612
|
const customization = useViewerCustomizationContext();
|
|
1605
1613
|
const base = React106.useContext(ViewerRegionBaseContext);
|
|
@@ -1637,11 +1645,14 @@ function ViewerRegion(props) {
|
|
|
1637
1645
|
}
|
|
1638
1646
|
);
|
|
1639
1647
|
}
|
|
1640
|
-
var AccountAuthContext = React106.createContext(
|
|
1648
|
+
var AccountAuthContext = /* @__PURE__ */ React106.createContext(
|
|
1649
|
+
void 0
|
|
1650
|
+
);
|
|
1641
1651
|
var cardClass = "border border-border bg-card p-6 text-card-foreground";
|
|
1642
1652
|
function AccountPage() {
|
|
1643
1653
|
const { t } = reactI18next.useTranslation();
|
|
1644
1654
|
const accountAuth = React106.useContext(AccountAuthContext);
|
|
1655
|
+
const storage = useViewerStorage();
|
|
1645
1656
|
const [profile, setProfile] = React106.useState(
|
|
1646
1657
|
() => pptx.readStoredViewerPrefs().profile ?? pptx.DEFAULT_VIEWER_PROFILE
|
|
1647
1658
|
);
|
|
@@ -1653,21 +1664,21 @@ function AccountPage() {
|
|
|
1653
1664
|
const [usage, setUsage] = React106.useState(null);
|
|
1654
1665
|
const [cleared, setCleared] = React106.useState(false);
|
|
1655
1666
|
const refreshUsage = () => {
|
|
1656
|
-
void pptx.getLocalStorageUsageSummary().then(setUsage);
|
|
1667
|
+
void pptx.getLocalStorageUsageSummary(storage).then(setUsage);
|
|
1657
1668
|
};
|
|
1658
|
-
React106.useEffect(refreshUsage, []);
|
|
1669
|
+
React106.useEffect(refreshUsage, [storage]);
|
|
1659
1670
|
const handleClear = () => {
|
|
1660
1671
|
if (!window.confirm(t("pptx.account.storage.clearConfirm"))) {
|
|
1661
1672
|
return;
|
|
1662
1673
|
}
|
|
1663
|
-
void pptx.clearAllLocalViewerData().then(() => {
|
|
1674
|
+
void pptx.clearAllLocalViewerData(storage).then(() => {
|
|
1664
1675
|
setCleared(true);
|
|
1665
1676
|
refreshUsage();
|
|
1666
1677
|
setTimeout(() => setCleared(false), 4e3);
|
|
1667
1678
|
return void 0;
|
|
1668
1679
|
});
|
|
1669
1680
|
};
|
|
1670
|
-
const version = "4.
|
|
1681
|
+
const version = "4.47.0" ;
|
|
1671
1682
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1672
1683
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
1673
1684
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1707,7 +1718,7 @@ function AccountPage() {
|
|
|
1707
1718
|
"aria-label": color,
|
|
1708
1719
|
"aria-pressed": profile.avatarColor === color,
|
|
1709
1720
|
onClick: () => updateProfile({ avatarColor: color }),
|
|
1710
|
-
className:
|
|
1721
|
+
className: chunkMA2BI7LX_js.cn(
|
|
1711
1722
|
"size-7 rounded-full border-2 transition-transform",
|
|
1712
1723
|
profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
|
|
1713
1724
|
),
|
|
@@ -1931,11 +1942,12 @@ function FileSection(p) {
|
|
|
1931
1942
|
const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
|
|
1932
1943
|
const [query, setQuery] = React106.useState("");
|
|
1933
1944
|
const [recent, setRecent] = React106.useState([]);
|
|
1934
|
-
const { isHidden } =
|
|
1945
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(p.hiddenActions);
|
|
1935
1946
|
const exportHidden = isHidden("export");
|
|
1947
|
+
const storage = useViewerStorage();
|
|
1936
1948
|
React106.useEffect(() => {
|
|
1937
|
-
void pptx.listBackstageRecentFiles(t, p.recentPresentationsCount).then(setRecent);
|
|
1938
|
-
}, [t, p.recentPresentationsCount]);
|
|
1949
|
+
void pptx.listBackstageRecentFiles(t, p.recentPresentationsCount, storage).then(setRecent);
|
|
1950
|
+
}, [t, p.recentPresentationsCount, storage]);
|
|
1939
1951
|
const visibleRecent = React106.useMemo(() => {
|
|
1940
1952
|
const q = query.trim().toLowerCase();
|
|
1941
1953
|
return q ? recent.filter((file) => `${file.name} ${file.location}`.toLowerCase().includes(q)) : recent;
|
|
@@ -1979,7 +1991,7 @@ function FileSection(p) {
|
|
|
1979
1991
|
type: "button",
|
|
1980
1992
|
"data-pptx-backstage-nav-item": true,
|
|
1981
1993
|
"aria-current": page === item.id ? "page" : void 0,
|
|
1982
|
-
onClick: () => item.id === "close" ? p.onClose() : item.id === "save" ? run(p.onSaveAsPptx) : setRequestedPage(item.id),
|
|
1994
|
+
onClick: () => item.id === "close" ? p.onClose() : item.id === "save" ? run(p.onSave ?? p.onSaveAsPptx) : setRequestedPage(item.id),
|
|
1983
1995
|
className: `${pptx.BACKSTAGE_NAV_CLASSES.row} ${page === item.id ? pptx.BACKSTAGE_NAV_CLASSES.active : pptx.BACKSTAGE_NAV_CLASSES.inactive}`,
|
|
1984
1996
|
children: [
|
|
1985
1997
|
!item.host && /* @__PURE__ */ jsxRuntime.jsx(BackstageNavIcon, { page: item.id }),
|
|
@@ -2179,7 +2191,7 @@ function RibbonMenu({
|
|
|
2179
2191
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2180
2192
|
"div",
|
|
2181
2193
|
{
|
|
2182
|
-
className:
|
|
2194
|
+
className: chunkMA2BI7LX_js.cn("fixed z-50", className),
|
|
2183
2195
|
style: pos ? { left: pos.left, top: pos.top } : { visibility: "hidden" },
|
|
2184
2196
|
children
|
|
2185
2197
|
}
|
|
@@ -2205,7 +2217,7 @@ function LayoutGalleryMenu(p) {
|
|
|
2205
2217
|
type: "button",
|
|
2206
2218
|
"aria-current": isCurrent ? "true" : void 0,
|
|
2207
2219
|
title: isCurrent ? `${layout.name} (${t("pptx.layoutGallery.current")})` : layout.name,
|
|
2208
|
-
className:
|
|
2220
|
+
className: chunkMA2BI7LX_js.cn(
|
|
2209
2221
|
"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",
|
|
2210
2222
|
isCurrent ? "border-primary bg-primary/10" : "border-transparent"
|
|
2211
2223
|
),
|
|
@@ -2279,7 +2291,7 @@ function LayoutArtwork({
|
|
|
2279
2291
|
backgroundColor
|
|
2280
2292
|
};
|
|
2281
2293
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (preview?.elements ?? []).slice(0, MAX_PREVIEW_ELEMENTS).map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2282
|
-
|
|
2294
|
+
chunkMRSGNERC_js.StaticElementRenderer,
|
|
2283
2295
|
{
|
|
2284
2296
|
element,
|
|
2285
2297
|
activeSlide: slide,
|
|
@@ -2674,7 +2686,7 @@ function CustomShowsControls({
|
|
|
2674
2686
|
{
|
|
2675
2687
|
type: "button",
|
|
2676
2688
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
2677
|
-
className:
|
|
2689
|
+
className: chunkMA2BI7LX_js.cn(
|
|
2678
2690
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
2679
2691
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
2680
2692
|
),
|
|
@@ -2729,7 +2741,7 @@ function SlideShowOptions({
|
|
|
2729
2741
|
}
|
|
2730
2742
|
function SubtitleSettingsControl() {
|
|
2731
2743
|
const { t } = reactI18next.useTranslation();
|
|
2732
|
-
const supplied = React106.useContext(
|
|
2744
|
+
const supplied = React106.useContext(chunkMRSGNERC_js.ViewerOptionsStoreContext);
|
|
2733
2745
|
const fallback = React106.useRef(null);
|
|
2734
2746
|
if (!supplied) {
|
|
2735
2747
|
fallback.current ??= pptx.createViewerOptionsStore({ persist: false });
|
|
@@ -2763,7 +2775,7 @@ function SubtitleSettingsControl() {
|
|
|
2763
2775
|
}
|
|
2764
2776
|
function SlideShowSection(p) {
|
|
2765
2777
|
const { t } = reactI18next.useTranslation();
|
|
2766
|
-
const { isHidden } =
|
|
2778
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(p.hiddenActions);
|
|
2767
2779
|
const [showsOpen, setShowsOpen] = React106.useState(false);
|
|
2768
2780
|
const showsRef = React106.useRef(null);
|
|
2769
2781
|
React106.useEffect(() => {
|
|
@@ -2844,7 +2856,7 @@ function extractFontInfo(element, themeFonts) {
|
|
|
2844
2856
|
fontFamily: pptx.resolveDefaultFontFamily(placeholderType, themeFonts),
|
|
2845
2857
|
fontSize: "24"
|
|
2846
2858
|
};
|
|
2847
|
-
if (!element || !
|
|
2859
|
+
if (!element || !pptx$1.hasTextProperties(element)) {
|
|
2848
2860
|
return defaults;
|
|
2849
2861
|
}
|
|
2850
2862
|
const segStyle = element.textSegments?.[0]?.style;
|
|
@@ -2856,7 +2868,7 @@ function extractFontInfo(element, themeFonts) {
|
|
|
2856
2868
|
fontSize: fontSize !== void 0 && fontSize !== null ? String(pptx.textFontSizePxToPt(fontSize)) : defaults.fontSize
|
|
2857
2869
|
};
|
|
2858
2870
|
}
|
|
2859
|
-
var ThemeColorMapContext = React106.createContext(void 0);
|
|
2871
|
+
var ThemeColorMapContext = /* @__PURE__ */ React106.createContext(void 0);
|
|
2860
2872
|
var ThemeColorMapProvider = ThemeColorMapContext.Provider;
|
|
2861
2873
|
function useThemeColorMap() {
|
|
2862
2874
|
return React106.useContext(ThemeColorMapContext);
|
|
@@ -2865,7 +2877,7 @@ function getEffectiveTextStyle(element, tableEditorState) {
|
|
|
2865
2877
|
if (!element) {
|
|
2866
2878
|
return void 0;
|
|
2867
2879
|
}
|
|
2868
|
-
if (
|
|
2880
|
+
if (pptx$1.hasTextProperties(element)) {
|
|
2869
2881
|
return element.textStyle;
|
|
2870
2882
|
}
|
|
2871
2883
|
if (element.type === "table" && tableEditorState && element.tableData) {
|
|
@@ -2878,7 +2890,7 @@ function isTextDecorationFlag(id) {
|
|
|
2878
2890
|
return pptx.TEXT_DECORATION_FLAGS.includes(id);
|
|
2879
2891
|
}
|
|
2880
2892
|
function textSectionFlags(element, tableEditorState, readSelection) {
|
|
2881
|
-
if (element &&
|
|
2893
|
+
if (element && pptx$1.hasTextProperties(element)) {
|
|
2882
2894
|
const result = readSelection ? pptx.getInlineEditorSelectionResult(element.textSegments) : null;
|
|
2883
2895
|
const current = result?.kind === "supported" && (!result.snapshot || result.snapshot.elementId === element.id) ? result : null;
|
|
2884
2896
|
return pptx.getSelectionTextStyleFlags(
|
|
@@ -2894,7 +2906,7 @@ function textSectionFlags(element, tableEditorState, readSelection) {
|
|
|
2894
2906
|
);
|
|
2895
2907
|
}
|
|
2896
2908
|
function textSectionBulletKind(element, tableEditorState) {
|
|
2897
|
-
if (element &&
|
|
2909
|
+
if (element && pptx$1.hasTextProperties(element)) {
|
|
2898
2910
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments, { preserveCaret: true });
|
|
2899
2911
|
return result.kind === "supported" && (!result.snapshot || result.snapshot.elementId === element.id) ? pptx.selectionBulletKind(element, result.selection, result.snapshot?.textSegments) : pptx.elementBulletKind(element);
|
|
2900
2912
|
}
|
|
@@ -3131,7 +3143,7 @@ function subscribe(onChange) {
|
|
|
3131
3143
|
}
|
|
3132
3144
|
function useParagraphListKind(element) {
|
|
3133
3145
|
const read = React106.useCallback(() => {
|
|
3134
|
-
if (!element || !
|
|
3146
|
+
if (!element || !pptx$1.hasTextProperties(element)) {
|
|
3135
3147
|
return "none";
|
|
3136
3148
|
}
|
|
3137
3149
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments, { preserveCaret: true });
|
|
@@ -3154,7 +3166,7 @@ function TextSection(p) {
|
|
|
3154
3166
|
const hasSel = Boolean(p.selectedElement);
|
|
3155
3167
|
const canMut = hasSel && p.canEdit;
|
|
3156
3168
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
3157
|
-
const isTextEl = hasSel && p.selectedElement !== null &&
|
|
3169
|
+
const isTextEl = hasSel && p.selectedElement !== null && pptx$1.hasTextProperties(p.selectedElement);
|
|
3158
3170
|
const isTable = hasSel && p.selectedElement?.type === "table";
|
|
3159
3171
|
const canFormat = isTextEl || isTable;
|
|
3160
3172
|
const effectiveTs = getEffectiveTextStyle(p.selectedElement, p.tableEditorState);
|
|
@@ -3164,15 +3176,15 @@ function TextSection(p) {
|
|
|
3164
3176
|
if (!p.canEdit || !canFormat || !p.selectedElement) {
|
|
3165
3177
|
return;
|
|
3166
3178
|
}
|
|
3167
|
-
if (
|
|
3179
|
+
if (pptx$1.hasTextProperties(p.selectedElement)) {
|
|
3168
3180
|
p.onToggleBullets(kind);
|
|
3169
3181
|
return;
|
|
3170
3182
|
}
|
|
3171
3183
|
p.onUpdateTextStyle({ listType: effectiveTs?.listType === kind ? "none" : kind });
|
|
3172
3184
|
};
|
|
3173
|
-
const currentColor = isTextEl && p.selectedElement &&
|
|
3174
|
-
const currentColorThemeRef = isTextEl && p.selectedElement &&
|
|
3175
|
-
const currentHighlight = isTextEl && p.selectedElement &&
|
|
3185
|
+
const currentColor = isTextEl && p.selectedElement && pptx$1.hasTextProperties(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.color ?? p.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
|
|
3186
|
+
const currentColorThemeRef = isTextEl && p.selectedElement && pptx$1.hasTextProperties(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.colorRef ?? p.selectedElement.textStyle?.colorRef : void 0;
|
|
3187
|
+
const currentHighlight = isTextEl && p.selectedElement && pptx$1.hasTextProperties(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
|
|
3176
3188
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3177
3189
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.font"), children: [
|
|
3178
3190
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "font-controls", children: [
|
|
@@ -3187,7 +3199,7 @@ function TextSection(p) {
|
|
|
3187
3199
|
customFonts: p.customFontFamilies,
|
|
3188
3200
|
onFamily: (family) => p.onUpdateTextStyle({ fontFamily: family }),
|
|
3189
3201
|
onSize: (size) => p.onUpdateTextStyle({
|
|
3190
|
-
fontSize: p.selectedElement &&
|
|
3202
|
+
fontSize: p.selectedElement && pptx$1.hasTextProperties(p.selectedElement) ? pptx.textFontSizePtToPx(size) : size
|
|
3191
3203
|
})
|
|
3192
3204
|
}
|
|
3193
3205
|
),
|
|
@@ -3302,7 +3314,7 @@ function MobileMenuSheet(props) {
|
|
|
3302
3314
|
const { t } = reactI18next.useTranslation();
|
|
3303
3315
|
const { open, onClose } = props;
|
|
3304
3316
|
const [active, setActive] = React106.useState("home");
|
|
3305
|
-
const { isTabVisible } =
|
|
3317
|
+
const { isTabVisible } = chunkMRSGNERC_js.useToolbarVisibility(props.hiddenActions);
|
|
3306
3318
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3307
3319
|
MobileSheet,
|
|
3308
3320
|
{
|
|
@@ -3316,7 +3328,7 @@ function MobileMenuSheet(props) {
|
|
|
3316
3328
|
{
|
|
3317
3329
|
type: "button",
|
|
3318
3330
|
onClick: () => setActive(active === key ? null : key),
|
|
3319
|
-
className:
|
|
3331
|
+
className: chunkMA2BI7LX_js.cn(
|
|
3320
3332
|
"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]",
|
|
3321
3333
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
3322
3334
|
),
|
|
@@ -3562,6 +3574,7 @@ function MobileSectionBody({
|
|
|
3562
3574
|
onExportVideo: p.onExportVideo,
|
|
3563
3575
|
onExportGif: p.onExportGif,
|
|
3564
3576
|
onExportJson: p.onExportJson,
|
|
3577
|
+
onSave: p.onSave,
|
|
3565
3578
|
onSaveAsPptx: p.onSaveAsPptx,
|
|
3566
3579
|
onSaveAsPpsx: p.onSaveAsPpsx,
|
|
3567
3580
|
onSaveAsPptm: p.onSaveAsPptm,
|
|
@@ -3591,7 +3604,7 @@ function MobileToolbar(props) {
|
|
|
3591
3604
|
const { t } = reactI18next.useTranslation();
|
|
3592
3605
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
3593
3606
|
const [menuOpen, setMenuOpen] = React106.useState(false);
|
|
3594
|
-
const { isHidden } =
|
|
3607
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(props.hiddenActions);
|
|
3595
3608
|
const showEdit = mode === "edit" || mode === "master";
|
|
3596
3609
|
const hidden = [];
|
|
3597
3610
|
if (isHidden("undo")) {
|
|
@@ -3611,7 +3624,7 @@ function MobileToolbar(props) {
|
|
|
3611
3624
|
undo: onUndo,
|
|
3612
3625
|
redo: onRedo,
|
|
3613
3626
|
ai: () => props.onToggleAiPanel?.(),
|
|
3614
|
-
save: onSaveAsPptx,
|
|
3627
|
+
save: props.onSave ?? onSaveAsPptx,
|
|
3615
3628
|
present: () => onSetMode("present"),
|
|
3616
3629
|
share: () => props.onOpenShareDialog?.()
|
|
3617
3630
|
};
|
|
@@ -3638,7 +3651,7 @@ function MobileToolbar(props) {
|
|
|
3638
3651
|
}
|
|
3639
3652
|
function ChartSelectionStrip() {
|
|
3640
3653
|
const { t } = reactI18next.useTranslation();
|
|
3641
|
-
const commands =
|
|
3654
|
+
const commands = chunkMRSGNERC_js.useChartFormatContext();
|
|
3642
3655
|
const chart = commands?.chart;
|
|
3643
3656
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
3644
3657
|
const controls = React106.useMemo(
|
|
@@ -3669,7 +3682,7 @@ function PictureSizeStrip({
|
|
|
3669
3682
|
hiddenActions
|
|
3670
3683
|
}) {
|
|
3671
3684
|
const crop = useShapeFormatContext()?.crop;
|
|
3672
|
-
const { isHidden } =
|
|
3685
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(hiddenActions);
|
|
3673
3686
|
const controls = React106.useMemo(
|
|
3674
3687
|
() => pptx.pictureSizeHomeControls({
|
|
3675
3688
|
editable: Boolean(crop),
|
|
@@ -3713,7 +3726,7 @@ function DrawingGroup(p) {
|
|
|
3713
3726
|
const { recentColors, pushColor } = useRecentColors();
|
|
3714
3727
|
const themeColors = useThemeColorMap();
|
|
3715
3728
|
const commands = useRibbonGalleryCommands();
|
|
3716
|
-
const style = p.selectedElement &&
|
|
3729
|
+
const style = p.selectedElement && pptx$1.hasShapeProperties(p.selectedElement) ? p.selectedElement.shapeStyle : void 0;
|
|
3717
3730
|
const { onMoveLayer, onMoveLayerToEdge, onSetNewShapeType, onAddShape, onUpdateElementStyle } = p;
|
|
3718
3731
|
const hasSelection = Boolean(p.selectedElement);
|
|
3719
3732
|
const controls = React106.useMemo(
|
|
@@ -3814,7 +3827,7 @@ function EditingSection(p) {
|
|
|
3814
3827
|
] });
|
|
3815
3828
|
}
|
|
3816
3829
|
var NO_ADD_INS = [];
|
|
3817
|
-
var RibbonAddInsContext = React106.createContext(NO_ADD_INS);
|
|
3830
|
+
var RibbonAddInsContext = /* @__PURE__ */ React106.createContext(NO_ADD_INS);
|
|
3818
3831
|
function useRibbonAddInTabs(onFallback) {
|
|
3819
3832
|
const tabs = React106.useContext(RibbonAddInsContext);
|
|
3820
3833
|
const visible = React106.useMemo(() => pptx.visibleRibbonAddIns(tabs), [tabs]);
|
|
@@ -3842,7 +3855,7 @@ var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap t
|
|
|
3842
3855
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
3843
3856
|
function RibbonTabBar(p) {
|
|
3844
3857
|
const { t } = reactI18next.useTranslation();
|
|
3845
|
-
const viewerOptions =
|
|
3858
|
+
const viewerOptions = chunkMRSGNERC_js.useViewerOptionsContext();
|
|
3846
3859
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3847
3860
|
"div",
|
|
3848
3861
|
{
|
|
@@ -3850,7 +3863,7 @@ function RibbonTabBar(p) {
|
|
|
3850
3863
|
"data-pptx-chrome": "ribbon-tabs",
|
|
3851
3864
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
3852
3865
|
children: [
|
|
3853
|
-
|
|
3866
|
+
chunkMA2BI7LX_js.TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
3854
3867
|
const selected = p.activeSection === s.id;
|
|
3855
3868
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3856
3869
|
"button",
|
|
@@ -3860,7 +3873,7 @@ function RibbonTabBar(p) {
|
|
|
3860
3873
|
"aria-selected": selected,
|
|
3861
3874
|
title: pptx.resolveScreenTip(viewerOptions, t(s.labelKey)),
|
|
3862
3875
|
onClick: () => p.onSelectSection(s.id),
|
|
3863
|
-
className:
|
|
3876
|
+
className: chunkMA2BI7LX_js.cn(
|
|
3864
3877
|
TAB_BASE,
|
|
3865
3878
|
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"
|
|
3866
3879
|
),
|
|
@@ -3880,7 +3893,7 @@ function RibbonTabBar(p) {
|
|
|
3880
3893
|
...{ [pptx.RIBBON_ADD_IN_TAB_ATTR]: tab.id },
|
|
3881
3894
|
title: pptx.resolveScreenTip(viewerOptions, tab.label),
|
|
3882
3895
|
onClick: () => p.onSelectAddIn?.(tab.id),
|
|
3883
|
-
className:
|
|
3896
|
+
className: chunkMA2BI7LX_js.cn(
|
|
3884
3897
|
TAB_BASE,
|
|
3885
3898
|
selected ? `text-foreground ${TAB_UNDERLINE}` : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
3886
3899
|
),
|
|
@@ -3901,7 +3914,7 @@ function RibbonTabBar(p) {
|
|
|
3901
3914
|
...{ [pptx.RIBBON_CONTEXTUAL_TAB_ATTR]: id },
|
|
3902
3915
|
title: pptx.resolveScreenTip(viewerOptions, label),
|
|
3903
3916
|
onClick: () => p.onSelectContextual(id),
|
|
3904
|
-
className:
|
|
3917
|
+
className: chunkMA2BI7LX_js.cn(
|
|
3905
3918
|
TAB_BASE,
|
|
3906
3919
|
"text-primary",
|
|
3907
3920
|
selected ? TAB_UNDERLINE : "hover:bg-primary/10"
|
|
@@ -3919,9 +3932,9 @@ function RibbonTabBar(p) {
|
|
|
3919
3932
|
}
|
|
3920
3933
|
function TabRowActions(p) {
|
|
3921
3934
|
const { t } = reactI18next.useTranslation();
|
|
3922
|
-
const collab =
|
|
3935
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
3923
3936
|
const isCollaborating = Boolean(collab && collab.status === "connected");
|
|
3924
|
-
const { isHidden } =
|
|
3937
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(p.hiddenActions);
|
|
3925
3938
|
const customization = useViewerCustomizationContext();
|
|
3926
3939
|
const ref = React106.useRef(null);
|
|
3927
3940
|
const handlers = React106.useRef(p);
|
|
@@ -3976,7 +3989,7 @@ function TabRowActions(p) {
|
|
|
3976
3989
|
}
|
|
3977
3990
|
function TitleBarElement(p) {
|
|
3978
3991
|
const { t } = reactI18next.useTranslation();
|
|
3979
|
-
const options =
|
|
3992
|
+
const options = chunkMRSGNERC_js.useViewerOptionsContext();
|
|
3980
3993
|
const customization = useViewerCustomizationContext();
|
|
3981
3994
|
const ref = React106.useRef(null);
|
|
3982
3995
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -4049,7 +4062,7 @@ function PresentDropdown({
|
|
|
4049
4062
|
{
|
|
4050
4063
|
type: "button",
|
|
4051
4064
|
onClick: onPresent,
|
|
4052
|
-
className:
|
|
4065
|
+
className: chunkMA2BI7LX_js.cn(
|
|
4053
4066
|
"px-2 py-1 transition-colors",
|
|
4054
4067
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
4055
4068
|
),
|
|
@@ -4062,7 +4075,7 @@ function PresentDropdown({
|
|
|
4062
4075
|
{
|
|
4063
4076
|
type: "button",
|
|
4064
4077
|
onClick: () => setOpen((prev) => !prev),
|
|
4065
|
-
className:
|
|
4078
|
+
className: chunkMA2BI7LX_js.cn(
|
|
4066
4079
|
"inline-flex items-center px-1 transition-colors border-l border-border",
|
|
4067
4080
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
4068
4081
|
),
|
|
@@ -4265,7 +4278,7 @@ function OverflowMenu(p) {
|
|
|
4265
4278
|
{
|
|
4266
4279
|
type: "button",
|
|
4267
4280
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
4268
|
-
className:
|
|
4281
|
+
className: chunkMA2BI7LX_js.cn(
|
|
4269
4282
|
"p-1.5 rounded transition-colors",
|
|
4270
4283
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
4271
4284
|
),
|
|
@@ -4312,7 +4325,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4312
4325
|
onToggleSidebar,
|
|
4313
4326
|
onToggleInspector
|
|
4314
4327
|
} = p;
|
|
4315
|
-
const collab =
|
|
4328
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
4316
4329
|
const customization = useViewerCustomizationContext();
|
|
4317
4330
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
4318
4331
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -4330,7 +4343,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4330
4343
|
{
|
|
4331
4344
|
type: "button",
|
|
4332
4345
|
onClick: onToggleSidebar,
|
|
4333
|
-
className:
|
|
4346
|
+
className: chunkMA2BI7LX_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
4334
4347
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
4335
4348
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
4336
4349
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic })
|
|
@@ -4391,7 +4404,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4391
4404
|
{
|
|
4392
4405
|
type: "button",
|
|
4393
4406
|
onClick: onToggleInspector,
|
|
4394
|
-
className:
|
|
4407
|
+
className: chunkMA2BI7LX_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
4395
4408
|
title: t("pptx.toolbar.toggleInspector"),
|
|
4396
4409
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
4397
4410
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic })
|
|
@@ -4402,7 +4415,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4402
4415
|
{
|
|
4403
4416
|
type: "button",
|
|
4404
4417
|
onClick: p.onToggleAiPanel,
|
|
4405
|
-
className:
|
|
4418
|
+
className: chunkMA2BI7LX_js.cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
4406
4419
|
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
4407
4420
|
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
4408
4421
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic })
|
|
@@ -4413,7 +4426,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4413
4426
|
{
|
|
4414
4427
|
type: "button",
|
|
4415
4428
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
4416
|
-
className:
|
|
4429
|
+
className: chunkMA2BI7LX_js.cn(qab, "text-muted-foreground"),
|
|
4417
4430
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
4418
4431
|
"aria-label": t("pptx.toolbar.settings"),
|
|
4419
4432
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -4602,8 +4615,8 @@ function ToolbarLateTabs({
|
|
|
4602
4615
|
function Toolbar(p) {
|
|
4603
4616
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
4604
4617
|
const { t } = reactI18next.useTranslation();
|
|
4605
|
-
const { isTabVisible } =
|
|
4606
|
-
const viewerOptions =
|
|
4618
|
+
const { isTabVisible } = chunkMRSGNERC_js.useToolbarVisibility(p.hiddenActions);
|
|
4619
|
+
const viewerOptions = chunkMRSGNERC_js.useViewerOptionsContext();
|
|
4607
4620
|
const customization = useViewerCustomizationContext();
|
|
4608
4621
|
const belowInput = React106.useMemo(
|
|
4609
4622
|
() => ({
|
|
@@ -4656,6 +4669,7 @@ function Toolbar(p) {
|
|
|
4656
4669
|
"div",
|
|
4657
4670
|
{
|
|
4658
4671
|
role: "toolbar",
|
|
4672
|
+
"data-pptx-scope": "",
|
|
4659
4673
|
"data-pptx-chrome": "ribbon",
|
|
4660
4674
|
"aria-label": t("pptx.toolbar.presentationToolbarAria"),
|
|
4661
4675
|
className: "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
|
|
@@ -4700,7 +4714,7 @@ function Toolbar(p) {
|
|
|
4700
4714
|
{
|
|
4701
4715
|
type: "button",
|
|
4702
4716
|
onClick: p.onToggleCompactToolbar,
|
|
4703
|
-
className:
|
|
4717
|
+
className: chunkMA2BI7LX_js.cn(
|
|
4704
4718
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
4705
4719
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
4706
4720
|
),
|
|
@@ -4726,7 +4740,7 @@ function Toolbar(p) {
|
|
|
4726
4740
|
{
|
|
4727
4741
|
ref: attachOverflow,
|
|
4728
4742
|
"data-pptx-chrome": "ribbon-content",
|
|
4729
|
-
className:
|
|
4743
|
+
className: chunkMA2BI7LX_js.cn(
|
|
4730
4744
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
4731
4745
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
4732
4746
|
// children are this row's flex items too and must not shrink (a shrunk
|
|
@@ -4748,6 +4762,7 @@ function Toolbar(p) {
|
|
|
4748
4762
|
onExportVideo: p.onExportVideo,
|
|
4749
4763
|
onExportGif: p.onExportGif,
|
|
4750
4764
|
onExportJson: p.onExportJson,
|
|
4765
|
+
onSave: p.onSave,
|
|
4751
4766
|
onSaveAsPptx: p.onSaveAsPptx,
|
|
4752
4767
|
onSaveAsPpsx: p.onSaveAsPpsx,
|
|
4753
4768
|
onSaveAsPptm: p.onSaveAsPptm,
|
|
@@ -5587,7 +5602,7 @@ function DrawingOverlaySvg({
|
|
|
5587
5602
|
onPointerDown,
|
|
5588
5603
|
onPointerMove,
|
|
5589
5604
|
onPointerUp,
|
|
5590
|
-
children: isStrokeActive && liveStrokeView ?
|
|
5605
|
+
children: isStrokeActive && liveStrokeView ? chunkMRSGNERC_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5591
5606
|
"path",
|
|
5592
5607
|
{
|
|
5593
5608
|
d: liveStrokeD,
|
|
@@ -5602,7 +5617,7 @@ function DrawingOverlaySvg({
|
|
|
5602
5617
|
}
|
|
5603
5618
|
);
|
|
5604
5619
|
}
|
|
5605
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
5620
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkMA2BI7LX_js.GRID_SIZE, visible }) {
|
|
5606
5621
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
5607
5622
|
const patternId = React106.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
5608
5623
|
if (!visible) {
|
|
@@ -6166,7 +6181,7 @@ function PictureCropOverlay({
|
|
|
6166
6181
|
};
|
|
6167
6182
|
};
|
|
6168
6183
|
const { ghost, frame, handles } = overlay;
|
|
6169
|
-
const src =
|
|
6184
|
+
const src = chunkMRSGNERC_js.imgSrc(element);
|
|
6170
6185
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6171
6186
|
"div",
|
|
6172
6187
|
{
|
|
@@ -6342,8 +6357,10 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
6342
6357
|
}
|
|
6343
6358
|
);
|
|
6344
6359
|
}
|
|
6345
|
-
var HorizontalRuler =
|
|
6346
|
-
|
|
6360
|
+
var HorizontalRuler = /* @__PURE__ */ chunkMRSGNERC_js.withDisplayName(
|
|
6361
|
+
/* @__PURE__ */ React106__default.default.memo(HorizontalRulerView),
|
|
6362
|
+
"HorizontalRuler"
|
|
6363
|
+
);
|
|
6347
6364
|
function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
6348
6365
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6349
6366
|
"svg",
|
|
@@ -6414,8 +6431,10 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
6414
6431
|
}
|
|
6415
6432
|
);
|
|
6416
6433
|
}
|
|
6417
|
-
var VerticalRuler =
|
|
6418
|
-
|
|
6434
|
+
var VerticalRuler = /* @__PURE__ */ chunkMRSGNERC_js.withDisplayName(
|
|
6435
|
+
/* @__PURE__ */ React106__default.default.memo(VerticalRulerView),
|
|
6436
|
+
"VerticalRuler"
|
|
6437
|
+
);
|
|
6419
6438
|
function Ruler({
|
|
6420
6439
|
canvasSize,
|
|
6421
6440
|
editorScale,
|
|
@@ -6579,10 +6598,10 @@ function SelectionHandleOverlay({
|
|
|
6579
6598
|
position: "absolute",
|
|
6580
6599
|
left: element.x,
|
|
6581
6600
|
top: element.y,
|
|
6582
|
-
width: Math.max(element.width,
|
|
6583
|
-
height: Math.max(element.height,
|
|
6584
|
-
["--pptx-selection-width"]: `${Math.max(element.width,
|
|
6585
|
-
["--pptx-selection-height"]: `${Math.max(element.height,
|
|
6601
|
+
width: Math.max(element.width, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE),
|
|
6602
|
+
height: Math.max(element.height, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE),
|
|
6603
|
+
["--pptx-selection-width"]: `${Math.max(element.width, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE)}px`,
|
|
6604
|
+
["--pptx-selection-height"]: `${Math.max(element.height, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE)}px`,
|
|
6586
6605
|
// Every slide element carries an explicit numeric `zIndex` (see
|
|
6587
6606
|
// `getContainerStyle`), so a sibling with no z-index at all paints
|
|
6588
6607
|
// at the CSS "z-index: 0" level regardless of DOM order: any
|
|
@@ -6594,7 +6613,7 @@ function SelectionHandleOverlay({
|
|
|
6594
6613
|
// (marquee z-50, connector overlay z-55/56) to match, well clear of
|
|
6595
6614
|
// any realistic per-slide element count.
|
|
6596
6615
|
zIndex: 58,
|
|
6597
|
-
transform:
|
|
6616
|
+
transform: chunkMA2BI7LX_js.getElementTransform(element),
|
|
6598
6617
|
transformOrigin: "center",
|
|
6599
6618
|
// Transparent everywhere a handle button is not, so a click that
|
|
6600
6619
|
// misses every handle still reaches the shape (or whatever is
|
|
@@ -6606,14 +6625,14 @@ function SelectionHandleOverlay({
|
|
|
6606
6625
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
6607
6626
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
6608
6627
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6609
|
-
|
|
6628
|
+
chunkMRSGNERC_js.ResizeHandles,
|
|
6610
6629
|
{
|
|
6611
6630
|
elementId: element.id,
|
|
6612
6631
|
adjustmentHandles,
|
|
6613
6632
|
onResizePointerDown,
|
|
6614
6633
|
onAdjustmentPointerDown,
|
|
6615
6634
|
rotation: element.rotation,
|
|
6616
|
-
nonRotationTransform:
|
|
6635
|
+
nonRotationTransform: chunkMA2BI7LX_js.getElementTransformWithoutRotation(element),
|
|
6617
6636
|
onRotate: allow.rotatable ? onRotate : void 0,
|
|
6618
6637
|
forcePointerEvents: true
|
|
6619
6638
|
}
|
|
@@ -7317,7 +7336,7 @@ function SlideCanvas(props) {
|
|
|
7317
7336
|
props.registerInlineEditReader
|
|
7318
7337
|
]
|
|
7319
7338
|
);
|
|
7320
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7339
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
7321
7340
|
}
|
|
7322
7341
|
function SlideCanvasContent({
|
|
7323
7342
|
imagePaste,
|
|
@@ -7586,7 +7605,7 @@ function SlideCanvasContent({
|
|
|
7586
7605
|
onPointerMove: handleStagePointerMove,
|
|
7587
7606
|
onPointerUp: handleStagePointerUp,
|
|
7588
7607
|
children: [
|
|
7589
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7608
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
7590
7609
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
7591
7610
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
7592
7611
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7598,7 +7617,7 @@ function SlideCanvasContent({
|
|
|
7598
7617
|
}
|
|
7599
7618
|
),
|
|
7600
7619
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7601
|
-
|
|
7620
|
+
chunkMRSGNERC_js.ElementRenderer,
|
|
7602
7621
|
{
|
|
7603
7622
|
element,
|
|
7604
7623
|
activeSlide,
|
|
@@ -7620,7 +7639,7 @@ function SlideCanvasContent({
|
|
|
7620
7639
|
),
|
|
7621
7640
|
renderInk: false,
|
|
7622
7641
|
renderGroups: true,
|
|
7623
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7642
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkMA2BI7LX_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7624
7643
|
onResizePointerDown: stableResizePointerDown,
|
|
7625
7644
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7626
7645
|
onRotate: stableRotate,
|
|
@@ -7642,7 +7661,7 @@ function SlideCanvasContent({
|
|
|
7642
7661
|
`tpl-${element.id}`
|
|
7643
7662
|
)),
|
|
7644
7663
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7645
|
-
|
|
7664
|
+
chunkMRSGNERC_js.ElementRenderer,
|
|
7646
7665
|
{
|
|
7647
7666
|
element,
|
|
7648
7667
|
activeSlide,
|
|
@@ -7664,7 +7683,7 @@ function SlideCanvasContent({
|
|
|
7664
7683
|
),
|
|
7665
7684
|
renderInk: true,
|
|
7666
7685
|
renderGroups: true,
|
|
7667
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7686
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkMA2BI7LX_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7668
7687
|
onResizePointerDown: stableResizePointerDown,
|
|
7669
7688
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7670
7689
|
onRotate: stableRotate,
|
|
@@ -7708,7 +7727,7 @@ function SlideCanvasContent({
|
|
|
7708
7727
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7709
7728
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
7710
7729
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7711
|
-
|
|
7730
|
+
chunkMRSGNERC_js.ElementRenderer,
|
|
7712
7731
|
{
|
|
7713
7732
|
element: editingMember.member,
|
|
7714
7733
|
activeSlide,
|
|
@@ -7743,11 +7762,11 @@ function SlideCanvasContent({
|
|
|
7743
7762
|
`group-member-edit-${editingMember.member.id}`
|
|
7744
7763
|
)
|
|
7745
7764
|
] }),
|
|
7746
|
-
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !
|
|
7765
|
+
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !chunkMA2BI7LX_js.isConnectorOrLineElement(selectedElement) && outlineAuthoring?.editPointsElementId !== selectedElement.id && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7747
7766
|
SelectionHandleOverlay,
|
|
7748
7767
|
{
|
|
7749
7768
|
element: selectedElement,
|
|
7750
|
-
adjustmentHandles:
|
|
7769
|
+
adjustmentHandles: chunkMA2BI7LX_js.getShapeAdjustmentHandleDescriptors(selectedElement),
|
|
7751
7770
|
onResizePointerDown: stableResizePointerDown,
|
|
7752
7771
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7753
7772
|
onRotate: stableRotate,
|
|
@@ -7861,7 +7880,7 @@ function LoadingState({ className }) {
|
|
|
7861
7880
|
role: "status",
|
|
7862
7881
|
"aria-live": "polite",
|
|
7863
7882
|
"aria-atomic": "true",
|
|
7864
|
-
className:
|
|
7883
|
+
className: chunkMA2BI7LX_js.cn(
|
|
7865
7884
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
7866
7885
|
className
|
|
7867
7886
|
),
|
|
@@ -7884,7 +7903,7 @@ function ErrorState({ className, error }) {
|
|
|
7884
7903
|
{
|
|
7885
7904
|
role: "alert",
|
|
7886
7905
|
"aria-live": "assertive",
|
|
7887
|
-
className:
|
|
7906
|
+
className: chunkMA2BI7LX_js.cn(
|
|
7888
7907
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
7889
7908
|
className
|
|
7890
7909
|
),
|
|
@@ -7915,7 +7934,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
7915
7934
|
}
|
|
7916
7935
|
)
|
|
7917
7936
|
] }),
|
|
7918
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
7937
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunkMA2BI7LX_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7919
7938
|
"div",
|
|
7920
7939
|
{
|
|
7921
7940
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -7975,14 +7994,14 @@ function AccessibilityPanel({
|
|
|
7975
7994
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
7976
7995
|
"aria-checked": reducedMotion ?? false,
|
|
7977
7996
|
onClick: onToggleReducedMotion,
|
|
7978
|
-
className:
|
|
7997
|
+
className: chunkMA2BI7LX_js.cn(
|
|
7979
7998
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
7980
7999
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
7981
8000
|
),
|
|
7982
8001
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7983
8002
|
"span",
|
|
7984
8003
|
{
|
|
7985
|
-
className:
|
|
8004
|
+
className: chunkMA2BI7LX_js.cn(
|
|
7986
8005
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
7987
8006
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
7988
8007
|
)
|
|
@@ -8001,7 +8020,7 @@ function AccessibilityPanel({
|
|
|
8001
8020
|
"div",
|
|
8002
8021
|
{
|
|
8003
8022
|
role: "listitem",
|
|
8004
|
-
className:
|
|
8023
|
+
className: chunkMA2BI7LX_js.cn(
|
|
8005
8024
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
8006
8025
|
/* Severity-based background and text colouring */
|
|
8007
8026
|
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"
|
|
@@ -8161,7 +8180,7 @@ function ResizeHandle({
|
|
|
8161
8180
|
{
|
|
8162
8181
|
role: "separator",
|
|
8163
8182
|
"aria-orientation": direction,
|
|
8164
|
-
className:
|
|
8183
|
+
className: chunkMA2BI7LX_js.cn(
|
|
8165
8184
|
// Outer container: generous hit area for easy clicking.
|
|
8166
8185
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
8167
8186
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -8172,7 +8191,7 @@ function ResizeHandle({
|
|
|
8172
8191
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8173
8192
|
"div",
|
|
8174
8193
|
{
|
|
8175
|
-
className:
|
|
8194
|
+
className: chunkMA2BI7LX_js.cn(
|
|
8176
8195
|
"absolute transition-colors",
|
|
8177
8196
|
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"
|
|
8178
8197
|
)
|
|
@@ -8191,14 +8210,14 @@ function SlideThumbnailImpl({
|
|
|
8191
8210
|
}) {
|
|
8192
8211
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
8193
8212
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
8194
|
-
const width = previewWidth ??
|
|
8213
|
+
const width = previewWidth ?? chunkMA2BI7LX_js.SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
8195
8214
|
const scale = width / safeCanvasWidth;
|
|
8196
8215
|
const previewHeight = pptx.editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
8197
8216
|
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
8198
8217
|
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
8199
8218
|
const { t } = reactI18next.useTranslation();
|
|
8200
8219
|
const transitionLabel = slide.transition ? (() => {
|
|
8201
|
-
const opt =
|
|
8220
|
+
const opt = chunkMA2BI7LX_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
8202
8221
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
8203
8222
|
})() : void 0;
|
|
8204
8223
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8224,7 +8243,7 @@ function SlideThumbnailImpl({
|
|
|
8224
8243
|
...pptx.deviceStrokeStageStyle(scale)
|
|
8225
8244
|
},
|
|
8226
8245
|
children: [
|
|
8227
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8246
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.SlideBackgroundImageLayer, { slide }),
|
|
8228
8247
|
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8229
8248
|
"div",
|
|
8230
8249
|
{
|
|
@@ -8234,7 +8253,7 @@ function SlideThumbnailImpl({
|
|
|
8234
8253
|
}
|
|
8235
8254
|
),
|
|
8236
8255
|
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8237
|
-
|
|
8256
|
+
chunkMRSGNERC_js.StaticElementRenderer,
|
|
8238
8257
|
{
|
|
8239
8258
|
element,
|
|
8240
8259
|
activeSlide: slide,
|
|
@@ -8296,7 +8315,10 @@ function slideThumbnailPropsEqual(prev, next) {
|
|
|
8296
8315
|
}
|
|
8297
8316
|
return true;
|
|
8298
8317
|
}
|
|
8299
|
-
var SlideThumbnail = React106__default.default.memo(
|
|
8318
|
+
var SlideThumbnail = /* @__PURE__ */ React106__default.default.memo(
|
|
8319
|
+
SlideThumbnailImpl,
|
|
8320
|
+
slideThumbnailPropsEqual
|
|
8321
|
+
);
|
|
8300
8322
|
function tableCell(props) {
|
|
8301
8323
|
const { selectedElement, tableEditorState } = props;
|
|
8302
8324
|
if (selectedElement?.type !== "table" || tableEditorState === null) {
|
|
@@ -8409,7 +8431,7 @@ function ContextMenu(props) {
|
|
|
8409
8431
|
const { t } = reactI18next.useTranslation();
|
|
8410
8432
|
const customization = useViewerCustomizationContext();
|
|
8411
8433
|
const shapeFormat = useShapeFormatContext();
|
|
8412
|
-
const chartFormat =
|
|
8434
|
+
const chartFormat = chunkMRSGNERC_js.useChartFormatContext();
|
|
8413
8435
|
const open = Boolean(contextMenuState) && mode === "edit";
|
|
8414
8436
|
const handlers = {
|
|
8415
8437
|
...contextMenuHandlers(props, shapeFormat),
|
|
@@ -8844,7 +8866,7 @@ function SectionHeader({
|
|
|
8844
8866
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8845
8867
|
lu.LuChevronDown,
|
|
8846
8868
|
{
|
|
8847
|
-
className:
|
|
8869
|
+
className: chunkMA2BI7LX_js.cn(
|
|
8848
8870
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
8849
8871
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
8850
8872
|
)
|
|
@@ -8993,9 +9015,9 @@ function LazyThumbnailInner({
|
|
|
8993
9015
|
}
|
|
8994
9016
|
) });
|
|
8995
9017
|
}
|
|
8996
|
-
var LazyThumbnail = React106__default.default.memo(LazyThumbnailInner);
|
|
9018
|
+
var LazyThumbnail = /* @__PURE__ */ React106__default.default.memo(LazyThumbnailInner);
|
|
8997
9019
|
function declaredSectionFacts(groups, sectionId) {
|
|
8998
|
-
const declared = groups.filter((group) => group.id !==
|
|
9020
|
+
const declared = groups.filter((group) => group.id !== chunkMA2BI7LX_js.DEFAULT_SECTION_GROUP_ID && group.id !== chunkMA2BI7LX_js.UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
8999
9021
|
return {
|
|
9000
9022
|
isDeclared: declared.includes(sectionId),
|
|
9001
9023
|
index: declared.indexOf(sectionId),
|
|
@@ -9080,7 +9102,7 @@ function SlideItemInner({
|
|
|
9080
9102
|
"data-pptx-chrome": "slide-row",
|
|
9081
9103
|
"aria-describedby": cue.labelId,
|
|
9082
9104
|
"data-pptx-slide-hidden": cue.marker,
|
|
9083
|
-
className:
|
|
9105
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9084
9106
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
9085
9107
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
9086
9108
|
isSelected && !isActive && "bg-accent/20 ring-1 ring-inset ring-primary/50",
|
|
@@ -9102,7 +9124,7 @@ function SlideItemInner({
|
|
|
9102
9124
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9103
9125
|
"span",
|
|
9104
9126
|
{
|
|
9105
|
-
className:
|
|
9127
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9106
9128
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
9107
9129
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
9108
9130
|
),
|
|
@@ -9125,7 +9147,7 @@ function SlideItemInner({
|
|
|
9125
9147
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9126
9148
|
"div",
|
|
9127
9149
|
{
|
|
9128
|
-
className:
|
|
9150
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9129
9151
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
9130
9152
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
9131
9153
|
),
|
|
@@ -9161,7 +9183,7 @@ function SlideItemInner({
|
|
|
9161
9183
|
}
|
|
9162
9184
|
);
|
|
9163
9185
|
}
|
|
9164
|
-
var SlideItem = React106__default.default.memo(SlideItemInner);
|
|
9186
|
+
var SlideItem = /* @__PURE__ */ React106__default.default.memo(SlideItemInner);
|
|
9165
9187
|
function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
|
|
9166
9188
|
const [collapsedSections, setCollapsedSections] = React106.useState({});
|
|
9167
9189
|
const [renamingSectionId, setRenamingSectionId] = React106.useState(null);
|
|
@@ -9324,7 +9346,7 @@ function SlidesPaneSidebar({
|
|
|
9324
9346
|
tableStyleContext
|
|
9325
9347
|
}) {
|
|
9326
9348
|
const { t } = reactI18next.useTranslation();
|
|
9327
|
-
const collab =
|
|
9349
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
9328
9350
|
const slideRefs = React106.useRef(/* @__PURE__ */ new Map());
|
|
9329
9351
|
const renameInputRef = React106.useRef(null);
|
|
9330
9352
|
const slidePresenceMap = React106.useMemo(() => {
|
|
@@ -9349,7 +9371,7 @@ function SlidesPaneSidebar({
|
|
|
9349
9371
|
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
9350
9372
|
[canvasSize.width, canvasSize.height, previewWidth]
|
|
9351
9373
|
);
|
|
9352
|
-
const showSectionHeaders = sectionGroups.some((group) => group.id !==
|
|
9374
|
+
const showSectionHeaders = sectionGroups.some((group) => group.id !== chunkMA2BI7LX_js.DEFAULT_SECTION_GROUP_ID);
|
|
9353
9375
|
const {
|
|
9354
9376
|
collapsedSections,
|
|
9355
9377
|
renamingSectionId,
|
|
@@ -9419,7 +9441,7 @@ function SlidesPaneSidebar({
|
|
|
9419
9441
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
9420
9442
|
);
|
|
9421
9443
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
9422
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
9444
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkMRSGNERC_js.useVirtualizedSlides({
|
|
9423
9445
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
9424
9446
|
itemHeight: estimatedItemHeight
|
|
9425
9447
|
});
|
|
@@ -9676,7 +9698,7 @@ function HandoutMasterPanel({
|
|
|
9676
9698
|
{
|
|
9677
9699
|
type: "button",
|
|
9678
9700
|
"aria-pressed": slidesPerPage === count,
|
|
9679
|
-
className:
|
|
9701
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9680
9702
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
9681
9703
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
9682
9704
|
),
|
|
@@ -9794,7 +9816,7 @@ function SlideMastersList({
|
|
|
9794
9816
|
ref: isMasterActive ? activeRef : void 0,
|
|
9795
9817
|
"aria-pressed": isMasterActive,
|
|
9796
9818
|
"aria-label": master.name || t("pptx.master.master"),
|
|
9797
|
-
className:
|
|
9819
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9798
9820
|
"group relative block w-full cursor-pointer rounded-lg border-2 p-1 text-left transition-all",
|
|
9799
9821
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
9800
9822
|
),
|
|
@@ -9811,7 +9833,7 @@ function SlideMastersList({
|
|
|
9811
9833
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9812
9834
|
"span",
|
|
9813
9835
|
{
|
|
9814
|
-
className:
|
|
9836
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9815
9837
|
"text-[10px] font-medium",
|
|
9816
9838
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
9817
9839
|
),
|
|
@@ -9830,7 +9852,7 @@ function SlideMastersList({
|
|
|
9830
9852
|
ref: isLayoutActive ? activeRef : void 0,
|
|
9831
9853
|
"aria-pressed": isLayoutActive,
|
|
9832
9854
|
"aria-label": layout.name || t("pptx.master.layout"),
|
|
9833
|
-
className:
|
|
9855
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9834
9856
|
"group relative block w-full cursor-pointer rounded-md border-2 p-0.5 text-left transition-all",
|
|
9835
9857
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
9836
9858
|
),
|
|
@@ -9847,7 +9869,7 @@ function SlideMastersList({
|
|
|
9847
9869
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9848
9870
|
"span",
|
|
9849
9871
|
{
|
|
9850
|
-
className:
|
|
9872
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9851
9873
|
"text-[9px]",
|
|
9852
9874
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
9853
9875
|
),
|
|
@@ -9939,7 +9961,7 @@ function MasterViewSidebar({
|
|
|
9939
9961
|
type: "button",
|
|
9940
9962
|
role: "tab",
|
|
9941
9963
|
"aria-selected": masterViewTab === tab.key,
|
|
9942
|
-
className:
|
|
9964
|
+
className: chunkMA2BI7LX_js.cn(
|
|
9943
9965
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
9944
9966
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
9945
9967
|
),
|
|
@@ -10442,7 +10464,7 @@ function SectionBlock({
|
|
|
10442
10464
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10443
10465
|
lu.LuChevronDown,
|
|
10444
10466
|
{
|
|
10445
|
-
className:
|
|
10467
|
+
className: chunkMA2BI7LX_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
10446
10468
|
}
|
|
10447
10469
|
),
|
|
10448
10470
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -10491,7 +10513,7 @@ function SlideCardImpl({
|
|
|
10491
10513
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10492
10514
|
"div",
|
|
10493
10515
|
{
|
|
10494
|
-
className:
|
|
10516
|
+
className: chunkMA2BI7LX_js.cn(
|
|
10495
10517
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
10496
10518
|
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",
|
|
10497
10519
|
slide.hidden && "opacity-40"
|
|
@@ -10514,7 +10536,7 @@ function SlideCardImpl({
|
|
|
10514
10536
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10515
10537
|
"span",
|
|
10516
10538
|
{
|
|
10517
|
-
className:
|
|
10539
|
+
className: chunkMA2BI7LX_js.cn(
|
|
10518
10540
|
"text-[11px] font-medium px-0.5",
|
|
10519
10541
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
10520
10542
|
),
|
|
@@ -10574,7 +10596,7 @@ function arePropsEqual(prev, next) {
|
|
|
10574
10596
|
}
|
|
10575
10597
|
return true;
|
|
10576
10598
|
}
|
|
10577
|
-
var SlideCard = React106__default.default.memo(SlideCardImpl, arePropsEqual);
|
|
10599
|
+
var SlideCard = /* @__PURE__ */ React106__default.default.memo(SlideCardImpl, arePropsEqual);
|
|
10578
10600
|
var ICON_CLASS = "h-3.5 w-3.5 text-muted-foreground";
|
|
10579
10601
|
function SorterContextMenu({
|
|
10580
10602
|
x,
|
|
@@ -11284,7 +11306,7 @@ function ReadingViewStage({
|
|
|
11284
11306
|
"div",
|
|
11285
11307
|
{
|
|
11286
11308
|
className: "absolute inset-0",
|
|
11287
|
-
style: { backgroundColor:
|
|
11309
|
+
style: { backgroundColor: chunkMA2BI7LX_js.normalizeHexColor(slide.backgroundColor, "#ffffff") }
|
|
11288
11310
|
}
|
|
11289
11311
|
),
|
|
11290
11312
|
slide.backgroundImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11303,7 +11325,7 @@ function ReadingViewStage({
|
|
|
11303
11325
|
className: "absolute left-0 top-0 origin-top-left",
|
|
11304
11326
|
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
11305
11327
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11306
|
-
|
|
11328
|
+
chunkMRSGNERC_js.StaticElementRenderer,
|
|
11307
11329
|
{
|
|
11308
11330
|
element,
|
|
11309
11331
|
activeSlide: slide,
|
|
@@ -11515,7 +11537,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11515
11537
|
if (segment.style.fontFamily) {
|
|
11516
11538
|
style.fontFamily = segment.style.fontFamily;
|
|
11517
11539
|
}
|
|
11518
|
-
if (segment.style.hyperlink &&
|
|
11540
|
+
if (segment.style.hyperlink && chunkMA2BI7LX_js.isUrlSafe(segment.style.hyperlink)) {
|
|
11519
11541
|
const safeHref = segment.style.hyperlink;
|
|
11520
11542
|
style.color = "#4a9eff";
|
|
11521
11543
|
style.textDecoration = "underline";
|
|
@@ -11528,7 +11550,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11528
11550
|
style,
|
|
11529
11551
|
onClick: (e) => {
|
|
11530
11552
|
e.preventDefault();
|
|
11531
|
-
|
|
11553
|
+
chunkMA2BI7LX_js.safeOpenUrl(safeHref);
|
|
11532
11554
|
},
|
|
11533
11555
|
children: segment.text
|
|
11534
11556
|
},
|
|
@@ -11877,7 +11899,7 @@ function useSlideNotes({
|
|
|
11877
11899
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
11878
11900
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
11879
11901
|
e.preventDefault();
|
|
11880
|
-
|
|
11902
|
+
chunkMA2BI7LX_js.safeOpenUrl(href);
|
|
11881
11903
|
}
|
|
11882
11904
|
}, []);
|
|
11883
11905
|
return {
|
|
@@ -11958,7 +11980,7 @@ function SlideNotesPanel({
|
|
|
11958
11980
|
});
|
|
11959
11981
|
const hasNotes = draft.trim().length > 0;
|
|
11960
11982
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
11961
|
-
const { dragY, handlers: dragHandlers } =
|
|
11983
|
+
const { dragY, handlers: dragHandlers } = chunkMRSGNERC_js.useSheetDismissDrag(onToggle);
|
|
11962
11984
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11963
11985
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11964
11986
|
"button",
|
|
@@ -11974,7 +11996,7 @@ function SlideNotesPanel({
|
|
|
11974
11996
|
{
|
|
11975
11997
|
ref: rootRef,
|
|
11976
11998
|
"data-pptx-chrome": "notes",
|
|
11977
|
-
className:
|
|
11999
|
+
className: chunkMA2BI7LX_js.cn(
|
|
11978
12000
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
11979
12001
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
11980
12002
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -12338,7 +12360,7 @@ function SlideDiffRow({
|
|
|
12338
12360
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12339
12361
|
"div",
|
|
12340
12362
|
{
|
|
12341
|
-
className:
|
|
12363
|
+
className: chunkMA2BI7LX_js.cn(
|
|
12342
12364
|
"rounded-lg border transition-colors",
|
|
12343
12365
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
12344
12366
|
),
|
|
@@ -12352,7 +12374,7 @@ function SlideDiffRow({
|
|
|
12352
12374
|
children: [
|
|
12353
12375
|
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" }),
|
|
12354
12376
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
12355
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
12377
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkMA2BI7LX_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
12356
12378
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
12357
12379
|
diff.changes.length,
|
|
12358
12380
|
" ",
|
|
@@ -12362,7 +12384,7 @@ function SlideDiffRow({
|
|
|
12362
12384
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12363
12385
|
"span",
|
|
12364
12386
|
{
|
|
12365
|
-
className:
|
|
12387
|
+
className: chunkMA2BI7LX_js.cn(
|
|
12366
12388
|
"text-[10px] font-medium",
|
|
12367
12389
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
12368
12390
|
),
|
|
@@ -12390,7 +12412,7 @@ function SlideDiffRow({
|
|
|
12390
12412
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12391
12413
|
"div",
|
|
12392
12414
|
{
|
|
12393
|
-
className:
|
|
12415
|
+
className: chunkMA2BI7LX_js.cn(
|
|
12394
12416
|
"rounded border overflow-hidden",
|
|
12395
12417
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
12396
12418
|
),
|
|
@@ -13095,7 +13117,7 @@ function DocumentPropertiesDialog({
|
|
|
13095
13117
|
const handleClose = React106.useCallback(() => {
|
|
13096
13118
|
onClose();
|
|
13097
13119
|
}, [onClose]);
|
|
13098
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
13120
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(handleClose);
|
|
13099
13121
|
if (!isOpen) {
|
|
13100
13122
|
return null;
|
|
13101
13123
|
}
|
|
@@ -13692,7 +13714,7 @@ function PresentationSubtitleBar({
|
|
|
13692
13714
|
}) {
|
|
13693
13715
|
const { t } = reactI18next.useTranslation();
|
|
13694
13716
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13695
|
-
pptx.subtitleSettingsFromOptions(
|
|
13717
|
+
pptx.subtitleSettingsFromOptions(chunkMRSGNERC_js.useViewerOptionsContext()),
|
|
13696
13718
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13697
13719
|
);
|
|
13698
13720
|
const [captionText, setCaptionText] = React106.useState("");
|
|
@@ -13860,7 +13882,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13860
13882
|
{
|
|
13861
13883
|
className: "absolute inset-0",
|
|
13862
13884
|
style: {
|
|
13863
|
-
backgroundColor:
|
|
13885
|
+
backgroundColor: chunkMA2BI7LX_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
13864
13886
|
}
|
|
13865
13887
|
}
|
|
13866
13888
|
),
|
|
@@ -13886,7 +13908,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13886
13908
|
...pptx.deviceStrokeStageStyle(scale)
|
|
13887
13909
|
},
|
|
13888
13910
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13889
|
-
|
|
13911
|
+
chunkMRSGNERC_js.StaticElementRenderer,
|
|
13890
13912
|
{
|
|
13891
13913
|
element,
|
|
13892
13914
|
activeSlide: slide,
|
|
@@ -13937,7 +13959,10 @@ function scaledSlidePreviewPropsEqual(prev, next) {
|
|
|
13937
13959
|
}
|
|
13938
13960
|
return true;
|
|
13939
13961
|
}
|
|
13940
|
-
var ScaledSlidePreview = React106__default.default.memo(
|
|
13962
|
+
var ScaledSlidePreview = /* @__PURE__ */ React106__default.default.memo(
|
|
13963
|
+
ScaledSlidePreviewImpl,
|
|
13964
|
+
scaledSlidePreviewPropsEqual
|
|
13965
|
+
);
|
|
13941
13966
|
function PresenterNotesRail({
|
|
13942
13967
|
slides,
|
|
13943
13968
|
current,
|
|
@@ -14582,8 +14607,6 @@ function RehearseTimingsSummary({
|
|
|
14582
14607
|
) })
|
|
14583
14608
|
] }) });
|
|
14584
14609
|
}
|
|
14585
|
-
|
|
14586
|
-
// src/viewer/components/selection-pane-utils.ts
|
|
14587
14610
|
var TYPE_LABELS = {
|
|
14588
14611
|
text: "Text Box",
|
|
14589
14612
|
shape: "Shape",
|
|
@@ -14603,7 +14626,7 @@ function getElementDisplayName(element, index) {
|
|
|
14603
14626
|
if (element.name && element.name.trim().length > 0) {
|
|
14604
14627
|
return element.name.trim();
|
|
14605
14628
|
}
|
|
14606
|
-
if (
|
|
14629
|
+
if (pptx$1.hasTextProperties(element) && element.text && element.text.trim().length > 0) {
|
|
14607
14630
|
return element.text.trim().slice(0, 32);
|
|
14608
14631
|
}
|
|
14609
14632
|
const label = TYPE_LABELS[element.type] ?? "Object";
|
|
@@ -14776,7 +14799,7 @@ function SelectionPane({
|
|
|
14776
14799
|
setDragIndex(null);
|
|
14777
14800
|
setDragOverIndex(null);
|
|
14778
14801
|
},
|
|
14779
|
-
className:
|
|
14802
|
+
className: chunkMA2BI7LX_js.cn(
|
|
14780
14803
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
14781
14804
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
14782
14805
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -14830,13 +14853,13 @@ function SelectionPane({
|
|
|
14830
14853
|
}
|
|
14831
14854
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14832
14855
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14833
|
-
var ENTRANCE_PRESETS =
|
|
14856
|
+
var ENTRANCE_PRESETS = /* @__PURE__ */ chunkMA2BI7LX_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14834
14857
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
14835
14858
|
);
|
|
14836
|
-
var EXIT_PRESETS =
|
|
14859
|
+
var EXIT_PRESETS = /* @__PURE__ */ chunkMA2BI7LX_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14837
14860
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
14838
14861
|
);
|
|
14839
|
-
var EMPHASIS_PRESETS =
|
|
14862
|
+
var EMPHASIS_PRESETS = /* @__PURE__ */ chunkMA2BI7LX_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14840
14863
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
14841
14864
|
);
|
|
14842
14865
|
var TIMING_CURVE_OPTIONS = [
|
|
@@ -15003,7 +15026,7 @@ function AnimationTimelineSection({
|
|
|
15003
15026
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15004
15027
|
"div",
|
|
15005
15028
|
{
|
|
15006
|
-
className:
|
|
15029
|
+
className: chunkMA2BI7LX_js.cn(
|
|
15007
15030
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
15008
15031
|
animationTypeColor(bar.anim),
|
|
15009
15032
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -15032,7 +15055,7 @@ function AnimationTimelineSection({
|
|
|
15032
15055
|
onDragLeave: handleDragLeave,
|
|
15033
15056
|
onDrop: (e) => handleDrop(index, e),
|
|
15034
15057
|
title: t("pptx.animation.nativeEffectHint"),
|
|
15035
|
-
className:
|
|
15058
|
+
className: chunkMA2BI7LX_js.cn(
|
|
15036
15059
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] italic",
|
|
15037
15060
|
"bg-muted/20 text-muted-foreground/70",
|
|
15038
15061
|
isDragOver && "border-t-2 border-primary"
|
|
@@ -15071,7 +15094,7 @@ function AnimationTimelineSection({
|
|
|
15071
15094
|
onDragEnd: handleDragEnd,
|
|
15072
15095
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
15073
15096
|
onMouseLeave: handleAnimationHoverEnd,
|
|
15074
|
-
className:
|
|
15097
|
+
className: chunkMA2BI7LX_js.cn(
|
|
15075
15098
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
15076
15099
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
15077
15100
|
isDragging && "opacity-40",
|
|
@@ -15203,7 +15226,7 @@ function EffectSoundRow({
|
|
|
15203
15226
|
}
|
|
15204
15227
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
15205
15228
|
if (asset) {
|
|
15206
|
-
|
|
15229
|
+
chunkMRSGNERC_js.playAnimationSound(asset.dataUrl);
|
|
15207
15230
|
}
|
|
15208
15231
|
};
|
|
15209
15232
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15378,7 +15401,7 @@ function useAnimationPreview({
|
|
|
15378
15401
|
}) {
|
|
15379
15402
|
const handleAnimationHover = React106.useCallback((anim) => {
|
|
15380
15403
|
if (anim.motionPath) {
|
|
15381
|
-
|
|
15404
|
+
chunkMA2BI7LX_js.startMotionPathPreview(anim.elementId, anim.motionPath, {
|
|
15382
15405
|
durationMs: anim.durationMs,
|
|
15383
15406
|
delayMs: anim.delayMs,
|
|
15384
15407
|
timingCurve: anim.timingCurve
|
|
@@ -15389,19 +15412,19 @@ function useAnimationPreview({
|
|
|
15389
15412
|
if (!preset || preset === "none") {
|
|
15390
15413
|
return;
|
|
15391
15414
|
}
|
|
15392
|
-
|
|
15415
|
+
chunkMA2BI7LX_js.startPreviewAnimation(anim.elementId, preset, {
|
|
15393
15416
|
direction: anim.direction,
|
|
15394
15417
|
durationMs: anim.durationMs ?? 500,
|
|
15395
15418
|
timingCurve: anim.timingCurve
|
|
15396
15419
|
});
|
|
15397
15420
|
}, []);
|
|
15398
|
-
const handleAnimationHoverEnd = React106.useCallback(() =>
|
|
15421
|
+
const handleAnimationHoverEnd = React106.useCallback(() => chunkMA2BI7LX_js.stopPreviewAnimation(), []);
|
|
15399
15422
|
const handlePreviewClick = React106.useCallback(() => {
|
|
15400
15423
|
if (!selectedElementAnimation) {
|
|
15401
15424
|
return;
|
|
15402
15425
|
}
|
|
15403
15426
|
if (selectedElementAnimation.motionPath) {
|
|
15404
|
-
|
|
15427
|
+
chunkMA2BI7LX_js.startMotionPathPreview(selectedElementId, selectedElementAnimation.motionPath, {
|
|
15405
15428
|
durationMs: selectedElementAnimation.durationMs,
|
|
15406
15429
|
delayMs: selectedElementAnimation.delayMs,
|
|
15407
15430
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15412,7 +15435,7 @@ function useAnimationPreview({
|
|
|
15412
15435
|
if (!preset || preset === "none") {
|
|
15413
15436
|
return;
|
|
15414
15437
|
}
|
|
15415
|
-
|
|
15438
|
+
chunkMA2BI7LX_js.startPreviewAnimation(selectedElementId, preset, {
|
|
15416
15439
|
direction: selectedElementAnimation.direction,
|
|
15417
15440
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
15418
15441
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15646,8 +15669,8 @@ function useAnimationHandlers({
|
|
|
15646
15669
|
if (!el) {
|
|
15647
15670
|
return anim.elementId.slice(0, 8);
|
|
15648
15671
|
}
|
|
15649
|
-
const text =
|
|
15650
|
-
return text ||
|
|
15672
|
+
const text = pptx$1.hasTextProperties(el) ? el.text : void 0;
|
|
15673
|
+
return text || chunkMA2BI7LX_js.getElementLabel(el);
|
|
15651
15674
|
},
|
|
15652
15675
|
[activeSlide.elements]
|
|
15653
15676
|
);
|
|
@@ -15657,8 +15680,8 @@ function useAnimationHandlers({
|
|
|
15657
15680
|
if (!el) {
|
|
15658
15681
|
return id.slice(0, 8);
|
|
15659
15682
|
}
|
|
15660
|
-
const text =
|
|
15661
|
-
return text ||
|
|
15683
|
+
const text = pptx$1.hasTextProperties(el) ? el.text : void 0;
|
|
15684
|
+
return text || chunkMA2BI7LX_js.getElementLabel(el);
|
|
15662
15685
|
}).join(", "),
|
|
15663
15686
|
[activeSlide.elements]
|
|
15664
15687
|
);
|
|
@@ -15715,7 +15738,7 @@ function AnimationPanel({
|
|
|
15715
15738
|
onUpdateSlide
|
|
15716
15739
|
}) {
|
|
15717
15740
|
const { t } = reactI18next.useTranslation();
|
|
15718
|
-
const { viewportWidth } =
|
|
15741
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
15719
15742
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15720
15743
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15721
15744
|
const handlers = useAnimationHandlers({
|
|
@@ -15843,7 +15866,7 @@ function AnimationPanel({
|
|
|
15843
15866
|
type: "button",
|
|
15844
15867
|
disabled: !canEdit,
|
|
15845
15868
|
style: { minWidth: directionBtnPx, minHeight: directionBtnPx },
|
|
15846
|
-
className:
|
|
15869
|
+
className: chunkMA2BI7LX_js.cn(
|
|
15847
15870
|
"flex items-center justify-center rounded border transition-colors",
|
|
15848
15871
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
15849
15872
|
),
|
|
@@ -15909,7 +15932,7 @@ function AnimationPanel({
|
|
|
15909
15932
|
style: fieldStyle,
|
|
15910
15933
|
children: [
|
|
15911
15934
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
15912
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
15935
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunkMA2BI7LX_js.getElementLabel(el) }, el.id))
|
|
15913
15936
|
]
|
|
15914
15937
|
}
|
|
15915
15938
|
)
|
|
@@ -16068,7 +16091,7 @@ function ActionTargetFields({
|
|
|
16068
16091
|
type: "text",
|
|
16069
16092
|
disabled: !canEdit,
|
|
16070
16093
|
"aria-label": t(urlLabelKey),
|
|
16071
|
-
className:
|
|
16094
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-full"),
|
|
16072
16095
|
placeholder: "https://...",
|
|
16073
16096
|
value: url ?? "",
|
|
16074
16097
|
onChange: (e) => onChange({ url: e.target.value })
|
|
@@ -16082,7 +16105,7 @@ function ActionTargetFields({
|
|
|
16082
16105
|
type: "number",
|
|
16083
16106
|
disabled: !canEdit,
|
|
16084
16107
|
"aria-label": t("pptx.action.gotoSlide"),
|
|
16085
|
-
className:
|
|
16108
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-full"),
|
|
16086
16109
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
16087
16110
|
min: 1,
|
|
16088
16111
|
max: slideCount,
|
|
@@ -16104,7 +16127,7 @@ function ActionTargetFields({
|
|
|
16104
16127
|
"data-testid": "pptx-action-custom-show",
|
|
16105
16128
|
disabled: !canEdit,
|
|
16106
16129
|
"aria-label": t("pptx.hyperlink.customShowLabel"),
|
|
16107
|
-
className:
|
|
16130
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-full"),
|
|
16108
16131
|
value: customShowId ?? "",
|
|
16109
16132
|
onChange: (e) => onChange({ customShowId: e.target.value, returnAfter }),
|
|
16110
16133
|
children: [
|
|
@@ -16137,11 +16160,11 @@ function ActionSettingsPanel({
|
|
|
16137
16160
|
onUpdateElement
|
|
16138
16161
|
}) {
|
|
16139
16162
|
const { t } = reactI18next.useTranslation();
|
|
16140
|
-
const clickAction = selectedElement.actionClick ?
|
|
16141
|
-
const hoverAction = selectedElement.actionHover ?
|
|
16163
|
+
const clickAction = selectedElement.actionClick ? pptx$1.pptxActionToElementAction(selectedElement.actionClick, "click") : void 0;
|
|
16164
|
+
const hoverAction = selectedElement.actionHover ? pptx$1.pptxActionToElementAction(selectedElement.actionHover, "hover") : void 0;
|
|
16142
16165
|
const updateAction = (trigger, type, patch) => {
|
|
16143
16166
|
const ea = { trigger, type, ...patch };
|
|
16144
|
-
const pa =
|
|
16167
|
+
const pa = pptx$1.elementActionToPptxAction(ea);
|
|
16145
16168
|
if (trigger === "click") {
|
|
16146
16169
|
onUpdateElement({ actionClick: pa });
|
|
16147
16170
|
} else {
|
|
@@ -16226,7 +16249,7 @@ function ActionTriggerSection({
|
|
|
16226
16249
|
{
|
|
16227
16250
|
disabled: !canEdit,
|
|
16228
16251
|
"aria-label": label,
|
|
16229
|
-
className:
|
|
16252
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-full"),
|
|
16230
16253
|
value: effectiveType,
|
|
16231
16254
|
onChange: (e) => changeType(e.target.value),
|
|
16232
16255
|
children: pptx.ELEMENT_ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.labelKey) }, o.value))
|
|
@@ -16614,7 +16637,7 @@ function ChartDataGrid({
|
|
|
16614
16637
|
}) {
|
|
16615
16638
|
const { t } = reactI18next.useTranslation();
|
|
16616
16639
|
const highlightRef = React106.useRef(null);
|
|
16617
|
-
const { viewportWidth } =
|
|
16640
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
16618
16641
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
16619
16642
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
16620
16643
|
const rowHeaderClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10 bg-card" : "";
|
|
@@ -16787,7 +16810,7 @@ function ChartDataLabelOptions({
|
|
|
16787
16810
|
] })
|
|
16788
16811
|
] });
|
|
16789
16812
|
}
|
|
16790
|
-
var SYMBOL_OPTIONS = MARKER_SYMBOL_OPTIONS.filter((o) => o.value !== "");
|
|
16813
|
+
var SYMBOL_OPTIONS = /* @__PURE__ */ MARKER_SYMBOL_OPTIONS.filter((o) => o.value !== "");
|
|
16791
16814
|
function ChartDataPointMarkerOptions({
|
|
16792
16815
|
chartType,
|
|
16793
16816
|
categories,
|
|
@@ -17971,8 +17994,8 @@ function ChartUserShapeOptions({
|
|
|
17971
17994
|
}
|
|
17972
17995
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17973
17996
|
const chartData = selectedElement.chartData;
|
|
17974
|
-
const followDataPoint =
|
|
17975
|
-
const { selection: partSelection } =
|
|
17997
|
+
const followDataPoint = chunkMRSGNERC_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17998
|
+
const { selection: partSelection } = chunkMRSGNERC_js.useChartPartSelection();
|
|
17976
17999
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17977
18000
|
const title = chartData?.title;
|
|
17978
18001
|
const chartType = chartData?.chartType;
|
|
@@ -18186,40 +18209,40 @@ function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
|
18186
18209
|
[chartData, selectedElement, replaceChartData]
|
|
18187
18210
|
);
|
|
18188
18211
|
const setAxisLogScale = React106.useCallback(
|
|
18189
|
-
(axisType, opts) => applyChartOp((el) =>
|
|
18212
|
+
(axisType, opts) => applyChartOp((el) => pptx$1.setChartAxisLogScale(el, axisType, opts)),
|
|
18190
18213
|
[applyChartOp]
|
|
18191
18214
|
);
|
|
18192
18215
|
const setAxisTitleStyle = React106.useCallback(
|
|
18193
|
-
(axisType, edit) => applyChartOp((el) =>
|
|
18216
|
+
(axisType, edit) => applyChartOp((el) => pptx$1.setChartAxisTitleStyle(el, axisType, edit)),
|
|
18194
18217
|
[applyChartOp]
|
|
18195
18218
|
);
|
|
18196
18219
|
const setGridlineStyle = React106.useCallback(
|
|
18197
|
-
(axisType, which, edit) => applyChartOp((el) =>
|
|
18220
|
+
(axisType, which, edit) => applyChartOp((el) => pptx$1.setChartAxisGridlineStyle(el, axisType, which, edit)),
|
|
18198
18221
|
[applyChartOp]
|
|
18199
18222
|
);
|
|
18200
18223
|
const setSeriesMarker = React106.useCallback(
|
|
18201
|
-
(index, marker) => applyChartOp((el) =>
|
|
18224
|
+
(index, marker) => applyChartOp((el) => pptx$1.setChartSeriesMarker(el, index, marker)),
|
|
18202
18225
|
[applyChartOp]
|
|
18203
18226
|
);
|
|
18204
18227
|
const setSeriesType = React106.useCallback(
|
|
18205
|
-
(index, seriesType) => applyChartOp((el) =>
|
|
18228
|
+
(index, seriesType) => applyChartOp((el) => pptx$1.setChartSeriesChartType(el, index, seriesType)),
|
|
18206
18229
|
[applyChartOp]
|
|
18207
18230
|
);
|
|
18208
18231
|
const setPointFill = React106.useCallback(
|
|
18209
|
-
(seriesIndex, pointIndex, color) => applyChartOp((el) =>
|
|
18232
|
+
(seriesIndex, pointIndex, color) => applyChartOp((el) => pptx$1.setChartDataPointFill(el, seriesIndex, pointIndex, color)),
|
|
18210
18233
|
[applyChartOp]
|
|
18211
18234
|
);
|
|
18212
18235
|
const setPointExplosion = React106.useCallback(
|
|
18213
|
-
(seriesIndex, pointIndex, explosion) => applyChartOp((el) =>
|
|
18236
|
+
(seriesIndex, pointIndex, explosion) => applyChartOp((el) => pptx$1.setChartDataPointExplosion(el, seriesIndex, pointIndex, explosion)),
|
|
18214
18237
|
[applyChartOp]
|
|
18215
18238
|
);
|
|
18216
18239
|
const setPointMarker = React106.useCallback(
|
|
18217
|
-
(seriesIndex, pointIndex, marker) => applyChartOp((el) =>
|
|
18240
|
+
(seriesIndex, pointIndex, marker) => applyChartOp((el) => pptx$1.setChartDataPointMarker(el, seriesIndex, pointIndex, marker)),
|
|
18218
18241
|
[applyChartOp]
|
|
18219
18242
|
);
|
|
18220
18243
|
const setPointLabel = React106.useCallback(
|
|
18221
18244
|
(seriesIndex, pointIndex, text) => applyChartOp(
|
|
18222
|
-
(el) =>
|
|
18245
|
+
(el) => pptx$1.setChartDataPointLabel(el, seriesIndex, pointIndex, text !== null ? { text } : null)
|
|
18223
18246
|
),
|
|
18224
18247
|
[applyChartOp]
|
|
18225
18248
|
);
|
|
@@ -18487,17 +18510,17 @@ function OleEditorDialog({
|
|
|
18487
18510
|
const kind = descriptor.contentTab.kind;
|
|
18488
18511
|
const load = async () => {
|
|
18489
18512
|
if (kind === "sheet") {
|
|
18490
|
-
const value = await
|
|
18513
|
+
const value = await pptx$1.getOleSheetGrid(element);
|
|
18491
18514
|
if (!cancelled) {
|
|
18492
18515
|
setGrid(value);
|
|
18493
18516
|
}
|
|
18494
18517
|
} else if (kind === "document") {
|
|
18495
|
-
const value = await
|
|
18518
|
+
const value = await pptx$1.getOleDocumentParagraphs(element);
|
|
18496
18519
|
if (!cancelled) {
|
|
18497
18520
|
setParagraphs(value);
|
|
18498
18521
|
}
|
|
18499
18522
|
} else if (kind === "deck") {
|
|
18500
|
-
const value = await
|
|
18523
|
+
const value = await pptx$1.getOleNestedDeckDetail(element);
|
|
18501
18524
|
if (!cancelled) {
|
|
18502
18525
|
setDeckSlides(value);
|
|
18503
18526
|
}
|
|
@@ -18523,9 +18546,9 @@ function OleEditorDialog({
|
|
|
18523
18546
|
const handleCellEdit = React106.useCallback(
|
|
18524
18547
|
async (row, col, value) => {
|
|
18525
18548
|
try {
|
|
18526
|
-
const updated = await
|
|
18549
|
+
const updated = await pptx$1.applyOleSheetCellEdit(element, { row, col, value });
|
|
18527
18550
|
commit(updated);
|
|
18528
|
-
const refreshed = await
|
|
18551
|
+
const refreshed = await pptx$1.getOleSheetGrid(updated);
|
|
18529
18552
|
if (mountedRef.current) {
|
|
18530
18553
|
setGrid(refreshed);
|
|
18531
18554
|
}
|
|
@@ -18540,9 +18563,9 @@ function OleEditorDialog({
|
|
|
18540
18563
|
const handleParagraphEdit = React106.useCallback(
|
|
18541
18564
|
async (index, text) => {
|
|
18542
18565
|
try {
|
|
18543
|
-
const updated = await
|
|
18566
|
+
const updated = await pptx$1.applyOleDocumentParagraphEdit(element, index, text);
|
|
18544
18567
|
commit(updated);
|
|
18545
|
-
const refreshed = await
|
|
18568
|
+
const refreshed = await pptx$1.getOleDocumentParagraphs(updated);
|
|
18546
18569
|
if (mountedRef.current) {
|
|
18547
18570
|
setParagraphs(refreshed);
|
|
18548
18571
|
}
|
|
@@ -18557,14 +18580,14 @@ function OleEditorDialog({
|
|
|
18557
18580
|
const handleDeckElementEdit = React106.useCallback(
|
|
18558
18581
|
async (slideIndex, deckElementId, text) => {
|
|
18559
18582
|
try {
|
|
18560
|
-
const updated = await
|
|
18583
|
+
const updated = await pptx$1.applyOleNestedDeckElementTextEdit(
|
|
18561
18584
|
element,
|
|
18562
18585
|
slideIndex,
|
|
18563
18586
|
deckElementId,
|
|
18564
18587
|
text
|
|
18565
18588
|
);
|
|
18566
18589
|
commit(updated);
|
|
18567
|
-
const refreshed = await
|
|
18590
|
+
const refreshed = await pptx$1.getOleNestedDeckDetail(updated);
|
|
18568
18591
|
if (mountedRef.current) {
|
|
18569
18592
|
setDeckSlides(refreshed);
|
|
18570
18593
|
}
|
|
@@ -18580,7 +18603,7 @@ function OleEditorDialog({
|
|
|
18580
18603
|
async (file) => {
|
|
18581
18604
|
try {
|
|
18582
18605
|
const bytes = new Uint8Array(await file.arrayBuffer());
|
|
18583
|
-
const updated = await
|
|
18606
|
+
const updated = await pptx$1.replaceOleFile(element, bytes, file.name);
|
|
18584
18607
|
commit(updated);
|
|
18585
18608
|
if (mountedRef.current) {
|
|
18586
18609
|
onClose();
|
|
@@ -18729,7 +18752,7 @@ function ConnectorArrowsSection({
|
|
|
18729
18752
|
},
|
|
18730
18753
|
disabled: !canEdit,
|
|
18731
18754
|
className: SELECT_CLS2,
|
|
18732
|
-
children:
|
|
18755
|
+
children: chunkMA2BI7LX_js.CONNECTOR_ARROW_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18733
18756
|
}
|
|
18734
18757
|
)
|
|
18735
18758
|
] }, end);
|
|
@@ -18753,7 +18776,7 @@ function ConnectorArrowsSection({
|
|
|
18753
18776
|
},
|
|
18754
18777
|
disabled: !canEdit,
|
|
18755
18778
|
className: SELECT_CLS2,
|
|
18756
|
-
children:
|
|
18779
|
+
children: chunkMA2BI7LX_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18757
18780
|
}
|
|
18758
18781
|
)
|
|
18759
18782
|
] }),
|
|
@@ -18772,7 +18795,7 @@ function ConnectorArrowsSection({
|
|
|
18772
18795
|
},
|
|
18773
18796
|
disabled: !canEdit,
|
|
18774
18797
|
className: SELECT_CLS2,
|
|
18775
|
-
children:
|
|
18798
|
+
children: chunkMA2BI7LX_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18776
18799
|
}
|
|
18777
18800
|
)
|
|
18778
18801
|
] })
|
|
@@ -18852,7 +18875,7 @@ function OlePropertiesPanel({
|
|
|
18852
18875
|
] }),
|
|
18853
18876
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18854
18877
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.type") }),
|
|
18855
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground truncate", children:
|
|
18878
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground truncate", children: pptx$1.getOleObjectTypeLabel(ole.oleObjectType) })
|
|
18856
18879
|
] }),
|
|
18857
18880
|
ole.fileName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18858
18881
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.fileName") }),
|
|
@@ -18863,7 +18886,7 @@ function OlePropertiesPanel({
|
|
|
18863
18886
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18864
18887
|
"span",
|
|
18865
18888
|
{
|
|
18866
|
-
className:
|
|
18889
|
+
className: chunkMA2BI7LX_js.cn(
|
|
18867
18890
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
18868
18891
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
18869
18892
|
),
|
|
@@ -18931,7 +18954,7 @@ function LayerOrderButtons({
|
|
|
18931
18954
|
"button",
|
|
18932
18955
|
{
|
|
18933
18956
|
type: "button",
|
|
18934
|
-
className:
|
|
18957
|
+
className: chunkMA2BI7LX_js.cn("flex-1", BTN2),
|
|
18935
18958
|
disabled: !canEdit,
|
|
18936
18959
|
onClick: () => onMoveLayer("forward"),
|
|
18937
18960
|
children: "\u2191 Forward"
|
|
@@ -18941,7 +18964,7 @@ function LayerOrderButtons({
|
|
|
18941
18964
|
"button",
|
|
18942
18965
|
{
|
|
18943
18966
|
type: "button",
|
|
18944
|
-
className:
|
|
18967
|
+
className: chunkMA2BI7LX_js.cn("flex-1", BTN2),
|
|
18945
18968
|
disabled: !canEdit,
|
|
18946
18969
|
onClick: () => onMoveLayer("backward"),
|
|
18947
18970
|
children: "\u2193 Backward"
|
|
@@ -18965,7 +18988,7 @@ function ArtisticEffectsGallery({
|
|
|
18965
18988
|
{
|
|
18966
18989
|
type: "button",
|
|
18967
18990
|
disabled: !canEdit,
|
|
18968
|
-
className:
|
|
18991
|
+
className: chunkMA2BI7LX_js.cn(
|
|
18969
18992
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
18970
18993
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
18971
18994
|
),
|
|
@@ -19027,7 +19050,7 @@ function ColorChangeSection({
|
|
|
19027
19050
|
DebouncedColorInput,
|
|
19028
19051
|
{
|
|
19029
19052
|
disabled: !canEdit,
|
|
19030
|
-
value:
|
|
19053
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
19031
19054
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19032
19055
|
onCommit: (hex) => updateEffects({
|
|
19033
19056
|
clrChange: {
|
|
@@ -19045,7 +19068,7 @@ function ColorChangeSection({
|
|
|
19045
19068
|
DebouncedColorInput,
|
|
19046
19069
|
{
|
|
19047
19070
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
19048
|
-
value:
|
|
19071
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
19049
19072
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19050
19073
|
onCommit: (hex) => updateEffects({
|
|
19051
19074
|
clrChange: {
|
|
@@ -19105,7 +19128,7 @@ function ColorWashSection({
|
|
|
19105
19128
|
DebouncedColorInput,
|
|
19106
19129
|
{
|
|
19107
19130
|
disabled: !canEdit,
|
|
19108
|
-
value:
|
|
19131
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
19109
19132
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19110
19133
|
onCommit: (hex) => updateEffects({
|
|
19111
19134
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -19208,8 +19231,8 @@ function DuotonePanel({
|
|
|
19208
19231
|
}
|
|
19209
19232
|
});
|
|
19210
19233
|
}, [effects, onUpdateElement]);
|
|
19211
|
-
const shadowColor =
|
|
19212
|
-
const highlightColor =
|
|
19234
|
+
const shadowColor = chunkMA2BI7LX_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
19235
|
+
const highlightColor = chunkMA2BI7LX_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
19213
19236
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
19214
19237
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
19215
19238
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -19240,7 +19263,7 @@ function DuotonePanel({
|
|
|
19240
19263
|
] }),
|
|
19241
19264
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
19242
19265
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
19243
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19266
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkMRSGNERC_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19244
19267
|
"button",
|
|
19245
19268
|
{
|
|
19246
19269
|
type: "button",
|
|
@@ -19378,7 +19401,7 @@ function ImageCropSection({
|
|
|
19378
19401
|
onUpdateElement
|
|
19379
19402
|
}) {
|
|
19380
19403
|
const { t } = reactI18next.useTranslation();
|
|
19381
|
-
if (!
|
|
19404
|
+
if (!pptx$1.isImageLikeElement(selectedElement)) {
|
|
19382
19405
|
return null;
|
|
19383
19406
|
}
|
|
19384
19407
|
const croppable = pptx.cropResetState(selectedElement, canEdit, true).enabled;
|
|
@@ -19395,7 +19418,7 @@ function ImageCropSection({
|
|
|
19395
19418
|
max: MAX_CROP_PERCENT,
|
|
19396
19419
|
disabled: !croppable,
|
|
19397
19420
|
className: "accent-primary",
|
|
19398
|
-
value: Math.round(
|
|
19421
|
+
value: Math.round(chunkMA2BI7LX_js.clampCropValue(selectedElement[key]) * 100),
|
|
19399
19422
|
onChange: (e) => onUpdateElement({
|
|
19400
19423
|
[key]: Number(e.target.value) / 100
|
|
19401
19424
|
})
|
|
@@ -19459,7 +19482,7 @@ function ImagePropertiesPanel({
|
|
|
19459
19482
|
{
|
|
19460
19483
|
rows: 2,
|
|
19461
19484
|
disabled: !canEdit,
|
|
19462
|
-
className:
|
|
19485
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
19463
19486
|
value: selectedElement.altText ?? "",
|
|
19464
19487
|
onChange: (e) => onUpdateElement({
|
|
19465
19488
|
altText: e.target.value
|
|
@@ -20399,7 +20422,7 @@ function AccessibilityTextSection({
|
|
|
20399
20422
|
rows: 2,
|
|
20400
20423
|
disabled: !canEdit,
|
|
20401
20424
|
placeholder: t("pptx.elementAccessibility.altTextPlaceholder"),
|
|
20402
|
-
className:
|
|
20425
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
20403
20426
|
value: fields.altText,
|
|
20404
20427
|
onChange: (e) => onUpdateElement({ altText: e.target.value })
|
|
20405
20428
|
}
|
|
@@ -20413,7 +20436,7 @@ function AccessibilityTextSection({
|
|
|
20413
20436
|
type: "text",
|
|
20414
20437
|
disabled: !canEdit,
|
|
20415
20438
|
placeholder: t("pptx.elementAccessibility.titlePlaceholder"),
|
|
20416
|
-
className:
|
|
20439
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "text-[11px]"),
|
|
20417
20440
|
value: fields.title,
|
|
20418
20441
|
onChange: (e) => onUpdateElement({ title: e.target.value })
|
|
20419
20442
|
}
|
|
@@ -20529,7 +20552,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20529
20552
|
angle = (Math.atan2(offsetY, offsetX) * 180 / Math.PI + 360) % 360;
|
|
20530
20553
|
}
|
|
20531
20554
|
return {
|
|
20532
|
-
shadowColor:
|
|
20555
|
+
shadowColor: chunkMA2BI7LX_js.normalizeHexColor(s?.shadowColor, "#000000"),
|
|
20533
20556
|
shadowOpacity: s?.shadowOpacity ?? 0.35,
|
|
20534
20557
|
shadowBlur: s?.shadowBlur ?? 6,
|
|
20535
20558
|
shadowAngle: angle,
|
|
@@ -20545,7 +20568,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20545
20568
|
key: "sc",
|
|
20546
20569
|
label: "Shadow Color",
|
|
20547
20570
|
type: "color",
|
|
20548
|
-
read: (s) =>
|
|
20571
|
+
read: (s) => chunkMA2BI7LX_js.normalizeHexColor(s?.shadowColor, "#000000"),
|
|
20549
20572
|
write: (v) => ({ shadowColor: String(v) })
|
|
20550
20573
|
},
|
|
20551
20574
|
{
|
|
@@ -20681,7 +20704,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20681
20704
|
label: "Inner Shadow",
|
|
20682
20705
|
isOn: (s) => Boolean(s?.innerShadowColor) && s?.innerShadowColor !== "transparent",
|
|
20683
20706
|
onEnable: (s) => ({
|
|
20684
|
-
innerShadowColor:
|
|
20707
|
+
innerShadowColor: chunkMA2BI7LX_js.normalizeHexColor(s?.innerShadowColor, "#000000"),
|
|
20685
20708
|
innerShadowOpacity: s?.innerShadowOpacity ?? 0.5,
|
|
20686
20709
|
innerShadowBlur: s?.innerShadowBlur ?? 5,
|
|
20687
20710
|
innerShadowOffsetX: s?.innerShadowOffsetX ?? 0,
|
|
@@ -20693,7 +20716,7 @@ var SHADOW_EFFECT_CONFIGS = [
|
|
|
20693
20716
|
key: "isc",
|
|
20694
20717
|
label: "Color",
|
|
20695
20718
|
type: "color",
|
|
20696
|
-
read: (s) =>
|
|
20719
|
+
read: (s) => chunkMA2BI7LX_js.normalizeHexColor(s?.innerShadowColor, "#000000"),
|
|
20697
20720
|
write: (v) => ({ innerShadowColor: String(v) })
|
|
20698
20721
|
},
|
|
20699
20722
|
{
|
|
@@ -21208,7 +21231,7 @@ function ColorPickerRow({
|
|
|
21208
21231
|
pushColor(color);
|
|
21209
21232
|
};
|
|
21210
21233
|
const handleEyedropper = async () => {
|
|
21211
|
-
const color = await
|
|
21234
|
+
const color = await chunkMA2BI7LX_js.openNativeEyeDropper();
|
|
21212
21235
|
if (color) {
|
|
21213
21236
|
commit(color);
|
|
21214
21237
|
}
|
|
@@ -21290,9 +21313,9 @@ function GradientStopRow({
|
|
|
21290
21313
|
"input",
|
|
21291
21314
|
{
|
|
21292
21315
|
type: "color",
|
|
21293
|
-
value:
|
|
21316
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(stop2.color, "#3b82f6"),
|
|
21294
21317
|
onChange: (e) => {
|
|
21295
|
-
const hex =
|
|
21318
|
+
const hex = chunkMA2BI7LX_js.normalizeHexColor(e.target.value, "#3b82f6");
|
|
21296
21319
|
patchStop({ color: hex, colorRef: void 0 });
|
|
21297
21320
|
pushColor(hex);
|
|
21298
21321
|
},
|
|
@@ -21416,7 +21439,7 @@ function FillAdvancedControls({
|
|
|
21416
21439
|
onClick: () => onUpdateGradientStops([
|
|
21417
21440
|
...gradientStops,
|
|
21418
21441
|
{
|
|
21419
|
-
color:
|
|
21442
|
+
color: chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR),
|
|
21420
21443
|
position: 50,
|
|
21421
21444
|
opacity: 1
|
|
21422
21445
|
}
|
|
@@ -21430,9 +21453,9 @@ function FillAdvancedControls({
|
|
|
21430
21453
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${COL2} flex flex-col gap-2`, children: [
|
|
21431
21454
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: "Pattern" }),
|
|
21432
21455
|
/* @__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) => {
|
|
21433
|
-
const fgColor =
|
|
21434
|
-
const bgColor =
|
|
21435
|
-
const svgPattern =
|
|
21456
|
+
const fgColor = chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR);
|
|
21457
|
+
const bgColor = chunkMA2BI7LX_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff");
|
|
21458
|
+
const svgPattern = chunkMA2BI7LX_js.getPatternSvg(opt.value, fgColor, bgColor);
|
|
21436
21459
|
const isSelected = (style.fillPatternPreset || "pct20") === opt.value;
|
|
21437
21460
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21438
21461
|
"button",
|
|
@@ -21465,7 +21488,7 @@ function FillAdvancedControls({
|
|
|
21465
21488
|
{
|
|
21466
21489
|
label: t("pptx.fillAdvanced.foregroundColor"),
|
|
21467
21490
|
prefix: "pattern-fg",
|
|
21468
|
-
value:
|
|
21491
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR),
|
|
21469
21492
|
disabled: isLine,
|
|
21470
21493
|
onChange: (color) => onUpdateShapeStyle({ fillMode: "pattern", fillColor: color })
|
|
21471
21494
|
}
|
|
@@ -21475,7 +21498,7 @@ function FillAdvancedControls({
|
|
|
21475
21498
|
{
|
|
21476
21499
|
label: t("pptx.fillAdvanced.backgroundColor"),
|
|
21477
21500
|
prefix: "pattern-bg",
|
|
21478
|
-
value:
|
|
21501
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff"),
|
|
21479
21502
|
disabled: isLine,
|
|
21480
21503
|
onChange: (color) => onUpdateShapeStyle({
|
|
21481
21504
|
fillMode: "pattern",
|
|
@@ -21542,11 +21565,11 @@ function QuickStylesGallery({
|
|
|
21542
21565
|
onUpdateShapeStyle
|
|
21543
21566
|
}) {
|
|
21544
21567
|
const { t } = reactI18next.useTranslation();
|
|
21545
|
-
const { viewportWidth } =
|
|
21568
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
21546
21569
|
const swatchMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
21547
21570
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
21548
21571
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: t("pptx.shape.quickStyles") }),
|
|
21549
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-6 gap-1", children:
|
|
21572
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-6 gap-1", children: chunkMA2BI7LX_js.SHAPE_QUICK_STYLES.map((qs, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
21550
21573
|
"button",
|
|
21551
21574
|
{
|
|
21552
21575
|
type: "button",
|
|
@@ -21573,7 +21596,7 @@ function StrokeEffectsSection({
|
|
|
21573
21596
|
{
|
|
21574
21597
|
label: t("pptx.inspector.stroke"),
|
|
21575
21598
|
prefix: "stroke",
|
|
21576
|
-
value:
|
|
21599
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(style?.strokeColor, chunkMA2BI7LX_js.DEFAULT_STROKE_COLOR),
|
|
21577
21600
|
selectedRef: style?.strokeColorRef,
|
|
21578
21601
|
onChange: onSetStrokeColor
|
|
21579
21602
|
}
|
|
@@ -21636,7 +21659,7 @@ function StrokeEffectsSection({
|
|
|
21636
21659
|
strokeDash: e.target.value
|
|
21637
21660
|
}),
|
|
21638
21661
|
className: SEL,
|
|
21639
|
-
children:
|
|
21662
|
+
children: chunkMA2BI7LX_js.STROKE_DASH_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
21640
21663
|
}
|
|
21641
21664
|
)
|
|
21642
21665
|
] }),
|
|
@@ -21726,10 +21749,10 @@ function FillStrokeProperties({
|
|
|
21726
21749
|
return;
|
|
21727
21750
|
}
|
|
21728
21751
|
if (nextMode === "gradient") {
|
|
21729
|
-
const existing =
|
|
21752
|
+
const existing = chunkMA2BI7LX_js.sanitizeGradientStops(style?.fillGradientStops);
|
|
21730
21753
|
const stops = existing.length >= 2 ? existing : [
|
|
21731
21754
|
{
|
|
21732
|
-
color:
|
|
21755
|
+
color: chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR),
|
|
21733
21756
|
position: 0,
|
|
21734
21757
|
opacity: 1
|
|
21735
21758
|
},
|
|
@@ -21754,7 +21777,7 @@ function FillStrokeProperties({
|
|
|
21754
21777
|
onUpdateShapeStyle({ fillMode: "solid" });
|
|
21755
21778
|
};
|
|
21756
21779
|
const gradientStops = selectedGradientStops.length > 0 ? selectedGradientStops : [
|
|
21757
|
-
{ color:
|
|
21780
|
+
{ color: chunkMA2BI7LX_js.DEFAULT_FILL_COLOR, position: 0 },
|
|
21758
21781
|
{ color: "#ffffff", position: 100 }
|
|
21759
21782
|
];
|
|
21760
21783
|
const showGradient = style?.fillMode === "gradient" || selectedGradientStops.length > 0;
|
|
@@ -21781,7 +21804,7 @@ function FillStrokeProperties({
|
|
|
21781
21804
|
{
|
|
21782
21805
|
label: t("pptx.fill.fill"),
|
|
21783
21806
|
prefix: "fill",
|
|
21784
|
-
value:
|
|
21807
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR),
|
|
21785
21808
|
selectedRef: style?.fillColorRef,
|
|
21786
21809
|
disabled: line,
|
|
21787
21810
|
onChange: onSetFillColor
|
|
@@ -21865,7 +21888,7 @@ function Text3DProperties({
|
|
|
21865
21888
|
"input",
|
|
21866
21889
|
{
|
|
21867
21890
|
type: "color",
|
|
21868
|
-
value:
|
|
21891
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(t3d?.extrusionColor, "#888888"),
|
|
21869
21892
|
onChange: (e) => {
|
|
21870
21893
|
update3d({ extrusionColor: e.target.value });
|
|
21871
21894
|
pushColor(e.target.value);
|
|
@@ -22056,7 +22079,7 @@ function AdvancedTextFormatting({
|
|
|
22056
22079
|
"input",
|
|
22057
22080
|
{
|
|
22058
22081
|
type: "color",
|
|
22059
|
-
value:
|
|
22082
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(ts?.highlightColor, "#ffff00"),
|
|
22060
22083
|
onChange: (e) => {
|
|
22061
22084
|
onUpdateTextStyle({ highlightColor: e.target.value });
|
|
22062
22085
|
pushColor(e.target.value);
|
|
@@ -22360,7 +22383,7 @@ function TextEffectsPanel({
|
|
|
22360
22383
|
"input",
|
|
22361
22384
|
{
|
|
22362
22385
|
type: "color",
|
|
22363
|
-
value:
|
|
22386
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(ts?.textShadowColor, "#000000"),
|
|
22364
22387
|
onChange: (e) => {
|
|
22365
22388
|
onUpdateTextStyle({ textShadowColor: e.target.value });
|
|
22366
22389
|
pushColor(e.target.value);
|
|
@@ -22467,7 +22490,7 @@ function TextEffectsPanel({
|
|
|
22467
22490
|
"input",
|
|
22468
22491
|
{
|
|
22469
22492
|
type: "color",
|
|
22470
|
-
value:
|
|
22493
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(ts?.textGlowColor, "#ffff00"),
|
|
22471
22494
|
onChange: (e) => {
|
|
22472
22495
|
onUpdateTextStyle({ textGlowColor: e.target.value });
|
|
22473
22496
|
pushColor(e.target.value);
|
|
@@ -22570,7 +22593,7 @@ function TextAdvancedSections({
|
|
|
22570
22593
|
canEdit,
|
|
22571
22594
|
onUpdateTextStyle
|
|
22572
22595
|
}) {
|
|
22573
|
-
if (!
|
|
22596
|
+
if (!pptx$1.hasTextProperties(selectedElement)) {
|
|
22574
22597
|
return null;
|
|
22575
22598
|
}
|
|
22576
22599
|
const ts = selectedElement.textStyle;
|
|
@@ -22599,22 +22622,22 @@ function ShapeTextPanels({
|
|
|
22599
22622
|
}) {
|
|
22600
22623
|
const { t } = reactI18next.useTranslation();
|
|
22601
22624
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22602
|
-
|
|
22625
|
+
pptx$1.hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
22603
22626
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.type", "Shape Type") }),
|
|
22604
22627
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22605
22628
|
WebSelect,
|
|
22606
22629
|
{
|
|
22607
22630
|
value: selectedElement.shapeType || "rect",
|
|
22608
22631
|
disabled: !canEdit,
|
|
22609
|
-
className:
|
|
22632
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-full"),
|
|
22610
22633
|
onChange: (e) => onUpdateElement({
|
|
22611
22634
|
shapeType: e.target.value
|
|
22612
22635
|
}),
|
|
22613
|
-
children:
|
|
22636
|
+
children: chunkMA2BI7LX_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
22614
22637
|
}
|
|
22615
22638
|
)
|
|
22616
22639
|
] }),
|
|
22617
|
-
|
|
22640
|
+
pptx$1.hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, "data-pptx-fill-stroke": true, "data-pptx-inspector-section": "fill-stroke", children: [
|
|
22618
22641
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.fillStroke", "Fill & Stroke") }),
|
|
22619
22642
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22620
22643
|
FillStrokeProperties,
|
|
@@ -22622,7 +22645,7 @@ function ShapeTextPanels({
|
|
|
22622
22645
|
selectedElement,
|
|
22623
22646
|
selectedShapeStyle: selectedElement.shapeStyle,
|
|
22624
22647
|
selectedShapeType: selectedElement.shapeType,
|
|
22625
|
-
selectedGradientStops:
|
|
22648
|
+
selectedGradientStops: chunkMA2BI7LX_js.sanitizeGradientStops(
|
|
22626
22649
|
selectedElement.shapeStyle?.fillGradientStops
|
|
22627
22650
|
),
|
|
22628
22651
|
canEdit,
|
|
@@ -22632,7 +22655,7 @@ function ShapeTextPanels({
|
|
|
22632
22655
|
}
|
|
22633
22656
|
)
|
|
22634
22657
|
] }),
|
|
22635
|
-
|
|
22658
|
+
pptx$1.hasTextProperties(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, "data-pptx-text-card": true, children: [
|
|
22636
22659
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.text.title", "Text") }),
|
|
22637
22660
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5 text-[11px]", children: [
|
|
22638
22661
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -22658,7 +22681,7 @@ function ShapeTextPanels({
|
|
|
22658
22681
|
{
|
|
22659
22682
|
disabled: !canEdit,
|
|
22660
22683
|
ariaLabel: "Text Color",
|
|
22661
|
-
value:
|
|
22684
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
22662
22685
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22663
22686
|
onCommit: (hex) => onUpdateTextStyle({ color: hex, colorRef: void 0 })
|
|
22664
22687
|
}
|
|
@@ -22749,7 +22772,7 @@ function TextFormatToggle({
|
|
|
22749
22772
|
{
|
|
22750
22773
|
type: "button",
|
|
22751
22774
|
disabled,
|
|
22752
|
-
className:
|
|
22775
|
+
className: chunkMA2BI7LX_js.cn(
|
|
22753
22776
|
"px-2 py-1 rounded text-[11px] transition-colors max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
22754
22777
|
italic && "italic",
|
|
22755
22778
|
underline && "underline",
|
|
@@ -22907,10 +22930,12 @@ var THUMB_COMPONENTS = {
|
|
|
22907
22930
|
chevron: ChevronThumb,
|
|
22908
22931
|
bending: BendingThumb
|
|
22909
22932
|
};
|
|
22910
|
-
var LAYOUT_DESCRIPTORS =
|
|
22911
|
-
type
|
|
22912
|
-
|
|
22913
|
-
}
|
|
22933
|
+
var LAYOUT_DESCRIPTORS = /* @__PURE__ */ pptx$1.SWITCHABLE_LAYOUT_TYPES.map(
|
|
22934
|
+
(type) => ({
|
|
22935
|
+
type,
|
|
22936
|
+
i18nKey: `pptx.smartart.category.${type}`
|
|
22937
|
+
})
|
|
22938
|
+
);
|
|
22914
22939
|
function SmartArtLayoutSwitcher({
|
|
22915
22940
|
smartArtData,
|
|
22916
22941
|
canEdit,
|
|
@@ -22935,7 +22960,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22935
22960
|
type: "button",
|
|
22936
22961
|
"data-testid": `smartart-layout-${type}`,
|
|
22937
22962
|
disabled: !canEdit,
|
|
22938
|
-
className:
|
|
22963
|
+
className: chunkMA2BI7LX_js.cn(
|
|
22939
22964
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
22940
22965
|
"text-[9px] leading-tight",
|
|
22941
22966
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -23014,7 +23039,7 @@ function SmartArtNodeStyleControls({
|
|
|
23014
23039
|
disabled: !canEdit,
|
|
23015
23040
|
"aria-label": `Bold ${label}`,
|
|
23016
23041
|
"aria-pressed": bold,
|
|
23017
|
-
className:
|
|
23042
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23018
23043
|
EMPHASIS_BTN,
|
|
23019
23044
|
"font-bold",
|
|
23020
23045
|
bold ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -23030,7 +23055,7 @@ function SmartArtNodeStyleControls({
|
|
|
23030
23055
|
disabled: !canEdit,
|
|
23031
23056
|
"aria-label": `Italic ${label}`,
|
|
23032
23057
|
"aria-pressed": italic,
|
|
23033
|
-
className:
|
|
23058
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23034
23059
|
EMPHASIS_BTN,
|
|
23035
23060
|
"italic",
|
|
23036
23061
|
italic ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -23069,7 +23094,7 @@ function SmartArtNodeRow({
|
|
|
23069
23094
|
"div",
|
|
23070
23095
|
{
|
|
23071
23096
|
role: "listitem",
|
|
23072
|
-
className:
|
|
23097
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23073
23098
|
"rounded border bg-background/60 p-1.5",
|
|
23074
23099
|
isChild ? "border-border/60 ml-4" : "border-border"
|
|
23075
23100
|
),
|
|
@@ -23084,7 +23109,7 @@ function SmartArtNodeRow({
|
|
|
23084
23109
|
"data-testid": "smartart-node-text",
|
|
23085
23110
|
disabled: !canEdit,
|
|
23086
23111
|
"aria-label": label,
|
|
23087
|
-
className:
|
|
23112
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "flex-1 text-[11px] py-0.5"),
|
|
23088
23113
|
value: text,
|
|
23089
23114
|
onChange: (e) => onChangeText(nodeId, e.target.value),
|
|
23090
23115
|
onKeyDown: (e) => onKeyDown(e, nodeId),
|
|
@@ -23133,7 +23158,7 @@ function SmartArtNodeRow({
|
|
|
23133
23158
|
{
|
|
23134
23159
|
type: "button",
|
|
23135
23160
|
disabled: !canEdit || removeDisabled,
|
|
23136
|
-
className:
|
|
23161
|
+
className: chunkMA2BI7LX_js.cn(MINI_BTN, "hover:text-red-400"),
|
|
23137
23162
|
onClick: () => onRemove(nodeId),
|
|
23138
23163
|
"aria-label": `Remove ${label}`,
|
|
23139
23164
|
title: removeDisabled ? t("pptx.smartArt.layoutMinimum") : t("pptx.smartArt.remove"),
|
|
@@ -23176,7 +23201,7 @@ function SmartArtStyleControls({
|
|
|
23176
23201
|
disabled: !canEdit,
|
|
23177
23202
|
"data-testid": "smartart-color-scheme",
|
|
23178
23203
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
23179
|
-
className:
|
|
23204
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-full"),
|
|
23180
23205
|
value: colorScheme,
|
|
23181
23206
|
onChange: (e) => onChangeColorScheme(e.target.value),
|
|
23182
23207
|
children: colorSchemes.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: pptx.schemaLabel(pptx.SMARTART_COLOR_SCHEME_LABEL_KEYS, cs, translate) }, cs))
|
|
@@ -23191,7 +23216,7 @@ function SmartArtStyleControls({
|
|
|
23191
23216
|
type: "button",
|
|
23192
23217
|
disabled: !canEdit,
|
|
23193
23218
|
"aria-pressed": style === s,
|
|
23194
|
-
className:
|
|
23219
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23195
23220
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
23196
23221
|
style === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
23197
23222
|
),
|
|
@@ -23237,7 +23262,7 @@ function SmartArtPropertiesPanel({
|
|
|
23237
23262
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
23238
23263
|
newData,
|
|
23239
23264
|
newData.layout,
|
|
23240
|
-
|
|
23265
|
+
chunkMRSGNERC_js.resolveSmartArtDataPalette(newData),
|
|
23241
23266
|
newData.style ?? "flat",
|
|
23242
23267
|
"inspector",
|
|
23243
23268
|
box
|
|
@@ -23248,10 +23273,10 @@ function SmartArtPropertiesPanel({
|
|
|
23248
23273
|
applySmartArtData({ ...smartArtData, ...patch });
|
|
23249
23274
|
};
|
|
23250
23275
|
const handleUpdateNodeText = (nodeId, text) => {
|
|
23251
|
-
applySmartArtData(
|
|
23276
|
+
applySmartArtData(pptx$1.updateSmartArtNodeText(smartArtData, nodeId, text));
|
|
23252
23277
|
};
|
|
23253
23278
|
const handleChangeNodeStyle = (nodeId, patch) => {
|
|
23254
|
-
const next =
|
|
23279
|
+
const next = pptx$1.setSmartArtNodeStyle(smartArtData, nodeId, patch);
|
|
23255
23280
|
if (next !== smartArtData) {
|
|
23256
23281
|
applySmartArtData(next);
|
|
23257
23282
|
}
|
|
@@ -23260,17 +23285,17 @@ function SmartArtPropertiesPanel({
|
|
|
23260
23285
|
if (!pptx.canAddTopLevelNode(layout, topLevelCount)) {
|
|
23261
23286
|
return;
|
|
23262
23287
|
}
|
|
23263
|
-
applySmartArtData(
|
|
23288
|
+
applySmartArtData(pptx$1.addSmartArtNodeAsChild(smartArtData));
|
|
23264
23289
|
};
|
|
23265
23290
|
const addSubItem = (parentId) => {
|
|
23266
|
-
applySmartArtData(
|
|
23291
|
+
applySmartArtData(pptx$1.addSmartArtNodeAsChild(smartArtData, parentId, "Sub-item"));
|
|
23267
23292
|
};
|
|
23268
23293
|
const removeNode = (nodeId) => {
|
|
23269
23294
|
const isTopLevel = !nodes.find((n) => n.id === nodeId)?.parentId;
|
|
23270
23295
|
if (isTopLevel && !pptx.canRemoveTopLevelNode(layout, topLevelCount)) {
|
|
23271
23296
|
return;
|
|
23272
23297
|
}
|
|
23273
|
-
applySmartArtData(
|
|
23298
|
+
applySmartArtData(pptx$1.removeSmartArtNode(smartArtData, nodeId));
|
|
23274
23299
|
};
|
|
23275
23300
|
const moveNode = (nodeId, direction) => {
|
|
23276
23301
|
const next = pptx.reorder(smartArtData, nodeId, direction);
|
|
@@ -23426,7 +23451,7 @@ function TableDataGrid({
|
|
|
23426
23451
|
}) {
|
|
23427
23452
|
const { t } = reactI18next.useTranslation();
|
|
23428
23453
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
23429
|
-
const { viewportWidth } =
|
|
23454
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
23430
23455
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
23431
23456
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
23432
23457
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -23837,7 +23862,7 @@ function TableCellColorField({
|
|
|
23837
23862
|
disabled,
|
|
23838
23863
|
onCommit
|
|
23839
23864
|
}) {
|
|
23840
|
-
const hex =
|
|
23865
|
+
const hex = chunkMA2BI7LX_js.normalizeHexColor(value, fallback);
|
|
23841
23866
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
23842
23867
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
|
|
23843
23868
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23945,7 +23970,7 @@ function TableCellFormattingPanel({
|
|
|
23945
23970
|
{
|
|
23946
23971
|
type: "button",
|
|
23947
23972
|
disabled: !canEdit,
|
|
23948
|
-
className:
|
|
23973
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23949
23974
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23950
23975
|
cls,
|
|
23951
23976
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -23964,7 +23989,7 @@ function TableCellFormattingPanel({
|
|
|
23964
23989
|
{
|
|
23965
23990
|
type: "button",
|
|
23966
23991
|
disabled: !canEdit,
|
|
23967
|
-
className:
|
|
23992
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23968
23993
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23969
23994
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23970
23995
|
),
|
|
@@ -23982,7 +24007,7 @@ function TableCellFormattingPanel({
|
|
|
23982
24007
|
{
|
|
23983
24008
|
type: "button",
|
|
23984
24009
|
disabled: !canEdit,
|
|
23985
|
-
className:
|
|
24010
|
+
className: chunkMA2BI7LX_js.cn(
|
|
23986
24011
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23987
24012
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23988
24013
|
),
|
|
@@ -24005,7 +24030,7 @@ function TableCellFormattingPanel({
|
|
|
24005
24030
|
DebouncedColorInput,
|
|
24006
24031
|
{
|
|
24007
24032
|
disabled: !canEdit,
|
|
24008
|
-
value:
|
|
24033
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
24009
24034
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
24010
24035
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
24011
24036
|
}
|
|
@@ -24015,7 +24040,7 @@ function TableCellFormattingPanel({
|
|
|
24015
24040
|
{
|
|
24016
24041
|
type: "number",
|
|
24017
24042
|
disabled: !canEdit,
|
|
24018
|
-
className:
|
|
24043
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-14"),
|
|
24019
24044
|
min: 0,
|
|
24020
24045
|
max: 10,
|
|
24021
24046
|
value: pptx.inspectorNumber(cs[widthKey], 1),
|
|
@@ -24031,7 +24056,7 @@ function TableCellFormattingPanel({
|
|
|
24031
24056
|
{
|
|
24032
24057
|
type: "button",
|
|
24033
24058
|
disabled: !canEdit,
|
|
24034
|
-
className:
|
|
24059
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "text-center"),
|
|
24035
24060
|
onClick: () => {
|
|
24036
24061
|
const newRows = pptx.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
24037
24062
|
if (newRows) {
|
|
@@ -24046,7 +24071,7 @@ function TableCellFormattingPanel({
|
|
|
24046
24071
|
{
|
|
24047
24072
|
type: "button",
|
|
24048
24073
|
disabled: !canEdit,
|
|
24049
|
-
className:
|
|
24074
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "text-center"),
|
|
24050
24075
|
onClick: () => {
|
|
24051
24076
|
const newRows = pptx.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
24052
24077
|
if (newRows) {
|
|
@@ -24061,7 +24086,7 @@ function TableCellFormattingPanel({
|
|
|
24061
24086
|
{
|
|
24062
24087
|
type: "button",
|
|
24063
24088
|
disabled: !canEdit,
|
|
24064
|
-
className:
|
|
24089
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "text-center"),
|
|
24065
24090
|
onClick: () => {
|
|
24066
24091
|
const newRows = pptx.computeSplitCell(td, rowIndex, columnIndex);
|
|
24067
24092
|
if (newRows) {
|
|
@@ -24245,7 +24270,7 @@ function TableStyleEditor({
|
|
|
24245
24270
|
const { t } = reactI18next.useTranslation();
|
|
24246
24271
|
const themeColorMap = useThemeColorMap();
|
|
24247
24272
|
const [activeStyleId, setActiveStyleId] = React106.useState(
|
|
24248
|
-
styleId ?
|
|
24273
|
+
styleId ? pptx$1.normalizeTableStyleGuid(styleId) : ""
|
|
24249
24274
|
);
|
|
24250
24275
|
const [selectedPart, setSelectedPart] = React106.useState("wholeTbl");
|
|
24251
24276
|
const entry = activeStyleId ? styleMap?.[activeStyleId] : void 0;
|
|
@@ -24266,8 +24291,8 @@ function TableStyleEditor({
|
|
|
24266
24291
|
return;
|
|
24267
24292
|
}
|
|
24268
24293
|
const nextMap = { ...styleMap ?? {} };
|
|
24269
|
-
const created =
|
|
24270
|
-
|
|
24294
|
+
const created = pptx$1.createTableStyleEntry(nextMap, { styleName: name, basedOn: entry });
|
|
24295
|
+
pptx$1.addTableStyleToMap(nextMap, created);
|
|
24271
24296
|
onStyleMapChange(nextMap);
|
|
24272
24297
|
setActiveStyleId(created.styleId);
|
|
24273
24298
|
onAssignStyle?.(created.styleId);
|
|
@@ -24277,7 +24302,7 @@ function TableStyleEditor({
|
|
|
24277
24302
|
return;
|
|
24278
24303
|
}
|
|
24279
24304
|
const nextMap = { ...styleMap };
|
|
24280
|
-
|
|
24305
|
+
pptx$1.deleteTableStyleFromMap(nextMap, entry.styleId);
|
|
24281
24306
|
onStyleMapChange(nextMap);
|
|
24282
24307
|
onDeleteStyle(entry.styleId);
|
|
24283
24308
|
onClose();
|
|
@@ -24331,7 +24356,7 @@ function TablePropertiesPanel({
|
|
|
24331
24356
|
const updateMergeRows = (rows) => {
|
|
24332
24357
|
const tableData = { ...td, rows };
|
|
24333
24358
|
const updates = { tableData };
|
|
24334
|
-
const rawXml =
|
|
24359
|
+
const rawXml = pptx$1.updateMergeAttrsInRawXml(tableElement, tableData);
|
|
24335
24360
|
if (rawXml) {
|
|
24336
24361
|
updates.rawXml = rawXml;
|
|
24337
24362
|
}
|
|
@@ -24397,7 +24422,7 @@ function TablePropertiesPanel({
|
|
|
24397
24422
|
] }),
|
|
24398
24423
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24399
24424
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.table.stylePresets") }),
|
|
24400
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
24425
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunkMA2BI7LX_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24401
24426
|
"button",
|
|
24402
24427
|
{
|
|
24403
24428
|
type: "button",
|
|
@@ -24625,7 +24650,7 @@ function ElementInspectorBody({
|
|
|
24625
24650
|
box: { width: selectedElement.width, height: selectedElement.height }
|
|
24626
24651
|
}
|
|
24627
24652
|
),
|
|
24628
|
-
|
|
24653
|
+
pptx$1.isImageLikeElement(selectedElement) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24629
24654
|
ImagePropertiesPanel,
|
|
24630
24655
|
{
|
|
24631
24656
|
selectedElement,
|
|
@@ -24790,7 +24815,7 @@ function CommentMentionTextarea({
|
|
|
24790
24815
|
"data-testid": "pptx-comment-mention-option",
|
|
24791
24816
|
role: "option",
|
|
24792
24817
|
"aria-selected": index === safeHighlighted,
|
|
24793
|
-
className:
|
|
24818
|
+
className: chunkMA2BI7LX_js.cn(
|
|
24794
24819
|
"block w-full px-2 py-1 text-left text-[11px] hover:bg-accent",
|
|
24795
24820
|
index === safeHighlighted && "bg-accent"
|
|
24796
24821
|
),
|
|
@@ -24913,7 +24938,7 @@ function InspectorCommentRow({
|
|
|
24913
24938
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24914
24939
|
"div",
|
|
24915
24940
|
{
|
|
24916
|
-
className:
|
|
24941
|
+
className: chunkMA2BI7LX_js.cn(
|
|
24917
24942
|
"rounded border border-border bg-card p-2",
|
|
24918
24943
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
24919
24944
|
),
|
|
@@ -24927,7 +24952,7 @@ function InspectorCommentRow({
|
|
|
24927
24952
|
t("pptx.comments.resolved")
|
|
24928
24953
|
] })
|
|
24929
24954
|
] }),
|
|
24930
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
24955
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunkMA2BI7LX_js.formatCommentTimestamp(comment.createdAt) })
|
|
24931
24956
|
] }),
|
|
24932
24957
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24933
24958
|
"button",
|
|
@@ -24935,12 +24960,12 @@ function InspectorCommentRow({
|
|
|
24935
24960
|
type: "button",
|
|
24936
24961
|
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",
|
|
24937
24962
|
title: t("pptx.comments.commentingOn", {
|
|
24938
|
-
element:
|
|
24963
|
+
element: chunkMA2BI7LX_js.getElementLabel(targetElement)
|
|
24939
24964
|
}),
|
|
24940
24965
|
onClick: () => onSelectElement(targetElement.id),
|
|
24941
24966
|
children: [
|
|
24942
24967
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24943
|
-
|
|
24968
|
+
chunkMA2BI7LX_js.getElementLabel(targetElement)
|
|
24944
24969
|
]
|
|
24945
24970
|
}
|
|
24946
24971
|
) : /* @__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") })),
|
|
@@ -25009,7 +25034,7 @@ function InspectorCommentRow({
|
|
|
25009
25034
|
"button",
|
|
25010
25035
|
{
|
|
25011
25036
|
type: "button",
|
|
25012
|
-
className:
|
|
25037
|
+
className: chunkMA2BI7LX_js.cn(
|
|
25013
25038
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
25014
25039
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
25015
25040
|
),
|
|
@@ -25152,7 +25177,7 @@ function InspectorCommentsSection({
|
|
|
25152
25177
|
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: [
|
|
25153
25178
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
25154
25179
|
t("pptx.comments.commentingOn", {
|
|
25155
|
-
element:
|
|
25180
|
+
element: chunkMA2BI7LX_js.getElementLabel(selectedElement)
|
|
25156
25181
|
})
|
|
25157
25182
|
] }),
|
|
25158
25183
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25163,7 +25188,7 @@ function InspectorCommentsSection({
|
|
|
25163
25188
|
authors: commentAuthors,
|
|
25164
25189
|
rows: 2,
|
|
25165
25190
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
25166
|
-
element:
|
|
25191
|
+
element: chunkMA2BI7LX_js.getElementLabel(selectedElement)
|
|
25167
25192
|
}) : t("pptx.comments.addPlaceholder"),
|
|
25168
25193
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
25169
25194
|
onChange: onSetCommentDraft,
|
|
@@ -25176,7 +25201,7 @@ function InspectorCommentsSection({
|
|
|
25176
25201
|
type: "button",
|
|
25177
25202
|
onClick: onAddComment,
|
|
25178
25203
|
disabled: !commentDraft.trim(),
|
|
25179
|
-
className:
|
|
25204
|
+
className: chunkMA2BI7LX_js.cn(
|
|
25180
25205
|
"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]!",
|
|
25181
25206
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
25182
25207
|
),
|
|
@@ -25190,7 +25215,7 @@ function InspectorCommentsSection({
|
|
|
25190
25215
|
] });
|
|
25191
25216
|
}
|
|
25192
25217
|
function elementLabel(element) {
|
|
25193
|
-
const text =
|
|
25218
|
+
const text = pptx$1.hasTextProperties(element) ? (element.text || "").slice(0, 24) : void 0;
|
|
25194
25219
|
return text || element.type;
|
|
25195
25220
|
}
|
|
25196
25221
|
function InspectorElementsTab({
|
|
@@ -25217,13 +25242,13 @@ function InspectorElementsTab({
|
|
|
25217
25242
|
};
|
|
25218
25243
|
if (!activeSlide) {
|
|
25219
25244
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
25220
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
25245
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkMA2BI7LX_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
25221
25246
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground italic", children: t("pptx.inspector.noSlideSelected") })
|
|
25222
25247
|
] });
|
|
25223
25248
|
}
|
|
25224
25249
|
const elements = activeSlide.elements || [];
|
|
25225
25250
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", "data-pptx-elements-tab": true, children: [
|
|
25226
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
25251
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkMA2BI7LX_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
25227
25252
|
[...elements].reverse().map((el, reversedIndex) => {
|
|
25228
25253
|
const index = elements.length - 1 - reversedIndex;
|
|
25229
25254
|
const selected = selectedElementId === el.id || selectedElementIds.includes(el.id);
|
|
@@ -25231,7 +25256,7 @@ function InspectorElementsTab({
|
|
|
25231
25256
|
"div",
|
|
25232
25257
|
{
|
|
25233
25258
|
title: `${el.type} - ${el.id}`,
|
|
25234
|
-
className:
|
|
25259
|
+
className: chunkMA2BI7LX_js.cn(
|
|
25235
25260
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
25236
25261
|
selected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
25237
25262
|
),
|
|
@@ -25268,7 +25293,7 @@ function InspectorPaneHeader({
|
|
|
25268
25293
|
onClose
|
|
25269
25294
|
}) {
|
|
25270
25295
|
const { t } = reactI18next.useTranslation();
|
|
25271
|
-
const { viewportWidth } =
|
|
25296
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
25272
25297
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
25273
25298
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
25274
25299
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -25291,7 +25316,7 @@ function InspectorPaneHeader({
|
|
|
25291
25316
|
type: "button",
|
|
25292
25317
|
title: t(labelKey),
|
|
25293
25318
|
style: touchBtnStyle,
|
|
25294
|
-
className:
|
|
25319
|
+
className: chunkMA2BI7LX_js.cn(
|
|
25295
25320
|
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
25296
25321
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
25297
25322
|
),
|
|
@@ -25405,7 +25430,7 @@ function CustomPropertiesBlock({
|
|
|
25405
25430
|
"button",
|
|
25406
25431
|
{
|
|
25407
25432
|
type: "button",
|
|
25408
|
-
className:
|
|
25433
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25409
25434
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
25410
25435
|
children: "\xD7"
|
|
25411
25436
|
}
|
|
@@ -25733,7 +25758,7 @@ function PresentationSettingsCard({
|
|
|
25733
25758
|
min: 1,
|
|
25734
25759
|
max: 16,
|
|
25735
25760
|
disabled: !canEdit,
|
|
25736
|
-
className:
|
|
25761
|
+
className: chunkMA2BI7LX_js.cn(INPUT2, "w-20"),
|
|
25737
25762
|
value: pptx.printPropertiesSlidesPerPage(presentationProperties.printProperties),
|
|
25738
25763
|
onChange: (e) => onUpdate({
|
|
25739
25764
|
printProperties: pptx.withSlidesPerPage(
|
|
@@ -25821,14 +25846,14 @@ function SlideThemeOverridePanel({
|
|
|
25821
25846
|
const translate = React106.useCallback((key) => t(key), [t]);
|
|
25822
25847
|
const override = activeSlide?.clrMapOverride;
|
|
25823
25848
|
const isOverrideActive = override !== void 0;
|
|
25824
|
-
const targetSlotOptions = React106.useMemo(() => [...
|
|
25849
|
+
const targetSlotOptions = React106.useMemo(() => [...pptx$1.THEME_COLOR_SCHEME_KEYS], []);
|
|
25825
25850
|
const commitOverride = React106.useCallback(
|
|
25826
25851
|
(nextOverride) => {
|
|
25827
25852
|
if (!activeSlide || !theme?.colorScheme) {
|
|
25828
25853
|
onUpdateSlide({ clrMapOverride: nextOverride });
|
|
25829
25854
|
return;
|
|
25830
25855
|
}
|
|
25831
|
-
const nextSlide =
|
|
25856
|
+
const nextSlide = pptx$1.applyThemeOverrideToSlide(activeSlide, theme.colorScheme, nextOverride);
|
|
25832
25857
|
onUpdateSlide({
|
|
25833
25858
|
clrMapOverride: nextSlide.clrMapOverride,
|
|
25834
25859
|
backgroundColor: nextSlide.backgroundColor,
|
|
@@ -25841,8 +25866,8 @@ function SlideThemeOverridePanel({
|
|
|
25841
25866
|
(enabled) => {
|
|
25842
25867
|
if (enabled) {
|
|
25843
25868
|
const defaultMap = {};
|
|
25844
|
-
for (const key of
|
|
25845
|
-
defaultMap[key] =
|
|
25869
|
+
for (const key of pptx$1.COLOR_MAP_ALIAS_KEYS) {
|
|
25870
|
+
defaultMap[key] = pptx$1.DEFAULT_COLOR_MAP[key];
|
|
25846
25871
|
}
|
|
25847
25872
|
commitOverride(defaultMap);
|
|
25848
25873
|
} else {
|
|
@@ -25855,9 +25880,9 @@ function SlideThemeOverridePanel({
|
|
|
25855
25880
|
(alias, targetSlot) => {
|
|
25856
25881
|
const current = override ?? {};
|
|
25857
25882
|
const next = { ...current, [alias]: targetSlot };
|
|
25858
|
-
for (const key of
|
|
25883
|
+
for (const key of pptx$1.COLOR_MAP_ALIAS_KEYS) {
|
|
25859
25884
|
if (!next[key]) {
|
|
25860
|
-
next[key] =
|
|
25885
|
+
next[key] = pptx$1.DEFAULT_COLOR_MAP[key];
|
|
25861
25886
|
}
|
|
25862
25887
|
}
|
|
25863
25888
|
commitOverride(next);
|
|
@@ -25889,8 +25914,8 @@ function SlideThemeOverridePanel({
|
|
|
25889
25914
|
),
|
|
25890
25915
|
t("pptx.themeOverride.enableOverride")
|
|
25891
25916
|
] }),
|
|
25892
|
-
isOverrideActive && override && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children:
|
|
25893
|
-
const currentTarget = override[alias] ??
|
|
25917
|
+
isOverrideActive && override && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: pptx$1.COLOR_MAP_ALIAS_KEYS.map((alias) => {
|
|
25918
|
+
const currentTarget = override[alias] ?? pptx$1.DEFAULT_COLOR_MAP[alias];
|
|
25894
25919
|
const resolvedHex = resolveSlotColor(currentTarget);
|
|
25895
25920
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25896
25921
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-24 truncate text-muted-foreground", title: ALIAS_LABELS[alias], children: ALIAS_LABELS[alias] }),
|
|
@@ -25969,7 +25994,7 @@ function TransitionPreview({
|
|
|
25969
25994
|
const { t } = reactI18next.useTranslation();
|
|
25970
25995
|
const durationMs = transition.durationMs ?? 500;
|
|
25971
25996
|
const animations = React106.useMemo(
|
|
25972
|
-
() =>
|
|
25997
|
+
() => chunkMRSGNERC_js.getSlideTransitionAnimations(
|
|
25973
25998
|
transition.type,
|
|
25974
25999
|
durationMs,
|
|
25975
26000
|
transition.direction,
|
|
@@ -26038,7 +26063,7 @@ function TransitionPreview({
|
|
|
26038
26063
|
]
|
|
26039
26064
|
}
|
|
26040
26065
|
),
|
|
26041
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
26066
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkMRSGNERC_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
26042
26067
|
] });
|
|
26043
26068
|
}
|
|
26044
26069
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -26055,13 +26080,13 @@ function SlideTransitionSection({
|
|
|
26055
26080
|
return null;
|
|
26056
26081
|
}
|
|
26057
26082
|
const transitionType = activeSlide.transition?.type ?? "none";
|
|
26058
|
-
const validDirections =
|
|
26083
|
+
const validDirections = pptx$1.TRANSITION_VALID_DIRECTIONS[transitionType];
|
|
26059
26084
|
const hasDirections = validDirections !== void 0 && validDirections.length > 0;
|
|
26060
26085
|
const usesOrientation = pptx.TRANSITION_ORIENTATION_TYPES.has(transitionType);
|
|
26061
26086
|
const isWheel = transitionType === "wheel";
|
|
26062
26087
|
const isMorph = transitionType === "morph";
|
|
26063
|
-
const patternOptions =
|
|
26064
|
-
const hasThruBlk =
|
|
26088
|
+
const patternOptions = pptx$1.TRANSITION_PATTERN_OPTIONS[transitionType];
|
|
26089
|
+
const hasThruBlk = pptx$1.TRANSITION_THRUBLK_TYPES.has(transitionType);
|
|
26065
26090
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26066
26091
|
"div",
|
|
26067
26092
|
{
|
|
@@ -26081,7 +26106,7 @@ function SlideTransitionSection({
|
|
|
26081
26106
|
type: e.target.value
|
|
26082
26107
|
}),
|
|
26083
26108
|
className: "bg-muted border border-border rounded px-2 py-1 max-md:min-h-[44px]!",
|
|
26084
|
-
children:
|
|
26109
|
+
children: chunkMA2BI7LX_js.SLIDE_TRANSITION_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
26085
26110
|
}
|
|
26086
26111
|
)
|
|
26087
26112
|
] }),
|
|
@@ -26297,7 +26322,7 @@ function TagsSection({
|
|
|
26297
26322
|
"button",
|
|
26298
26323
|
{
|
|
26299
26324
|
type: "button",
|
|
26300
|
-
className:
|
|
26325
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
26301
26326
|
title: t("pptx.tags.deleteTag"),
|
|
26302
26327
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
26303
26328
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -26426,7 +26451,7 @@ function PresentationPropertiesPanel({
|
|
|
26426
26451
|
canEdit
|
|
26427
26452
|
}
|
|
26428
26453
|
) }),
|
|
26429
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className:
|
|
26454
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className: chunkMA2BI7LX_js.cn(CARD2, "space-y-1"), children: [
|
|
26430
26455
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: "Slide" }),
|
|
26431
26456
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
26432
26457
|
activeSlide.elements?.length ?? 0,
|
|
@@ -26447,14 +26472,14 @@ function SlideBackgroundPanel({
|
|
|
26447
26472
|
const { t } = reactI18next.useTranslation();
|
|
26448
26473
|
const bgImageInputRef = React106.useRef(null);
|
|
26449
26474
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
26450
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
26475
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkMA2BI7LX_js.cn(CARD2, "space-y-2"), children: [
|
|
26451
26476
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.viewer.background") }),
|
|
26452
26477
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
26453
26478
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: t("pptx.slideBackground.colour") }),
|
|
26454
26479
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26455
26480
|
DebouncedColorInput,
|
|
26456
26481
|
{
|
|
26457
|
-
value:
|
|
26482
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
26458
26483
|
disabled: !canEdit,
|
|
26459
26484
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26460
26485
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -26493,7 +26518,7 @@ function SlideBackgroundPanel({
|
|
|
26493
26518
|
"button",
|
|
26494
26519
|
{
|
|
26495
26520
|
type: "button",
|
|
26496
|
-
className:
|
|
26521
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "flex-1 text-center"),
|
|
26497
26522
|
disabled: !canEdit,
|
|
26498
26523
|
onClick: () => bgImageInputRef.current?.click(),
|
|
26499
26524
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -26526,7 +26551,7 @@ function SlideBackgroundPanel({
|
|
|
26526
26551
|
"button",
|
|
26527
26552
|
{
|
|
26528
26553
|
type: "button",
|
|
26529
|
-
className:
|
|
26554
|
+
className: chunkMA2BI7LX_js.cn(BTN2, "w-full text-center text-red-400 hover:text-red-300"),
|
|
26530
26555
|
disabled: !pptx.slideBackgroundClearState(activeSlide, canEdit).enabled,
|
|
26531
26556
|
onClick: () => onUpdateSlide(pptx.slideBackgroundClearPatch()),
|
|
26532
26557
|
children: t("pptx.slideBackground.clearBackground")
|
|
@@ -26570,14 +26595,14 @@ function TemplateBackgroundCard({
|
|
|
26570
26595
|
t("pptx.master.layout"),
|
|
26571
26596
|
t("pptx.master.master")
|
|
26572
26597
|
);
|
|
26573
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
26598
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkMA2BI7LX_js.cn(CARD2, "space-y-2"), children: [
|
|
26574
26599
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
26575
26600
|
rows.layout && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
26576
26601
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-14 shrink-0 truncate", title: rows.layout.title, children: t("pptx.master.layout") }),
|
|
26577
26602
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26578
26603
|
DebouncedColorInput,
|
|
26579
26604
|
{
|
|
26580
|
-
value:
|
|
26605
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.layout.path), "#ffffff"),
|
|
26581
26606
|
disabled: !canEdit,
|
|
26582
26607
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26583
26608
|
onCommit: (hex) => onSetTemplateBackground(rows.layout.path, hex)
|
|
@@ -26590,7 +26615,7 @@ function TemplateBackgroundCard({
|
|
|
26590
26615
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26591
26616
|
DebouncedColorInput,
|
|
26592
26617
|
{
|
|
26593
|
-
value:
|
|
26618
|
+
value: chunkMA2BI7LX_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.master.path), "#ffffff"),
|
|
26594
26619
|
disabled: !canEdit,
|
|
26595
26620
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
26596
26621
|
onCommit: (hex) => onSetTemplateBackground(rows.master.path, hex)
|
|
@@ -26701,7 +26726,7 @@ function InspectorPane(props) {
|
|
|
26701
26726
|
} = props;
|
|
26702
26727
|
const hasSelection = selectedElement !== null;
|
|
26703
26728
|
const { t } = reactI18next.useTranslation();
|
|
26704
|
-
const { dragY, handlers: dragHandlers } =
|
|
26729
|
+
const { dragY, handlers: dragHandlers } = chunkMRSGNERC_js.useSheetDismissDrag(onClose);
|
|
26705
26730
|
const {
|
|
26706
26731
|
animationPanelHeight,
|
|
26707
26732
|
effectiveThemeOptions,
|
|
@@ -26723,7 +26748,7 @@ function InspectorPane(props) {
|
|
|
26723
26748
|
"div",
|
|
26724
26749
|
{
|
|
26725
26750
|
"data-pptx-chrome": "inspector",
|
|
26726
|
-
className:
|
|
26751
|
+
className: chunkMA2BI7LX_js.cn(
|
|
26727
26752
|
// Shared styles
|
|
26728
26753
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
26729
26754
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -27114,7 +27139,7 @@ function PresentationTouchControls({
|
|
|
27114
27139
|
hideNavigation = false
|
|
27115
27140
|
}) {
|
|
27116
27141
|
const { t } = reactI18next.useTranslation();
|
|
27117
|
-
const { isTouchDevice } =
|
|
27142
|
+
const { isTouchDevice } = chunkMRSGNERC_js.useIsMobile();
|
|
27118
27143
|
if (!isTouchDevice) {
|
|
27119
27144
|
return null;
|
|
27120
27145
|
}
|
|
@@ -27419,13 +27444,13 @@ function PrintPreview({
|
|
|
27419
27444
|
}) {
|
|
27420
27445
|
const { t } = reactI18next.useTranslation();
|
|
27421
27446
|
const pages = React106.useMemo(
|
|
27422
|
-
() =>
|
|
27447
|
+
() => chunkMA2BI7LX_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
27423
27448
|
[slideIndices, slidesPerPage, orientation]
|
|
27424
27449
|
);
|
|
27425
|
-
const printable = React106.useMemo(() =>
|
|
27450
|
+
const printable = React106.useMemo(() => chunkMA2BI7LX_js.getPrintableArea(orientation), [orientation]);
|
|
27426
27451
|
const visiblePages = pages.slice(0, maxPages);
|
|
27427
27452
|
const isThreePerPage = slidesPerPage === 3;
|
|
27428
|
-
const noteLineCount =
|
|
27453
|
+
const noteLineCount = chunkMA2BI7LX_js.generateNoteLineCount();
|
|
27429
27454
|
const scaledW = printable.width * PREVIEW_SCALE3;
|
|
27430
27455
|
const scaledH = printable.height * PREVIEW_SCALE3;
|
|
27431
27456
|
const noteAreaFraction = 0.5;
|
|
@@ -27761,11 +27786,11 @@ function PrintDialog({
|
|
|
27761
27786
|
}) {
|
|
27762
27787
|
const { t } = reactI18next.useTranslation();
|
|
27763
27788
|
const regionRenderer = useRegionRenderer("dialog.print");
|
|
27764
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27765
|
-
const { viewportWidth } =
|
|
27789
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onClose);
|
|
27790
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
27766
27791
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27767
27792
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27768
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
27793
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunkMRSGNERC_js.useViewerOptionsContext());
|
|
27769
27794
|
const [printWhat, setPrintWhat] = React106.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
27770
27795
|
const [orientation, setOrientation] = React106.useState("landscape");
|
|
27771
27796
|
const [colorMode, setColorMode] = React106.useState(
|
|
@@ -28282,14 +28307,14 @@ function BroadcastDialog({
|
|
|
28282
28307
|
}) {
|
|
28283
28308
|
const { t } = reactI18next.useTranslation();
|
|
28284
28309
|
const regionRenderer = useRegionRenderer("dialog.broadcast");
|
|
28285
|
-
const collab =
|
|
28310
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
28286
28311
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
28287
28312
|
const [roomId, setRoomId] = React106.useState("");
|
|
28288
28313
|
const [userName, setUserName] = React106.useState("");
|
|
28289
28314
|
const [serverUrl, setServerUrl] = React106.useState("");
|
|
28290
28315
|
const [copied, setCopied] = React106.useState(false);
|
|
28291
28316
|
const dialogRef = React106.useRef(null);
|
|
28292
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28317
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onClose);
|
|
28293
28318
|
useModalFocus(open, dialogRef, onClose);
|
|
28294
28319
|
React106.useEffect(() => {
|
|
28295
28320
|
if (open && !isBroadcasting) {
|
|
@@ -28605,7 +28630,7 @@ function ActiveSessionView({
|
|
|
28605
28630
|
onCopyRoomId,
|
|
28606
28631
|
onStopCollaboration
|
|
28607
28632
|
}) {
|
|
28608
|
-
const { t } = reactI18next.useTranslation(), viewerOptions =
|
|
28633
|
+
const { t } = reactI18next.useTranslation(), viewerOptions = chunkMRSGNERC_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({
|
|
28609
28634
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
28610
28635
|
localUserInitials: viewerOptions.general.userInitials,
|
|
28611
28636
|
localUserColor: collab.config.userColor,
|
|
@@ -28704,7 +28729,7 @@ function StartSessionForm({
|
|
|
28704
28729
|
onRetry
|
|
28705
28730
|
}) {
|
|
28706
28731
|
const { t } = reactI18next.useTranslation();
|
|
28707
|
-
const { viewportWidth } =
|
|
28732
|
+
const { viewportWidth } = chunkMRSGNERC_js.useIsMobile();
|
|
28708
28733
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
28709
28734
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
28710
28735
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -28838,7 +28863,7 @@ function ShareDialog({
|
|
|
28838
28863
|
defaultUserName,
|
|
28839
28864
|
defaultServerUrl
|
|
28840
28865
|
}) {
|
|
28841
|
-
const collab =
|
|
28866
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
28842
28867
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
28843
28868
|
const { t } = reactI18next.useTranslation();
|
|
28844
28869
|
const regionRenderer = useRegionRenderer("dialog.share");
|
|
@@ -28849,9 +28874,9 @@ function ShareDialog({
|
|
|
28849
28874
|
const [invitation, setInvitation] = React106.useState("");
|
|
28850
28875
|
const [copied, setCopied] = React106.useState(false);
|
|
28851
28876
|
const dialogRef = React106.useRef(null);
|
|
28852
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28877
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onClose);
|
|
28853
28878
|
useModalFocus(open, dialogRef, onClose);
|
|
28854
|
-
const { viewportWidth, viewportHeight } =
|
|
28879
|
+
const { viewportWidth, viewportHeight } = chunkMRSGNERC_js.useIsMobile();
|
|
28855
28880
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
28856
28881
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
28857
28882
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -29150,12 +29175,12 @@ function HyperlinkEditDialog({
|
|
|
29150
29175
|
onCancel
|
|
29151
29176
|
}) {
|
|
29152
29177
|
const { t } = reactI18next.useTranslation();
|
|
29153
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29178
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onCancel);
|
|
29154
29179
|
const inputRef = React106.useRef(null);
|
|
29155
|
-
const detectedType =
|
|
29156
|
-
const emailParts =
|
|
29157
|
-
const detectedSlide =
|
|
29158
|
-
const detectedVerb = initialAction ?
|
|
29180
|
+
const detectedType = chunkMRSGNERC_js.detectTargetType(initialUrl, initialAction);
|
|
29181
|
+
const emailParts = chunkMRSGNERC_js.parseEmailUrl(initialUrl || "");
|
|
29182
|
+
const detectedSlide = chunkMRSGNERC_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
29183
|
+
const detectedVerb = initialAction ? chunkMRSGNERC_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
29159
29184
|
const [targetType, setTargetType] = React106.useState(detectedType);
|
|
29160
29185
|
const [url, setUrl] = React106.useState(
|
|
29161
29186
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -29186,7 +29211,7 @@ function HyperlinkEditDialog({
|
|
|
29186
29211
|
actionVerb
|
|
29187
29212
|
});
|
|
29188
29213
|
};
|
|
29189
|
-
const tabCls = (active) =>
|
|
29214
|
+
const tabCls = (active) => chunkMA2BI7LX_js.cn(
|
|
29190
29215
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
29191
29216
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
29192
29217
|
);
|
|
@@ -29432,7 +29457,7 @@ function ViewerBottomPanels({
|
|
|
29432
29457
|
notesStyle,
|
|
29433
29458
|
onNotesHeightChange
|
|
29434
29459
|
}) {
|
|
29435
|
-
const { isHidden } =
|
|
29460
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(hiddenActions);
|
|
29436
29461
|
const customization = useViewerCustomizationContext();
|
|
29437
29462
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
29438
29463
|
const notesRenderer = useRegionRenderer("notes");
|
|
@@ -29822,7 +29847,7 @@ function ViewerToolbarSection(props) {
|
|
|
29822
29847
|
[activeSlide, propertyHandlers]
|
|
29823
29848
|
);
|
|
29824
29849
|
const scopedLayoutOptions = React106__default.default.useMemo(
|
|
29825
|
-
() =>
|
|
29850
|
+
() => chunkMRSGNERC_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
29826
29851
|
[s.layoutOptions, activeSlide]
|
|
29827
29852
|
);
|
|
29828
29853
|
const handleResetSlide = React106.useCallback(() => {
|
|
@@ -30034,7 +30059,7 @@ function ViewerToolbarSection(props) {
|
|
|
30034
30059
|
redoLabel: history.redoLabel,
|
|
30035
30060
|
onUndo: history.handleUndo,
|
|
30036
30061
|
onRedo: history.handleRedo,
|
|
30037
|
-
onSave: exportHandlers.
|
|
30062
|
+
onSave: exportHandlers.handleSave,
|
|
30038
30063
|
findReplaceOpen: findReplace.findReplaceOpen,
|
|
30039
30064
|
onToggleFindReplace: () => findReplace.setFindReplaceOpen(!findReplace.findReplaceOpen),
|
|
30040
30065
|
onCommandSearch: handleCommandSearch,
|
|
@@ -30157,6 +30182,7 @@ function ViewerToolbarSection(props) {
|
|
|
30157
30182
|
s.setIsDirty(true);
|
|
30158
30183
|
},
|
|
30159
30184
|
onOpenShareDialog,
|
|
30185
|
+
onSave: exportHandlers.handleSave,
|
|
30160
30186
|
onSaveAsPptx: exportHandlers.handleSaveAsPptx,
|
|
30161
30187
|
onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
|
|
30162
30188
|
onSaveAsPptm: exportHandlers.handleSaveAsPptm,
|
|
@@ -30227,14 +30253,14 @@ function ViewerToolbarSection(props) {
|
|
|
30227
30253
|
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
30228
30254
|
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
30229
30255
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
30230
|
-
reviewComments:
|
|
30256
|
+
reviewComments: chunkMRSGNERC_js.createReviewCommentsHost({
|
|
30231
30257
|
state: s,
|
|
30232
30258
|
activeSlideIndex,
|
|
30233
30259
|
updateSlides: ops.updateSlides,
|
|
30234
30260
|
markDirty: history.markDirty
|
|
30235
30261
|
}),
|
|
30236
30262
|
formatPainterActive: s.formatPainterActive,
|
|
30237
|
-
canActivateFormatPainter:
|
|
30263
|
+
canActivateFormatPainter: chunkMA2BI7LX_js.hasCopyableFormat(selectedElement),
|
|
30238
30264
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
30239
30265
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
30240
30266
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -30292,7 +30318,7 @@ function ViewerToolbarSection(props) {
|
|
|
30292
30318
|
] });
|
|
30293
30319
|
}
|
|
30294
30320
|
var TEMPLATES = pptx.EQUATION_TEMPLATES;
|
|
30295
|
-
var TEMPLATE_MATHML = pptx.compileEquationTemplateMathMl();
|
|
30321
|
+
var TEMPLATE_MATHML = /* @__PURE__ */ pptx.compileEquationTemplateMathMl();
|
|
30296
30322
|
function MathMlPreview({ mathml }) {
|
|
30297
30323
|
const containerRef = React106.useRef(null);
|
|
30298
30324
|
React106.useEffect(() => {
|
|
@@ -30321,7 +30347,7 @@ function EquationEditorDialog({
|
|
|
30321
30347
|
existingOmml
|
|
30322
30348
|
}) {
|
|
30323
30349
|
const { t } = reactI18next.useTranslation();
|
|
30324
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
30350
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onClose);
|
|
30325
30351
|
const initialLatex = React106.useMemo(() => {
|
|
30326
30352
|
if (!existingOmml) {
|
|
30327
30353
|
return "";
|
|
@@ -30443,7 +30469,7 @@ function EquationEditorDialog({
|
|
|
30443
30469
|
{
|
|
30444
30470
|
type: "button",
|
|
30445
30471
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
30446
|
-
className:
|
|
30472
|
+
className: chunkMA2BI7LX_js.cn(
|
|
30447
30473
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
30448
30474
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
30449
30475
|
),
|
|
@@ -30509,7 +30535,7 @@ function getPreviewForLayout(layout) {
|
|
|
30509
30535
|
transform: `scale(${scale})`,
|
|
30510
30536
|
transformOrigin: "top left"
|
|
30511
30537
|
},
|
|
30512
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30538
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.SmartArtRenderer, { element: pptx.buildSmartArtPreviewElement(layout) })
|
|
30513
30539
|
}
|
|
30514
30540
|
)
|
|
30515
30541
|
}
|
|
@@ -30521,7 +30547,7 @@ function InsertSmartArtDialog({
|
|
|
30521
30547
|
onInsert
|
|
30522
30548
|
}) {
|
|
30523
30549
|
const { t } = reactI18next.useTranslation();
|
|
30524
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
30550
|
+
const { panelStyle, handlers: dragHandlers } = chunkMRSGNERC_js.useModalDismissDrag(onClose);
|
|
30525
30551
|
const [activeCategory, setActiveCategory] = React106.useState("list");
|
|
30526
30552
|
const [selectedLayout, setSelectedLayout] = React106.useState(null);
|
|
30527
30553
|
const dialogRef = React106.useRef(null);
|
|
@@ -30602,7 +30628,7 @@ function InsertSmartArtDialog({
|
|
|
30602
30628
|
setActiveCategory(cat.id);
|
|
30603
30629
|
setSelectedLayout(null);
|
|
30604
30630
|
},
|
|
30605
|
-
className:
|
|
30631
|
+
className: chunkMA2BI7LX_js.cn(
|
|
30606
30632
|
"w-full text-left px-3 py-1.5 text-xs transition-colors",
|
|
30607
30633
|
activeCategory === cat.id ? "bg-primary text-white" : "text-foreground hover:bg-muted"
|
|
30608
30634
|
),
|
|
@@ -30630,7 +30656,7 @@ function InsertSmartArtDialog({
|
|
|
30630
30656
|
onInsert(preset.layout, preset.defaultItems);
|
|
30631
30657
|
onClose();
|
|
30632
30658
|
},
|
|
30633
|
-
className:
|
|
30659
|
+
className: chunkMA2BI7LX_js.cn(
|
|
30634
30660
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
30635
30661
|
selectedLayout === preset.layout ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
30636
30662
|
),
|
|
@@ -31128,11 +31154,11 @@ function PresentationStage({
|
|
|
31128
31154
|
})
|
|
31129
31155
|
},
|
|
31130
31156
|
children: [
|
|
31131
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31157
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
31132
31158
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
31133
31159
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
31134
31160
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
31135
|
-
|
|
31161
|
+
chunkMRSGNERC_js.ElementRenderer,
|
|
31136
31162
|
{
|
|
31137
31163
|
element,
|
|
31138
31164
|
activeSlide,
|
|
@@ -31169,7 +31195,7 @@ function PresentationStage({
|
|
|
31169
31195
|
`tpl-${element.id}`
|
|
31170
31196
|
)),
|
|
31171
31197
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
31172
|
-
|
|
31198
|
+
chunkMRSGNERC_js.ElementRenderer,
|
|
31173
31199
|
{
|
|
31174
31200
|
element,
|
|
31175
31201
|
activeSlide,
|
|
@@ -31291,8 +31317,8 @@ function ViewerCanvasArea(props) {
|
|
|
31291
31317
|
aiCanvasActive = false
|
|
31292
31318
|
} = props;
|
|
31293
31319
|
const { t } = reactI18next.useTranslation();
|
|
31294
|
-
const { isHidden } =
|
|
31295
|
-
const viewerOptions =
|
|
31320
|
+
const { isHidden } = chunkMRSGNERC_js.useToolbarVisibility(hiddenActions);
|
|
31321
|
+
const viewerOptions = chunkMRSGNERC_js.useViewerOptionsContext();
|
|
31296
31322
|
const outlineAuthoring = useOutlineAuthoring({
|
|
31297
31323
|
state: s,
|
|
31298
31324
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -31322,7 +31348,7 @@ function ViewerCanvasArea(props) {
|
|
|
31322
31348
|
${url}`)) {
|
|
31323
31349
|
return;
|
|
31324
31350
|
}
|
|
31325
|
-
|
|
31351
|
+
chunkMA2BI7LX_js.safeOpenUrl(url);
|
|
31326
31352
|
},
|
|
31327
31353
|
[viewerOptions, t]
|
|
31328
31354
|
);
|
|
@@ -31343,9 +31369,9 @@ ${url}`)) {
|
|
|
31343
31369
|
);
|
|
31344
31370
|
const handleHyperlinkClick = React106.useCallback(
|
|
31345
31371
|
(url) => {
|
|
31346
|
-
if (
|
|
31372
|
+
if (chunkMA2BI7LX_js.isPpactionUrl(url)) {
|
|
31347
31373
|
if (mode === "present") {
|
|
31348
|
-
const parsed =
|
|
31374
|
+
const parsed = chunkMA2BI7LX_js.parsePpactionUrl(url);
|
|
31349
31375
|
if (parsed) {
|
|
31350
31376
|
const action = {
|
|
31351
31377
|
action: parsed.action,
|
|
@@ -31430,7 +31456,7 @@ ${url}`)) {
|
|
|
31430
31456
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
31431
31457
|
}
|
|
31432
31458
|
}, [mode, presentation, s]);
|
|
31433
|
-
const swipe =
|
|
31459
|
+
const swipe = chunkMRSGNERC_js.useSwipeNavigation({
|
|
31434
31460
|
enabled: swipeEnabled,
|
|
31435
31461
|
onNext: handleSwipeNext,
|
|
31436
31462
|
onPrev: handleSwipePrev
|
|
@@ -31510,7 +31536,7 @@ ${url}`)) {
|
|
|
31510
31536
|
),
|
|
31511
31537
|
children: (stageScale) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31512
31538
|
presentation.transitionOverlay && slides[presentation.transitionOverlay.outgoingSlideIndex] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31513
|
-
|
|
31539
|
+
chunkMRSGNERC_js.PresentationTransitionOverlay,
|
|
31514
31540
|
{
|
|
31515
31541
|
outgoingSlide: slides[presentation.transitionOverlay.outgoingSlideIndex],
|
|
31516
31542
|
templateElements,
|
|
@@ -31621,14 +31647,14 @@ ${url}`)) {
|
|
|
31621
31647
|
outlineAuthoring,
|
|
31622
31648
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31623
31649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31624
|
-
|
|
31650
|
+
chunkMRSGNERC_js.RemoteSelectionOverlay,
|
|
31625
31651
|
{
|
|
31626
31652
|
elements: effectiveSlide?.elements ?? [],
|
|
31627
31653
|
activeSlideIndex
|
|
31628
31654
|
}
|
|
31629
31655
|
),
|
|
31630
31656
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31631
|
-
|
|
31657
|
+
chunkMRSGNERC_js.CollaborationCursorOverlay,
|
|
31632
31658
|
{
|
|
31633
31659
|
activeSlideIndex,
|
|
31634
31660
|
canvasWidth: canvasSize.width,
|
|
@@ -31765,10 +31791,10 @@ function useTableStyleMapHandlers(input) {
|
|
|
31765
31791
|
};
|
|
31766
31792
|
return { handleTableStyleMapChange, handleDeleteTableStyle };
|
|
31767
31793
|
}
|
|
31768
|
-
var AiChatPanel = React106.lazy(async () => {
|
|
31794
|
+
var AiChatPanel = /* @__PURE__ */ React106.lazy(async () => {
|
|
31769
31795
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
31770
31796
|
import('@ai-sdk/react'),
|
|
31771
|
-
import('./AiChatPanel-
|
|
31797
|
+
import('./AiChatPanel-IEM43TTZ.js')
|
|
31772
31798
|
]);
|
|
31773
31799
|
function BoundAiChatPanel(props) {
|
|
31774
31800
|
return /* @__PURE__ */ jsxRuntime.jsx(Panel, { ...props, useChat });
|
|
@@ -31892,7 +31918,7 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
31892
31918
|
}
|
|
31893
31919
|
function ChartFormatPanel() {
|
|
31894
31920
|
const { t } = reactI18next.useTranslation();
|
|
31895
|
-
const commands =
|
|
31921
|
+
const commands = chunkMRSGNERC_js.useChartFormatContext();
|
|
31896
31922
|
const ref = React106.useRef(null);
|
|
31897
31923
|
const chart = commands?.chart;
|
|
31898
31924
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
@@ -31965,7 +31991,7 @@ function MobileDismissSheet({
|
|
|
31965
31991
|
children
|
|
31966
31992
|
}) {
|
|
31967
31993
|
const { t } = reactI18next.useTranslation();
|
|
31968
|
-
const { dragY, handlers } =
|
|
31994
|
+
const { dragY, handlers } = chunkMRSGNERC_js.useSheetDismissDrag(onClose);
|
|
31969
31995
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31970
31996
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31971
31997
|
"button",
|
|
@@ -32234,7 +32260,7 @@ function ThemeThumbnail({
|
|
|
32234
32260
|
{
|
|
32235
32261
|
type: "button",
|
|
32236
32262
|
onClick,
|
|
32237
|
-
className:
|
|
32263
|
+
className: chunkMA2BI7LX_js.cn(
|
|
32238
32264
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
32239
32265
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
32240
32266
|
),
|
|
@@ -32420,7 +32446,7 @@ function ViewerSidePanels(props) {
|
|
|
32420
32446
|
const customization = useViewerCustomizationContext();
|
|
32421
32447
|
const inspectorOpen = (mode === "edit" || mode === "master") && s.isInspectorPaneOpen && pptx.isPanelVisible(customization, "inspector");
|
|
32422
32448
|
const currentBuiltInTheme = BUILT_IN_THEMES.find(
|
|
32423
|
-
(candidate) =>
|
|
32449
|
+
(candidate) => pptx$1.themeColorSchemesEqual(s.theme?.colorScheme, candidate.colorScheme)
|
|
32424
32450
|
) ?? null;
|
|
32425
32451
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32426
32452
|
inspectorOpen && onResizeRight && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { direction: "horizontal", onResize: onResizeRight }),
|
|
@@ -32705,7 +32731,7 @@ function ViewerMainContent(props) {
|
|
|
32705
32731
|
);
|
|
32706
32732
|
const layoutGalleryAnchorRef = React106.useRef(null);
|
|
32707
32733
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
32708
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32734
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
32709
32735
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32710
32736
|
slidesPaneRenderer ? (
|
|
32711
32737
|
// The rail's slot (width, collapse, resize handle) stays the viewer's.
|
|
@@ -33210,7 +33236,7 @@ function MobileChromeOverlay(props) {
|
|
|
33210
33236
|
slideSectionGroups,
|
|
33211
33237
|
canEdit,
|
|
33212
33238
|
commentCount
|
|
33213
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
33239
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunkMRSGNERC_js.useKeyboardInsets(), activeSheet = s.isMobileInsertOpen ? "insert" : s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
33214
33240
|
s.setIsSlidesPaneOpen(false);
|
|
33215
33241
|
s.setIsMobileInsertOpen(false);
|
|
33216
33242
|
s.setIsInspectorPaneOpen(false);
|
|
@@ -33418,7 +33444,7 @@ function AddinTable({
|
|
|
33418
33444
|
"tr",
|
|
33419
33445
|
{
|
|
33420
33446
|
onClick: () => onSelect(row.id),
|
|
33421
|
-
className:
|
|
33447
|
+
className: chunkMA2BI7LX_js.cn(
|
|
33422
33448
|
"cursor-pointer border-b border-border/40 transition-colors",
|
|
33423
33449
|
selectedId === row.id ? "bg-primary/10" : "hover:bg-accent"
|
|
33424
33450
|
),
|
|
@@ -33497,7 +33523,7 @@ function CommandList({
|
|
|
33497
33523
|
role: "option",
|
|
33498
33524
|
"aria-selected": selectedId === id,
|
|
33499
33525
|
onClick: () => onSelect(id),
|
|
33500
|
-
className:
|
|
33526
|
+
className: chunkMA2BI7LX_js.cn(
|
|
33501
33527
|
"flex w-full items-center rounded px-2 py-1.5 text-left text-sm transition-colors",
|
|
33502
33528
|
selectedId === id ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent"
|
|
33503
33529
|
),
|
|
@@ -33641,7 +33667,7 @@ function OptionsRibbonPane({
|
|
|
33641
33667
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33642
33668
|
"label",
|
|
33643
33669
|
{
|
|
33644
|
-
className:
|
|
33670
|
+
className: chunkMA2BI7LX_js.cn(
|
|
33645
33671
|
"flex items-center gap-2 rounded px-2 py-1.5",
|
|
33646
33672
|
isFile ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-accent"
|
|
33647
33673
|
),
|
|
@@ -33675,7 +33701,7 @@ function OptionsRibbonPane({
|
|
|
33675
33701
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: pptx.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33676
33702
|
"div",
|
|
33677
33703
|
{
|
|
33678
|
-
className:
|
|
33704
|
+
className: chunkMA2BI7LX_js.cn(
|
|
33679
33705
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
33680
33706
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
33681
33707
|
),
|
|
@@ -33696,7 +33722,7 @@ async function exportAiChatLogs(options) {
|
|
|
33696
33722
|
chats,
|
|
33697
33723
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
33698
33724
|
(filename, content, mime) => {
|
|
33699
|
-
|
|
33725
|
+
chunkMRSGNERC_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
33700
33726
|
}
|
|
33701
33727
|
);
|
|
33702
33728
|
}
|
|
@@ -33804,7 +33830,7 @@ function SettingsAppearanceTab({
|
|
|
33804
33830
|
type: "button",
|
|
33805
33831
|
onClick: () => onSelectTheme(entry.key),
|
|
33806
33832
|
"aria-pressed": isActive,
|
|
33807
|
-
className:
|
|
33833
|
+
className: chunkMA2BI7LX_js.cn(
|
|
33808
33834
|
"flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
|
|
33809
33835
|
isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
|
|
33810
33836
|
),
|
|
@@ -33821,7 +33847,7 @@ function SettingsAppearanceTab({
|
|
|
33821
33847
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33822
33848
|
"span",
|
|
33823
33849
|
{
|
|
33824
|
-
className:
|
|
33850
|
+
className: chunkMA2BI7LX_js.cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
|
|
33825
33851
|
children: t(entry.labelKey)
|
|
33826
33852
|
}
|
|
33827
33853
|
)
|
|
@@ -33901,7 +33927,7 @@ function SettingsLanguageTab({
|
|
|
33901
33927
|
type: "button",
|
|
33902
33928
|
onClick: () => onSelectLocale(locale.code),
|
|
33903
33929
|
"aria-pressed": isActive,
|
|
33904
|
-
className:
|
|
33930
|
+
className: chunkMA2BI7LX_js.cn(
|
|
33905
33931
|
"flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
|
|
33906
33932
|
isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
|
|
33907
33933
|
),
|
|
@@ -34038,7 +34064,7 @@ function ViewerOptionsProvider({
|
|
|
34038
34064
|
store,
|
|
34039
34065
|
children
|
|
34040
34066
|
}) {
|
|
34041
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34067
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
34042
34068
|
}
|
|
34043
34069
|
function useAiBridge(input) {
|
|
34044
34070
|
const ref = React106.useRef(input);
|
|
@@ -34304,6 +34330,7 @@ function useCollaborationStateReport(collab, onChange) {
|
|
|
34304
34330
|
const clientId = collab?.clientId;
|
|
34305
34331
|
const remoteUsers = collab?.remoteUsers;
|
|
34306
34332
|
const config = collab?.config;
|
|
34333
|
+
const writeBack = collab?.writeBack;
|
|
34307
34334
|
React106.useEffect(() => {
|
|
34308
34335
|
reporter.update(
|
|
34309
34336
|
pptx.buildCollaborationState({
|
|
@@ -34314,35 +34341,27 @@ function useCollaborationStateReport(collab, onChange) {
|
|
|
34314
34341
|
clientId,
|
|
34315
34342
|
userName: config?.userName,
|
|
34316
34343
|
userColor: config?.userColor,
|
|
34317
|
-
remoteUsers: remoteUsers ?? []
|
|
34344
|
+
remoteUsers: remoteUsers ?? [],
|
|
34345
|
+
writeBack: pptx.writeBackReport(config, writeBack)
|
|
34318
34346
|
})
|
|
34319
34347
|
);
|
|
34320
|
-
}, [reporter, status, synced, clientId, remoteUsers, config]);
|
|
34348
|
+
}, [reporter, status, synced, clientId, remoteUsers, config, writeBack]);
|
|
34321
34349
|
}
|
|
34322
|
-
function
|
|
34323
|
-
void (
|
|
34324
|
-
|
|
34325
|
-
const snapshots = await pptx.listAutosaveSnapshots();
|
|
34326
|
-
await Promise.all(snapshots.map((entry) => pptx.deleteAutosaveSnapshot(entry.key)));
|
|
34327
|
-
} catch {
|
|
34328
|
-
}
|
|
34329
|
-
})();
|
|
34350
|
+
function clearOptionsCache(storage) {
|
|
34351
|
+
void pptx.clearAutosaveSnapshots(storage).catch(() => {
|
|
34352
|
+
});
|
|
34330
34353
|
}
|
|
34331
|
-
function useAutosaveCacheMaintenance(viewerOptions) {
|
|
34354
|
+
function useAutosaveCacheMaintenance(viewerOptions, storage) {
|
|
34355
|
+
const storageRef = React106.useRef(storage);
|
|
34356
|
+
storageRef.current = storage;
|
|
34332
34357
|
React106.useEffect(() => {
|
|
34333
|
-
void (
|
|
34334
|
-
|
|
34335
|
-
const snapshots = await pptx.listAutosaveSnapshots();
|
|
34336
|
-
const expired = pptx.resolveExpiredAutosaveSnapshots(snapshots, viewerOptions);
|
|
34337
|
-
await Promise.all(expired.map((key) => pptx.deleteAutosaveSnapshot(key)));
|
|
34338
|
-
} catch {
|
|
34339
|
-
}
|
|
34340
|
-
})();
|
|
34358
|
+
void pptx.pruneExpiredAutosaveSnapshots(viewerOptions, storageRef.current).catch(() => {
|
|
34359
|
+
});
|
|
34341
34360
|
}, []);
|
|
34342
34361
|
React106.useEffect(() => {
|
|
34343
34362
|
const clearIfRequested = () => {
|
|
34344
34363
|
if (pptx.shouldClearAutosaveCacheOnClose(viewerOptions)) {
|
|
34345
|
-
|
|
34364
|
+
clearOptionsCache(storageRef.current);
|
|
34346
34365
|
}
|
|
34347
34366
|
};
|
|
34348
34367
|
window.addEventListener("beforeunload", clearIfRequested);
|
|
@@ -34351,8 +34370,10 @@ function useAutosaveCacheMaintenance(viewerOptions) {
|
|
|
34351
34370
|
clearIfRequested();
|
|
34352
34371
|
};
|
|
34353
34372
|
}, [viewerOptions]);
|
|
34354
|
-
|
|
34373
|
+
const clearHostCache = React106.useCallback(() => clearOptionsCache(storageRef.current), []);
|
|
34374
|
+
return storage ? clearHostCache : clearBrowserCache;
|
|
34355
34375
|
}
|
|
34376
|
+
var clearBrowserCache = () => clearOptionsCache(void 0);
|
|
34356
34377
|
function useChartFormatCommands(input) {
|
|
34357
34378
|
const { selectedElement, editable, updateElementById } = input;
|
|
34358
34379
|
const chart = selectedElement?.type === "chart" ? selectedElement : null;
|
|
@@ -34509,7 +34530,7 @@ function useMasterViewCrud(input) {
|
|
|
34509
34530
|
if (id === "renameLayout" || id === "renameMaster") {
|
|
34510
34531
|
const master = slideMasters[target.masterIndex];
|
|
34511
34532
|
const current = id === "renameLayout" ? master?.layouts?.[target.layoutIndex ?? -1]?.name ?? "" : master?.name ?? "";
|
|
34512
|
-
const next =
|
|
34533
|
+
const next = chunkMRSGNERC_js.safePrompt(t("pptx.masterView.renamePrompt"), current)?.trim();
|
|
34513
34534
|
if (!next) {
|
|
34514
34535
|
return;
|
|
34515
34536
|
}
|
|
@@ -34864,17 +34885,19 @@ function useViewerCustomization(customization, legacyHiddenActions, optionsStore
|
|
|
34864
34885
|
return { resolved, api: controller.api, hiddenActions };
|
|
34865
34886
|
}
|
|
34866
34887
|
var NO_RIBBON_ADD_INS = [];
|
|
34867
|
-
var
|
|
34888
|
+
var PowerPointViewerComponent = /* @__PURE__ */ React106.forwardRef(
|
|
34868
34889
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the forwardRef component its displayName
|
|
34869
|
-
function
|
|
34890
|
+
function PowerPointViewer(props, ref) {
|
|
34870
34891
|
const {
|
|
34871
34892
|
content: incomingContent,
|
|
34872
34893
|
fonts = [],
|
|
34873
34894
|
filePath,
|
|
34874
34895
|
fileName,
|
|
34875
|
-
canEdit:
|
|
34896
|
+
canEdit: canEditProp = false,
|
|
34897
|
+
readOnly = false,
|
|
34876
34898
|
autosave: hostAutosave,
|
|
34877
34899
|
autosaveIntervalMs: hostAutosaveIntervalMs,
|
|
34900
|
+
storage,
|
|
34878
34901
|
onContentChange,
|
|
34879
34902
|
onDirtyChange,
|
|
34880
34903
|
onActiveSlideChange,
|
|
@@ -34898,6 +34921,15 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
34898
34921
|
onStartCollaboration,
|
|
34899
34922
|
onStopCollaboration,
|
|
34900
34923
|
onCollaborationChange,
|
|
34924
|
+
onCollaborationStatus,
|
|
34925
|
+
onAutosave,
|
|
34926
|
+
onAutosaveToggle,
|
|
34927
|
+
onAutosaveStatus,
|
|
34928
|
+
onAutosaveRecovery,
|
|
34929
|
+
onChange,
|
|
34930
|
+
onPropertiesChange,
|
|
34931
|
+
onNotesUpdate,
|
|
34932
|
+
onPresentationChange,
|
|
34901
34933
|
shareDefaults,
|
|
34902
34934
|
smartArt3D = false,
|
|
34903
34935
|
surfaceChart3D = false,
|
|
@@ -34911,6 +34943,7 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
34911
34943
|
customization,
|
|
34912
34944
|
initialSlide
|
|
34913
34945
|
} = props;
|
|
34946
|
+
const hostCanEdit = canEditProp && !readOnly;
|
|
34914
34947
|
const collaboration = pptx.resolveCollaborationConfig(collaborationInput);
|
|
34915
34948
|
const rootOptions = pptx.resolveViewerRootOptions(props);
|
|
34916
34949
|
React106.useEffect(() => {
|
|
@@ -35000,16 +35033,19 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35000
35033
|
}
|
|
35001
35034
|
})();
|
|
35002
35035
|
}, [hostOpenFile]);
|
|
35003
|
-
const handleOpenRecentFile = React106.useCallback(
|
|
35004
|
-
|
|
35005
|
-
|
|
35006
|
-
|
|
35007
|
-
|
|
35008
|
-
|
|
35009
|
-
|
|
35010
|
-
|
|
35011
|
-
|
|
35012
|
-
|
|
35036
|
+
const handleOpenRecentFile = React106.useCallback(
|
|
35037
|
+
(key) => {
|
|
35038
|
+
void (async () => {
|
|
35039
|
+
const bytes = await pptx.readBackstageRecentFile(key, storage);
|
|
35040
|
+
if (bytes) {
|
|
35041
|
+
setLoadOrigin("user");
|
|
35042
|
+
setContent(bytes);
|
|
35043
|
+
}
|
|
35044
|
+
})();
|
|
35045
|
+
},
|
|
35046
|
+
[storage]
|
|
35047
|
+
);
|
|
35048
|
+
const { optionsStore, options: viewerOptions } = chunkMRSGNERC_js.useViewerOptions();
|
|
35013
35049
|
const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
|
|
35014
35050
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
35015
35051
|
const aiEnabled = Boolean(ai) && pptx.isFeatureEnabled(customizationResolved, "ai");
|
|
@@ -35023,8 +35059,8 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35023
35059
|
const handleEnableEditing = React106.useCallback(() => {
|
|
35024
35060
|
setProtectedViewOverridden(true);
|
|
35025
35061
|
}, []);
|
|
35026
|
-
const readOnlyRec =
|
|
35027
|
-
const compatToastsState =
|
|
35062
|
+
const readOnlyRec = chunkMRSGNERC_js.useReadOnlyRecommendationState(content);
|
|
35063
|
+
const compatToastsState = chunkMRSGNERC_js.useCompatibilityToastsState();
|
|
35028
35064
|
const [notesBarHeight, setNotesBarHeight] = React106.useState(0);
|
|
35029
35065
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
35030
35066
|
const [collaborationReadOnly, setCollaborationReadOnly] = React106.useState(Boolean(collaboration));
|
|
@@ -35032,6 +35068,14 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35032
35068
|
const [isSettingsOpen, setIsSettingsOpen] = React106.useState(false);
|
|
35033
35069
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = React106.useState(false);
|
|
35034
35070
|
const [autosaveEnabled, setAutosaveEnabled] = React106.useState(true);
|
|
35071
|
+
const autosaveToggleCallback = React106.useRef(onAutosaveToggle);
|
|
35072
|
+
React106.useEffect(() => {
|
|
35073
|
+
autosaveToggleCallback.current = onAutosaveToggle;
|
|
35074
|
+
}, [onAutosaveToggle]);
|
|
35075
|
+
const autosaveEnabledRef = React106.useRef(autosaveEnabled);
|
|
35076
|
+
React106.useEffect(() => {
|
|
35077
|
+
autosaveEnabledRef.current = autosaveEnabled;
|
|
35078
|
+
}, [autosaveEnabled]);
|
|
35035
35079
|
const autosaveActivation = pptx.resolveAutosaveActivation({
|
|
35036
35080
|
hostAutosave,
|
|
35037
35081
|
userEnabled: autosaveEnabled,
|
|
@@ -35039,8 +35083,8 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35039
35083
|
filePath
|
|
35040
35084
|
});
|
|
35041
35085
|
const [isShareDialogOpen, setIsShareDialogOpen] = React106.useState(false);
|
|
35042
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
35043
|
-
const state =
|
|
35086
|
+
const { reducedMotion, toggleReducedMotion } = chunkMRSGNERC_js.useReducedMotion();
|
|
35087
|
+
const state = chunkMRSGNERC_js.useViewerState({
|
|
35044
35088
|
content,
|
|
35045
35089
|
canEdit,
|
|
35046
35090
|
inspectorInitiallyOpen: props.inspectorInitiallyOpen
|
|
@@ -35077,7 +35121,7 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35077
35121
|
[state.recentColors, pushColor]
|
|
35078
35122
|
);
|
|
35079
35123
|
const themeColorMapValue = React106.useMemo(
|
|
35080
|
-
() => state.theme?.colorScheme ?
|
|
35124
|
+
() => state.theme?.colorScheme ? pptx$1.buildThemeColorMap(state.theme.colorScheme) : void 0,
|
|
35081
35125
|
[state.theme?.colorScheme]
|
|
35082
35126
|
);
|
|
35083
35127
|
const settings = React106.useMemo(
|
|
@@ -35103,6 +35147,9 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35103
35147
|
switch (key) {
|
|
35104
35148
|
case "autoSave":
|
|
35105
35149
|
setAutosaveEnabled(value);
|
|
35150
|
+
if (value !== autosaveEnabledRef.current) {
|
|
35151
|
+
autosaveToggleCallback.current?.(value);
|
|
35152
|
+
}
|
|
35106
35153
|
break;
|
|
35107
35154
|
case "spellCheck":
|
|
35108
35155
|
state.setSpellCheckEnabled(value);
|
|
@@ -35163,17 +35210,17 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35163
35210
|
optionsStore.setOptions(next);
|
|
35164
35211
|
}
|
|
35165
35212
|
}, [settings, optionsStore]);
|
|
35166
|
-
const
|
|
35167
|
-
const mobile =
|
|
35213
|
+
const handleClearOptionsCache = useAutosaveCacheMaintenance(viewerOptions, storage);
|
|
35214
|
+
const mobile = chunkMRSGNERC_js.useIsMobile();
|
|
35168
35215
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
35169
|
-
const resizablePanels =
|
|
35216
|
+
const resizablePanels = chunkMRSGNERC_js.useResizablePanels();
|
|
35170
35217
|
const {
|
|
35171
35218
|
gridSpacingPx,
|
|
35172
35219
|
visibleSlideIndexes,
|
|
35173
35220
|
slideSectionGroups,
|
|
35174
35221
|
masterPseudoSlide,
|
|
35175
35222
|
authoredRange
|
|
35176
|
-
} =
|
|
35223
|
+
} = chunkMRSGNERC_js.useDerivedSlideState({
|
|
35177
35224
|
slides,
|
|
35178
35225
|
sections: state.sections,
|
|
35179
35226
|
customShows: state.customShows,
|
|
@@ -35198,17 +35245,22 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35198
35245
|
state.cropSessionRef
|
|
35199
35246
|
]
|
|
35200
35247
|
);
|
|
35201
|
-
const zoom =
|
|
35248
|
+
const zoom = chunkMRSGNERC_js.useZoomViewport({
|
|
35202
35249
|
canvasSize,
|
|
35203
35250
|
selectedElements: state.selectedElements,
|
|
35204
35251
|
fitPadding: props.fitPadding,
|
|
35205
35252
|
maxFitScale: props.maxFitScale
|
|
35206
35253
|
});
|
|
35207
35254
|
const { setIsDirty } = state;
|
|
35255
|
+
const onChangeCallback = React106.useRef(onChange);
|
|
35256
|
+
React106.useEffect(() => {
|
|
35257
|
+
onChangeCallback.current = onChange;
|
|
35258
|
+
}, [onChange]);
|
|
35208
35259
|
const markDocumentDirty = React106.useCallback(() => {
|
|
35209
35260
|
setIsDirty(true);
|
|
35261
|
+
onChangeCallback.current?.();
|
|
35210
35262
|
}, [setIsDirty]);
|
|
35211
|
-
const history =
|
|
35263
|
+
const history = chunkMRSGNERC_js.useEditorHistory({
|
|
35212
35264
|
slides,
|
|
35213
35265
|
canvasSize,
|
|
35214
35266
|
activeSlideIndex,
|
|
@@ -35234,7 +35286,7 @@ var PowerPointViewer = React106.forwardRef(
|
|
|
35234
35286
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
35235
35287
|
setHeaderFooter: state.setHeaderFooter
|
|
35236
35288
|
});
|
|
35237
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
35289
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunkMRSGNERC_js.usePresentationSetup({
|
|
35238
35290
|
mode,
|
|
35239
35291
|
slides,
|
|
35240
35292
|
visibleSlideIndexes,
|
|
@@ -35309,7 +35361,7 @@ ${url}`)
|
|
|
35309
35361
|
loading,
|
|
35310
35362
|
error
|
|
35311
35363
|
]);
|
|
35312
|
-
|
|
35364
|
+
chunkMRSGNERC_js.useTouchGestures({
|
|
35313
35365
|
targetRef: zoom.canvasViewportRef,
|
|
35314
35366
|
currentScale: zoom.scale,
|
|
35315
35367
|
callbacks: {
|
|
@@ -35331,7 +35383,7 @@ ${url}`)
|
|
|
35331
35383
|
},
|
|
35332
35384
|
enabled: isTouchDevice
|
|
35333
35385
|
});
|
|
35334
|
-
const dialogs =
|
|
35386
|
+
const dialogs = chunkMRSGNERC_js.useViewerDialogs({
|
|
35335
35387
|
mode,
|
|
35336
35388
|
slides,
|
|
35337
35389
|
activeSlide,
|
|
@@ -35380,7 +35432,7 @@ ${url}`)
|
|
|
35380
35432
|
zoom.handleZoomToFit();
|
|
35381
35433
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
35382
35434
|
}, [mode]);
|
|
35383
|
-
const editorOps =
|
|
35435
|
+
const editorOps = chunkMRSGNERC_js.useEditorOperations({
|
|
35384
35436
|
state,
|
|
35385
35437
|
history,
|
|
35386
35438
|
zoom,
|
|
@@ -35423,7 +35475,7 @@ ${url}`)
|
|
|
35423
35475
|
handlerRef,
|
|
35424
35476
|
viewerApi,
|
|
35425
35477
|
loadVersion
|
|
35426
|
-
} =
|
|
35478
|
+
} = chunkMRSGNERC_js.useViewerIntegration({
|
|
35427
35479
|
transformCommittedText: (text) => pptx.applyAutoCorrect(text, viewerOptions.proofing),
|
|
35428
35480
|
state,
|
|
35429
35481
|
zoom,
|
|
@@ -35437,6 +35489,12 @@ ${url}`)
|
|
|
35437
35489
|
content,
|
|
35438
35490
|
filePath,
|
|
35439
35491
|
fileName,
|
|
35492
|
+
storage,
|
|
35493
|
+
// A failed Save / Save As: the host's `onError`, and the save-failed notice for the user.
|
|
35494
|
+
onSaveError: (saveError) => {
|
|
35495
|
+
onError?.(pptx.saveFailureMessage(saveError));
|
|
35496
|
+
compatToastsState.setToasts(pptx.withSaveFailureToast);
|
|
35497
|
+
},
|
|
35440
35498
|
autosaveEnabled: autosaveActivation.active,
|
|
35441
35499
|
autosaveAllowed: hostAutosave !== false,
|
|
35442
35500
|
// Host prop first (an explicit policy), else File > Options > Save >
|
|
@@ -35483,6 +35541,12 @@ ${url}`)
|
|
|
35483
35541
|
onZoomChange,
|
|
35484
35542
|
onSelectionChange,
|
|
35485
35543
|
onSlideCountChange,
|
|
35544
|
+
onAutosave,
|
|
35545
|
+
onAutosaveStatus,
|
|
35546
|
+
onAutosaveRecovery,
|
|
35547
|
+
onPropertiesChange,
|
|
35548
|
+
onNotesUpdate,
|
|
35549
|
+
onPresentationChange,
|
|
35486
35550
|
customizationApi: custom.api,
|
|
35487
35551
|
customization: customizationResolved
|
|
35488
35552
|
});
|
|
@@ -35550,7 +35614,7 @@ ${url}`)
|
|
|
35550
35614
|
updateElementById: editorOps.ops.updateElementById
|
|
35551
35615
|
});
|
|
35552
35616
|
const ribbonScope = useRibbonScopeToken();
|
|
35553
|
-
const viewPreferencesSync =
|
|
35617
|
+
const viewPreferencesSync = chunkMRSGNERC_js.useViewPreferencesSync({
|
|
35554
35618
|
loadVersion,
|
|
35555
35619
|
viewProperties: state.viewProperties,
|
|
35556
35620
|
setViewProperties: state.setViewProperties,
|
|
@@ -35565,22 +35629,26 @@ ${url}`)
|
|
|
35565
35629
|
const afterSuccessfulSave = (format) => {
|
|
35566
35630
|
pptx.playFeedbackSound(viewerOptions);
|
|
35567
35631
|
if (format === "pptx" && filePath && pptx.shouldDiscardAutosaveOnSuccessfulSave(viewerOptions)) {
|
|
35568
|
-
void pptx.deleteAutosaveSnapshot(filePath).catch(() => {
|
|
35632
|
+
void pptx.deleteAutosaveSnapshot(filePath, storage).catch(() => {
|
|
35569
35633
|
});
|
|
35570
35634
|
}
|
|
35571
35635
|
};
|
|
35572
|
-
const handleSaveAsFormat = async (format) => {
|
|
35573
|
-
await rawExportHandlers.handleSaveAsFormat(format)
|
|
35636
|
+
const handleSaveAsFormat = async (format, reason = "saveAs") => {
|
|
35637
|
+
if (await rawExportHandlers.handleSaveAsFormat(format, reason) === false) {
|
|
35638
|
+
return false;
|
|
35639
|
+
}
|
|
35574
35640
|
afterSuccessfulSave(format);
|
|
35641
|
+
return true;
|
|
35575
35642
|
};
|
|
35576
35643
|
return {
|
|
35577
35644
|
...rawExportHandlers,
|
|
35578
35645
|
handleSaveAsFormat,
|
|
35646
|
+
handleSave: () => void handleSaveAsFormat("pptx", "save"),
|
|
35579
35647
|
handleSaveAsPptx: () => void handleSaveAsFormat("pptx"),
|
|
35580
35648
|
handleSaveAsPpsx: () => void handleSaveAsFormat("ppsx"),
|
|
35581
35649
|
handleSaveAsPptm: () => void handleSaveAsFormat("pptm")
|
|
35582
35650
|
};
|
|
35583
|
-
}, [rawExportHandlers, viewerOptions, filePath]);
|
|
35651
|
+
}, [rawExportHandlers, viewerOptions, filePath, storage]);
|
|
35584
35652
|
setExitModeHandler(handleSetMode);
|
|
35585
35653
|
const handleTemplateElementsChanged = React106.useCallback(
|
|
35586
35654
|
(slideId, elements) => {
|
|
@@ -35588,7 +35656,7 @@ ${url}`)
|
|
|
35588
35656
|
},
|
|
35589
35657
|
[state]
|
|
35590
35658
|
);
|
|
35591
|
-
const layoutSwitching =
|
|
35659
|
+
const layoutSwitching = chunkMRSGNERC_js.useLayoutSwitching({
|
|
35592
35660
|
handler: handlerRef.current,
|
|
35593
35661
|
slides,
|
|
35594
35662
|
activeSlideIndex,
|
|
@@ -35656,7 +35724,12 @@ ${url}`)
|
|
|
35656
35724
|
setSections: state.setSections,
|
|
35657
35725
|
setPresentationProperties: state.setPresentationProperties,
|
|
35658
35726
|
setCustomProperties: state.setCustomProperties,
|
|
35659
|
-
setCoreProperties:
|
|
35727
|
+
setCoreProperties: (properties) => {
|
|
35728
|
+
state.setCoreProperties(properties);
|
|
35729
|
+
if (properties) {
|
|
35730
|
+
onPropertiesChange?.(properties);
|
|
35731
|
+
}
|
|
35732
|
+
},
|
|
35660
35733
|
setAppProperties: state.setAppProperties,
|
|
35661
35734
|
setViewProperties: state.setViewProperties,
|
|
35662
35735
|
setTableStyleMap: state.setTableStyleMap,
|
|
@@ -35699,7 +35772,7 @@ ${url}`)
|
|
|
35699
35772
|
"data-pptx-editor-chrome": "",
|
|
35700
35773
|
...{ [pptx.RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
35701
35774
|
"aria-busy": loading,
|
|
35702
|
-
className:
|
|
35775
|
+
className: chunkMA2BI7LX_js.cn(
|
|
35703
35776
|
"h-full w-full bg-background text-foreground relative",
|
|
35704
35777
|
...pptx.resolveOptionRootClasses(viewerOptions, "pptx")
|
|
35705
35778
|
),
|
|
@@ -35752,7 +35825,8 @@ ${url}`)
|
|
|
35752
35825
|
autosaveToggleAvailable: autosaveActivation.toggleAvailable,
|
|
35753
35826
|
onToggleAutosave: () => {
|
|
35754
35827
|
if (autosaveActivation.toggleAvailable) {
|
|
35755
|
-
setAutosaveEnabled(
|
|
35828
|
+
setAutosaveEnabled(!autosaveEnabled);
|
|
35829
|
+
onAutosaveToggle?.(!autosaveEnabled);
|
|
35756
35830
|
}
|
|
35757
35831
|
},
|
|
35758
35832
|
hiddenActions,
|
|
@@ -35966,7 +36040,7 @@ ${url}`)
|
|
|
35966
36040
|
onRibbonTabHiddenChange: (tabId, hidden) => optionsStore.setRibbonTabHidden(tabId, hidden),
|
|
35967
36041
|
onQuickAccessCommandsChange: (commandIds) => optionsStore.setQuickAccessCommands(commandIds),
|
|
35968
36042
|
onResetOptions: (group) => optionsStore.reset(group),
|
|
35969
|
-
onClearCache:
|
|
36043
|
+
onClearCache: handleClearOptionsCache,
|
|
35970
36044
|
addinStatus,
|
|
35971
36045
|
themeKey,
|
|
35972
36046
|
availableThemes: themeCatalog,
|
|
@@ -36094,14 +36168,20 @@ ${url}`)
|
|
|
36094
36168
|
// Nothing previously provided it, so every one of those consumers was
|
|
36095
36169
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
36096
36170
|
// the user changed in the Options dialog.
|
|
36097
|
-
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36098
|
-
|
|
36171
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerStorageContext.Provider, { value: storage, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
36172
|
+
chunkMRSGNERC_js.CollaborationProvider,
|
|
36099
36173
|
{
|
|
36100
36174
|
config: collaboration,
|
|
36101
36175
|
canvasWidth: canvasSize.width,
|
|
36102
36176
|
canvasHeight: canvasSize.height,
|
|
36103
36177
|
children: [
|
|
36104
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36178
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36179
|
+
CollaborationStateReporter,
|
|
36180
|
+
{
|
|
36181
|
+
onChange: onCollaborationChange,
|
|
36182
|
+
onStatus: onCollaborationStatus
|
|
36183
|
+
}
|
|
36184
|
+
),
|
|
36105
36185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36106
36186
|
CollaborationDocumentSync,
|
|
36107
36187
|
{
|
|
@@ -36145,16 +36225,19 @@ ${url}`)
|
|
|
36145
36225
|
slideCount: slides.length
|
|
36146
36226
|
}
|
|
36147
36227
|
),
|
|
36148
|
-
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36228
|
+
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMRSGNERC_js.ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
36149
36229
|
]
|
|
36150
36230
|
}
|
|
36151
|
-
) }) }) }) }) }) }) })
|
|
36231
|
+
) }) }) }) }) }) }) }) })
|
|
36152
36232
|
);
|
|
36153
36233
|
}
|
|
36154
36234
|
);
|
|
36155
|
-
|
|
36235
|
+
var PowerPointViewer2 = /* @__PURE__ */ chunkMRSGNERC_js.withDisplayName(
|
|
36236
|
+
PowerPointViewerComponent,
|
|
36237
|
+
"PowerPointViewer"
|
|
36238
|
+
);
|
|
36156
36239
|
function CollaborationStatusStrip() {
|
|
36157
|
-
const collab =
|
|
36240
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
36158
36241
|
if (!collab) {
|
|
36159
36242
|
return null;
|
|
36160
36243
|
}
|
|
@@ -36168,9 +36251,12 @@ function CollaborationStatusStrip() {
|
|
|
36168
36251
|
);
|
|
36169
36252
|
}
|
|
36170
36253
|
function CollaborationStateReporter({
|
|
36171
|
-
onChange
|
|
36254
|
+
onChange,
|
|
36255
|
+
onStatus
|
|
36172
36256
|
}) {
|
|
36173
|
-
|
|
36257
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
36258
|
+
useCollaborationStateReport(collab, onChange);
|
|
36259
|
+
chunkMRSGNERC_js.useReportOnChange(collab?.status ?? "disconnected", onStatus, "disconnected");
|
|
36174
36260
|
return null;
|
|
36175
36261
|
}
|
|
36176
36262
|
function CollaborationDocumentSync({
|
|
@@ -36184,8 +36270,8 @@ function CollaborationDocumentSync({
|
|
|
36184
36270
|
deckSaveState,
|
|
36185
36271
|
onReadOnlyChange
|
|
36186
36272
|
}) {
|
|
36187
|
-
const collab =
|
|
36188
|
-
|
|
36273
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
36274
|
+
chunkMRSGNERC_js.useCollaborationDocumentSync({
|
|
36189
36275
|
collaboration: collab,
|
|
36190
36276
|
slides,
|
|
36191
36277
|
templateElementsBySlideId,
|
|
@@ -36204,14 +36290,14 @@ function CollaborationFollowLayer({
|
|
|
36204
36290
|
setActiveSlideIndex,
|
|
36205
36291
|
slideCount
|
|
36206
36292
|
}) {
|
|
36207
|
-
const collab =
|
|
36208
|
-
const { followedClientId, followUser } =
|
|
36293
|
+
const collab = chunkMRSGNERC_js.useCollaboration();
|
|
36294
|
+
const { followedClientId, followUser } = chunkMRSGNERC_js.useFollowMode({
|
|
36209
36295
|
collab,
|
|
36210
36296
|
activeSlideIndex,
|
|
36211
36297
|
setActiveSlideIndex,
|
|
36212
36298
|
slideCount
|
|
36213
36299
|
});
|
|
36214
|
-
|
|
36300
|
+
chunkMRSGNERC_js.useBroadcastFollower({
|
|
36215
36301
|
collab,
|
|
36216
36302
|
activeSlideIndex,
|
|
36217
36303
|
setActiveSlideIndex,
|
|
@@ -36276,7 +36362,7 @@ Object.defineProperty(exports, "vermilionRadius", {
|
|
|
36276
36362
|
get: function () { return pptx.vermilionRadius; }
|
|
36277
36363
|
});
|
|
36278
36364
|
exports.CollaborationStatusIndicator = CollaborationStatusIndicator;
|
|
36279
|
-
exports.PowerPointViewer =
|
|
36365
|
+
exports.PowerPointViewer = PowerPointViewer2;
|
|
36280
36366
|
exports.SlideCanvas = SlideCanvas;
|
|
36281
36367
|
exports.SlideTemplateGalleryDialog = SlideTemplateGalleryDialog;
|
|
36282
36368
|
exports.SlideTemplatePreview = SlideTemplatePreview;
|