pptx-react-viewer 1.24.0 → 1.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +46 -21
- package/dist/{Model3DScene-QTNGCODM.mjs → Model3DScene-E7YIHJ2R.mjs} +1 -1
- package/dist/Model3DScene-E7YIHJ2R.mjs.br +0 -0
- package/dist/Model3DScene-E7YIHJ2R.mjs.gz +0 -0
- package/dist/{Model3DScene-RD4XEC3F.js → Model3DScene-RYR4SSOM.js} +2 -2
- package/dist/Model3DScene-RYR4SSOM.js.br +0 -0
- package/dist/Model3DScene-RYR4SSOM.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-YR3GX4X6.js → SurfaceChart3DScene-PBSZVNAM.js} +2 -2
- package/dist/SurfaceChart3DScene-PBSZVNAM.js.br +0 -0
- package/dist/SurfaceChart3DScene-PBSZVNAM.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-VKS3ELTU.mjs → SurfaceChart3DScene-ZM3J67VQ.mjs} +1 -1
- package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.gz +0 -0
- package/dist/{chunk-I5SO5OV4.js → chunk-275WERXZ.js} +2 -1
- package/dist/chunk-275WERXZ.js.br +0 -0
- package/dist/{chunk-I5SO5OV4.js.gz → chunk-275WERXZ.js.gz} +0 -0
- package/dist/{chunk-GKST4OS7.js → chunk-DPTDFK2L.js} +428 -398
- package/dist/chunk-DPTDFK2L.js.br +0 -0
- package/dist/chunk-DPTDFK2L.js.gz +0 -0
- package/dist/{chunk-3YMK5VLS.js → chunk-KVTSERRP.js} +720 -716
- package/dist/chunk-KVTSERRP.js.br +0 -0
- package/dist/chunk-KVTSERRP.js.gz +0 -0
- package/dist/{chunk-KPT54MHG.mjs → chunk-MEVZNYJK.mjs} +2 -1
- package/dist/chunk-MEVZNYJK.mjs.br +0 -0
- package/dist/{chunk-KPT54MHG.mjs.gz → chunk-MEVZNYJK.mjs.gz} +0 -0
- package/dist/{chunk-YJVMOX2Y.mjs → chunk-UCFXE6YS.mjs} +38 -8
- package/dist/chunk-UCFXE6YS.mjs.br +0 -0
- package/dist/chunk-UCFXE6YS.mjs.gz +0 -0
- package/dist/{chunk-PUQ6GIOM.mjs → chunk-UDM2SYE3.mjs} +12 -8
- package/dist/chunk-UDM2SYE3.mjs.br +0 -0
- package/dist/chunk-UDM2SYE3.mjs.gz +0 -0
- package/dist/hooks-unstable.d.ts +24 -2
- package/dist/hooks-unstable.d.ts.map +1 -1
- package/dist/hooks-unstable.js +76 -76
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +2 -2
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/{index-hm2FF-FU.d.ts → index-waNAYwmr.d.ts} +10 -2
- package/dist/{index-hm2FF-FU.d.ts.map → index-waNAYwmr.d.ts.map} +1 -1
- package/dist/index.js +32 -32
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-QTNGCODM.mjs.br +0 -0
- package/dist/Model3DScene-QTNGCODM.mjs.gz +0 -0
- package/dist/Model3DScene-RD4XEC3F.js.br +0 -0
- package/dist/Model3DScene-RD4XEC3F.js.gz +0 -0
- package/dist/SurfaceChart3DScene-VKS3ELTU.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-VKS3ELTU.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-YR3GX4X6.js.br +0 -0
- package/dist/SurfaceChart3DScene-YR3GX4X6.js.gz +0 -0
- package/dist/chunk-3YMK5VLS.js.br +0 -0
- package/dist/chunk-3YMK5VLS.js.gz +0 -0
- package/dist/chunk-GKST4OS7.js.br +0 -0
- package/dist/chunk-GKST4OS7.js.gz +0 -0
- package/dist/chunk-I5SO5OV4.js.br +0 -0
- package/dist/chunk-KPT54MHG.mjs.br +0 -0
- package/dist/chunk-PUQ6GIOM.mjs.br +0 -0
- package/dist/chunk-PUQ6GIOM.mjs.gz +0 -0
- package/dist/chunk-YJVMOX2Y.mjs.br +0 -0
- package/dist/chunk-YJVMOX2Y.mjs.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDPTDFK2L_js = require('./chunk-DPTDFK2L.js');
|
|
4
|
+
var chunk275WERXZ_js = require('./chunk-275WERXZ.js');
|
|
5
5
|
var chunkZISXRMDJ_js = require('./chunk-ZISXRMDJ.js');
|
|
6
6
|
var chunkKV3EOLP3_js = require('./chunk-KV3EOLP3.js');
|
|
7
7
|
var React32 = require('react');
|
|
@@ -25,7 +25,7 @@ function useThemeStyle(theme) {
|
|
|
25
25
|
if (!theme) {
|
|
26
26
|
return void 0;
|
|
27
27
|
}
|
|
28
|
-
const vars =
|
|
28
|
+
const vars = chunk275WERXZ_js.themeToCssVars(theme);
|
|
29
29
|
if (Object.keys(vars).length === 0) {
|
|
30
30
|
return void 0;
|
|
31
31
|
}
|
|
@@ -42,7 +42,7 @@ function CollaborationProvider({
|
|
|
42
42
|
canvasHeight,
|
|
43
43
|
children
|
|
44
44
|
}) {
|
|
45
|
-
const value =
|
|
45
|
+
const value = chunkDPTDFK2L_js.useCollaborativeState({
|
|
46
46
|
config,
|
|
47
47
|
canvasWidth,
|
|
48
48
|
canvasHeight
|
|
@@ -474,7 +474,7 @@ function RibbonGroup({
|
|
|
474
474
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
475
475
|
"section",
|
|
476
476
|
{
|
|
477
|
-
className:
|
|
477
|
+
className: chunkDPTDFK2L_js.cn(
|
|
478
478
|
"relative flex min-h-[78px] shrink-0 items-start gap-1 border-r border-border/60 px-2 pb-4 pt-1 last:border-r-0",
|
|
479
479
|
className
|
|
480
480
|
),
|
|
@@ -502,7 +502,7 @@ function RibbonCommand({
|
|
|
502
502
|
onClick,
|
|
503
503
|
disabled,
|
|
504
504
|
title: title ?? label,
|
|
505
|
-
className:
|
|
505
|
+
className: chunkDPTDFK2L_js.cn(
|
|
506
506
|
"inline-flex rounded-sm text-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-35",
|
|
507
507
|
active && "bg-primary/15 text-primary ring-1 ring-primary/35",
|
|
508
508
|
compact ? "h-[26px] min-w-[88px] items-center gap-1.5 px-1.5 text-left text-[10px] leading-3" : "h-[58px] min-w-[54px] max-w-[72px] flex-col items-center justify-start gap-0.5 px-1 py-1 text-center text-[9px] leading-[11px]"
|
|
@@ -511,7 +511,7 @@ function RibbonCommand({
|
|
|
511
511
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
512
512
|
"span",
|
|
513
513
|
{
|
|
514
|
-
className:
|
|
514
|
+
className: chunkDPTDFK2L_js.cn(
|
|
515
515
|
"grid shrink-0 place-items-center text-primary",
|
|
516
516
|
compact ? "h-4 w-4 [&>svg]:h-4 [&>svg]:w-4" : "h-7 w-7 [&>svg]:h-6 [&>svg]:w-6"
|
|
517
517
|
),
|
|
@@ -540,7 +540,7 @@ function RibbonToggle({
|
|
|
540
540
|
"label",
|
|
541
541
|
{
|
|
542
542
|
title,
|
|
543
|
-
className:
|
|
543
|
+
className: chunkDPTDFK2L_js.cn(
|
|
544
544
|
"flex h-[19px] items-center gap-1 whitespace-nowrap rounded-sm px-1 text-[10px] text-foreground",
|
|
545
545
|
checked && "bg-primary/15 text-primary"
|
|
546
546
|
),
|
|
@@ -952,7 +952,7 @@ function ArrangeSection(p) {
|
|
|
952
952
|
disabled: !p.canEdit || p.canActivateFormatPainter === false && !p.formatPainterActive,
|
|
953
953
|
"data-testid": "format-painter-toggle",
|
|
954
954
|
"data-active": p.formatPainterActive ? "true" : "false",
|
|
955
|
-
className:
|
|
955
|
+
className: chunkDPTDFK2L_js.cn(
|
|
956
956
|
pill,
|
|
957
957
|
p.formatPainterActive ? "bg-amber-600 hover:bg-amber-500 text-amber-50" : ""
|
|
958
958
|
),
|
|
@@ -1067,7 +1067,7 @@ function DesignSection(p) {
|
|
|
1067
1067
|
{
|
|
1068
1068
|
onClick: p.onToggleThemeGallery,
|
|
1069
1069
|
disabled: !p.canEdit,
|
|
1070
|
-
className:
|
|
1070
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1071
1071
|
pill,
|
|
1072
1072
|
p.isThemeGalleryOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
1073
1073
|
),
|
|
@@ -1083,7 +1083,7 @@ function DesignSection(p) {
|
|
|
1083
1083
|
{
|
|
1084
1084
|
onClick: p.onToggleThemeEditor,
|
|
1085
1085
|
disabled: !p.canEdit,
|
|
1086
|
-
className:
|
|
1086
|
+
className: chunkDPTDFK2L_js.cn(pill, p.isThemeEditorOpen ? "bg-primary hover:bg-primary/80 text-white" : ""),
|
|
1087
1087
|
title: t("pptx.ribbon.editThemeTitle"),
|
|
1088
1088
|
children: [
|
|
1089
1089
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuPencil, { className: ics }),
|
|
@@ -1108,7 +1108,7 @@ function DesignSection(p) {
|
|
|
1108
1108
|
"button",
|
|
1109
1109
|
{
|
|
1110
1110
|
onClick: p.onToggleInspector,
|
|
1111
|
-
className:
|
|
1111
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1112
1112
|
pill,
|
|
1113
1113
|
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
1114
1114
|
),
|
|
@@ -1150,7 +1150,7 @@ function TransitionsSection(p) {
|
|
|
1150
1150
|
{
|
|
1151
1151
|
type: "button",
|
|
1152
1152
|
onClick: () => setSelected(preset.value),
|
|
1153
|
-
className:
|
|
1153
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1154
1154
|
"flex-shrink-0 px-2 py-1 max-md:min-h-[44px] rounded border text-[11px] leading-tight transition-colors",
|
|
1155
1155
|
selected === preset.value ? "border-primary bg-primary/10 text-primary font-medium" : "border-border bg-muted hover:bg-accent text-foreground"
|
|
1156
1156
|
),
|
|
@@ -1235,7 +1235,7 @@ function TransitionsSection(p) {
|
|
|
1235
1235
|
{
|
|
1236
1236
|
type: "button",
|
|
1237
1237
|
onClick: p.onToggleInspector,
|
|
1238
|
-
className:
|
|
1238
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1239
1239
|
pill,
|
|
1240
1240
|
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
1241
1241
|
),
|
|
@@ -1256,7 +1256,7 @@ function DrawSection(p) {
|
|
|
1256
1256
|
{
|
|
1257
1257
|
type: "button",
|
|
1258
1258
|
onClick: () => p.onSetActiveTool(tool.id),
|
|
1259
|
-
className:
|
|
1259
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1260
1260
|
i < a.length - 1 ? gB : gL,
|
|
1261
1261
|
p.activeTool === tool.id ? tool.ac ?? "bg-accent text-foreground" : ""
|
|
1262
1262
|
),
|
|
@@ -1316,31 +1316,31 @@ function AccountPage() {
|
|
|
1316
1316
|
const { t } = reactI18next.useTranslation();
|
|
1317
1317
|
const accountAuth = React32.useContext(AccountAuthContext);
|
|
1318
1318
|
const [profile, setProfile] = React32.useState(
|
|
1319
|
-
() =>
|
|
1319
|
+
() => chunk275WERXZ_js.readStoredViewerPrefs().profile ?? chunk275WERXZ_js.DEFAULT_VIEWER_PROFILE
|
|
1320
1320
|
);
|
|
1321
1321
|
const updateProfile = (patch) => {
|
|
1322
1322
|
const next = { ...profile, ...patch };
|
|
1323
1323
|
setProfile(next);
|
|
1324
|
-
|
|
1324
|
+
chunk275WERXZ_js.saveViewerProfile(next);
|
|
1325
1325
|
};
|
|
1326
1326
|
const [usage, setUsage] = React32.useState(null);
|
|
1327
1327
|
const [cleared, setCleared] = React32.useState(false);
|
|
1328
1328
|
const refreshUsage = () => {
|
|
1329
|
-
void
|
|
1329
|
+
void chunk275WERXZ_js.getLocalStorageUsageSummary().then(setUsage);
|
|
1330
1330
|
};
|
|
1331
1331
|
React32.useEffect(refreshUsage, []);
|
|
1332
1332
|
const handleClear = () => {
|
|
1333
1333
|
if (!window.confirm(t("pptx.account.storage.clearConfirm"))) {
|
|
1334
1334
|
return;
|
|
1335
1335
|
}
|
|
1336
|
-
void
|
|
1336
|
+
void chunk275WERXZ_js.clearAllLocalViewerData().then(() => {
|
|
1337
1337
|
setCleared(true);
|
|
1338
1338
|
refreshUsage();
|
|
1339
1339
|
setTimeout(() => setCleared(false), 4e3);
|
|
1340
1340
|
return void 0;
|
|
1341
1341
|
});
|
|
1342
1342
|
};
|
|
1343
|
-
const version = "1.
|
|
1343
|
+
const version = "1.24.0" ;
|
|
1344
1344
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1345
1345
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
1346
1346
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1354,7 +1354,7 @@ function AccountPage() {
|
|
|
1354
1354
|
{
|
|
1355
1355
|
className: "grid size-14 shrink-0 place-items-center rounded-full text-xl font-semibold text-white",
|
|
1356
1356
|
style: { background: profile.avatarColor },
|
|
1357
|
-
children:
|
|
1357
|
+
children: chunk275WERXZ_js.resolveProfileInitial(profile)
|
|
1358
1358
|
}
|
|
1359
1359
|
),
|
|
1360
1360
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -1373,14 +1373,14 @@ function AccountPage() {
|
|
|
1373
1373
|
] })
|
|
1374
1374
|
] }),
|
|
1375
1375
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-xs text-muted-foreground", children: t("pptx.account.profile.avatarColorLabel") }),
|
|
1376
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex gap-2", children:
|
|
1376
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex gap-2", children: chunk275WERXZ_js.AVATAR_COLOR_SWATCHES.map((color) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1377
1377
|
"button",
|
|
1378
1378
|
{
|
|
1379
1379
|
type: "button",
|
|
1380
1380
|
"aria-label": color,
|
|
1381
1381
|
"aria-pressed": profile.avatarColor === color,
|
|
1382
1382
|
onClick: () => updateProfile({ avatarColor: color }),
|
|
1383
|
-
className:
|
|
1383
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1384
1384
|
"size-7 rounded-full border-2 transition-transform",
|
|
1385
1385
|
profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
|
|
1386
1386
|
),
|
|
@@ -1397,7 +1397,7 @@ function AccountPage() {
|
|
|
1397
1397
|
] }),
|
|
1398
1398
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: usage && usage.presentationCount > 0 ? t("pptx.account.storage.usage", {
|
|
1399
1399
|
count: usage.presentationCount,
|
|
1400
|
-
size:
|
|
1400
|
+
size: chunk275WERXZ_js.formatBackstageSize(usage.totalBytes)
|
|
1401
1401
|
}) : t("pptx.account.storage.usageEmpty") }),
|
|
1402
1402
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-xs leading-5 text-muted-foreground", children: t("pptx.account.storage.privacyBlurb") }),
|
|
1403
1403
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1474,7 +1474,7 @@ function BackstageAction(props) {
|
|
|
1474
1474
|
function BackstageNewGallery(props) {
|
|
1475
1475
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1476
1476
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-7 text-[17px] font-semibold", children: "New" }),
|
|
1477
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-6", children:
|
|
1477
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-6", children: chunk275WERXZ_js.BACKSTAGE_TEMPLATES.map((template) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1478
1478
|
"button",
|
|
1479
1479
|
{
|
|
1480
1480
|
type: "button",
|
|
@@ -1517,8 +1517,8 @@ function BackstageRecentList(props) {
|
|
|
1517
1517
|
/* @__PURE__ */ jsxRuntime.jsx("small", { className: "block truncate text-[11px] text-muted-foreground", children: file.location })
|
|
1518
1518
|
] })
|
|
1519
1519
|
] }),
|
|
1520
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children:
|
|
1521
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children:
|
|
1520
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children: chunk275WERXZ_js.formatBackstageDate(file.timestamp) }),
|
|
1521
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children: chunk275WERXZ_js.formatBackstageSize(file.size) })
|
|
1522
1522
|
]
|
|
1523
1523
|
},
|
|
1524
1524
|
file.key
|
|
@@ -1530,10 +1530,10 @@ function FileSection(p) {
|
|
|
1530
1530
|
const [page, setPage] = React32.useState("home");
|
|
1531
1531
|
const [query, setQuery] = React32.useState("");
|
|
1532
1532
|
const [recent, setRecent] = React32.useState([]);
|
|
1533
|
-
const { isHidden } =
|
|
1533
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(p.hiddenActions);
|
|
1534
1534
|
const exportHidden = isHidden("export");
|
|
1535
1535
|
React32.useEffect(() => {
|
|
1536
|
-
void
|
|
1536
|
+
void chunk275WERXZ_js.listBackstageRecentFiles().then(setRecent);
|
|
1537
1537
|
}, []);
|
|
1538
1538
|
const visibleRecent = React32.useMemo(() => {
|
|
1539
1539
|
const q = query.trim().toLowerCase();
|
|
@@ -1545,7 +1545,7 @@ function FileSection(p) {
|
|
|
1545
1545
|
p.onClose();
|
|
1546
1546
|
}
|
|
1547
1547
|
};
|
|
1548
|
-
const title =
|
|
1548
|
+
const title = chunk275WERXZ_js.BACKSTAGE_NAV.find((item) => item.id === page)?.label ?? "Home";
|
|
1549
1549
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1550
1550
|
"div",
|
|
1551
1551
|
{
|
|
@@ -1566,7 +1566,7 @@ function FileSection(p) {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
),
|
|
1568
1568
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex min-h-0 flex-1 flex-col py-2", children: [
|
|
1569
|
-
|
|
1569
|
+
chunk275WERXZ_js.BACKSTAGE_NAV.filter(
|
|
1570
1570
|
(item) => !item.group && !(item.id === "export" && exportHidden)
|
|
1571
1571
|
).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1572
1572
|
"button",
|
|
@@ -1582,7 +1582,7 @@ function FileSection(p) {
|
|
|
1582
1582
|
item.id
|
|
1583
1583
|
)),
|
|
1584
1584
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
|
|
1585
|
-
|
|
1585
|
+
chunk275WERXZ_js.BACKSTAGE_NAV.filter((item) => item.group).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1586
1586
|
"button",
|
|
1587
1587
|
{
|
|
1588
1588
|
type: "button",
|
|
@@ -1845,7 +1845,7 @@ function RibbonMenu({
|
|
|
1845
1845
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1846
1846
|
"div",
|
|
1847
1847
|
{
|
|
1848
|
-
className:
|
|
1848
|
+
className: chunkDPTDFK2L_js.cn("fixed z-50", className),
|
|
1849
1849
|
style: pos ? { left: pos.left, top: pos.top } : { visibility: "hidden" },
|
|
1850
1850
|
children
|
|
1851
1851
|
}
|
|
@@ -1897,7 +1897,7 @@ function SlidesGroup(p) {
|
|
|
1897
1897
|
type: "button",
|
|
1898
1898
|
onClick: handleNewSlide,
|
|
1899
1899
|
disabled: !p.canEdit || p.layoutOptions.length === 0,
|
|
1900
|
-
className:
|
|
1900
|
+
className: chunkDPTDFK2L_js.cn(
|
|
1901
1901
|
pill,
|
|
1902
1902
|
"whitespace-nowrap",
|
|
1903
1903
|
p.layoutOptions.length > 0 ? "rounded-r-none" : ""
|
|
@@ -2087,7 +2087,7 @@ function HomeSection(p) {
|
|
|
2087
2087
|
setTimeout(() => setCutFeedback(false), 600);
|
|
2088
2088
|
},
|
|
2089
2089
|
disabled: !p.canEdit,
|
|
2090
|
-
className:
|
|
2090
|
+
className: chunkDPTDFK2L_js.cn(gB, cutFeedback && "bg-green-600/20 text-green-400"),
|
|
2091
2091
|
title: t("pptx.arrange.cut"),
|
|
2092
2092
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuScissors, { className: ic })
|
|
2093
2093
|
}
|
|
@@ -2101,7 +2101,7 @@ function HomeSection(p) {
|
|
|
2101
2101
|
setCopiedFeedback(true);
|
|
2102
2102
|
setTimeout(() => setCopiedFeedback(false), 600);
|
|
2103
2103
|
},
|
|
2104
|
-
className:
|
|
2104
|
+
className: chunkDPTDFK2L_js.cn(gB, copiedFeedback && "bg-green-600/20 text-green-400"),
|
|
2105
2105
|
title: t("pptx.arrange.copy"),
|
|
2106
2106
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuCopy, { className: ic })
|
|
2107
2107
|
}
|
|
@@ -2114,7 +2114,7 @@ function HomeSection(p) {
|
|
|
2114
2114
|
disabled: !p.canEdit || p.canActivateFormatPainter === false && !p.formatPainterActive,
|
|
2115
2115
|
"data-testid": "format-painter-toggle",
|
|
2116
2116
|
"data-active": p.formatPainterActive ? "true" : "false",
|
|
2117
|
-
className:
|
|
2117
|
+
className: chunkDPTDFK2L_js.cn(
|
|
2118
2118
|
gL,
|
|
2119
2119
|
p.formatPainterActive ? "bg-amber-600 hover:bg-amber-500 text-amber-50" : ""
|
|
2120
2120
|
),
|
|
@@ -2206,7 +2206,7 @@ function InsertSection(p) {
|
|
|
2206
2206
|
const [datePickerOpen, setDatePickerOpen] = React32.useState(false);
|
|
2207
2207
|
const [datePickerValue, setDatePickerValue] = React32.useState("");
|
|
2208
2208
|
const [dateFormat, setDateFormat] = React32.useState("locale");
|
|
2209
|
-
const [newChartType, setNewChartType] = React32.useState(
|
|
2209
|
+
const [newChartType, setNewChartType] = React32.useState(chunk275WERXZ_js.DEFAULT_INSERT_CHART_TYPE);
|
|
2210
2210
|
const datePickerRef = React32.useRef(null);
|
|
2211
2211
|
const actionMenuRef = React32.useRef(null);
|
|
2212
2212
|
const fieldMenuRef = React32.useRef(null);
|
|
@@ -2291,7 +2291,7 @@ function InsertSection(p) {
|
|
|
2291
2291
|
onChange: (e) => p.onSetNewShapeType(e.target.value),
|
|
2292
2292
|
className: "bg-transparent py-1.5 pl-2 pr-1 outline-none text-xs",
|
|
2293
2293
|
title: t("pptx.insert.shapeType"),
|
|
2294
|
-
children:
|
|
2294
|
+
children: chunkDPTDFK2L_js.SHAPE_PRESETS.map((sp) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: sp.type, className: "bg-background", children: t(sp.i18nKey) }, sp.type))
|
|
2295
2295
|
}
|
|
2296
2296
|
),
|
|
2297
2297
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2302,7 +2302,7 @@ function InsertSection(p) {
|
|
|
2302
2302
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 border-l border-border hover:bg-accent transition-colors text-xs",
|
|
2303
2303
|
title: t("pptx.insert.addShape"),
|
|
2304
2304
|
children: [
|
|
2305
|
-
|
|
2305
|
+
chunkDPTDFK2L_js.SHAPE_PRESETS.find((sp) => sp.type === p.newShapeType)?.icon || /* @__PURE__ */ jsxRuntime.jsx(lu.LuSquare, { className: ic }),
|
|
2306
2306
|
t("pptx.insert.shape")
|
|
2307
2307
|
]
|
|
2308
2308
|
}
|
|
@@ -2355,7 +2355,7 @@ function InsertSection(p) {
|
|
|
2355
2355
|
onChange: (e) => setNewChartType(e.target.value),
|
|
2356
2356
|
className: "bg-transparent py-1.5 pl-2 pr-1 outline-none text-xs",
|
|
2357
2357
|
title: t("pptx.ribbon.chartType"),
|
|
2358
|
-
children:
|
|
2358
|
+
children: chunk275WERXZ_js.INSERT_CHART_TYPES.map((ct) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: ct.type, className: "bg-background", children: ct.label }, ct.type))
|
|
2359
2359
|
}
|
|
2360
2360
|
),
|
|
2361
2361
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2462,7 +2462,7 @@ function InsertSection(p) {
|
|
|
2462
2462
|
{
|
|
2463
2463
|
anchorRef: actionMenuRef,
|
|
2464
2464
|
className: "hidden group-hover:flex flex-col w-40 pt-1",
|
|
2465
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1", children:
|
|
2465
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1", children: chunk275WERXZ_js.ACTION_BUTTON_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2466
2466
|
"button",
|
|
2467
2467
|
{
|
|
2468
2468
|
type: "button",
|
|
@@ -2576,7 +2576,7 @@ function InsertSection(p) {
|
|
|
2576
2576
|
{
|
|
2577
2577
|
type: "button",
|
|
2578
2578
|
disabled: !canEdit,
|
|
2579
|
-
className:
|
|
2579
|
+
className: chunkDPTDFK2L_js.cn(pill, "whitespace-nowrap"),
|
|
2580
2580
|
onClick: p.onOpenHeaderFooter,
|
|
2581
2581
|
children: t("pptx.headerFooter.title")
|
|
2582
2582
|
}
|
|
@@ -2808,7 +2808,7 @@ function ReviewSection(p) {
|
|
|
2808
2808
|
}
|
|
2809
2809
|
function SlideShowSection(p) {
|
|
2810
2810
|
const { t } = reactI18next.useTranslation();
|
|
2811
|
-
const { isHidden } =
|
|
2811
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(p.hiddenActions);
|
|
2812
2812
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2813
2813
|
/* @__PURE__ */ jsxRuntime.jsxs(RibbonGroup, { label: t("pptx.slideShow.start", { defaultValue: "Start Slide Show" }), children: [
|
|
2814
2814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3908,7 +3908,7 @@ function useModalFocus(open, panelRef, onClose, initialFocusRef) {
|
|
|
3908
3908
|
if (!open || !panel) {
|
|
3909
3909
|
return;
|
|
3910
3910
|
}
|
|
3911
|
-
return
|
|
3911
|
+
return chunk275WERXZ_js.activateModalFocus(panel, {
|
|
3912
3912
|
initialFocus: initialFocusRef?.current,
|
|
3913
3913
|
onEscape: onClose
|
|
3914
3914
|
});
|
|
@@ -3926,7 +3926,7 @@ function MobileSheet({
|
|
|
3926
3926
|
headerRight
|
|
3927
3927
|
}) {
|
|
3928
3928
|
const sheetRef = React32.useRef(null);
|
|
3929
|
-
const { dragY, dragging, handlers } =
|
|
3929
|
+
const { dragY, dragging, handlers } = chunkDPTDFK2L_js.useSheetDismissDrag(onClose);
|
|
3930
3930
|
useModalFocus(open, sheetRef, onClose);
|
|
3931
3931
|
if (!open) {
|
|
3932
3932
|
return null;
|
|
@@ -3950,7 +3950,7 @@ function MobileSheet({
|
|
|
3950
3950
|
"aria-modal": "true",
|
|
3951
3951
|
"aria-label": typeof title === "string" ? title : "Mobile panel",
|
|
3952
3952
|
tabIndex: -1,
|
|
3953
|
-
className:
|
|
3953
|
+
className: chunkDPTDFK2L_js.cn(
|
|
3954
3954
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
3955
3955
|
"animate-in slide-in-from-bottom duration-200",
|
|
3956
3956
|
className
|
|
@@ -4013,14 +4013,14 @@ function MobileMenuSheet(props) {
|
|
|
4013
4013
|
const { t } = reactI18next.useTranslation();
|
|
4014
4014
|
const { open, onClose } = props;
|
|
4015
4015
|
const [active, setActive] = React32.useState("home");
|
|
4016
|
-
const { isTabVisible } =
|
|
4016
|
+
const { isTabVisible } = chunkDPTDFK2L_js.useToolbarVisibility(props.hiddenActions);
|
|
4017
4017
|
return /* @__PURE__ */ jsxRuntime.jsx(MobileSheet, { open, onClose, autoHeight: true, title: t("pptx.mobileToolbar.menu"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
4018
4018
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 bg-background border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5 px-3 py-2", children: MENU_ITEMS.filter(({ key }) => isTabVisible(key)).map(({ key, label, icon: Icon }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4019
4019
|
"button",
|
|
4020
4020
|
{
|
|
4021
4021
|
type: "button",
|
|
4022
4022
|
onClick: () => setActive(active === key ? null : key),
|
|
4023
|
-
className:
|
|
4023
|
+
className: chunkDPTDFK2L_js.cn(
|
|
4024
4024
|
"inline-flex items-center gap-1.5 shrink-0 px-3 py-2 rounded-full text-[12px] font-medium border transition-colors min-h-[36px]",
|
|
4025
4025
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
4026
4026
|
),
|
|
@@ -4256,7 +4256,7 @@ function MobileToolbar(props) {
|
|
|
4256
4256
|
const { t } = reactI18next.useTranslation();
|
|
4257
4257
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
4258
4258
|
const [menuOpen, setMenuOpen] = React32.useState(false);
|
|
4259
|
-
const { isHidden } =
|
|
4259
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(props.hiddenActions);
|
|
4260
4260
|
const showEdit = mode === "edit" || mode === "master";
|
|
4261
4261
|
const btn = "inline-flex items-center justify-center min-w-[44px] min-h-[44px] rounded-md text-foreground/80 hover:bg-accent/60 disabled:opacity-40 disabled:cursor-not-allowed active:scale-95 transition-transform";
|
|
4262
4262
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4318,7 +4318,7 @@ function MobileToolbar(props) {
|
|
|
4318
4318
|
{
|
|
4319
4319
|
type: "button",
|
|
4320
4320
|
onClick: () => onSetMode("present"),
|
|
4321
|
-
className:
|
|
4321
|
+
className: chunkDPTDFK2L_js.cn(btn, "text-primary"),
|
|
4322
4322
|
title: t("pptx.toolbar.present"),
|
|
4323
4323
|
"aria-label": t("pptx.toolbar.present"),
|
|
4324
4324
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPresentation, { className: "w-5 h-5" })
|
|
@@ -4329,7 +4329,7 @@ function MobileToolbar(props) {
|
|
|
4329
4329
|
{
|
|
4330
4330
|
type: "button",
|
|
4331
4331
|
onClick: props.onOpenShareDialog ?? props.onPackageForSharing,
|
|
4332
|
-
className:
|
|
4332
|
+
className: chunkDPTDFK2L_js.cn(btn, "bg-primary text-white hover:bg-primary/90 px-3"),
|
|
4333
4333
|
title: t("pptx.toolbar.share"),
|
|
4334
4334
|
"aria-label": t("pptx.toolbar.share"),
|
|
4335
4335
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuShare2, { className: "w-4 h-4" })
|
|
@@ -4354,7 +4354,7 @@ var FILL_COLORS = [
|
|
|
4354
4354
|
"#008888",
|
|
4355
4355
|
"#888888"
|
|
4356
4356
|
];
|
|
4357
|
-
var TOP_SHAPES =
|
|
4357
|
+
var TOP_SHAPES = chunkDPTDFK2L_js.SHAPE_PRESETS.slice(0, 12);
|
|
4358
4358
|
function DrawingGroup(p) {
|
|
4359
4359
|
const { t } = reactI18next.useTranslation();
|
|
4360
4360
|
const [shapesOpen, setShapesOpen] = React32.useState(false);
|
|
@@ -4435,7 +4435,7 @@ function DrawingGroup(p) {
|
|
|
4435
4435
|
"button",
|
|
4436
4436
|
{
|
|
4437
4437
|
type: "button",
|
|
4438
|
-
className:
|
|
4438
|
+
className: chunkDPTDFK2L_js.cn(
|
|
4439
4439
|
"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-foreground hover:bg-muted transition-colors",
|
|
4440
4440
|
p.newShapeType === s.type && "bg-accent"
|
|
4441
4441
|
),
|
|
@@ -4688,18 +4688,18 @@ function TabRowActions(p) {
|
|
|
4688
4688
|
const { t } = reactI18next.useTranslation();
|
|
4689
4689
|
const collab = useCollaboration();
|
|
4690
4690
|
const isCollaborating = collab && collab.status === "connected";
|
|
4691
|
-
const { isHidden } =
|
|
4691
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(p.hiddenActions);
|
|
4692
4692
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 pr-1", children: [
|
|
4693
4693
|
p.onEnterRehearsalMode && !isHidden("record") && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4694
4694
|
"button",
|
|
4695
4695
|
{
|
|
4696
4696
|
type: "button",
|
|
4697
4697
|
onClick: p.onEnterRehearsalMode,
|
|
4698
|
-
className:
|
|
4698
|
+
className: chunk275WERXZ_js.TAB_ROW_ACTION_CLASSES.record,
|
|
4699
4699
|
title: t("pptx.titleBar.record"),
|
|
4700
4700
|
"aria-label": t("pptx.titleBar.record"),
|
|
4701
4701
|
children: [
|
|
4702
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
4702
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TAB_ROW_ACTION_CLASSES.recordDot, "aria-hidden": "true" }),
|
|
4703
4703
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("pptx.titleBar.record") })
|
|
4704
4704
|
]
|
|
4705
4705
|
}
|
|
@@ -4709,7 +4709,7 @@ function TabRowActions(p) {
|
|
|
4709
4709
|
{
|
|
4710
4710
|
type: "button",
|
|
4711
4711
|
onClick: p.onOpenShareDialog ?? p.onPackageForSharing,
|
|
4712
|
-
className:
|
|
4712
|
+
className: chunkDPTDFK2L_js.cn(
|
|
4713
4713
|
"relative inline-flex items-center gap-1 px-2.5 py-1 rounded-sm text-[11px] font-medium transition-colors whitespace-nowrap",
|
|
4714
4714
|
isCollaborating ? "bg-green-600 hover:bg-green-500 text-white" : "bg-primary hover:bg-primary/90 text-white"
|
|
4715
4715
|
),
|
|
@@ -4789,7 +4789,7 @@ function CustomShowsControls({
|
|
|
4789
4789
|
{
|
|
4790
4790
|
type: "button",
|
|
4791
4791
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
4792
|
-
className:
|
|
4792
|
+
className: chunkDPTDFK2L_js.cn(
|
|
4793
4793
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
4794
4794
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
4795
4795
|
),
|
|
@@ -4837,7 +4837,7 @@ function PresentDropdown({
|
|
|
4837
4837
|
{
|
|
4838
4838
|
type: "button",
|
|
4839
4839
|
onClick: onPresent,
|
|
4840
|
-
className:
|
|
4840
|
+
className: chunkDPTDFK2L_js.cn(
|
|
4841
4841
|
"px-2 py-1 transition-colors",
|
|
4842
4842
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
4843
4843
|
),
|
|
@@ -4850,7 +4850,7 @@ function PresentDropdown({
|
|
|
4850
4850
|
{
|
|
4851
4851
|
type: "button",
|
|
4852
4852
|
onClick: () => setOpen((prev) => !prev),
|
|
4853
|
-
className:
|
|
4853
|
+
className: chunkDPTDFK2L_js.cn(
|
|
4854
4854
|
"inline-flex items-center px-1 transition-colors border-l border-border",
|
|
4855
4855
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
4856
4856
|
),
|
|
@@ -5038,7 +5038,7 @@ function OverflowMenu(p) {
|
|
|
5038
5038
|
{
|
|
5039
5039
|
type: "button",
|
|
5040
5040
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
5041
|
-
className:
|
|
5041
|
+
className: chunkDPTDFK2L_js.cn(
|
|
5042
5042
|
"p-1.5 rounded transition-colors",
|
|
5043
5043
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
5044
5044
|
),
|
|
@@ -5093,7 +5093,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5093
5093
|
{
|
|
5094
5094
|
type: "button",
|
|
5095
5095
|
onClick: onToggleSidebar,
|
|
5096
|
-
className:
|
|
5096
|
+
className: chunkDPTDFK2L_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
5097
5097
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
5098
5098
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
5099
5099
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic })
|
|
@@ -5105,7 +5105,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5105
5105
|
{
|
|
5106
5106
|
type: "button",
|
|
5107
5107
|
onClick: p.onToggleComments,
|
|
5108
|
-
className:
|
|
5108
|
+
className: chunkDPTDFK2L_js.cn(
|
|
5109
5109
|
qab,
|
|
5110
5110
|
"relative max-md:hidden",
|
|
5111
5111
|
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
@@ -5172,7 +5172,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5172
5172
|
{
|
|
5173
5173
|
type: "button",
|
|
5174
5174
|
onClick: onToggleInspector,
|
|
5175
|
-
className:
|
|
5175
|
+
className: chunkDPTDFK2L_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
5176
5176
|
title: t("pptx.toolbar.toggleInspector"),
|
|
5177
5177
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
5178
5178
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic })
|
|
@@ -5183,7 +5183,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5183
5183
|
{
|
|
5184
5184
|
type: "button",
|
|
5185
5185
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
5186
|
-
className:
|
|
5186
|
+
className: chunkDPTDFK2L_js.cn(qab, "text-muted-foreground"),
|
|
5187
5187
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
5188
5188
|
"aria-label": t("pptx.toolbar.settings"),
|
|
5189
5189
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -5196,7 +5196,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5196
5196
|
function Toolbar(p) {
|
|
5197
5197
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
5198
5198
|
const { t } = reactI18next.useTranslation();
|
|
5199
|
-
const { isTabVisible } =
|
|
5199
|
+
const { isTabVisible } = chunkDPTDFK2L_js.useToolbarVisibility(p.hiddenActions);
|
|
5200
5200
|
if (isNarrowViewport && mode !== "present") {
|
|
5201
5201
|
return /* @__PURE__ */ jsxRuntime.jsx(MobileToolbar, { ...p });
|
|
5202
5202
|
}
|
|
@@ -5229,14 +5229,14 @@ function Toolbar(p) {
|
|
|
5229
5229
|
role: "tablist",
|
|
5230
5230
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
5231
5231
|
children: [
|
|
5232
|
-
|
|
5232
|
+
chunkDPTDFK2L_js.TOOLBAR_SECTIONS.filter((s) => isTabVisible(s.id)).map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5233
5233
|
"button",
|
|
5234
5234
|
{
|
|
5235
5235
|
type: "button",
|
|
5236
5236
|
role: "tab",
|
|
5237
5237
|
"aria-selected": toolbarSection === s.id,
|
|
5238
5238
|
onClick: () => onSetToolbarSection(s.id),
|
|
5239
|
-
className:
|
|
5239
|
+
className: chunkDPTDFK2L_js.cn(
|
|
5240
5240
|
"relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap transition-colors max-md:min-h-[36px] max-md:px-3",
|
|
5241
5241
|
toolbarSection === s.id ? s.id === "file" ? "text-white bg-primary/80 rounded-sm" : "text-foreground after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary" : s.id === "file" ? "text-primary hover:bg-primary/15 rounded-sm" : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
5242
5242
|
),
|
|
@@ -5259,7 +5259,7 @@ function Toolbar(p) {
|
|
|
5259
5259
|
{
|
|
5260
5260
|
type: "button",
|
|
5261
5261
|
onClick: p.onToggleCompactToolbar,
|
|
5262
|
-
className:
|
|
5262
|
+
className: chunkDPTDFK2L_js.cn(
|
|
5263
5263
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
5264
5264
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
5265
5265
|
),
|
|
@@ -5275,7 +5275,7 @@ function Toolbar(p) {
|
|
|
5275
5275
|
showRibbon && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5276
5276
|
"div",
|
|
5277
5277
|
{
|
|
5278
|
-
className:
|
|
5278
|
+
className: chunkDPTDFK2L_js.cn(
|
|
5279
5279
|
"flex min-h-[82px] items-stretch gap-0 overflow-x-auto px-1 py-0.5 max-md:min-h-0 max-md:px-1 max-md:py-0.5 flex-nowrap [&>*]:shrink-0",
|
|
5280
5280
|
isNarrowViewport && !isCompactToolbarOpen && "hidden"
|
|
5281
5281
|
),
|
|
@@ -5531,7 +5531,7 @@ function Toolbar(p) {
|
|
|
5531
5531
|
|
|
5532
5532
|
// src/viewer/utils/slide-background-style.ts
|
|
5533
5533
|
function getReactSlideBackgroundStyle(slide) {
|
|
5534
|
-
const style =
|
|
5534
|
+
const style = chunk275WERXZ_js.getSlideBackgroundStyle(slide);
|
|
5535
5535
|
return {
|
|
5536
5536
|
backgroundColor: style["background-color"],
|
|
5537
5537
|
backgroundImage: style["background-image"],
|
|
@@ -5621,7 +5621,7 @@ function CommentMarkersOverlay({
|
|
|
5621
5621
|
onCommentMarkerClick
|
|
5622
5622
|
}) {
|
|
5623
5623
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none z-[45]", children: comments.map((comment, idx) => {
|
|
5624
|
-
const pos =
|
|
5624
|
+
const pos = chunk275WERXZ_js.getCommentMarkerPosition(comment, idx, canvasSize.width, canvasSize.height);
|
|
5625
5625
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5626
5626
|
"div",
|
|
5627
5627
|
{
|
|
@@ -5673,7 +5673,7 @@ function ConnectorOverlay({
|
|
|
5673
5673
|
style: { pointerEvents: connectorDragState ? "auto" : "none" },
|
|
5674
5674
|
children: [
|
|
5675
5675
|
activeSlide.elements.filter((el) => el.type !== "connector").map((el) => {
|
|
5676
|
-
const sites =
|
|
5676
|
+
const sites = chunk275WERXZ_js.getConnectionSites(el.width, el.height);
|
|
5677
5677
|
return sites.map((site) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5678
5678
|
"div",
|
|
5679
5679
|
{
|
|
@@ -5715,7 +5715,7 @@ function ConnectorDragPreview({
|
|
|
5715
5715
|
if (!startEl) {
|
|
5716
5716
|
return null;
|
|
5717
5717
|
}
|
|
5718
|
-
const startSites =
|
|
5718
|
+
const startSites = chunk275WERXZ_js.getConnectionSites(startEl.width, startEl.height);
|
|
5719
5719
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
5720
5720
|
const sx = startEl.x + startSite.x;
|
|
5721
5721
|
const sy = startEl.y + startSite.y;
|
|
@@ -5793,7 +5793,7 @@ function DrawingOverlaySvg({
|
|
|
5793
5793
|
}
|
|
5794
5794
|
);
|
|
5795
5795
|
}
|
|
5796
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
5796
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkDPTDFK2L_js.GRID_SIZE, visible }) {
|
|
5797
5797
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
5798
5798
|
const patternId = React32.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
5799
5799
|
if (!visible) {
|
|
@@ -5814,15 +5814,15 @@ function GridOverlay({ canvasSize, gridSpacingPx = chunkGKST4OS7_js.GRID_SIZE, v
|
|
|
5814
5814
|
);
|
|
5815
5815
|
}
|
|
5816
5816
|
var HorizontalRuler = React32__default.default.memo(({ ticks, widthPx, highlight }) => {
|
|
5817
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: widthPx, height:
|
|
5818
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: widthPx, height:
|
|
5817
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: widthPx, height: chunk275WERXZ_js.RULER_THICKNESS, className: "block select-none", "aria-hidden": "true", children: [
|
|
5818
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: widthPx, height: chunk275WERXZ_js.RULER_THICKNESS, className: "fill-gray-100 dark:fill-gray-800" }),
|
|
5819
5819
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5820
5820
|
"line",
|
|
5821
5821
|
{
|
|
5822
5822
|
x1: 0,
|
|
5823
|
-
y1:
|
|
5823
|
+
y1: chunk275WERXZ_js.RULER_THICKNESS - 0.5,
|
|
5824
5824
|
x2: widthPx,
|
|
5825
|
-
y2:
|
|
5825
|
+
y2: chunk275WERXZ_js.RULER_THICKNESS - 0.5,
|
|
5826
5826
|
className: "stroke-border",
|
|
5827
5827
|
strokeWidth: 1
|
|
5828
5828
|
}
|
|
@@ -5833,20 +5833,20 @@ var HorizontalRuler = React32__default.default.memo(({ ticks, widthPx, highlight
|
|
|
5833
5833
|
x: highlight.start,
|
|
5834
5834
|
y: 0,
|
|
5835
5835
|
width: Math.max(highlight.end - highlight.start, 1),
|
|
5836
|
-
height:
|
|
5836
|
+
height: chunk275WERXZ_js.RULER_THICKNESS,
|
|
5837
5837
|
className: "fill-primary/20"
|
|
5838
5838
|
}
|
|
5839
5839
|
),
|
|
5840
5840
|
ticks.map((tick, i) => {
|
|
5841
|
-
const tickHeight = tick.isMajor ?
|
|
5841
|
+
const tickHeight = tick.isMajor ? chunk275WERXZ_js.RULER_THICKNESS * 0.6 : chunk275WERXZ_js.RULER_THICKNESS * 0.3;
|
|
5842
5842
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
5843
5843
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5844
5844
|
"line",
|
|
5845
5845
|
{
|
|
5846
5846
|
x1: tick.position,
|
|
5847
|
-
y1:
|
|
5847
|
+
y1: chunk275WERXZ_js.RULER_THICKNESS,
|
|
5848
5848
|
x2: tick.position,
|
|
5849
|
-
y2:
|
|
5849
|
+
y2: chunk275WERXZ_js.RULER_THICKNESS - tickHeight,
|
|
5850
5850
|
className: "stroke-gray-400 dark:stroke-gray-500",
|
|
5851
5851
|
strokeWidth: tick.isMajor ? 1 : 0.5
|
|
5852
5852
|
}
|
|
@@ -5855,8 +5855,8 @@ var HorizontalRuler = React32__default.default.memo(({ ticks, widthPx, highlight
|
|
|
5855
5855
|
"text",
|
|
5856
5856
|
{
|
|
5857
5857
|
x: tick.position + 2,
|
|
5858
|
-
y:
|
|
5859
|
-
fontSize:
|
|
5858
|
+
y: chunk275WERXZ_js.RULER_FONT_SIZE + 1,
|
|
5859
|
+
fontSize: chunk275WERXZ_js.RULER_FONT_SIZE,
|
|
5860
5860
|
className: "fill-gray-500 dark:fill-gray-400",
|
|
5861
5861
|
style: { fontFamily: "system-ui, sans-serif" },
|
|
5862
5862
|
children: tick.label
|
|
@@ -5868,11 +5868,11 @@ var HorizontalRuler = React32__default.default.memo(({ ticks, widthPx, highlight
|
|
|
5868
5868
|
});
|
|
5869
5869
|
HorizontalRuler.displayName = "HorizontalRuler";
|
|
5870
5870
|
var VerticalRuler = React32__default.default.memo(({ ticks, heightPx, highlight }) => {
|
|
5871
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width:
|
|
5871
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: chunk275WERXZ_js.RULER_THICKNESS, height: heightPx, className: "block select-none", "aria-hidden": "true", children: [
|
|
5872
5872
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5873
5873
|
"rect",
|
|
5874
5874
|
{
|
|
5875
|
-
width:
|
|
5875
|
+
width: chunk275WERXZ_js.RULER_THICKNESS,
|
|
5876
5876
|
height: heightPx,
|
|
5877
5877
|
className: "fill-gray-100 dark:fill-gray-800"
|
|
5878
5878
|
}
|
|
@@ -5880,9 +5880,9 @@ var VerticalRuler = React32__default.default.memo(({ ticks, heightPx, highlight
|
|
|
5880
5880
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5881
5881
|
"line",
|
|
5882
5882
|
{
|
|
5883
|
-
x1:
|
|
5883
|
+
x1: chunk275WERXZ_js.RULER_THICKNESS - 0.5,
|
|
5884
5884
|
y1: 0,
|
|
5885
|
-
x2:
|
|
5885
|
+
x2: chunk275WERXZ_js.RULER_THICKNESS - 0.5,
|
|
5886
5886
|
y2: heightPx,
|
|
5887
5887
|
className: "stroke-border",
|
|
5888
5888
|
strokeWidth: 1
|
|
@@ -5893,20 +5893,20 @@ var VerticalRuler = React32__default.default.memo(({ ticks, heightPx, highlight
|
|
|
5893
5893
|
{
|
|
5894
5894
|
x: 0,
|
|
5895
5895
|
y: highlight.start,
|
|
5896
|
-
width:
|
|
5896
|
+
width: chunk275WERXZ_js.RULER_THICKNESS,
|
|
5897
5897
|
height: Math.max(highlight.end - highlight.start, 1),
|
|
5898
5898
|
className: "fill-primary/20"
|
|
5899
5899
|
}
|
|
5900
5900
|
),
|
|
5901
5901
|
ticks.map((tick, i) => {
|
|
5902
|
-
const tickWidth = tick.isMajor ?
|
|
5902
|
+
const tickWidth = tick.isMajor ? chunk275WERXZ_js.RULER_THICKNESS * 0.6 : chunk275WERXZ_js.RULER_THICKNESS * 0.3;
|
|
5903
5903
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
5904
5904
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5905
5905
|
"line",
|
|
5906
5906
|
{
|
|
5907
|
-
x1:
|
|
5907
|
+
x1: chunk275WERXZ_js.RULER_THICKNESS,
|
|
5908
5908
|
y1: tick.position,
|
|
5909
|
-
x2:
|
|
5909
|
+
x2: chunk275WERXZ_js.RULER_THICKNESS - tickWidth,
|
|
5910
5910
|
y2: tick.position,
|
|
5911
5911
|
className: "stroke-gray-400 dark:stroke-gray-500",
|
|
5912
5912
|
strokeWidth: tick.isMajor ? 1 : 0.5
|
|
@@ -5916,8 +5916,8 @@ var VerticalRuler = React32__default.default.memo(({ ticks, heightPx, highlight
|
|
|
5916
5916
|
"text",
|
|
5917
5917
|
{
|
|
5918
5918
|
x: 2,
|
|
5919
|
-
y: tick.position +
|
|
5920
|
-
fontSize:
|
|
5919
|
+
y: tick.position + chunk275WERXZ_js.RULER_FONT_SIZE + 2,
|
|
5920
|
+
fontSize: chunk275WERXZ_js.RULER_FONT_SIZE,
|
|
5921
5921
|
className: "fill-gray-500 dark:fill-gray-400",
|
|
5922
5922
|
style: { fontFamily: "system-ui, sans-serif" },
|
|
5923
5923
|
children: tick.label
|
|
@@ -5937,11 +5937,11 @@ function Ruler({
|
|
|
5937
5937
|
onCreateGuideFromRuler
|
|
5938
5938
|
}) {
|
|
5939
5939
|
const hTicks = React32.useMemo(
|
|
5940
|
-
() =>
|
|
5940
|
+
() => chunk275WERXZ_js.generateTicks(canvasSize.width, editorScale, unit),
|
|
5941
5941
|
[canvasSize.width, editorScale, unit]
|
|
5942
5942
|
);
|
|
5943
5943
|
const vTicks = React32.useMemo(
|
|
5944
|
-
() =>
|
|
5944
|
+
() => chunk275WERXZ_js.generateTicks(canvasSize.height, editorScale, unit),
|
|
5945
5945
|
[canvasSize.height, editorScale, unit]
|
|
5946
5946
|
);
|
|
5947
5947
|
const hHighlight = React32.useMemo(() => {
|
|
@@ -6005,8 +6005,8 @@ function Ruler({
|
|
|
6005
6005
|
}
|
|
6006
6006
|
const rect = rulerEl.getBoundingClientRect();
|
|
6007
6007
|
const posScaled = e.clientY - rect.top;
|
|
6008
|
-
if (posScaled >
|
|
6009
|
-
const positionPx = (posScaled -
|
|
6008
|
+
if (posScaled > chunk275WERXZ_js.RULER_THICKNESS) {
|
|
6009
|
+
const positionPx = (posScaled - chunk275WERXZ_js.RULER_THICKNESS) / scale;
|
|
6010
6010
|
if (positionPx >= 0 && positionPx <= canvasSize.height) {
|
|
6011
6011
|
onCreateGuideFromRuler("h", positionPx);
|
|
6012
6012
|
}
|
|
@@ -6019,8 +6019,8 @@ function Ruler({
|
|
|
6019
6019
|
}
|
|
6020
6020
|
const rect = rulerEl.getBoundingClientRect();
|
|
6021
6021
|
const posScaled = e.clientX - rect.left;
|
|
6022
|
-
if (posScaled >
|
|
6023
|
-
const positionPx = (posScaled -
|
|
6022
|
+
if (posScaled > chunk275WERXZ_js.RULER_THICKNESS) {
|
|
6023
|
+
const positionPx = (posScaled - chunk275WERXZ_js.RULER_THICKNESS) / scale;
|
|
6024
6024
|
if (positionPx >= 0 && positionPx <= canvasSize.width) {
|
|
6025
6025
|
onCreateGuideFromRuler("v", positionPx);
|
|
6026
6026
|
}
|
|
@@ -6043,8 +6043,8 @@ function Ruler({
|
|
|
6043
6043
|
style: {
|
|
6044
6044
|
top: 0,
|
|
6045
6045
|
left: 0,
|
|
6046
|
-
width:
|
|
6047
|
-
height:
|
|
6046
|
+
width: chunk275WERXZ_js.RULER_THICKNESS,
|
|
6047
|
+
height: chunk275WERXZ_js.RULER_THICKNESS
|
|
6048
6048
|
}
|
|
6049
6049
|
}
|
|
6050
6050
|
),
|
|
@@ -6055,9 +6055,9 @@ function Ruler({
|
|
|
6055
6055
|
className: "absolute z-[50] overflow-visible",
|
|
6056
6056
|
style: {
|
|
6057
6057
|
top: 0,
|
|
6058
|
-
left:
|
|
6058
|
+
left: chunk275WERXZ_js.RULER_THICKNESS,
|
|
6059
6059
|
width: scaledWidth,
|
|
6060
|
-
height:
|
|
6060
|
+
height: chunk275WERXZ_js.RULER_THICKNESS,
|
|
6061
6061
|
cursor: onCreateGuideFromRuler ? "row-resize" : void 0
|
|
6062
6062
|
},
|
|
6063
6063
|
onPointerDown: handleHRulerPointerDown,
|
|
@@ -6071,9 +6071,9 @@ function Ruler({
|
|
|
6071
6071
|
ref: vRulerRef,
|
|
6072
6072
|
className: "absolute z-[50] overflow-visible",
|
|
6073
6073
|
style: {
|
|
6074
|
-
top:
|
|
6074
|
+
top: chunk275WERXZ_js.RULER_THICKNESS,
|
|
6075
6075
|
left: 0,
|
|
6076
|
-
width:
|
|
6076
|
+
width: chunk275WERXZ_js.RULER_THICKNESS,
|
|
6077
6077
|
height: scaledHeight,
|
|
6078
6078
|
cursor: onCreateGuideFromRuler ? "col-resize" : void 0
|
|
6079
6079
|
},
|
|
@@ -6318,8 +6318,8 @@ function useConnectorCreation({
|
|
|
6318
6318
|
setConnectorDragState(null);
|
|
6319
6319
|
return;
|
|
6320
6320
|
}
|
|
6321
|
-
const startSites =
|
|
6322
|
-
const endSites =
|
|
6321
|
+
const startSites = chunk275WERXZ_js.getConnectionSites(startEl.width, startEl.height);
|
|
6322
|
+
const endSites = chunk275WERXZ_js.getConnectionSites(endEl.width, endEl.height);
|
|
6323
6323
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
6324
6324
|
const endSite = endSites[targetSiteIndex] ?? endSites[0];
|
|
6325
6325
|
const sx = startEl.x + startSite.x;
|
|
@@ -6805,7 +6805,7 @@ function ResizeHandles({
|
|
|
6805
6805
|
"button",
|
|
6806
6806
|
{
|
|
6807
6807
|
type: "button",
|
|
6808
|
-
className:
|
|
6808
|
+
className: chunkDPTDFK2L_js.cn("absolute z-10 group", posClass, cursor),
|
|
6809
6809
|
style: peStyle,
|
|
6810
6810
|
onPointerDown: (e) => handleResizePointer(e, handle),
|
|
6811
6811
|
onMouseDown: (e) => {
|
|
@@ -6823,7 +6823,7 @@ function ResizeHandles({
|
|
|
6823
6823
|
"button",
|
|
6824
6824
|
{
|
|
6825
6825
|
type: "button",
|
|
6826
|
-
className:
|
|
6826
|
+
className: chunkDPTDFK2L_js.cn("absolute z-10", posClass, cursor),
|
|
6827
6827
|
style: peStyle,
|
|
6828
6828
|
onPointerDown: (e) => handleResizePointer(e, handle),
|
|
6829
6829
|
onMouseDown: (e) => {
|
|
@@ -6831,7 +6831,7 @@ function ResizeHandles({
|
|
|
6831
6831
|
onResizePointerDown(elementId, e, handle);
|
|
6832
6832
|
},
|
|
6833
6833
|
children: [
|
|
6834
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
6834
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkDPTDFK2L_js.cn(sizeClass, "border border-white bg-primary shadow") }),
|
|
6835
6835
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-2 max-md:-inset-1" })
|
|
6836
6836
|
]
|
|
6837
6837
|
},
|
|
@@ -6912,10 +6912,10 @@ var ConnectorElementRenderer = React32__default.default.memo(
|
|
|
6912
6912
|
const viewHeight = Math.max(el.height, 1);
|
|
6913
6913
|
const ss = shapeEl?.shapeStyle;
|
|
6914
6914
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
6915
|
-
const strokeColor =
|
|
6916
|
-
const strokePaint =
|
|
6917
|
-
const dashType =
|
|
6918
|
-
const dashArray =
|
|
6915
|
+
const strokeColor = chunk275WERXZ_js.normalizeHexColor(ss?.strokeColor, chunkDPTDFK2L_js.DEFAULT_STROKE_COLOR);
|
|
6916
|
+
const strokePaint = chunk275WERXZ_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
6917
|
+
const dashType = chunk275WERXZ_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
6918
|
+
const dashArray = chunk275WERXZ_js.getSvgStrokeDasharray(
|
|
6919
6919
|
dashType,
|
|
6920
6920
|
Math.max(strokeWidth, 1),
|
|
6921
6921
|
ss?.customDashSegments
|
|
@@ -6926,14 +6926,14 @@ var ConnectorElementRenderer = React32__default.default.memo(
|
|
|
6926
6926
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
6927
6927
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
6928
6928
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
6929
|
-
const compoundOffsets =
|
|
6930
|
-
const compoundWidths =
|
|
6931
|
-
const strokeCap =
|
|
6929
|
+
const compoundOffsets = chunk275WERXZ_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
6930
|
+
const compoundWidths = chunk275WERXZ_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
6931
|
+
const strokeCap = chunk275WERXZ_js.svgLineCap(ss?.lineCap);
|
|
6932
6932
|
const textEl = chunkKV3EOLP3_js.hasTextProperties(el) ? el : void 0;
|
|
6933
6933
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
6934
6934
|
const connectorTextSegments = textEl?.textSegments;
|
|
6935
6935
|
const connectorTextStyle = textEl?.textStyle;
|
|
6936
|
-
const pathGeometry = shapeEl ?
|
|
6936
|
+
const pathGeometry = shapeEl ? chunkDPTDFK2L_js.getConnectorPathGeometry(shapeEl) : {
|
|
6937
6937
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
6938
6938
|
startX: 0,
|
|
6939
6939
|
startY: 0,
|
|
@@ -6942,8 +6942,8 @@ var ConnectorElementRenderer = React32__default.default.memo(
|
|
|
6942
6942
|
};
|
|
6943
6943
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
6944
6944
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
6945
|
-
const lineShadow =
|
|
6946
|
-
const lineGlow =
|
|
6945
|
+
const lineShadow = chunkDPTDFK2L_js.buildLineShadowCss(el);
|
|
6946
|
+
const lineGlow = chunkDPTDFK2L_js.buildLineGlowFilter(el);
|
|
6947
6947
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6948
6948
|
"div",
|
|
6949
6949
|
{
|
|
@@ -6953,9 +6953,9 @@ var ConnectorElementRenderer = React32__default.default.memo(
|
|
|
6953
6953
|
style: {
|
|
6954
6954
|
left: el.x,
|
|
6955
6955
|
top: el.y,
|
|
6956
|
-
width: Math.max(el.width,
|
|
6957
|
-
height: Math.max(el.height,
|
|
6958
|
-
transform:
|
|
6956
|
+
width: Math.max(el.width, chunkDPTDFK2L_js.MIN_ELEMENT_SIZE),
|
|
6957
|
+
height: Math.max(el.height, chunkDPTDFK2L_js.MIN_ELEMENT_SIZE),
|
|
6958
|
+
transform: chunk275WERXZ_js.getElementTransform(el),
|
|
6959
6959
|
transformOrigin: "center",
|
|
6960
6960
|
background: "transparent",
|
|
6961
6961
|
border: "none",
|
|
@@ -6976,14 +6976,14 @@ var ConnectorElementRenderer = React32__default.default.memo(
|
|
|
6976
6976
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
6977
6977
|
children: [
|
|
6978
6978
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
6979
|
-
|
|
6979
|
+
chunkDPTDFK2L_js.renderConnectorMarker(
|
|
6980
6980
|
startMarkerId,
|
|
6981
6981
|
startArrow,
|
|
6982
6982
|
strokePaint,
|
|
6983
6983
|
ss?.connectorStartArrowWidth,
|
|
6984
6984
|
ss?.connectorStartArrowLength
|
|
6985
6985
|
),
|
|
6986
|
-
|
|
6986
|
+
chunkDPTDFK2L_js.renderConnectorMarker(
|
|
6987
6987
|
endMarkerId,
|
|
6988
6988
|
endArrow,
|
|
6989
6989
|
strokePaint,
|
|
@@ -7195,14 +7195,14 @@ function elementHasTextHyperlink(el) {
|
|
|
7195
7195
|
return Boolean(el.textSegments?.some((segment) => Boolean(segment.style?.hyperlink)));
|
|
7196
7196
|
}
|
|
7197
7197
|
function renderDagDuotoneFilterForElement(el) {
|
|
7198
|
-
if (!
|
|
7198
|
+
if (!chunkDPTDFK2L_js.hasDagDuotoneEffect(el)) {
|
|
7199
7199
|
return null;
|
|
7200
7200
|
}
|
|
7201
7201
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
7202
7202
|
if (!duotone) {
|
|
7203
7203
|
return null;
|
|
7204
7204
|
}
|
|
7205
|
-
return
|
|
7205
|
+
return chunkDPTDFK2L_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
7206
7206
|
}
|
|
7207
7207
|
function getContainerStyle({
|
|
7208
7208
|
el,
|
|
@@ -7219,12 +7219,12 @@ function getContainerStyle({
|
|
|
7219
7219
|
return {
|
|
7220
7220
|
left: isFullscreenMedia ? 0 : el.x,
|
|
7221
7221
|
top: isFullscreenMedia ? 0 : el.y,
|
|
7222
|
-
width: isFullscreenMedia ? "100%" : Math.max(el.width,
|
|
7223
|
-
height: isFullscreenMedia ? "100%" : Math.max(el.height,
|
|
7224
|
-
transform: isFullscreenMedia ? "none" :
|
|
7222
|
+
width: isFullscreenMedia ? "100%" : Math.max(el.width, chunkDPTDFK2L_js.MIN_ELEMENT_SIZE),
|
|
7223
|
+
height: isFullscreenMedia ? "100%" : Math.max(el.height, chunkDPTDFK2L_js.MIN_ELEMENT_SIZE),
|
|
7224
|
+
transform: isFullscreenMedia ? "none" : chunk275WERXZ_js.getElementTransform(el),
|
|
7225
7225
|
transformOrigin: "center",
|
|
7226
7226
|
overflow: overflowValue,
|
|
7227
|
-
clipPath: isImg && !has3DExtrusion ?
|
|
7227
|
+
clipPath: isImg && !has3DExtrusion ? chunkDPTDFK2L_js.getCropShapeClipPath(el) : void 0,
|
|
7228
7228
|
zIndex: isFullscreenMedia ? 20 : zIndex,
|
|
7229
7229
|
opacity,
|
|
7230
7230
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
@@ -7258,9 +7258,9 @@ function ActionIndicator({
|
|
|
7258
7258
|
function shapeParams(element) {
|
|
7259
7259
|
const style = chunkKV3EOLP3_js.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
7260
7260
|
const strokeWidth = Math.max(0, style?.strokeWidth || 0);
|
|
7261
|
-
const strokeColor =
|
|
7262
|
-
const fillColor =
|
|
7263
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
7261
|
+
const strokeColor = chunk275WERXZ_js.normalizeHexColor(style?.strokeColor, chunkDPTDFK2L_js.DEFAULT_STROKE_COLOR);
|
|
7262
|
+
const fillColor = chunk275WERXZ_js.normalizeHexColor(style?.fillColor, chunkDPTDFK2L_js.DEFAULT_FILL_COLOR);
|
|
7263
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk275WERXZ_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
7264
7264
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
7265
7265
|
}
|
|
7266
7266
|
var ChartPartSelectionContext = React32.createContext({
|
|
@@ -7310,7 +7310,7 @@ function ChartElementView({
|
|
|
7310
7310
|
const selectedPart = selection?.elementId === element.id ? selection.part : null;
|
|
7311
7311
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
7312
7312
|
const viewModel = React32.useMemo(
|
|
7313
|
-
() => canEdit ?
|
|
7313
|
+
() => canEdit ? chunkDPTDFK2L_js.buildReactChartViewModel(element) : null,
|
|
7314
7314
|
[canEdit, element]
|
|
7315
7315
|
);
|
|
7316
7316
|
React32.useEffect(ensureInteractionStyles, []);
|
|
@@ -7361,7 +7361,7 @@ function ChartElementView({
|
|
|
7361
7361
|
if (!canEdit) {
|
|
7362
7362
|
return;
|
|
7363
7363
|
}
|
|
7364
|
-
const part =
|
|
7364
|
+
const part = chunk275WERXZ_js.findChartPartTarget(e.target);
|
|
7365
7365
|
if (!part) {
|
|
7366
7366
|
return;
|
|
7367
7367
|
}
|
|
@@ -7379,7 +7379,7 @@ function ChartElementView({
|
|
|
7379
7379
|
drag: viewModel.valueDrag,
|
|
7380
7380
|
svgHeight: viewModel.svgHeight,
|
|
7381
7381
|
startClientY: e.clientY,
|
|
7382
|
-
anchorViewY:
|
|
7382
|
+
anchorViewY: chunk275WERXZ_js.dragAnchorViewY(startValue, viewModel.valueDrag, part.seriesIndex),
|
|
7383
7383
|
baseChartData: element.chartData,
|
|
7384
7384
|
moved: false,
|
|
7385
7385
|
lastData: null
|
|
@@ -7405,8 +7405,8 @@ function ChartElementView({
|
|
|
7405
7405
|
active.moved = true;
|
|
7406
7406
|
const deltaViewY = (e.clientY - active.startClientY) / rect.height * active.svgHeight;
|
|
7407
7407
|
const viewY = active.anchorViewY + deltaViewY;
|
|
7408
|
-
const value =
|
|
7409
|
-
active.lastData =
|
|
7408
|
+
const value = chunk275WERXZ_js.dragValueForPart(viewY, active.drag, active.part.seriesIndex);
|
|
7409
|
+
active.lastData = chunk275WERXZ_js.withChartPointValue(
|
|
7410
7410
|
active.baseChartData,
|
|
7411
7411
|
active.part.seriesIndex,
|
|
7412
7412
|
active.part.pointIndex,
|
|
@@ -7433,14 +7433,14 @@ function ChartElementView({
|
|
|
7433
7433
|
setTitleDraft(element.chartData?.title ?? "");
|
|
7434
7434
|
return;
|
|
7435
7435
|
}
|
|
7436
|
-
if (
|
|
7436
|
+
if (chunk275WERXZ_js.findChartPartTarget(e.target)) {
|
|
7437
7437
|
e.stopPropagation();
|
|
7438
7438
|
}
|
|
7439
7439
|
};
|
|
7440
7440
|
const commitTitle = () => {
|
|
7441
7441
|
if (titleDraft !== null && element.chartData && onUpdateElement) {
|
|
7442
7442
|
onUpdateElement({
|
|
7443
|
-
chartData:
|
|
7443
|
+
chartData: chunk275WERXZ_js.withChartTitle(element.chartData, titleDraft)
|
|
7444
7444
|
});
|
|
7445
7445
|
}
|
|
7446
7446
|
setTitleDraft(null);
|
|
@@ -7456,8 +7456,8 @@ function ChartElementView({
|
|
|
7456
7456
|
onPointerUp: handlePointerUp,
|
|
7457
7457
|
onDoubleClick: handleDoubleClick,
|
|
7458
7458
|
children: [
|
|
7459
|
-
|
|
7460
|
-
dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children:
|
|
7459
|
+
chunkDPTDFK2L_js.renderChartElement(renderedElement),
|
|
7460
|
+
dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: chunk275WERXZ_js.formatAxisValue(dragValue) }),
|
|
7461
7461
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7462
7462
|
"input",
|
|
7463
7463
|
{
|
|
@@ -7491,23 +7491,23 @@ function ColorChangedImage({
|
|
|
7491
7491
|
className,
|
|
7492
7492
|
alt
|
|
7493
7493
|
}) {
|
|
7494
|
-
const tolerance = tolerancePct ??
|
|
7495
|
-
const cacheKey =
|
|
7494
|
+
const tolerance = tolerancePct ?? chunk275WERXZ_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
7495
|
+
const cacheKey = chunk275WERXZ_js.buildCacheKey(
|
|
7496
7496
|
src,
|
|
7497
7497
|
clrChange.clrFrom,
|
|
7498
7498
|
clrChange.clrTo,
|
|
7499
7499
|
tolerance,
|
|
7500
7500
|
Boolean(clrChange.clrToTransparent)
|
|
7501
7501
|
);
|
|
7502
|
-
const cached =
|
|
7502
|
+
const cached = chunk275WERXZ_js.getCachedResult(cacheKey);
|
|
7503
7503
|
const [processedSrc, setProcessedSrc] = React32.useState(cached ?? null);
|
|
7504
7504
|
React32.useEffect(() => {
|
|
7505
|
-
if (
|
|
7506
|
-
setProcessedSrc(
|
|
7505
|
+
if (chunk275WERXZ_js.getCachedResult(cacheKey)) {
|
|
7506
|
+
setProcessedSrc(chunk275WERXZ_js.getCachedResult(cacheKey) ?? null);
|
|
7507
7507
|
return;
|
|
7508
7508
|
}
|
|
7509
7509
|
let cancelled = false;
|
|
7510
|
-
|
|
7510
|
+
chunk275WERXZ_js.applyColorChange(
|
|
7511
7511
|
src,
|
|
7512
7512
|
clrChange.clrFrom,
|
|
7513
7513
|
clrChange.clrTo,
|
|
@@ -7515,7 +7515,7 @@ function ColorChangedImage({
|
|
|
7515
7515
|
Boolean(clrChange.clrToTransparent)
|
|
7516
7516
|
).then((result) => {
|
|
7517
7517
|
if (!cancelled) {
|
|
7518
|
-
|
|
7518
|
+
chunk275WERXZ_js.setCachedResult(cacheKey, result.dataUrl);
|
|
7519
7519
|
setProcessedSrc(result.dataUrl);
|
|
7520
7520
|
}
|
|
7521
7521
|
return void 0;
|
|
@@ -7546,19 +7546,19 @@ function DuotoneImage({
|
|
|
7546
7546
|
className,
|
|
7547
7547
|
alt
|
|
7548
7548
|
}) {
|
|
7549
|
-
const cacheKey =
|
|
7550
|
-
const cached =
|
|
7549
|
+
const cacheKey = chunk275WERXZ_js.buildDuotoneCacheKey(src, duotone.color1, duotone.color2);
|
|
7550
|
+
const cached = chunk275WERXZ_js.getDuotoneCachedResult(cacheKey);
|
|
7551
7551
|
const [processedSrc, setProcessedSrc] = React32.useState(cached ?? null);
|
|
7552
7552
|
React32.useEffect(() => {
|
|
7553
|
-
const cachedResult =
|
|
7553
|
+
const cachedResult = chunk275WERXZ_js.getDuotoneCachedResult(cacheKey);
|
|
7554
7554
|
if (cachedResult) {
|
|
7555
7555
|
setProcessedSrc(cachedResult);
|
|
7556
7556
|
return;
|
|
7557
7557
|
}
|
|
7558
7558
|
let cancelled = false;
|
|
7559
|
-
|
|
7559
|
+
chunk275WERXZ_js.applyDuotone(src, duotone.color1, duotone.color2).then((result) => {
|
|
7560
7560
|
if (!cancelled) {
|
|
7561
|
-
|
|
7561
|
+
chunk275WERXZ_js.setDuotoneCachedResult(cacheKey, result.dataUrl);
|
|
7562
7562
|
setProcessedSrc(result.dataUrl);
|
|
7563
7563
|
}
|
|
7564
7564
|
return void 0;
|
|
@@ -7583,7 +7583,7 @@ function DuotoneImage({
|
|
|
7583
7583
|
);
|
|
7584
7584
|
}
|
|
7585
7585
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
7586
|
-
return
|
|
7586
|
+
return chunk275WERXZ_js.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7587
7587
|
"svg",
|
|
7588
7588
|
{
|
|
7589
7589
|
width: 0,
|
|
@@ -7649,7 +7649,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
7649
7649
|
...filter ? { filter } : {},
|
|
7650
7650
|
...opacity !== void 0 ? { opacity } : {}
|
|
7651
7651
|
};
|
|
7652
|
-
if (
|
|
7652
|
+
if (chunkDPTDFK2L_js.isImageTiled(el)) {
|
|
7653
7653
|
const tileSrc = imgSrc(el);
|
|
7654
7654
|
if (!tileSrc) {
|
|
7655
7655
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
|
|
@@ -7660,18 +7660,18 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
7660
7660
|
"div",
|
|
7661
7661
|
{
|
|
7662
7662
|
className: "pointer-events-none select-none w-full h-full",
|
|
7663
|
-
style: { ...
|
|
7663
|
+
style: { ...chunkDPTDFK2L_js.getImageTilingStyle(el), ...effectStyles }
|
|
7664
7664
|
}
|
|
7665
7665
|
)
|
|
7666
7666
|
] });
|
|
7667
7667
|
}
|
|
7668
|
-
const colorWash =
|
|
7668
|
+
const colorWash = chunk275WERXZ_js.getImageColorWashStyle(
|
|
7669
7669
|
chunkKV3EOLP3_js.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
|
|
7670
7670
|
);
|
|
7671
7671
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
7672
|
-
const duotoneColors =
|
|
7672
|
+
const duotoneColors = chunkDPTDFK2L_js.getDuotoneColors(el);
|
|
7673
7673
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
7674
|
-
const filterForImg = useDuotoneCanvas ?
|
|
7674
|
+
const filterForImg = useDuotoneCanvas ? chunk275WERXZ_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
7675
7675
|
const canvasEffectStyles = {
|
|
7676
7676
|
...filterForImg ? { filter: filterForImg } : {},
|
|
7677
7677
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -7722,8 +7722,8 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
7722
7722
|
] });
|
|
7723
7723
|
}
|
|
7724
7724
|
function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefix) {
|
|
7725
|
-
const points =
|
|
7726
|
-
const circles =
|
|
7725
|
+
const points = chunk275WERXZ_js.extractPathPoints(pathD);
|
|
7726
|
+
const circles = chunk275WERXZ_js.generatePressureCircles(points, widths, {
|
|
7727
7727
|
baseWidth,
|
|
7728
7728
|
minRadius: 0.5,
|
|
7729
7729
|
maxRadius: baseWidth * 1.5
|
|
@@ -7733,8 +7733,8 @@ function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefi
|
|
|
7733
7733
|
function renderInk(el, options) {
|
|
7734
7734
|
const replay = options?.replay ?? false;
|
|
7735
7735
|
Boolean(el.inkPointPressures) && el.inkPointPressures.length > 0;
|
|
7736
|
-
Boolean(el.inkWidths) && el.inkWidths.length > 1 &&
|
|
7737
|
-
const replayStyles = replay ?
|
|
7736
|
+
Boolean(el.inkWidths) && el.inkWidths.length > 1 && chunk275WERXZ_js.hasPressureVariation(el.inkWidths);
|
|
7737
|
+
const replayStyles = replay ? chunk275WERXZ_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
7738
7738
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7739
7739
|
"svg",
|
|
7740
7740
|
{
|
|
@@ -7742,18 +7742,18 @@ function renderInk(el, options) {
|
|
|
7742
7742
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
7743
7743
|
preserveAspectRatio: "none",
|
|
7744
7744
|
children: [
|
|
7745
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
7745
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk275WERXZ_js.INK_REPLAY_KEYFRAMES }),
|
|
7746
7746
|
el.inkPaths.map((d, i) => {
|
|
7747
|
-
const color =
|
|
7748
|
-
const width =
|
|
7749
|
-
const opacity =
|
|
7747
|
+
const color = chunk275WERXZ_js.resolveInkColor(el.inkColors, i);
|
|
7748
|
+
const width = chunk275WERXZ_js.resolveInkWidth(el.inkWidths, i);
|
|
7749
|
+
const opacity = chunk275WERXZ_js.resolveInkOpacity(el.inkOpacities, i);
|
|
7750
7750
|
{
|
|
7751
7751
|
const pointPressures = el.inkPointPressures?.[i];
|
|
7752
|
-
if (pointPressures && pointPressures.length > 1 &&
|
|
7753
|
-
const pointWidths =
|
|
7752
|
+
if (pointPressures && pointPressures.length > 1 && chunk275WERXZ_js.hasPressureVariation(pointPressures)) {
|
|
7753
|
+
const pointWidths = chunk275WERXZ_js.pressuresToWidths(pointPressures, width);
|
|
7754
7754
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(d, pointWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
|
|
7755
7755
|
}
|
|
7756
|
-
if (el.inkWidths && el.inkWidths.length > 1 &&
|
|
7756
|
+
if (el.inkWidths && el.inkWidths.length > 1 && chunk275WERXZ_js.hasPressureVariation(el.inkWidths)) {
|
|
7757
7757
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(d, el.inkWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
|
|
7758
7758
|
}
|
|
7759
7759
|
}
|
|
@@ -7788,10 +7788,10 @@ function renderInk(el, options) {
|
|
|
7788
7788
|
function renderGroup(children) {
|
|
7789
7789
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: children.map((c, childIndex) => {
|
|
7790
7790
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
7791
|
-
const ss =
|
|
7792
|
-
const vs =
|
|
7793
|
-
const ts =
|
|
7794
|
-
const isTxt =
|
|
7791
|
+
const ss = chunkDPTDFK2L_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
7792
|
+
const vs = chunkDPTDFK2L_js.renderVectorShape(c, hf, fc, sw, sc);
|
|
7793
|
+
const ts = chunkDPTDFK2L_js.getTextStyleForElement(c, chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR);
|
|
7794
|
+
const isTxt = chunk275WERXZ_js.isEditableTextElement(c);
|
|
7795
7795
|
const isI = c.type === "picture" || c.type === "image";
|
|
7796
7796
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7797
7797
|
"div",
|
|
@@ -7800,12 +7800,12 @@ function renderGroup(children) {
|
|
|
7800
7800
|
style: {
|
|
7801
7801
|
left: c.x,
|
|
7802
7802
|
top: c.y,
|
|
7803
|
-
width: Math.max(c.width,
|
|
7804
|
-
height: Math.max(c.height,
|
|
7805
|
-
transform:
|
|
7803
|
+
width: Math.max(c.width, chunkDPTDFK2L_js.MIN_ELEMENT_SIZE),
|
|
7804
|
+
height: Math.max(c.height, chunkDPTDFK2L_js.MIN_ELEMENT_SIZE),
|
|
7805
|
+
transform: chunk275WERXZ_js.getElementTransform(c),
|
|
7806
7806
|
transformOrigin: "center",
|
|
7807
7807
|
overflow: isI ? "hidden" : void 0,
|
|
7808
|
-
clipPath: isI ?
|
|
7808
|
+
clipPath: isI ? chunkDPTDFK2L_js.getCropShapeClipPath(c) : void 0,
|
|
7809
7809
|
...ss,
|
|
7810
7810
|
// Explicit z-index preserves document order stacking within the
|
|
7811
7811
|
// group: later children in the array (= later in p:grpSp XML)
|
|
@@ -7813,11 +7813,11 @@ function renderGroup(children) {
|
|
|
7813
7813
|
// Placed after ...ss to ensure it is never overwritten.
|
|
7814
7814
|
zIndex: childIndex
|
|
7815
7815
|
},
|
|
7816
|
-
children: isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ?
|
|
7816
|
+
children: isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? chunkDPTDFK2L_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7817
7817
|
"div",
|
|
7818
7818
|
{
|
|
7819
7819
|
className: "pointer-events-none select-none w-full h-full",
|
|
7820
|
-
style:
|
|
7820
|
+
style: chunkDPTDFK2L_js.getImageTilingStyle(c)
|
|
7821
7821
|
}
|
|
7822
7822
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
7823
7823
|
"img",
|
|
@@ -7825,7 +7825,7 @@ function renderGroup(children) {
|
|
|
7825
7825
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
7826
7826
|
alt: chunkZISXRMDJ_js.translationsEn["pptx.ink.groupChildAlt"],
|
|
7827
7827
|
className: "pointer-events-none select-none",
|
|
7828
|
-
style:
|
|
7828
|
+
style: chunkDPTDFK2L_js.getImageRenderStyle(c),
|
|
7829
7829
|
draggable: false
|
|
7830
7830
|
}
|
|
7831
7831
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -7835,7 +7835,7 @@ function renderGroup(children) {
|
|
|
7835
7835
|
{
|
|
7836
7836
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
7837
7837
|
style: ts,
|
|
7838
|
-
children:
|
|
7838
|
+
children: chunkDPTDFK2L_js.renderTextSegments(c, chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR)
|
|
7839
7839
|
}
|
|
7840
7840
|
) : null
|
|
7841
7841
|
] })
|
|
@@ -7848,7 +7848,7 @@ function renderContentPart(el, options) {
|
|
|
7848
7848
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
7849
7849
|
const replay = options?.replay ?? false;
|
|
7850
7850
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
7851
|
-
const replayStyles = replay ?
|
|
7851
|
+
const replayStyles = replay ? chunk275WERXZ_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
7852
7852
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7853
7853
|
"svg",
|
|
7854
7854
|
{
|
|
@@ -7856,10 +7856,10 @@ function renderContentPart(el, options) {
|
|
|
7856
7856
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
7857
7857
|
preserveAspectRatio: "none",
|
|
7858
7858
|
children: [
|
|
7859
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
7859
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk275WERXZ_js.INK_REPLAY_KEYFRAMES }),
|
|
7860
7860
|
el.inkStrokes.map((stroke, i) => {
|
|
7861
|
-
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 &&
|
|
7862
|
-
const pointWidths =
|
|
7861
|
+
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 && chunk275WERXZ_js.hasPressureVariation(stroke.pressures)) {
|
|
7862
|
+
const pointWidths = chunk275WERXZ_js.pressuresToWidths(stroke.pressures, stroke.width);
|
|
7863
7863
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(
|
|
7864
7864
|
stroke.path,
|
|
7865
7865
|
pointWidths,
|
|
@@ -8071,16 +8071,16 @@ function getOleIcon(type, color, size = 32) {
|
|
|
8071
8071
|
}
|
|
8072
8072
|
}
|
|
8073
8073
|
function getOleAriaLabel(el) {
|
|
8074
|
-
const oleType =
|
|
8075
|
-
const typeLabel =
|
|
8074
|
+
const oleType = chunk275WERXZ_js.resolveOleType(el);
|
|
8075
|
+
const typeLabel = chunk275WERXZ_js.getOleTypeLabel(oleType);
|
|
8076
8076
|
if (el.fileName) {
|
|
8077
8077
|
return `${typeLabel}: ${el.fileName}`;
|
|
8078
8078
|
}
|
|
8079
8079
|
return typeLabel;
|
|
8080
8080
|
}
|
|
8081
8081
|
function renderOleBadge(oleType) {
|
|
8082
|
-
const color =
|
|
8083
|
-
const shortLabel =
|
|
8082
|
+
const color = chunk275WERXZ_js.getOleTypeColor(oleType);
|
|
8083
|
+
const shortLabel = chunk275WERXZ_js.getOleBadgeLabel(oleType);
|
|
8084
8084
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", className: "absolute bottom-1 right-1 z-10", children: [
|
|
8085
8085
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "2", width: "20", height: "20", rx: "3", fill: color }),
|
|
8086
8086
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8172,11 +8172,11 @@ function InlineTextEditor({
|
|
|
8172
8172
|
mountedRef.current = true;
|
|
8173
8173
|
return;
|
|
8174
8174
|
}
|
|
8175
|
-
const pending =
|
|
8175
|
+
const pending = chunk275WERXZ_js.getPendingSelectionRestore();
|
|
8176
8176
|
if (!pending || !editorRef.current) {
|
|
8177
8177
|
return;
|
|
8178
8178
|
}
|
|
8179
|
-
|
|
8179
|
+
chunk275WERXZ_js.restoreSegmentSelection(
|
|
8180
8180
|
editorRef.current,
|
|
8181
8181
|
pending.startSegIdx,
|
|
8182
8182
|
pending.startOffset,
|
|
@@ -8184,8 +8184,8 @@ function InlineTextEditor({
|
|
|
8184
8184
|
pending.endOffset
|
|
8185
8185
|
);
|
|
8186
8186
|
});
|
|
8187
|
-
const warpStyle =
|
|
8188
|
-
const compensationTransform =
|
|
8187
|
+
const warpStyle = chunkDPTDFK2L_js.getTextWarpStyle(textStyleRaw);
|
|
8188
|
+
const compensationTransform = chunk275WERXZ_js.getTextCompensationTransform(element);
|
|
8189
8189
|
const warpTransform = warpStyle?.transform;
|
|
8190
8190
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
8191
8191
|
const wrapperStyle = {
|
|
@@ -8260,7 +8260,7 @@ function InlineTextEditor({
|
|
|
8260
8260
|
const text = e.clipboardData.getData("text/plain");
|
|
8261
8261
|
document.execCommand("insertText", false, text);
|
|
8262
8262
|
},
|
|
8263
|
-
children: seed.hasRichSegments ?
|
|
8263
|
+
children: seed.hasRichSegments ? chunkDPTDFK2L_js.renderTextSegments(element, chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
8264
8264
|
}
|
|
8265
8265
|
);
|
|
8266
8266
|
}
|
|
@@ -8270,7 +8270,7 @@ function FailedToLoad() {
|
|
|
8270
8270
|
var LazyModel3DScene = React32__default.default.lazy(
|
|
8271
8271
|
async () => {
|
|
8272
8272
|
try {
|
|
8273
|
-
return await import('./Model3DScene-
|
|
8273
|
+
return await import('./Model3DScene-RYR4SSOM.js');
|
|
8274
8274
|
} catch {
|
|
8275
8275
|
return { default: FailedToLoad };
|
|
8276
8276
|
}
|
|
@@ -8415,11 +8415,11 @@ function buildEmbedInfo(el) {
|
|
|
8415
8415
|
const canDownload = Boolean(el.oleEmbeddedData);
|
|
8416
8416
|
return {
|
|
8417
8417
|
fileName: el.oleEmbeddedFileName ?? el.fileName,
|
|
8418
|
-
readableSize:
|
|
8418
|
+
readableSize: chunk275WERXZ_js.formatBytes(el.oleEmbeddedByteSize),
|
|
8419
8419
|
progId: el.oleProgId,
|
|
8420
|
-
typeLabel:
|
|
8420
|
+
typeLabel: chunk275WERXZ_js.getOleTypeLabel(chunk275WERXZ_js.resolveOleType(el)),
|
|
8421
8421
|
canDownload,
|
|
8422
|
-
canOpenInBrowser: canDownload &&
|
|
8422
|
+
canOpenInBrowser: canDownload && chunk275WERXZ_js.isBrowserOpenableMime(el.oleEmbeddedMimeType)
|
|
8423
8423
|
};
|
|
8424
8424
|
}
|
|
8425
8425
|
function buildTooltip(info) {
|
|
@@ -8469,7 +8469,7 @@ function OleActionFooter({ el, info }) {
|
|
|
8469
8469
|
"button",
|
|
8470
8470
|
{
|
|
8471
8471
|
type: "button",
|
|
8472
|
-
onClick: () =>
|
|
8472
|
+
onClick: () => chunk275WERXZ_js.openUrlInNewTab(el.oleEmbeddedData),
|
|
8473
8473
|
className: "rounded px-1.5 py-0.5 bg-white/15 hover:bg-white/25 focus-visible:outline focus-visible:outline-1 focus-visible:outline-white",
|
|
8474
8474
|
title: `Open ${downloadName} in a new tab`,
|
|
8475
8475
|
children: t("pptx.ole.open")
|
|
@@ -8481,7 +8481,7 @@ function OleActionFooter({ el, info }) {
|
|
|
8481
8481
|
);
|
|
8482
8482
|
}
|
|
8483
8483
|
function OleRenderer({ element: el }) {
|
|
8484
|
-
const oleType =
|
|
8484
|
+
const oleType = chunk275WERXZ_js.resolveOleType(el);
|
|
8485
8485
|
const ariaLabel = getOleAriaLabel(el);
|
|
8486
8486
|
const info = buildEmbedInfo(el);
|
|
8487
8487
|
const tooltip = buildTooltip(info);
|
|
@@ -8509,8 +8509,8 @@ function OleRenderer({ element: el }) {
|
|
|
8509
8509
|
}
|
|
8510
8510
|
);
|
|
8511
8511
|
}
|
|
8512
|
-
const color =
|
|
8513
|
-
const label =
|
|
8512
|
+
const color = chunk275WERXZ_js.getOleTypeColor(oleType);
|
|
8513
|
+
const label = chunk275WERXZ_js.getOleTypeLabel(oleType);
|
|
8514
8514
|
const displayName = info.fileName ?? label;
|
|
8515
8515
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8516
8516
|
"div",
|
|
@@ -8656,7 +8656,7 @@ function useSmartArtHoverState(containerRef) {
|
|
|
8656
8656
|
cancelPendingHide();
|
|
8657
8657
|
setHoveredNodeId(nodeEl.getAttribute(NODE_ID_ATTR));
|
|
8658
8658
|
setHoveredNodeRect(
|
|
8659
|
-
|
|
8659
|
+
chunk275WERXZ_js.computeInlineEditorRect(
|
|
8660
8660
|
nodeEl.getBoundingClientRect(),
|
|
8661
8661
|
container.getBoundingClientRect()
|
|
8662
8662
|
)
|
|
@@ -8715,7 +8715,7 @@ function SmartArtEditableLayer({
|
|
|
8715
8715
|
const textRect = textEl?.getBoundingClientRect();
|
|
8716
8716
|
const hasTextRect = textRect !== void 0 && textRect.width > 0 && textRect.height > 0;
|
|
8717
8717
|
const sourceRect = hasTextRect ? textRect : nodeEl.getBoundingClientRect();
|
|
8718
|
-
const rect =
|
|
8718
|
+
const rect = chunk275WERXZ_js.computeInlineEditorRect(sourceRect, container.getBoundingClientRect());
|
|
8719
8719
|
const paddedRect = {
|
|
8720
8720
|
left: rect.left - EDITOR_PADDING,
|
|
8721
8721
|
top: rect.top - EDITOR_PADDING,
|
|
@@ -8732,7 +8732,7 @@ function SmartArtEditableLayer({
|
|
|
8732
8732
|
if (!canEdit) {
|
|
8733
8733
|
return children;
|
|
8734
8734
|
}
|
|
8735
|
-
const initialText = edit ?
|
|
8735
|
+
const initialText = edit ? chunk275WERXZ_js.findSmartArtNodeText(smartArtData, edit.nodeId) ?? "" : "";
|
|
8736
8736
|
const showStyleBar = !edit && hoveredNodeId !== null && hoveredNodeRect !== null && palette !== void 0 && onChangeNodeStyle !== void 0;
|
|
8737
8737
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8738
8738
|
"div",
|
|
@@ -8831,8 +8831,8 @@ function DrawingShapeRenderer({
|
|
|
8831
8831
|
}
|
|
8832
8832
|
const drawingW = maxX - minX || 1;
|
|
8833
8833
|
const drawingH = maxY - minY || 1;
|
|
8834
|
-
const shadow =
|
|
8835
|
-
const sw =
|
|
8834
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
8835
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
8836
8836
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8837
8837
|
"svg",
|
|
8838
8838
|
{
|
|
@@ -8841,7 +8841,7 @@ function DrawingShapeRenderer({
|
|
|
8841
8841
|
preserveAspectRatio: "xMidYMid meet",
|
|
8842
8842
|
"data-testid": "smartart-drawing-shapes",
|
|
8843
8843
|
children: shapes.map((shape, i) => {
|
|
8844
|
-
const fill = shape.fillColor ??
|
|
8844
|
+
const fill = shape.fillColor ?? chunkDPTDFK2L_js.colour(i, palette);
|
|
8845
8845
|
const relX = shape.x - minX;
|
|
8846
8846
|
const relY = shape.y - minY;
|
|
8847
8847
|
const rx = shape.shapeType === "roundRect" ? Math.min(shape.width, shape.height) * 0.1 : 0;
|
|
@@ -8850,10 +8850,10 @@ function DrawingShapeRenderer({
|
|
|
8850
8850
|
const rotation = shape.rotation ? `rotate(${shape.rotation} ${relX + shape.width / 2} ${relY + shape.height / 2})` : void 0;
|
|
8851
8851
|
const strokeCol = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
|
|
8852
8852
|
const strokeW = shape.strokeWidth ?? sw;
|
|
8853
|
-
const fontSize = shape.fontSize ??
|
|
8854
|
-
const nodeId = nodes ?
|
|
8853
|
+
const fontSize = shape.fontSize ?? chunkDPTDFK2L_js.fitFontSize(shape.text ?? "", shape.width * 0.85, shape.height, 14);
|
|
8854
|
+
const nodeId = nodes ? chunk275WERXZ_js.resolveDrawingShapeNodeId(shape, i, shapes, nodes) : void 0;
|
|
8855
8855
|
const nodeLabel = nodeId ? nodeLabels?.get(nodeId) : void 0;
|
|
8856
|
-
const groupProps = nodeId ?
|
|
8856
|
+
const groupProps = nodeId ? chunkDPTDFK2L_js.smartArtNodeGroupProps(nodeId, shadow, nodeLabel) : { style: { filter: shadow } };
|
|
8857
8857
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { ...groupProps, children: [
|
|
8858
8858
|
nodeLabel ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: nodeLabel }) : null,
|
|
8859
8859
|
isEllipse ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8871,7 +8871,7 @@ function DrawingShapeRenderer({
|
|
|
8871
8871
|
) : isChevron ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8872
8872
|
"polygon",
|
|
8873
8873
|
{
|
|
8874
|
-
points:
|
|
8874
|
+
points: chunkDPTDFK2L_js.chevronPoints(relX, relY, shape.width, shape.height),
|
|
8875
8875
|
fill,
|
|
8876
8876
|
stroke: strokeCol,
|
|
8877
8877
|
strokeWidth: strokeW,
|
|
@@ -8892,11 +8892,11 @@ function DrawingShapeRenderer({
|
|
|
8892
8892
|
}
|
|
8893
8893
|
),
|
|
8894
8894
|
shape.text ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8895
|
-
|
|
8895
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
8896
8896
|
{
|
|
8897
8897
|
x: relX + shape.width / 2,
|
|
8898
8898
|
y: relY + shape.height / 2,
|
|
8899
|
-
text:
|
|
8899
|
+
text: chunkDPTDFK2L_js.truncate(shape.text, 40),
|
|
8900
8900
|
fill: shape.fontColor ?? "white",
|
|
8901
8901
|
fontSize,
|
|
8902
8902
|
className: "pointer-events-none"
|
|
@@ -8912,7 +8912,7 @@ function DrawingShapeRenderer({
|
|
|
8912
8912
|
function resolveNodeStyle(node, index, palette) {
|
|
8913
8913
|
const style = node.style;
|
|
8914
8914
|
return {
|
|
8915
|
-
fill: style?.fillColor ??
|
|
8915
|
+
fill: style?.fillColor ?? chunkDPTDFK2L_js.colour(index, palette),
|
|
8916
8916
|
fontColor: style?.fontColor ?? "white",
|
|
8917
8917
|
fontWeight: style?.bold ? 700 : void 0,
|
|
8918
8918
|
fontStyle: style?.italic ? "italic" : void 0,
|
|
@@ -8934,8 +8934,8 @@ function ListRenderer({
|
|
|
8934
8934
|
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
8935
8935
|
const itemW = w - pad * 2;
|
|
8936
8936
|
const rx = Math.min(6, itemH * 0.15);
|
|
8937
|
-
const shadow =
|
|
8938
|
-
const sw =
|
|
8937
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
8938
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
8939
8939
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8940
8940
|
"svg",
|
|
8941
8941
|
{
|
|
@@ -8945,13 +8945,13 @@ function ListRenderer({
|
|
|
8945
8945
|
"data-testid": "smartart-list",
|
|
8946
8946
|
children: nodes.map((node, i) => {
|
|
8947
8947
|
const y = pad + i * (itemH + gap);
|
|
8948
|
-
const fontSize =
|
|
8948
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, itemW * 0.9, itemH, 12);
|
|
8949
8949
|
const ns = resolveNodeStyle(node, i, palette);
|
|
8950
8950
|
const label = nodeLabels?.get(node.id);
|
|
8951
8951
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8952
8952
|
"g",
|
|
8953
8953
|
{
|
|
8954
|
-
...
|
|
8954
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
8955
8955
|
children: [
|
|
8956
8956
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
8957
8957
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8963,17 +8963,17 @@ function ListRenderer({
|
|
|
8963
8963
|
height: itemH,
|
|
8964
8964
|
rx,
|
|
8965
8965
|
fill: ns.fill,
|
|
8966
|
-
opacity:
|
|
8966
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style),
|
|
8967
8967
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
8968
8968
|
strokeWidth: sw
|
|
8969
8969
|
}
|
|
8970
8970
|
),
|
|
8971
8971
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8972
|
-
|
|
8972
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
8973
8973
|
{
|
|
8974
8974
|
x: pad + itemW / 2,
|
|
8975
8975
|
y: y + itemH / 2,
|
|
8976
|
-
text:
|
|
8976
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 40),
|
|
8977
8977
|
fill: ns.fontColor,
|
|
8978
8978
|
fontWeight: ns.fontWeight,
|
|
8979
8979
|
fontStyle: ns.fontStyle,
|
|
@@ -9005,8 +9005,8 @@ function ProcessRenderer({
|
|
|
9005
9005
|
const itemW = (usableW - gap * (nodes.length - 1)) / nodes.length;
|
|
9006
9006
|
const itemH = Math.min(h - pad * 2, h * 0.6);
|
|
9007
9007
|
const yMid = h / 2;
|
|
9008
|
-
const shadow =
|
|
9009
|
-
const sw =
|
|
9008
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9009
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
9010
9010
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9011
9011
|
"svg",
|
|
9012
9012
|
{
|
|
@@ -9020,13 +9020,13 @@ function ProcessRenderer({
|
|
|
9020
9020
|
const isFirst = i === 0;
|
|
9021
9021
|
const isLast = i === nodes.length - 1;
|
|
9022
9022
|
const points = isFirst ? `${x},${yMid - halfH} ${x + itemW - chevronDepth},${yMid - halfH} ${x + itemW},${yMid} ${x + itemW - chevronDepth},${yMid + halfH} ${x},${yMid + halfH}` : isLast ? `${x},${yMid - halfH} ${x + itemW},${yMid - halfH} ${x + itemW},${yMid + halfH} ${x},${yMid + halfH} ${x + chevronDepth},${yMid}` : `${x},${yMid - halfH} ${x + itemW - chevronDepth},${yMid - halfH} ${x + itemW},${yMid} ${x + itemW - chevronDepth},${yMid + halfH} ${x},${yMid + halfH} ${x + chevronDepth},${yMid}`;
|
|
9023
|
-
const fontSize =
|
|
9023
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, itemW * 0.7, itemH, 12);
|
|
9024
9024
|
const ns = resolveNodeStyle(node, i, palette);
|
|
9025
9025
|
const label = nodeLabels?.get(node.id);
|
|
9026
9026
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9027
9027
|
"g",
|
|
9028
9028
|
{
|
|
9029
|
-
...
|
|
9029
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
9030
9030
|
children: [
|
|
9031
9031
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
9032
9032
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9034,17 +9034,17 @@ function ProcessRenderer({
|
|
|
9034
9034
|
{
|
|
9035
9035
|
points,
|
|
9036
9036
|
fill: ns.fill,
|
|
9037
|
-
opacity:
|
|
9037
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style),
|
|
9038
9038
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
9039
9039
|
strokeWidth: sw
|
|
9040
9040
|
}
|
|
9041
9041
|
),
|
|
9042
9042
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9043
|
-
|
|
9043
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9044
9044
|
{
|
|
9045
9045
|
x: x + itemW / 2,
|
|
9046
9046
|
y: yMid,
|
|
9047
|
-
text:
|
|
9047
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 25),
|
|
9048
9048
|
fill: ns.fontColor,
|
|
9049
9049
|
fontWeight: ns.fontWeight,
|
|
9050
9050
|
fontStyle: ns.fontStyle,
|
|
@@ -9074,8 +9074,8 @@ function CycleRenderer({
|
|
|
9074
9074
|
const cy = h / 2;
|
|
9075
9075
|
const radius = size * 0.35;
|
|
9076
9076
|
const nodeR = Math.max(size * 0.06, Math.min(size * 0.12, 200 / nodes.length));
|
|
9077
|
-
const shadow =
|
|
9078
|
-
const sw =
|
|
9077
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9078
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
9079
9079
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9080
9080
|
"svg",
|
|
9081
9081
|
{
|
|
@@ -9114,13 +9114,13 @@ function CycleRenderer({
|
|
|
9114
9114
|
const angle = i / nodes.length * Math.PI * 2 - Math.PI / 2;
|
|
9115
9115
|
const nx = cx + radius * Math.cos(angle);
|
|
9116
9116
|
const ny = cy + radius * Math.sin(angle);
|
|
9117
|
-
const fontSize =
|
|
9117
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, nodeR * 1.4, nodeR * 2, 11);
|
|
9118
9118
|
const ns = resolveNodeStyle(node, i, palette);
|
|
9119
9119
|
const label = nodeLabels?.get(node.id);
|
|
9120
9120
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9121
9121
|
"g",
|
|
9122
9122
|
{
|
|
9123
|
-
...
|
|
9123
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
9124
9124
|
children: [
|
|
9125
9125
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
9126
9126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9130,17 +9130,17 @@ function CycleRenderer({
|
|
|
9130
9130
|
cy: ny,
|
|
9131
9131
|
r: nodeR,
|
|
9132
9132
|
fill: ns.fill,
|
|
9133
|
-
opacity:
|
|
9133
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style),
|
|
9134
9134
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
9135
9135
|
strokeWidth: sw
|
|
9136
9136
|
}
|
|
9137
9137
|
),
|
|
9138
9138
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9139
|
-
|
|
9139
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9140
9140
|
{
|
|
9141
9141
|
x: nx,
|
|
9142
9142
|
y: ny,
|
|
9143
|
-
text:
|
|
9143
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 20),
|
|
9144
9144
|
fill: ns.fontColor,
|
|
9145
9145
|
fontWeight: ns.fontWeight,
|
|
9146
9146
|
fontStyle: ns.fontStyle,
|
|
@@ -9175,8 +9175,8 @@ function MatrixRenderer({
|
|
|
9175
9175
|
const cellW = (usableW - gap * (cols - 1)) / cols;
|
|
9176
9176
|
const cellH = (usableH - gap * (rows - 1)) / rows;
|
|
9177
9177
|
const rx = Math.min(6, Math.min(cellW, cellH) * 0.1);
|
|
9178
|
-
const shadow =
|
|
9179
|
-
const sw =
|
|
9178
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9179
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
9180
9180
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9181
9181
|
"svg",
|
|
9182
9182
|
{
|
|
@@ -9189,13 +9189,13 @@ function MatrixRenderer({
|
|
|
9189
9189
|
const row = Math.floor(i / cols);
|
|
9190
9190
|
const x = pad + col * (cellW + gap);
|
|
9191
9191
|
const y = pad + row * (cellH + gap);
|
|
9192
|
-
const fontSize =
|
|
9192
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, cellW * 0.85, cellH, 12);
|
|
9193
9193
|
const ns = resolveNodeStyle(node, i, palette);
|
|
9194
9194
|
const label = nodeLabels?.get(node.id);
|
|
9195
9195
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9196
9196
|
"g",
|
|
9197
9197
|
{
|
|
9198
|
-
...
|
|
9198
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
9199
9199
|
children: [
|
|
9200
9200
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
9201
9201
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9207,17 +9207,17 @@ function MatrixRenderer({
|
|
|
9207
9207
|
height: cellH,
|
|
9208
9208
|
rx,
|
|
9209
9209
|
fill: ns.fill,
|
|
9210
|
-
opacity:
|
|
9210
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style),
|
|
9211
9211
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
9212
9212
|
strokeWidth: sw
|
|
9213
9213
|
}
|
|
9214
9214
|
),
|
|
9215
9215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9216
|
-
|
|
9216
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9217
9217
|
{
|
|
9218
9218
|
x: x + cellW / 2,
|
|
9219
9219
|
y: y + cellH / 2,
|
|
9220
|
-
text:
|
|
9220
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 30),
|
|
9221
9221
|
fill: ns.fontColor,
|
|
9222
9222
|
fontWeight: ns.fontWeight ?? 500,
|
|
9223
9223
|
fontStyle: ns.fontStyle,
|
|
@@ -9246,8 +9246,8 @@ function PyramidRenderer({
|
|
|
9246
9246
|
const usableH = h - pad * 2;
|
|
9247
9247
|
const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
9248
9248
|
const maxW = w - pad * 2;
|
|
9249
|
-
const shadow =
|
|
9250
|
-
const sw =
|
|
9249
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9250
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
9251
9251
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9252
9252
|
"svg",
|
|
9253
9253
|
{
|
|
@@ -9271,28 +9271,28 @@ function PyramidRenderer({
|
|
|
9271
9271
|
`${bottomRight},${y + bandH}`,
|
|
9272
9272
|
`${bottomLeft},${y + bandH}`
|
|
9273
9273
|
].join(" ");
|
|
9274
|
-
const fontSize =
|
|
9274
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, topW * 0.85, bandH, 12);
|
|
9275
9275
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9276
9276
|
"g",
|
|
9277
9277
|
{
|
|
9278
|
-
...
|
|
9278
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9279
9279
|
children: [
|
|
9280
9280
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9281
9281
|
"polygon",
|
|
9282
9282
|
{
|
|
9283
9283
|
points,
|
|
9284
|
-
fill:
|
|
9285
|
-
opacity:
|
|
9284
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9285
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style),
|
|
9286
9286
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
9287
9287
|
strokeWidth: sw
|
|
9288
9288
|
}
|
|
9289
9289
|
),
|
|
9290
9290
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9291
|
-
|
|
9291
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9292
9292
|
{
|
|
9293
9293
|
x: w / 2,
|
|
9294
9294
|
y: y + bandH / 2,
|
|
9295
|
-
text:
|
|
9295
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 30),
|
|
9296
9296
|
fill: "white",
|
|
9297
9297
|
fontSize,
|
|
9298
9298
|
className: "pointer-events-none"
|
|
@@ -9314,7 +9314,7 @@ function VennRenderer({
|
|
|
9314
9314
|
}) {
|
|
9315
9315
|
const w = element.width;
|
|
9316
9316
|
const h = element.height;
|
|
9317
|
-
const shadow =
|
|
9317
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9318
9318
|
if (nodes.length <= 4) {
|
|
9319
9319
|
const cx = w / 2;
|
|
9320
9320
|
const cy2 = h / 2;
|
|
@@ -9331,19 +9331,19 @@ function VennRenderer({
|
|
|
9331
9331
|
const angle = i / nodes.length * Math.PI * 2 - Math.PI / 2;
|
|
9332
9332
|
const nx = cx + spread * Math.cos(angle);
|
|
9333
9333
|
const ny = cy2 + spread * Math.sin(angle);
|
|
9334
|
-
const fontSize =
|
|
9334
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, r2 * 1.2, r2 * 2, 11);
|
|
9335
9335
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9336
9336
|
"g",
|
|
9337
9337
|
{
|
|
9338
|
-
...
|
|
9338
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9339
9339
|
children: [
|
|
9340
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy: ny, r: r2, fill:
|
|
9340
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy: ny, r: r2, fill: chunkDPTDFK2L_js.colour(i, palette), opacity: 0.35 }),
|
|
9341
9341
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9342
|
-
|
|
9342
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9343
9343
|
{
|
|
9344
9344
|
x: nx,
|
|
9345
9345
|
y: ny,
|
|
9346
|
-
text:
|
|
9346
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 20),
|
|
9347
9347
|
fill: "white",
|
|
9348
9348
|
fontSize,
|
|
9349
9349
|
fontWeight: "bold",
|
|
@@ -9372,19 +9372,19 @@ function VennRenderer({
|
|
|
9372
9372
|
"data-testid": "smartart-venn",
|
|
9373
9373
|
children: nodes.map((node, i) => {
|
|
9374
9374
|
const nx = offsetX + i * (r * 2 - overlap);
|
|
9375
|
-
const fontSize =
|
|
9375
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, r * 1.2, r * 2, 10);
|
|
9376
9376
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9377
9377
|
"g",
|
|
9378
9378
|
{
|
|
9379
|
-
...
|
|
9379
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9380
9380
|
children: [
|
|
9381
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy, r, fill:
|
|
9381
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy, r, fill: chunkDPTDFK2L_js.colour(i, palette), opacity: 0.35 }),
|
|
9382
9382
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9383
|
-
|
|
9383
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9384
9384
|
{
|
|
9385
9385
|
x: nx,
|
|
9386
9386
|
y: cy,
|
|
9387
|
-
text:
|
|
9387
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 20),
|
|
9388
9388
|
fill: "white",
|
|
9389
9389
|
fontSize,
|
|
9390
9390
|
fontWeight: "bold",
|
|
@@ -9410,7 +9410,7 @@ function FunnelRenderer({
|
|
|
9410
9410
|
const pad = 8;
|
|
9411
9411
|
const usableW = w - pad * 2;
|
|
9412
9412
|
const stageH = (h - pad * 2) / nodes.length;
|
|
9413
|
-
const shadow =
|
|
9413
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9414
9414
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9415
9415
|
"svg",
|
|
9416
9416
|
{
|
|
@@ -9432,26 +9432,26 @@ function FunnelRenderer({
|
|
|
9432
9432
|
`${bottomRight},${y + stageH}`,
|
|
9433
9433
|
`${bottomLeft},${y + stageH}`
|
|
9434
9434
|
].join(" ");
|
|
9435
|
-
const fontSize =
|
|
9435
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, topWidth * 0.85, stageH, 11);
|
|
9436
9436
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9437
9437
|
"g",
|
|
9438
9438
|
{
|
|
9439
|
-
...
|
|
9439
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9440
9440
|
children: [
|
|
9441
9441
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9442
9442
|
"polygon",
|
|
9443
9443
|
{
|
|
9444
9444
|
points,
|
|
9445
|
-
fill:
|
|
9446
|
-
opacity:
|
|
9445
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9446
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style)
|
|
9447
9447
|
}
|
|
9448
9448
|
),
|
|
9449
9449
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9450
|
-
|
|
9450
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9451
9451
|
{
|
|
9452
9452
|
x: w / 2,
|
|
9453
9453
|
y: y + stageH / 2,
|
|
9454
|
-
text:
|
|
9454
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 30),
|
|
9455
9455
|
fill: "white",
|
|
9456
9456
|
fontSize,
|
|
9457
9457
|
className: "pointer-events-none"
|
|
@@ -9478,7 +9478,7 @@ function TargetRenderer({
|
|
|
9478
9478
|
const maxR = Math.min(cx - 8, cy - 8);
|
|
9479
9479
|
const fontSize = Math.max(7, Math.min(10, maxR / (nodes.length + 1)));
|
|
9480
9480
|
const labelX = cx + maxR + 8;
|
|
9481
|
-
const shadow =
|
|
9481
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9482
9482
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9483
9483
|
"svg",
|
|
9484
9484
|
{
|
|
@@ -9491,7 +9491,7 @@ function TargetRenderer({
|
|
|
9491
9491
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9492
9492
|
"g",
|
|
9493
9493
|
{
|
|
9494
|
-
...
|
|
9494
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9495
9495
|
children: [
|
|
9496
9496
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9497
9497
|
"circle",
|
|
@@ -9499,8 +9499,8 @@ function TargetRenderer({
|
|
|
9499
9499
|
cx,
|
|
9500
9500
|
cy,
|
|
9501
9501
|
r: Math.max(r, 4),
|
|
9502
|
-
fill:
|
|
9503
|
-
opacity:
|
|
9502
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9503
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style)
|
|
9504
9504
|
}
|
|
9505
9505
|
),
|
|
9506
9506
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9510,7 +9510,7 @@ function TargetRenderer({
|
|
|
9510
9510
|
y1: cy,
|
|
9511
9511
|
x2: labelX - 2,
|
|
9512
9512
|
y2: 8 + i * (fontSize + 6),
|
|
9513
|
-
stroke:
|
|
9513
|
+
stroke: chunkDPTDFK2L_js.colour(i, palette),
|
|
9514
9514
|
strokeWidth: 1,
|
|
9515
9515
|
opacity: 0.6
|
|
9516
9516
|
}
|
|
@@ -9522,10 +9522,10 @@ function TargetRenderer({
|
|
|
9522
9522
|
y: 8 + i * (fontSize + 6) + fontSize / 2,
|
|
9523
9523
|
textAnchor: "start",
|
|
9524
9524
|
dominantBaseline: "central",
|
|
9525
|
-
fill:
|
|
9525
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9526
9526
|
fontSize,
|
|
9527
9527
|
className: "pointer-events-none",
|
|
9528
|
-
children:
|
|
9528
|
+
children: chunkDPTDFK2L_js.truncate(node.text, 30)
|
|
9529
9529
|
}
|
|
9530
9530
|
)
|
|
9531
9531
|
]
|
|
@@ -9542,12 +9542,12 @@ function HierarchyRenderer({
|
|
|
9542
9542
|
palette,
|
|
9543
9543
|
style
|
|
9544
9544
|
}) {
|
|
9545
|
-
const roots =
|
|
9545
|
+
const roots = chunkDPTDFK2L_js.buildTree(nodes);
|
|
9546
9546
|
if (roots.length === 0) {
|
|
9547
9547
|
return /* @__PURE__ */ jsxRuntime.jsx(ListRenderer, { element, nodes, palette, style });
|
|
9548
9548
|
}
|
|
9549
|
-
const totalLeaves = roots.reduce((s, r) => s +
|
|
9550
|
-
const depth = Math.max(...roots.map(
|
|
9549
|
+
const totalLeaves = roots.reduce((s, r) => s + chunkDPTDFK2L_js.treeWidth(r), 0);
|
|
9550
|
+
const depth = Math.max(...roots.map(chunkDPTDFK2L_js.treeDepth));
|
|
9551
9551
|
const svgW = element.width;
|
|
9552
9552
|
const svgH = element.height;
|
|
9553
9553
|
const cellW = svgW / totalLeaves;
|
|
@@ -9555,24 +9555,24 @@ function HierarchyRenderer({
|
|
|
9555
9555
|
const boxW = Math.min(cellW * 0.8, 140);
|
|
9556
9556
|
const boxH = Math.min(cellH * 0.4, 36);
|
|
9557
9557
|
const rx = Math.min(6, boxH * 0.15);
|
|
9558
|
-
const shadow =
|
|
9559
|
-
const sw =
|
|
9558
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9559
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
9560
9560
|
const elements = [];
|
|
9561
9561
|
let colourIdx = 0;
|
|
9562
9562
|
function renderTreeNode(t, xOffset, level) {
|
|
9563
|
-
const w =
|
|
9563
|
+
const w = chunkDPTDFK2L_js.treeWidth(t);
|
|
9564
9564
|
const nodeCx = (xOffset + w / 2) * cellW;
|
|
9565
9565
|
const nodeCy = level * cellH + cellH / 2;
|
|
9566
9566
|
const ci = colourIdx++;
|
|
9567
|
-
const fontSize =
|
|
9567
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(t.node.text, boxW * 0.9, boxH, 11);
|
|
9568
9568
|
for (const child of t.children) {
|
|
9569
|
-
const childW =
|
|
9569
|
+
const childW = chunkDPTDFK2L_js.treeWidth(child);
|
|
9570
9570
|
let childOffset2 = xOffset;
|
|
9571
9571
|
for (const c of t.children) {
|
|
9572
9572
|
if (c === child) {
|
|
9573
9573
|
break;
|
|
9574
9574
|
}
|
|
9575
|
-
childOffset2 +=
|
|
9575
|
+
childOffset2 += chunkDPTDFK2L_js.treeWidth(c);
|
|
9576
9576
|
}
|
|
9577
9577
|
const childCx = (childOffset2 + childW / 2) * cellW;
|
|
9578
9578
|
const childCy = (level + 1) * cellH + cellH / 2;
|
|
@@ -9595,7 +9595,7 @@ function HierarchyRenderer({
|
|
|
9595
9595
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9596
9596
|
"g",
|
|
9597
9597
|
{
|
|
9598
|
-
...
|
|
9598
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(t.node.id, shadow),
|
|
9599
9599
|
children: [
|
|
9600
9600
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9601
9601
|
"rect",
|
|
@@ -9605,18 +9605,18 @@ function HierarchyRenderer({
|
|
|
9605
9605
|
width: boxW,
|
|
9606
9606
|
height: boxH,
|
|
9607
9607
|
rx,
|
|
9608
|
-
fill:
|
|
9609
|
-
opacity:
|
|
9608
|
+
fill: chunkDPTDFK2L_js.colour(ci, palette),
|
|
9609
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(ci, nodes.length, style),
|
|
9610
9610
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
9611
9611
|
strokeWidth: sw
|
|
9612
9612
|
}
|
|
9613
9613
|
),
|
|
9614
9614
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9615
|
-
|
|
9615
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9616
9616
|
{
|
|
9617
9617
|
x: nodeCx,
|
|
9618
9618
|
y: nodeCy,
|
|
9619
|
-
text:
|
|
9619
|
+
text: chunkDPTDFK2L_js.truncate(t.node.text, 40),
|
|
9620
9620
|
fill: "white",
|
|
9621
9621
|
fontSize,
|
|
9622
9622
|
className: "pointer-events-none"
|
|
@@ -9630,7 +9630,7 @@ function HierarchyRenderer({
|
|
|
9630
9630
|
let childOffset = xOffset;
|
|
9631
9631
|
for (const child of t.children) {
|
|
9632
9632
|
renderTreeNode(child, childOffset, level + 1);
|
|
9633
|
-
childOffset +=
|
|
9633
|
+
childOffset += chunkDPTDFK2L_js.treeWidth(child);
|
|
9634
9634
|
}
|
|
9635
9635
|
return w;
|
|
9636
9636
|
}
|
|
@@ -9665,7 +9665,7 @@ function GearRenderer({
|
|
|
9665
9665
|
const gearR = Math.min(spacing * 0.4, h * 0.35);
|
|
9666
9666
|
const innerR = gearR * 0.7;
|
|
9667
9667
|
const teethCount = 8;
|
|
9668
|
-
const shadow =
|
|
9668
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9669
9669
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9670
9670
|
"svg",
|
|
9671
9671
|
{
|
|
@@ -9677,27 +9677,27 @@ function GearRenderer({
|
|
|
9677
9677
|
gearNodes.map((node, i) => {
|
|
9678
9678
|
const gx = spacing * (i + 1);
|
|
9679
9679
|
const gy = h / 2 + (i % 2 === 0 ? 0 : gearR * 0.35);
|
|
9680
|
-
const fontSize =
|
|
9680
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, innerR * 1.2, innerR * 2, 11);
|
|
9681
9681
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9682
9682
|
"g",
|
|
9683
9683
|
{
|
|
9684
|
-
...
|
|
9684
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9685
9685
|
children: [
|
|
9686
9686
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9687
9687
|
"path",
|
|
9688
9688
|
{
|
|
9689
|
-
d:
|
|
9690
|
-
fill:
|
|
9691
|
-
opacity:
|
|
9689
|
+
d: chunkDPTDFK2L_js.gearPath(gx, gy, gearR, innerR, teethCount),
|
|
9690
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9691
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style)
|
|
9692
9692
|
}
|
|
9693
9693
|
),
|
|
9694
9694
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: gx, cy: gy, r: innerR * 0.5, fill: "white", opacity: 0.25 }),
|
|
9695
9695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9696
|
-
|
|
9696
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9697
9697
|
{
|
|
9698
9698
|
x: gx,
|
|
9699
9699
|
y: gy,
|
|
9700
|
-
text:
|
|
9700
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 20),
|
|
9701
9701
|
fill: "white",
|
|
9702
9702
|
fontSize,
|
|
9703
9703
|
fontWeight: "bold",
|
|
@@ -9719,8 +9719,8 @@ function GearRenderer({
|
|
|
9719
9719
|
cx: lx,
|
|
9720
9720
|
cy: ly,
|
|
9721
9721
|
r: 3,
|
|
9722
|
-
fill:
|
|
9723
|
-
opacity:
|
|
9722
|
+
fill: chunkDPTDFK2L_js.colour(gearCount + i, palette),
|
|
9723
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(gearCount + i, nodes.length, style)
|
|
9724
9724
|
}
|
|
9725
9725
|
),
|
|
9726
9726
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9730,10 +9730,10 @@ function GearRenderer({
|
|
|
9730
9730
|
y: ly,
|
|
9731
9731
|
textAnchor: "start",
|
|
9732
9732
|
dominantBaseline: "central",
|
|
9733
|
-
fill:
|
|
9733
|
+
fill: chunkDPTDFK2L_js.colour(gearCount + i, palette),
|
|
9734
9734
|
fontSize: 10,
|
|
9735
9735
|
className: "pointer-events-none",
|
|
9736
|
-
children:
|
|
9736
|
+
children: chunkDPTDFK2L_js.truncate(node.text, 30)
|
|
9737
9737
|
}
|
|
9738
9738
|
)
|
|
9739
9739
|
] }, `${element.id}-gear-extra-${node.id}-${i}`);
|
|
@@ -9757,7 +9757,7 @@ function TimelineRenderer({
|
|
|
9757
9757
|
const lineLen = lineEndX - lineStartX;
|
|
9758
9758
|
const dotR = Math.max(4, Math.min(8, lineLen / (nodes.length * 4)));
|
|
9759
9759
|
const labelOffset = Math.min(h * 0.28, 40);
|
|
9760
|
-
const shadow =
|
|
9760
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9761
9761
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9762
9762
|
"svg",
|
|
9763
9763
|
{
|
|
@@ -9779,11 +9779,11 @@ function TimelineRenderer({
|
|
|
9779
9779
|
const above = i % 2 === 0;
|
|
9780
9780
|
const textY = above ? lineY - labelOffset : lineY + labelOffset;
|
|
9781
9781
|
const stemEndY = above ? lineY - dotR - 2 : lineY + dotR + 2;
|
|
9782
|
-
const fontSize =
|
|
9782
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, lineLen / nodes.length * 0.9, labelOffset, 10);
|
|
9783
9783
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9784
9784
|
"g",
|
|
9785
9785
|
{
|
|
9786
|
-
...
|
|
9786
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9787
9787
|
children: [
|
|
9788
9788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9789
9789
|
"line",
|
|
@@ -9792,7 +9792,7 @@ function TimelineRenderer({
|
|
|
9792
9792
|
y1: stemEndY,
|
|
9793
9793
|
x2: x,
|
|
9794
9794
|
y2: textY + (above ? fontSize : -fontSize),
|
|
9795
|
-
stroke:
|
|
9795
|
+
stroke: chunkDPTDFK2L_js.colour(i, palette),
|
|
9796
9796
|
strokeWidth: 1,
|
|
9797
9797
|
opacity: 0.5
|
|
9798
9798
|
}
|
|
@@ -9803,17 +9803,17 @@ function TimelineRenderer({
|
|
|
9803
9803
|
cx: x,
|
|
9804
9804
|
cy: lineY,
|
|
9805
9805
|
r: dotR,
|
|
9806
|
-
fill:
|
|
9807
|
-
opacity:
|
|
9806
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9807
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style)
|
|
9808
9808
|
}
|
|
9809
9809
|
),
|
|
9810
9810
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9811
|
-
|
|
9811
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9812
9812
|
{
|
|
9813
|
-
text:
|
|
9813
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 20) ?? "",
|
|
9814
9814
|
x,
|
|
9815
9815
|
y: textY,
|
|
9816
|
-
fill:
|
|
9816
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9817
9817
|
fontSize,
|
|
9818
9818
|
anchor: above ? "bottom" : "top",
|
|
9819
9819
|
className: "pointer-events-none"
|
|
@@ -9846,8 +9846,8 @@ function BendingProcessRenderer({
|
|
|
9846
9846
|
const boxH = Math.min(cellH * 0.6, 32);
|
|
9847
9847
|
const rx = Math.min(5, boxH * 0.15);
|
|
9848
9848
|
const arrowSize = 6;
|
|
9849
|
-
const shadow =
|
|
9850
|
-
const sw =
|
|
9849
|
+
const shadow = chunkDPTDFK2L_js.styleShadow(style);
|
|
9850
|
+
const sw = chunkDPTDFK2L_js.styleStroke(style);
|
|
9851
9851
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9852
9852
|
"svg",
|
|
9853
9853
|
{
|
|
@@ -9861,7 +9861,7 @@ function BendingProcessRenderer({
|
|
|
9861
9861
|
const col = row % 2 === 0 ? colInRow : COLS - 1 - colInRow;
|
|
9862
9862
|
const nodeCx = padX + col * cellW + cellW / 2;
|
|
9863
9863
|
const nodeCy = padY + row * cellH + cellH / 2;
|
|
9864
|
-
const fontSize =
|
|
9864
|
+
const fontSize = chunkDPTDFK2L_js.fitFontSize(node.text, boxW * 0.85, boxH, 10);
|
|
9865
9865
|
let arrow = null;
|
|
9866
9866
|
if (i < nodes.length - 1) {
|
|
9867
9867
|
const nextRow = Math.floor((i + 1) / COLS);
|
|
@@ -9921,7 +9921,7 @@ function BendingProcessRenderer({
|
|
|
9921
9921
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9922
9922
|
"g",
|
|
9923
9923
|
{
|
|
9924
|
-
...
|
|
9924
|
+
...chunkDPTDFK2L_js.smartArtNodeGroupProps(node.id, shadow),
|
|
9925
9925
|
children: [
|
|
9926
9926
|
arrow,
|
|
9927
9927
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9932,18 +9932,18 @@ function BendingProcessRenderer({
|
|
|
9932
9932
|
width: boxW,
|
|
9933
9933
|
height: boxH,
|
|
9934
9934
|
rx,
|
|
9935
|
-
fill:
|
|
9936
|
-
opacity:
|
|
9935
|
+
fill: chunkDPTDFK2L_js.colour(i, palette),
|
|
9936
|
+
opacity: chunkDPTDFK2L_js.nodeOpacity(i, nodes.length, style),
|
|
9937
9937
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
9938
9938
|
strokeWidth: sw
|
|
9939
9939
|
}
|
|
9940
9940
|
),
|
|
9941
9941
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9942
|
-
|
|
9942
|
+
chunkDPTDFK2L_js.SmartArtNodeText,
|
|
9943
9943
|
{
|
|
9944
9944
|
x: nodeCx,
|
|
9945
9945
|
y: nodeCy,
|
|
9946
|
-
text:
|
|
9946
|
+
text: chunkDPTDFK2L_js.truncate(node.text, 20),
|
|
9947
9947
|
fill: "white",
|
|
9948
9948
|
fontSize,
|
|
9949
9949
|
className: "pointer-events-none"
|
|
@@ -9984,21 +9984,21 @@ function SmartArtRendererImpl({
|
|
|
9984
9984
|
}
|
|
9985
9985
|
);
|
|
9986
9986
|
}
|
|
9987
|
-
const palette =
|
|
9988
|
-
const style =
|
|
9989
|
-
const a11y =
|
|
9987
|
+
const palette = chunkDPTDFK2L_js.resolvePalette(element);
|
|
9988
|
+
const style = chunkDPTDFK2L_js.resolveStyle(element);
|
|
9989
|
+
const a11y = chunk275WERXZ_js.buildSmartArtA11y(smartArtData);
|
|
9990
9990
|
const nodeLabels = new Map(a11y.nodes.map((n) => [n.id, n.label]));
|
|
9991
9991
|
const editable = canEdit && Boolean(onUpdateElement);
|
|
9992
9992
|
const handleCommitNodeText = (nodeId, text) => {
|
|
9993
|
-
if (!onUpdateElement || !
|
|
9993
|
+
if (!onUpdateElement || !chunk275WERXZ_js.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
9994
9994
|
return;
|
|
9995
9995
|
}
|
|
9996
9996
|
const updated = chunkKV3EOLP3_js.updateSmartArtNodeText(smartArtData, nodeId, text);
|
|
9997
9997
|
const box = { width: element.width, height: element.height };
|
|
9998
|
-
const reflowed =
|
|
9998
|
+
const reflowed = chunk275WERXZ_js.rebuildDrawingShapesIfCleared(
|
|
9999
9999
|
updated,
|
|
10000
10000
|
smartArtData.layout,
|
|
10001
|
-
|
|
10001
|
+
chunkDPTDFK2L_js.resolveSmartArtDataPalette(updated),
|
|
10002
10002
|
style,
|
|
10003
10003
|
element.id,
|
|
10004
10004
|
box
|
|
@@ -10012,10 +10012,10 @@ function SmartArtRendererImpl({
|
|
|
10012
10012
|
const next = chunkKV3EOLP3_js.setSmartArtNodeStyle(smartArtData, nodeId, { fillColor: fill });
|
|
10013
10013
|
if (next !== smartArtData) {
|
|
10014
10014
|
const box = { width: element.width, height: element.height };
|
|
10015
|
-
const reflowed =
|
|
10015
|
+
const reflowed = chunk275WERXZ_js.rebuildDrawingShapesIfCleared(
|
|
10016
10016
|
next,
|
|
10017
10017
|
smartArtData.layout,
|
|
10018
|
-
|
|
10018
|
+
chunkDPTDFK2L_js.resolveSmartArtDataPalette(next),
|
|
10019
10019
|
style,
|
|
10020
10020
|
element.id,
|
|
10021
10021
|
box
|
|
@@ -10038,7 +10038,7 @@ function SmartArtRendererImpl({
|
|
|
10038
10038
|
);
|
|
10039
10039
|
} else {
|
|
10040
10040
|
const namedLayout = smartArtData.layout;
|
|
10041
|
-
const layoutType = namedLayout ?
|
|
10041
|
+
const layoutType = namedLayout ? chunkDPTDFK2L_js.layoutToCategory(namedLayout) : (smartArtData.resolvedLayoutType ?? smartArtData.layoutType ?? "list").toLowerCase();
|
|
10042
10042
|
content = renderLayout(layoutType, element, nodes, palette, style, nodeLabels);
|
|
10043
10043
|
}
|
|
10044
10044
|
const body = editable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10052,7 +10052,7 @@ function SmartArtRendererImpl({
|
|
|
10052
10052
|
children: content
|
|
10053
10053
|
}
|
|
10054
10054
|
) : content;
|
|
10055
|
-
return
|
|
10055
|
+
return chunkDPTDFK2L_js.wrapChrome(chrome, body, className, { role: a11y.role, label: a11y.label });
|
|
10056
10056
|
}
|
|
10057
10057
|
function renderLayout(layoutType, element, nodes, palette, style, nodeLabels) {
|
|
10058
10058
|
if (layoutType.includes("hierarchy") || layoutType.includes("org")) {
|
|
@@ -10116,34 +10116,34 @@ function renderLayout(layoutType, element, nodes, palette, style, nodeLabels) {
|
|
|
10116
10116
|
return /* @__PURE__ */ jsxRuntime.jsx(BendingProcessRenderer, { element, nodes, palette, style });
|
|
10117
10117
|
}
|
|
10118
10118
|
if (layoutType.includes("stepdown")) {
|
|
10119
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10119
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderStepDownProcess(element, nodes, palette, style) });
|
|
10120
10120
|
}
|
|
10121
10121
|
if (layoutType.includes("alternatingflow") || layoutType.includes("alternating")) {
|
|
10122
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10122
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderAlternatingFlow(element, nodes, palette, style) });
|
|
10123
10123
|
}
|
|
10124
10124
|
if (layoutType.includes("descending")) {
|
|
10125
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10125
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderDescendingProcess(element, nodes, palette, style) });
|
|
10126
10126
|
}
|
|
10127
10127
|
if (layoutType.includes("pictureaccent")) {
|
|
10128
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10128
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderPictureAccentList(element, nodes, palette, style) });
|
|
10129
10129
|
}
|
|
10130
10130
|
if (layoutType.includes("verticalblock")) {
|
|
10131
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10131
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderVerticalBlockList(element, nodes, palette, style) });
|
|
10132
10132
|
}
|
|
10133
10133
|
if (layoutType.includes("grouped")) {
|
|
10134
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10134
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderGroupedList(element, nodes, palette, style) });
|
|
10135
10135
|
}
|
|
10136
10136
|
if (layoutType.includes("pyramidlist")) {
|
|
10137
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10137
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderPyramidList(element, nodes, palette, style) });
|
|
10138
10138
|
}
|
|
10139
10139
|
if (layoutType.includes("horizontalpicture")) {
|
|
10140
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10140
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderHorizontalPictureList(element, nodes, palette, style) });
|
|
10141
10141
|
}
|
|
10142
10142
|
if (layoutType.includes("accentprocess")) {
|
|
10143
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderAccentProcess(element, nodes, palette, style) });
|
|
10144
10144
|
}
|
|
10145
10145
|
if (layoutType.includes("verticalchevron")) {
|
|
10146
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
10146
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkDPTDFK2L_js.renderVerticalChevronList(element, nodes, palette, style) });
|
|
10147
10147
|
}
|
|
10148
10148
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10149
10149
|
ListRenderer,
|
|
@@ -10242,9 +10242,9 @@ function SmartArt3DRenderer({
|
|
|
10242
10242
|
if (nodes.length === 0) {
|
|
10243
10243
|
return null;
|
|
10244
10244
|
}
|
|
10245
|
-
const palette =
|
|
10246
|
-
const style =
|
|
10247
|
-
const layoutResult =
|
|
10245
|
+
const palette = chunkDPTDFK2L_js.resolvePalette(element);
|
|
10246
|
+
const style = chunkDPTDFK2L_js.resolveStyle(element);
|
|
10247
|
+
const layoutResult = chunk275WERXZ_js.computeSmartArtLayout(
|
|
10248
10248
|
nodes,
|
|
10249
10249
|
{ width: element.width, height: element.height },
|
|
10250
10250
|
palette,
|
|
@@ -10253,7 +10253,7 @@ function SmartArt3DRenderer({
|
|
|
10253
10253
|
resolvedLayoutType,
|
|
10254
10254
|
layout
|
|
10255
10255
|
);
|
|
10256
|
-
return
|
|
10256
|
+
return chunk275WERXZ_js.buildSmartArt3DModel(layoutResult, {
|
|
10257
10257
|
background: chrome?.backgroundColor,
|
|
10258
10258
|
spatial: true
|
|
10259
10259
|
});
|
|
@@ -10280,7 +10280,7 @@ function SmartArt3DRenderer({
|
|
|
10280
10280
|
return sceneNode;
|
|
10281
10281
|
}
|
|
10282
10282
|
const handleCommitNodeText = (nodeId, text) => {
|
|
10283
|
-
if (!
|
|
10283
|
+
if (!chunk275WERXZ_js.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
10284
10284
|
return;
|
|
10285
10285
|
}
|
|
10286
10286
|
onUpdateElement({
|
|
@@ -10329,11 +10329,11 @@ function SmartArtElement({
|
|
|
10329
10329
|
);
|
|
10330
10330
|
}
|
|
10331
10331
|
function groupIntoParagraphs2(element, fieldContext) {
|
|
10332
|
-
return
|
|
10332
|
+
return chunk275WERXZ_js.groupIntoParagraphs(
|
|
10333
10333
|
element,
|
|
10334
10334
|
fieldContext ? (seg) => {
|
|
10335
10335
|
if (seg.fieldType) {
|
|
10336
|
-
const substituted =
|
|
10336
|
+
const substituted = chunk275WERXZ_js.substituteFieldText(seg.text, seg.fieldType, fieldContext);
|
|
10337
10337
|
if (substituted !== seg.text) {
|
|
10338
10338
|
return { ...seg, text: substituted };
|
|
10339
10339
|
}
|
|
@@ -10363,13 +10363,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
10363
10363
|
if (s.strikethrough) {
|
|
10364
10364
|
decos.push("line-through");
|
|
10365
10365
|
}
|
|
10366
|
-
const fill = s.hyperlink ?
|
|
10366
|
+
const fill = s.hyperlink ? chunk275WERXZ_js.normalizeHexColor(s.color || element.textStyle?.color, chunkDPTDFK2L_js.HYPERLINK_COLOR) : chunk275WERXZ_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
10367
10367
|
return {
|
|
10368
10368
|
fill,
|
|
10369
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
10369
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkDPTDFK2L_js.DEFAULT_TEXT_FONT_SIZE,
|
|
10370
10370
|
fontWeight: s.bold ? 700 : 400,
|
|
10371
10371
|
fontStyle: s.italic ? "italic" : void 0,
|
|
10372
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? chunkKV3EOLP3_js.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") :
|
|
10372
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? chunkKV3EOLP3_js.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunkDPTDFK2L_js.DEFAULT_FONT_FAMILY,
|
|
10373
10373
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
10374
10374
|
};
|
|
10375
10375
|
}
|
|
@@ -10385,7 +10385,7 @@ function WarpedText({
|
|
|
10385
10385
|
}
|
|
10386
10386
|
const textEl = element;
|
|
10387
10387
|
const preset = textEl.textStyle?.textWarpPreset;
|
|
10388
|
-
if (!preset || !
|
|
10388
|
+
if (!preset || !chunk275WERXZ_js.shouldUseSvgWarp(preset)) {
|
|
10389
10389
|
return null;
|
|
10390
10390
|
}
|
|
10391
10391
|
const paragraphs = groupIntoParagraphs2(textEl, fieldContext);
|
|
@@ -10398,9 +10398,9 @@ function WarpedText({
|
|
|
10398
10398
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
10399
10399
|
const align = textEl.textStyle?.align ?? "center";
|
|
10400
10400
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
10401
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
10402
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? chunkKV3EOLP3_js.getSubstituteFontFamily(textEl.textStyle.fontFamily) :
|
|
10403
|
-
const baseFill =
|
|
10401
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkDPTDFK2L_js.DEFAULT_TEXT_FONT_SIZE;
|
|
10402
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? chunkKV3EOLP3_js.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkDPTDFK2L_js.DEFAULT_FONT_FAMILY;
|
|
10403
|
+
const baseFill = chunk275WERXZ_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
10404
10404
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10405
10405
|
"svg",
|
|
10406
10406
|
{
|
|
@@ -10420,7 +10420,7 @@ function WarpedText({
|
|
|
10420
10420
|
"path",
|
|
10421
10421
|
{
|
|
10422
10422
|
id: `${pathIdPrefix}-${i}`,
|
|
10423
|
-
d:
|
|
10423
|
+
d: chunk275WERXZ_js.getWarpPath(preset, width, height, i, lineCount, warpAdj, warpAdj2),
|
|
10424
10424
|
fill: "none"
|
|
10425
10425
|
},
|
|
10426
10426
|
`${pathIdPrefix}-def-${i}`
|
|
@@ -10457,7 +10457,7 @@ function WarpedText({
|
|
|
10457
10457
|
);
|
|
10458
10458
|
}
|
|
10459
10459
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
10460
|
-
|
|
10460
|
+
chunk275WERXZ_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
10461
10461
|
);
|
|
10462
10462
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
10463
10463
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -10525,11 +10525,11 @@ function renderTextElementBody(options) {
|
|
|
10525
10525
|
} = options;
|
|
10526
10526
|
const isLinkedTextBox = chunkKV3EOLP3_js.hasTextProperties(el) && el.linkedTxbxId !== void 0;
|
|
10527
10527
|
const linkedSegments = isLinkedTextBox && slideElements ? chunkKV3EOLP3_js.getLinkedTextBoxSegments(el, slideElements) : void 0;
|
|
10528
|
-
const useSvgWarp =
|
|
10528
|
+
const useSvgWarp = chunk275WERXZ_js.shouldUseSvgWarp(
|
|
10529
10529
|
chunkKV3EOLP3_js.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
|
|
10530
10530
|
);
|
|
10531
|
-
const scene3dStyle = chunkKV3EOLP3_js.hasTextProperties(el) ?
|
|
10532
|
-
const composedTransform = [
|
|
10531
|
+
const scene3dStyle = chunkKV3EOLP3_js.hasTextProperties(el) ? chunkDPTDFK2L_js.buildTextBody3DSceneStyle(el.textStyle) : void 0;
|
|
10532
|
+
const composedTransform = [chunk275WERXZ_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
10533
10533
|
const transformStyle = {
|
|
10534
10534
|
transform: composedTransform,
|
|
10535
10535
|
transformOrigin: "center",
|
|
@@ -10545,18 +10545,18 @@ function renderTextElementBody(options) {
|
|
|
10545
10545
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10546
10546
|
"div",
|
|
10547
10547
|
{
|
|
10548
|
-
className:
|
|
10548
|
+
className: chunkDPTDFK2L_js.cn(
|
|
10549
10549
|
"relative z-10 w-full h-full",
|
|
10550
10550
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
10551
10551
|
),
|
|
10552
|
-
style: { ...
|
|
10552
|
+
style: { ...chunkDPTDFK2L_js.getTextLayoutStyle(el), ...transformStyle },
|
|
10553
10553
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10554
10554
|
WarpedText,
|
|
10555
10555
|
{
|
|
10556
10556
|
element: el,
|
|
10557
10557
|
width: el.width,
|
|
10558
10558
|
height: el.height,
|
|
10559
|
-
fallbackColor:
|
|
10559
|
+
fallbackColor: chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR,
|
|
10560
10560
|
findHighlights: findHl,
|
|
10561
10561
|
fieldContext
|
|
10562
10562
|
}
|
|
@@ -10565,19 +10565,19 @@ function renderTextElementBody(options) {
|
|
|
10565
10565
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10566
10566
|
"div",
|
|
10567
10567
|
{
|
|
10568
|
-
className:
|
|
10568
|
+
className: chunkDPTDFK2L_js.cn(
|
|
10569
10569
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
10570
10570
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
10571
10571
|
),
|
|
10572
10572
|
style: {
|
|
10573
|
-
...
|
|
10573
|
+
...chunkDPTDFK2L_js.getTextLayoutStyle(el),
|
|
10574
10574
|
...txtS,
|
|
10575
|
-
...
|
|
10575
|
+
...chunkDPTDFK2L_js.getTextWarpStyle(txtSE),
|
|
10576
10576
|
...transformStyle
|
|
10577
10577
|
},
|
|
10578
|
-
children:
|
|
10578
|
+
children: chunkDPTDFK2L_js.renderTextSegments(
|
|
10579
10579
|
el,
|
|
10580
|
-
|
|
10580
|
+
chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR,
|
|
10581
10581
|
void 0,
|
|
10582
10582
|
findHl,
|
|
10583
10583
|
onHyperlinkClick,
|
|
@@ -10598,7 +10598,7 @@ function ZoomElementRenderer({
|
|
|
10598
10598
|
sourceSlideIndex
|
|
10599
10599
|
}) {
|
|
10600
10600
|
const { t } = reactI18next.useTranslation();
|
|
10601
|
-
const summaryView =
|
|
10601
|
+
const summaryView = chunk275WERXZ_js.buildSummaryZoomView(element, (index) => {
|
|
10602
10602
|
const slide = slides?.[index];
|
|
10603
10603
|
return slide ? {
|
|
10604
10604
|
slideNumber: slide.slideNumber,
|
|
@@ -10877,7 +10877,7 @@ function renderBody(options) {
|
|
|
10877
10877
|
textDirection: txtSE?.textDirection,
|
|
10878
10878
|
textStyle: txtS,
|
|
10879
10879
|
textStyleRaw: txtSE,
|
|
10880
|
-
layoutStyle:
|
|
10880
|
+
layoutStyle: chunkDPTDFK2L_js.getTextLayoutStyle(el),
|
|
10881
10881
|
element: el,
|
|
10882
10882
|
onCommit,
|
|
10883
10883
|
onCancel,
|
|
@@ -10888,7 +10888,7 @@ function renderBody(options) {
|
|
|
10888
10888
|
] });
|
|
10889
10889
|
}
|
|
10890
10890
|
if (el.type === "table") {
|
|
10891
|
-
return
|
|
10891
|
+
return chunkDPTDFK2L_js.renderTableElement(el, txtS, {
|
|
10892
10892
|
editable: isSel,
|
|
10893
10893
|
selectedCell: isSel ? tableSt : null,
|
|
10894
10894
|
onSelectCell: onCellSel,
|
|
@@ -10919,7 +10919,7 @@ function renderBody(options) {
|
|
|
10919
10919
|
);
|
|
10920
10920
|
}
|
|
10921
10921
|
if (el.type === "media") {
|
|
10922
|
-
return
|
|
10922
|
+
return chunkDPTDFK2L_js.renderMediaElement(el, media, {
|
|
10923
10923
|
autoPlay: isPresentationPassive,
|
|
10924
10924
|
fullScreen: isPresentationPassive && Boolean(el.fullScreen),
|
|
10925
10925
|
isPresentationMode: isPresentationPassive,
|
|
@@ -10944,8 +10944,8 @@ function renderBody(options) {
|
|
|
10944
10944
|
}
|
|
10945
10945
|
return renderGroup(el.children);
|
|
10946
10946
|
}
|
|
10947
|
-
if (
|
|
10948
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
10947
|
+
if (chunkDPTDFK2L_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
10948
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk275WERXZ_js.getElementLabel(el) });
|
|
10949
10949
|
}
|
|
10950
10950
|
return renderTextElementBody(options);
|
|
10951
10951
|
}
|
|
@@ -11017,14 +11017,14 @@ function StaticElementRenderer({
|
|
|
11017
11017
|
positioned = true
|
|
11018
11018
|
}) {
|
|
11019
11019
|
const style = chunkKV3EOLP3_js.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
11020
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
11021
|
-
const fill =
|
|
11020
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk275WERXZ_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
11021
|
+
const fill = chunk275WERXZ_js.normalizeHexColor(style?.fillColor, chunkDPTDFK2L_js.DEFAULT_FILL_COLOR);
|
|
11022
11022
|
const strokeWidth = Math.max(0, style?.strokeWidth || 0);
|
|
11023
|
-
const stroke =
|
|
11024
|
-
const visualStyle =
|
|
11025
|
-
const textStyle =
|
|
11023
|
+
const stroke = chunk275WERXZ_js.normalizeHexColor(style?.strokeColor, chunkDPTDFK2L_js.DEFAULT_STROKE_COLOR);
|
|
11024
|
+
const visualStyle = chunkDPTDFK2L_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
11025
|
+
const textStyle = chunkDPTDFK2L_js.getTextStyleForElement(
|
|
11026
11026
|
element,
|
|
11027
|
-
element.type === "shape" && hasFill ? "#ffffff" :
|
|
11027
|
+
element.type === "shape" && hasFill ? "#ffffff" : chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR
|
|
11028
11028
|
);
|
|
11029
11029
|
const isImage = element.type === "picture" || element.type === "image";
|
|
11030
11030
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11037,7 +11037,7 @@ function StaticElementRenderer({
|
|
|
11037
11037
|
top: positioned ? element.y : void 0,
|
|
11038
11038
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
11039
11039
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
11040
|
-
transform: positioned ?
|
|
11040
|
+
transform: positioned ? chunk275WERXZ_js.getElementTransform(element) : void 0,
|
|
11041
11041
|
transformOrigin: "center",
|
|
11042
11042
|
zIndex,
|
|
11043
11043
|
...visualStyle
|
|
@@ -11061,12 +11061,12 @@ function StaticElementRenderer({
|
|
|
11061
11061
|
spellCheck: false,
|
|
11062
11062
|
txtSE: chunkKV3EOLP3_js.hasTextProperties(element) ? element.textStyle : void 0,
|
|
11063
11063
|
txtS: textStyle,
|
|
11064
|
-
vecShape:
|
|
11065
|
-
imgStyle:
|
|
11066
|
-
imgFilter:
|
|
11067
|
-
imgOpacity:
|
|
11064
|
+
vecShape: chunkDPTDFK2L_js.renderVectorShape(element, hasFill, fill, strokeWidth, stroke),
|
|
11065
|
+
imgStyle: chunkDPTDFK2L_js.getImageRenderStyle(element),
|
|
11066
|
+
imgFilter: chunk275WERXZ_js.getImageEffectsFilter(element),
|
|
11067
|
+
imgOpacity: chunk275WERXZ_js.getImageEffectsOpacity(element),
|
|
11068
11068
|
imgAlt: "",
|
|
11069
|
-
isTxtEl:
|
|
11069
|
+
isTxtEl: chunk275WERXZ_js.isEditableTextElement(element),
|
|
11070
11070
|
media: mediaDataUrls,
|
|
11071
11071
|
tableSt: null,
|
|
11072
11072
|
isSel: false,
|
|
@@ -11146,17 +11146,17 @@ var ElementRenderer = React32__default.default.memo(
|
|
|
11146
11146
|
const chartUpdateHandler = smartArtUpdateHandler;
|
|
11147
11147
|
const { hf, fc, sw, sc } = shapeParams(el);
|
|
11148
11148
|
const elementLocks = el.locks;
|
|
11149
|
-
const isTxt =
|
|
11149
|
+
const isTxt = chunk275WERXZ_js.isEditableTextElement(el) && !elementLocks?.noTextEdit;
|
|
11150
11150
|
const txtSE = chunkKV3EOLP3_js.hasTextProperties(el) ? el.textStyle : void 0;
|
|
11151
|
-
const ss =
|
|
11152
|
-
const ts =
|
|
11153
|
-
const vs =
|
|
11151
|
+
const ss = chunkDPTDFK2L_js.getShapeVisualStyle(el, hf, fc, sw, sc);
|
|
11152
|
+
const ts = chunkDPTDFK2L_js.getTextStyleForElement(el, chunkDPTDFK2L_js.DEFAULT_TEXT_COLOR);
|
|
11153
|
+
const vs = chunkDPTDFK2L_js.renderVectorShape(el, hf, fc, sw, sc);
|
|
11154
11154
|
const isImg = el.type === "picture" || el.type === "image";
|
|
11155
11155
|
const isModel3D = el.type === "model3d";
|
|
11156
|
-
const isConn =
|
|
11156
|
+
const isConn = chunkDPTDFK2L_js.isConnectorOrLineElement(el);
|
|
11157
11157
|
const shapeStyle3d = chunkKV3EOLP3_js.hasShapeProperties(el) ? el.shapeStyle : void 0;
|
|
11158
11158
|
const extrusionData = React32.useMemo(
|
|
11159
|
-
() =>
|
|
11159
|
+
() => chunkDPTDFK2L_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
11160
11160
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
11161
11161
|
);
|
|
11162
11162
|
const [isMediaPlaying, setIsMediaPlaying] = React32.useState(false);
|
|
@@ -11196,9 +11196,9 @@ var ElementRenderer = React32__default.default.memo(
|
|
|
11196
11196
|
const cur = effectiveIsInlineEditing ? "cursor-text" : effectiveCanInteract ? elementLocks?.noMove ? "cursor-default" : "cursor-move" : hasAction || isZoom ? "cursor-pointer" : "";
|
|
11197
11197
|
const isPresentationPassive = !effectiveCanInteract;
|
|
11198
11198
|
const isFullscreenMedia = el.type === "media" && Boolean(el.fullScreen) && isPresentationPassive && isMediaPlaying;
|
|
11199
|
-
const ariaRole = isActionable ? "button" :
|
|
11200
|
-
const ariaLabel =
|
|
11201
|
-
const ariaRoleDescription =
|
|
11199
|
+
const ariaRole = isActionable ? "button" : chunk275WERXZ_js.getAriaRole(el);
|
|
11200
|
+
const ariaLabel = chunk275WERXZ_js.getAriaLabel(el);
|
|
11201
|
+
const ariaRoleDescription = chunk275WERXZ_js.getAriaRoleDescription(el);
|
|
11202
11202
|
const isFocusable = effectiveCanInteract || isActionable;
|
|
11203
11203
|
const interactionProps = getElementInteractionProps({
|
|
11204
11204
|
element: el,
|
|
@@ -11220,7 +11220,7 @@ var ElementRenderer = React32__default.default.memo(
|
|
|
11220
11220
|
"aria-roledescription": ariaRoleDescription,
|
|
11221
11221
|
"aria-selected": isSelected ? true : void 0,
|
|
11222
11222
|
tabIndex: isFocusable ? 0 : -1,
|
|
11223
|
-
className:
|
|
11223
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11224
11224
|
"absolute border",
|
|
11225
11225
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
11226
11226
|
cur,
|
|
@@ -11253,9 +11253,9 @@ var ElementRenderer = React32__default.default.memo(
|
|
|
11253
11253
|
txtSE,
|
|
11254
11254
|
txtS: ts,
|
|
11255
11255
|
vecShape: vs,
|
|
11256
|
-
imgStyle:
|
|
11257
|
-
imgFilter:
|
|
11258
|
-
imgOpacity:
|
|
11256
|
+
imgStyle: chunkDPTDFK2L_js.getImageRenderStyle(el),
|
|
11257
|
+
imgFilter: chunk275WERXZ_js.getImageEffectsFilter(el),
|
|
11258
|
+
imgOpacity: chunk275WERXZ_js.getImageEffectsOpacity(el),
|
|
11259
11259
|
imgAlt: imageAltText,
|
|
11260
11260
|
isTxtEl: isTxt,
|
|
11261
11261
|
media: mediaDataUrls,
|
|
@@ -11321,7 +11321,7 @@ var ElementRenderer = React32__default.default.memo(
|
|
|
11321
11321
|
onResizePointerDown,
|
|
11322
11322
|
onAdjustmentPointerDown,
|
|
11323
11323
|
rotation: el.rotation,
|
|
11324
|
-
nonRotationTransform:
|
|
11324
|
+
nonRotationTransform: chunk275WERXZ_js.getElementTransformWithoutRotation(el),
|
|
11325
11325
|
onRotate: elementLocks?.noRotation ? void 0 : onRotate
|
|
11326
11326
|
}
|
|
11327
11327
|
)
|
|
@@ -11478,7 +11478,7 @@ function SlideCanvas({
|
|
|
11478
11478
|
onAddFreeformShape,
|
|
11479
11479
|
onEraseInkElement
|
|
11480
11480
|
});
|
|
11481
|
-
const rulerOffset = showRulers ?
|
|
11481
|
+
const rulerOffset = showRulers ? chunk275WERXZ_js.RULER_THICKNESS : 0;
|
|
11482
11482
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11483
11483
|
"div",
|
|
11484
11484
|
{
|
|
@@ -11568,7 +11568,7 @@ function SlideCanvas({
|
|
|
11568
11568
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
11569
11569
|
renderInk: false,
|
|
11570
11570
|
renderGroups: false,
|
|
11571
|
-
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ?
|
|
11571
|
+
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ? chunk275WERXZ_js.getShapeAdjustmentHandleDescriptor(element) : null,
|
|
11572
11572
|
onResizePointerDown: stableResizePointerDown,
|
|
11573
11573
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
11574
11574
|
onRotate: stableRotate,
|
|
@@ -11608,7 +11608,7 @@ function SlideCanvas({
|
|
|
11608
11608
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
11609
11609
|
renderInk: true,
|
|
11610
11610
|
renderGroups: true,
|
|
11611
|
-
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ?
|
|
11611
|
+
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ? chunk275WERXZ_js.getShapeAdjustmentHandleDescriptor(element) : null,
|
|
11612
11612
|
onResizePointerDown: stableResizePointerDown,
|
|
11613
11613
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
11614
11614
|
onRotate: stableRotate,
|
|
@@ -11689,7 +11689,7 @@ function LoadingState({ className }) {
|
|
|
11689
11689
|
role: "status",
|
|
11690
11690
|
"aria-live": "polite",
|
|
11691
11691
|
"aria-atomic": "true",
|
|
11692
|
-
className:
|
|
11692
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11693
11693
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
11694
11694
|
className
|
|
11695
11695
|
),
|
|
@@ -11712,7 +11712,7 @@ function ErrorState({ className, error }) {
|
|
|
11712
11712
|
{
|
|
11713
11713
|
role: "alert",
|
|
11714
11714
|
"aria-live": "assertive",
|
|
11715
|
-
className:
|
|
11715
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11716
11716
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
11717
11717
|
className
|
|
11718
11718
|
),
|
|
@@ -11743,7 +11743,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
11743
11743
|
}
|
|
11744
11744
|
)
|
|
11745
11745
|
] }),
|
|
11746
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
11746
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunkDPTDFK2L_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11747
11747
|
"div",
|
|
11748
11748
|
{
|
|
11749
11749
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -11803,14 +11803,14 @@ function AccessibilityPanel({
|
|
|
11803
11803
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
11804
11804
|
"aria-checked": reducedMotion ?? false,
|
|
11805
11805
|
onClick: onToggleReducedMotion,
|
|
11806
|
-
className:
|
|
11806
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11807
11807
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
11808
11808
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
11809
11809
|
),
|
|
11810
11810
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11811
11811
|
"span",
|
|
11812
11812
|
{
|
|
11813
|
-
className:
|
|
11813
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11814
11814
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
11815
11815
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
11816
11816
|
)
|
|
@@ -11829,7 +11829,7 @@ function AccessibilityPanel({
|
|
|
11829
11829
|
"div",
|
|
11830
11830
|
{
|
|
11831
11831
|
role: "listitem",
|
|
11832
|
-
className:
|
|
11832
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11833
11833
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
11834
11834
|
/* Severity-based background and text colouring */
|
|
11835
11835
|
issue.severity === "error" ? "bg-red-900/30 text-red-300" : issue.severity === "warning" ? "bg-amber-900/30 text-amber-300" : "bg-muted/50 text-muted-foreground"
|
|
@@ -11861,7 +11861,7 @@ function ExportProgressModal({
|
|
|
11861
11861
|
if (!isOpen) {
|
|
11862
11862
|
return null;
|
|
11863
11863
|
}
|
|
11864
|
-
const clampedProgress =
|
|
11864
|
+
const clampedProgress = chunk275WERXZ_js.clampPercent(progress);
|
|
11865
11865
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11866
11866
|
"div",
|
|
11867
11867
|
{
|
|
@@ -11953,7 +11953,7 @@ function StatusBar({
|
|
|
11953
11953
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11954
11954
|
"span",
|
|
11955
11955
|
{
|
|
11956
|
-
className:
|
|
11956
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11957
11957
|
"shrink-0 max-md:hidden",
|
|
11958
11958
|
autosaveStatus?.state === "error" ? "text-red-400" : autosaveStatus?.state === "saving" ? "text-yellow-400" : ""
|
|
11959
11959
|
),
|
|
@@ -11966,7 +11966,7 @@ function StatusBar({
|
|
|
11966
11966
|
{
|
|
11967
11967
|
type: "button",
|
|
11968
11968
|
onClick: onToggleNotes,
|
|
11969
|
-
className:
|
|
11969
|
+
className: chunkDPTDFK2L_js.cn(
|
|
11970
11970
|
vb,
|
|
11971
11971
|
"flex items-center gap-1 text-[10px]",
|
|
11972
11972
|
isNotesExpanded && "text-primary"
|
|
@@ -11986,7 +11986,7 @@ function StatusBar({
|
|
|
11986
11986
|
{
|
|
11987
11987
|
type: "button",
|
|
11988
11988
|
onClick: () => onSetMode("edit"),
|
|
11989
|
-
className:
|
|
11989
|
+
className: chunkDPTDFK2L_js.cn(vb, mode === "edit" && "text-primary"),
|
|
11990
11990
|
title: t("pptx.statusBar.normalView"),
|
|
11991
11991
|
"aria-label": t("pptx.statusBar.normalView"),
|
|
11992
11992
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMonitor, { className: "w-3.5 h-3.5" })
|
|
@@ -12008,7 +12008,7 @@ function StatusBar({
|
|
|
12008
12008
|
{
|
|
12009
12009
|
type: "button",
|
|
12010
12010
|
onClick: () => onSetMode("present"),
|
|
12011
|
-
className:
|
|
12011
|
+
className: chunkDPTDFK2L_js.cn(vb, mode === "present" && "text-primary"),
|
|
12012
12012
|
title: t("pptx.statusBar.slideShow"),
|
|
12013
12013
|
"aria-label": t("pptx.statusBar.slideShow"),
|
|
12014
12014
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPresentation, { className: "w-3.5 h-3.5" })
|
|
@@ -12098,7 +12098,7 @@ function ResizeHandle({
|
|
|
12098
12098
|
{
|
|
12099
12099
|
role: "separator",
|
|
12100
12100
|
"aria-orientation": direction,
|
|
12101
|
-
className:
|
|
12101
|
+
className: chunkDPTDFK2L_js.cn(
|
|
12102
12102
|
// Outer container: generous hit area for easy clicking.
|
|
12103
12103
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
12104
12104
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -12109,7 +12109,7 @@ function ResizeHandle({
|
|
|
12109
12109
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12110
12110
|
"div",
|
|
12111
12111
|
{
|
|
12112
|
-
className:
|
|
12112
|
+
className: chunkDPTDFK2L_js.cn(
|
|
12113
12113
|
"absolute transition-colors",
|
|
12114
12114
|
direction === "horizontal" ? "top-0 bottom-0 left-1/2 -translate-x-1/2 w-0.5 group-hover:w-1 group-hover:bg-primary/40 group-active:w-1 group-active:bg-primary/60" : "left-0 right-0 top-1/2 -translate-y-1/2 h-0.5 group-hover:h-1 group-hover:bg-primary/40 group-active:h-1 group-active:bg-primary/60"
|
|
12115
12115
|
)
|
|
@@ -12125,12 +12125,12 @@ function SlideThumbnailImpl({
|
|
|
12125
12125
|
}) {
|
|
12126
12126
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
12127
12127
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
12128
|
-
const scale =
|
|
12128
|
+
const scale = chunkDPTDFK2L_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeCanvasWidth;
|
|
12129
12129
|
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
12130
12130
|
const previewElements = [...templateElements, ...slide.elements].slice(0, 60);
|
|
12131
12131
|
const { t } = reactI18next.useTranslation();
|
|
12132
12132
|
const transitionLabel = slide.transition ? (() => {
|
|
12133
|
-
const opt =
|
|
12133
|
+
const opt = chunkDPTDFK2L_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
12134
12134
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
12135
12135
|
})() : void 0;
|
|
12136
12136
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12823,7 +12823,7 @@ function SectionHeader({
|
|
|
12823
12823
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12824
12824
|
lu.LuChevronDown,
|
|
12825
12825
|
{
|
|
12826
|
-
className:
|
|
12826
|
+
className: chunkDPTDFK2L_js.cn(
|
|
12827
12827
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
12828
12828
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
12829
12829
|
)
|
|
@@ -12925,7 +12925,7 @@ function LazyThumbnailInner({
|
|
|
12925
12925
|
className: "relative w-full overflow-hidden rounded border border-border bg-muted/30 animate-pulse",
|
|
12926
12926
|
style: {
|
|
12927
12927
|
height: previewHeight,
|
|
12928
|
-
minWidth:
|
|
12928
|
+
minWidth: chunkDPTDFK2L_js.SLIDE_NAV_THUMBNAIL_WIDTH
|
|
12929
12929
|
}
|
|
12930
12930
|
}
|
|
12931
12931
|
) });
|
|
@@ -12962,7 +12962,7 @@ function buildFlatPaneItems(sectionGroups, showSectionHeaders, collapsedSections
|
|
|
12962
12962
|
function estimateSlideItemHeight(canvasWidth, canvasHeight) {
|
|
12963
12963
|
const safeW = Math.max(canvasWidth, 1);
|
|
12964
12964
|
const safeH = Math.max(canvasHeight, 1);
|
|
12965
|
-
const scale =
|
|
12965
|
+
const scale = chunkDPTDFK2L_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeW;
|
|
12966
12966
|
const previewHeight = Math.max(56, Math.round(safeH * scale));
|
|
12967
12967
|
return previewHeight + 30;
|
|
12968
12968
|
}
|
|
@@ -12999,7 +12999,7 @@ function SlideItemInner({
|
|
|
12999
12999
|
);
|
|
13000
13000
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
13001
13001
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
13002
|
-
const scale =
|
|
13002
|
+
const scale = chunkDPTDFK2L_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeCanvasWidth;
|
|
13003
13003
|
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
13004
13004
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13005
13005
|
"button",
|
|
@@ -13008,7 +13008,7 @@ function SlideItemInner({
|
|
|
13008
13008
|
ref: slideRef,
|
|
13009
13009
|
"aria-label": `Go to slide ${slideIndex + 1}`,
|
|
13010
13010
|
"aria-current": isActive ? "true" : void 0,
|
|
13011
|
-
className:
|
|
13011
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13012
13012
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
13013
13013
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
13014
13014
|
isHidden && "opacity-50"
|
|
@@ -13024,7 +13024,7 @@ function SlideItemInner({
|
|
|
13024
13024
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13025
13025
|
"span",
|
|
13026
13026
|
{
|
|
13027
|
-
className:
|
|
13027
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13028
13028
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
13029
13029
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
13030
13030
|
),
|
|
@@ -13044,7 +13044,7 @@ function SlideItemInner({
|
|
|
13044
13044
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13045
13045
|
"div",
|
|
13046
13046
|
{
|
|
13047
|
-
className:
|
|
13047
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13048
13048
|
"relative flex-1 overflow-hidden border transition-colors bg-white",
|
|
13049
13049
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
13050
13050
|
),
|
|
@@ -13177,7 +13177,7 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection) {
|
|
|
13177
13177
|
};
|
|
13178
13178
|
}
|
|
13179
13179
|
var EMPTY_TEMPLATE_ELEMENTS = [];
|
|
13180
|
-
var VIRTUALIZATION_THRESHOLD =
|
|
13180
|
+
var VIRTUALIZATION_THRESHOLD = chunk275WERXZ_js.SLIDE_VIRTUALIZATION_THRESHOLD;
|
|
13181
13181
|
function SlidesPaneSidebar({
|
|
13182
13182
|
slides,
|
|
13183
13183
|
templateElementsBySlideId,
|
|
@@ -13249,7 +13249,7 @@ function SlidesPaneSidebar({
|
|
|
13249
13249
|
[sectionGroups, showSectionHeaders, collapsedSections]
|
|
13250
13250
|
);
|
|
13251
13251
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
13252
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
13252
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkDPTDFK2L_js.useVirtualizedSlides({
|
|
13253
13253
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
13254
13254
|
itemHeight: estimatedItemHeight
|
|
13255
13255
|
});
|
|
@@ -13479,7 +13479,7 @@ function HandoutMasterPanel({
|
|
|
13479
13479
|
{
|
|
13480
13480
|
type: "button",
|
|
13481
13481
|
"aria-pressed": slidesPerPage === count,
|
|
13482
|
-
className:
|
|
13482
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13483
13483
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
13484
13484
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
13485
13485
|
),
|
|
@@ -13607,7 +13607,7 @@ function SlideMastersList({
|
|
|
13607
13607
|
"div",
|
|
13608
13608
|
{
|
|
13609
13609
|
ref: isMasterActive ? activeRef : void 0,
|
|
13610
|
-
className:
|
|
13610
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13611
13611
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
13612
13612
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
13613
13613
|
),
|
|
@@ -13624,7 +13624,7 @@ function SlideMastersList({
|
|
|
13624
13624
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13625
13625
|
"span",
|
|
13626
13626
|
{
|
|
13627
|
-
className:
|
|
13627
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13628
13628
|
"text-[10px] font-medium",
|
|
13629
13629
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
13630
13630
|
),
|
|
@@ -13640,7 +13640,7 @@ function SlideMastersList({
|
|
|
13640
13640
|
"div",
|
|
13641
13641
|
{
|
|
13642
13642
|
ref: isLayoutActive ? activeRef : void 0,
|
|
13643
|
-
className:
|
|
13643
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13644
13644
|
"group relative cursor-pointer rounded-md border-2 p-0.5 transition-all",
|
|
13645
13645
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
13646
13646
|
),
|
|
@@ -13657,7 +13657,7 @@ function SlideMastersList({
|
|
|
13657
13657
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13658
13658
|
"span",
|
|
13659
13659
|
{
|
|
13660
|
-
className:
|
|
13660
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13661
13661
|
"text-[9px]",
|
|
13662
13662
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
13663
13663
|
),
|
|
@@ -13741,7 +13741,7 @@ function MasterViewSidebar({
|
|
|
13741
13741
|
type: "button",
|
|
13742
13742
|
role: "tab",
|
|
13743
13743
|
"aria-selected": masterViewTab === tab.key,
|
|
13744
|
-
className:
|
|
13744
|
+
className: chunkDPTDFK2L_js.cn(
|
|
13745
13745
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
13746
13746
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
13747
13747
|
),
|
|
@@ -14213,7 +14213,7 @@ function SectionBlock({
|
|
|
14213
14213
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14214
14214
|
lu.LuChevronDown,
|
|
14215
14215
|
{
|
|
14216
|
-
className:
|
|
14216
|
+
className: chunkDPTDFK2L_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
14217
14217
|
}
|
|
14218
14218
|
),
|
|
14219
14219
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -14260,7 +14260,7 @@ function SlideCardImpl({
|
|
|
14260
14260
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14261
14261
|
"div",
|
|
14262
14262
|
{
|
|
14263
|
-
className:
|
|
14263
|
+
className: chunkDPTDFK2L_js.cn(
|
|
14264
14264
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
14265
14265
|
isDragTarget ? "border-primary bg-primary/20" : isSelected ? "border-primary bg-primary/10 ring-1 ring-primary/50" : isActive ? "border-primary/50 bg-primary/5" : "border-border bg-background/50 hover:border-border",
|
|
14266
14266
|
slide.hidden && "opacity-40"
|
|
@@ -14279,7 +14279,7 @@ function SlideCardImpl({
|
|
|
14279
14279
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14280
14280
|
"span",
|
|
14281
14281
|
{
|
|
14282
|
-
className:
|
|
14282
|
+
className: chunkDPTDFK2L_js.cn(
|
|
14283
14283
|
"text-[11px] font-medium",
|
|
14284
14284
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
14285
14285
|
),
|
|
@@ -15280,7 +15280,7 @@ function segmentsToEditorHtml(segments) {
|
|
|
15280
15280
|
inlineStyles.push(`font-family:${segment.style.fontFamily}`);
|
|
15281
15281
|
}
|
|
15282
15282
|
const text = escapeHtml(segment.text);
|
|
15283
|
-
if (segment.style.hyperlink &&
|
|
15283
|
+
if (segment.style.hyperlink && chunk275WERXZ_js.isUrlSafe(segment.style.hyperlink)) {
|
|
15284
15284
|
const href = escapeHtml(segment.style.hyperlink);
|
|
15285
15285
|
return `<a href="${href}" style="color:#4a9eff;text-decoration:underline;cursor:pointer" data-hyperlink="${href}">${text}</a>`;
|
|
15286
15286
|
}
|
|
@@ -15363,7 +15363,7 @@ function renderRichNotesSegments(segments) {
|
|
|
15363
15363
|
if (segment.style.fontFamily) {
|
|
15364
15364
|
style.fontFamily = segment.style.fontFamily;
|
|
15365
15365
|
}
|
|
15366
|
-
if (segment.style.hyperlink &&
|
|
15366
|
+
if (segment.style.hyperlink && chunk275WERXZ_js.isUrlSafe(segment.style.hyperlink)) {
|
|
15367
15367
|
const safeHref = segment.style.hyperlink;
|
|
15368
15368
|
style.color = "#4a9eff";
|
|
15369
15369
|
style.textDecoration = "underline";
|
|
@@ -15376,7 +15376,7 @@ function renderRichNotesSegments(segments) {
|
|
|
15376
15376
|
style,
|
|
15377
15377
|
onClick: (e) => {
|
|
15378
15378
|
e.preventDefault();
|
|
15379
|
-
|
|
15379
|
+
chunk275WERXZ_js.safeOpenUrl(safeHref);
|
|
15380
15380
|
},
|
|
15381
15381
|
children: segment.text
|
|
15382
15382
|
},
|
|
@@ -15940,7 +15940,7 @@ function useSlideNotes({
|
|
|
15940
15940
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
15941
15941
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
15942
15942
|
e.preventDefault();
|
|
15943
|
-
|
|
15943
|
+
chunk275WERXZ_js.safeOpenUrl(href);
|
|
15944
15944
|
}
|
|
15945
15945
|
}, []);
|
|
15946
15946
|
return {
|
|
@@ -16014,7 +16014,7 @@ var SlideNotesPanel = ({
|
|
|
16014
16014
|
});
|
|
16015
16015
|
const hasNotes = draft.trim().length > 0;
|
|
16016
16016
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
16017
|
-
const { dragY, handlers: dragHandlers } =
|
|
16017
|
+
const { dragY, handlers: dragHandlers } = chunkDPTDFK2L_js.useSheetDismissDrag(onToggle);
|
|
16018
16018
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16019
16019
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16020
16020
|
"button",
|
|
@@ -16028,7 +16028,7 @@ var SlideNotesPanel = ({
|
|
|
16028
16028
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16029
16029
|
"div",
|
|
16030
16030
|
{
|
|
16031
|
-
className:
|
|
16031
|
+
className: chunkDPTDFK2L_js.cn(
|
|
16032
16032
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
16033
16033
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
16034
16034
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -16285,8 +16285,8 @@ function VersionHistoryPanel({
|
|
|
16285
16285
|
className: "px-3 py-2.5 border-b border-border hover:bg-muted/50 group",
|
|
16286
16286
|
children: [
|
|
16287
16287
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16288
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-foreground", children:
|
|
16289
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground", children:
|
|
16288
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-foreground", children: chunk275WERXZ_js.formatVersionTimestamp(version.timestamp) }),
|
|
16289
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground", children: chunk275WERXZ_js.formatRelativeTime(version.timestamp) })
|
|
16290
16290
|
] }),
|
|
16291
16291
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground mt-0.5", children: formatFileSize(version.size) }),
|
|
16292
16292
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 mt-1.5 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
@@ -16379,7 +16379,7 @@ function SlideDiffRow({
|
|
|
16379
16379
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16380
16380
|
"div",
|
|
16381
16381
|
{
|
|
16382
|
-
className:
|
|
16382
|
+
className: chunkDPTDFK2L_js.cn(
|
|
16383
16383
|
"rounded-lg border transition-colors",
|
|
16384
16384
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
16385
16385
|
),
|
|
@@ -16393,7 +16393,7 @@ function SlideDiffRow({
|
|
|
16393
16393
|
children: [
|
|
16394
16394
|
expanded ? /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronRight, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
|
|
16395
16395
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
16396
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
16396
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkDPTDFK2L_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
16397
16397
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
16398
16398
|
diff.changes.length,
|
|
16399
16399
|
" ",
|
|
@@ -16403,7 +16403,7 @@ function SlideDiffRow({
|
|
|
16403
16403
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16404
16404
|
"span",
|
|
16405
16405
|
{
|
|
16406
|
-
className:
|
|
16406
|
+
className: chunkDPTDFK2L_js.cn(
|
|
16407
16407
|
"text-[10px] font-medium",
|
|
16408
16408
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
16409
16409
|
),
|
|
@@ -16431,7 +16431,7 @@ function SlideDiffRow({
|
|
|
16431
16431
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16432
16432
|
"div",
|
|
16433
16433
|
{
|
|
16434
|
-
className:
|
|
16434
|
+
className: chunkDPTDFK2L_js.cn(
|
|
16435
16435
|
"rounded border overflow-hidden",
|
|
16436
16436
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
16437
16437
|
),
|
|
@@ -17140,7 +17140,7 @@ function DocumentPropertiesDialog({
|
|
|
17140
17140
|
const handleClose = React32.useCallback(() => {
|
|
17141
17141
|
onClose();
|
|
17142
17142
|
}, [onClose]);
|
|
17143
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
17143
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(handleClose);
|
|
17144
17144
|
if (!isOpen) {
|
|
17145
17145
|
return null;
|
|
17146
17146
|
}
|
|
@@ -17288,7 +17288,7 @@ function FontEmbeddingPanel({
|
|
|
17288
17288
|
const scanFonts = React32.useCallback(async () => {
|
|
17289
17289
|
setScanning(true);
|
|
17290
17290
|
try {
|
|
17291
|
-
setAvailableFamilies(await
|
|
17291
|
+
setAvailableFamilies(await chunk275WERXZ_js.scanAvailableFontFamilies(usedFontFamilies));
|
|
17292
17292
|
setScanned(true);
|
|
17293
17293
|
} catch {
|
|
17294
17294
|
} finally {
|
|
@@ -17671,7 +17671,7 @@ function PresentationAudienceEffects({ snapshot }) {
|
|
|
17671
17671
|
children: strokes.map((stroke) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17672
17672
|
"path",
|
|
17673
17673
|
{
|
|
17674
|
-
d:
|
|
17674
|
+
d: chunk275WERXZ_js.presentationInkPath(stroke.points),
|
|
17675
17675
|
fill: "none",
|
|
17676
17676
|
stroke: stroke.color,
|
|
17677
17677
|
strokeWidth: stroke.width / 10,
|
|
@@ -17772,7 +17772,7 @@ function PresentationSubtitleBar({
|
|
|
17772
17772
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-14 left-1/2 -translate-x-1/2 z-[70] max-w-[80%] min-w-[300px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-3 rounded-lg bg-black/75 backdrop-blur-sm border border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-[15px] text-white/70 italic", children: renderedText }) }) });
|
|
17773
17773
|
}
|
|
17774
17774
|
function renderNotesSegments(segments) {
|
|
17775
|
-
return
|
|
17775
|
+
return chunk275WERXZ_js.notesSegmentsToSpans(segments).map((span) => {
|
|
17776
17776
|
if (span.kind === "break") {
|
|
17777
17777
|
return React32__default.default.createElement("br", { key: span.key });
|
|
17778
17778
|
}
|
|
@@ -17910,7 +17910,7 @@ function ScaledSlidePreviewImpl({
|
|
|
17910
17910
|
{
|
|
17911
17911
|
className: "absolute inset-0",
|
|
17912
17912
|
style: {
|
|
17913
|
-
backgroundColor:
|
|
17913
|
+
backgroundColor: chunk275WERXZ_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
17914
17914
|
}
|
|
17915
17915
|
}
|
|
17916
17916
|
),
|
|
@@ -18000,7 +18000,7 @@ function PresenterNotesRail({
|
|
|
18000
18000
|
const notesText = slide?.notes ?? "";
|
|
18001
18001
|
const notesSegments = slide?.notesSegments;
|
|
18002
18002
|
const [notesDraft, setNotesDraft] = React32.useState(notesText);
|
|
18003
|
-
const [fontSize, setFontSize] = React32.useState(
|
|
18003
|
+
const [fontSize, setFontSize] = React32.useState(chunk275WERXZ_js.NOTES_FONT_SIZE_DEFAULT);
|
|
18004
18004
|
React32.useEffect(() => setNotesDraft(notesText), [current, notesText]);
|
|
18005
18005
|
const notes = React32.useMemo(
|
|
18006
18006
|
() => notesSegments?.length ? renderNotesSegments(notesSegments) : notesText.trim() ? notesText : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "italic text-muted-foreground", children: t("pptx.presenter.noNotes") }),
|
|
@@ -18010,11 +18010,11 @@ function PresenterNotesRail({
|
|
|
18010
18010
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between border-b border-border/60 px-4 py-3", children: [
|
|
18011
18011
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
18012
18012
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("pptx.presenter.currentTime") }),
|
|
18013
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums", children:
|
|
18013
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums", children: chunk275WERXZ_js.formatTime(new Date(now)) })
|
|
18014
18014
|
] }),
|
|
18015
18015
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-right", children: [
|
|
18016
18016
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("pptx.presenter.elapsed") }),
|
|
18017
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums text-primary", children:
|
|
18017
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums text-primary", children: chunk275WERXZ_js.formatElapsed(elapsed) })
|
|
18018
18018
|
] })
|
|
18019
18019
|
] }),
|
|
18020
18020
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex items-center justify-between border-b border-border/60 px-4 py-2", children: [
|
|
@@ -18071,8 +18071,8 @@ function PresenterNotesRail({
|
|
|
18071
18071
|
"button",
|
|
18072
18072
|
{
|
|
18073
18073
|
type: "button",
|
|
18074
|
-
onClick: () => setFontSize(
|
|
18075
|
-
disabled: fontSize <=
|
|
18074
|
+
onClick: () => setFontSize(chunk275WERXZ_js.clampNotesFontSize(fontSize - chunk275WERXZ_js.NOTES_FONT_SIZE_STEP)),
|
|
18075
|
+
disabled: fontSize <= chunk275WERXZ_js.NOTES_FONT_SIZE_MIN,
|
|
18076
18076
|
"aria-label": t("pptx.presenter.decreaseFontSize"),
|
|
18077
18077
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMinus, {})
|
|
18078
18078
|
}
|
|
@@ -18085,8 +18085,8 @@ function PresenterNotesRail({
|
|
|
18085
18085
|
"button",
|
|
18086
18086
|
{
|
|
18087
18087
|
type: "button",
|
|
18088
|
-
onClick: () => setFontSize(
|
|
18089
|
-
disabled: fontSize >=
|
|
18088
|
+
onClick: () => setFontSize(chunk275WERXZ_js.clampNotesFontSize(fontSize + chunk275WERXZ_js.NOTES_FONT_SIZE_STEP)),
|
|
18089
|
+
disabled: fontSize >= chunk275WERXZ_js.NOTES_FONT_SIZE_MAX,
|
|
18090
18090
|
"aria-label": t("pptx.presenter.increaseFontSize"),
|
|
18091
18091
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPlus, {})
|
|
18092
18092
|
}
|
|
@@ -18172,7 +18172,7 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
18172
18172
|
const nextPoint = point(event);
|
|
18173
18173
|
if (pointer.tool === "eraser") {
|
|
18174
18174
|
onUpdate({
|
|
18175
|
-
inkStrokes:
|
|
18175
|
+
inkStrokes: chunk275WERXZ_js.erasePresentationInkAt(
|
|
18176
18176
|
snapshot.inkStrokes ?? [],
|
|
18177
18177
|
snapshot.slideIndex,
|
|
18178
18178
|
nextPoint
|
|
@@ -18202,11 +18202,11 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
18202
18202
|
return;
|
|
18203
18203
|
}
|
|
18204
18204
|
if (pointer.tool === "laser") {
|
|
18205
|
-
onUpdate({ pointer:
|
|
18205
|
+
onUpdate({ pointer: chunk275WERXZ_js.movePresenterPointer(pointer, nextPoint.x, nextPoint.y) });
|
|
18206
18206
|
}
|
|
18207
18207
|
if (pointer.tool === "eraser" && event.buttons === 1) {
|
|
18208
18208
|
onUpdate({
|
|
18209
|
-
inkStrokes:
|
|
18209
|
+
inkStrokes: chunk275WERXZ_js.erasePresentationInkAt(
|
|
18210
18210
|
snapshot.inkStrokes ?? [],
|
|
18211
18211
|
snapshot.slideIndex,
|
|
18212
18212
|
nextPoint
|
|
@@ -18216,7 +18216,7 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
18216
18216
|
if (drawingId.current && event.buttons === 1) {
|
|
18217
18217
|
onUpdate({
|
|
18218
18218
|
inkStrokes: (snapshot.inkStrokes ?? []).map(
|
|
18219
|
-
(stroke) => stroke.id === drawingId.current ?
|
|
18219
|
+
(stroke) => stroke.id === drawingId.current ? chunk275WERXZ_js.appendPresentationInkPoint(stroke, nextPoint) : stroke
|
|
18220
18220
|
)
|
|
18221
18221
|
});
|
|
18222
18222
|
}
|
|
@@ -18367,7 +18367,7 @@ function PresenterView({
|
|
|
18367
18367
|
"aria-valuemin": 0,
|
|
18368
18368
|
"aria-valuemax": 100,
|
|
18369
18369
|
"aria-label": t("pptx.presenter.timerProgress"),
|
|
18370
|
-
title: `${
|
|
18370
|
+
title: `${chunk275WERXZ_js.formatElapsed(elapsed)} (segment ${timerSegment + 1})`,
|
|
18371
18371
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18372
18372
|
"div",
|
|
18373
18373
|
{
|
|
@@ -18394,7 +18394,7 @@ function MobilePresenterView({
|
|
|
18394
18394
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
18395
18395
|
return () => window.clearInterval(interval);
|
|
18396
18396
|
}, []);
|
|
18397
|
-
const elapsed =
|
|
18397
|
+
const elapsed = chunk275WERXZ_js.mobileElapsedSince(presentationStartTime, now);
|
|
18398
18398
|
const currentSlide = slides[currentSlideIndex];
|
|
18399
18399
|
const nextSlide = currentSlideIndex + 1 < slides.length ? slides[currentSlideIndex + 1] : void 0;
|
|
18400
18400
|
if (!currentSlide) {
|
|
@@ -18403,8 +18403,8 @@ function MobilePresenterView({
|
|
|
18403
18403
|
const notesText = currentSlide.notes ?? "";
|
|
18404
18404
|
const notesSegments = currentSlide.notesSegments;
|
|
18405
18405
|
const hasRichNotes = notesSegments && notesSegments.length > 0;
|
|
18406
|
-
const atFirst =
|
|
18407
|
-
const atLast =
|
|
18406
|
+
const atFirst = chunk275WERXZ_js.isFirstSlide(currentSlideIndex);
|
|
18407
|
+
const atLast = chunk275WERXZ_js.isLastSlide(currentSlideIndex, slides.length);
|
|
18408
18408
|
const insetStyle = {
|
|
18409
18409
|
paddingTop: "env(safe-area-inset-top, 0px)",
|
|
18410
18410
|
paddingBottom: "env(safe-area-inset-bottom, 0px)",
|
|
@@ -18415,9 +18415,9 @@ function MobilePresenterView({
|
|
|
18415
18415
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-2 border-b border-border/60", children: [
|
|
18416
18416
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
18417
18417
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground uppercase tracking-wider", children: t("pptx.presenter.elapsed") }),
|
|
18418
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-mono tabular-nums text-primary", children:
|
|
18418
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-mono tabular-nums text-primary", children: chunk275WERXZ_js.formatMobileElapsed(elapsed) })
|
|
18419
18419
|
] }),
|
|
18420
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-mono tabular-nums text-foreground", children:
|
|
18420
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-mono tabular-nums text-foreground", children: chunk275WERXZ_js.mobileSlideCounter(currentSlideIndex, slides.length) }),
|
|
18421
18421
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18422
18422
|
"button",
|
|
18423
18423
|
{
|
|
@@ -18759,7 +18759,7 @@ function SelectionPane({
|
|
|
18759
18759
|
setDragIndex(null);
|
|
18760
18760
|
setDragOverIndex(null);
|
|
18761
18761
|
},
|
|
18762
|
-
className:
|
|
18762
|
+
className: chunkDPTDFK2L_js.cn(
|
|
18763
18763
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
18764
18764
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
18765
18765
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -18810,13 +18810,13 @@ function SelectionPane({
|
|
|
18810
18810
|
}
|
|
18811
18811
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px]";
|
|
18812
18812
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px]";
|
|
18813
|
-
var ENTRANCE_PRESETS =
|
|
18813
|
+
var ENTRANCE_PRESETS = chunkDPTDFK2L_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
18814
18814
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
18815
18815
|
);
|
|
18816
|
-
var EXIT_PRESETS =
|
|
18816
|
+
var EXIT_PRESETS = chunkDPTDFK2L_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
18817
18817
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
18818
18818
|
);
|
|
18819
|
-
var EMPHASIS_PRESETS =
|
|
18819
|
+
var EMPHASIS_PRESETS = chunkDPTDFK2L_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
18820
18820
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
18821
18821
|
);
|
|
18822
18822
|
var TRIGGER_OPTIONS = [
|
|
@@ -18918,7 +18918,7 @@ function AnimationTimelineSection({
|
|
|
18918
18918
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
18919
18919
|
"div",
|
|
18920
18920
|
{
|
|
18921
|
-
className:
|
|
18921
|
+
className: chunkDPTDFK2L_js.cn(
|
|
18922
18922
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
18923
18923
|
animationTypeColor(bar.anim),
|
|
18924
18924
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -18952,7 +18952,7 @@ function AnimationTimelineSection({
|
|
|
18952
18952
|
onDragEnd: handleDragEnd,
|
|
18953
18953
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
18954
18954
|
onMouseLeave: handleAnimationHoverEnd,
|
|
18955
|
-
className:
|
|
18955
|
+
className: chunkDPTDFK2L_js.cn(
|
|
18956
18956
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
18957
18957
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
18958
18958
|
isDragging && "opacity-40",
|
|
@@ -19116,13 +19116,13 @@ function useAnimationPreview({
|
|
|
19116
19116
|
if (!preset || preset === "none") {
|
|
19117
19117
|
return;
|
|
19118
19118
|
}
|
|
19119
|
-
|
|
19119
|
+
chunkDPTDFK2L_js.startPreviewAnimation(anim.elementId, preset, {
|
|
19120
19120
|
direction: anim.direction,
|
|
19121
19121
|
durationMs: anim.durationMs ?? 500,
|
|
19122
19122
|
timingCurve: anim.timingCurve
|
|
19123
19123
|
});
|
|
19124
19124
|
}, []);
|
|
19125
|
-
const handleAnimationHoverEnd = React32.useCallback(() =>
|
|
19125
|
+
const handleAnimationHoverEnd = React32.useCallback(() => chunkDPTDFK2L_js.stopPreviewAnimation(), []);
|
|
19126
19126
|
const handlePreviewClick = React32.useCallback(() => {
|
|
19127
19127
|
if (!selectedElementAnimation) {
|
|
19128
19128
|
return;
|
|
@@ -19131,7 +19131,7 @@ function useAnimationPreview({
|
|
|
19131
19131
|
if (!preset || preset === "none") {
|
|
19132
19132
|
return;
|
|
19133
19133
|
}
|
|
19134
|
-
|
|
19134
|
+
chunkDPTDFK2L_js.startPreviewAnimation(selectedElementId, preset, {
|
|
19135
19135
|
direction: selectedElementAnimation.direction,
|
|
19136
19136
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
19137
19137
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -19304,14 +19304,14 @@ function useAnimationHandlers({
|
|
|
19304
19304
|
return anim.elementId.slice(0, 8);
|
|
19305
19305
|
}
|
|
19306
19306
|
const text = chunkKV3EOLP3_js.hasTextProperties(el) ? el.text : void 0;
|
|
19307
|
-
return text ||
|
|
19307
|
+
return text || chunk275WERXZ_js.getElementLabel(el);
|
|
19308
19308
|
},
|
|
19309
19309
|
[activeSlide.elements]
|
|
19310
19310
|
);
|
|
19311
19311
|
const hasAnimation = Boolean(
|
|
19312
19312
|
selectedElementAnimation?.entrance || selectedElementAnimation?.exit || selectedElementAnimation?.emphasis
|
|
19313
19313
|
);
|
|
19314
|
-
const showDirectionPicker = hasAnimation && (
|
|
19314
|
+
const showDirectionPicker = hasAnimation && (chunk275WERXZ_js.DIRECTIONAL_PRESETS.has(selectedElementAnimation?.entrance ?? "") || chunk275WERXZ_js.DIRECTIONAL_PRESETS.has(selectedElementAnimation?.exit ?? ""));
|
|
19315
19315
|
const timelineBarData = React32.useMemo(() => {
|
|
19316
19316
|
if (sortedAnimations.length === 0) {
|
|
19317
19317
|
return [];
|
|
@@ -19463,7 +19463,7 @@ function AnimationPanel({
|
|
|
19463
19463
|
{
|
|
19464
19464
|
type: "button",
|
|
19465
19465
|
disabled: !canEdit,
|
|
19466
|
-
className:
|
|
19466
|
+
className: chunkDPTDFK2L_js.cn(
|
|
19467
19467
|
"flex items-center justify-center w-7 h-7 rounded border transition-colors",
|
|
19468
19468
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
19469
19469
|
),
|
|
@@ -19513,7 +19513,7 @@ function AnimationPanel({
|
|
|
19513
19513
|
className: SELECT_CLS,
|
|
19514
19514
|
children: [
|
|
19515
19515
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
19516
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
19516
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunk275WERXZ_js.getElementLabel(el) }, el.id))
|
|
19517
19517
|
]
|
|
19518
19518
|
}
|
|
19519
19519
|
)
|
|
@@ -19705,7 +19705,7 @@ function ActionTriggerSection({
|
|
|
19705
19705
|
"select",
|
|
19706
19706
|
{
|
|
19707
19707
|
disabled: !canEdit,
|
|
19708
|
-
className:
|
|
19708
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-full"),
|
|
19709
19709
|
value: activeType,
|
|
19710
19710
|
onChange: (e) => onChangeType(e.target.value),
|
|
19711
19711
|
children: ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.label) }, o.value))
|
|
@@ -19716,7 +19716,7 @@ function ActionTriggerSection({
|
|
|
19716
19716
|
{
|
|
19717
19717
|
type: "text",
|
|
19718
19718
|
disabled: !canEdit,
|
|
19719
|
-
className:
|
|
19719
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-full"),
|
|
19720
19720
|
placeholder: "https://...",
|
|
19721
19721
|
value: action?.url ?? fallbackUrl ?? "",
|
|
19722
19722
|
onChange: (e) => onChangeUrl(e.target.value)
|
|
@@ -19727,7 +19727,7 @@ function ActionTriggerSection({
|
|
|
19727
19727
|
{
|
|
19728
19728
|
type: "number",
|
|
19729
19729
|
disabled: !canEdit,
|
|
19730
|
-
className:
|
|
19730
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-full"),
|
|
19731
19731
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
19732
19732
|
min: 1,
|
|
19733
19733
|
max: slideCount,
|
|
@@ -21382,7 +21382,7 @@ function ConnectorPanel({
|
|
|
21382
21382
|
"select",
|
|
21383
21383
|
{
|
|
21384
21384
|
disabled: !canEdit,
|
|
21385
|
-
className:
|
|
21385
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-full"),
|
|
21386
21386
|
value: selectedElement.shapeStyle?.[key] ?? "none",
|
|
21387
21387
|
onChange: (e) => onUpdateElementStyle({ [key]: e.target.value }),
|
|
21388
21388
|
children: [
|
|
@@ -21434,7 +21434,7 @@ function OlePropertiesPanel({
|
|
|
21434
21434
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21435
21435
|
"span",
|
|
21436
21436
|
{
|
|
21437
|
-
className:
|
|
21437
|
+
className: chunkDPTDFK2L_js.cn(
|
|
21438
21438
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
21439
21439
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
21440
21440
|
),
|
|
@@ -21493,7 +21493,7 @@ function LayerOrderButtons({
|
|
|
21493
21493
|
"button",
|
|
21494
21494
|
{
|
|
21495
21495
|
type: "button",
|
|
21496
|
-
className:
|
|
21496
|
+
className: chunkDPTDFK2L_js.cn("flex-1", BTN),
|
|
21497
21497
|
disabled: !canEdit,
|
|
21498
21498
|
onClick: () => onMoveLayer("forward"),
|
|
21499
21499
|
children: "\u2191 Forward"
|
|
@@ -21503,7 +21503,7 @@ function LayerOrderButtons({
|
|
|
21503
21503
|
"button",
|
|
21504
21504
|
{
|
|
21505
21505
|
type: "button",
|
|
21506
|
-
className:
|
|
21506
|
+
className: chunkDPTDFK2L_js.cn("flex-1", BTN),
|
|
21507
21507
|
disabled: !canEdit,
|
|
21508
21508
|
onClick: () => onMoveLayer("backward"),
|
|
21509
21509
|
children: "\u2193 Backward"
|
|
@@ -21520,14 +21520,14 @@ function ArtisticEffectsGallery({
|
|
|
21520
21520
|
const { t } = reactI18next.useTranslation();
|
|
21521
21521
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
21522
21522
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.image.artisticEffects") }),
|
|
21523
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
21523
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunk275WERXZ_js.ARTISTIC_EFFECTS.map(([effectName, tKey, cssFilter]) => {
|
|
21524
21524
|
const isActive = effectName === "none" ? !fx?.artisticEffect : fx?.artisticEffect === effectName;
|
|
21525
21525
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21526
21526
|
"button",
|
|
21527
21527
|
{
|
|
21528
21528
|
type: "button",
|
|
21529
21529
|
disabled: !canEdit,
|
|
21530
|
-
className:
|
|
21530
|
+
className: chunkDPTDFK2L_js.cn(
|
|
21531
21531
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
21532
21532
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
21533
21533
|
),
|
|
@@ -21590,7 +21590,7 @@ function ColorChangeSection({
|
|
|
21590
21590
|
DebouncedColorInput,
|
|
21591
21591
|
{
|
|
21592
21592
|
disabled: !canEdit,
|
|
21593
|
-
value:
|
|
21593
|
+
value: chunk275WERXZ_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
21594
21594
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
21595
21595
|
onCommit: (hex) => updateEffects({
|
|
21596
21596
|
clrChange: {
|
|
@@ -21608,7 +21608,7 @@ function ColorChangeSection({
|
|
|
21608
21608
|
DebouncedColorInput,
|
|
21609
21609
|
{
|
|
21610
21610
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
21611
|
-
value:
|
|
21611
|
+
value: chunk275WERXZ_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
21612
21612
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
21613
21613
|
onCommit: (hex) => updateEffects({
|
|
21614
21614
|
clrChange: {
|
|
@@ -21670,7 +21670,7 @@ function ColorWashSection({
|
|
|
21670
21670
|
DebouncedColorInput,
|
|
21671
21671
|
{
|
|
21672
21672
|
disabled: !canEdit,
|
|
21673
|
-
value:
|
|
21673
|
+
value: chunk275WERXZ_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
21674
21674
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
21675
21675
|
onCommit: (hex) => updateEffects({
|
|
21676
21676
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -21770,8 +21770,8 @@ function DuotonePanel({
|
|
|
21770
21770
|
}
|
|
21771
21771
|
});
|
|
21772
21772
|
}, [effects, onUpdateElement]);
|
|
21773
|
-
const shadowColor =
|
|
21774
|
-
const highlightColor =
|
|
21773
|
+
const shadowColor = chunk275WERXZ_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
21774
|
+
const highlightColor = chunk275WERXZ_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
21775
21775
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
21776
21776
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
21777
21777
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -21802,7 +21802,7 @@ function DuotonePanel({
|
|
|
21802
21802
|
] }),
|
|
21803
21803
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
21804
21804
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
21805
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
21805
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunk275WERXZ_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21806
21806
|
"button",
|
|
21807
21807
|
{
|
|
21808
21808
|
type: "button",
|
|
@@ -21976,7 +21976,7 @@ function ImagePropertiesPanel({
|
|
|
21976
21976
|
{
|
|
21977
21977
|
rows: 2,
|
|
21978
21978
|
disabled: !canEdit,
|
|
21979
|
-
className:
|
|
21979
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "resize-none text-[11px]"),
|
|
21980
21980
|
value: selectedElement.altText ?? "",
|
|
21981
21981
|
onChange: (e) => onUpdateElement({
|
|
21982
21982
|
altText: e.target.value
|
|
@@ -22935,11 +22935,11 @@ function ShapeTextPanels({
|
|
|
22935
22935
|
{
|
|
22936
22936
|
value: selectedElement.shapeType || "rect",
|
|
22937
22937
|
disabled: !canEdit,
|
|
22938
|
-
className:
|
|
22938
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-full"),
|
|
22939
22939
|
onChange: (e) => onUpdateElement({
|
|
22940
22940
|
shapeType: e.target.value
|
|
22941
22941
|
}),
|
|
22942
|
-
children:
|
|
22942
|
+
children: chunkDPTDFK2L_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
22943
22943
|
}
|
|
22944
22944
|
)
|
|
22945
22945
|
] }),
|
|
@@ -22952,7 +22952,7 @@ function ShapeTextPanels({
|
|
|
22952
22952
|
DebouncedColorInput,
|
|
22953
22953
|
{
|
|
22954
22954
|
disabled: !canEdit,
|
|
22955
|
-
value:
|
|
22955
|
+
value: chunk275WERXZ_js.normalizeHexColor(selectedElement.shapeStyle?.fillColor, "#3b82f6"),
|
|
22956
22956
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22957
22957
|
onCommit: (hex) => onUpdateElementStyle({ fillColor: hex, fillMode: "solid" })
|
|
22958
22958
|
}
|
|
@@ -22964,7 +22964,7 @@ function ShapeTextPanels({
|
|
|
22964
22964
|
DebouncedColorInput,
|
|
22965
22965
|
{
|
|
22966
22966
|
disabled: !canEdit,
|
|
22967
|
-
value:
|
|
22967
|
+
value: chunk275WERXZ_js.normalizeHexColor(selectedElement.shapeStyle?.strokeColor, "#1f2937"),
|
|
22968
22968
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22969
22969
|
onCommit: (hex) => onUpdateElementStyle({ strokeColor: hex })
|
|
22970
22970
|
}
|
|
@@ -23011,7 +23011,7 @@ function ShapeTextPanels({
|
|
|
23011
23011
|
DebouncedColorInput,
|
|
23012
23012
|
{
|
|
23013
23013
|
disabled: !canEdit,
|
|
23014
|
-
value:
|
|
23014
|
+
value: chunk275WERXZ_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
23015
23015
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
23016
23016
|
onCommit: (hex) => onUpdateTextStyle({ color: hex })
|
|
23017
23017
|
}
|
|
@@ -23069,7 +23069,7 @@ function TextFormatToggle({
|
|
|
23069
23069
|
{
|
|
23070
23070
|
type: "button",
|
|
23071
23071
|
disabled,
|
|
23072
|
-
className:
|
|
23072
|
+
className: chunkDPTDFK2L_js.cn(
|
|
23073
23073
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23074
23074
|
italic && "italic",
|
|
23075
23075
|
underline && "underline",
|
|
@@ -23361,7 +23361,7 @@ function SmartArtLayoutSwitcher({
|
|
|
23361
23361
|
type: "button",
|
|
23362
23362
|
"data-testid": `smartart-layout-${type}`,
|
|
23363
23363
|
disabled: !canEdit,
|
|
23364
|
-
className:
|
|
23364
|
+
className: chunkDPTDFK2L_js.cn(
|
|
23365
23365
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
23366
23366
|
"text-[9px] leading-tight",
|
|
23367
23367
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -23433,7 +23433,7 @@ function SmartArtNodeStyleControls({
|
|
|
23433
23433
|
disabled: !canEdit,
|
|
23434
23434
|
"aria-label": `Bold ${label}`,
|
|
23435
23435
|
"aria-pressed": bold,
|
|
23436
|
-
className:
|
|
23436
|
+
className: chunkDPTDFK2L_js.cn(
|
|
23437
23437
|
EMPHASIS_BTN,
|
|
23438
23438
|
"font-bold",
|
|
23439
23439
|
bold ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -23449,7 +23449,7 @@ function SmartArtNodeStyleControls({
|
|
|
23449
23449
|
disabled: !canEdit,
|
|
23450
23450
|
"aria-label": `Italic ${label}`,
|
|
23451
23451
|
"aria-pressed": italic,
|
|
23452
|
-
className:
|
|
23452
|
+
className: chunkDPTDFK2L_js.cn(
|
|
23453
23453
|
EMPHASIS_BTN,
|
|
23454
23454
|
"italic",
|
|
23455
23455
|
italic ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -23488,7 +23488,7 @@ function SmartArtNodeRow({
|
|
|
23488
23488
|
"div",
|
|
23489
23489
|
{
|
|
23490
23490
|
role: "listitem",
|
|
23491
|
-
className:
|
|
23491
|
+
className: chunkDPTDFK2L_js.cn(
|
|
23492
23492
|
"rounded border bg-background/60 p-1.5",
|
|
23493
23493
|
isChild ? "border-border/60 ml-4" : "border-border"
|
|
23494
23494
|
),
|
|
@@ -23503,7 +23503,7 @@ function SmartArtNodeRow({
|
|
|
23503
23503
|
"data-testid": "smartart-node-text",
|
|
23504
23504
|
disabled: !canEdit,
|
|
23505
23505
|
"aria-label": label,
|
|
23506
|
-
className:
|
|
23506
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "flex-1 text-[11px] py-0.5"),
|
|
23507
23507
|
value: text,
|
|
23508
23508
|
onChange: (e) => onChangeText(nodeId, e.target.value),
|
|
23509
23509
|
onKeyDown: (e) => onKeyDown(e, nodeId),
|
|
@@ -23552,7 +23552,7 @@ function SmartArtNodeRow({
|
|
|
23552
23552
|
{
|
|
23553
23553
|
type: "button",
|
|
23554
23554
|
disabled: !canEdit || removeDisabled,
|
|
23555
|
-
className:
|
|
23555
|
+
className: chunkDPTDFK2L_js.cn(MINI_BTN, "hover:text-red-400"),
|
|
23556
23556
|
onClick: () => onRemove(nodeId),
|
|
23557
23557
|
"aria-label": `Remove ${label}`,
|
|
23558
23558
|
title: removeDisabled ? t("pptx.smartArt.layoutMinimum") : t("pptx.smartArt.remove"),
|
|
@@ -23607,10 +23607,10 @@ function SmartArtPropertiesPanel({
|
|
|
23607
23607
|
if (focusId) {
|
|
23608
23608
|
pendingFocusId.current = focusId;
|
|
23609
23609
|
}
|
|
23610
|
-
const reflowed = box ?
|
|
23610
|
+
const reflowed = box ? chunk275WERXZ_js.rebuildDrawingShapesIfCleared(
|
|
23611
23611
|
newData,
|
|
23612
23612
|
newData.layout,
|
|
23613
|
-
|
|
23613
|
+
chunkDPTDFK2L_js.resolveSmartArtDataPalette(newData),
|
|
23614
23614
|
newData.style ?? "flat",
|
|
23615
23615
|
"inspector",
|
|
23616
23616
|
box
|
|
@@ -23719,7 +23719,7 @@ function SmartArtPropertiesPanel({
|
|
|
23719
23719
|
disabled: !canEdit,
|
|
23720
23720
|
"data-testid": "smartart-color-scheme",
|
|
23721
23721
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
23722
|
-
className:
|
|
23722
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-full"),
|
|
23723
23723
|
value: smartArtData.colorScheme ?? "colorful1",
|
|
23724
23724
|
onChange: (e) => updateSmartArt({ colorScheme: e.target.value }),
|
|
23725
23725
|
children: COLOR_SCHEMES.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: cs }, cs))
|
|
@@ -23734,7 +23734,7 @@ function SmartArtPropertiesPanel({
|
|
|
23734
23734
|
type: "button",
|
|
23735
23735
|
disabled: !canEdit,
|
|
23736
23736
|
"aria-pressed": (smartArtData.style ?? "flat") === s,
|
|
23737
|
-
className:
|
|
23737
|
+
className: chunkDPTDFK2L_js.cn(
|
|
23738
23738
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
23739
23739
|
(smartArtData.style ?? "flat") === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
23740
23740
|
),
|
|
@@ -23844,15 +23844,15 @@ function TableCellAdvancedFill({
|
|
|
23844
23844
|
};
|
|
23845
23845
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
23846
23846
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
23847
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
23847
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.fillMode") }),
|
|
23848
23848
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23849
23849
|
"select",
|
|
23850
23850
|
{
|
|
23851
23851
|
disabled: !canEdit,
|
|
23852
|
-
className:
|
|
23852
|
+
className: chunk275WERXZ_js.SEL,
|
|
23853
23853
|
value: fillMode,
|
|
23854
23854
|
onChange: (e) => handleFillModeChange(e.target.value),
|
|
23855
|
-
children:
|
|
23855
|
+
children: chunk275WERXZ_js.FILL_MODE_OPTIONS.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value ?? "", children: t(opt.i18nKey) }, opt.value))
|
|
23856
23856
|
}
|
|
23857
23857
|
)
|
|
23858
23858
|
] }),
|
|
@@ -23873,20 +23873,20 @@ function TableCellAdvancedFill({
|
|
|
23873
23873
|
}
|
|
23874
23874
|
),
|
|
23875
23875
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
23876
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
23876
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.SECTION_HEADING, children: t("pptx.table.margins") }),
|
|
23877
23877
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
23878
23878
|
["marginTop", "pptx.table.marginTop"],
|
|
23879
23879
|
["marginBottom", "pptx.table.marginBottom"],
|
|
23880
23880
|
["marginLeft", "pptx.table.marginLeft"],
|
|
23881
23881
|
["marginRight", "pptx.table.marginRight"]
|
|
23882
23882
|
].map(([key, i18nKey]) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
23883
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
23883
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t(i18nKey) }),
|
|
23884
23884
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23885
23885
|
"input",
|
|
23886
23886
|
{
|
|
23887
23887
|
type: "number",
|
|
23888
23888
|
disabled: !canEdit,
|
|
23889
|
-
className:
|
|
23889
|
+
className: chunk275WERXZ_js.NUM,
|
|
23890
23890
|
min: 0,
|
|
23891
23891
|
max: 200,
|
|
23892
23892
|
value: cellStyle[key] ?? 0,
|
|
@@ -23919,28 +23919,28 @@ function GradientControls({
|
|
|
23919
23919
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
23920
23920
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
23921
23921
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
23922
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
23922
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.gradientType") }),
|
|
23923
23923
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23924
23924
|
"select",
|
|
23925
23925
|
{
|
|
23926
23926
|
disabled: !canEdit,
|
|
23927
|
-
className:
|
|
23927
|
+
className: chunk275WERXZ_js.SEL,
|
|
23928
23928
|
value: gradType,
|
|
23929
23929
|
onChange: (e) => onUpdateCellStyle({
|
|
23930
23930
|
gradientFillType: e.target.value
|
|
23931
23931
|
}),
|
|
23932
|
-
children:
|
|
23932
|
+
children: chunk275WERXZ_js.GRADIENT_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
23933
23933
|
}
|
|
23934
23934
|
)
|
|
23935
23935
|
] }),
|
|
23936
23936
|
gradType === "linear" && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
23937
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
23937
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.gradientAngle") }),
|
|
23938
23938
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23939
23939
|
"input",
|
|
23940
23940
|
{
|
|
23941
23941
|
type: "number",
|
|
23942
23942
|
disabled: !canEdit,
|
|
23943
|
-
className:
|
|
23943
|
+
className: chunk275WERXZ_js.NUM,
|
|
23944
23944
|
min: 0,
|
|
23945
23945
|
max: 360,
|
|
23946
23946
|
value: cellStyle.gradientFillAngle ?? 90,
|
|
@@ -23951,7 +23951,7 @@ function GradientControls({
|
|
|
23951
23951
|
)
|
|
23952
23952
|
] })
|
|
23953
23953
|
] }),
|
|
23954
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
23954
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.gradientStops") }),
|
|
23955
23955
|
stops.map((stop, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
23956
23956
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23957
23957
|
"input",
|
|
@@ -23968,7 +23968,7 @@ function GradientControls({
|
|
|
23968
23968
|
{
|
|
23969
23969
|
type: "number",
|
|
23970
23970
|
disabled: !canEdit,
|
|
23971
|
-
className:
|
|
23971
|
+
className: chunk275WERXZ_js.NUM,
|
|
23972
23972
|
min: 0,
|
|
23973
23973
|
max: 100,
|
|
23974
23974
|
value: Math.round(stop.position),
|
|
@@ -23999,23 +23999,23 @@ function PatternControls({
|
|
|
23999
23999
|
const { t } = reactI18next.useTranslation();
|
|
24000
24000
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
24001
24001
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
24002
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
24002
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.patternPreset") }),
|
|
24003
24003
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24004
24004
|
"select",
|
|
24005
24005
|
{
|
|
24006
24006
|
disabled: !canEdit,
|
|
24007
|
-
className:
|
|
24007
|
+
className: chunk275WERXZ_js.SEL,
|
|
24008
24008
|
value: cellStyle.patternFillPreset ?? "ltDnDiag",
|
|
24009
24009
|
onChange: (e) => onUpdateCellStyle({
|
|
24010
24010
|
patternFillPreset: e.target.value
|
|
24011
24011
|
}),
|
|
24012
|
-
children:
|
|
24012
|
+
children: chunk275WERXZ_js.PATTERN_OPTIONS.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p, children: p }, p))
|
|
24013
24013
|
}
|
|
24014
24014
|
)
|
|
24015
24015
|
] }),
|
|
24016
24016
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
24017
24017
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
24018
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
24018
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.patternForeground") }),
|
|
24019
24019
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24020
24020
|
"input",
|
|
24021
24021
|
{
|
|
@@ -24030,7 +24030,7 @@ function PatternControls({
|
|
|
24030
24030
|
)
|
|
24031
24031
|
] }),
|
|
24032
24032
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
24033
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
24033
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.LBL, children: t("pptx.table.patternBackground") }),
|
|
24034
24034
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24035
24035
|
"input",
|
|
24036
24036
|
{
|
|
@@ -24102,7 +24102,7 @@ function TableCellFormattingPanel({
|
|
|
24102
24102
|
DebouncedColorInput,
|
|
24103
24103
|
{
|
|
24104
24104
|
disabled: !canEdit,
|
|
24105
|
-
value:
|
|
24105
|
+
value: chunk275WERXZ_js.normalizeHexColor(cs.color, "#000000"),
|
|
24106
24106
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
24107
24107
|
onCommit: (hex) => updateCellStyle({ color: hex })
|
|
24108
24108
|
}
|
|
@@ -24114,7 +24114,7 @@ function TableCellFormattingPanel({
|
|
|
24114
24114
|
DebouncedColorInput,
|
|
24115
24115
|
{
|
|
24116
24116
|
disabled: !canEdit,
|
|
24117
|
-
value:
|
|
24117
|
+
value: chunk275WERXZ_js.normalizeHexColor(cs.backgroundColor, "#ffffff"),
|
|
24118
24118
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
24119
24119
|
onCommit: (hex) => updateCellStyle({ backgroundColor: hex })
|
|
24120
24120
|
}
|
|
@@ -24138,7 +24138,7 @@ function TableCellFormattingPanel({
|
|
|
24138
24138
|
{
|
|
24139
24139
|
type: "button",
|
|
24140
24140
|
disabled: !canEdit,
|
|
24141
|
-
className:
|
|
24141
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24142
24142
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
24143
24143
|
cls,
|
|
24144
24144
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -24157,7 +24157,7 @@ function TableCellFormattingPanel({
|
|
|
24157
24157
|
{
|
|
24158
24158
|
type: "button",
|
|
24159
24159
|
disabled: !canEdit,
|
|
24160
|
-
className:
|
|
24160
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24161
24161
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
24162
24162
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
24163
24163
|
),
|
|
@@ -24175,7 +24175,7 @@ function TableCellFormattingPanel({
|
|
|
24175
24175
|
{
|
|
24176
24176
|
type: "button",
|
|
24177
24177
|
disabled: !canEdit,
|
|
24178
|
-
className:
|
|
24178
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24179
24179
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
24180
24180
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
24181
24181
|
),
|
|
@@ -24198,7 +24198,7 @@ function TableCellFormattingPanel({
|
|
|
24198
24198
|
DebouncedColorInput,
|
|
24199
24199
|
{
|
|
24200
24200
|
disabled: !canEdit,
|
|
24201
|
-
value:
|
|
24201
|
+
value: chunk275WERXZ_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
24202
24202
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
24203
24203
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
24204
24204
|
}
|
|
@@ -24208,7 +24208,7 @@ function TableCellFormattingPanel({
|
|
|
24208
24208
|
{
|
|
24209
24209
|
type: "number",
|
|
24210
24210
|
disabled: !canEdit,
|
|
24211
|
-
className:
|
|
24211
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-14"),
|
|
24212
24212
|
min: 0,
|
|
24213
24213
|
max: 10,
|
|
24214
24214
|
value: cs[widthKey] ?? 1,
|
|
@@ -24224,9 +24224,9 @@ function TableCellFormattingPanel({
|
|
|
24224
24224
|
{
|
|
24225
24225
|
type: "button",
|
|
24226
24226
|
disabled: !canEdit,
|
|
24227
|
-
className:
|
|
24227
|
+
className: chunkDPTDFK2L_js.cn(BTN, "text-center"),
|
|
24228
24228
|
onClick: () => {
|
|
24229
|
-
const newRows =
|
|
24229
|
+
const newRows = chunk275WERXZ_js.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
24230
24230
|
if (newRows) {
|
|
24231
24231
|
onUpdateTableData({ rows: newRows });
|
|
24232
24232
|
}
|
|
@@ -24239,9 +24239,9 @@ function TableCellFormattingPanel({
|
|
|
24239
24239
|
{
|
|
24240
24240
|
type: "button",
|
|
24241
24241
|
disabled: !canEdit,
|
|
24242
|
-
className:
|
|
24242
|
+
className: chunkDPTDFK2L_js.cn(BTN, "text-center"),
|
|
24243
24243
|
onClick: () => {
|
|
24244
|
-
const newRows =
|
|
24244
|
+
const newRows = chunk275WERXZ_js.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
24245
24245
|
if (newRows) {
|
|
24246
24246
|
onUpdateTableData({ rows: newRows });
|
|
24247
24247
|
}
|
|
@@ -24254,9 +24254,9 @@ function TableCellFormattingPanel({
|
|
|
24254
24254
|
{
|
|
24255
24255
|
type: "button",
|
|
24256
24256
|
disabled: !canEdit,
|
|
24257
|
-
className:
|
|
24257
|
+
className: chunkDPTDFK2L_js.cn(BTN, "text-center"),
|
|
24258
24258
|
onClick: () => {
|
|
24259
|
-
const newRows =
|
|
24259
|
+
const newRows = chunk275WERXZ_js.computeSplitCell(td, rowIndex, columnIndex);
|
|
24260
24260
|
if (newRows) {
|
|
24261
24261
|
onUpdateTableData({ rows: newRows });
|
|
24262
24262
|
}
|
|
@@ -24347,7 +24347,7 @@ function TablePropertiesPanel({
|
|
|
24347
24347
|
] }),
|
|
24348
24348
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
24349
24349
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.table.stylePresets") }),
|
|
24350
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
24350
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunk275WERXZ_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24351
24351
|
"button",
|
|
24352
24352
|
{
|
|
24353
24353
|
type: "button",
|
|
@@ -24662,7 +24662,7 @@ function InspectorCommentRow({
|
|
|
24662
24662
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24663
24663
|
"div",
|
|
24664
24664
|
{
|
|
24665
|
-
className:
|
|
24665
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24666
24666
|
"rounded border border-border bg-card p-2",
|
|
24667
24667
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
24668
24668
|
),
|
|
@@ -24675,7 +24675,7 @@ function InspectorCommentRow({
|
|
|
24675
24675
|
t("pptx.comments.resolved")
|
|
24676
24676
|
] })
|
|
24677
24677
|
] }),
|
|
24678
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
24678
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunk275WERXZ_js.formatCommentTimestamp(comment.createdAt) })
|
|
24679
24679
|
] }),
|
|
24680
24680
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24681
24681
|
"button",
|
|
@@ -24683,12 +24683,12 @@ function InspectorCommentRow({
|
|
|
24683
24683
|
type: "button",
|
|
24684
24684
|
className: "mt-1 inline-flex items-center gap-1 rounded bg-primary/20 px-1.5 py-0.5 text-[10px] text-primary hover:bg-primary/30 transition-colors",
|
|
24685
24685
|
title: t("pptx.comments.commentingOn", {
|
|
24686
|
-
element:
|
|
24686
|
+
element: chunk275WERXZ_js.getElementLabel(targetElement)
|
|
24687
24687
|
}),
|
|
24688
24688
|
onClick: () => onSelectElement(targetElement.id),
|
|
24689
24689
|
children: [
|
|
24690
24690
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24691
|
-
|
|
24691
|
+
chunk275WERXZ_js.getElementLabel(targetElement)
|
|
24692
24692
|
]
|
|
24693
24693
|
}
|
|
24694
24694
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 inline-flex items-center gap-1 rounded bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground", children: t("pptx.comments.deletedElement") })),
|
|
@@ -24750,7 +24750,7 @@ function InspectorCommentRow({
|
|
|
24750
24750
|
"button",
|
|
24751
24751
|
{
|
|
24752
24752
|
type: "button",
|
|
24753
|
-
className:
|
|
24753
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24754
24754
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
24755
24755
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
24756
24756
|
),
|
|
@@ -24917,7 +24917,7 @@ function InspectorCommentsSection({
|
|
|
24917
24917
|
selectedElement && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1 rounded bg-primary/20 px-1.5 py-0.5 text-[10px] text-primary", children: [
|
|
24918
24918
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24919
24919
|
t("pptx.comments.commentingOn", {
|
|
24920
|
-
element:
|
|
24920
|
+
element: chunk275WERXZ_js.getElementLabel(selectedElement)
|
|
24921
24921
|
})
|
|
24922
24922
|
] }),
|
|
24923
24923
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24925,7 +24925,7 @@ function InspectorCommentsSection({
|
|
|
24925
24925
|
{
|
|
24926
24926
|
rows: 2,
|
|
24927
24927
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
24928
|
-
element:
|
|
24928
|
+
element: chunk275WERXZ_js.getElementLabel(selectedElement)
|
|
24929
24929
|
}) : t("pptx.comments.addPlaceholder"),
|
|
24930
24930
|
value: commentDraft,
|
|
24931
24931
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
@@ -24944,7 +24944,7 @@ function InspectorCommentsSection({
|
|
|
24944
24944
|
type: "button",
|
|
24945
24945
|
onClick: onAddComment,
|
|
24946
24946
|
disabled: !commentDraft.trim(),
|
|
24947
|
-
className:
|
|
24947
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24948
24948
|
"w-full inline-flex items-center justify-center gap-1 rounded px-2 py-1 text-[11px] font-medium transition-colors",
|
|
24949
24949
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
24950
24950
|
),
|
|
@@ -24969,7 +24969,7 @@ function InspectorPaneHeader({
|
|
|
24969
24969
|
{
|
|
24970
24970
|
type: "button",
|
|
24971
24971
|
title: label,
|
|
24972
|
-
className:
|
|
24972
|
+
className: chunkDPTDFK2L_js.cn(
|
|
24973
24973
|
"flex items-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
24974
24974
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
24975
24975
|
),
|
|
@@ -25078,7 +25078,7 @@ function CustomPropertiesBlock({
|
|
|
25078
25078
|
"button",
|
|
25079
25079
|
{
|
|
25080
25080
|
type: "button",
|
|
25081
|
-
className:
|
|
25081
|
+
className: chunkDPTDFK2L_js.cn(BTN, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25082
25082
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
25083
25083
|
children: "\xD7"
|
|
25084
25084
|
}
|
|
@@ -25213,7 +25213,7 @@ function PresentationSettingsCard({
|
|
|
25213
25213
|
"select",
|
|
25214
25214
|
{
|
|
25215
25215
|
disabled: !canEdit,
|
|
25216
|
-
className:
|
|
25216
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-28"),
|
|
25217
25217
|
value: presentationProperties.showType ?? "presented",
|
|
25218
25218
|
onChange: (e) => onUpdate({
|
|
25219
25219
|
showType: e.target.value
|
|
@@ -25271,7 +25271,7 @@ function PresentationSettingsCard({
|
|
|
25271
25271
|
min: 1,
|
|
25272
25272
|
max: 16,
|
|
25273
25273
|
disabled: !canEdit,
|
|
25274
|
-
className:
|
|
25274
|
+
className: chunkDPTDFK2L_js.cn(INPUT, "w-20"),
|
|
25275
25275
|
value: presentationProperties.printSlidesPerPage ?? 1,
|
|
25276
25276
|
onChange: (e) => onUpdate({ printSlidesPerPage: Number(e.target.value) })
|
|
25277
25277
|
}
|
|
@@ -25568,7 +25568,7 @@ function TagsSection({
|
|
|
25568
25568
|
"button",
|
|
25569
25569
|
{
|
|
25570
25570
|
type: "button",
|
|
25571
|
-
className:
|
|
25571
|
+
className: chunkDPTDFK2L_js.cn(BTN, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25572
25572
|
title: t("pptx.tags.deleteTag"),
|
|
25573
25573
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
25574
25574
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -25668,7 +25668,7 @@ function PresentationPropertiesPanel({
|
|
|
25668
25668
|
canEdit
|
|
25669
25669
|
}
|
|
25670
25670
|
),
|
|
25671
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25671
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkDPTDFK2L_js.cn(CARD, "space-y-1"), children: [
|
|
25672
25672
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: "Slide" }),
|
|
25673
25673
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
25674
25674
|
activeSlide.elements?.length ?? 0,
|
|
@@ -25689,14 +25689,14 @@ function SlideBackgroundPanel({
|
|
|
25689
25689
|
const { t } = reactI18next.useTranslation();
|
|
25690
25690
|
const bgImageInputRef = React32.useRef(null);
|
|
25691
25691
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
25692
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25692
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkDPTDFK2L_js.cn(CARD, "space-y-2"), children: [
|
|
25693
25693
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: "Background" }),
|
|
25694
25694
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25695
25695
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: "Colour" }),
|
|
25696
25696
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25697
25697
|
DebouncedColorInput,
|
|
25698
25698
|
{
|
|
25699
|
-
value:
|
|
25699
|
+
value: chunk275WERXZ_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
25700
25700
|
disabled: !canEdit,
|
|
25701
25701
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25702
25702
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -25735,7 +25735,7 @@ function SlideBackgroundPanel({
|
|
|
25735
25735
|
"button",
|
|
25736
25736
|
{
|
|
25737
25737
|
type: "button",
|
|
25738
|
-
className:
|
|
25738
|
+
className: chunkDPTDFK2L_js.cn(BTN, "flex-1 text-center"),
|
|
25739
25739
|
disabled: !canEdit,
|
|
25740
25740
|
onClick: () => bgImageInputRef.current?.click(),
|
|
25741
25741
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -25768,7 +25768,7 @@ function SlideBackgroundPanel({
|
|
|
25768
25768
|
"button",
|
|
25769
25769
|
{
|
|
25770
25770
|
type: "button",
|
|
25771
|
-
className:
|
|
25771
|
+
className: chunkDPTDFK2L_js.cn(BTN, "w-full text-center text-red-400 hover:text-red-300"),
|
|
25772
25772
|
disabled: !canEdit,
|
|
25773
25773
|
onClick: () => onUpdateSlide({
|
|
25774
25774
|
backgroundColor: void 0,
|
|
@@ -25799,7 +25799,7 @@ function TemplateBackgroundCard({
|
|
|
25799
25799
|
onGetTemplateBackgroundColor
|
|
25800
25800
|
}) {
|
|
25801
25801
|
const { t } = reactI18next.useTranslation();
|
|
25802
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25802
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkDPTDFK2L_js.cn(CARD, "space-y-2"), children: [
|
|
25803
25803
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
25804
25804
|
activeSlide.layoutPath && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25805
25805
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25813,7 +25813,7 @@ function TemplateBackgroundCard({
|
|
|
25813
25813
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25814
25814
|
DebouncedColorInput,
|
|
25815
25815
|
{
|
|
25816
|
-
value:
|
|
25816
|
+
value: chunk275WERXZ_js.normalizeHexColor(
|
|
25817
25817
|
onGetTemplateBackgroundColor(activeSlide.layoutPath),
|
|
25818
25818
|
"#ffffff"
|
|
25819
25819
|
),
|
|
@@ -25843,7 +25843,7 @@ function TemplateBackgroundCard({
|
|
|
25843
25843
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25844
25844
|
DebouncedColorInput,
|
|
25845
25845
|
{
|
|
25846
|
-
value:
|
|
25846
|
+
value: chunk275WERXZ_js.normalizeHexColor(onGetTemplateBackgroundColor(master.path), "#ffffff"),
|
|
25847
25847
|
disabled: !canEdit,
|
|
25848
25848
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25849
25849
|
onCommit: (hex) => onSetTemplateBackground(master.path, hex)
|
|
@@ -25946,7 +25946,7 @@ function InspectorPane(props) {
|
|
|
25946
25946
|
} = props;
|
|
25947
25947
|
const hasSelection = selectedElement !== null;
|
|
25948
25948
|
const { t } = reactI18next.useTranslation();
|
|
25949
|
-
const { dragY, handlers: dragHandlers } =
|
|
25949
|
+
const { dragY, handlers: dragHandlers } = chunkDPTDFK2L_js.useSheetDismissDrag(onClose);
|
|
25950
25950
|
const {
|
|
25951
25951
|
animationPanelHeight,
|
|
25952
25952
|
effectiveThemeOptions,
|
|
@@ -25967,7 +25967,7 @@ function InspectorPane(props) {
|
|
|
25967
25967
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
25968
25968
|
"div",
|
|
25969
25969
|
{
|
|
25970
|
-
className:
|
|
25970
|
+
className: chunkDPTDFK2L_js.cn(
|
|
25971
25971
|
// Shared styles
|
|
25972
25972
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
25973
25973
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -26005,7 +26005,7 @@ function InspectorPane(props) {
|
|
|
26005
26005
|
),
|
|
26006
26006
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
26007
26007
|
activeTab === "elements" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
26008
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
26008
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkDPTDFK2L_js.cn(HEADING, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
26009
26009
|
activeSlide ? [...activeSlide.elements || []].reverse().map((el, ri) => {
|
|
26010
26010
|
const idx = (activeSlide.elements || []).length - 1 - ri;
|
|
26011
26011
|
const sel = selectedElement?.id === el.id || selectedElementIds.includes(el.id);
|
|
@@ -26014,7 +26014,7 @@ function InspectorPane(props) {
|
|
|
26014
26014
|
"div",
|
|
26015
26015
|
{
|
|
26016
26016
|
title: `${el.type} \u2014 ${el.id}`,
|
|
26017
|
-
className:
|
|
26017
|
+
className: chunkDPTDFK2L_js.cn(
|
|
26018
26018
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
26019
26019
|
sel ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
26020
26020
|
),
|
|
@@ -26422,7 +26422,7 @@ function PresentationToolbar({
|
|
|
26422
26422
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronLeft, { size: 18 })
|
|
26423
26423
|
}
|
|
26424
26424
|
),
|
|
26425
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-mono tabular-nums text-white/80 px-1.5 select-none min-w-[48px] text-center", children:
|
|
26425
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-mono tabular-nums text-white/80 px-1.5 select-none min-w-[48px] text-center", children: chunk275WERXZ_js.formatSlideCounter(currentSlideIndex, totalSlides) }),
|
|
26426
26426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26427
26427
|
"button",
|
|
26428
26428
|
{
|
|
@@ -26443,7 +26443,7 @@ function PresentationToolbar({
|
|
|
26443
26443
|
title: t("pptx.presenter.elapsed"),
|
|
26444
26444
|
children: [
|
|
26445
26445
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuTimer, { size: 14 }),
|
|
26446
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
26446
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: chunk275WERXZ_js.formatElapsed(elapsed) })
|
|
26447
26447
|
]
|
|
26448
26448
|
}
|
|
26449
26449
|
),
|
|
@@ -26618,7 +26618,7 @@ function PresentationTouchControls({
|
|
|
26618
26618
|
hideNavigation = false
|
|
26619
26619
|
}) {
|
|
26620
26620
|
const { t } = reactI18next.useTranslation();
|
|
26621
|
-
const { isTouchDevice } =
|
|
26621
|
+
const { isTouchDevice } = chunkDPTDFK2L_js.useIsMobile();
|
|
26622
26622
|
if (!isTouchDevice) {
|
|
26623
26623
|
return null;
|
|
26624
26624
|
}
|
|
@@ -26704,7 +26704,7 @@ function SlideLayer({ slide, templateElements, canvasSize }) {
|
|
|
26704
26704
|
style: {
|
|
26705
26705
|
width: safeWidth,
|
|
26706
26706
|
height: safeHeight,
|
|
26707
|
-
backgroundColor: slide.backgroundColor ?
|
|
26707
|
+
backgroundColor: slide.backgroundColor ? chunk275WERXZ_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
26708
26708
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
26709
26709
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
26710
26710
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|
|
@@ -26747,7 +26747,7 @@ function PresentationTransitionOverlay({
|
|
|
26747
26747
|
};
|
|
26748
26748
|
}, [durationMs, onComplete]);
|
|
26749
26749
|
const animations = React32.useMemo(
|
|
26750
|
-
() =>
|
|
26750
|
+
() => chunk275WERXZ_js.getSlideTransitionAnimations(
|
|
26751
26751
|
transition.type,
|
|
26752
26752
|
durationMs,
|
|
26753
26753
|
transition.direction,
|
|
@@ -26773,7 +26773,7 @@ function PresentationTransitionOverlay({
|
|
|
26773
26773
|
className: "pptx-react-transition-overlay absolute inset-0 pointer-events-none overflow-hidden",
|
|
26774
26774
|
style: { zIndex: outgoingZIndex },
|
|
26775
26775
|
children: [
|
|
26776
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
26776
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk275WERXZ_js.SLIDE_TRANSITION_KEYFRAMES }),
|
|
26777
26777
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26778
26778
|
"div",
|
|
26779
26779
|
{
|
|
@@ -26873,8 +26873,8 @@ function NotesPagePreview({
|
|
|
26873
26873
|
maxPages = 3
|
|
26874
26874
|
}) {
|
|
26875
26875
|
const { t } = reactI18next.useTranslation();
|
|
26876
|
-
const pages = React32.useMemo(() =>
|
|
26877
|
-
const printable = React32.useMemo(() =>
|
|
26876
|
+
const pages = React32.useMemo(() => chunk275WERXZ_js.computeAllNotesPages(slideIndices), [slideIndices]);
|
|
26877
|
+
const printable = React32.useMemo(() => chunk275WERXZ_js.getNotesPrintableArea(), []);
|
|
26878
26878
|
const visiblePages = pages.slice(0, maxPages);
|
|
26879
26879
|
const scaledW = printable.width * PREVIEW_SCALE;
|
|
26880
26880
|
const scaledH = printable.height * PREVIEW_SCALE;
|
|
@@ -26962,13 +26962,13 @@ function PrintPreview({
|
|
|
26962
26962
|
}) {
|
|
26963
26963
|
const { t } = reactI18next.useTranslation();
|
|
26964
26964
|
const pages = React32.useMemo(
|
|
26965
|
-
() =>
|
|
26965
|
+
() => chunk275WERXZ_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
26966
26966
|
[slideIndices, slidesPerPage, orientation]
|
|
26967
26967
|
);
|
|
26968
|
-
const printable = React32.useMemo(() =>
|
|
26968
|
+
const printable = React32.useMemo(() => chunk275WERXZ_js.getPrintableArea(orientation), [orientation]);
|
|
26969
26969
|
const visiblePages = pages.slice(0, maxPages);
|
|
26970
26970
|
const isThreePerPage = slidesPerPage === 3;
|
|
26971
|
-
const noteLineCount =
|
|
26971
|
+
const noteLineCount = chunk275WERXZ_js.generateNoteLineCount();
|
|
26972
26972
|
const scaledW = printable.width * PREVIEW_SCALE2;
|
|
26973
26973
|
const scaledH = printable.height * PREVIEW_SCALE2;
|
|
26974
26974
|
const noteAreaFraction = 0.5;
|
|
@@ -27133,7 +27133,7 @@ function PrintSettingsPanel({
|
|
|
27133
27133
|
] }),
|
|
27134
27134
|
printWhat === "handouts" && /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { children: [
|
|
27135
27135
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide", children: t("pptx.print.slidesPerPage") }),
|
|
27136
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 flex-wrap", children:
|
|
27136
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 flex-wrap", children: chunk275WERXZ_js.HANDOUT_OPTIONS.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
27137
27137
|
"button",
|
|
27138
27138
|
{
|
|
27139
27139
|
type: "button",
|
|
@@ -27319,13 +27319,13 @@ function PrintDialog({
|
|
|
27319
27319
|
defaultFrameSlides
|
|
27320
27320
|
}) {
|
|
27321
27321
|
const { t } = reactI18next.useTranslation();
|
|
27322
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27322
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onClose);
|
|
27323
27323
|
const [printWhat, setPrintWhat] = React32.useState("slides");
|
|
27324
27324
|
const [orientation, setOrientation] = React32.useState("landscape");
|
|
27325
27325
|
const [colorMode, setColorMode] = React32.useState("color");
|
|
27326
27326
|
const [frameSlides, setFrameSlides] = React32.useState(defaultFrameSlides ?? false);
|
|
27327
27327
|
const [slidesPerPage, setSlidesPerPage] = React32.useState(
|
|
27328
|
-
|
|
27328
|
+
chunk275WERXZ_js.HANDOUT_OPTIONS.includes(defaultSlidesPerPage) ? defaultSlidesPerPage : 6
|
|
27329
27329
|
);
|
|
27330
27330
|
const [slideRange, setSlideRange] = React32.useState("all");
|
|
27331
27331
|
const [customFrom, setCustomFrom] = React32.useState(1);
|
|
@@ -27848,19 +27848,19 @@ function BroadcastDialog({
|
|
|
27848
27848
|
const [serverUrl, setServerUrl] = React32.useState("");
|
|
27849
27849
|
const [copied, setCopied] = React32.useState(false);
|
|
27850
27850
|
const dialogRef = React32.useRef(null);
|
|
27851
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27851
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onClose);
|
|
27852
27852
|
useModalFocus(open, dialogRef, onClose);
|
|
27853
27853
|
React32.useEffect(() => {
|
|
27854
27854
|
if (open && !isBroadcasting) {
|
|
27855
|
-
const broadcastRoom = defaultRoomId ? `broadcast-${defaultRoomId}` :
|
|
27855
|
+
const broadcastRoom = defaultRoomId ? `broadcast-${defaultRoomId}` : chunk275WERXZ_js.generateBroadcastRoomId();
|
|
27856
27856
|
setRoomId(broadcastRoom);
|
|
27857
27857
|
setUserName(defaultUserName ?? "");
|
|
27858
|
-
setServerUrl(defaultServerUrl ??
|
|
27858
|
+
setServerUrl(defaultServerUrl ?? chunk275WERXZ_js.DEFAULT_BROADCAST_SERVER_URL);
|
|
27859
27859
|
}
|
|
27860
27860
|
}, [open, isBroadcasting, defaultRoomId, defaultUserName, defaultServerUrl]);
|
|
27861
27861
|
const activeRoomId = isBroadcasting ? collab.config.roomId : roomId;
|
|
27862
27862
|
const activeServerUrl = isBroadcasting ? collab.config.serverUrl : serverUrl;
|
|
27863
|
-
const broadcastUrl = typeof window !== "undefined" ?
|
|
27863
|
+
const broadcastUrl = typeof window !== "undefined" ? chunk275WERXZ_js.buildBroadcastViewerUrl(activeRoomId, activeServerUrl, window.location) : activeRoomId;
|
|
27864
27864
|
const handleCopyUrl = React32.useCallback(() => {
|
|
27865
27865
|
void navigator.clipboard.writeText(broadcastUrl).then(() => {
|
|
27866
27866
|
setCopied(true);
|
|
@@ -27879,7 +27879,7 @@ function BroadcastDialog({
|
|
|
27879
27879
|
userName: userName.trim(),
|
|
27880
27880
|
role: "owner",
|
|
27881
27881
|
// A blank server broadcasts over the serverless peer-to-peer transport.
|
|
27882
|
-
transport:
|
|
27882
|
+
transport: chunk275WERXZ_js.resolveTransportForServerUrl(trimmedServer)
|
|
27883
27883
|
});
|
|
27884
27884
|
setTimeout(() => {
|
|
27885
27885
|
onStartPresenting?.();
|
|
@@ -28149,7 +28149,7 @@ function isP2P(config) {
|
|
|
28149
28149
|
return config.transport === "webrtc" || !config.serverUrl?.trim();
|
|
28150
28150
|
}
|
|
28151
28151
|
function shareUrl(config) {
|
|
28152
|
-
return
|
|
28152
|
+
return chunk275WERXZ_js.buildCollaborationShareUrl(
|
|
28153
28153
|
config,
|
|
28154
28154
|
typeof window === "undefined" ? void 0 : { origin: window.location.origin, pathname: window.location.pathname }
|
|
28155
28155
|
);
|
|
@@ -28385,7 +28385,7 @@ function StartSessionForm({
|
|
|
28385
28385
|
] });
|
|
28386
28386
|
}
|
|
28387
28387
|
function shareUrl2(config) {
|
|
28388
|
-
return
|
|
28388
|
+
return chunk275WERXZ_js.buildCollaborationShareUrl(
|
|
28389
28389
|
config,
|
|
28390
28390
|
typeof window === "undefined" ? void 0 : { origin: window.location.origin, pathname: window.location.pathname }
|
|
28391
28391
|
);
|
|
@@ -28411,7 +28411,7 @@ function ShareDialog({
|
|
|
28411
28411
|
const [invitation, setInvitation] = React32.useState("");
|
|
28412
28412
|
const [copied, setCopied] = React32.useState(false);
|
|
28413
28413
|
const dialogRef = React32.useRef(null);
|
|
28414
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28414
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onClose);
|
|
28415
28415
|
useModalFocus(open, dialogRef, onClose);
|
|
28416
28416
|
React32.useEffect(() => {
|
|
28417
28417
|
if (activeCollaboration) {
|
|
@@ -28429,12 +28429,12 @@ function ShareDialog({
|
|
|
28429
28429
|
});
|
|
28430
28430
|
}, [activeCollaboration, roomId, serverUrl]);
|
|
28431
28431
|
const handleStartSharing = React32.useCallback(() => {
|
|
28432
|
-
const config = mode === "join" ?
|
|
28432
|
+
const config = mode === "join" ? chunk275WERXZ_js.buildJoinCollaborationConfig({ invitation, userName, serverUrl }) : chunk275WERXZ_js.buildCreateCollaborationConfig({ roomId, userName, serverUrl });
|
|
28433
28433
|
if (config) {
|
|
28434
28434
|
onStartCollaboration?.(config);
|
|
28435
28435
|
}
|
|
28436
28436
|
}, [invitation, mode, roomId, userName, serverUrl, onStartCollaboration]);
|
|
28437
|
-
const canStart = (mode === "join" ?
|
|
28437
|
+
const canStart = (mode === "join" ? chunk275WERXZ_js.buildJoinCollaborationConfig({ invitation, userName, serverUrl }) : chunk275WERXZ_js.buildCreateCollaborationConfig({ roomId, userName, serverUrl })) !== null;
|
|
28438
28438
|
if (!open) {
|
|
28439
28439
|
return null;
|
|
28440
28440
|
}
|
|
@@ -28686,12 +28686,12 @@ function HyperlinkEditDialog({
|
|
|
28686
28686
|
onCancel
|
|
28687
28687
|
}) {
|
|
28688
28688
|
const { t } = reactI18next.useTranslation();
|
|
28689
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28689
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onCancel);
|
|
28690
28690
|
const inputRef = React32.useRef(null);
|
|
28691
|
-
const detectedType =
|
|
28692
|
-
const emailParts =
|
|
28693
|
-
const detectedSlide =
|
|
28694
|
-
const detectedVerb = initialAction ?
|
|
28691
|
+
const detectedType = chunkDPTDFK2L_js.detectTargetType(initialUrl, initialAction);
|
|
28692
|
+
const emailParts = chunkDPTDFK2L_js.parseEmailUrl(initialUrl || "");
|
|
28693
|
+
const detectedSlide = chunkDPTDFK2L_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
28694
|
+
const detectedVerb = initialAction ? chunkDPTDFK2L_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28695
28695
|
const [targetType, setTargetType] = React32.useState(detectedType);
|
|
28696
28696
|
const [url, setUrl] = React32.useState(
|
|
28697
28697
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28722,7 +28722,7 @@ function HyperlinkEditDialog({
|
|
|
28722
28722
|
actionVerb
|
|
28723
28723
|
});
|
|
28724
28724
|
};
|
|
28725
|
-
const tabCls = (active) =>
|
|
28725
|
+
const tabCls = (active) => chunkDPTDFK2L_js.cn(
|
|
28726
28726
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
28727
28727
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
28728
28728
|
);
|
|
@@ -28937,7 +28937,7 @@ function ViewerBottomPanels({
|
|
|
28937
28937
|
hideStatusBar = false,
|
|
28938
28938
|
hiddenActions
|
|
28939
28939
|
}) {
|
|
28940
|
-
const { isHidden } =
|
|
28940
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(hiddenActions);
|
|
28941
28941
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
28942
28942
|
onResizeBottom && !isSlideNotesCollapsed && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { direction: "vertical", onResize: onResizeBottom }),
|
|
28943
28943
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -29117,11 +29117,11 @@ function ViewerInspector({
|
|
|
29117
29117
|
function TitleBar(p) {
|
|
29118
29118
|
const { t } = reactI18next.useTranslation();
|
|
29119
29119
|
const editing = (p.mode === "edit" || p.mode === "master") && p.canEdit;
|
|
29120
|
-
const { isHidden } =
|
|
29120
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(p.hiddenActions);
|
|
29121
29121
|
const [searchQuery, setSearchQuery] = React32.useState("");
|
|
29122
29122
|
const [searchFocused, setSearchFocused] = React32.useState(false);
|
|
29123
29123
|
const searchRef = React32.useRef(null);
|
|
29124
|
-
const commandResults =
|
|
29124
|
+
const commandResults = chunk275WERXZ_js.filterCommands(searchQuery, t);
|
|
29125
29125
|
const handleCommandSelect = React32.useCallback(
|
|
29126
29126
|
(entry) => {
|
|
29127
29127
|
p.onCommandSearch?.(entry.command);
|
|
@@ -29155,17 +29155,17 @@ function TitleBar(p) {
|
|
|
29155
29155
|
document.addEventListener("mousedown", handler);
|
|
29156
29156
|
return () => document.removeEventListener("mousedown", handler);
|
|
29157
29157
|
}, []);
|
|
29158
|
-
const statusKey =
|
|
29158
|
+
const statusKey = chunk275WERXZ_js.resolveTitleBarStatusKey({
|
|
29159
29159
|
autosaveState: p.autosaveStatus?.state ?? "idle",
|
|
29160
29160
|
isDirty: p.isDirty,
|
|
29161
29161
|
autosaveEnabled: p.autosaveEnabled,
|
|
29162
29162
|
disabledReason: p.autosaveStatus?.state === "disabled" ? p.autosaveStatus.reason : void 0
|
|
29163
29163
|
});
|
|
29164
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
29165
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29164
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.container, "data-pptx-title-bar": "", children: [
|
|
29165
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.logo, "aria-hidden": "true", children: "P" }),
|
|
29166
29166
|
editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
29167
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
29168
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29167
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.autosaveGroup, children: [
|
|
29168
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.autosaveLabel, children: t("pptx.titleBar.autoSave") }),
|
|
29169
29169
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29170
29170
|
"button",
|
|
29171
29171
|
{
|
|
@@ -29173,32 +29173,32 @@ function TitleBar(p) {
|
|
|
29173
29173
|
role: "switch",
|
|
29174
29174
|
"aria-checked": p.autosaveEnabled,
|
|
29175
29175
|
onClick: p.onToggleAutosave,
|
|
29176
|
-
className:
|
|
29177
|
-
|
|
29178
|
-
p.autosaveEnabled ?
|
|
29176
|
+
className: chunkDPTDFK2L_js.cn(
|
|
29177
|
+
chunk275WERXZ_js.TITLE_BAR_CLASSES.toggleTrack,
|
|
29178
|
+
p.autosaveEnabled ? chunk275WERXZ_js.TITLE_BAR_CLASSES.toggleTrackOn : chunk275WERXZ_js.TITLE_BAR_CLASSES.toggleTrackOff
|
|
29179
29179
|
),
|
|
29180
29180
|
title: t("pptx.titleBar.toggleAutoSave"),
|
|
29181
29181
|
"aria-label": t("pptx.titleBar.toggleAutoSave"),
|
|
29182
29182
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29183
29183
|
"span",
|
|
29184
29184
|
{
|
|
29185
|
-
className:
|
|
29186
|
-
|
|
29187
|
-
p.autosaveEnabled ?
|
|
29185
|
+
className: chunkDPTDFK2L_js.cn(
|
|
29186
|
+
chunk275WERXZ_js.TITLE_BAR_CLASSES.toggleKnob,
|
|
29187
|
+
p.autosaveEnabled ? chunk275WERXZ_js.TITLE_BAR_CLASSES.toggleKnobOn : chunk275WERXZ_js.TITLE_BAR_CLASSES.toggleKnobOff
|
|
29188
29188
|
)
|
|
29189
29189
|
}
|
|
29190
29190
|
)
|
|
29191
29191
|
}
|
|
29192
29192
|
),
|
|
29193
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29193
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.autosaveLabel, children: t(p.autosaveEnabled ? "pptx.titleBar.autoSaveOn" : "pptx.titleBar.autoSaveOff") })
|
|
29194
29194
|
] }),
|
|
29195
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29195
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.separator }),
|
|
29196
29196
|
p.onSave && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29197
29197
|
"button",
|
|
29198
29198
|
{
|
|
29199
29199
|
type: "button",
|
|
29200
29200
|
onClick: p.onSave,
|
|
29201
|
-
className:
|
|
29201
|
+
className: chunk275WERXZ_js.TITLE_BAR_CLASSES.quickButton,
|
|
29202
29202
|
title: t("pptx.titleBar.save"),
|
|
29203
29203
|
"aria-label": t("pptx.titleBar.save"),
|
|
29204
29204
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSave, { className: "w-3.5 h-3.5" })
|
|
@@ -29210,7 +29210,7 @@ function TitleBar(p) {
|
|
|
29210
29210
|
type: "button",
|
|
29211
29211
|
onClick: p.onUndo,
|
|
29212
29212
|
disabled: !p.canUndo,
|
|
29213
|
-
className:
|
|
29213
|
+
className: chunk275WERXZ_js.TITLE_BAR_CLASSES.quickButton,
|
|
29214
29214
|
title: p.undoLabel ? t("pptx.toolbar.undoAction", { action: p.undoLabel }) : t("pptx.toolbar.undo"),
|
|
29215
29215
|
"aria-label": t("pptx.toolbar.undo"),
|
|
29216
29216
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuUndo, { className: "w-3.5 h-3.5" })
|
|
@@ -29222,41 +29222,41 @@ function TitleBar(p) {
|
|
|
29222
29222
|
type: "button",
|
|
29223
29223
|
onClick: p.onRedo,
|
|
29224
29224
|
disabled: !p.canRedo,
|
|
29225
|
-
className:
|
|
29225
|
+
className: chunk275WERXZ_js.TITLE_BAR_CLASSES.quickButton,
|
|
29226
29226
|
title: p.redoLabel ? t("pptx.toolbar.redoAction", { action: p.redoLabel }) : t("pptx.toolbar.redo"),
|
|
29227
29227
|
"aria-label": t("pptx.toolbar.redo"),
|
|
29228
29228
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuRedo, { className: "w-3.5 h-3.5" })
|
|
29229
29229
|
}
|
|
29230
29230
|
),
|
|
29231
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29231
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.separator })
|
|
29232
29232
|
] }),
|
|
29233
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
29234
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29233
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.fileGroup, children: [
|
|
29234
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.fileName, children: p.fileName || t(chunk275WERXZ_js.TITLE_BAR_DEFAULT_FILE_KEY) }),
|
|
29235
29235
|
editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
29236
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29236
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.statusDot, "aria-hidden": "true", children: "\u2022" }),
|
|
29237
29237
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29238
29238
|
"span",
|
|
29239
29239
|
{
|
|
29240
|
-
className:
|
|
29241
|
-
|
|
29242
|
-
p.autosaveStatus?.state === "error" && p.autosaveEnabled &&
|
|
29243
|
-
p.autosaveStatus?.state === "saving" && p.autosaveEnabled &&
|
|
29240
|
+
className: chunkDPTDFK2L_js.cn(
|
|
29241
|
+
chunk275WERXZ_js.TITLE_BAR_CLASSES.statusText,
|
|
29242
|
+
p.autosaveStatus?.state === "error" && p.autosaveEnabled && chunk275WERXZ_js.TITLE_BAR_CLASSES.statusError,
|
|
29243
|
+
p.autosaveStatus?.state === "saving" && p.autosaveEnabled && chunk275WERXZ_js.TITLE_BAR_CLASSES.statusSaving
|
|
29244
29244
|
),
|
|
29245
29245
|
children: t(statusKey)
|
|
29246
29246
|
}
|
|
29247
29247
|
)
|
|
29248
29248
|
] })
|
|
29249
29249
|
] }),
|
|
29250
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29250
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.searchWrap, children: (p.mode === "edit" || p.mode === "master") && /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: searchRef, className: "relative w-full max-w-md", children: [
|
|
29251
29251
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
29252
29252
|
"div",
|
|
29253
29253
|
{
|
|
29254
|
-
className:
|
|
29255
|
-
|
|
29254
|
+
className: chunkDPTDFK2L_js.cn(
|
|
29255
|
+
chunk275WERXZ_js.TITLE_BAR_CLASSES.searchBox,
|
|
29256
29256
|
(searchFocused || p.findReplaceOpen) && "text-foreground bg-background"
|
|
29257
29257
|
),
|
|
29258
29258
|
children: [
|
|
29259
|
-
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSearch, { className:
|
|
29259
|
+
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSearch, { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.searchIcon }),
|
|
29260
29260
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29261
29261
|
"input",
|
|
29262
29262
|
{
|
|
@@ -29313,7 +29313,7 @@ function TitleBar(p) {
|
|
|
29313
29313
|
) })
|
|
29314
29314
|
] })
|
|
29315
29315
|
] }) }),
|
|
29316
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29316
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk275WERXZ_js.TITLE_BAR_CLASSES.rightSpacer })
|
|
29317
29317
|
] });
|
|
29318
29318
|
}
|
|
29319
29319
|
function ViewerToolbarSection(props) {
|
|
@@ -29394,7 +29394,7 @@ function ViewerToolbarSection(props) {
|
|
|
29394
29394
|
[activeSlide, propertyHandlers]
|
|
29395
29395
|
);
|
|
29396
29396
|
const scopedLayoutOptions = React32__default.default.useMemo(
|
|
29397
|
-
() =>
|
|
29397
|
+
() => chunkDPTDFK2L_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
29398
29398
|
[s.layoutOptions, activeSlide]
|
|
29399
29399
|
);
|
|
29400
29400
|
const handleApplyTransitionToAll = React32.useCallback(() => {
|
|
@@ -29457,7 +29457,7 @@ function ViewerToolbarSection(props) {
|
|
|
29457
29457
|
insertHandlers.handleAddTable();
|
|
29458
29458
|
break;
|
|
29459
29459
|
case "chart":
|
|
29460
|
-
insertHandlers.handleAddChart(
|
|
29460
|
+
insertHandlers.handleAddChart(chunk275WERXZ_js.DEFAULT_INSERT_CHART_TYPE);
|
|
29461
29461
|
break;
|
|
29462
29462
|
case "smartArt":
|
|
29463
29463
|
dialogs.setIsSmartArtDialogOpen(true);
|
|
@@ -29650,7 +29650,7 @@ function ViewerToolbarSection(props) {
|
|
|
29650
29650
|
onOpenFile,
|
|
29651
29651
|
onOpenRecentFile,
|
|
29652
29652
|
onCreatePresentation: (templateId) => {
|
|
29653
|
-
s.setSlides(
|
|
29653
|
+
s.setSlides(chunk275WERXZ_js.createBackstagePresentation(templateId));
|
|
29654
29654
|
s.setActiveSlideIndex(0);
|
|
29655
29655
|
s.setSelectedElementId(null);
|
|
29656
29656
|
s.setSelectedElementIds([]);
|
|
@@ -29705,7 +29705,7 @@ function ViewerToolbarSection(props) {
|
|
|
29705
29705
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
29706
29706
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29707
29707
|
formatPainterActive: s.formatPainterActive,
|
|
29708
|
-
canActivateFormatPainter:
|
|
29708
|
+
canActivateFormatPainter: chunk275WERXZ_js.hasCopyableFormat(selectedElement),
|
|
29709
29709
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29710
29710
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29711
29711
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29752,12 +29752,12 @@ function ViewerToolbarSection(props) {
|
|
|
29752
29752
|
)
|
|
29753
29753
|
] });
|
|
29754
29754
|
}
|
|
29755
|
-
var TEMPLATES =
|
|
29755
|
+
var TEMPLATES = chunk275WERXZ_js.EQUATION_TEMPLATES;
|
|
29756
29756
|
var TEMPLATE_MATHML = TEMPLATES.map((tmpl) => {
|
|
29757
29757
|
try {
|
|
29758
|
-
const tmplOmml =
|
|
29759
|
-
const raw =
|
|
29760
|
-
return raw ?
|
|
29758
|
+
const tmplOmml = chunk275WERXZ_js.convertLatexToOmml(tmpl.latex);
|
|
29759
|
+
const raw = chunk275WERXZ_js.convertOmmlToMathMl(tmplOmml);
|
|
29760
|
+
return raw ? chunk275WERXZ_js.sanitizeMathMl(raw) : "";
|
|
29761
29761
|
} catch {
|
|
29762
29762
|
return "";
|
|
29763
29763
|
}
|
|
@@ -29769,7 +29769,7 @@ function MathMlPreview({ mathml }) {
|
|
|
29769
29769
|
return;
|
|
29770
29770
|
}
|
|
29771
29771
|
if (mathml) {
|
|
29772
|
-
containerRef.current.innerHTML =
|
|
29772
|
+
containerRef.current.innerHTML = chunk275WERXZ_js.sanitizeMathMl(mathml);
|
|
29773
29773
|
} else {
|
|
29774
29774
|
containerRef.current.innerHTML = "";
|
|
29775
29775
|
}
|
|
@@ -29790,12 +29790,12 @@ function EquationEditorDialog({
|
|
|
29790
29790
|
existingOmml
|
|
29791
29791
|
}) {
|
|
29792
29792
|
const { t } = reactI18next.useTranslation();
|
|
29793
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29793
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onClose);
|
|
29794
29794
|
const initialLatex = React32.useMemo(() => {
|
|
29795
29795
|
if (!existingOmml) {
|
|
29796
29796
|
return "";
|
|
29797
29797
|
}
|
|
29798
|
-
return
|
|
29798
|
+
return chunk275WERXZ_js.convertOmmlToLatex(existingOmml);
|
|
29799
29799
|
}, [existingOmml]);
|
|
29800
29800
|
const [latex, setLatex] = React32.useState(initialLatex);
|
|
29801
29801
|
const deferredLatex = React32.useDeferredValue(latex);
|
|
@@ -29812,8 +29812,8 @@ function EquationEditorDialog({
|
|
|
29812
29812
|
return { mathml: "", omml: {} };
|
|
29813
29813
|
}
|
|
29814
29814
|
try {
|
|
29815
|
-
const ommlObj =
|
|
29816
|
-
const mathmlStr =
|
|
29815
|
+
const ommlObj = chunk275WERXZ_js.convertLatexToOmml(deferredLatex);
|
|
29816
|
+
const mathmlStr = chunk275WERXZ_js.convertOmmlToMathMl(ommlObj);
|
|
29817
29817
|
return { mathml: mathmlStr, omml: ommlObj };
|
|
29818
29818
|
} catch {
|
|
29819
29819
|
return { mathml: "", omml: {} };
|
|
@@ -29825,7 +29825,7 @@ function EquationEditorDialog({
|
|
|
29825
29825
|
}
|
|
29826
29826
|
let insertOmml = omml;
|
|
29827
29827
|
try {
|
|
29828
|
-
const fresh =
|
|
29828
|
+
const fresh = chunk275WERXZ_js.convertLatexToOmml(latex);
|
|
29829
29829
|
if (fresh && Object.keys(fresh).length > 0) {
|
|
29830
29830
|
insertOmml = fresh;
|
|
29831
29831
|
}
|
|
@@ -29923,7 +29923,7 @@ function EquationEditorDialog({
|
|
|
29923
29923
|
{
|
|
29924
29924
|
type: "button",
|
|
29925
29925
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
29926
|
-
className:
|
|
29926
|
+
className: chunkDPTDFK2L_js.cn(
|
|
29927
29927
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
29928
29928
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
29929
29929
|
),
|
|
@@ -29979,7 +29979,7 @@ var PREVIEW_ELEMENT_HEIGHT = 340;
|
|
|
29979
29979
|
var PREVIEW_TILE_WIDTH = 64;
|
|
29980
29980
|
var FALLBACK_ITEMS = ["1", "2", "3"];
|
|
29981
29981
|
function buildPreviewElement(layout) {
|
|
29982
|
-
const preset =
|
|
29982
|
+
const preset = chunk275WERXZ_js.PRESETS.find((p) => p.layout === layout);
|
|
29983
29983
|
return {
|
|
29984
29984
|
id: `smartart-preview-${layout}`,
|
|
29985
29985
|
type: "smartArt",
|
|
@@ -29987,7 +29987,7 @@ function buildPreviewElement(layout) {
|
|
|
29987
29987
|
y: 0,
|
|
29988
29988
|
width: PREVIEW_ELEMENT_WIDTH,
|
|
29989
29989
|
height: PREVIEW_ELEMENT_HEIGHT,
|
|
29990
|
-
smartArtData:
|
|
29990
|
+
smartArtData: chunk275WERXZ_js.buildSmartArtPresetData(layout, preset?.defaultItems ?? FALLBACK_ITEMS)
|
|
29991
29991
|
};
|
|
29992
29992
|
}
|
|
29993
29993
|
function getPreviewForLayout(layout) {
|
|
@@ -30022,17 +30022,17 @@ function InsertSmartArtDialog({
|
|
|
30022
30022
|
onInsert
|
|
30023
30023
|
}) {
|
|
30024
30024
|
const { t } = reactI18next.useTranslation();
|
|
30025
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
30025
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onClose);
|
|
30026
30026
|
const [activeCategory, setActiveCategory] = React32.useState("list");
|
|
30027
30027
|
const [selectedLayout, setSelectedLayout] = React32.useState(null);
|
|
30028
30028
|
const dialogRef = React32.useRef(null);
|
|
30029
30029
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
30030
|
-
const filteredPresets =
|
|
30030
|
+
const filteredPresets = chunk275WERXZ_js.PRESETS.filter((p) => p.category === activeCategory);
|
|
30031
30031
|
const handleInsert = React32.useCallback(() => {
|
|
30032
30032
|
if (!selectedLayout) {
|
|
30033
30033
|
return;
|
|
30034
30034
|
}
|
|
30035
|
-
const preset =
|
|
30035
|
+
const preset = chunk275WERXZ_js.PRESETS.find((p) => p.layout === selectedLayout);
|
|
30036
30036
|
if (!preset) {
|
|
30037
30037
|
return;
|
|
30038
30038
|
}
|
|
@@ -30095,7 +30095,7 @@ function InsertSmartArtDialog({
|
|
|
30095
30095
|
{
|
|
30096
30096
|
className: "w-40 border-r border-border py-2",
|
|
30097
30097
|
"aria-label": t("pptx.insertSmartArt.categories"),
|
|
30098
|
-
children:
|
|
30098
|
+
children: chunk275WERXZ_js.CATEGORIES.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30099
30099
|
"button",
|
|
30100
30100
|
{
|
|
30101
30101
|
type: "button",
|
|
@@ -30103,7 +30103,7 @@ function InsertSmartArtDialog({
|
|
|
30103
30103
|
setActiveCategory(cat.id);
|
|
30104
30104
|
setSelectedLayout(null);
|
|
30105
30105
|
},
|
|
30106
|
-
className:
|
|
30106
|
+
className: chunkDPTDFK2L_js.cn(
|
|
30107
30107
|
"w-full text-left px-3 py-1.5 text-xs transition-colors",
|
|
30108
30108
|
activeCategory === cat.id ? "bg-primary text-white" : "text-foreground hover:bg-muted"
|
|
30109
30109
|
),
|
|
@@ -30131,7 +30131,7 @@ function InsertSmartArtDialog({
|
|
|
30131
30131
|
onInsert(preset.layout, preset.defaultItems);
|
|
30132
30132
|
onClose();
|
|
30133
30133
|
},
|
|
30134
|
-
className:
|
|
30134
|
+
className: chunkDPTDFK2L_js.cn(
|
|
30135
30135
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
30136
30136
|
selectedLayout === preset.layout ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
30137
30137
|
),
|
|
@@ -30161,7 +30161,7 @@ function InsertSmartArtDialog({
|
|
|
30161
30161
|
type: "button",
|
|
30162
30162
|
onClick: handleInsert,
|
|
30163
30163
|
disabled: !selectedLayout,
|
|
30164
|
-
className:
|
|
30164
|
+
className: chunkDPTDFK2L_js.cn(
|
|
30165
30165
|
"px-3 py-1.5 text-xs rounded transition-colors",
|
|
30166
30166
|
selectedLayout ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
30167
30167
|
),
|
|
@@ -30463,7 +30463,7 @@ function ViewerCanvasArea(props) {
|
|
|
30463
30463
|
hiddenActions
|
|
30464
30464
|
} = props;
|
|
30465
30465
|
const { t } = reactI18next.useTranslation();
|
|
30466
|
-
const { isHidden } =
|
|
30466
|
+
const { isHidden } = chunkDPTDFK2L_js.useToolbarVisibility(hiddenActions);
|
|
30467
30467
|
const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
|
|
30468
30468
|
const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
|
|
30469
30469
|
const fieldContext = React32.useMemo(() => {
|
|
@@ -30505,16 +30505,16 @@ function ViewerCanvasArea(props) {
|
|
|
30505
30505
|
if (mode === "present") {
|
|
30506
30506
|
presentation.handlePresentationAction(action);
|
|
30507
30507
|
} else if (action.url) {
|
|
30508
|
-
|
|
30508
|
+
chunk275WERXZ_js.safeOpenUrl(action.url);
|
|
30509
30509
|
}
|
|
30510
30510
|
},
|
|
30511
30511
|
[mode, presentation]
|
|
30512
30512
|
);
|
|
30513
30513
|
const handleHyperlinkClick = React32.useCallback(
|
|
30514
30514
|
(url) => {
|
|
30515
|
-
if (
|
|
30515
|
+
if (chunk275WERXZ_js.isPpactionUrl(url)) {
|
|
30516
30516
|
if (mode === "present") {
|
|
30517
|
-
const parsed =
|
|
30517
|
+
const parsed = chunk275WERXZ_js.parsePpactionUrl(url);
|
|
30518
30518
|
if (parsed) {
|
|
30519
30519
|
const action = {
|
|
30520
30520
|
action: parsed.action,
|
|
@@ -30525,7 +30525,7 @@ function ViewerCanvasArea(props) {
|
|
|
30525
30525
|
}
|
|
30526
30526
|
return;
|
|
30527
30527
|
}
|
|
30528
|
-
|
|
30528
|
+
chunk275WERXZ_js.safeOpenUrl(url);
|
|
30529
30529
|
},
|
|
30530
30530
|
[mode, presentation]
|
|
30531
30531
|
);
|
|
@@ -30552,7 +30552,7 @@ function ViewerCanvasArea(props) {
|
|
|
30552
30552
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30553
30553
|
}
|
|
30554
30554
|
}, [mode, presentation, s]);
|
|
30555
|
-
const swipe =
|
|
30555
|
+
const swipe = chunkDPTDFK2L_js.useSwipeNavigation({
|
|
30556
30556
|
enabled: swipeEnabled,
|
|
30557
30557
|
onNext: handleSwipeNext,
|
|
30558
30558
|
onPrev: handleSwipePrev
|
|
@@ -31014,7 +31014,7 @@ function ThemeColorSchemeEditor({
|
|
|
31014
31014
|
onMinorFontChange
|
|
31015
31015
|
}) {
|
|
31016
31016
|
const { t } = reactI18next.useTranslation();
|
|
31017
|
-
const previewGrid = React32.useMemo(() =>
|
|
31017
|
+
const previewGrid = React32.useMemo(() => chunk275WERXZ_js.buildThemeColorGrid(editColors), [editColors]);
|
|
31018
31018
|
const handleColorText = React32.useCallback(
|
|
31019
31019
|
(val) => {
|
|
31020
31020
|
if (activePickerKey && /^#[0-9a-fA-F]{6}$/.test(val)) {
|
|
@@ -31034,15 +31034,15 @@ function ThemeColorSchemeEditor({
|
|
|
31034
31034
|
disabled: !canEdit,
|
|
31035
31035
|
className: `h-6 w-full rounded-sm border transition-colors ${activePickerKey === key ? "border-primary ring-1 ring-primary" : "border-border hover:border-muted-foreground"} disabled:opacity-40 disabled:cursor-not-allowed`,
|
|
31036
31036
|
style: { backgroundColor: editColors[key] },
|
|
31037
|
-
title: `${
|
|
31038
|
-
"aria-label": `${
|
|
31037
|
+
title: `${chunk275WERXZ_js.THEME_COLOR_LABELS[key]}: ${editColors[key]}`,
|
|
31038
|
+
"aria-label": `${chunk275WERXZ_js.THEME_COLOR_LABELS[key]}: ${editColors[key]}`,
|
|
31039
31039
|
onClick: () => onSetActivePickerKey(activePickerKey === key ? null : key)
|
|
31040
31040
|
}
|
|
31041
31041
|
),
|
|
31042
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children:
|
|
31042
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children: chunk275WERXZ_js.THEME_COLOR_LABELS[key] })
|
|
31043
31043
|
] }, key)) }),
|
|
31044
31044
|
activePickerKey && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2 rounded bg-background p-2", children: [
|
|
31045
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children:
|
|
31045
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children: chunk275WERXZ_js.THEME_COLOR_LABELS[activePickerKey] }),
|
|
31046
31046
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31047
31047
|
"input",
|
|
31048
31048
|
{
|
|
@@ -31340,7 +31340,7 @@ function MobileDismissSheet({
|
|
|
31340
31340
|
className,
|
|
31341
31341
|
children
|
|
31342
31342
|
}) {
|
|
31343
|
-
const { dragY, handlers } =
|
|
31343
|
+
const { dragY, handlers } = chunkDPTDFK2L_js.useSheetDismissDrag(onClose);
|
|
31344
31344
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31345
31345
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31346
31346
|
"button",
|
|
@@ -31609,7 +31609,7 @@ function ThemeThumbnail({
|
|
|
31609
31609
|
{
|
|
31610
31610
|
type: "button",
|
|
31611
31611
|
onClick,
|
|
31612
|
-
className:
|
|
31612
|
+
className: chunkDPTDFK2L_js.cn(
|
|
31613
31613
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
31614
31614
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
31615
31615
|
),
|
|
@@ -32243,7 +32243,7 @@ function MobileBottomBar({
|
|
|
32243
32243
|
{
|
|
32244
32244
|
type: "button",
|
|
32245
32245
|
onClick,
|
|
32246
|
-
className:
|
|
32246
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32247
32247
|
"relative flex flex-col items-center justify-center gap-0.5 flex-1 min-h-[56px] py-1.5 text-[10px] font-medium transition-colors active:scale-95",
|
|
32248
32248
|
active ? "text-primary" : "text-muted-foreground hover:text-foreground"
|
|
32249
32249
|
),
|
|
@@ -32291,7 +32291,7 @@ function MobileChromeOverlay(props) {
|
|
|
32291
32291
|
canEdit,
|
|
32292
32292
|
commentCount
|
|
32293
32293
|
} = props;
|
|
32294
|
-
const { keyboardInset, isKeyboardOpen } =
|
|
32294
|
+
const { keyboardInset, isKeyboardOpen } = chunkDPTDFK2L_js.useKeyboardInsets();
|
|
32295
32295
|
const activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null;
|
|
32296
32296
|
const closeAllSheets = () => {
|
|
32297
32297
|
s.setIsSlidesPaneOpen(false);
|
|
@@ -32391,7 +32391,7 @@ function SettingsAppearanceTab({
|
|
|
32391
32391
|
type: "button",
|
|
32392
32392
|
onClick: () => onSelectTheme(entry.key),
|
|
32393
32393
|
"aria-pressed": isActive,
|
|
32394
|
-
className:
|
|
32394
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32395
32395
|
"flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
|
|
32396
32396
|
isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
|
|
32397
32397
|
),
|
|
@@ -32408,7 +32408,7 @@ function SettingsAppearanceTab({
|
|
|
32408
32408
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32409
32409
|
"span",
|
|
32410
32410
|
{
|
|
32411
|
-
className:
|
|
32411
|
+
className: chunkDPTDFK2L_js.cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
|
|
32412
32412
|
children: t(entry.labelKey)
|
|
32413
32413
|
}
|
|
32414
32414
|
)
|
|
@@ -32431,7 +32431,7 @@ function SettingsLanguageTab({
|
|
|
32431
32431
|
type: "button",
|
|
32432
32432
|
onClick: () => onSelectLocale(locale.code),
|
|
32433
32433
|
"aria-pressed": isActive,
|
|
32434
|
-
className:
|
|
32434
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32435
32435
|
"flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
|
|
32436
32436
|
isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
|
|
32437
32437
|
),
|
|
@@ -32456,7 +32456,7 @@ function ToggleSwitch({
|
|
|
32456
32456
|
{
|
|
32457
32457
|
type: "button",
|
|
32458
32458
|
onClick: onToggle,
|
|
32459
|
-
className:
|
|
32459
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32460
32460
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
32461
32461
|
enabled ? "bg-primary" : "bg-muted-foreground/30"
|
|
32462
32462
|
),
|
|
@@ -32466,7 +32466,7 @@ function ToggleSwitch({
|
|
|
32466
32466
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32467
32467
|
"span",
|
|
32468
32468
|
{
|
|
32469
|
-
className:
|
|
32469
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32470
32470
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
32471
32471
|
enabled ? "translate-x-[18px]" : "translate-x-[3px]"
|
|
32472
32472
|
)
|
|
@@ -32490,7 +32490,7 @@ function SettingsDialog({
|
|
|
32490
32490
|
}) {
|
|
32491
32491
|
const [activeTab, setActiveTab] = React32.useState("general");
|
|
32492
32492
|
const { t } = reactI18next.useTranslation();
|
|
32493
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
32493
|
+
const { panelStyle, handlers: dragHandlers } = chunkDPTDFK2L_js.useModalDismissDrag(onClose);
|
|
32494
32494
|
const handleKeyDown = React32.useCallback(
|
|
32495
32495
|
(e) => {
|
|
32496
32496
|
if (e.key === "Escape") {
|
|
@@ -32564,7 +32564,7 @@ function SettingsDialog({
|
|
|
32564
32564
|
{
|
|
32565
32565
|
type: "button",
|
|
32566
32566
|
onClick: () => setActiveTab(tab.id),
|
|
32567
|
-
className:
|
|
32567
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32568
32568
|
"px-3 py-2 text-xs font-medium transition-colors relative",
|
|
32569
32569
|
activeTab === tab.id ? "text-primary" : "text-muted-foreground hover:text-foreground"
|
|
32570
32570
|
),
|
|
@@ -32576,7 +32576,7 @@ function SettingsDialog({
|
|
|
32576
32576
|
tab.id
|
|
32577
32577
|
)) }),
|
|
32578
32578
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-5 py-4 max-h-[60vh] overflow-y-auto", children: [
|
|
32579
|
-
activeTab === "general" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children:
|
|
32579
|
+
activeTab === "general" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: chunk275WERXZ_js.SETTING_TOGGLES.map((toggle) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32580
32580
|
ToggleSwitch,
|
|
32581
32581
|
{
|
|
32582
32582
|
label: t(toggle.labelKey),
|
|
@@ -32601,10 +32601,10 @@ function SettingsDialog({
|
|
|
32601
32601
|
onSelectLocale
|
|
32602
32602
|
}
|
|
32603
32603
|
),
|
|
32604
|
-
activeTab === "shortcuts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children:
|
|
32604
|
+
activeTab === "shortcuts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: chunkDPTDFK2L_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32605
32605
|
"div",
|
|
32606
32606
|
{
|
|
32607
|
-
className:
|
|
32607
|
+
className: chunkDPTDFK2L_js.cn(
|
|
32608
32608
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
32609
32609
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
32610
32610
|
),
|
|
@@ -32657,7 +32657,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32657
32657
|
hiddenActions
|
|
32658
32658
|
} = props;
|
|
32659
32659
|
React32.useEffect(() => {
|
|
32660
|
-
const css =
|
|
32660
|
+
const css = chunk275WERXZ_js.buildUserFontFaceStyles(fonts);
|
|
32661
32661
|
if (!css) {
|
|
32662
32662
|
return;
|
|
32663
32663
|
}
|
|
@@ -32668,17 +32668,17 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32668
32668
|
return () => style.remove();
|
|
32669
32669
|
}, [fonts]);
|
|
32670
32670
|
const [themeKey, setThemeKey] = React32.useState(
|
|
32671
|
-
() => defaultThemeKey ??
|
|
32671
|
+
() => defaultThemeKey ?? chunk275WERXZ_js.readStoredViewerPrefs().themeKey ?? "default"
|
|
32672
32672
|
);
|
|
32673
|
-
const themeCatalog = availableThemes ??
|
|
32674
|
-
const effectiveTheme = theme ??
|
|
32673
|
+
const themeCatalog = availableThemes ?? chunk275WERXZ_js.THEME_CATALOG;
|
|
32674
|
+
const effectiveTheme = theme ?? chunk275WERXZ_js.resolveThemeCatalogEntry(themeKey, themeCatalog);
|
|
32675
32675
|
const handleThemeChange = React32.useCallback(
|
|
32676
32676
|
(key) => {
|
|
32677
32677
|
setThemeKey(key);
|
|
32678
32678
|
if (onThemeChange) {
|
|
32679
32679
|
onThemeChange(key);
|
|
32680
32680
|
} else {
|
|
32681
|
-
|
|
32681
|
+
chunk275WERXZ_js.writeStoredViewerPrefs({ themeKey: key });
|
|
32682
32682
|
}
|
|
32683
32683
|
},
|
|
32684
32684
|
[onThemeChange]
|
|
@@ -32686,7 +32686,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32686
32686
|
const themeStyle = useThemeStyle(effectiveTheme);
|
|
32687
32687
|
const { i18n } = reactI18next.useTranslation();
|
|
32688
32688
|
const [localeCode, setLocaleCode] = React32.useState(
|
|
32689
|
-
() => defaultLocale ??
|
|
32689
|
+
() => defaultLocale ?? chunk275WERXZ_js.readStoredViewerPrefs().localeCode ?? "en"
|
|
32690
32690
|
);
|
|
32691
32691
|
React32.useEffect(() => {
|
|
32692
32692
|
if (localeCode !== "en" && !onLocaleChange) {
|
|
@@ -32713,7 +32713,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32713
32713
|
onLocaleChange(code);
|
|
32714
32714
|
} else {
|
|
32715
32715
|
void i18n.changeLanguage(code);
|
|
32716
|
-
|
|
32716
|
+
chunk275WERXZ_js.writeStoredViewerPrefs({ localeCode: code });
|
|
32717
32717
|
}
|
|
32718
32718
|
},
|
|
32719
32719
|
[onLocaleChange, i18n]
|
|
@@ -32728,7 +32728,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32728
32728
|
return;
|
|
32729
32729
|
}
|
|
32730
32730
|
void (async () => {
|
|
32731
|
-
const picked = await
|
|
32731
|
+
const picked = await chunk275WERXZ_js.openPptxFile();
|
|
32732
32732
|
if (picked) {
|
|
32733
32733
|
setContent(picked.buffer);
|
|
32734
32734
|
}
|
|
@@ -32736,7 +32736,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32736
32736
|
}, [hostOpenFile]);
|
|
32737
32737
|
const handleOpenRecentFile = React32.useCallback((key) => {
|
|
32738
32738
|
void (async () => {
|
|
32739
|
-
const bytes = await
|
|
32739
|
+
const bytes = await chunk275WERXZ_js.readBackstageRecentFile(key);
|
|
32740
32740
|
if (bytes) {
|
|
32741
32741
|
setContent(bytes);
|
|
32742
32742
|
}
|
|
@@ -32746,8 +32746,8 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32746
32746
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = React32.useState(false);
|
|
32747
32747
|
const [autosaveEnabled, setAutosaveEnabled] = React32.useState(true);
|
|
32748
32748
|
const [isShareDialogOpen, setIsShareDialogOpen] = React32.useState(false);
|
|
32749
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
32750
|
-
const state =
|
|
32749
|
+
const { reducedMotion, toggleReducedMotion } = chunkDPTDFK2L_js.useReducedMotion();
|
|
32750
|
+
const state = chunkDPTDFK2L_js.useViewerState({ content, canEdit });
|
|
32751
32751
|
const {
|
|
32752
32752
|
containerRef,
|
|
32753
32753
|
mode,
|
|
@@ -32807,10 +32807,10 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32807
32807
|
},
|
|
32808
32808
|
[state, reducedMotion, toggleReducedMotion]
|
|
32809
32809
|
);
|
|
32810
|
-
const mobile =
|
|
32810
|
+
const mobile = chunkDPTDFK2L_js.useIsMobile({ containerRef });
|
|
32811
32811
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
32812
|
-
const resizablePanels =
|
|
32813
|
-
const { gridSpacingPx, visibleSlideIndexes, slideSectionGroups, masterPseudoSlide } =
|
|
32812
|
+
const resizablePanels = chunkDPTDFK2L_js.useResizablePanels();
|
|
32813
|
+
const { gridSpacingPx, visibleSlideIndexes, slideSectionGroups, masterPseudoSlide } = chunkDPTDFK2L_js.useDerivedSlideState({
|
|
32814
32814
|
slides,
|
|
32815
32815
|
sections: state.sections,
|
|
32816
32816
|
customShows: state.customShows,
|
|
@@ -32832,11 +32832,11 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32832
32832
|
state.isDrawingRef
|
|
32833
32833
|
]
|
|
32834
32834
|
);
|
|
32835
|
-
const zoom =
|
|
32835
|
+
const zoom = chunkDPTDFK2L_js.useZoomViewport({
|
|
32836
32836
|
canvasSize,
|
|
32837
32837
|
selectedElements: state.selectedElements
|
|
32838
32838
|
});
|
|
32839
|
-
const history =
|
|
32839
|
+
const history = chunkDPTDFK2L_js.useEditorHistory({
|
|
32840
32840
|
slides,
|
|
32841
32841
|
canvasSize,
|
|
32842
32842
|
activeSlideIndex,
|
|
@@ -32858,7 +32858,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32858
32858
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
32859
32859
|
setHeaderFooter: state.setHeaderFooter
|
|
32860
32860
|
});
|
|
32861
|
-
const { presentation, annotations, actionSoundHandlerRef } =
|
|
32861
|
+
const { presentation, annotations, actionSoundHandlerRef } = chunkDPTDFK2L_js.usePresentationSetup({
|
|
32862
32862
|
mode,
|
|
32863
32863
|
slides,
|
|
32864
32864
|
visibleSlideIndexes,
|
|
@@ -32872,7 +32872,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32872
32872
|
setSlides: state.setSlides,
|
|
32873
32873
|
history
|
|
32874
32874
|
});
|
|
32875
|
-
|
|
32875
|
+
chunkDPTDFK2L_js.useTouchGestures({
|
|
32876
32876
|
targetRef: zoom.canvasViewportRef,
|
|
32877
32877
|
currentScale: zoom.scale,
|
|
32878
32878
|
callbacks: {
|
|
@@ -32894,7 +32894,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32894
32894
|
},
|
|
32895
32895
|
enabled: isTouchDevice
|
|
32896
32896
|
});
|
|
32897
|
-
const dialogs =
|
|
32897
|
+
const dialogs = chunkDPTDFK2L_js.useViewerDialogs({
|
|
32898
32898
|
mode,
|
|
32899
32899
|
slides,
|
|
32900
32900
|
activeSlide,
|
|
@@ -32935,7 +32935,7 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32935
32935
|
zoom.handleZoomToFit();
|
|
32936
32936
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
32937
32937
|
}, [mode]);
|
|
32938
|
-
const editorOps =
|
|
32938
|
+
const editorOps = chunkDPTDFK2L_js.useEditorOperations({
|
|
32939
32939
|
state,
|
|
32940
32940
|
history,
|
|
32941
32941
|
zoom,
|
|
@@ -32966,8 +32966,9 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
32966
32966
|
handleEnterRehearsalMode,
|
|
32967
32967
|
autosaveStatus,
|
|
32968
32968
|
isEncryptedDialogOpen,
|
|
32969
|
-
setIsEncryptedDialogOpen
|
|
32970
|
-
|
|
32969
|
+
setIsEncryptedDialogOpen,
|
|
32970
|
+
loadVersion
|
|
32971
|
+
} = chunkDPTDFK2L_js.useViewerIntegration({
|
|
32971
32972
|
state,
|
|
32972
32973
|
zoom,
|
|
32973
32974
|
history,
|
|
@@ -33278,7 +33279,8 @@ var PowerPointViewer = React32.forwardRef(
|
|
|
33278
33279
|
templateElementsBySlideId,
|
|
33279
33280
|
setSlides: state.setSlides,
|
|
33280
33281
|
config: collaboration,
|
|
33281
|
-
content
|
|
33282
|
+
content,
|
|
33283
|
+
loadVersion
|
|
33282
33284
|
}
|
|
33283
33285
|
),
|
|
33284
33286
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33315,7 +33317,8 @@ function CollaborationDocumentSync({
|
|
|
33315
33317
|
templateElementsBySlideId,
|
|
33316
33318
|
setSlides,
|
|
33317
33319
|
config,
|
|
33318
|
-
content
|
|
33320
|
+
content,
|
|
33321
|
+
loadVersion
|
|
33319
33322
|
}) {
|
|
33320
33323
|
const collab = useCollaboration();
|
|
33321
33324
|
const contentRef = React32.useRef(content);
|
|
@@ -33327,7 +33330,7 @@ function CollaborationDocumentSync({
|
|
|
33327
33330
|
}
|
|
33328
33331
|
return bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
|
|
33329
33332
|
}, []);
|
|
33330
|
-
|
|
33333
|
+
chunkDPTDFK2L_js.useYjsDocumentSync({
|
|
33331
33334
|
doc: collab?.doc ?? null,
|
|
33332
33335
|
slides,
|
|
33333
33336
|
templateElementsBySlideId,
|
|
@@ -33335,7 +33338,8 @@ function CollaborationDocumentSync({
|
|
|
33335
33338
|
isConnected: collab?.status === "connected",
|
|
33336
33339
|
isSynced: collab?.synced ?? true,
|
|
33337
33340
|
config,
|
|
33338
|
-
getSourceBytes
|
|
33341
|
+
getSourceBytes,
|
|
33342
|
+
loadVersion
|
|
33339
33343
|
});
|
|
33340
33344
|
return null;
|
|
33341
33345
|
}
|
|
@@ -33345,13 +33349,13 @@ function CollaborationFollowLayer({
|
|
|
33345
33349
|
slideCount
|
|
33346
33350
|
}) {
|
|
33347
33351
|
const collab = useCollaboration();
|
|
33348
|
-
const { followedClientId, followUser } =
|
|
33352
|
+
const { followedClientId, followUser } = chunkDPTDFK2L_js.useFollowMode({
|
|
33349
33353
|
collab,
|
|
33350
33354
|
activeSlideIndex,
|
|
33351
33355
|
setActiveSlideIndex,
|
|
33352
33356
|
slideCount
|
|
33353
33357
|
});
|
|
33354
|
-
|
|
33358
|
+
chunkDPTDFK2L_js.useBroadcastFollower({
|
|
33355
33359
|
collab,
|
|
33356
33360
|
activeSlideIndex,
|
|
33357
33361
|
setActiveSlideIndex,
|