pptx-react-viewer 4.37.0 → 4.38.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 +52 -0
- package/dist/{chunk-RZIXD6X7.mjs → chunk-3SFBCFHJ.mjs} +11 -5
- package/dist/chunk-3SFBCFHJ.mjs.br +0 -0
- package/dist/chunk-3SFBCFHJ.mjs.gz +0 -0
- package/dist/{chunk-RXN5Q6CJ.mjs → chunk-LLH3I2XY.mjs} +569 -647
- package/dist/chunk-LLH3I2XY.mjs.br +0 -0
- package/dist/chunk-LLH3I2XY.mjs.gz +0 -0
- package/dist/{chunk-L4E5A5DE.js → chunk-Q5WEQ37H.js} +674 -752
- package/dist/chunk-Q5WEQ37H.js.br +0 -0
- package/dist/chunk-Q5WEQ37H.js.gz +0 -0
- package/dist/{chunk-YAODOVJY.js → chunk-TCEDOLGE.js} +10 -4
- package/dist/chunk-TCEDOLGE.js.br +0 -0
- package/dist/chunk-TCEDOLGE.js.gz +0 -0
- package/dist/i18n/de.cjs +84 -1
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +84 -1
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +84 -1
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +84 -1
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +84 -1
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +84 -1
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +84 -1
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +84 -1
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +19 -5
- package/dist/index.js +22 -22
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +31 -29
- package/dist/internals.js +80 -80
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +1 -1
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.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/viewer/index.d.ts +17 -3
- package/dist/viewer/index.js +17 -17
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +2 -2
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/chunk-L4E5A5DE.js.br +0 -0
- package/dist/chunk-L4E5A5DE.js.gz +0 -0
- package/dist/chunk-RXN5Q6CJ.mjs.br +0 -0
- package/dist/chunk-RXN5Q6CJ.mjs.gz +0 -0
- package/dist/chunk-RZIXD6X7.mjs.br +0 -0
- package/dist/chunk-RZIXD6X7.mjs.gz +0 -0
- package/dist/chunk-YAODOVJY.js.br +0 -0
- package/dist/chunk-YAODOVJY.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTCEDOLGE_js = require('./chunk-TCEDOLGE.js');
|
|
4
4
|
var chunk43TOUP5U_js = require('./chunk-43TOUP5U.js');
|
|
5
5
|
var pptx = require('ooxml-ui/pptx');
|
|
6
6
|
var React103 = require('react');
|
|
@@ -307,7 +307,7 @@ function SlideTemplatePreview({
|
|
|
307
307
|
transformOrigin: "top left"
|
|
308
308
|
},
|
|
309
309
|
children: previewSlide.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
-
|
|
310
|
+
chunkTCEDOLGE_js.StaticElementRenderer,
|
|
311
311
|
{
|
|
312
312
|
element,
|
|
313
313
|
activeSlide: previewSlide,
|
|
@@ -376,7 +376,7 @@ function SlideTemplateGalleryDialog({
|
|
|
376
376
|
scheme
|
|
377
377
|
}) {
|
|
378
378
|
const { t } = reactI18next.useTranslation();
|
|
379
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
379
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onClose);
|
|
380
380
|
const [selected, setSelected] = React103.useState(null);
|
|
381
381
|
const dialogRef = React103.useRef(null);
|
|
382
382
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
@@ -733,7 +733,7 @@ function WebHomeControls({
|
|
|
733
733
|
function ShapeArrangeExtras(p) {
|
|
734
734
|
const commands = useShapeFormatContext();
|
|
735
735
|
const crop = commands?.crop;
|
|
736
|
-
const { isHidden } =
|
|
736
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(p.hiddenActions);
|
|
737
737
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
738
738
|
const controls = React103.useMemo(
|
|
739
739
|
() => pptx.arrangeShapeHomeControls({
|
|
@@ -1056,7 +1056,7 @@ function TransitionsSection(p) {
|
|
|
1056
1056
|
case "soundPreview": {
|
|
1057
1057
|
const url = pptx.ribbonTransitionStockSoundUrl(transition);
|
|
1058
1058
|
if (url) {
|
|
1059
|
-
|
|
1059
|
+
chunkTCEDOLGE_js.playAnimationSound(url);
|
|
1060
1060
|
}
|
|
1061
1061
|
break;
|
|
1062
1062
|
}
|
|
@@ -1185,6 +1185,44 @@ var ViewerCustomizationContext = React103.createContext(
|
|
|
1185
1185
|
function useViewerCustomizationContext() {
|
|
1186
1186
|
return React103.useContext(ViewerCustomizationContext);
|
|
1187
1187
|
}
|
|
1188
|
+
var ViewerRegionBaseContext = React103.createContext(null);
|
|
1189
|
+
function useRegionRenderer(id) {
|
|
1190
|
+
const customization = useViewerCustomizationContext();
|
|
1191
|
+
const base = React103.useContext(ViewerRegionBaseContext);
|
|
1192
|
+
return base ? pptx.getRegionRenderer(customization, id) : void 0;
|
|
1193
|
+
}
|
|
1194
|
+
var FILL = { width: "100%", height: "100%" };
|
|
1195
|
+
var NOOP = () => {
|
|
1196
|
+
};
|
|
1197
|
+
function ViewerRegion(props) {
|
|
1198
|
+
const { region, renderer, close = NOOP, extra, className, style } = props;
|
|
1199
|
+
const base = React103.useContext(ViewerRegionBaseContext);
|
|
1200
|
+
const containerRef = React103.useRef(null);
|
|
1201
|
+
const hostRef = React103.useRef(null);
|
|
1202
|
+
React103.useLayoutEffect(() => {
|
|
1203
|
+
const host = new pptx.ViewerRegionHost(containerRef.current);
|
|
1204
|
+
hostRef.current = host;
|
|
1205
|
+
return () => {
|
|
1206
|
+
host.destroy();
|
|
1207
|
+
hostRef.current = null;
|
|
1208
|
+
};
|
|
1209
|
+
}, []);
|
|
1210
|
+
React103.useLayoutEffect(() => {
|
|
1211
|
+
if (!base) {
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
const context = { ...base, ...extra, region, close };
|
|
1215
|
+
hostRef.current?.render(renderer, context);
|
|
1216
|
+
});
|
|
1217
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1218
|
+
"div",
|
|
1219
|
+
{
|
|
1220
|
+
ref: containerRef,
|
|
1221
|
+
className: className ? `pptx-region-host ${className}` : "pptx-region-host",
|
|
1222
|
+
style: style ?? FILL
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1188
1226
|
var AccountAuthContext = React103.createContext(void 0);
|
|
1189
1227
|
var cardClass = "border border-border bg-card p-6 text-card-foreground";
|
|
1190
1228
|
function AccountPage() {
|
|
@@ -1215,7 +1253,7 @@ function AccountPage() {
|
|
|
1215
1253
|
return void 0;
|
|
1216
1254
|
});
|
|
1217
1255
|
};
|
|
1218
|
-
const version = "4.
|
|
1256
|
+
const version = "4.38.0" ;
|
|
1219
1257
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1220
1258
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
1221
1259
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1473,12 +1511,13 @@ function BackstageNavIcon({ page }) {
|
|
|
1473
1511
|
function FileSection(p) {
|
|
1474
1512
|
const { t } = reactI18next.useTranslation();
|
|
1475
1513
|
const [requestedPage, setRequestedPage] = React103.useState("home");
|
|
1476
|
-
const
|
|
1514
|
+
const customization = useViewerCustomizationContext();
|
|
1515
|
+
const nav = pptx.backstageNavEntries(pptx.BACKSTAGE_NAV, customization);
|
|
1477
1516
|
const offered = (id) => nav.some((item) => item.id === id);
|
|
1478
1517
|
const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
|
|
1479
1518
|
const [query, setQuery] = React103.useState("");
|
|
1480
1519
|
const [recent, setRecent] = React103.useState([]);
|
|
1481
|
-
const { isHidden } =
|
|
1520
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(p.hiddenActions);
|
|
1482
1521
|
const exportHidden = isHidden("export");
|
|
1483
1522
|
React103.useEffect(() => {
|
|
1484
1523
|
void pptx.listBackstageRecentFiles(t, p.recentPresentationsCount).then(setRecent);
|
|
@@ -1494,7 +1533,12 @@ function FileSection(p) {
|
|
|
1494
1533
|
}
|
|
1495
1534
|
};
|
|
1496
1535
|
const current = nav.find((item) => item.id === page);
|
|
1497
|
-
const
|
|
1536
|
+
const hostPage = current?.host;
|
|
1537
|
+
const builtInPage = hostPage ? void 0 : page;
|
|
1538
|
+
const title = current ? current.labelKey ? t(current.labelKey, { defaultValue: current.label }) : current.label : t("pptx.backstage.nav.home");
|
|
1539
|
+
const regionId = hostPage ? `backstage.host.${hostPage.id}` : `backstage.${page}`;
|
|
1540
|
+
const builtInRegionRenderer = useRegionRenderer(regionId);
|
|
1541
|
+
const regionRenderer = hostPage ? hostPage.render : builtInRegionRenderer;
|
|
1498
1542
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1499
1543
|
"div",
|
|
1500
1544
|
{
|
|
@@ -1515,7 +1559,7 @@ function FileSection(p) {
|
|
|
1515
1559
|
}
|
|
1516
1560
|
) }),
|
|
1517
1561
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto pb-2 max-md:flex-row max-md:items-center max-md:overflow-y-visible max-md:pb-0", children: [
|
|
1518
|
-
nav.filter((item) =>
|
|
1562
|
+
nav.filter((item) => item.group !== "footer" && !(item.id === "export" && exportHidden)).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1519
1563
|
"button",
|
|
1520
1564
|
{
|
|
1521
1565
|
type: "button",
|
|
@@ -1524,14 +1568,14 @@ function FileSection(p) {
|
|
|
1524
1568
|
onClick: () => item.id === "close" ? p.onClose() : item.id === "save" ? run(p.onSaveAsPptx) : setRequestedPage(item.id),
|
|
1525
1569
|
className: `${pptx.BACKSTAGE_NAV_CLASSES.row} ${page === item.id ? pptx.BACKSTAGE_NAV_CLASSES.active : pptx.BACKSTAGE_NAV_CLASSES.inactive}`,
|
|
1526
1570
|
children: [
|
|
1527
|
-
/* @__PURE__ */ jsxRuntime.jsx(BackstageNavIcon, { page: item.id }),
|
|
1528
|
-
t(item.labelKey, { defaultValue: item.label })
|
|
1571
|
+
!item.host && /* @__PURE__ */ jsxRuntime.jsx(BackstageNavIcon, { page: item.id }),
|
|
1572
|
+
item.labelKey ? t(item.labelKey, { defaultValue: item.label }) : item.label
|
|
1529
1573
|
]
|
|
1530
1574
|
},
|
|
1531
1575
|
item.id
|
|
1532
1576
|
)),
|
|
1533
1577
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 max-md:hidden" }),
|
|
1534
|
-
nav.filter((item) => item.group).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1578
|
+
nav.filter((item) => item.group === "footer").map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1535
1579
|
"button",
|
|
1536
1580
|
{
|
|
1537
1581
|
type: "button",
|
|
@@ -1540,8 +1584,8 @@ function FileSection(p) {
|
|
|
1540
1584
|
onClick: () => item.id === "options" && p.onOpenSettings ? run(p.onOpenSettings) : setRequestedPage(item.id),
|
|
1541
1585
|
className: `${pptx.BACKSTAGE_NAV_CLASSES.row} ${page === item.id ? pptx.BACKSTAGE_NAV_CLASSES.active : pptx.BACKSTAGE_NAV_CLASSES.inactive}`,
|
|
1542
1586
|
children: [
|
|
1543
|
-
/* @__PURE__ */ jsxRuntime.jsx(BackstageNavIcon, { page: item.id }),
|
|
1544
|
-
t(item.labelKey, { defaultValue: item.label })
|
|
1587
|
+
!item.host && /* @__PURE__ */ jsxRuntime.jsx(BackstageNavIcon, { page: item.id }),
|
|
1588
|
+
item.labelKey ? t(item.labelKey, { defaultValue: item.label }) : item.label
|
|
1545
1589
|
]
|
|
1546
1590
|
},
|
|
1547
1591
|
item.id
|
|
@@ -1550,63 +1594,76 @@ function FileSection(p) {
|
|
|
1550
1594
|
] }),
|
|
1551
1595
|
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "min-w-0 flex-1 overflow-y-auto bg-background px-[clamp(32px,4vw,72px)] py-5 max-md:px-4 max-md:py-4", children: [
|
|
1552
1596
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[24px] font-semibold", children: page === "home" ? t("pptx.backstage.greeting") : title }),
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
{
|
|
1556
|
-
|
|
1557
|
-
}
|
|
1558
|
-
),
|
|
1559
|
-
(page === "home" || page === "open") && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1560
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1561
|
-
WebSearch,
|
|
1597
|
+
regionRenderer ? (
|
|
1598
|
+
// The nav, title and back button stay the viewer's; the host fills the page body.
|
|
1599
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1600
|
+
ViewerRegion,
|
|
1562
1601
|
{
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
onInput: (event) => setQuery(event.currentTarget.value),
|
|
1568
|
-
placeholder: t("pptx.backstage.searchPlaceholder"),
|
|
1569
|
-
"aria-label": t("pptx.backstage.searchPlaceholder")
|
|
1602
|
+
region: regionId,
|
|
1603
|
+
renderer: regionRenderer,
|
|
1604
|
+
close: p.onClose,
|
|
1605
|
+
style: { width: "100%", minHeight: "12rem" }
|
|
1570
1606
|
}
|
|
1571
|
-
)
|
|
1572
|
-
|
|
1573
|
-
|
|
1607
|
+
) })
|
|
1608
|
+
) : builtInPage ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1609
|
+
(page === "home" || page === "new") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1610
|
+
BackstageNewGallery,
|
|
1574
1611
|
{
|
|
1575
|
-
|
|
1576
|
-
className: "mt-4 inline-flex items-center gap-2 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
|
|
1577
|
-
onClick: () => run(p.onOpenFile),
|
|
1578
|
-
children: [
|
|
1579
|
-
/* @__PURE__ */ jsxRuntime.jsx(lu.LuFolderOpen, {}),
|
|
1580
|
-
" ",
|
|
1581
|
-
t("pptx.backstage.browseDevice")
|
|
1582
|
-
]
|
|
1612
|
+
onCreate: (templateId) => run(() => p.onCreatePresentation(templateId))
|
|
1583
1613
|
}
|
|
1584
1614
|
),
|
|
1585
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1615
|
+
(page === "home" || page === "open") && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1616
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1617
|
+
WebSearch,
|
|
1618
|
+
{
|
|
1619
|
+
"data-pptx-search-surface": true,
|
|
1620
|
+
"data-pptx-search-input": true,
|
|
1621
|
+
className: "mt-8 w-full max-w-[540px]",
|
|
1622
|
+
value: query,
|
|
1623
|
+
onInput: (event) => setQuery(event.currentTarget.value),
|
|
1624
|
+
placeholder: t("pptx.backstage.searchPlaceholder"),
|
|
1625
|
+
"aria-label": t("pptx.backstage.searchPlaceholder")
|
|
1626
|
+
}
|
|
1627
|
+
),
|
|
1628
|
+
page === "open" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1629
|
+
"button",
|
|
1630
|
+
{
|
|
1631
|
+
type: "button",
|
|
1632
|
+
className: "mt-4 inline-flex items-center gap-2 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
|
|
1633
|
+
onClick: () => run(p.onOpenFile),
|
|
1634
|
+
children: [
|
|
1635
|
+
/* @__PURE__ */ jsxRuntime.jsx(lu.LuFolderOpen, {}),
|
|
1636
|
+
" ",
|
|
1637
|
+
t("pptx.backstage.browseDevice")
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
),
|
|
1641
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-6 text-[16px] font-semibold", children: t("pptx.backstage.recentHeading") }),
|
|
1642
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1643
|
+
BackstageRecentList,
|
|
1644
|
+
{
|
|
1645
|
+
files: visibleRecent,
|
|
1646
|
+
onOpen: (key) => run(() => p.onOpenRecentFile?.(key))
|
|
1647
|
+
}
|
|
1648
|
+
)
|
|
1649
|
+
] }),
|
|
1650
|
+
!(page === "export" && exportHidden) && /* @__PURE__ */ jsxRuntime.jsx(BackstageCards, { page, props: p, run }),
|
|
1651
|
+
page === "account" && /* @__PURE__ */ jsxRuntime.jsx(AccountPage, {}),
|
|
1652
|
+
page === "options" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
|
|
1653
|
+
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: "text-3xl text-primary" }),
|
|
1654
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-4 text-lg font-semibold", children: t("pptx.backstage.optionsTitle") }),
|
|
1655
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: t("pptx.backstage.optionsBody") }),
|
|
1656
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1657
|
+
"button",
|
|
1658
|
+
{
|
|
1659
|
+
type: "button",
|
|
1660
|
+
className: "mt-6 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
|
|
1661
|
+
onClick: () => run(p.onOpenSettings),
|
|
1662
|
+
children: t("pptx.backstage.openOptions")
|
|
1663
|
+
}
|
|
1664
|
+
)
|
|
1665
|
+
] })
|
|
1666
|
+
] }) : null,
|
|
1610
1667
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-12 text-[11px] text-muted-foreground", children: [
|
|
1611
1668
|
p.fileName || t("pptx.backstage.untitled"),
|
|
1612
1669
|
" \xB7 ",
|
|
@@ -1808,7 +1865,7 @@ function LayoutArtwork({
|
|
|
1808
1865
|
backgroundColor
|
|
1809
1866
|
};
|
|
1810
1867
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (preview?.elements ?? []).slice(0, MAX_PREVIEW_ELEMENTS).map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1811
|
-
|
|
1868
|
+
chunkTCEDOLGE_js.StaticElementRenderer,
|
|
1812
1869
|
{
|
|
1813
1870
|
element,
|
|
1814
1871
|
activeSlide: slide,
|
|
@@ -1920,6 +1977,7 @@ var OV = [
|
|
|
1920
1977
|
];
|
|
1921
1978
|
var nextTile = 0;
|
|
1922
1979
|
function SlidesGroup(p) {
|
|
1980
|
+
const customization = useViewerCustomizationContext();
|
|
1923
1981
|
const [templateGalleryOpen, setTemplateGalleryOpen] = React103.useState(false);
|
|
1924
1982
|
const [galleryOpen, setGalleryOpen] = React103.useState(false);
|
|
1925
1983
|
const [tiles, setTiles] = React103.useState([]);
|
|
@@ -2007,7 +2065,7 @@ function SlidesGroup(p) {
|
|
|
2007
2065
|
)
|
|
2008
2066
|
),
|
|
2009
2067
|
sep,
|
|
2010
|
-
p.onInsertSlideFromTemplate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2068
|
+
p.onInsertSlideFromTemplate && pptx.isDialogAvailable(customization, "slideTemplates") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2011
2069
|
SlideTemplateGalleryDialog,
|
|
2012
2070
|
{
|
|
2013
2071
|
isOpen: templateGalleryOpen,
|
|
@@ -2179,6 +2237,10 @@ function InsertSection(p) {
|
|
|
2179
2237
|
chartAvailable: Boolean(p.onAddChart),
|
|
2180
2238
|
fieldAvailable: Boolean(p.onInsertField),
|
|
2181
2239
|
headerFooterAvailable: Boolean(p.onOpenHeaderFooter),
|
|
2240
|
+
newSlideAvailable: Boolean(p.onInsertSlideFromLayout && p.layoutOptions?.length),
|
|
2241
|
+
commentAvailable: Boolean(p.onToggleComments),
|
|
2242
|
+
layouts: p.layoutOptions ?? [],
|
|
2243
|
+
...p.currentLayoutPath ? { currentLayoutPath: p.currentLayoutPath } : {},
|
|
2182
2244
|
translate: t
|
|
2183
2245
|
};
|
|
2184
2246
|
}, [p, chartKind, customization, t]);
|
|
@@ -2199,11 +2261,27 @@ function InsertSection(p) {
|
|
|
2199
2261
|
smartArt: p.onAddSmartArt,
|
|
2200
2262
|
equation: p.onAddEquation,
|
|
2201
2263
|
link: p.onOpenHyperlinkDialog,
|
|
2202
|
-
headerFooter: p.onOpenHeaderFooter
|
|
2264
|
+
headerFooter: p.onOpenHeaderFooter,
|
|
2265
|
+
// Opening an already open pane would toggle it shut.
|
|
2266
|
+
comment: p.isCommentsPanelOpen ? void 0 : p.onToggleComments
|
|
2203
2267
|
};
|
|
2204
2268
|
commands[intent.value]?.();
|
|
2205
2269
|
break;
|
|
2206
2270
|
}
|
|
2271
|
+
case "table":
|
|
2272
|
+
p.onAddTable(intent.rows, intent.columns);
|
|
2273
|
+
break;
|
|
2274
|
+
case "newSlide": {
|
|
2275
|
+
const layout = pptx.resolveInsertSlideLayout(
|
|
2276
|
+
p.layoutOptions ?? [],
|
|
2277
|
+
intent.value,
|
|
2278
|
+
p.currentLayoutPath
|
|
2279
|
+
);
|
|
2280
|
+
if (layout) {
|
|
2281
|
+
p.onInsertSlideFromLayout?.(layout.path, layout.name);
|
|
2282
|
+
}
|
|
2283
|
+
break;
|
|
2284
|
+
}
|
|
2207
2285
|
case "shapeType":
|
|
2208
2286
|
p.onSetNewShapeType(intent.value);
|
|
2209
2287
|
break;
|
|
@@ -2444,7 +2522,7 @@ function SlideShowOptions({
|
|
|
2444
2522
|
}
|
|
2445
2523
|
function SubtitleSettingsControl() {
|
|
2446
2524
|
const { t } = reactI18next.useTranslation();
|
|
2447
|
-
const supplied = React103.useContext(
|
|
2525
|
+
const supplied = React103.useContext(chunkTCEDOLGE_js.ViewerOptionsStoreContext);
|
|
2448
2526
|
const fallback = React103.useRef(null);
|
|
2449
2527
|
if (!supplied) {
|
|
2450
2528
|
fallback.current ??= pptx.createViewerOptionsStore({ persist: false });
|
|
@@ -2478,7 +2556,7 @@ function SubtitleSettingsControl() {
|
|
|
2478
2556
|
}
|
|
2479
2557
|
function SlideShowSection(p) {
|
|
2480
2558
|
const { t } = reactI18next.useTranslation();
|
|
2481
|
-
const { isHidden } =
|
|
2559
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(p.hiddenActions);
|
|
2482
2560
|
const [showsOpen, setShowsOpen] = React103.useState(false);
|
|
2483
2561
|
const showsRef = React103.useRef(null);
|
|
2484
2562
|
React103.useEffect(() => {
|
|
@@ -3012,7 +3090,7 @@ function MobileSheet({
|
|
|
3012
3090
|
}) {
|
|
3013
3091
|
const sheetRef = React103.useRef(null);
|
|
3014
3092
|
const { t } = reactI18next.useTranslation();
|
|
3015
|
-
const { dragY, dragging, handlers } =
|
|
3093
|
+
const { dragY, dragging, handlers } = chunkTCEDOLGE_js.useSheetDismissDrag(onClose);
|
|
3016
3094
|
useModalFocus(open, sheetRef, onClose);
|
|
3017
3095
|
if (!open) {
|
|
3018
3096
|
return null;
|
|
@@ -3100,7 +3178,7 @@ function MobileMenuSheet(props) {
|
|
|
3100
3178
|
const { t } = reactI18next.useTranslation();
|
|
3101
3179
|
const { open, onClose } = props;
|
|
3102
3180
|
const [active, setActive] = React103.useState("home");
|
|
3103
|
-
const { isTabVisible } =
|
|
3181
|
+
const { isTabVisible } = chunkTCEDOLGE_js.useToolbarVisibility(props.hiddenActions);
|
|
3104
3182
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3105
3183
|
MobileSheet,
|
|
3106
3184
|
{
|
|
@@ -3173,7 +3251,12 @@ function MobileSectionBody({
|
|
|
3173
3251
|
onOpenImagePicker: p.onOpenImagePicker,
|
|
3174
3252
|
onOpenMediaPicker: p.onOpenMediaPicker,
|
|
3175
3253
|
hasSelection: Boolean(p.selectedElement),
|
|
3176
|
-
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog
|
|
3254
|
+
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
|
|
3255
|
+
layoutOptions: p.layoutOptions,
|
|
3256
|
+
currentLayoutPath: p.currentLayoutPath,
|
|
3257
|
+
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
3258
|
+
onToggleComments: p.onToggleComments,
|
|
3259
|
+
isCommentsPanelOpen: p.isCommentsPanelOpen
|
|
3177
3260
|
}
|
|
3178
3261
|
) });
|
|
3179
3262
|
case "text":
|
|
@@ -3382,7 +3465,7 @@ function MobileToolbar(props) {
|
|
|
3382
3465
|
const { t } = reactI18next.useTranslation();
|
|
3383
3466
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
3384
3467
|
const [menuOpen, setMenuOpen] = React103.useState(false);
|
|
3385
|
-
const { isHidden } =
|
|
3468
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(props.hiddenActions);
|
|
3386
3469
|
const showEdit = mode === "edit" || mode === "master";
|
|
3387
3470
|
const hidden = [];
|
|
3388
3471
|
if (isHidden("undo")) {
|
|
@@ -3430,7 +3513,7 @@ function PictureSizeStrip({
|
|
|
3430
3513
|
hiddenActions
|
|
3431
3514
|
}) {
|
|
3432
3515
|
const crop = useShapeFormatContext()?.crop;
|
|
3433
|
-
const { isHidden } =
|
|
3516
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(hiddenActions);
|
|
3434
3517
|
const controls = React103.useMemo(
|
|
3435
3518
|
() => pptx.pictureSizeHomeControls({
|
|
3436
3519
|
editable: Boolean(crop),
|
|
@@ -3602,7 +3685,7 @@ var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap t
|
|
|
3602
3685
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
3603
3686
|
function RibbonTabBar(p) {
|
|
3604
3687
|
const { t } = reactI18next.useTranslation();
|
|
3605
|
-
const viewerOptions =
|
|
3688
|
+
const viewerOptions = chunkTCEDOLGE_js.useViewerOptionsContext();
|
|
3606
3689
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3607
3690
|
"div",
|
|
3608
3691
|
{
|
|
@@ -3679,9 +3762,9 @@ function RibbonTabBar(p) {
|
|
|
3679
3762
|
}
|
|
3680
3763
|
function TabRowActions(p) {
|
|
3681
3764
|
const { t } = reactI18next.useTranslation();
|
|
3682
|
-
const collab =
|
|
3765
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
3683
3766
|
const isCollaborating = Boolean(collab && collab.status === "connected");
|
|
3684
|
-
const { isHidden } =
|
|
3767
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(p.hiddenActions);
|
|
3685
3768
|
const customization = useViewerCustomizationContext();
|
|
3686
3769
|
const ref = React103.useRef(null);
|
|
3687
3770
|
const handlers = React103.useRef(p);
|
|
@@ -3736,7 +3819,7 @@ function TabRowActions(p) {
|
|
|
3736
3819
|
}
|
|
3737
3820
|
function TitleBarElement(p) {
|
|
3738
3821
|
const { t } = reactI18next.useTranslation();
|
|
3739
|
-
const options =
|
|
3822
|
+
const options = chunkTCEDOLGE_js.useViewerOptionsContext();
|
|
3740
3823
|
const customization = useViewerCustomizationContext();
|
|
3741
3824
|
const ref = React103.useRef(null);
|
|
3742
3825
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -4072,7 +4155,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4072
4155
|
onToggleSidebar,
|
|
4073
4156
|
onToggleInspector
|
|
4074
4157
|
} = p;
|
|
4075
|
-
const collab =
|
|
4158
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
4076
4159
|
const customization = useViewerCustomizationContext();
|
|
4077
4160
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
4078
4161
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -4371,8 +4454,8 @@ function ToolbarLateTabs({
|
|
|
4371
4454
|
function Toolbar(p) {
|
|
4372
4455
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
4373
4456
|
const { t } = reactI18next.useTranslation();
|
|
4374
|
-
const { isTabVisible } =
|
|
4375
|
-
const viewerOptions =
|
|
4457
|
+
const { isTabVisible } = chunkTCEDOLGE_js.useToolbarVisibility(p.hiddenActions);
|
|
4458
|
+
const viewerOptions = chunkTCEDOLGE_js.useViewerOptionsContext();
|
|
4376
4459
|
const customization = useViewerCustomizationContext();
|
|
4377
4460
|
const belowInput = React103.useMemo(
|
|
4378
4461
|
() => ({
|
|
@@ -4578,7 +4661,12 @@ function Toolbar(p) {
|
|
|
4578
4661
|
onOpenImagePicker: p.onOpenImagePicker,
|
|
4579
4662
|
onOpenMediaPicker: p.onOpenMediaPicker,
|
|
4580
4663
|
hasSelection: Boolean(p.selectedElement),
|
|
4581
|
-
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog
|
|
4664
|
+
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
|
|
4665
|
+
layoutOptions: p.layoutOptions,
|
|
4666
|
+
currentLayoutPath: p.currentLayoutPath,
|
|
4667
|
+
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
4668
|
+
onToggleComments: p.onToggleComments,
|
|
4669
|
+
isCommentsPanelOpen: p.isCommentsPanelOpen
|
|
4582
4670
|
}
|
|
4583
4671
|
),
|
|
4584
4672
|
sTxt && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5349,7 +5437,7 @@ function DrawingOverlaySvg({
|
|
|
5349
5437
|
onPointerDown,
|
|
5350
5438
|
onPointerMove,
|
|
5351
5439
|
onPointerUp,
|
|
5352
|
-
children: isStrokeActive && liveStrokeView ?
|
|
5440
|
+
children: isStrokeActive && liveStrokeView ? chunkTCEDOLGE_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5353
5441
|
"path",
|
|
5354
5442
|
{
|
|
5355
5443
|
d: liveStrokeD,
|
|
@@ -5928,7 +6016,7 @@ function PictureCropOverlay({
|
|
|
5928
6016
|
};
|
|
5929
6017
|
};
|
|
5930
6018
|
const { ghost, frame, handles } = overlay;
|
|
5931
|
-
const src =
|
|
6019
|
+
const src = chunkTCEDOLGE_js.imgSrc(element);
|
|
5932
6020
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5933
6021
|
"div",
|
|
5934
6022
|
{
|
|
@@ -6368,7 +6456,7 @@ function SelectionHandleOverlay({
|
|
|
6368
6456
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
6369
6457
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
6370
6458
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6371
|
-
|
|
6459
|
+
chunkTCEDOLGE_js.ResizeHandles,
|
|
6372
6460
|
{
|
|
6373
6461
|
elementId: element.id,
|
|
6374
6462
|
adjustmentHandles,
|
|
@@ -7079,7 +7167,7 @@ function SlideCanvas(props) {
|
|
|
7079
7167
|
props.registerInlineEditReader
|
|
7080
7168
|
]
|
|
7081
7169
|
);
|
|
7082
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7170
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
7083
7171
|
}
|
|
7084
7172
|
function SlideCanvasContent({
|
|
7085
7173
|
imagePaste,
|
|
@@ -7348,7 +7436,7 @@ function SlideCanvasContent({
|
|
|
7348
7436
|
onPointerMove: handleStagePointerMove,
|
|
7349
7437
|
onPointerUp: handleStagePointerUp,
|
|
7350
7438
|
children: [
|
|
7351
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7439
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
7352
7440
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
7353
7441
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
7354
7442
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7360,7 +7448,7 @@ function SlideCanvasContent({
|
|
|
7360
7448
|
}
|
|
7361
7449
|
),
|
|
7362
7450
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7363
|
-
|
|
7451
|
+
chunkTCEDOLGE_js.ElementRenderer,
|
|
7364
7452
|
{
|
|
7365
7453
|
element,
|
|
7366
7454
|
activeSlide,
|
|
@@ -7404,7 +7492,7 @@ function SlideCanvasContent({
|
|
|
7404
7492
|
`tpl-${element.id}`
|
|
7405
7493
|
)),
|
|
7406
7494
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7407
|
-
|
|
7495
|
+
chunkTCEDOLGE_js.ElementRenderer,
|
|
7408
7496
|
{
|
|
7409
7497
|
element,
|
|
7410
7498
|
activeSlide,
|
|
@@ -7470,7 +7558,7 @@ function SlideCanvasContent({
|
|
|
7470
7558
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7471
7559
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
7472
7560
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7473
|
-
|
|
7561
|
+
chunkTCEDOLGE_js.ElementRenderer,
|
|
7474
7562
|
{
|
|
7475
7563
|
element: editingMember.member,
|
|
7476
7564
|
activeSlide,
|
|
@@ -7986,7 +8074,7 @@ function SlideThumbnailImpl({
|
|
|
7986
8074
|
...pptx.deviceStrokeStageStyle(scale)
|
|
7987
8075
|
},
|
|
7988
8076
|
children: [
|
|
7989
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8077
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.SlideBackgroundImageLayer, { slide }),
|
|
7990
8078
|
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7991
8079
|
"div",
|
|
7992
8080
|
{
|
|
@@ -7996,7 +8084,7 @@ function SlideThumbnailImpl({
|
|
|
7996
8084
|
}
|
|
7997
8085
|
),
|
|
7998
8086
|
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7999
|
-
|
|
8087
|
+
chunkTCEDOLGE_js.StaticElementRenderer,
|
|
8000
8088
|
{
|
|
8001
8089
|
element,
|
|
8002
8090
|
activeSlide: slide,
|
|
@@ -9075,7 +9163,7 @@ function SlidesPaneSidebar({
|
|
|
9075
9163
|
tableStyleContext
|
|
9076
9164
|
}) {
|
|
9077
9165
|
const { t } = reactI18next.useTranslation();
|
|
9078
|
-
const collab =
|
|
9166
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
9079
9167
|
const slideRefs = React103.useRef(/* @__PURE__ */ new Map());
|
|
9080
9168
|
const renameInputRef = React103.useRef(null);
|
|
9081
9169
|
const slidePresenceMap = React103.useMemo(() => {
|
|
@@ -9170,7 +9258,7 @@ function SlidesPaneSidebar({
|
|
|
9170
9258
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
9171
9259
|
);
|
|
9172
9260
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
9173
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
9261
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkTCEDOLGE_js.useVirtualizedSlides({
|
|
9174
9262
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
9175
9263
|
itemHeight: estimatedItemHeight
|
|
9176
9264
|
});
|
|
@@ -11054,7 +11142,7 @@ function ReadingViewStage({
|
|
|
11054
11142
|
className: "absolute left-0 top-0 origin-top-left",
|
|
11055
11143
|
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
11056
11144
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11057
|
-
|
|
11145
|
+
chunkTCEDOLGE_js.StaticElementRenderer,
|
|
11058
11146
|
{
|
|
11059
11147
|
element,
|
|
11060
11148
|
activeSlide: slide,
|
|
@@ -11709,7 +11797,7 @@ function SlideNotesPanel({
|
|
|
11709
11797
|
});
|
|
11710
11798
|
const hasNotes = draft.trim().length > 0;
|
|
11711
11799
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
11712
|
-
const { dragY, handlers: dragHandlers } =
|
|
11800
|
+
const { dragY, handlers: dragHandlers } = chunkTCEDOLGE_js.useSheetDismissDrag(onToggle);
|
|
11713
11801
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11714
11802
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11715
11803
|
"button",
|
|
@@ -12846,7 +12934,7 @@ function DocumentPropertiesDialog({
|
|
|
12846
12934
|
const handleClose = React103.useCallback(() => {
|
|
12847
12935
|
onClose();
|
|
12848
12936
|
}, [onClose]);
|
|
12849
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
12937
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(handleClose);
|
|
12850
12938
|
if (!isOpen) {
|
|
12851
12939
|
return null;
|
|
12852
12940
|
}
|
|
@@ -13443,7 +13531,7 @@ function PresentationSubtitleBar({
|
|
|
13443
13531
|
}) {
|
|
13444
13532
|
const { t } = reactI18next.useTranslation();
|
|
13445
13533
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13446
|
-
pptx.subtitleSettingsFromOptions(
|
|
13534
|
+
pptx.subtitleSettingsFromOptions(chunkTCEDOLGE_js.useViewerOptionsContext()),
|
|
13447
13535
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13448
13536
|
);
|
|
13449
13537
|
const [captionText, setCaptionText] = React103.useState("");
|
|
@@ -13637,7 +13725,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13637
13725
|
...pptx.deviceStrokeStageStyle(scale)
|
|
13638
13726
|
},
|
|
13639
13727
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13640
|
-
|
|
13728
|
+
chunkTCEDOLGE_js.StaticElementRenderer,
|
|
13641
13729
|
{
|
|
13642
13730
|
element,
|
|
13643
13731
|
activeSlide: slide,
|
|
@@ -14954,7 +15042,7 @@ function EffectSoundRow({
|
|
|
14954
15042
|
}
|
|
14955
15043
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
14956
15044
|
if (asset) {
|
|
14957
|
-
|
|
15045
|
+
chunkTCEDOLGE_js.playAnimationSound(asset.dataUrl);
|
|
14958
15046
|
}
|
|
14959
15047
|
};
|
|
14960
15048
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15466,7 +15554,7 @@ function AnimationPanel({
|
|
|
15466
15554
|
onUpdateSlide
|
|
15467
15555
|
}) {
|
|
15468
15556
|
const { t } = reactI18next.useTranslation();
|
|
15469
|
-
const { viewportWidth } =
|
|
15557
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
15470
15558
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15471
15559
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15472
15560
|
const handlers = useAnimationHandlers({
|
|
@@ -16365,7 +16453,7 @@ function ChartDataGrid({
|
|
|
16365
16453
|
}) {
|
|
16366
16454
|
const { t } = reactI18next.useTranslation();
|
|
16367
16455
|
const highlightRef = React103.useRef(null);
|
|
16368
|
-
const { viewportWidth } =
|
|
16456
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
16369
16457
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
16370
16458
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
16371
16459
|
const rowHeaderClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10 bg-card" : "";
|
|
@@ -16481,7 +16569,7 @@ function ChartDataGrid({
|
|
|
16481
16569
|
"input",
|
|
16482
16570
|
{
|
|
16483
16571
|
type: "number",
|
|
16484
|
-
"aria-label":
|
|
16572
|
+
"aria-label": t("pptx.chart.seriesValueCell", { name: s.name, number: ci + 1 }),
|
|
16485
16573
|
disabled: !canEdit,
|
|
16486
16574
|
ref: isValueHighlight(si, ci) ? highlightRef : null,
|
|
16487
16575
|
className: `${CELL_INPUT}${isValueHighlight(si, ci) ? highlightClass : ""}`,
|
|
@@ -17722,8 +17810,8 @@ function ChartUserShapeOptions({
|
|
|
17722
17810
|
}
|
|
17723
17811
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17724
17812
|
const chartData = selectedElement.chartData;
|
|
17725
|
-
const followDataPoint =
|
|
17726
|
-
const { selection: partSelection } =
|
|
17813
|
+
const followDataPoint = chunkTCEDOLGE_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17814
|
+
const { selection: partSelection } = chunkTCEDOLGE_js.useChartPartSelection();
|
|
17727
17815
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17728
17816
|
const title = chartData?.title;
|
|
17729
17817
|
const chartType = chartData?.chartType;
|
|
@@ -18991,7 +19079,7 @@ function DuotonePanel({
|
|
|
18991
19079
|
] }),
|
|
18992
19080
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
18993
19081
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
18994
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19082
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkTCEDOLGE_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18995
19083
|
"button",
|
|
18996
19084
|
{
|
|
18997
19085
|
type: "button",
|
|
@@ -21293,7 +21381,7 @@ function QuickStylesGallery({
|
|
|
21293
21381
|
onUpdateShapeStyle
|
|
21294
21382
|
}) {
|
|
21295
21383
|
const { t } = reactI18next.useTranslation();
|
|
21296
|
-
const { viewportWidth } =
|
|
21384
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
21297
21385
|
const swatchMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
21298
21386
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
21299
21387
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: t("pptx.shape.quickStyles") }),
|
|
@@ -22985,7 +23073,7 @@ function SmartArtPropertiesPanel({
|
|
|
22985
23073
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
22986
23074
|
newData,
|
|
22987
23075
|
newData.layout,
|
|
22988
|
-
|
|
23076
|
+
chunkTCEDOLGE_js.resolveSmartArtDataPalette(newData),
|
|
22989
23077
|
newData.style ?? "flat",
|
|
22990
23078
|
"inspector",
|
|
22991
23079
|
box
|
|
@@ -23174,7 +23262,7 @@ function TableDataGrid({
|
|
|
23174
23262
|
}) {
|
|
23175
23263
|
const { t } = reactI18next.useTranslation();
|
|
23176
23264
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
23177
|
-
const { viewportWidth } =
|
|
23265
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
23178
23266
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
23179
23267
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
23180
23268
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -25022,7 +25110,7 @@ function InspectorPaneHeader({
|
|
|
25022
25110
|
onClose
|
|
25023
25111
|
}) {
|
|
25024
25112
|
const { t } = reactI18next.useTranslation();
|
|
25025
|
-
const { viewportWidth } =
|
|
25113
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
25026
25114
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
25027
25115
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
25028
25116
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -25723,7 +25811,7 @@ function TransitionPreview({
|
|
|
25723
25811
|
const { t } = reactI18next.useTranslation();
|
|
25724
25812
|
const durationMs = transition.durationMs ?? 500;
|
|
25725
25813
|
const animations = React103.useMemo(
|
|
25726
|
-
() =>
|
|
25814
|
+
() => chunkTCEDOLGE_js.getSlideTransitionAnimations(
|
|
25727
25815
|
transition.type,
|
|
25728
25816
|
durationMs,
|
|
25729
25817
|
transition.direction,
|
|
@@ -25792,7 +25880,7 @@ function TransitionPreview({
|
|
|
25792
25880
|
]
|
|
25793
25881
|
}
|
|
25794
25882
|
),
|
|
25795
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25883
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkTCEDOLGE_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
25796
25884
|
] });
|
|
25797
25885
|
}
|
|
25798
25886
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -26455,7 +26543,7 @@ function InspectorPane(props) {
|
|
|
26455
26543
|
} = props;
|
|
26456
26544
|
const hasSelection = selectedElement !== null;
|
|
26457
26545
|
const { t } = reactI18next.useTranslation();
|
|
26458
|
-
const { dragY, handlers: dragHandlers } =
|
|
26546
|
+
const { dragY, handlers: dragHandlers } = chunkTCEDOLGE_js.useSheetDismissDrag(onClose);
|
|
26459
26547
|
const {
|
|
26460
26548
|
animationPanelHeight,
|
|
26461
26549
|
effectiveThemeOptions,
|
|
@@ -26868,7 +26956,7 @@ function PresentationTouchControls({
|
|
|
26868
26956
|
hideNavigation = false
|
|
26869
26957
|
}) {
|
|
26870
26958
|
const { t } = reactI18next.useTranslation();
|
|
26871
|
-
const { isTouchDevice } =
|
|
26959
|
+
const { isTouchDevice } = chunkTCEDOLGE_js.useIsMobile();
|
|
26872
26960
|
if (!isTouchDevice) {
|
|
26873
26961
|
return null;
|
|
26874
26962
|
}
|
|
@@ -27514,11 +27602,12 @@ function PrintDialog({
|
|
|
27514
27602
|
defaultFrameSlides
|
|
27515
27603
|
}) {
|
|
27516
27604
|
const { t } = reactI18next.useTranslation();
|
|
27517
|
-
const
|
|
27518
|
-
const {
|
|
27605
|
+
const regionRenderer = useRegionRenderer("dialog.print");
|
|
27606
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onClose);
|
|
27607
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
27519
27608
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27520
27609
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27521
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
27610
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunkTCEDOLGE_js.useViewerOptionsContext());
|
|
27522
27611
|
const [printWhat, setPrintWhat] = React103.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
27523
27612
|
const [orientation, setOrientation] = React103.useState("landscape");
|
|
27524
27613
|
const [colorMode, setColorMode] = React103.useState(
|
|
@@ -27643,68 +27732,81 @@ function PrintDialog({
|
|
|
27643
27732
|
]
|
|
27644
27733
|
}
|
|
27645
27734
|
),
|
|
27646
|
-
|
|
27647
|
-
|
|
27648
|
-
|
|
27735
|
+
regionRenderer ? (
|
|
27736
|
+
// The frame (backdrop, title bar, close, dismiss) stays the viewer's; the host replaces the body.
|
|
27737
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27738
|
+
ViewerRegion,
|
|
27649
27739
|
{
|
|
27650
|
-
|
|
27651
|
-
|
|
27652
|
-
|
|
27653
|
-
|
|
27654
|
-
colorMode,
|
|
27655
|
-
onColorModeChange: setColorMode,
|
|
27656
|
-
frameSlides,
|
|
27657
|
-
onFrameSlidesChange: setFrameSlides,
|
|
27658
|
-
slidesPerPage,
|
|
27659
|
-
onSlidesPerPageChange: setSlidesPerPage,
|
|
27660
|
-
slideRange,
|
|
27661
|
-
onSlideRangeChange: setSlideRange,
|
|
27662
|
-
customFrom,
|
|
27663
|
-
onCustomFromChange: setCustomFrom,
|
|
27664
|
-
customTo,
|
|
27665
|
-
onCustomToChange: setCustomTo,
|
|
27666
|
-
totalSlides: slides.length,
|
|
27667
|
-
activeSlideIndex
|
|
27668
|
-
}
|
|
27669
|
-
),
|
|
27670
|
-
printWhat === "handouts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27671
|
-
PrintPreview,
|
|
27672
|
-
{
|
|
27673
|
-
slideIndices: previewSlideIndices,
|
|
27674
|
-
slidesPerPage,
|
|
27675
|
-
orientation: effectiveOrientation,
|
|
27676
|
-
frameSlides
|
|
27677
|
-
}
|
|
27678
|
-
) }),
|
|
27679
|
-
printWhat === "notes" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27680
|
-
NotesPagePreview,
|
|
27681
|
-
{
|
|
27682
|
-
slideIndices: previewSlideIndices,
|
|
27683
|
-
slides,
|
|
27684
|
-
frameSlides
|
|
27685
|
-
}
|
|
27686
|
-
) })
|
|
27687
|
-
] }),
|
|
27688
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-t border-border", children: [
|
|
27689
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: t("pptx.print.pageEstimate", {
|
|
27690
|
-
pages: pageCount,
|
|
27691
|
-
slides: slideCount
|
|
27692
|
-
}) }),
|
|
27693
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27694
|
-
DialogFooter,
|
|
27695
|
-
{
|
|
27696
|
-
actions: [
|
|
27697
|
-
{ id: "cancel", label: t("pptx.common.cancel") },
|
|
27698
|
-
{
|
|
27699
|
-
id: "print",
|
|
27700
|
-
label: t("pptx.print.printButton"),
|
|
27701
|
-
variant: "primary",
|
|
27702
|
-
icon: "print"
|
|
27703
|
-
}
|
|
27704
|
-
],
|
|
27705
|
-
onAction: (id) => id === "print" ? handlePrint() : onClose()
|
|
27740
|
+
region: "dialog.print",
|
|
27741
|
+
renderer: regionRenderer,
|
|
27742
|
+
close: onClose,
|
|
27743
|
+
style: { width: "100%", minHeight: "8rem" }
|
|
27706
27744
|
}
|
|
27707
27745
|
) })
|
|
27746
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
27747
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto px-5 py-4 flex gap-5 max-md:flex-col", children: [
|
|
27748
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27749
|
+
PrintSettingsPanel,
|
|
27750
|
+
{
|
|
27751
|
+
printWhat,
|
|
27752
|
+
onPrintWhatChange: setPrintWhat,
|
|
27753
|
+
orientation,
|
|
27754
|
+
onOrientationChange: setOrientation,
|
|
27755
|
+
colorMode,
|
|
27756
|
+
onColorModeChange: setColorMode,
|
|
27757
|
+
frameSlides,
|
|
27758
|
+
onFrameSlidesChange: setFrameSlides,
|
|
27759
|
+
slidesPerPage,
|
|
27760
|
+
onSlidesPerPageChange: setSlidesPerPage,
|
|
27761
|
+
slideRange,
|
|
27762
|
+
onSlideRangeChange: setSlideRange,
|
|
27763
|
+
customFrom,
|
|
27764
|
+
onCustomFromChange: setCustomFrom,
|
|
27765
|
+
customTo,
|
|
27766
|
+
onCustomToChange: setCustomTo,
|
|
27767
|
+
totalSlides: slides.length,
|
|
27768
|
+
activeSlideIndex
|
|
27769
|
+
}
|
|
27770
|
+
),
|
|
27771
|
+
printWhat === "handouts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27772
|
+
PrintPreview,
|
|
27773
|
+
{
|
|
27774
|
+
slideIndices: previewSlideIndices,
|
|
27775
|
+
slidesPerPage,
|
|
27776
|
+
orientation: effectiveOrientation,
|
|
27777
|
+
frameSlides
|
|
27778
|
+
}
|
|
27779
|
+
) }),
|
|
27780
|
+
printWhat === "notes" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27781
|
+
NotesPagePreview,
|
|
27782
|
+
{
|
|
27783
|
+
slideIndices: previewSlideIndices,
|
|
27784
|
+
slides,
|
|
27785
|
+
frameSlides
|
|
27786
|
+
}
|
|
27787
|
+
) })
|
|
27788
|
+
] }),
|
|
27789
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-t border-border", children: [
|
|
27790
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: t("pptx.print.pageEstimate", {
|
|
27791
|
+
pages: pageCount,
|
|
27792
|
+
slides: slideCount
|
|
27793
|
+
}) }),
|
|
27794
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27795
|
+
DialogFooter,
|
|
27796
|
+
{
|
|
27797
|
+
actions: [
|
|
27798
|
+
{ id: "cancel", label: t("pptx.common.cancel") },
|
|
27799
|
+
{
|
|
27800
|
+
id: "print",
|
|
27801
|
+
label: t("pptx.print.printButton"),
|
|
27802
|
+
variant: "primary",
|
|
27803
|
+
icon: "print"
|
|
27804
|
+
}
|
|
27805
|
+
],
|
|
27806
|
+
onAction: (id) => id === "print" ? handlePrint() : onClose()
|
|
27807
|
+
}
|
|
27808
|
+
) })
|
|
27809
|
+
] })
|
|
27708
27810
|
] })
|
|
27709
27811
|
]
|
|
27710
27812
|
}
|
|
@@ -28021,14 +28123,15 @@ function BroadcastDialog({
|
|
|
28021
28123
|
defaultServerUrl
|
|
28022
28124
|
}) {
|
|
28023
28125
|
const { t } = reactI18next.useTranslation();
|
|
28024
|
-
const
|
|
28126
|
+
const regionRenderer = useRegionRenderer("dialog.broadcast");
|
|
28127
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
28025
28128
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
28026
28129
|
const [roomId, setRoomId] = React103.useState("");
|
|
28027
28130
|
const [userName, setUserName] = React103.useState("");
|
|
28028
28131
|
const [serverUrl, setServerUrl] = React103.useState("");
|
|
28029
28132
|
const [copied, setCopied] = React103.useState(false);
|
|
28030
28133
|
const dialogRef = React103.useRef(null);
|
|
28031
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28134
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onClose);
|
|
28032
28135
|
useModalFocus(open, dialogRef, onClose);
|
|
28033
28136
|
React103.useEffect(() => {
|
|
28034
28137
|
if (open && !isBroadcasting) {
|
|
@@ -28124,41 +28227,54 @@ function BroadcastDialog({
|
|
|
28124
28227
|
]
|
|
28125
28228
|
}
|
|
28126
28229
|
),
|
|
28127
|
-
|
|
28128
|
-
|
|
28129
|
-
{
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
|
|
28133
|
-
|
|
28134
|
-
|
|
28135
|
-
|
|
28136
|
-
|
|
28137
|
-
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
|
|
28141
|
-
|
|
28142
|
-
|
|
28143
|
-
|
|
28144
|
-
|
|
28145
|
-
|
|
28146
|
-
|
|
28147
|
-
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
|
|
28160
|
-
|
|
28161
|
-
|
|
28230
|
+
regionRenderer ? (
|
|
28231
|
+
// The frame (backdrop, title bar, close, dismiss) stays the viewer's; the host replaces the body.
|
|
28232
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28233
|
+
ViewerRegion,
|
|
28234
|
+
{
|
|
28235
|
+
region: "dialog.broadcast",
|
|
28236
|
+
renderer: regionRenderer,
|
|
28237
|
+
close: onClose,
|
|
28238
|
+
style: { width: "100%", minHeight: "8rem" }
|
|
28239
|
+
}
|
|
28240
|
+
) })
|
|
28241
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
28242
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-4", children: isBroadcasting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28243
|
+
ActiveBroadcastView,
|
|
28244
|
+
{
|
|
28245
|
+
collab,
|
|
28246
|
+
broadcastUrl,
|
|
28247
|
+
copied,
|
|
28248
|
+
onCopyUrl: handleCopyUrl,
|
|
28249
|
+
onStopBroadcast: handleStopBroadcast
|
|
28250
|
+
}
|
|
28251
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28252
|
+
StartBroadcastForm,
|
|
28253
|
+
{
|
|
28254
|
+
roomId,
|
|
28255
|
+
userName,
|
|
28256
|
+
serverUrl,
|
|
28257
|
+
onRoomIdChange: setRoomId,
|
|
28258
|
+
onUserNameChange: setUserName,
|
|
28259
|
+
onServerUrlChange: setServerUrl
|
|
28260
|
+
}
|
|
28261
|
+
) }),
|
|
28262
|
+
!isBroadcasting && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end gap-2 px-5 py-3 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28263
|
+
DialogFooter,
|
|
28264
|
+
{
|
|
28265
|
+
actions: [
|
|
28266
|
+
{ id: "close", label: t("pptx.common.close") },
|
|
28267
|
+
{
|
|
28268
|
+
id: "start",
|
|
28269
|
+
label: t("pptx.broadcast.startBroadcast"),
|
|
28270
|
+
variant: "primary",
|
|
28271
|
+
disabled: !canStart
|
|
28272
|
+
}
|
|
28273
|
+
],
|
|
28274
|
+
onAction: (id) => id === "start" ? handleStartBroadcast() : onClose()
|
|
28275
|
+
}
|
|
28276
|
+
) })
|
|
28277
|
+
] })
|
|
28162
28278
|
]
|
|
28163
28279
|
}
|
|
28164
28280
|
)
|
|
@@ -28331,7 +28447,7 @@ function ActiveSessionView({
|
|
|
28331
28447
|
onCopyRoomId,
|
|
28332
28448
|
onStopCollaboration
|
|
28333
28449
|
}) {
|
|
28334
|
-
const { t } = reactI18next.useTranslation(), viewerOptions =
|
|
28450
|
+
const { t } = reactI18next.useTranslation(), viewerOptions = chunkTCEDOLGE_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({
|
|
28335
28451
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
28336
28452
|
localUserInitials: viewerOptions.general.userInitials,
|
|
28337
28453
|
localUserColor: collab.config.userColor,
|
|
@@ -28430,7 +28546,7 @@ function StartSessionForm({
|
|
|
28430
28546
|
onRetry
|
|
28431
28547
|
}) {
|
|
28432
28548
|
const { t } = reactI18next.useTranslation();
|
|
28433
|
-
const { viewportWidth } =
|
|
28549
|
+
const { viewportWidth } = chunkTCEDOLGE_js.useIsMobile();
|
|
28434
28550
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
28435
28551
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
28436
28552
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -28564,9 +28680,10 @@ function ShareDialog({
|
|
|
28564
28680
|
defaultUserName,
|
|
28565
28681
|
defaultServerUrl
|
|
28566
28682
|
}) {
|
|
28567
|
-
const collab =
|
|
28683
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
28568
28684
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
28569
28685
|
const { t } = reactI18next.useTranslation();
|
|
28686
|
+
const regionRenderer = useRegionRenderer("dialog.share");
|
|
28570
28687
|
const [roomId, setRoomId] = React103.useState(defaultRoomId ?? "");
|
|
28571
28688
|
const [userName, setUserName] = React103.useState(defaultUserName ?? "");
|
|
28572
28689
|
const [serverUrl, setServerUrl] = React103.useState(defaultServerUrl ?? "");
|
|
@@ -28574,9 +28691,9 @@ function ShareDialog({
|
|
|
28574
28691
|
const [invitation, setInvitation] = React103.useState("");
|
|
28575
28692
|
const [copied, setCopied] = React103.useState(false);
|
|
28576
28693
|
const dialogRef = React103.useRef(null);
|
|
28577
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28694
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onClose);
|
|
28578
28695
|
useModalFocus(open, dialogRef, onClose);
|
|
28579
|
-
const { viewportWidth, viewportHeight } =
|
|
28696
|
+
const { viewportWidth, viewportHeight } = chunkTCEDOLGE_js.useIsMobile();
|
|
28580
28697
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
28581
28698
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
28582
28699
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -28653,58 +28770,74 @@ function ShareDialog({
|
|
|
28653
28770
|
]
|
|
28654
28771
|
}
|
|
28655
28772
|
),
|
|
28656
|
-
|
|
28657
|
-
|
|
28658
|
-
{
|
|
28659
|
-
|
|
28660
|
-
|
|
28661
|
-
|
|
28662
|
-
|
|
28663
|
-
|
|
28664
|
-
|
|
28665
|
-
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
|
|
28670
|
-
|
|
28671
|
-
|
|
28672
|
-
|
|
28673
|
-
|
|
28674
|
-
|
|
28675
|
-
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28680
|
-
|
|
28681
|
-
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
|
|
28689
|
-
|
|
28690
|
-
|
|
28691
|
-
|
|
28692
|
-
|
|
28773
|
+
regionRenderer ? (
|
|
28774
|
+
// The frame (backdrop, title bar, close, dismiss) stays the viewer's; the host replaces the body.
|
|
28775
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28776
|
+
ViewerRegion,
|
|
28777
|
+
{
|
|
28778
|
+
region: "dialog.share",
|
|
28779
|
+
renderer: regionRenderer,
|
|
28780
|
+
close: onClose,
|
|
28781
|
+
style: { width: "100%", minHeight: "8rem" }
|
|
28782
|
+
}
|
|
28783
|
+
) })
|
|
28784
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
28785
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-4", children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28786
|
+
ActiveSessionView,
|
|
28787
|
+
{
|
|
28788
|
+
collab,
|
|
28789
|
+
activeCollaboration,
|
|
28790
|
+
copied,
|
|
28791
|
+
onCopyRoomId: handleCopyRoomId,
|
|
28792
|
+
onStopCollaboration
|
|
28793
|
+
}
|
|
28794
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28795
|
+
StartSessionForm,
|
|
28796
|
+
{
|
|
28797
|
+
mode,
|
|
28798
|
+
invitation,
|
|
28799
|
+
roomId,
|
|
28800
|
+
userName,
|
|
28801
|
+
serverUrl,
|
|
28802
|
+
onRoomIdChange: setRoomId,
|
|
28803
|
+
onUserNameChange: setUserName,
|
|
28804
|
+
onServerUrlChange: setServerUrl,
|
|
28805
|
+
onModeChange: setMode,
|
|
28806
|
+
onInvitationChange: setInvitation,
|
|
28807
|
+
preconfigured,
|
|
28808
|
+
connectionFailed: collab?.status === "error",
|
|
28809
|
+
onRetry: collab?.retry
|
|
28810
|
+
}
|
|
28811
|
+
) }),
|
|
28812
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28813
|
+
"div",
|
|
28814
|
+
{
|
|
28815
|
+
className: `flex justify-end gap-2 px-5 py-3 border-t border-border ${stickyFooterClass}`,
|
|
28816
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28817
|
+
DialogFooter,
|
|
28818
|
+
{
|
|
28819
|
+
actions: [
|
|
28693
28820
|
{
|
|
28694
|
-
id: "
|
|
28695
|
-
label: t(
|
|
28696
|
-
|
|
28697
|
-
|
|
28698
|
-
|
|
28699
|
-
|
|
28700
|
-
|
|
28701
|
-
|
|
28702
|
-
|
|
28703
|
-
|
|
28704
|
-
|
|
28705
|
-
|
|
28706
|
-
|
|
28707
|
-
|
|
28821
|
+
id: "cancel",
|
|
28822
|
+
label: isActive ? t("pptx.share.close") : t("pptx.share.cancel")
|
|
28823
|
+
},
|
|
28824
|
+
...isActive ? [] : [
|
|
28825
|
+
{
|
|
28826
|
+
id: "start",
|
|
28827
|
+
label: t(
|
|
28828
|
+
mode === "join" ? "pptx.share.joinSession" : "pptx.share.startSharing"
|
|
28829
|
+
),
|
|
28830
|
+
variant: "primary",
|
|
28831
|
+
disabled: !canStart
|
|
28832
|
+
}
|
|
28833
|
+
]
|
|
28834
|
+
],
|
|
28835
|
+
onAction: (id) => id === "start" ? handleStartSharing() : onClose()
|
|
28836
|
+
}
|
|
28837
|
+
)
|
|
28838
|
+
}
|
|
28839
|
+
)
|
|
28840
|
+
] })
|
|
28708
28841
|
]
|
|
28709
28842
|
}
|
|
28710
28843
|
)
|
|
@@ -28859,12 +28992,12 @@ function HyperlinkEditDialog({
|
|
|
28859
28992
|
onCancel
|
|
28860
28993
|
}) {
|
|
28861
28994
|
const { t } = reactI18next.useTranslation();
|
|
28862
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28995
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onCancel);
|
|
28863
28996
|
const inputRef = React103.useRef(null);
|
|
28864
|
-
const detectedType =
|
|
28865
|
-
const emailParts =
|
|
28866
|
-
const detectedSlide =
|
|
28867
|
-
const detectedVerb = initialAction ?
|
|
28997
|
+
const detectedType = chunkTCEDOLGE_js.detectTargetType(initialUrl, initialAction);
|
|
28998
|
+
const emailParts = chunkTCEDOLGE_js.parseEmailUrl(initialUrl || "");
|
|
28999
|
+
const detectedSlide = chunkTCEDOLGE_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
29000
|
+
const detectedVerb = initialAction ? chunkTCEDOLGE_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28868
29001
|
const [targetType, setTargetType] = React103.useState(detectedType);
|
|
28869
29002
|
const [url, setUrl] = React103.useState(
|
|
28870
29003
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -29054,13 +29187,14 @@ function ViewerOverlays({
|
|
|
29054
29187
|
reducedMotion,
|
|
29055
29188
|
onToggleReducedMotion
|
|
29056
29189
|
}) {
|
|
29190
|
+
const customization = useViewerCustomizationContext();
|
|
29057
29191
|
const hasOverlay = isShortcutHelpOpen || isAccessibilityPanelOpen || showSlideSorter || showReadingView || showOutlineView;
|
|
29058
29192
|
if (!hasOverlay) {
|
|
29059
29193
|
return null;
|
|
29060
29194
|
}
|
|
29061
29195
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
29062
29196
|
isShortcutHelpOpen && /* @__PURE__ */ jsxRuntime.jsx(ShortcutPanel, { isOpen: isShortcutHelpOpen, onClose: onCloseShortcuts }),
|
|
29063
|
-
isAccessibilityPanelOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29197
|
+
isAccessibilityPanelOpen && pptx.isPanelVisible(customization, "accessibilityPane") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29064
29198
|
AccessibilityPanel,
|
|
29065
29199
|
{
|
|
29066
29200
|
isOpen: isAccessibilityPanelOpen,
|
|
@@ -29140,12 +29274,41 @@ function ViewerBottomPanels({
|
|
|
29140
29274
|
notesStyle,
|
|
29141
29275
|
onNotesHeightChange
|
|
29142
29276
|
}) {
|
|
29143
|
-
const { isHidden } =
|
|
29277
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(hiddenActions);
|
|
29144
29278
|
const customization = useViewerCustomizationContext();
|
|
29145
29279
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
29280
|
+
const notesRenderer = useRegionRenderer("notes");
|
|
29281
|
+
const statusBarRenderer = useRegionRenderer("statusBar");
|
|
29282
|
+
const [notesSlot, setNotesSlot] = React103.useState(null);
|
|
29283
|
+
const reportsNotesHeight = Boolean(showNotes && notesRenderer);
|
|
29284
|
+
React103.useEffect(() => {
|
|
29285
|
+
if (!notesSlot || !reportsNotesHeight || !onNotesHeightChange) {
|
|
29286
|
+
return void 0;
|
|
29287
|
+
}
|
|
29288
|
+
const stop2 = pptx.observeElementHeight(notesSlot, onNotesHeightChange);
|
|
29289
|
+
return () => {
|
|
29290
|
+
stop2();
|
|
29291
|
+
onNotesHeightChange(0);
|
|
29292
|
+
};
|
|
29293
|
+
}, [notesSlot, reportsNotesHeight, onNotesHeightChange]);
|
|
29146
29294
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
29147
29295
|
showNotes && onResizeBottom && !isSlideNotesCollapsed && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { direction: "vertical", onResize: onResizeBottom }),
|
|
29148
|
-
showNotes &&
|
|
29296
|
+
showNotes && notesRenderer && // The slot (height, resize handle, collapse) stays the viewer's; a
|
|
29297
|
+
// collapsed strip is hidden, not unmounted, so the host keeps its state.
|
|
29298
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29299
|
+
"div",
|
|
29300
|
+
{
|
|
29301
|
+
ref: setNotesSlot,
|
|
29302
|
+
"data-pptx-chrome": "notes",
|
|
29303
|
+
className: "flex-shrink-0 overflow-hidden border-t border-border/60 bg-background",
|
|
29304
|
+
style: {
|
|
29305
|
+
height: notesPanelHeight ?? 120,
|
|
29306
|
+
display: isSlideNotesCollapsed ? "none" : void 0
|
|
29307
|
+
},
|
|
29308
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegion, { region: "notes", renderer: notesRenderer })
|
|
29309
|
+
}
|
|
29310
|
+
),
|
|
29311
|
+
showNotes && !notesRenderer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29149
29312
|
SlideNotesPanel,
|
|
29150
29313
|
{
|
|
29151
29314
|
activeSlide,
|
|
@@ -29159,7 +29322,8 @@ function ViewerBottomPanels({
|
|
|
29159
29322
|
onHeightChange: onNotesHeightChange
|
|
29160
29323
|
}
|
|
29161
29324
|
),
|
|
29162
|
-
!hideStatusBar && pptx.isPanelVisible(customization, "statusBar") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29325
|
+
!hideStatusBar && pptx.isPanelVisible(customization, "statusBar") && statusBarRenderer && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-pptx-chrome": "status-bar", className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegion, { region: "statusBar", renderer: statusBarRenderer }) }),
|
|
29326
|
+
!hideStatusBar && pptx.isPanelVisible(customization, "statusBar") && !statusBarRenderer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29163
29327
|
StatusBar,
|
|
29164
29328
|
{
|
|
29165
29329
|
slideCount,
|
|
@@ -29238,9 +29402,23 @@ function ViewerInspector({
|
|
|
29238
29402
|
panelWidth
|
|
29239
29403
|
}) {
|
|
29240
29404
|
const { t } = reactI18next.useTranslation();
|
|
29405
|
+
const regionRenderer = useRegionRenderer("inspector");
|
|
29241
29406
|
if (!isOpen) {
|
|
29242
29407
|
return null;
|
|
29243
29408
|
}
|
|
29409
|
+
if (regionRenderer) {
|
|
29410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29411
|
+
"div",
|
|
29412
|
+
{
|
|
29413
|
+
"data-pptx-inspector": true,
|
|
29414
|
+
role: "complementary",
|
|
29415
|
+
"aria-label": t("pptx.inspector.properties"),
|
|
29416
|
+
className: "h-full flex-shrink-0 max-md:absolute max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:z-30",
|
|
29417
|
+
style: panelWidth ? { width: panelWidth } : void 0,
|
|
29418
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegion, { region: "inspector", renderer: regionRenderer, close: onClose })
|
|
29419
|
+
}
|
|
29420
|
+
);
|
|
29421
|
+
}
|
|
29244
29422
|
const slideId = activeSlide?.id ?? "";
|
|
29245
29423
|
const commentDraft = comments.commentDraftBySlideId[slideId] ?? "";
|
|
29246
29424
|
const editingCommentId = comments.editingCommentIdBySlideId[slideId] ?? null;
|
|
@@ -29486,7 +29664,7 @@ function ViewerToolbarSection(props) {
|
|
|
29486
29664
|
[activeSlide, propertyHandlers]
|
|
29487
29665
|
);
|
|
29488
29666
|
const scopedLayoutOptions = React103__default.default.useMemo(
|
|
29489
|
-
() =>
|
|
29667
|
+
() => chunkTCEDOLGE_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
29490
29668
|
[s.layoutOptions, activeSlide]
|
|
29491
29669
|
);
|
|
29492
29670
|
const handleResetSlide = React103.useCallback(() => {
|
|
@@ -29889,7 +30067,7 @@ function ViewerToolbarSection(props) {
|
|
|
29889
30067
|
},
|
|
29890
30068
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
29891
30069
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29892
|
-
reviewComments:
|
|
30070
|
+
reviewComments: chunkTCEDOLGE_js.createReviewCommentsHost({
|
|
29893
30071
|
state: s,
|
|
29894
30072
|
activeSlideIndex,
|
|
29895
30073
|
updateSlides: ops.updateSlides,
|
|
@@ -29983,7 +30161,7 @@ function EquationEditorDialog({
|
|
|
29983
30161
|
existingOmml
|
|
29984
30162
|
}) {
|
|
29985
30163
|
const { t } = reactI18next.useTranslation();
|
|
29986
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
30164
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onClose);
|
|
29987
30165
|
const initialLatex = React103.useMemo(() => {
|
|
29988
30166
|
if (!existingOmml) {
|
|
29989
30167
|
return "";
|
|
@@ -30171,7 +30349,7 @@ function getPreviewForLayout(layout) {
|
|
|
30171
30349
|
transform: `scale(${scale})`,
|
|
30172
30350
|
transformOrigin: "top left"
|
|
30173
30351
|
},
|
|
30174
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30352
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.SmartArtRenderer, { element: pptx.buildSmartArtPreviewElement(layout) })
|
|
30175
30353
|
}
|
|
30176
30354
|
)
|
|
30177
30355
|
}
|
|
@@ -30183,7 +30361,7 @@ function InsertSmartArtDialog({
|
|
|
30183
30361
|
onInsert
|
|
30184
30362
|
}) {
|
|
30185
30363
|
const { t } = reactI18next.useTranslation();
|
|
30186
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
30364
|
+
const { panelStyle, handlers: dragHandlers } = chunkTCEDOLGE_js.useModalDismissDrag(onClose);
|
|
30187
30365
|
const [activeCategory, setActiveCategory] = React103.useState("list");
|
|
30188
30366
|
const [selectedLayout, setSelectedLayout] = React103.useState(null);
|
|
30189
30367
|
const dialogRef = React103.useRef(null);
|
|
@@ -30355,7 +30533,8 @@ function ViewerDialogGroup(props) {
|
|
|
30355
30533
|
onKeepAnnotations,
|
|
30356
30534
|
onDiscardAnnotations
|
|
30357
30535
|
} = props;
|
|
30358
|
-
const
|
|
30536
|
+
const customization = useViewerCustomizationContext();
|
|
30537
|
+
const printAvailable = pptx.isDialogAvailable(customization, "print");
|
|
30359
30538
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30360
30539
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30361
30540
|
VersionHistoryPanel,
|
|
@@ -30369,7 +30548,7 @@ function ViewerDialogGroup(props) {
|
|
|
30369
30548
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30370
30549
|
ComparePanel,
|
|
30371
30550
|
{
|
|
30372
|
-
isOpen: propertyHandlers.isComparePanelOpen,
|
|
30551
|
+
isOpen: propertyHandlers.isComparePanelOpen && pptx.isPanelVisible(customization, "comparePane"),
|
|
30373
30552
|
compareResult: propertyHandlers.compareResult,
|
|
30374
30553
|
canvasSize,
|
|
30375
30554
|
onClose: () => propertyHandlers.setIsComparePanelOpen(false),
|
|
@@ -30381,7 +30560,7 @@ function ViewerDialogGroup(props) {
|
|
|
30381
30560
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30382
30561
|
PasswordProtectionDialog,
|
|
30383
30562
|
{
|
|
30384
|
-
isOpen: dialogs.isPasswordDialogOpen,
|
|
30563
|
+
isOpen: dialogs.isPasswordDialogOpen && pptx.isDialogAvailable(customization, "passwordProtection"),
|
|
30385
30564
|
isCurrentlyProtected: dialogs.isPasswordProtected,
|
|
30386
30565
|
onClose: () => dialogs.setIsPasswordDialogOpen(false),
|
|
30387
30566
|
onSetPassword: dialogs.handleSetPassword,
|
|
@@ -30421,7 +30600,7 @@ function ViewerDialogGroup(props) {
|
|
|
30421
30600
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30422
30601
|
DigitalSignaturesDialog,
|
|
30423
30602
|
{
|
|
30424
|
-
isOpen: dialogs.isDigitalSigDialogOpen,
|
|
30603
|
+
isOpen: dialogs.isDigitalSigDialogOpen && pptx.isDialogAvailable(customization, "signatures"),
|
|
30425
30604
|
onClose: () => dialogs.setIsDigitalSigDialogOpen(false),
|
|
30426
30605
|
hasSignatures: hasDigitalSignatures,
|
|
30427
30606
|
signatureCount: digitalSignatureCount
|
|
@@ -30454,7 +30633,7 @@ function ViewerDialogGroup(props) {
|
|
|
30454
30633
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30455
30634
|
EquationEditorDialog,
|
|
30456
30635
|
{
|
|
30457
|
-
isOpen: dialogs.isEquationDialogOpen,
|
|
30636
|
+
isOpen: dialogs.isEquationDialogOpen && pptx.isDialogAvailable(customization, "equation"),
|
|
30458
30637
|
onClose: () => dialogs.setIsEquationDialogOpen(false),
|
|
30459
30638
|
onInsert: dialogs.editingEquationOmml ? insertHandlers.handleUpdateEquation : insertHandlers.handleInsertEquation,
|
|
30460
30639
|
existingOmml: dialogs.editingEquationOmml
|
|
@@ -30463,7 +30642,7 @@ function ViewerDialogGroup(props) {
|
|
|
30463
30642
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30464
30643
|
HyperlinkEditDialog,
|
|
30465
30644
|
{
|
|
30466
|
-
open: dialogs.isHyperlinkDialogOpen,
|
|
30645
|
+
open: dialogs.isHyperlinkDialogOpen && pptx.isDialogAvailable(customization, "hyperlink"),
|
|
30467
30646
|
initialUrl: selectedElements[0]?.actionClick?.url,
|
|
30468
30647
|
initialTooltip: selectedElements[0]?.actionClick?.tooltip,
|
|
30469
30648
|
initialAction: selectedElements[0]?.actionClick?.action,
|
|
@@ -30789,11 +30968,11 @@ function PresentationStage({
|
|
|
30789
30968
|
})
|
|
30790
30969
|
},
|
|
30791
30970
|
children: [
|
|
30792
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30971
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
30793
30972
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
30794
30973
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
30795
30974
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30796
|
-
|
|
30975
|
+
chunkTCEDOLGE_js.ElementRenderer,
|
|
30797
30976
|
{
|
|
30798
30977
|
element,
|
|
30799
30978
|
activeSlide,
|
|
@@ -30830,7 +31009,7 @@ function PresentationStage({
|
|
|
30830
31009
|
`tpl-${element.id}`
|
|
30831
31010
|
)),
|
|
30832
31011
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30833
|
-
|
|
31012
|
+
chunkTCEDOLGE_js.ElementRenderer,
|
|
30834
31013
|
{
|
|
30835
31014
|
element,
|
|
30836
31015
|
activeSlide,
|
|
@@ -30923,6 +31102,7 @@ function PresentationContextMenu(p) {
|
|
|
30923
31102
|
);
|
|
30924
31103
|
}
|
|
30925
31104
|
function ViewerCanvasArea(props) {
|
|
31105
|
+
const customization = useViewerCustomizationContext();
|
|
30926
31106
|
const {
|
|
30927
31107
|
mode,
|
|
30928
31108
|
canEdit,
|
|
@@ -30951,8 +31131,8 @@ function ViewerCanvasArea(props) {
|
|
|
30951
31131
|
aiCanvasActive = false
|
|
30952
31132
|
} = props;
|
|
30953
31133
|
const { t } = reactI18next.useTranslation();
|
|
30954
|
-
const { isHidden } =
|
|
30955
|
-
const viewerOptions =
|
|
31134
|
+
const { isHidden } = chunkTCEDOLGE_js.useToolbarVisibility(hiddenActions);
|
|
31135
|
+
const viewerOptions = chunkTCEDOLGE_js.useViewerOptionsContext();
|
|
30956
31136
|
const outlineAuthoring = useOutlineAuthoring({
|
|
30957
31137
|
state: s,
|
|
30958
31138
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -31090,7 +31270,7 @@ ${url}`)) {
|
|
|
31090
31270
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
31091
31271
|
}
|
|
31092
31272
|
}, [mode, presentation, s]);
|
|
31093
|
-
const swipe =
|
|
31273
|
+
const swipe = chunkTCEDOLGE_js.useSwipeNavigation({
|
|
31094
31274
|
enabled: swipeEnabled,
|
|
31095
31275
|
onNext: handleSwipeNext,
|
|
31096
31276
|
onPrev: handleSwipePrev
|
|
@@ -31115,7 +31295,7 @@ ${url}`)) {
|
|
|
31115
31295
|
onTouchEnd: swipe.onTouchEnd,
|
|
31116
31296
|
onContextMenu: mode === "present" ? handlePresentationContextMenu : void 0,
|
|
31117
31297
|
children: [
|
|
31118
|
-
findReplace.findReplaceOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31298
|
+
findReplace.findReplaceOpen && pptx.isPanelVisible(customization, "findReplace") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31119
31299
|
FindReplacePanel,
|
|
31120
31300
|
{
|
|
31121
31301
|
findQuery: findReplace.findQuery,
|
|
@@ -31170,7 +31350,7 @@ ${url}`)) {
|
|
|
31170
31350
|
),
|
|
31171
31351
|
children: (stageScale) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31172
31352
|
presentation.transitionOverlay && slides[presentation.transitionOverlay.outgoingSlideIndex] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31173
|
-
|
|
31353
|
+
chunkTCEDOLGE_js.PresentationTransitionOverlay,
|
|
31174
31354
|
{
|
|
31175
31355
|
outgoingSlide: slides[presentation.transitionOverlay.outgoingSlideIndex],
|
|
31176
31356
|
templateElements,
|
|
@@ -31281,14 +31461,14 @@ ${url}`)) {
|
|
|
31281
31461
|
outlineAuthoring,
|
|
31282
31462
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31283
31463
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31284
|
-
|
|
31464
|
+
chunkTCEDOLGE_js.RemoteSelectionOverlay,
|
|
31285
31465
|
{
|
|
31286
31466
|
elements: effectiveSlide?.elements ?? [],
|
|
31287
31467
|
activeSlideIndex
|
|
31288
31468
|
}
|
|
31289
31469
|
),
|
|
31290
31470
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31291
|
-
|
|
31471
|
+
chunkTCEDOLGE_js.CollaborationCursorOverlay,
|
|
31292
31472
|
{
|
|
31293
31473
|
activeSlideIndex,
|
|
31294
31474
|
canvasWidth: canvasSize.width,
|
|
@@ -31589,7 +31769,7 @@ function MobileDismissSheet({
|
|
|
31589
31769
|
children
|
|
31590
31770
|
}) {
|
|
31591
31771
|
const { t } = reactI18next.useTranslation();
|
|
31592
|
-
const { dragY, handlers } =
|
|
31772
|
+
const { dragY, handlers } = chunkTCEDOLGE_js.useSheetDismissDrag(onClose);
|
|
31593
31773
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31594
31774
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31595
31775
|
"button",
|
|
@@ -32105,7 +32285,7 @@ function ViewerSidePanels(props) {
|
|
|
32105
32285
|
panelWidth
|
|
32106
32286
|
}
|
|
32107
32287
|
),
|
|
32108
|
-
s.isSelectionPaneOpen && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32288
|
+
s.isSelectionPaneOpen && pptx.isPanelVisible(customization, "selectionPane") && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32109
32289
|
MobileDismissSheet,
|
|
32110
32290
|
{
|
|
32111
32291
|
onClose: () => s.setIsSelectionPaneOpen(false),
|
|
@@ -32300,6 +32480,7 @@ function ViewerMainContent(props) {
|
|
|
32300
32480
|
onApplyLayout,
|
|
32301
32481
|
loadLayoutPreviews
|
|
32302
32482
|
} = props;
|
|
32483
|
+
const slidesPaneRenderer = useRegionRenderer("slidesPane");
|
|
32303
32484
|
const {
|
|
32304
32485
|
ops,
|
|
32305
32486
|
sectionOps,
|
|
@@ -32327,9 +32508,24 @@ function ViewerMainContent(props) {
|
|
|
32327
32508
|
);
|
|
32328
32509
|
const layoutGalleryAnchorRef = React103.useRef(null);
|
|
32329
32510
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
32330
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32511
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
32331
32512
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32332
|
-
|
|
32513
|
+
slidesPaneRenderer ? (
|
|
32514
|
+
// The rail's slot (width, collapse, resize handle) stays the viewer's.
|
|
32515
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32516
|
+
"div",
|
|
32517
|
+
{
|
|
32518
|
+
"data-pptx-chrome": "slides",
|
|
32519
|
+
className: "h-full flex-shrink-0 overflow-hidden border-r border-border bg-secondary/30",
|
|
32520
|
+
style: {
|
|
32521
|
+
width: leftPanelWidth ?? 220,
|
|
32522
|
+
// Same collapse rule as the built-in rail; hidden, not unmounted.
|
|
32523
|
+
display: state.isSlidesPaneOpen ? void 0 : "none"
|
|
32524
|
+
},
|
|
32525
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegion, { region: "slidesPane", renderer: slidesPaneRenderer })
|
|
32526
|
+
}
|
|
32527
|
+
)
|
|
32528
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
32333
32529
|
SlidesPaneSidebar,
|
|
32334
32530
|
{
|
|
32335
32531
|
slides,
|
|
@@ -32817,7 +33013,7 @@ function MobileChromeOverlay(props) {
|
|
|
32817
33013
|
slideSectionGroups,
|
|
32818
33014
|
canEdit,
|
|
32819
33015
|
commentCount
|
|
32820
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
33016
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunkTCEDOLGE_js.useKeyboardInsets(), activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
32821
33017
|
s.setIsSlidesPaneOpen(false);
|
|
32822
33018
|
s.setIsInspectorPaneOpen(false);
|
|
32823
33019
|
s.setIsSlideNotesCollapsed(true);
|
|
@@ -33075,157 +33271,6 @@ function OptionsAddInsPane({ addinStatus }) {
|
|
|
33075
33271
|
] })
|
|
33076
33272
|
] });
|
|
33077
33273
|
}
|
|
33078
|
-
function readValue(options, control) {
|
|
33079
|
-
const group = options[control.group];
|
|
33080
|
-
const value = group[control.key];
|
|
33081
|
-
return typeof value === "boolean" || typeof value === "number" || typeof value === "string" ? value : void 0;
|
|
33082
|
-
}
|
|
33083
|
-
function InfoTip({ text }) {
|
|
33084
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { title: text, className: "inline-flex cursor-help align-middle", children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuInfo, { className: "ml-1 h-3.5 w-3.5 text-primary/70", "aria-label": text }) });
|
|
33085
|
-
}
|
|
33086
|
-
var IGNORE_CHANGE = () => void 0;
|
|
33087
|
-
function ControlRow({
|
|
33088
|
-
control,
|
|
33089
|
-
options,
|
|
33090
|
-
onOptionChange: emitChange
|
|
33091
|
-
}) {
|
|
33092
|
-
const { t } = reactI18next.useTranslation();
|
|
33093
|
-
const { viewportWidth } = chunkYAODOVJY_js.useIsMobile();
|
|
33094
|
-
const fieldMinHeight = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
33095
|
-
const value = readValue(options, control);
|
|
33096
|
-
const label = t(control.labelKey);
|
|
33097
|
-
const info = control.infoKey ? /* @__PURE__ */ jsxRuntime.jsx(InfoTip, { text: t(control.infoKey) }) : null;
|
|
33098
|
-
const rowClass = chunk43TOUP5U_js.cn("flex items-center justify-between gap-3 py-1.5", control.indent && "pl-6");
|
|
33099
|
-
const rowStyle = { minHeight: fieldMinHeight };
|
|
33100
|
-
const locked = control.readOnly === true;
|
|
33101
|
-
const lockedTitle = locked ? t("pptx.options.lockedByHost") : void 0;
|
|
33102
|
-
const onOptionChange = locked ? IGNORE_CHANGE : emitChange;
|
|
33103
|
-
if (control.kind === "toggle") {
|
|
33104
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: chunk43TOUP5U_js.cn(rowClass, "cursor-pointer select-none"), style: rowStyle, children: [
|
|
33105
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-foreground", children: [
|
|
33106
|
-
label,
|
|
33107
|
-
info
|
|
33108
|
-
] }),
|
|
33109
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33110
|
-
WebCheckbox,
|
|
33111
|
-
{
|
|
33112
|
-
checked: value === true,
|
|
33113
|
-
"aria-label": label,
|
|
33114
|
-
disabled: locked,
|
|
33115
|
-
title: lockedTitle,
|
|
33116
|
-
onChange: (event) => onOptionChange(
|
|
33117
|
-
control.group,
|
|
33118
|
-
control.key,
|
|
33119
|
-
event.currentTarget.checked
|
|
33120
|
-
)
|
|
33121
|
-
}
|
|
33122
|
-
)
|
|
33123
|
-
] });
|
|
33124
|
-
}
|
|
33125
|
-
if (control.kind === "select") {
|
|
33126
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rowClass, style: rowStyle, children: [
|
|
33127
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-foreground", children: [
|
|
33128
|
-
label,
|
|
33129
|
-
info
|
|
33130
|
-
] }),
|
|
33131
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33132
|
-
WebSelect,
|
|
33133
|
-
{
|
|
33134
|
-
"aria-label": label,
|
|
33135
|
-
disabled: locked,
|
|
33136
|
-
title: lockedTitle,
|
|
33137
|
-
style: { minHeight: fieldMinHeight },
|
|
33138
|
-
value: typeof value === "string" ? value : "",
|
|
33139
|
-
onChange: (event) => onOptionChange(
|
|
33140
|
-
control.group,
|
|
33141
|
-
control.key,
|
|
33142
|
-
event.currentTarget.value
|
|
33143
|
-
),
|
|
33144
|
-
children: control.choices.map((choice) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: choice.value, children: t(choice.labelKey) }, choice.value))
|
|
33145
|
-
}
|
|
33146
|
-
)
|
|
33147
|
-
] });
|
|
33148
|
-
}
|
|
33149
|
-
if (control.kind === "number") {
|
|
33150
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rowClass, style: rowStyle, children: [
|
|
33151
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-foreground", children: [
|
|
33152
|
-
label,
|
|
33153
|
-
info
|
|
33154
|
-
] }),
|
|
33155
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
33156
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33157
|
-
"input",
|
|
33158
|
-
{
|
|
33159
|
-
type: "number",
|
|
33160
|
-
"aria-label": label,
|
|
33161
|
-
disabled: locked,
|
|
33162
|
-
title: lockedTitle,
|
|
33163
|
-
style: { minHeight: fieldMinHeight },
|
|
33164
|
-
className: "w-20 rounded border border-border bg-background px-2 py-1 text-right text-xs text-foreground",
|
|
33165
|
-
min: control.min,
|
|
33166
|
-
max: control.max,
|
|
33167
|
-
step: control.step ?? 1,
|
|
33168
|
-
value: typeof value === "number" ? value : control.min,
|
|
33169
|
-
onChange: (event) => {
|
|
33170
|
-
const clamped = pptx.clampOptionNumber(event.target.value, control.min, control.max);
|
|
33171
|
-
if (clamped !== void 0) {
|
|
33172
|
-
onOptionChange(control.group, control.key, clamped);
|
|
33173
|
-
}
|
|
33174
|
-
}
|
|
33175
|
-
}
|
|
33176
|
-
),
|
|
33177
|
-
control.unitKey && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: t(control.unitKey) })
|
|
33178
|
-
] })
|
|
33179
|
-
] });
|
|
33180
|
-
}
|
|
33181
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rowClass, style: rowStyle, children: [
|
|
33182
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-foreground", children: [
|
|
33183
|
-
label,
|
|
33184
|
-
info
|
|
33185
|
-
] }),
|
|
33186
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33187
|
-
"input",
|
|
33188
|
-
{
|
|
33189
|
-
type: "text",
|
|
33190
|
-
"aria-label": label,
|
|
33191
|
-
disabled: locked,
|
|
33192
|
-
title: lockedTitle,
|
|
33193
|
-
style: { minHeight: fieldMinHeight },
|
|
33194
|
-
className: "w-48 max-w-[55%] rounded border border-border bg-background px-2 py-1 text-xs text-foreground",
|
|
33195
|
-
maxLength: control.maxLength,
|
|
33196
|
-
value: typeof value === "string" ? value : "",
|
|
33197
|
-
onChange: (event) => onOptionChange(control.group, control.key, event.target.value)
|
|
33198
|
-
}
|
|
33199
|
-
)
|
|
33200
|
-
] });
|
|
33201
|
-
}
|
|
33202
|
-
function OptionsPane({
|
|
33203
|
-
tab,
|
|
33204
|
-
options,
|
|
33205
|
-
onOptionChange,
|
|
33206
|
-
renderSpecial,
|
|
33207
|
-
children
|
|
33208
|
-
}) {
|
|
33209
|
-
const { t } = reactI18next.useTranslation();
|
|
33210
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
33211
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: t(tab.descriptionKey) }),
|
|
33212
|
-
tab.sections.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
33213
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-1 border-b border-border/60 pb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: t(section.titleKey) }),
|
|
33214
|
-
section.descriptionKey && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t(section.descriptionKey) }),
|
|
33215
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: section.controls.map((control) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33216
|
-
ControlRow,
|
|
33217
|
-
{
|
|
33218
|
-
control,
|
|
33219
|
-
options,
|
|
33220
|
-
onOptionChange
|
|
33221
|
-
},
|
|
33222
|
-
`${control.group}.${control.key}.${section.id}`
|
|
33223
|
-
)) }),
|
|
33224
|
-
section.special && renderSpecial?.(section)
|
|
33225
|
-
] }, section.id)),
|
|
33226
|
-
children
|
|
33227
|
-
] });
|
|
33228
|
-
}
|
|
33229
33274
|
function CommandList({
|
|
33230
33275
|
title,
|
|
33231
33276
|
commandIds,
|
|
@@ -33452,7 +33497,7 @@ async function exportAiChatLogs(options) {
|
|
|
33452
33497
|
chats,
|
|
33453
33498
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
33454
33499
|
(filename, content, mime) => {
|
|
33455
|
-
|
|
33500
|
+
chunkTCEDOLGE_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
33456
33501
|
}
|
|
33457
33502
|
);
|
|
33458
33503
|
}
|
|
@@ -33670,10 +33715,11 @@ function SettingsLanguageTab({
|
|
|
33670
33715
|
);
|
|
33671
33716
|
}) });
|
|
33672
33717
|
}
|
|
33673
|
-
var AI_TAB_ID = "ai";
|
|
33674
33718
|
var NO_CUSTOM_FONT_FAMILIES = [];
|
|
33675
|
-
function SettingsDialog({
|
|
33676
|
-
isOpen,
|
|
33719
|
+
function SettingsDialog(props) {
|
|
33720
|
+
return props.isOpen ? /* @__PURE__ */ jsxRuntime.jsx(OpenSettingsDialog, { ...props }) : null;
|
|
33721
|
+
}
|
|
33722
|
+
function OpenSettingsDialog({
|
|
33677
33723
|
onClose,
|
|
33678
33724
|
options,
|
|
33679
33725
|
onOptionChange,
|
|
@@ -33694,272 +33740,98 @@ function SettingsDialog({
|
|
|
33694
33740
|
customFontFamilies = NO_CUSTOM_FONT_FAMILIES,
|
|
33695
33741
|
onCustomFontRegistered
|
|
33696
33742
|
}) {
|
|
33697
|
-
const [activeTabId, setActiveTabId] = React103.useState("general");
|
|
33698
33743
|
const { t } = reactI18next.useTranslation();
|
|
33699
33744
|
const customization = useViewerCustomizationContext();
|
|
33700
|
-
const
|
|
33701
|
-
const
|
|
33702
|
-
|
|
33703
|
-
|
|
33704
|
-
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
33705
|
-
const footerBtnStyle = { minHeight: touchTargetPx };
|
|
33706
|
-
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
33707
|
-
const snapshotRef = React103.useRef(null);
|
|
33708
|
-
const wasOpenRef = React103.useRef(false);
|
|
33709
|
-
React103.useEffect(() => {
|
|
33710
|
-
if (isOpen && !wasOpenRef.current) {
|
|
33711
|
-
snapshotRef.current = options;
|
|
33712
|
-
}
|
|
33713
|
-
wasOpenRef.current = isOpen;
|
|
33714
|
-
}, [isOpen, options]);
|
|
33715
|
-
const handleCancel = React103.useCallback(() => {
|
|
33716
|
-
if (snapshotRef.current) {
|
|
33717
|
-
onRestoreOptions(snapshotRef.current);
|
|
33718
|
-
}
|
|
33719
|
-
onClose();
|
|
33720
|
-
}, [onClose, onRestoreOptions]);
|
|
33721
|
-
const handleKeyDown = React103.useCallback(
|
|
33722
|
-
(e) => {
|
|
33723
|
-
if (e.key === "Escape") {
|
|
33724
|
-
onClose();
|
|
33725
|
-
}
|
|
33726
|
-
},
|
|
33727
|
-
[onClose]
|
|
33745
|
+
const regionBase = React103.useContext(ViewerRegionBaseContext);
|
|
33746
|
+
const regionContext = React103.useMemo(
|
|
33747
|
+
() => regionBase ? { ...regionBase, region: "dialog.options", close: onClose } : null,
|
|
33748
|
+
[regionBase, onClose]
|
|
33728
33749
|
);
|
|
33729
|
-
React103.
|
|
33730
|
-
|
|
33731
|
-
|
|
33732
|
-
|
|
33733
|
-
|
|
33734
|
-
|
|
33735
|
-
|
|
33736
|
-
|
|
33737
|
-
|
|
33738
|
-
|
|
33739
|
-
|
|
33740
|
-
|
|
33741
|
-
|
|
33742
|
-
|
|
33743
|
-
return
|
|
33744
|
-
|
|
33745
|
-
|
|
33746
|
-
|
|
33747
|
-
|
|
33748
|
-
|
|
33750
|
+
const dialogRef = React103.useRef(null);
|
|
33751
|
+
const bindingRef = React103.useRef(null);
|
|
33752
|
+
const [category, setCategory] = React103.useState("general");
|
|
33753
|
+
const latest = React103.useRef({ onClose, onOptionChange, onRestoreOptions, onResetOptions });
|
|
33754
|
+
latest.current = { onClose, onOptionChange, onRestoreOptions, onResetOptions };
|
|
33755
|
+
React103.useLayoutEffect(() => {
|
|
33756
|
+
const binding = pptx.bindPptxOptionsDialog(dialogRef.current, {
|
|
33757
|
+
setOption: (group, key, value) => latest.current.onOptionChange(group, key, value),
|
|
33758
|
+
restoreOptions: (snapshot) => latest.current.onRestoreOptions(snapshot),
|
|
33759
|
+
resetOptions: () => latest.current.onResetOptions(),
|
|
33760
|
+
close: () => latest.current.onClose(),
|
|
33761
|
+
categoryChanged: setCategory
|
|
33762
|
+
});
|
|
33763
|
+
bindingRef.current = binding;
|
|
33764
|
+
return () => {
|
|
33765
|
+
binding.dispose();
|
|
33766
|
+
bindingRef.current = null;
|
|
33767
|
+
};
|
|
33768
|
+
}, []);
|
|
33769
|
+
React103.useLayoutEffect(() => {
|
|
33770
|
+
bindingRef.current?.sync({
|
|
33771
|
+
options,
|
|
33772
|
+
t,
|
|
33773
|
+
customization,
|
|
33774
|
+
aiEnabled: Boolean(aiEnabled),
|
|
33775
|
+
regionContext
|
|
33776
|
+
});
|
|
33777
|
+
}, [options, t, customization, aiEnabled, regionContext]);
|
|
33778
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("pptx-ui-options-dialog", { ref: dialogRef, children: [
|
|
33779
|
+
category === "general" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33780
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsBlockSlot("themePicker"), className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33781
|
+
SettingsAppearanceTab,
|
|
33782
|
+
{
|
|
33783
|
+
activeThemeKey: themeKey,
|
|
33784
|
+
themes: availableThemes,
|
|
33785
|
+
onSelectTheme
|
|
33786
|
+
}
|
|
33787
|
+
) }),
|
|
33788
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsBlockSlot("customFonts"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33789
|
+
SettingsCustomFontsSection,
|
|
33790
|
+
{
|
|
33791
|
+
enabled: options.general.enableCustomFontUpload,
|
|
33792
|
+
families: customFontFamilies,
|
|
33793
|
+
onRegistered: (family) => onCustomFontRegistered?.(family)
|
|
33794
|
+
}
|
|
33795
|
+
) })
|
|
33796
|
+
] }),
|
|
33797
|
+
category === "save" && /* @__PURE__ */ jsxRuntime.jsxs("div", { slot: pptx.optionsBlockSlot("clearCache"), className: "mt-2", children: [
|
|
33798
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t("pptx.options.save.clearCacheDescription") }),
|
|
33799
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33800
|
+
"button",
|
|
33801
|
+
{
|
|
33802
|
+
type: "button",
|
|
33803
|
+
onClick: onClearCache,
|
|
33804
|
+
className: "rounded border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-accent",
|
|
33805
|
+
children: t("pptx.options.save.clearCacheNow")
|
|
33806
|
+
}
|
|
33807
|
+
)
|
|
33808
|
+
] }),
|
|
33809
|
+
category === "language" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsBlockSlot("language"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33810
|
+
SettingsLanguageTab,
|
|
33749
33811
|
{
|
|
33750
|
-
|
|
33751
|
-
|
|
33752
|
-
|
|
33753
|
-
"aria-label": t("pptx.settings.closeSettings"),
|
|
33754
|
-
onClick: onClose
|
|
33812
|
+
activeLocale: localeCode,
|
|
33813
|
+
locales: availableLocales,
|
|
33814
|
+
onSelectLocale
|
|
33755
33815
|
}
|
|
33756
|
-
),
|
|
33757
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33758
|
-
|
|
33816
|
+
) }),
|
|
33817
|
+
category === "ribbon" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsPaneSlot("ribbon"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33818
|
+
OptionsRibbonPane,
|
|
33759
33819
|
{
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
33763
|
-
"div",
|
|
33764
|
-
{
|
|
33765
|
-
style: panelStyle,
|
|
33766
|
-
role: "dialog",
|
|
33767
|
-
"aria-modal": "true",
|
|
33768
|
-
"aria-label": t("pptx.options.title"),
|
|
33769
|
-
className: "pointer-events-auto flex max-h-[85vh] w-[min(56rem,calc(100%-2rem))] flex-col rounded-xl border border-border bg-popover shadow-2xl backdrop-blur-xl max-md:fixed max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88dvh] max-md:w-full max-md:rounded-t-2xl max-md:rounded-b-none max-md:border-x-0 max-md:border-b-0 max-md:pb-[max(env(safe-area-inset-bottom),0px)]",
|
|
33770
|
-
children: [
|
|
33771
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33772
|
-
"div",
|
|
33773
|
-
{
|
|
33774
|
-
...dragHandlers,
|
|
33775
|
-
className: "flex items-center justify-between border-b border-border/60 px-5 py-4 touch-none",
|
|
33776
|
-
children: [
|
|
33777
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
33778
|
-
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: "h-5 w-5 text-primary" }),
|
|
33779
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-foreground", children: t("pptx.options.title") })
|
|
33780
|
-
] }),
|
|
33781
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33782
|
-
"button",
|
|
33783
|
-
{
|
|
33784
|
-
type: "button",
|
|
33785
|
-
onClick: onClose,
|
|
33786
|
-
style: closeBtnStyle,
|
|
33787
|
-
className: "rounded p-1 transition-colors hover:bg-accent inline-flex items-center justify-center",
|
|
33788
|
-
"aria-label": t("pptx.settings.close"),
|
|
33789
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuX, { className: "h-4 w-4 text-muted-foreground" })
|
|
33790
|
-
}
|
|
33791
|
-
)
|
|
33792
|
-
]
|
|
33793
|
-
}
|
|
33794
|
-
),
|
|
33795
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 max-md:flex-col", children: [
|
|
33796
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33797
|
-
"nav",
|
|
33798
|
-
{
|
|
33799
|
-
"aria-label": t("pptx.options.title"),
|
|
33800
|
-
className: "w-44 shrink-0 space-y-0.5 overflow-y-auto border-r border-border/60 p-2 max-md:flex max-md:w-full max-md:space-y-0 max-md:gap-1 max-md:overflow-x-auto max-md:border-b max-md:border-r-0",
|
|
33801
|
-
children: [
|
|
33802
|
-
tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33803
|
-
"button",
|
|
33804
|
-
{
|
|
33805
|
-
type: "button",
|
|
33806
|
-
onClick: () => setActiveTabId(tab.id),
|
|
33807
|
-
"aria-current": currentTabId === tab.id,
|
|
33808
|
-
style: navBtnStyle,
|
|
33809
|
-
className: chunk43TOUP5U_js.cn(
|
|
33810
|
-
"flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
|
|
33811
|
-
currentTabId === tab.id ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
|
|
33812
|
-
),
|
|
33813
|
-
children: t(tab.labelKey)
|
|
33814
|
-
},
|
|
33815
|
-
tab.id
|
|
33816
|
-
)),
|
|
33817
|
-
showAiTab && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33818
|
-
"button",
|
|
33819
|
-
{
|
|
33820
|
-
type: "button",
|
|
33821
|
-
onClick: () => setActiveTabId(AI_TAB_ID),
|
|
33822
|
-
"aria-current": aiActive,
|
|
33823
|
-
style: navBtnStyle,
|
|
33824
|
-
className: chunk43TOUP5U_js.cn(
|
|
33825
|
-
"flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
|
|
33826
|
-
aiActive ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
|
|
33827
|
-
),
|
|
33828
|
-
children: t("pptx.ai.settingsSectionTitle")
|
|
33829
|
-
}
|
|
33830
|
-
)
|
|
33831
|
-
]
|
|
33832
|
-
}
|
|
33833
|
-
),
|
|
33834
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: aiActive ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
33835
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: t("pptx.ai.settingsSectionTitle") }),
|
|
33836
|
-
/* @__PURE__ */ jsxRuntime.jsx(SettingsAiTab, { store: chatStore })
|
|
33837
|
-
] }) : activeTab.custom === "language" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
33838
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: t(activeTab.descriptionKey) }),
|
|
33839
|
-
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
33840
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-1 border-b border-border/60 pb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.options.language.displayLanguage") }),
|
|
33841
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t("pptx.options.language.displayLanguageDescription") }),
|
|
33842
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33843
|
-
SettingsLanguageTab,
|
|
33844
|
-
{
|
|
33845
|
-
activeLocale: localeCode,
|
|
33846
|
-
locales: availableLocales,
|
|
33847
|
-
onSelectLocale
|
|
33848
|
-
}
|
|
33849
|
-
)
|
|
33850
|
-
] })
|
|
33851
|
-
] }) : activeTab.custom === "ribbon" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
33852
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: t(activeTab.descriptionKey) }),
|
|
33853
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33854
|
-
OptionsRibbonPane,
|
|
33855
|
-
{
|
|
33856
|
-
options,
|
|
33857
|
-
onRibbonTabHiddenChange,
|
|
33858
|
-
onResetRibbon: () => onResetOptions("ribbon")
|
|
33859
|
-
}
|
|
33860
|
-
)
|
|
33861
|
-
] }) : activeTab.custom === "addIns" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
33862
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: t(activeTab.descriptionKey) }),
|
|
33863
|
-
/* @__PURE__ */ jsxRuntime.jsx(OptionsAddInsPane, { addinStatus })
|
|
33864
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
33865
|
-
OptionsPane,
|
|
33866
|
-
{
|
|
33867
|
-
tab: activeTab,
|
|
33868
|
-
options,
|
|
33869
|
-
onOptionChange,
|
|
33870
|
-
renderSpecial: (section) => {
|
|
33871
|
-
if (section.special === "themePicker") {
|
|
33872
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33873
|
-
SettingsAppearanceTab,
|
|
33874
|
-
{
|
|
33875
|
-
activeThemeKey: themeKey,
|
|
33876
|
-
themes: availableThemes,
|
|
33877
|
-
onSelectTheme
|
|
33878
|
-
}
|
|
33879
|
-
) });
|
|
33880
|
-
}
|
|
33881
|
-
if (section.special === "customFonts") {
|
|
33882
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33883
|
-
SettingsCustomFontsSection,
|
|
33884
|
-
{
|
|
33885
|
-
enabled: options.general.enableCustomFontUpload,
|
|
33886
|
-
families: customFontFamilies,
|
|
33887
|
-
onRegistered: (family) => onCustomFontRegistered?.(family)
|
|
33888
|
-
}
|
|
33889
|
-
);
|
|
33890
|
-
}
|
|
33891
|
-
if (section.special === "clearCache") {
|
|
33892
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
|
|
33893
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t("pptx.options.save.clearCacheDescription") }),
|
|
33894
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33895
|
-
"button",
|
|
33896
|
-
{
|
|
33897
|
-
type: "button",
|
|
33898
|
-
onClick: onClearCache,
|
|
33899
|
-
className: "rounded border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-accent",
|
|
33900
|
-
children: t("pptx.options.save.clearCacheNow")
|
|
33901
|
-
}
|
|
33902
|
-
)
|
|
33903
|
-
] });
|
|
33904
|
-
}
|
|
33905
|
-
return null;
|
|
33906
|
-
},
|
|
33907
|
-
children: activeTab.custom === "quickAccess" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33908
|
-
OptionsQuickAccessPane,
|
|
33909
|
-
{
|
|
33910
|
-
options,
|
|
33911
|
-
onQuickAccessCommandsChange,
|
|
33912
|
-
onResetQuickAccess: () => onQuickAccessCommandsChange([...pptx.DEFAULT_QUICK_ACCESS_COMMAND_IDS])
|
|
33913
|
-
}
|
|
33914
|
-
)
|
|
33915
|
-
}
|
|
33916
|
-
) })
|
|
33917
|
-
] }),
|
|
33918
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33919
|
-
"div",
|
|
33920
|
-
{
|
|
33921
|
-
className: `flex items-center justify-between gap-2 border-t border-border/60 px-5 py-3 ${stickyFooterClass}`,
|
|
33922
|
-
children: [
|
|
33923
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33924
|
-
"button",
|
|
33925
|
-
{
|
|
33926
|
-
type: "button",
|
|
33927
|
-
onClick: () => onResetOptions(),
|
|
33928
|
-
style: footerBtnStyle,
|
|
33929
|
-
className: "rounded border border-border px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
33930
|
-
children: t("pptx.options.resetAll")
|
|
33931
|
-
}
|
|
33932
|
-
),
|
|
33933
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
33934
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33935
|
-
"button",
|
|
33936
|
-
{
|
|
33937
|
-
type: "button",
|
|
33938
|
-
onClick: handleCancel,
|
|
33939
|
-
style: footerBtnStyle,
|
|
33940
|
-
className: "rounded border border-border px-4 py-1.5 text-xs text-foreground transition-colors hover:bg-accent",
|
|
33941
|
-
children: t("pptx.common.cancel")
|
|
33942
|
-
}
|
|
33943
|
-
),
|
|
33944
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33945
|
-
"button",
|
|
33946
|
-
{
|
|
33947
|
-
type: "button",
|
|
33948
|
-
onClick: onClose,
|
|
33949
|
-
style: footerBtnStyle,
|
|
33950
|
-
className: "rounded bg-primary px-4 py-1.5 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90",
|
|
33951
|
-
children: t("pptx.common.ok")
|
|
33952
|
-
}
|
|
33953
|
-
)
|
|
33954
|
-
] })
|
|
33955
|
-
]
|
|
33956
|
-
}
|
|
33957
|
-
)
|
|
33958
|
-
]
|
|
33959
|
-
}
|
|
33960
|
-
)
|
|
33820
|
+
options,
|
|
33821
|
+
onRibbonTabHiddenChange,
|
|
33822
|
+
onResetRibbon: () => onResetOptions("ribbon")
|
|
33961
33823
|
}
|
|
33962
|
-
)
|
|
33824
|
+
) }),
|
|
33825
|
+
category === "quickAccess" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsPaneSlot("quickAccess"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33826
|
+
OptionsQuickAccessPane,
|
|
33827
|
+
{
|
|
33828
|
+
options,
|
|
33829
|
+
onQuickAccessCommandsChange,
|
|
33830
|
+
onResetQuickAccess: () => onQuickAccessCommandsChange([...pptx.DEFAULT_QUICK_ACCESS_COMMAND_IDS])
|
|
33831
|
+
}
|
|
33832
|
+
) }),
|
|
33833
|
+
category === "addIns" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsPaneSlot("addIns"), children: /* @__PURE__ */ jsxRuntime.jsx(OptionsAddInsPane, { addinStatus }) }),
|
|
33834
|
+
category === pptx.AI_OPTIONS_CATEGORY && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: pptx.optionsPaneSlot(pptx.AI_OPTIONS_CATEGORY), children: /* @__PURE__ */ jsxRuntime.jsx(SettingsAiTab, { store: chatStore }) })
|
|
33963
33835
|
] });
|
|
33964
33836
|
}
|
|
33965
33837
|
function ViewerOptionsProvider({
|
|
@@ -33967,7 +33839,7 @@ function ViewerOptionsProvider({
|
|
|
33967
33839
|
store,
|
|
33968
33840
|
children
|
|
33969
33841
|
}) {
|
|
33970
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33842
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunkTCEDOLGE_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
33971
33843
|
}
|
|
33972
33844
|
function useAiBridge(input) {
|
|
33973
33845
|
const ref = React103.useRef(input);
|
|
@@ -34255,6 +34127,31 @@ function useAutosaveCacheMaintenance(viewerOptions) {
|
|
|
34255
34127
|
}, [viewerOptions]);
|
|
34256
34128
|
return handleClearOptionsCache;
|
|
34257
34129
|
}
|
|
34130
|
+
function useLoadNotifications(input) {
|
|
34131
|
+
const { loading, error } = input;
|
|
34132
|
+
const latest = React103.useRef(input);
|
|
34133
|
+
latest.current = input;
|
|
34134
|
+
const wasLoading = React103.useRef(loading);
|
|
34135
|
+
const announcedError = React103.useRef(null);
|
|
34136
|
+
React103.useEffect(() => {
|
|
34137
|
+
const finished = wasLoading.current && !loading;
|
|
34138
|
+
wasLoading.current = loading;
|
|
34139
|
+
if (finished && !latest.current.error) {
|
|
34140
|
+
latest.current.onLoad?.({
|
|
34141
|
+
slideCount: latest.current.slideCount,
|
|
34142
|
+
canvasSize: latest.current.canvasSize
|
|
34143
|
+
});
|
|
34144
|
+
}
|
|
34145
|
+
}, [loading]);
|
|
34146
|
+
React103.useEffect(() => {
|
|
34147
|
+
if (error && error !== announcedError.current) {
|
|
34148
|
+
announcedError.current = error;
|
|
34149
|
+
latest.current.onError?.(error);
|
|
34150
|
+
} else if (!error) {
|
|
34151
|
+
announcedError.current = null;
|
|
34152
|
+
}
|
|
34153
|
+
}, [error]);
|
|
34154
|
+
}
|
|
34258
34155
|
function useMasterViewCrud(input) {
|
|
34259
34156
|
const {
|
|
34260
34157
|
handlerRef,
|
|
@@ -34288,7 +34185,7 @@ function useMasterViewCrud(input) {
|
|
|
34288
34185
|
if (id === "renameLayout" || id === "renameMaster") {
|
|
34289
34186
|
const master = slideMasters[target.masterIndex];
|
|
34290
34187
|
const current = id === "renameLayout" ? master?.layouts?.[target.layoutIndex ?? -1]?.name ?? "" : master?.name ?? "";
|
|
34291
|
-
const next =
|
|
34188
|
+
const next = chunkTCEDOLGE_js.safePrompt(t("pptx.masterView.renamePrompt"), current)?.trim();
|
|
34292
34189
|
if (!next) {
|
|
34293
34190
|
return;
|
|
34294
34191
|
}
|
|
@@ -34628,6 +34525,8 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34628
34525
|
onZoomChange,
|
|
34629
34526
|
onSelectionChange,
|
|
34630
34527
|
onSlideCountChange,
|
|
34528
|
+
onLoad,
|
|
34529
|
+
onError,
|
|
34631
34530
|
onOpenFile: hostOpenFile,
|
|
34632
34531
|
theme,
|
|
34633
34532
|
defaultThemeKey,
|
|
@@ -34751,7 +34650,7 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34751
34650
|
}
|
|
34752
34651
|
})();
|
|
34753
34652
|
}, []);
|
|
34754
|
-
const { optionsStore, options: viewerOptions } =
|
|
34653
|
+
const { optionsStore, options: viewerOptions } = chunkTCEDOLGE_js.useViewerOptions();
|
|
34755
34654
|
const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
|
|
34756
34655
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
34757
34656
|
const aiEnabled = Boolean(ai) && pptx.isFeatureEnabled(customizationResolved, "ai");
|
|
@@ -34765,12 +34664,12 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34765
34664
|
const handleEnableEditing = React103.useCallback(() => {
|
|
34766
34665
|
setProtectedViewOverridden(true);
|
|
34767
34666
|
}, []);
|
|
34768
|
-
const readOnlyRec =
|
|
34769
|
-
const compatToastsState =
|
|
34667
|
+
const readOnlyRec = chunkTCEDOLGE_js.useReadOnlyRecommendationState(content);
|
|
34668
|
+
const compatToastsState = chunkTCEDOLGE_js.useCompatibilityToastsState();
|
|
34770
34669
|
const [notesBarHeight, setNotesBarHeight] = React103.useState(0);
|
|
34771
34670
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
34772
34671
|
const [collaborationReadOnly, setCollaborationReadOnly] = React103.useState(Boolean(collaboration));
|
|
34773
|
-
const canEdit = hostCanEdit && !collaborationReadOnly && !isProtectedView && !readOnlyRec.locked;
|
|
34672
|
+
const canEdit = hostCanEdit && pptx.isEditingAllowed(customizationResolved) && !collaborationReadOnly && !isProtectedView && !readOnlyRec.locked;
|
|
34774
34673
|
const [isSettingsOpen, setIsSettingsOpen] = React103.useState(false);
|
|
34775
34674
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = React103.useState(false);
|
|
34776
34675
|
const [autosaveEnabled, setAutosaveEnabled] = React103.useState(true);
|
|
@@ -34781,8 +34680,8 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34781
34680
|
filePath
|
|
34782
34681
|
});
|
|
34783
34682
|
const [isShareDialogOpen, setIsShareDialogOpen] = React103.useState(false);
|
|
34784
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
34785
|
-
const state =
|
|
34683
|
+
const { reducedMotion, toggleReducedMotion } = chunkTCEDOLGE_js.useReducedMotion();
|
|
34684
|
+
const state = chunkTCEDOLGE_js.useViewerState({
|
|
34786
34685
|
content,
|
|
34787
34686
|
canEdit,
|
|
34788
34687
|
inspectorInitiallyOpen: props.inspectorInitiallyOpen
|
|
@@ -34802,6 +34701,14 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34802
34701
|
activeSlide,
|
|
34803
34702
|
selectedElement
|
|
34804
34703
|
} = state;
|
|
34704
|
+
useLoadNotifications({
|
|
34705
|
+
loading,
|
|
34706
|
+
error,
|
|
34707
|
+
slideCount: slides.length,
|
|
34708
|
+
canvasSize,
|
|
34709
|
+
onLoad,
|
|
34710
|
+
onError
|
|
34711
|
+
});
|
|
34805
34712
|
const { pushColor } = useRecentColorsSync({
|
|
34806
34713
|
setRecentColors: state.setRecentColors,
|
|
34807
34714
|
setPresentationProperties: state.setPresentationProperties
|
|
@@ -34898,16 +34805,16 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34898
34805
|
}
|
|
34899
34806
|
}, [settings, optionsStore]);
|
|
34900
34807
|
const handleClearOptionsCache2 = useAutosaveCacheMaintenance(viewerOptions);
|
|
34901
|
-
const mobile =
|
|
34808
|
+
const mobile = chunkTCEDOLGE_js.useIsMobile();
|
|
34902
34809
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
34903
|
-
const resizablePanels =
|
|
34810
|
+
const resizablePanels = chunkTCEDOLGE_js.useResizablePanels();
|
|
34904
34811
|
const {
|
|
34905
34812
|
gridSpacingPx,
|
|
34906
34813
|
visibleSlideIndexes,
|
|
34907
34814
|
slideSectionGroups,
|
|
34908
34815
|
masterPseudoSlide,
|
|
34909
34816
|
authoredRange
|
|
34910
|
-
} =
|
|
34817
|
+
} = chunkTCEDOLGE_js.useDerivedSlideState({
|
|
34911
34818
|
slides,
|
|
34912
34819
|
sections: state.sections,
|
|
34913
34820
|
customShows: state.customShows,
|
|
@@ -34932,7 +34839,7 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34932
34839
|
state.cropSessionRef
|
|
34933
34840
|
]
|
|
34934
34841
|
);
|
|
34935
|
-
const zoom =
|
|
34842
|
+
const zoom = chunkTCEDOLGE_js.useZoomViewport({
|
|
34936
34843
|
canvasSize,
|
|
34937
34844
|
selectedElements: state.selectedElements,
|
|
34938
34845
|
fitPadding: props.fitPadding,
|
|
@@ -34942,7 +34849,7 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34942
34849
|
const markDocumentDirty = React103.useCallback(() => {
|
|
34943
34850
|
setIsDirty(true);
|
|
34944
34851
|
}, [setIsDirty]);
|
|
34945
|
-
const history =
|
|
34852
|
+
const history = chunkTCEDOLGE_js.useEditorHistory({
|
|
34946
34853
|
slides,
|
|
34947
34854
|
canvasSize,
|
|
34948
34855
|
activeSlideIndex,
|
|
@@ -34968,7 +34875,7 @@ var PowerPointViewer = React103.forwardRef(
|
|
|
34968
34875
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
34969
34876
|
setHeaderFooter: state.setHeaderFooter
|
|
34970
34877
|
});
|
|
34971
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
34878
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunkTCEDOLGE_js.usePresentationSetup({
|
|
34972
34879
|
mode,
|
|
34973
34880
|
slides,
|
|
34974
34881
|
visibleSlideIndexes,
|
|
@@ -35043,7 +34950,7 @@ ${url}`)
|
|
|
35043
34950
|
loading,
|
|
35044
34951
|
error
|
|
35045
34952
|
]);
|
|
35046
|
-
|
|
34953
|
+
chunkTCEDOLGE_js.useTouchGestures({
|
|
35047
34954
|
targetRef: zoom.canvasViewportRef,
|
|
35048
34955
|
currentScale: zoom.scale,
|
|
35049
34956
|
callbacks: {
|
|
@@ -35065,7 +34972,7 @@ ${url}`)
|
|
|
35065
34972
|
},
|
|
35066
34973
|
enabled: isTouchDevice
|
|
35067
34974
|
});
|
|
35068
|
-
const dialogs =
|
|
34975
|
+
const dialogs = chunkTCEDOLGE_js.useViewerDialogs({
|
|
35069
34976
|
mode,
|
|
35070
34977
|
slides,
|
|
35071
34978
|
activeSlide,
|
|
@@ -35114,7 +35021,7 @@ ${url}`)
|
|
|
35114
35021
|
zoom.handleZoomToFit();
|
|
35115
35022
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
35116
35023
|
}, [mode]);
|
|
35117
|
-
const editorOps =
|
|
35024
|
+
const editorOps = chunkTCEDOLGE_js.useEditorOperations({
|
|
35118
35025
|
state,
|
|
35119
35026
|
history,
|
|
35120
35027
|
zoom,
|
|
@@ -35155,8 +35062,9 @@ ${url}`)
|
|
|
35155
35062
|
isEncryptedDialogOpen,
|
|
35156
35063
|
setIsEncryptedDialogOpen,
|
|
35157
35064
|
handlerRef,
|
|
35065
|
+
viewerApi,
|
|
35158
35066
|
loadVersion
|
|
35159
|
-
} =
|
|
35067
|
+
} = chunkTCEDOLGE_js.useViewerIntegration({
|
|
35160
35068
|
transformCommittedText: (text) => pptx.applyAutoCorrect(text, viewerOptions.proofing),
|
|
35161
35069
|
state,
|
|
35162
35070
|
zoom,
|
|
@@ -35260,7 +35168,7 @@ ${url}`)
|
|
|
35260
35168
|
updateThemeFontScheme: themeHandlers.handleUpdateThemeFontScheme
|
|
35261
35169
|
});
|
|
35262
35170
|
const ribbonScope = useRibbonScopeToken();
|
|
35263
|
-
const viewPreferencesSync =
|
|
35171
|
+
const viewPreferencesSync = chunkTCEDOLGE_js.useViewPreferencesSync({
|
|
35264
35172
|
loadVersion,
|
|
35265
35173
|
viewProperties: state.viewProperties,
|
|
35266
35174
|
setViewProperties: state.setViewProperties,
|
|
@@ -35298,7 +35206,7 @@ ${url}`)
|
|
|
35298
35206
|
},
|
|
35299
35207
|
[state]
|
|
35300
35208
|
);
|
|
35301
|
-
const layoutSwitching =
|
|
35209
|
+
const layoutSwitching = chunkTCEDOLGE_js.useLayoutSwitching({
|
|
35302
35210
|
handler: handlerRef.current,
|
|
35303
35211
|
slides,
|
|
35304
35212
|
activeSlideIndex,
|
|
@@ -35386,6 +35294,20 @@ ${url}`)
|
|
|
35386
35294
|
collaboration: Boolean(collaboration),
|
|
35387
35295
|
locales: resolvedLocales.length > 1
|
|
35388
35296
|
};
|
|
35297
|
+
const selectionKey = state.effectiveSelectedIds.join("\0");
|
|
35298
|
+
const regionBase = React103.useMemo(
|
|
35299
|
+
() => ({
|
|
35300
|
+
viewer: viewerApi,
|
|
35301
|
+
mode,
|
|
35302
|
+
canEdit,
|
|
35303
|
+
activeSlideIndex,
|
|
35304
|
+
slideCount: slides.length,
|
|
35305
|
+
selectedElementIds: [...state.effectiveSelectedIds],
|
|
35306
|
+
locale: localeCode
|
|
35307
|
+
}),
|
|
35308
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- selectionKey stands for the ids
|
|
35309
|
+
[viewerApi, mode, canEdit, activeSlideIndex, slides.length, selectionKey, localeCode]
|
|
35310
|
+
);
|
|
35389
35311
|
const viewerContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35390
35312
|
"div",
|
|
35391
35313
|
{
|
|
@@ -35456,7 +35378,7 @@ ${url}`)
|
|
|
35456
35378
|
isAiPanelOpen: aiPanel.isOpen,
|
|
35457
35379
|
onToggleAiPanel: aiPanel.toggle,
|
|
35458
35380
|
isProtectedView,
|
|
35459
|
-
onEnableEditing: hostCanEdit ? handleEnableEditing : void 0,
|
|
35381
|
+
onEnableEditing: hostCanEdit && pptx.isEditingAllowed(customizationResolved) ? handleEnableEditing : void 0,
|
|
35460
35382
|
onSetSnapToGrid: viewPreferencesSync.handleSetSnapToGrid,
|
|
35461
35383
|
onSetSnapToShape: viewPreferencesSync.handleSetSnapToShape,
|
|
35462
35384
|
onSetShowGuides: viewPreferencesSync.handleSetShowGuides
|
|
@@ -35620,7 +35542,7 @@ ${url}`)
|
|
|
35620
35542
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35621
35543
|
PasteSpecialDialog,
|
|
35622
35544
|
{
|
|
35623
|
-
isOpen: editorOps.pasteSpecial.isPasteSpecialDialogOpen,
|
|
35545
|
+
isOpen: editorOps.pasteSpecial.isPasteSpecialDialogOpen && pptx.isDialogAvailable(customizationResolved, "pasteSpecial"),
|
|
35624
35546
|
onCancel: editorOps.pasteSpecial.closePasteSpecialDialog,
|
|
35625
35547
|
onConfirm: (format) => {
|
|
35626
35548
|
void editorOps.pasteSpecial.pasteWithFormat(format);
|
|
@@ -35789,8 +35711,8 @@ ${url}`)
|
|
|
35789
35711
|
// Nothing previously provided it, so every one of those consumers was
|
|
35790
35712
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
35791
35713
|
// the user changed in the Options dialog.
|
|
35792
|
-
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35793
|
-
|
|
35714
|
+
/* @__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(chunkTCEDOLGE_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35715
|
+
chunkTCEDOLGE_js.CollaborationProvider,
|
|
35794
35716
|
{
|
|
35795
35717
|
config: collaboration,
|
|
35796
35718
|
canvasWidth: canvasSize.width,
|
|
@@ -35842,13 +35764,13 @@ ${url}`)
|
|
|
35842
35764
|
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: viewerContent }) })
|
|
35843
35765
|
]
|
|
35844
35766
|
}
|
|
35845
|
-
) }) }) }) }) }) })
|
|
35767
|
+
) }) }) }) }) }) }) })
|
|
35846
35768
|
);
|
|
35847
35769
|
}
|
|
35848
35770
|
);
|
|
35849
35771
|
PowerPointViewer.displayName = "PowerPointViewer";
|
|
35850
35772
|
function CollaborationStatusStrip() {
|
|
35851
|
-
const collab =
|
|
35773
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
35852
35774
|
if (!collab) {
|
|
35853
35775
|
return null;
|
|
35854
35776
|
}
|
|
@@ -35872,8 +35794,8 @@ function CollaborationDocumentSync({
|
|
|
35872
35794
|
deckSaveState,
|
|
35873
35795
|
onReadOnlyChange
|
|
35874
35796
|
}) {
|
|
35875
|
-
const collab =
|
|
35876
|
-
|
|
35797
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
35798
|
+
chunkTCEDOLGE_js.useCollaborationDocumentSync({
|
|
35877
35799
|
collaboration: collab,
|
|
35878
35800
|
slides,
|
|
35879
35801
|
templateElementsBySlideId,
|
|
@@ -35892,14 +35814,14 @@ function CollaborationFollowLayer({
|
|
|
35892
35814
|
setActiveSlideIndex,
|
|
35893
35815
|
slideCount
|
|
35894
35816
|
}) {
|
|
35895
|
-
const collab =
|
|
35896
|
-
const { followedClientId, followUser } =
|
|
35817
|
+
const collab = chunkTCEDOLGE_js.useCollaboration();
|
|
35818
|
+
const { followedClientId, followUser } = chunkTCEDOLGE_js.useFollowMode({
|
|
35897
35819
|
collab,
|
|
35898
35820
|
activeSlideIndex,
|
|
35899
35821
|
setActiveSlideIndex,
|
|
35900
35822
|
slideCount
|
|
35901
35823
|
});
|
|
35902
|
-
|
|
35824
|
+
chunkTCEDOLGE_js.useBroadcastFollower({
|
|
35903
35825
|
collab,
|
|
35904
35826
|
activeSlideIndex,
|
|
35905
35827
|
setActiveSlideIndex,
|