pptx-react-viewer 1.19.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{Model3DScene-3RYDRQOD.js → Model3DScene-BLUWY36S.js} +2 -2
- package/dist/{Model3DScene-3RYDRQOD.js.br → Model3DScene-BLUWY36S.js.br} +0 -0
- package/dist/Model3DScene-BLUWY36S.js.gz +0 -0
- package/dist/{Model3DScene-SLGODOXT.mjs → Model3DScene-RYHVTFOT.mjs} +1 -1
- package/dist/Model3DScene-RYHVTFOT.mjs.br +0 -0
- package/dist/Model3DScene-RYHVTFOT.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-3UZ5HZ2W.js → SurfaceChart3DScene-BW2YTOPQ.js} +2 -2
- package/dist/{SurfaceChart3DScene-3UZ5HZ2W.js.br → SurfaceChart3DScene-BW2YTOPQ.js.br} +0 -0
- package/dist/SurfaceChart3DScene-BW2YTOPQ.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-YL4QD3O5.mjs → SurfaceChart3DScene-U6QOMUJF.mjs} +1 -1
- package/dist/SurfaceChart3DScene-U6QOMUJF.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-U6QOMUJF.mjs.gz +0 -0
- package/dist/{chunk-RIRK64DM.mjs → chunk-4LPWBQTH.mjs} +24 -0
- package/dist/chunk-4LPWBQTH.mjs.br +0 -0
- package/dist/chunk-4LPWBQTH.mjs.gz +0 -0
- package/dist/{chunk-AALZCSY4.js → chunk-4SRCC7NB.js} +24 -0
- package/dist/chunk-4SRCC7NB.js.br +0 -0
- package/dist/chunk-4SRCC7NB.js.gz +0 -0
- package/dist/{chunk-G5GATDE4.js → chunk-BXACB3BG.js} +6 -1
- package/dist/chunk-BXACB3BG.js.br +0 -0
- package/dist/chunk-BXACB3BG.js.gz +0 -0
- package/dist/{chunk-VOU7OCQM.mjs → chunk-GG2KBJSN.mjs} +6 -1
- package/dist/chunk-GG2KBJSN.mjs.br +0 -0
- package/dist/chunk-GG2KBJSN.mjs.gz +0 -0
- package/dist/{chunk-7JYQRDRI.js → chunk-KRK367H5.js} +687 -696
- package/dist/chunk-KRK367H5.js.br +0 -0
- package/dist/chunk-KRK367H5.js.gz +0 -0
- package/dist/{chunk-H5V24JVW.js → chunk-LXUMBK2O.js} +398 -398
- package/dist/chunk-LXUMBK2O.js.br +0 -0
- package/dist/chunk-LXUMBK2O.js.gz +0 -0
- package/dist/{chunk-TG2ZYU7Y.mjs → chunk-TUVSZMLW.mjs} +5 -14
- package/dist/chunk-TUVSZMLW.mjs.br +0 -0
- package/dist/chunk-TUVSZMLW.mjs.gz +0 -0
- package/dist/{chunk-3TRQKGBU.mjs → chunk-UDJHJM5B.mjs} +3 -3
- package/dist/chunk-UDJHJM5B.mjs.br +0 -0
- package/dist/chunk-UDJHJM5B.mjs.gz +0 -0
- package/dist/hooks-unstable.js +74 -74
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/i18n.js +3 -3
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.js +18 -18
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-3RYDRQOD.js.gz +0 -0
- package/dist/Model3DScene-SLGODOXT.mjs.br +0 -0
- package/dist/Model3DScene-SLGODOXT.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-3UZ5HZ2W.js.gz +0 -0
- package/dist/SurfaceChart3DScene-YL4QD3O5.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-YL4QD3O5.mjs.gz +0 -0
- package/dist/chunk-3TRQKGBU.mjs.br +0 -0
- package/dist/chunk-3TRQKGBU.mjs.gz +0 -0
- package/dist/chunk-7JYQRDRI.js.br +0 -0
- package/dist/chunk-7JYQRDRI.js.gz +0 -0
- package/dist/chunk-AALZCSY4.js.br +0 -0
- package/dist/chunk-AALZCSY4.js.gz +0 -0
- package/dist/chunk-G5GATDE4.js.br +0 -0
- package/dist/chunk-G5GATDE4.js.gz +0 -0
- package/dist/chunk-H5V24JVW.js.br +0 -0
- package/dist/chunk-H5V24JVW.js.gz +0 -0
- package/dist/chunk-RIRK64DM.mjs.br +0 -0
- package/dist/chunk-RIRK64DM.mjs.gz +0 -0
- package/dist/chunk-TG2ZYU7Y.mjs.br +0 -0
- package/dist/chunk-TG2ZYU7Y.mjs.gz +0 -0
- package/dist/chunk-VOU7OCQM.mjs.br +0 -0
- package/dist/chunk-VOU7OCQM.mjs.gz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkLXUMBK2O_js = require('./chunk-LXUMBK2O.js');
|
|
4
|
+
var chunkBXACB3BG_js = require('./chunk-BXACB3BG.js');
|
|
5
|
+
var chunk4SRCC7NB_js = require('./chunk-4SRCC7NB.js');
|
|
6
6
|
var chunkAD3EAEY6_js = require('./chunk-AD3EAEY6.js');
|
|
7
7
|
var React14 = require('react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -25,7 +25,7 @@ function useThemeStyle(theme) {
|
|
|
25
25
|
if (!theme) {
|
|
26
26
|
return void 0;
|
|
27
27
|
}
|
|
28
|
-
const vars =
|
|
28
|
+
const vars = chunkBXACB3BG_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 = chunkLXUMBK2O_js.useCollaborativeState({
|
|
46
46
|
config,
|
|
47
47
|
canvasWidth,
|
|
48
48
|
canvasHeight
|
|
@@ -474,7 +474,7 @@ function LoadingState({ className }) {
|
|
|
474
474
|
role: "status",
|
|
475
475
|
"aria-live": "polite",
|
|
476
476
|
"aria-atomic": "true",
|
|
477
|
-
className:
|
|
477
|
+
className: chunkLXUMBK2O_js.cn(
|
|
478
478
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
479
479
|
className
|
|
480
480
|
),
|
|
@@ -497,7 +497,7 @@ function ErrorState({ className, error }) {
|
|
|
497
497
|
{
|
|
498
498
|
role: "alert",
|
|
499
499
|
"aria-live": "assertive",
|
|
500
|
-
className:
|
|
500
|
+
className: chunkLXUMBK2O_js.cn(
|
|
501
501
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
502
502
|
className
|
|
503
503
|
),
|
|
@@ -528,7 +528,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
528
528
|
}
|
|
529
529
|
)
|
|
530
530
|
] }),
|
|
531
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
531
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunkLXUMBK2O_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
532
532
|
"div",
|
|
533
533
|
{
|
|
534
534
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -588,14 +588,14 @@ function AccessibilityPanel({
|
|
|
588
588
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
589
589
|
"aria-checked": reducedMotion ?? false,
|
|
590
590
|
onClick: onToggleReducedMotion,
|
|
591
|
-
className:
|
|
591
|
+
className: chunkLXUMBK2O_js.cn(
|
|
592
592
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
593
593
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
594
594
|
),
|
|
595
595
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
596
596
|
"span",
|
|
597
597
|
{
|
|
598
|
-
className:
|
|
598
|
+
className: chunkLXUMBK2O_js.cn(
|
|
599
599
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
600
600
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
601
601
|
)
|
|
@@ -614,7 +614,7 @@ function AccessibilityPanel({
|
|
|
614
614
|
"div",
|
|
615
615
|
{
|
|
616
616
|
role: "listitem",
|
|
617
|
-
className:
|
|
617
|
+
className: chunkLXUMBK2O_js.cn(
|
|
618
618
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
619
619
|
/* Severity-based background and text colouring */
|
|
620
620
|
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"
|
|
@@ -646,7 +646,7 @@ function ExportProgressModal({
|
|
|
646
646
|
if (!isOpen) {
|
|
647
647
|
return null;
|
|
648
648
|
}
|
|
649
|
-
const clampedProgress =
|
|
649
|
+
const clampedProgress = chunkBXACB3BG_js.clampPercent(progress);
|
|
650
650
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
651
651
|
"div",
|
|
652
652
|
{
|
|
@@ -735,7 +735,7 @@ function StatusBar({
|
|
|
735
735
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
736
736
|
"span",
|
|
737
737
|
{
|
|
738
|
-
className:
|
|
738
|
+
className: chunkLXUMBK2O_js.cn(
|
|
739
739
|
"shrink-0 max-md:hidden",
|
|
740
740
|
autosaveStatus?.state === "error" ? "text-red-400" : autosaveStatus?.state === "saving" ? "text-yellow-400" : ""
|
|
741
741
|
),
|
|
@@ -748,7 +748,7 @@ function StatusBar({
|
|
|
748
748
|
{
|
|
749
749
|
type: "button",
|
|
750
750
|
onClick: onToggleNotes,
|
|
751
|
-
className:
|
|
751
|
+
className: chunkLXUMBK2O_js.cn(
|
|
752
752
|
vb,
|
|
753
753
|
"flex items-center gap-1 text-[10px]",
|
|
754
754
|
isNotesExpanded && "text-primary"
|
|
@@ -768,7 +768,7 @@ function StatusBar({
|
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
770
|
onClick: () => onSetMode("edit"),
|
|
771
|
-
className:
|
|
771
|
+
className: chunkLXUMBK2O_js.cn(vb, mode === "edit" && "text-primary"),
|
|
772
772
|
title: t("pptx.statusBar.normalView"),
|
|
773
773
|
"aria-label": t("pptx.statusBar.normalView"),
|
|
774
774
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMonitor, { className: "w-3.5 h-3.5" })
|
|
@@ -790,7 +790,7 @@ function StatusBar({
|
|
|
790
790
|
{
|
|
791
791
|
type: "button",
|
|
792
792
|
onClick: () => onSetMode("present"),
|
|
793
|
-
className:
|
|
793
|
+
className: chunkLXUMBK2O_js.cn(vb, mode === "present" && "text-primary"),
|
|
794
794
|
title: t("pptx.statusBar.slideShow"),
|
|
795
795
|
"aria-label": t("pptx.statusBar.slideShow"),
|
|
796
796
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPresentation, { className: "w-3.5 h-3.5" })
|
|
@@ -880,7 +880,7 @@ function ResizeHandle({
|
|
|
880
880
|
{
|
|
881
881
|
role: "separator",
|
|
882
882
|
"aria-orientation": direction,
|
|
883
|
-
className:
|
|
883
|
+
className: chunkLXUMBK2O_js.cn(
|
|
884
884
|
// Outer container: generous hit area for easy clicking.
|
|
885
885
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
886
886
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -891,7 +891,7 @@ function ResizeHandle({
|
|
|
891
891
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
892
892
|
"div",
|
|
893
893
|
{
|
|
894
|
-
className:
|
|
894
|
+
className: chunkLXUMBK2O_js.cn(
|
|
895
895
|
"absolute transition-colors",
|
|
896
896
|
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"
|
|
897
897
|
)
|
|
@@ -903,7 +903,7 @@ function ResizeHandle({
|
|
|
903
903
|
|
|
904
904
|
// src/viewer/utils/slide-background-style.ts
|
|
905
905
|
function getReactSlideBackgroundStyle(slide) {
|
|
906
|
-
const style =
|
|
906
|
+
const style = chunkBXACB3BG_js.getSlideBackgroundStyle(slide);
|
|
907
907
|
return {
|
|
908
908
|
backgroundColor: style["background-color"],
|
|
909
909
|
backgroundImage: style["background-image"],
|
|
@@ -958,7 +958,7 @@ function ChartElementView({
|
|
|
958
958
|
const selectedPart = selection?.elementId === element.id ? selection.part : null;
|
|
959
959
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
960
960
|
const viewModel = React14.useMemo(
|
|
961
|
-
() => canEdit ?
|
|
961
|
+
() => canEdit ? chunkLXUMBK2O_js.buildReactChartViewModel(element) : null,
|
|
962
962
|
[canEdit, element]
|
|
963
963
|
);
|
|
964
964
|
React14.useEffect(ensureInteractionStyles, []);
|
|
@@ -1009,7 +1009,7 @@ function ChartElementView({
|
|
|
1009
1009
|
if (!canEdit) {
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
|
-
const part =
|
|
1012
|
+
const part = chunkBXACB3BG_js.findChartPartTarget(e.target);
|
|
1013
1013
|
if (!part) {
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
@@ -1027,7 +1027,7 @@ function ChartElementView({
|
|
|
1027
1027
|
drag: viewModel.valueDrag,
|
|
1028
1028
|
svgHeight: viewModel.svgHeight,
|
|
1029
1029
|
startClientY: e.clientY,
|
|
1030
|
-
anchorViewY:
|
|
1030
|
+
anchorViewY: chunkBXACB3BG_js.dragAnchorViewY(startValue, viewModel.valueDrag, part.seriesIndex),
|
|
1031
1031
|
baseChartData: element.chartData,
|
|
1032
1032
|
moved: false,
|
|
1033
1033
|
lastData: null
|
|
@@ -1053,8 +1053,8 @@ function ChartElementView({
|
|
|
1053
1053
|
active.moved = true;
|
|
1054
1054
|
const deltaViewY = (e.clientY - active.startClientY) / rect.height * active.svgHeight;
|
|
1055
1055
|
const viewY = active.anchorViewY + deltaViewY;
|
|
1056
|
-
const value =
|
|
1057
|
-
active.lastData =
|
|
1056
|
+
const value = chunkBXACB3BG_js.dragValueForPart(viewY, active.drag, active.part.seriesIndex);
|
|
1057
|
+
active.lastData = chunkBXACB3BG_js.withChartPointValue(
|
|
1058
1058
|
active.baseChartData,
|
|
1059
1059
|
active.part.seriesIndex,
|
|
1060
1060
|
active.part.pointIndex,
|
|
@@ -1081,14 +1081,14 @@ function ChartElementView({
|
|
|
1081
1081
|
setTitleDraft(element.chartData?.title ?? "");
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
|
-
if (
|
|
1084
|
+
if (chunkBXACB3BG_js.findChartPartTarget(e.target)) {
|
|
1085
1085
|
e.stopPropagation();
|
|
1086
1086
|
}
|
|
1087
1087
|
};
|
|
1088
1088
|
const commitTitle = () => {
|
|
1089
1089
|
if (titleDraft !== null && element.chartData && onUpdateElement) {
|
|
1090
1090
|
onUpdateElement({
|
|
1091
|
-
chartData:
|
|
1091
|
+
chartData: chunkBXACB3BG_js.withChartTitle(element.chartData, titleDraft)
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
1094
|
setTitleDraft(null);
|
|
@@ -1104,8 +1104,8 @@ function ChartElementView({
|
|
|
1104
1104
|
onPointerUp: handlePointerUp,
|
|
1105
1105
|
onDoubleClick: handleDoubleClick,
|
|
1106
1106
|
children: [
|
|
1107
|
-
|
|
1108
|
-
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:
|
|
1107
|
+
chunkLXUMBK2O_js.renderChartElement(renderedElement),
|
|
1108
|
+
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: chunkBXACB3BG_js.formatAxisValue(dragValue) }),
|
|
1109
1109
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1110
1110
|
"input",
|
|
1111
1111
|
{
|
|
@@ -1139,23 +1139,23 @@ function ColorChangedImage({
|
|
|
1139
1139
|
className,
|
|
1140
1140
|
alt
|
|
1141
1141
|
}) {
|
|
1142
|
-
const tolerance = tolerancePct ??
|
|
1143
|
-
const cacheKey =
|
|
1142
|
+
const tolerance = tolerancePct ?? chunkBXACB3BG_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
1143
|
+
const cacheKey = chunkBXACB3BG_js.buildCacheKey(
|
|
1144
1144
|
src,
|
|
1145
1145
|
clrChange.clrFrom,
|
|
1146
1146
|
clrChange.clrTo,
|
|
1147
1147
|
tolerance,
|
|
1148
1148
|
Boolean(clrChange.clrToTransparent)
|
|
1149
1149
|
);
|
|
1150
|
-
const cached =
|
|
1150
|
+
const cached = chunkBXACB3BG_js.getCachedResult(cacheKey);
|
|
1151
1151
|
const [processedSrc, setProcessedSrc] = React14.useState(cached ?? null);
|
|
1152
1152
|
React14.useEffect(() => {
|
|
1153
|
-
if (
|
|
1154
|
-
setProcessedSrc(
|
|
1153
|
+
if (chunkBXACB3BG_js.getCachedResult(cacheKey)) {
|
|
1154
|
+
setProcessedSrc(chunkBXACB3BG_js.getCachedResult(cacheKey) ?? null);
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
let cancelled = false;
|
|
1158
|
-
|
|
1158
|
+
chunkBXACB3BG_js.applyColorChange(
|
|
1159
1159
|
src,
|
|
1160
1160
|
clrChange.clrFrom,
|
|
1161
1161
|
clrChange.clrTo,
|
|
@@ -1163,7 +1163,7 @@ function ColorChangedImage({
|
|
|
1163
1163
|
Boolean(clrChange.clrToTransparent)
|
|
1164
1164
|
).then((result) => {
|
|
1165
1165
|
if (!cancelled) {
|
|
1166
|
-
|
|
1166
|
+
chunkBXACB3BG_js.setCachedResult(cacheKey, result.dataUrl);
|
|
1167
1167
|
setProcessedSrc(result.dataUrl);
|
|
1168
1168
|
}
|
|
1169
1169
|
return void 0;
|
|
@@ -1194,19 +1194,19 @@ function DuotoneImage({
|
|
|
1194
1194
|
className,
|
|
1195
1195
|
alt
|
|
1196
1196
|
}) {
|
|
1197
|
-
const cacheKey =
|
|
1198
|
-
const cached =
|
|
1197
|
+
const cacheKey = chunkBXACB3BG_js.buildDuotoneCacheKey(src, duotone.color1, duotone.color2);
|
|
1198
|
+
const cached = chunkBXACB3BG_js.getDuotoneCachedResult(cacheKey);
|
|
1199
1199
|
const [processedSrc, setProcessedSrc] = React14.useState(cached ?? null);
|
|
1200
1200
|
React14.useEffect(() => {
|
|
1201
|
-
const cachedResult =
|
|
1201
|
+
const cachedResult = chunkBXACB3BG_js.getDuotoneCachedResult(cacheKey);
|
|
1202
1202
|
if (cachedResult) {
|
|
1203
1203
|
setProcessedSrc(cachedResult);
|
|
1204
1204
|
return;
|
|
1205
1205
|
}
|
|
1206
1206
|
let cancelled = false;
|
|
1207
|
-
|
|
1207
|
+
chunkBXACB3BG_js.applyDuotone(src, duotone.color1, duotone.color2).then((result) => {
|
|
1208
1208
|
if (!cancelled) {
|
|
1209
|
-
|
|
1209
|
+
chunkBXACB3BG_js.setDuotoneCachedResult(cacheKey, result.dataUrl);
|
|
1210
1210
|
setProcessedSrc(result.dataUrl);
|
|
1211
1211
|
}
|
|
1212
1212
|
return void 0;
|
|
@@ -1231,7 +1231,7 @@ function DuotoneImage({
|
|
|
1231
1231
|
);
|
|
1232
1232
|
}
|
|
1233
1233
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
1234
|
-
return
|
|
1234
|
+
return chunkBXACB3BG_js.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
1235
|
"svg",
|
|
1236
1236
|
{
|
|
1237
1237
|
width: 0,
|
|
@@ -1291,13 +1291,13 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
1291
1291
|
] });
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children:
|
|
1294
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: chunk4SRCC7NB_js.translationsEn["pptx.elementType.image"] });
|
|
1295
1295
|
}
|
|
1296
1296
|
const effectStyles = {
|
|
1297
1297
|
...filter ? { filter } : {},
|
|
1298
1298
|
...opacity !== void 0 ? { opacity } : {}
|
|
1299
1299
|
};
|
|
1300
|
-
if (
|
|
1300
|
+
if (chunkLXUMBK2O_js.isImageTiled(el)) {
|
|
1301
1301
|
const tileSrc = imgSrc(el);
|
|
1302
1302
|
if (!tileSrc) {
|
|
1303
1303
|
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" });
|
|
@@ -1308,18 +1308,18 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
1308
1308
|
"div",
|
|
1309
1309
|
{
|
|
1310
1310
|
className: "pointer-events-none select-none w-full h-full",
|
|
1311
|
-
style: { ...
|
|
1311
|
+
style: { ...chunkLXUMBK2O_js.getImageTilingStyle(el), ...effectStyles }
|
|
1312
1312
|
}
|
|
1313
1313
|
)
|
|
1314
1314
|
] });
|
|
1315
1315
|
}
|
|
1316
|
-
const colorWash =
|
|
1316
|
+
const colorWash = chunkBXACB3BG_js.getImageColorWashStyle(
|
|
1317
1317
|
chunkAD3EAEY6_js.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
|
|
1318
1318
|
);
|
|
1319
1319
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
1320
|
-
const duotoneColors =
|
|
1320
|
+
const duotoneColors = chunkLXUMBK2O_js.getDuotoneColors(el);
|
|
1321
1321
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
1322
|
-
const filterForImg = useDuotoneCanvas ?
|
|
1322
|
+
const filterForImg = useDuotoneCanvas ? chunkBXACB3BG_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
1323
1323
|
const canvasEffectStyles = {
|
|
1324
1324
|
...filterForImg ? { filter: filterForImg } : {},
|
|
1325
1325
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -1530,7 +1530,7 @@ function ResizeHandles({
|
|
|
1530
1530
|
"button",
|
|
1531
1531
|
{
|
|
1532
1532
|
type: "button",
|
|
1533
|
-
className:
|
|
1533
|
+
className: chunkLXUMBK2O_js.cn("absolute z-10 group", posClass, cursor),
|
|
1534
1534
|
style: peStyle,
|
|
1535
1535
|
onPointerDown: (e) => handleResizePointer(e, handle),
|
|
1536
1536
|
onMouseDown: (e) => {
|
|
@@ -1548,7 +1548,7 @@ function ResizeHandles({
|
|
|
1548
1548
|
"button",
|
|
1549
1549
|
{
|
|
1550
1550
|
type: "button",
|
|
1551
|
-
className:
|
|
1551
|
+
className: chunkLXUMBK2O_js.cn("absolute z-10", posClass, cursor),
|
|
1552
1552
|
style: peStyle,
|
|
1553
1553
|
onPointerDown: (e) => handleResizePointer(e, handle),
|
|
1554
1554
|
onMouseDown: (e) => {
|
|
@@ -1556,7 +1556,7 @@ function ResizeHandles({
|
|
|
1556
1556
|
onResizePointerDown(elementId, e, handle);
|
|
1557
1557
|
},
|
|
1558
1558
|
children: [
|
|
1559
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1559
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkLXUMBK2O_js.cn(sizeClass, "border border-white bg-primary shadow") }),
|
|
1560
1560
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-2 max-md:-inset-1" })
|
|
1561
1561
|
]
|
|
1562
1562
|
},
|
|
@@ -1635,10 +1635,10 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1635
1635
|
const viewHeight = Math.max(el.height, 1);
|
|
1636
1636
|
const ss = shapeEl?.shapeStyle;
|
|
1637
1637
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
1638
|
-
const strokeColor =
|
|
1639
|
-
const strokePaint =
|
|
1640
|
-
const dashType =
|
|
1641
|
-
const dashArray =
|
|
1638
|
+
const strokeColor = chunkBXACB3BG_js.normalizeHexColor(ss?.strokeColor, chunkLXUMBK2O_js.DEFAULT_STROKE_COLOR);
|
|
1639
|
+
const strokePaint = chunkBXACB3BG_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
1640
|
+
const dashType = chunkBXACB3BG_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
1641
|
+
const dashArray = chunkBXACB3BG_js.getSvgStrokeDasharray(
|
|
1642
1642
|
dashType,
|
|
1643
1643
|
Math.max(strokeWidth, 1),
|
|
1644
1644
|
ss?.customDashSegments
|
|
@@ -1649,14 +1649,14 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1649
1649
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1650
1650
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
1651
1651
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
1652
|
-
const compoundOffsets =
|
|
1653
|
-
const compoundWidths =
|
|
1654
|
-
const strokeCap =
|
|
1652
|
+
const compoundOffsets = chunkBXACB3BG_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
1653
|
+
const compoundWidths = chunkBXACB3BG_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1654
|
+
const strokeCap = chunkBXACB3BG_js.svgLineCap(ss?.lineCap);
|
|
1655
1655
|
const textEl = chunkAD3EAEY6_js.hasTextProperties(el) ? el : void 0;
|
|
1656
1656
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
1657
1657
|
const connectorTextSegments = textEl?.textSegments;
|
|
1658
1658
|
const connectorTextStyle = textEl?.textStyle;
|
|
1659
|
-
const pathGeometry = shapeEl ?
|
|
1659
|
+
const pathGeometry = shapeEl ? chunkLXUMBK2O_js.getConnectorPathGeometry(shapeEl) : {
|
|
1660
1660
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
1661
1661
|
startX: 0,
|
|
1662
1662
|
startY: 0,
|
|
@@ -1665,8 +1665,8 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1665
1665
|
};
|
|
1666
1666
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
1667
1667
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
1668
|
-
const lineShadow =
|
|
1669
|
-
const lineGlow =
|
|
1668
|
+
const lineShadow = chunkLXUMBK2O_js.buildLineShadowCss(el);
|
|
1669
|
+
const lineGlow = chunkLXUMBK2O_js.buildLineGlowFilter(el);
|
|
1670
1670
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1671
1671
|
"div",
|
|
1672
1672
|
{
|
|
@@ -1676,9 +1676,9 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1676
1676
|
style: {
|
|
1677
1677
|
left: el.x,
|
|
1678
1678
|
top: el.y,
|
|
1679
|
-
width: Math.max(el.width,
|
|
1680
|
-
height: Math.max(el.height,
|
|
1681
|
-
transform:
|
|
1679
|
+
width: Math.max(el.width, chunkLXUMBK2O_js.MIN_ELEMENT_SIZE),
|
|
1680
|
+
height: Math.max(el.height, chunkLXUMBK2O_js.MIN_ELEMENT_SIZE),
|
|
1681
|
+
transform: chunkBXACB3BG_js.getElementTransform(el),
|
|
1682
1682
|
transformOrigin: "center",
|
|
1683
1683
|
background: "transparent",
|
|
1684
1684
|
border: "none",
|
|
@@ -1699,14 +1699,14 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1699
1699
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
1700
1700
|
children: [
|
|
1701
1701
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
1702
|
-
|
|
1702
|
+
chunkLXUMBK2O_js.renderConnectorMarker(
|
|
1703
1703
|
startMarkerId,
|
|
1704
1704
|
startArrow,
|
|
1705
1705
|
strokePaint,
|
|
1706
1706
|
ss?.connectorStartArrowWidth,
|
|
1707
1707
|
ss?.connectorStartArrowLength
|
|
1708
1708
|
),
|
|
1709
|
-
|
|
1709
|
+
chunkLXUMBK2O_js.renderConnectorMarker(
|
|
1710
1710
|
endMarkerId,
|
|
1711
1711
|
endArrow,
|
|
1712
1712
|
strokePaint,
|
|
@@ -1918,14 +1918,14 @@ function elementHasTextHyperlink(el) {
|
|
|
1918
1918
|
return Boolean(el.textSegments?.some((segment) => Boolean(segment.style?.hyperlink)));
|
|
1919
1919
|
}
|
|
1920
1920
|
function renderDagDuotoneFilterForElement(el) {
|
|
1921
|
-
if (!
|
|
1921
|
+
if (!chunkLXUMBK2O_js.hasDagDuotoneEffect(el)) {
|
|
1922
1922
|
return null;
|
|
1923
1923
|
}
|
|
1924
1924
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
1925
1925
|
if (!duotone) {
|
|
1926
1926
|
return null;
|
|
1927
1927
|
}
|
|
1928
|
-
return
|
|
1928
|
+
return chunkLXUMBK2O_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
1929
1929
|
}
|
|
1930
1930
|
function getContainerStyle({
|
|
1931
1931
|
el,
|
|
@@ -1942,12 +1942,12 @@ function getContainerStyle({
|
|
|
1942
1942
|
return {
|
|
1943
1943
|
left: isFullscreenMedia ? 0 : el.x,
|
|
1944
1944
|
top: isFullscreenMedia ? 0 : el.y,
|
|
1945
|
-
width: isFullscreenMedia ? "100%" : Math.max(el.width,
|
|
1946
|
-
height: isFullscreenMedia ? "100%" : Math.max(el.height,
|
|
1947
|
-
transform: isFullscreenMedia ? "none" :
|
|
1945
|
+
width: isFullscreenMedia ? "100%" : Math.max(el.width, chunkLXUMBK2O_js.MIN_ELEMENT_SIZE),
|
|
1946
|
+
height: isFullscreenMedia ? "100%" : Math.max(el.height, chunkLXUMBK2O_js.MIN_ELEMENT_SIZE),
|
|
1947
|
+
transform: isFullscreenMedia ? "none" : chunkBXACB3BG_js.getElementTransform(el),
|
|
1948
1948
|
transformOrigin: "center",
|
|
1949
1949
|
overflow: overflowValue,
|
|
1950
|
-
clipPath: isImg && !has3DExtrusion ?
|
|
1950
|
+
clipPath: isImg && !has3DExtrusion ? chunkLXUMBK2O_js.getCropShapeClipPath(el) : void 0,
|
|
1951
1951
|
zIndex: isFullscreenMedia ? 20 : zIndex,
|
|
1952
1952
|
opacity,
|
|
1953
1953
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
@@ -1981,9 +1981,9 @@ function ActionIndicator({
|
|
|
1981
1981
|
function shapeParams(element) {
|
|
1982
1982
|
const style = chunkAD3EAEY6_js.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
1983
1983
|
const strokeWidth = Math.max(0, style?.strokeWidth || 0);
|
|
1984
|
-
const strokeColor =
|
|
1985
|
-
const fillColor =
|
|
1986
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
1984
|
+
const strokeColor = chunkBXACB3BG_js.normalizeHexColor(style?.strokeColor, chunkLXUMBK2O_js.DEFAULT_STROKE_COLOR);
|
|
1985
|
+
const fillColor = chunkBXACB3BG_js.normalizeHexColor(style?.fillColor, chunkLXUMBK2O_js.DEFAULT_FILL_COLOR);
|
|
1986
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkBXACB3BG_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
1987
1987
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
1988
1988
|
}
|
|
1989
1989
|
var Extrusion3DOverlay = React14__default.default.memo(({ data }) => {
|
|
@@ -2102,17 +2102,17 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2102
2102
|
const chartUpdateHandler = smartArtUpdateHandler;
|
|
2103
2103
|
const { hf, fc, sw, sc } = shapeParams(el);
|
|
2104
2104
|
const elementLocks = el.locks;
|
|
2105
|
-
const isTxt =
|
|
2105
|
+
const isTxt = chunkBXACB3BG_js.isEditableTextElement(el) && !elementLocks?.noTextEdit;
|
|
2106
2106
|
const txtSE = chunkAD3EAEY6_js.hasTextProperties(el) ? el.textStyle : void 0;
|
|
2107
|
-
const ss =
|
|
2108
|
-
const ts =
|
|
2109
|
-
const vs =
|
|
2107
|
+
const ss = chunkLXUMBK2O_js.getShapeVisualStyle(el, hf, fc, sw, sc);
|
|
2108
|
+
const ts = chunkLXUMBK2O_js.getTextStyleForElement(el, chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR);
|
|
2109
|
+
const vs = chunkLXUMBK2O_js.renderVectorShape(el, hf, fc, sw, sc);
|
|
2110
2110
|
const isImg = el.type === "picture" || el.type === "image";
|
|
2111
2111
|
const isModel3D = el.type === "model3d";
|
|
2112
|
-
const isConn =
|
|
2112
|
+
const isConn = chunkLXUMBK2O_js.isConnectorOrLineElement(el);
|
|
2113
2113
|
const shapeStyle3d = chunkAD3EAEY6_js.hasShapeProperties(el) ? el.shapeStyle : void 0;
|
|
2114
2114
|
const extrusionData = React14.useMemo(
|
|
2115
|
-
() =>
|
|
2115
|
+
() => chunkLXUMBK2O_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
2116
2116
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
2117
2117
|
);
|
|
2118
2118
|
const [isMediaPlaying, setIsMediaPlaying] = React14.useState(false);
|
|
@@ -2152,9 +2152,9 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2152
2152
|
const cur = effectiveIsInlineEditing ? "cursor-text" : effectiveCanInteract ? elementLocks?.noMove ? "cursor-default" : "cursor-move" : hasAction || isZoom ? "cursor-pointer" : "";
|
|
2153
2153
|
const isPresentationPassive = !effectiveCanInteract;
|
|
2154
2154
|
const isFullscreenMedia = el.type === "media" && Boolean(el.fullScreen) && isPresentationPassive && isMediaPlaying;
|
|
2155
|
-
const ariaRole = isActionable ? "button" :
|
|
2156
|
-
const ariaLabel =
|
|
2157
|
-
const ariaRoleDescription =
|
|
2155
|
+
const ariaRole = isActionable ? "button" : chunkBXACB3BG_js.getAriaRole(el);
|
|
2156
|
+
const ariaLabel = chunkBXACB3BG_js.getAriaLabel(el);
|
|
2157
|
+
const ariaRoleDescription = chunkBXACB3BG_js.getAriaRoleDescription(el);
|
|
2158
2158
|
const isFocusable = effectiveCanInteract || isActionable;
|
|
2159
2159
|
const interactionProps = getElementInteractionProps({
|
|
2160
2160
|
element: el,
|
|
@@ -2176,7 +2176,7 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2176
2176
|
"aria-roledescription": ariaRoleDescription,
|
|
2177
2177
|
"aria-selected": isSelected ? true : void 0,
|
|
2178
2178
|
tabIndex: isFocusable ? 0 : -1,
|
|
2179
|
-
className:
|
|
2179
|
+
className: chunkLXUMBK2O_js.cn(
|
|
2180
2180
|
"absolute border",
|
|
2181
2181
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
2182
2182
|
cur,
|
|
@@ -2209,9 +2209,9 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2209
2209
|
txtSE,
|
|
2210
2210
|
txtS: ts,
|
|
2211
2211
|
vecShape: vs,
|
|
2212
|
-
imgStyle:
|
|
2213
|
-
imgFilter:
|
|
2214
|
-
imgOpacity:
|
|
2212
|
+
imgStyle: chunkLXUMBK2O_js.getImageRenderStyle(el),
|
|
2213
|
+
imgFilter: chunkBXACB3BG_js.getImageEffectsFilter(el),
|
|
2214
|
+
imgOpacity: chunkBXACB3BG_js.getImageEffectsOpacity(el),
|
|
2215
2215
|
imgAlt: imageAltText,
|
|
2216
2216
|
isTxtEl: isTxt,
|
|
2217
2217
|
media: mediaDataUrls,
|
|
@@ -2277,7 +2277,7 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2277
2277
|
onResizePointerDown,
|
|
2278
2278
|
onAdjustmentPointerDown,
|
|
2279
2279
|
rotation: el.rotation,
|
|
2280
|
-
nonRotationTransform:
|
|
2280
|
+
nonRotationTransform: chunkBXACB3BG_js.getElementTransformWithoutRotation(el),
|
|
2281
2281
|
onRotate: elementLocks?.noRotation ? void 0 : onRotate
|
|
2282
2282
|
}
|
|
2283
2283
|
)
|
|
@@ -2287,8 +2287,8 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2287
2287
|
}
|
|
2288
2288
|
);
|
|
2289
2289
|
function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefix) {
|
|
2290
|
-
const points =
|
|
2291
|
-
const circles =
|
|
2290
|
+
const points = chunkBXACB3BG_js.extractPathPoints(pathD);
|
|
2291
|
+
const circles = chunkBXACB3BG_js.generatePressureCircles(points, widths, {
|
|
2292
2292
|
baseWidth,
|
|
2293
2293
|
minRadius: 0.5,
|
|
2294
2294
|
maxRadius: baseWidth * 1.5
|
|
@@ -2298,8 +2298,8 @@ function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefi
|
|
|
2298
2298
|
function renderInk(el, options) {
|
|
2299
2299
|
const replay = options?.replay ?? false;
|
|
2300
2300
|
Boolean(el.inkPointPressures) && el.inkPointPressures.length > 0;
|
|
2301
|
-
Boolean(el.inkWidths) && el.inkWidths.length > 1 &&
|
|
2302
|
-
const replayStyles = replay ?
|
|
2301
|
+
Boolean(el.inkWidths) && el.inkWidths.length > 1 && chunkBXACB3BG_js.hasPressureVariation(el.inkWidths);
|
|
2302
|
+
const replayStyles = replay ? chunkBXACB3BG_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
2303
2303
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2304
2304
|
"svg",
|
|
2305
2305
|
{
|
|
@@ -2307,18 +2307,18 @@ function renderInk(el, options) {
|
|
|
2307
2307
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
2308
2308
|
preserveAspectRatio: "none",
|
|
2309
2309
|
children: [
|
|
2310
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
2310
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkBXACB3BG_js.INK_REPLAY_KEYFRAMES }),
|
|
2311
2311
|
el.inkPaths.map((d, i) => {
|
|
2312
|
-
const color =
|
|
2313
|
-
const width =
|
|
2314
|
-
const opacity =
|
|
2312
|
+
const color = chunkBXACB3BG_js.resolveInkColor(el.inkColors, i);
|
|
2313
|
+
const width = chunkBXACB3BG_js.resolveInkWidth(el.inkWidths, i);
|
|
2314
|
+
const opacity = chunkBXACB3BG_js.resolveInkOpacity(el.inkOpacities, i);
|
|
2315
2315
|
{
|
|
2316
2316
|
const pointPressures = el.inkPointPressures?.[i];
|
|
2317
|
-
if (pointPressures && pointPressures.length > 1 &&
|
|
2318
|
-
const pointWidths =
|
|
2317
|
+
if (pointPressures && pointPressures.length > 1 && chunkBXACB3BG_js.hasPressureVariation(pointPressures)) {
|
|
2318
|
+
const pointWidths = chunkBXACB3BG_js.pressuresToWidths(pointPressures, width);
|
|
2319
2319
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(d, pointWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
|
|
2320
2320
|
}
|
|
2321
|
-
if (el.inkWidths && el.inkWidths.length > 1 &&
|
|
2321
|
+
if (el.inkWidths && el.inkWidths.length > 1 && chunkBXACB3BG_js.hasPressureVariation(el.inkWidths)) {
|
|
2322
2322
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(d, el.inkWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
@@ -2353,10 +2353,10 @@ function renderInk(el, options) {
|
|
|
2353
2353
|
function renderGroup(children) {
|
|
2354
2354
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: children.map((c, childIndex) => {
|
|
2355
2355
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
2356
|
-
const ss =
|
|
2357
|
-
const vs =
|
|
2358
|
-
const ts =
|
|
2359
|
-
const isTxt =
|
|
2356
|
+
const ss = chunkLXUMBK2O_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
2357
|
+
const vs = chunkLXUMBK2O_js.renderVectorShape(c, hf, fc, sw, sc);
|
|
2358
|
+
const ts = chunkLXUMBK2O_js.getTextStyleForElement(c, chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR);
|
|
2359
|
+
const isTxt = chunkBXACB3BG_js.isEditableTextElement(c);
|
|
2360
2360
|
const isI = c.type === "picture" || c.type === "image";
|
|
2361
2361
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2362
2362
|
"div",
|
|
@@ -2365,12 +2365,12 @@ function renderGroup(children) {
|
|
|
2365
2365
|
style: {
|
|
2366
2366
|
left: c.x,
|
|
2367
2367
|
top: c.y,
|
|
2368
|
-
width: Math.max(c.width,
|
|
2369
|
-
height: Math.max(c.height,
|
|
2370
|
-
transform:
|
|
2368
|
+
width: Math.max(c.width, chunkLXUMBK2O_js.MIN_ELEMENT_SIZE),
|
|
2369
|
+
height: Math.max(c.height, chunkLXUMBK2O_js.MIN_ELEMENT_SIZE),
|
|
2370
|
+
transform: chunkBXACB3BG_js.getElementTransform(c),
|
|
2371
2371
|
transformOrigin: "center",
|
|
2372
2372
|
overflow: isI ? "hidden" : void 0,
|
|
2373
|
-
clipPath: isI ?
|
|
2373
|
+
clipPath: isI ? chunkLXUMBK2O_js.getCropShapeClipPath(c) : void 0,
|
|
2374
2374
|
...ss,
|
|
2375
2375
|
// Explicit z-index preserves document order stacking within the
|
|
2376
2376
|
// group: later children in the array (= later in p:grpSp XML)
|
|
@@ -2378,19 +2378,19 @@ function renderGroup(children) {
|
|
|
2378
2378
|
// Placed after ...ss to ensure it is never overwritten.
|
|
2379
2379
|
zIndex: childIndex
|
|
2380
2380
|
},
|
|
2381
|
-
children: isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ?
|
|
2381
|
+
children: isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? chunkLXUMBK2O_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2382
2382
|
"div",
|
|
2383
2383
|
{
|
|
2384
2384
|
className: "pointer-events-none select-none w-full h-full",
|
|
2385
|
-
style:
|
|
2385
|
+
style: chunkLXUMBK2O_js.getImageTilingStyle(c)
|
|
2386
2386
|
}
|
|
2387
2387
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2388
2388
|
"img",
|
|
2389
2389
|
{
|
|
2390
2390
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
2391
|
-
alt:
|
|
2391
|
+
alt: chunk4SRCC7NB_js.translationsEn["pptx.ink.groupChildAlt"],
|
|
2392
2392
|
className: "pointer-events-none select-none",
|
|
2393
|
-
style:
|
|
2393
|
+
style: chunkLXUMBK2O_js.getImageRenderStyle(c),
|
|
2394
2394
|
draggable: false
|
|
2395
2395
|
}
|
|
2396
2396
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -2400,7 +2400,7 @@ function renderGroup(children) {
|
|
|
2400
2400
|
{
|
|
2401
2401
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
2402
2402
|
style: ts,
|
|
2403
|
-
children:
|
|
2403
|
+
children: chunkLXUMBK2O_js.renderTextSegments(c, chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR)
|
|
2404
2404
|
}
|
|
2405
2405
|
) : null
|
|
2406
2406
|
] })
|
|
@@ -2413,7 +2413,7 @@ function renderContentPart(el, options) {
|
|
|
2413
2413
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
2414
2414
|
const replay = options?.replay ?? false;
|
|
2415
2415
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
2416
|
-
const replayStyles = replay ?
|
|
2416
|
+
const replayStyles = replay ? chunkBXACB3BG_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
2417
2417
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2418
2418
|
"svg",
|
|
2419
2419
|
{
|
|
@@ -2421,10 +2421,10 @@ function renderContentPart(el, options) {
|
|
|
2421
2421
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
2422
2422
|
preserveAspectRatio: "none",
|
|
2423
2423
|
children: [
|
|
2424
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
2424
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkBXACB3BG_js.INK_REPLAY_KEYFRAMES }),
|
|
2425
2425
|
el.inkStrokes.map((stroke, i) => {
|
|
2426
|
-
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 &&
|
|
2427
|
-
const pointWidths =
|
|
2426
|
+
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 && chunkBXACB3BG_js.hasPressureVariation(stroke.pressures)) {
|
|
2427
|
+
const pointWidths = chunkBXACB3BG_js.pressuresToWidths(stroke.pressures, stroke.width);
|
|
2428
2428
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(
|
|
2429
2429
|
stroke.path,
|
|
2430
2430
|
pointWidths,
|
|
@@ -2462,7 +2462,7 @@ function renderContentPart(el, options) {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
);
|
|
2464
2464
|
}
|
|
2465
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
2465
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk4SRCC7NB_js.translationsEn["pptx.ink.contentPartFallback"] });
|
|
2466
2466
|
}
|
|
2467
2467
|
function ExcelIcon(color, size = 32) {
|
|
2468
2468
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
|
|
@@ -2520,7 +2520,7 @@ function PdfIcon(color, size = 32) {
|
|
|
2520
2520
|
fill: "none"
|
|
2521
2521
|
}
|
|
2522
2522
|
),
|
|
2523
|
-
/* @__PURE__ */ jsxRuntime.jsx("text", { x: "12", y: "14", textAnchor: "middle", fill: color, fontSize: "7", fontWeight: "bold", children:
|
|
2523
|
+
/* @__PURE__ */ jsxRuntime.jsx("text", { x: "12", y: "14", textAnchor: "middle", fill: color, fontSize: "7", fontWeight: "bold", children: chunk4SRCC7NB_js.translationsEn["pptx.file.pdf"] })
|
|
2524
2524
|
] });
|
|
2525
2525
|
}
|
|
2526
2526
|
function VisioIcon(color, size = 32) {
|
|
@@ -2636,16 +2636,16 @@ function getOleIcon(type, color, size = 32) {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
}
|
|
2638
2638
|
function getOleAriaLabel(el) {
|
|
2639
|
-
const oleType =
|
|
2640
|
-
const typeLabel =
|
|
2639
|
+
const oleType = chunkBXACB3BG_js.resolveOleType(el);
|
|
2640
|
+
const typeLabel = chunkBXACB3BG_js.getOleTypeLabel(oleType);
|
|
2641
2641
|
if (el.fileName) {
|
|
2642
2642
|
return `${typeLabel}: ${el.fileName}`;
|
|
2643
2643
|
}
|
|
2644
2644
|
return typeLabel;
|
|
2645
2645
|
}
|
|
2646
2646
|
function renderOleBadge(oleType) {
|
|
2647
|
-
const color =
|
|
2648
|
-
const shortLabel =
|
|
2647
|
+
const color = chunkBXACB3BG_js.getOleTypeColor(oleType);
|
|
2648
|
+
const shortLabel = chunkBXACB3BG_js.getOleBadgeLabel(oleType);
|
|
2649
2649
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", className: "absolute bottom-1 right-1 z-10", children: [
|
|
2650
2650
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "2", width: "20", height: "20", rx: "3", fill: color }),
|
|
2651
2651
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2737,11 +2737,11 @@ function InlineTextEditor({
|
|
|
2737
2737
|
mountedRef.current = true;
|
|
2738
2738
|
return;
|
|
2739
2739
|
}
|
|
2740
|
-
const pending =
|
|
2740
|
+
const pending = chunkBXACB3BG_js.getPendingSelectionRestore();
|
|
2741
2741
|
if (!pending || !editorRef.current) {
|
|
2742
2742
|
return;
|
|
2743
2743
|
}
|
|
2744
|
-
|
|
2744
|
+
chunkBXACB3BG_js.restoreSegmentSelection(
|
|
2745
2745
|
editorRef.current,
|
|
2746
2746
|
pending.startSegIdx,
|
|
2747
2747
|
pending.startOffset,
|
|
@@ -2749,8 +2749,8 @@ function InlineTextEditor({
|
|
|
2749
2749
|
pending.endOffset
|
|
2750
2750
|
);
|
|
2751
2751
|
});
|
|
2752
|
-
const warpStyle =
|
|
2753
|
-
const compensationTransform =
|
|
2752
|
+
const warpStyle = chunkLXUMBK2O_js.getTextWarpStyle(textStyleRaw);
|
|
2753
|
+
const compensationTransform = chunkBXACB3BG_js.getTextCompensationTransform(element);
|
|
2754
2754
|
const warpTransform = warpStyle?.transform;
|
|
2755
2755
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
2756
2756
|
const wrapperStyle = {
|
|
@@ -2825,7 +2825,7 @@ function InlineTextEditor({
|
|
|
2825
2825
|
const text = e.clipboardData.getData("text/plain");
|
|
2826
2826
|
document.execCommand("insertText", false, text);
|
|
2827
2827
|
},
|
|
2828
|
-
children: seed.hasRichSegments ?
|
|
2828
|
+
children: seed.hasRichSegments ? chunkLXUMBK2O_js.renderTextSegments(element, chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
2829
2829
|
}
|
|
2830
2830
|
);
|
|
2831
2831
|
}
|
|
@@ -2835,7 +2835,7 @@ function FailedToLoad() {
|
|
|
2835
2835
|
var LazyModel3DScene = React14__default.default.lazy(
|
|
2836
2836
|
async () => {
|
|
2837
2837
|
try {
|
|
2838
|
-
return await import('./Model3DScene-
|
|
2838
|
+
return await import('./Model3DScene-BLUWY36S.js');
|
|
2839
2839
|
} catch {
|
|
2840
2840
|
return { default: FailedToLoad };
|
|
2841
2841
|
}
|
|
@@ -2980,11 +2980,11 @@ function buildEmbedInfo(el) {
|
|
|
2980
2980
|
const canDownload = Boolean(el.oleEmbeddedData);
|
|
2981
2981
|
return {
|
|
2982
2982
|
fileName: el.oleEmbeddedFileName ?? el.fileName,
|
|
2983
|
-
readableSize:
|
|
2983
|
+
readableSize: chunkBXACB3BG_js.formatBytes(el.oleEmbeddedByteSize),
|
|
2984
2984
|
progId: el.oleProgId,
|
|
2985
|
-
typeLabel:
|
|
2985
|
+
typeLabel: chunkBXACB3BG_js.getOleTypeLabel(chunkBXACB3BG_js.resolveOleType(el)),
|
|
2986
2986
|
canDownload,
|
|
2987
|
-
canOpenInBrowser: canDownload &&
|
|
2987
|
+
canOpenInBrowser: canDownload && chunkBXACB3BG_js.isBrowserOpenableMime(el.oleEmbeddedMimeType)
|
|
2988
2988
|
};
|
|
2989
2989
|
}
|
|
2990
2990
|
function buildTooltip(info) {
|
|
@@ -3034,7 +3034,7 @@ function OleActionFooter({ el, info }) {
|
|
|
3034
3034
|
"button",
|
|
3035
3035
|
{
|
|
3036
3036
|
type: "button",
|
|
3037
|
-
onClick: () =>
|
|
3037
|
+
onClick: () => chunkBXACB3BG_js.openUrlInNewTab(el.oleEmbeddedData),
|
|
3038
3038
|
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",
|
|
3039
3039
|
title: `Open ${downloadName} in a new tab`,
|
|
3040
3040
|
children: t("pptx.ole.open")
|
|
@@ -3046,7 +3046,7 @@ function OleActionFooter({ el, info }) {
|
|
|
3046
3046
|
);
|
|
3047
3047
|
}
|
|
3048
3048
|
function OleRenderer({ element: el }) {
|
|
3049
|
-
const oleType =
|
|
3049
|
+
const oleType = chunkBXACB3BG_js.resolveOleType(el);
|
|
3050
3050
|
const ariaLabel = getOleAriaLabel(el);
|
|
3051
3051
|
const info = buildEmbedInfo(el);
|
|
3052
3052
|
const tooltip = buildTooltip(info);
|
|
@@ -3074,8 +3074,8 @@ function OleRenderer({ element: el }) {
|
|
|
3074
3074
|
}
|
|
3075
3075
|
);
|
|
3076
3076
|
}
|
|
3077
|
-
const color =
|
|
3078
|
-
const label =
|
|
3077
|
+
const color = chunkBXACB3BG_js.getOleTypeColor(oleType);
|
|
3078
|
+
const label = chunkBXACB3BG_js.getOleTypeLabel(oleType);
|
|
3079
3079
|
const displayName = info.fileName ?? label;
|
|
3080
3080
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3081
3081
|
"div",
|
|
@@ -3220,7 +3220,7 @@ function useSmartArtHoverState(containerRef) {
|
|
|
3220
3220
|
cancelPendingHide();
|
|
3221
3221
|
setHoveredNodeId(nodeEl.getAttribute(NODE_ID_ATTR));
|
|
3222
3222
|
setHoveredNodeRect(
|
|
3223
|
-
|
|
3223
|
+
chunkBXACB3BG_js.computeInlineEditorRect(
|
|
3224
3224
|
nodeEl.getBoundingClientRect(),
|
|
3225
3225
|
container.getBoundingClientRect()
|
|
3226
3226
|
)
|
|
@@ -3279,7 +3279,7 @@ function SmartArtEditableLayer({
|
|
|
3279
3279
|
const textRect = textEl?.getBoundingClientRect();
|
|
3280
3280
|
const hasTextRect = textRect !== void 0 && textRect.width > 0 && textRect.height > 0;
|
|
3281
3281
|
const sourceRect = hasTextRect ? textRect : nodeEl.getBoundingClientRect();
|
|
3282
|
-
const rect =
|
|
3282
|
+
const rect = chunkBXACB3BG_js.computeInlineEditorRect(sourceRect, container.getBoundingClientRect());
|
|
3283
3283
|
const paddedRect = {
|
|
3284
3284
|
left: rect.left - EDITOR_PADDING,
|
|
3285
3285
|
top: rect.top - EDITOR_PADDING,
|
|
@@ -3296,7 +3296,7 @@ function SmartArtEditableLayer({
|
|
|
3296
3296
|
if (!canEdit) {
|
|
3297
3297
|
return children;
|
|
3298
3298
|
}
|
|
3299
|
-
const initialText = edit ?
|
|
3299
|
+
const initialText = edit ? chunkBXACB3BG_js.findSmartArtNodeText(smartArtData, edit.nodeId) ?? "" : "";
|
|
3300
3300
|
const showStyleBar = !edit && hoveredNodeId !== null && hoveredNodeRect !== null && palette !== void 0 && onChangeNodeStyle !== void 0;
|
|
3301
3301
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3302
3302
|
"div",
|
|
@@ -3395,8 +3395,8 @@ function DrawingShapeRenderer({
|
|
|
3395
3395
|
}
|
|
3396
3396
|
const drawingW = maxX - minX || 1;
|
|
3397
3397
|
const drawingH = maxY - minY || 1;
|
|
3398
|
-
const shadow =
|
|
3399
|
-
const sw =
|
|
3398
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3399
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
3400
3400
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3401
3401
|
"svg",
|
|
3402
3402
|
{
|
|
@@ -3405,7 +3405,7 @@ function DrawingShapeRenderer({
|
|
|
3405
3405
|
preserveAspectRatio: "xMidYMid meet",
|
|
3406
3406
|
"data-testid": "smartart-drawing-shapes",
|
|
3407
3407
|
children: shapes.map((shape, i) => {
|
|
3408
|
-
const fill = shape.fillColor ??
|
|
3408
|
+
const fill = shape.fillColor ?? chunkLXUMBK2O_js.colour(i, palette);
|
|
3409
3409
|
const relX = shape.x - minX;
|
|
3410
3410
|
const relY = shape.y - minY;
|
|
3411
3411
|
const rx = shape.shapeType === "roundRect" ? Math.min(shape.width, shape.height) * 0.1 : 0;
|
|
@@ -3414,10 +3414,10 @@ function DrawingShapeRenderer({
|
|
|
3414
3414
|
const rotation = shape.rotation ? `rotate(${shape.rotation} ${relX + shape.width / 2} ${relY + shape.height / 2})` : void 0;
|
|
3415
3415
|
const strokeCol = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
|
|
3416
3416
|
const strokeW = shape.strokeWidth ?? sw;
|
|
3417
|
-
const fontSize = shape.fontSize ??
|
|
3418
|
-
const nodeId = nodes ?
|
|
3417
|
+
const fontSize = shape.fontSize ?? chunkLXUMBK2O_js.fitFontSize(shape.text ?? "", shape.width * 0.85, shape.height, 14);
|
|
3418
|
+
const nodeId = nodes ? chunkBXACB3BG_js.resolveDrawingShapeNodeId(shape, i, shapes, nodes) : void 0;
|
|
3419
3419
|
const nodeLabel = nodeId ? nodeLabels?.get(nodeId) : void 0;
|
|
3420
|
-
const groupProps = nodeId ?
|
|
3420
|
+
const groupProps = nodeId ? chunkLXUMBK2O_js.smartArtNodeGroupProps(nodeId, shadow, nodeLabel) : { style: { filter: shadow } };
|
|
3421
3421
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { ...groupProps, children: [
|
|
3422
3422
|
nodeLabel ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: nodeLabel }) : null,
|
|
3423
3423
|
isEllipse ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3435,7 +3435,7 @@ function DrawingShapeRenderer({
|
|
|
3435
3435
|
) : isChevron ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3436
3436
|
"polygon",
|
|
3437
3437
|
{
|
|
3438
|
-
points:
|
|
3438
|
+
points: chunkLXUMBK2O_js.chevronPoints(relX, relY, shape.width, shape.height),
|
|
3439
3439
|
fill,
|
|
3440
3440
|
stroke: strokeCol,
|
|
3441
3441
|
strokeWidth: strokeW,
|
|
@@ -3456,11 +3456,11 @@ function DrawingShapeRenderer({
|
|
|
3456
3456
|
}
|
|
3457
3457
|
),
|
|
3458
3458
|
shape.text ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3459
|
-
|
|
3459
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3460
3460
|
{
|
|
3461
3461
|
x: relX + shape.width / 2,
|
|
3462
3462
|
y: relY + shape.height / 2,
|
|
3463
|
-
text:
|
|
3463
|
+
text: chunkLXUMBK2O_js.truncate(shape.text, 40),
|
|
3464
3464
|
fill: shape.fontColor ?? "white",
|
|
3465
3465
|
fontSize,
|
|
3466
3466
|
className: "pointer-events-none"
|
|
@@ -3476,7 +3476,7 @@ function DrawingShapeRenderer({
|
|
|
3476
3476
|
function resolveNodeStyle(node, index, palette) {
|
|
3477
3477
|
const style = node.style;
|
|
3478
3478
|
return {
|
|
3479
|
-
fill: style?.fillColor ??
|
|
3479
|
+
fill: style?.fillColor ?? chunkLXUMBK2O_js.colour(index, palette),
|
|
3480
3480
|
fontColor: style?.fontColor ?? "white",
|
|
3481
3481
|
fontWeight: style?.bold ? 700 : void 0,
|
|
3482
3482
|
fontStyle: style?.italic ? "italic" : void 0,
|
|
@@ -3498,8 +3498,8 @@ function ListRenderer({
|
|
|
3498
3498
|
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3499
3499
|
const itemW = w - pad * 2;
|
|
3500
3500
|
const rx = Math.min(6, itemH * 0.15);
|
|
3501
|
-
const shadow =
|
|
3502
|
-
const sw =
|
|
3501
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3502
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
3503
3503
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3504
3504
|
"svg",
|
|
3505
3505
|
{
|
|
@@ -3509,13 +3509,13 @@ function ListRenderer({
|
|
|
3509
3509
|
"data-testid": "smartart-list",
|
|
3510
3510
|
children: nodes.map((node, i) => {
|
|
3511
3511
|
const y = pad + i * (itemH + gap);
|
|
3512
|
-
const fontSize =
|
|
3512
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, itemW * 0.9, itemH, 12);
|
|
3513
3513
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3514
3514
|
const label = nodeLabels?.get(node.id);
|
|
3515
3515
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3516
3516
|
"g",
|
|
3517
3517
|
{
|
|
3518
|
-
...
|
|
3518
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3519
3519
|
children: [
|
|
3520
3520
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3521
3521
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3527,17 +3527,17 @@ function ListRenderer({
|
|
|
3527
3527
|
height: itemH,
|
|
3528
3528
|
rx,
|
|
3529
3529
|
fill: ns.fill,
|
|
3530
|
-
opacity:
|
|
3530
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style),
|
|
3531
3531
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3532
3532
|
strokeWidth: sw
|
|
3533
3533
|
}
|
|
3534
3534
|
),
|
|
3535
3535
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3536
|
-
|
|
3536
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3537
3537
|
{
|
|
3538
3538
|
x: pad + itemW / 2,
|
|
3539
3539
|
y: y + itemH / 2,
|
|
3540
|
-
text:
|
|
3540
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 40),
|
|
3541
3541
|
fill: ns.fontColor,
|
|
3542
3542
|
fontWeight: ns.fontWeight,
|
|
3543
3543
|
fontStyle: ns.fontStyle,
|
|
@@ -3569,8 +3569,8 @@ function ProcessRenderer({
|
|
|
3569
3569
|
const itemW = (usableW - gap * (nodes.length - 1)) / nodes.length;
|
|
3570
3570
|
const itemH = Math.min(h - pad * 2, h * 0.6);
|
|
3571
3571
|
const yMid = h / 2;
|
|
3572
|
-
const shadow =
|
|
3573
|
-
const sw =
|
|
3572
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3573
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
3574
3574
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3575
3575
|
"svg",
|
|
3576
3576
|
{
|
|
@@ -3584,13 +3584,13 @@ function ProcessRenderer({
|
|
|
3584
3584
|
const isFirst = i === 0;
|
|
3585
3585
|
const isLast = i === nodes.length - 1;
|
|
3586
3586
|
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}`;
|
|
3587
|
-
const fontSize =
|
|
3587
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, itemW * 0.7, itemH, 12);
|
|
3588
3588
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3589
3589
|
const label = nodeLabels?.get(node.id);
|
|
3590
3590
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3591
3591
|
"g",
|
|
3592
3592
|
{
|
|
3593
|
-
...
|
|
3593
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3594
3594
|
children: [
|
|
3595
3595
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3596
3596
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3598,17 +3598,17 @@ function ProcessRenderer({
|
|
|
3598
3598
|
{
|
|
3599
3599
|
points,
|
|
3600
3600
|
fill: ns.fill,
|
|
3601
|
-
opacity:
|
|
3601
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style),
|
|
3602
3602
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3603
3603
|
strokeWidth: sw
|
|
3604
3604
|
}
|
|
3605
3605
|
),
|
|
3606
3606
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3607
|
-
|
|
3607
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3608
3608
|
{
|
|
3609
3609
|
x: x + itemW / 2,
|
|
3610
3610
|
y: yMid,
|
|
3611
|
-
text:
|
|
3611
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 25),
|
|
3612
3612
|
fill: ns.fontColor,
|
|
3613
3613
|
fontWeight: ns.fontWeight,
|
|
3614
3614
|
fontStyle: ns.fontStyle,
|
|
@@ -3638,8 +3638,8 @@ function CycleRenderer({
|
|
|
3638
3638
|
const cy = h / 2;
|
|
3639
3639
|
const radius = size * 0.35;
|
|
3640
3640
|
const nodeR = Math.max(size * 0.06, Math.min(size * 0.12, 200 / nodes.length));
|
|
3641
|
-
const shadow =
|
|
3642
|
-
const sw =
|
|
3641
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3642
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
3643
3643
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3644
3644
|
"svg",
|
|
3645
3645
|
{
|
|
@@ -3678,13 +3678,13 @@ function CycleRenderer({
|
|
|
3678
3678
|
const angle = i / nodes.length * Math.PI * 2 - Math.PI / 2;
|
|
3679
3679
|
const nx = cx + radius * Math.cos(angle);
|
|
3680
3680
|
const ny = cy + radius * Math.sin(angle);
|
|
3681
|
-
const fontSize =
|
|
3681
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, nodeR * 1.4, nodeR * 2, 11);
|
|
3682
3682
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3683
3683
|
const label = nodeLabels?.get(node.id);
|
|
3684
3684
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3685
3685
|
"g",
|
|
3686
3686
|
{
|
|
3687
|
-
...
|
|
3687
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3688
3688
|
children: [
|
|
3689
3689
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3690
3690
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3694,17 +3694,17 @@ function CycleRenderer({
|
|
|
3694
3694
|
cy: ny,
|
|
3695
3695
|
r: nodeR,
|
|
3696
3696
|
fill: ns.fill,
|
|
3697
|
-
opacity:
|
|
3697
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style),
|
|
3698
3698
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3699
3699
|
strokeWidth: sw
|
|
3700
3700
|
}
|
|
3701
3701
|
),
|
|
3702
3702
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3703
|
-
|
|
3703
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3704
3704
|
{
|
|
3705
3705
|
x: nx,
|
|
3706
3706
|
y: ny,
|
|
3707
|
-
text:
|
|
3707
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 20),
|
|
3708
3708
|
fill: ns.fontColor,
|
|
3709
3709
|
fontWeight: ns.fontWeight,
|
|
3710
3710
|
fontStyle: ns.fontStyle,
|
|
@@ -3739,8 +3739,8 @@ function MatrixRenderer({
|
|
|
3739
3739
|
const cellW = (usableW - gap * (cols - 1)) / cols;
|
|
3740
3740
|
const cellH = (usableH - gap * (rows - 1)) / rows;
|
|
3741
3741
|
const rx = Math.min(6, Math.min(cellW, cellH) * 0.1);
|
|
3742
|
-
const shadow =
|
|
3743
|
-
const sw =
|
|
3742
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3743
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
3744
3744
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3745
3745
|
"svg",
|
|
3746
3746
|
{
|
|
@@ -3753,13 +3753,13 @@ function MatrixRenderer({
|
|
|
3753
3753
|
const row = Math.floor(i / cols);
|
|
3754
3754
|
const x = pad + col * (cellW + gap);
|
|
3755
3755
|
const y = pad + row * (cellH + gap);
|
|
3756
|
-
const fontSize =
|
|
3756
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, cellW * 0.85, cellH, 12);
|
|
3757
3757
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3758
3758
|
const label = nodeLabels?.get(node.id);
|
|
3759
3759
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3760
3760
|
"g",
|
|
3761
3761
|
{
|
|
3762
|
-
...
|
|
3762
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3763
3763
|
children: [
|
|
3764
3764
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3765
3765
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3771,17 +3771,17 @@ function MatrixRenderer({
|
|
|
3771
3771
|
height: cellH,
|
|
3772
3772
|
rx,
|
|
3773
3773
|
fill: ns.fill,
|
|
3774
|
-
opacity:
|
|
3774
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style),
|
|
3775
3775
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3776
3776
|
strokeWidth: sw
|
|
3777
3777
|
}
|
|
3778
3778
|
),
|
|
3779
3779
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3780
|
-
|
|
3780
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3781
3781
|
{
|
|
3782
3782
|
x: x + cellW / 2,
|
|
3783
3783
|
y: y + cellH / 2,
|
|
3784
|
-
text:
|
|
3784
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 30),
|
|
3785
3785
|
fill: ns.fontColor,
|
|
3786
3786
|
fontWeight: ns.fontWeight ?? 500,
|
|
3787
3787
|
fontStyle: ns.fontStyle,
|
|
@@ -3810,8 +3810,8 @@ function PyramidRenderer({
|
|
|
3810
3810
|
const usableH = h - pad * 2;
|
|
3811
3811
|
const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3812
3812
|
const maxW = w - pad * 2;
|
|
3813
|
-
const shadow =
|
|
3814
|
-
const sw =
|
|
3813
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3814
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
3815
3815
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3816
3816
|
"svg",
|
|
3817
3817
|
{
|
|
@@ -3835,28 +3835,28 @@ function PyramidRenderer({
|
|
|
3835
3835
|
`${bottomRight},${y + bandH}`,
|
|
3836
3836
|
`${bottomLeft},${y + bandH}`
|
|
3837
3837
|
].join(" ");
|
|
3838
|
-
const fontSize =
|
|
3838
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, topW * 0.85, bandH, 12);
|
|
3839
3839
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3840
3840
|
"g",
|
|
3841
3841
|
{
|
|
3842
|
-
...
|
|
3842
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
3843
3843
|
children: [
|
|
3844
3844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3845
3845
|
"polygon",
|
|
3846
3846
|
{
|
|
3847
3847
|
points,
|
|
3848
|
-
fill:
|
|
3849
|
-
opacity:
|
|
3848
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
3849
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style),
|
|
3850
3850
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3851
3851
|
strokeWidth: sw
|
|
3852
3852
|
}
|
|
3853
3853
|
),
|
|
3854
3854
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3855
|
-
|
|
3855
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3856
3856
|
{
|
|
3857
3857
|
x: w / 2,
|
|
3858
3858
|
y: y + bandH / 2,
|
|
3859
|
-
text:
|
|
3859
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 30),
|
|
3860
3860
|
fill: "white",
|
|
3861
3861
|
fontSize,
|
|
3862
3862
|
className: "pointer-events-none"
|
|
@@ -3878,7 +3878,7 @@ function VennRenderer({
|
|
|
3878
3878
|
}) {
|
|
3879
3879
|
const w = element.width;
|
|
3880
3880
|
const h = element.height;
|
|
3881
|
-
const shadow =
|
|
3881
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3882
3882
|
if (nodes.length <= 4) {
|
|
3883
3883
|
const cx = w / 2;
|
|
3884
3884
|
const cy2 = h / 2;
|
|
@@ -3895,19 +3895,19 @@ function VennRenderer({
|
|
|
3895
3895
|
const angle = i / nodes.length * Math.PI * 2 - Math.PI / 2;
|
|
3896
3896
|
const nx = cx + spread * Math.cos(angle);
|
|
3897
3897
|
const ny = cy2 + spread * Math.sin(angle);
|
|
3898
|
-
const fontSize =
|
|
3898
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, r2 * 1.2, r2 * 2, 11);
|
|
3899
3899
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3900
3900
|
"g",
|
|
3901
3901
|
{
|
|
3902
|
-
...
|
|
3902
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
3903
3903
|
children: [
|
|
3904
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy: ny, r: r2, fill:
|
|
3904
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy: ny, r: r2, fill: chunkLXUMBK2O_js.colour(i, palette), opacity: 0.35 }),
|
|
3905
3905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3906
|
-
|
|
3906
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3907
3907
|
{
|
|
3908
3908
|
x: nx,
|
|
3909
3909
|
y: ny,
|
|
3910
|
-
text:
|
|
3910
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 20),
|
|
3911
3911
|
fill: "white",
|
|
3912
3912
|
fontSize,
|
|
3913
3913
|
fontWeight: "bold",
|
|
@@ -3936,19 +3936,19 @@ function VennRenderer({
|
|
|
3936
3936
|
"data-testid": "smartart-venn",
|
|
3937
3937
|
children: nodes.map((node, i) => {
|
|
3938
3938
|
const nx = offsetX + i * (r * 2 - overlap);
|
|
3939
|
-
const fontSize =
|
|
3939
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, r * 1.2, r * 2, 10);
|
|
3940
3940
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3941
3941
|
"g",
|
|
3942
3942
|
{
|
|
3943
|
-
...
|
|
3943
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
3944
3944
|
children: [
|
|
3945
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy, r, fill:
|
|
3945
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy, r, fill: chunkLXUMBK2O_js.colour(i, palette), opacity: 0.35 }),
|
|
3946
3946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3947
|
-
|
|
3947
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
3948
3948
|
{
|
|
3949
3949
|
x: nx,
|
|
3950
3950
|
y: cy,
|
|
3951
|
-
text:
|
|
3951
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 20),
|
|
3952
3952
|
fill: "white",
|
|
3953
3953
|
fontSize,
|
|
3954
3954
|
fontWeight: "bold",
|
|
@@ -3974,7 +3974,7 @@ function FunnelRenderer({
|
|
|
3974
3974
|
const pad = 8;
|
|
3975
3975
|
const usableW = w - pad * 2;
|
|
3976
3976
|
const stageH = (h - pad * 2) / nodes.length;
|
|
3977
|
-
const shadow =
|
|
3977
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
3978
3978
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3979
3979
|
"svg",
|
|
3980
3980
|
{
|
|
@@ -3996,26 +3996,26 @@ function FunnelRenderer({
|
|
|
3996
3996
|
`${bottomRight},${y + stageH}`,
|
|
3997
3997
|
`${bottomLeft},${y + stageH}`
|
|
3998
3998
|
].join(" ");
|
|
3999
|
-
const fontSize =
|
|
3999
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, topWidth * 0.85, stageH, 11);
|
|
4000
4000
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4001
4001
|
"g",
|
|
4002
4002
|
{
|
|
4003
|
-
...
|
|
4003
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4004
4004
|
children: [
|
|
4005
4005
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4006
4006
|
"polygon",
|
|
4007
4007
|
{
|
|
4008
4008
|
points,
|
|
4009
|
-
fill:
|
|
4010
|
-
opacity:
|
|
4009
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4010
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style)
|
|
4011
4011
|
}
|
|
4012
4012
|
),
|
|
4013
4013
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4014
|
-
|
|
4014
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
4015
4015
|
{
|
|
4016
4016
|
x: w / 2,
|
|
4017
4017
|
y: y + stageH / 2,
|
|
4018
|
-
text:
|
|
4018
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 30),
|
|
4019
4019
|
fill: "white",
|
|
4020
4020
|
fontSize,
|
|
4021
4021
|
className: "pointer-events-none"
|
|
@@ -4042,7 +4042,7 @@ function TargetRenderer({
|
|
|
4042
4042
|
const maxR = Math.min(cx - 8, cy - 8);
|
|
4043
4043
|
const fontSize = Math.max(7, Math.min(10, maxR / (nodes.length + 1)));
|
|
4044
4044
|
const labelX = cx + maxR + 8;
|
|
4045
|
-
const shadow =
|
|
4045
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
4046
4046
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4047
4047
|
"svg",
|
|
4048
4048
|
{
|
|
@@ -4055,7 +4055,7 @@ function TargetRenderer({
|
|
|
4055
4055
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4056
4056
|
"g",
|
|
4057
4057
|
{
|
|
4058
|
-
...
|
|
4058
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4059
4059
|
children: [
|
|
4060
4060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4061
4061
|
"circle",
|
|
@@ -4063,8 +4063,8 @@ function TargetRenderer({
|
|
|
4063
4063
|
cx,
|
|
4064
4064
|
cy,
|
|
4065
4065
|
r: Math.max(r, 4),
|
|
4066
|
-
fill:
|
|
4067
|
-
opacity:
|
|
4066
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4067
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style)
|
|
4068
4068
|
}
|
|
4069
4069
|
),
|
|
4070
4070
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4074,7 +4074,7 @@ function TargetRenderer({
|
|
|
4074
4074
|
y1: cy,
|
|
4075
4075
|
x2: labelX - 2,
|
|
4076
4076
|
y2: 8 + i * (fontSize + 6),
|
|
4077
|
-
stroke:
|
|
4077
|
+
stroke: chunkLXUMBK2O_js.colour(i, palette),
|
|
4078
4078
|
strokeWidth: 1,
|
|
4079
4079
|
opacity: 0.6
|
|
4080
4080
|
}
|
|
@@ -4086,10 +4086,10 @@ function TargetRenderer({
|
|
|
4086
4086
|
y: 8 + i * (fontSize + 6) + fontSize / 2,
|
|
4087
4087
|
textAnchor: "start",
|
|
4088
4088
|
dominantBaseline: "central",
|
|
4089
|
-
fill:
|
|
4089
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4090
4090
|
fontSize,
|
|
4091
4091
|
className: "pointer-events-none",
|
|
4092
|
-
children:
|
|
4092
|
+
children: chunkLXUMBK2O_js.truncate(node.text, 30)
|
|
4093
4093
|
}
|
|
4094
4094
|
)
|
|
4095
4095
|
]
|
|
@@ -4106,12 +4106,12 @@ function HierarchyRenderer({
|
|
|
4106
4106
|
palette,
|
|
4107
4107
|
style
|
|
4108
4108
|
}) {
|
|
4109
|
-
const roots =
|
|
4109
|
+
const roots = chunkLXUMBK2O_js.buildTree(nodes);
|
|
4110
4110
|
if (roots.length === 0) {
|
|
4111
4111
|
return /* @__PURE__ */ jsxRuntime.jsx(ListRenderer, { element, nodes, palette, style });
|
|
4112
4112
|
}
|
|
4113
|
-
const totalLeaves = roots.reduce((s, r) => s +
|
|
4114
|
-
const depth = Math.max(...roots.map(
|
|
4113
|
+
const totalLeaves = roots.reduce((s, r) => s + chunkLXUMBK2O_js.treeWidth(r), 0);
|
|
4114
|
+
const depth = Math.max(...roots.map(chunkLXUMBK2O_js.treeDepth));
|
|
4115
4115
|
const svgW = element.width;
|
|
4116
4116
|
const svgH = element.height;
|
|
4117
4117
|
const cellW = svgW / totalLeaves;
|
|
@@ -4119,24 +4119,24 @@ function HierarchyRenderer({
|
|
|
4119
4119
|
const boxW = Math.min(cellW * 0.8, 140);
|
|
4120
4120
|
const boxH = Math.min(cellH * 0.4, 36);
|
|
4121
4121
|
const rx = Math.min(6, boxH * 0.15);
|
|
4122
|
-
const shadow =
|
|
4123
|
-
const sw =
|
|
4122
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
4123
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
4124
4124
|
const elements = [];
|
|
4125
4125
|
let colourIdx = 0;
|
|
4126
4126
|
function renderTreeNode(t, xOffset, level) {
|
|
4127
|
-
const w =
|
|
4127
|
+
const w = chunkLXUMBK2O_js.treeWidth(t);
|
|
4128
4128
|
const nodeCx = (xOffset + w / 2) * cellW;
|
|
4129
4129
|
const nodeCy = level * cellH + cellH / 2;
|
|
4130
4130
|
const ci = colourIdx++;
|
|
4131
|
-
const fontSize =
|
|
4131
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(t.node.text, boxW * 0.9, boxH, 11);
|
|
4132
4132
|
for (const child of t.children) {
|
|
4133
|
-
const childW =
|
|
4133
|
+
const childW = chunkLXUMBK2O_js.treeWidth(child);
|
|
4134
4134
|
let childOffset2 = xOffset;
|
|
4135
4135
|
for (const c of t.children) {
|
|
4136
4136
|
if (c === child) {
|
|
4137
4137
|
break;
|
|
4138
4138
|
}
|
|
4139
|
-
childOffset2 +=
|
|
4139
|
+
childOffset2 += chunkLXUMBK2O_js.treeWidth(c);
|
|
4140
4140
|
}
|
|
4141
4141
|
const childCx = (childOffset2 + childW / 2) * cellW;
|
|
4142
4142
|
const childCy = (level + 1) * cellH + cellH / 2;
|
|
@@ -4159,7 +4159,7 @@ function HierarchyRenderer({
|
|
|
4159
4159
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4160
4160
|
"g",
|
|
4161
4161
|
{
|
|
4162
|
-
...
|
|
4162
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(t.node.id, shadow),
|
|
4163
4163
|
children: [
|
|
4164
4164
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4165
4165
|
"rect",
|
|
@@ -4169,18 +4169,18 @@ function HierarchyRenderer({
|
|
|
4169
4169
|
width: boxW,
|
|
4170
4170
|
height: boxH,
|
|
4171
4171
|
rx,
|
|
4172
|
-
fill:
|
|
4173
|
-
opacity:
|
|
4172
|
+
fill: chunkLXUMBK2O_js.colour(ci, palette),
|
|
4173
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(ci, nodes.length, style),
|
|
4174
4174
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
4175
4175
|
strokeWidth: sw
|
|
4176
4176
|
}
|
|
4177
4177
|
),
|
|
4178
4178
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4179
|
-
|
|
4179
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
4180
4180
|
{
|
|
4181
4181
|
x: nodeCx,
|
|
4182
4182
|
y: nodeCy,
|
|
4183
|
-
text:
|
|
4183
|
+
text: chunkLXUMBK2O_js.truncate(t.node.text, 40),
|
|
4184
4184
|
fill: "white",
|
|
4185
4185
|
fontSize,
|
|
4186
4186
|
className: "pointer-events-none"
|
|
@@ -4194,7 +4194,7 @@ function HierarchyRenderer({
|
|
|
4194
4194
|
let childOffset = xOffset;
|
|
4195
4195
|
for (const child of t.children) {
|
|
4196
4196
|
renderTreeNode(child, childOffset, level + 1);
|
|
4197
|
-
childOffset +=
|
|
4197
|
+
childOffset += chunkLXUMBK2O_js.treeWidth(child);
|
|
4198
4198
|
}
|
|
4199
4199
|
return w;
|
|
4200
4200
|
}
|
|
@@ -4229,7 +4229,7 @@ function GearRenderer({
|
|
|
4229
4229
|
const gearR = Math.min(spacing * 0.4, h * 0.35);
|
|
4230
4230
|
const innerR = gearR * 0.7;
|
|
4231
4231
|
const teethCount = 8;
|
|
4232
|
-
const shadow =
|
|
4232
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
4233
4233
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4234
4234
|
"svg",
|
|
4235
4235
|
{
|
|
@@ -4241,27 +4241,27 @@ function GearRenderer({
|
|
|
4241
4241
|
gearNodes.map((node, i) => {
|
|
4242
4242
|
const gx = spacing * (i + 1);
|
|
4243
4243
|
const gy = h / 2 + (i % 2 === 0 ? 0 : gearR * 0.35);
|
|
4244
|
-
const fontSize =
|
|
4244
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, innerR * 1.2, innerR * 2, 11);
|
|
4245
4245
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4246
4246
|
"g",
|
|
4247
4247
|
{
|
|
4248
|
-
...
|
|
4248
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4249
4249
|
children: [
|
|
4250
4250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4251
4251
|
"path",
|
|
4252
4252
|
{
|
|
4253
|
-
d:
|
|
4254
|
-
fill:
|
|
4255
|
-
opacity:
|
|
4253
|
+
d: chunkLXUMBK2O_js.gearPath(gx, gy, gearR, innerR, teethCount),
|
|
4254
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4255
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style)
|
|
4256
4256
|
}
|
|
4257
4257
|
),
|
|
4258
4258
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: gx, cy: gy, r: innerR * 0.5, fill: "white", opacity: 0.25 }),
|
|
4259
4259
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4260
|
-
|
|
4260
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
4261
4261
|
{
|
|
4262
4262
|
x: gx,
|
|
4263
4263
|
y: gy,
|
|
4264
|
-
text:
|
|
4264
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 20),
|
|
4265
4265
|
fill: "white",
|
|
4266
4266
|
fontSize,
|
|
4267
4267
|
fontWeight: "bold",
|
|
@@ -4283,8 +4283,8 @@ function GearRenderer({
|
|
|
4283
4283
|
cx: lx,
|
|
4284
4284
|
cy: ly,
|
|
4285
4285
|
r: 3,
|
|
4286
|
-
fill:
|
|
4287
|
-
opacity:
|
|
4286
|
+
fill: chunkLXUMBK2O_js.colour(gearCount + i, palette),
|
|
4287
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(gearCount + i, nodes.length, style)
|
|
4288
4288
|
}
|
|
4289
4289
|
),
|
|
4290
4290
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4294,10 +4294,10 @@ function GearRenderer({
|
|
|
4294
4294
|
y: ly,
|
|
4295
4295
|
textAnchor: "start",
|
|
4296
4296
|
dominantBaseline: "central",
|
|
4297
|
-
fill:
|
|
4297
|
+
fill: chunkLXUMBK2O_js.colour(gearCount + i, palette),
|
|
4298
4298
|
fontSize: 10,
|
|
4299
4299
|
className: "pointer-events-none",
|
|
4300
|
-
children:
|
|
4300
|
+
children: chunkLXUMBK2O_js.truncate(node.text, 30)
|
|
4301
4301
|
}
|
|
4302
4302
|
)
|
|
4303
4303
|
] }, `${element.id}-gear-extra-${node.id}-${i}`);
|
|
@@ -4321,7 +4321,7 @@ function TimelineRenderer({
|
|
|
4321
4321
|
const lineLen = lineEndX - lineStartX;
|
|
4322
4322
|
const dotR = Math.max(4, Math.min(8, lineLen / (nodes.length * 4)));
|
|
4323
4323
|
const labelOffset = Math.min(h * 0.28, 40);
|
|
4324
|
-
const shadow =
|
|
4324
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
4325
4325
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4326
4326
|
"svg",
|
|
4327
4327
|
{
|
|
@@ -4343,11 +4343,11 @@ function TimelineRenderer({
|
|
|
4343
4343
|
const above = i % 2 === 0;
|
|
4344
4344
|
const textY = above ? lineY - labelOffset : lineY + labelOffset;
|
|
4345
4345
|
const stemEndY = above ? lineY - dotR - 2 : lineY + dotR + 2;
|
|
4346
|
-
const fontSize =
|
|
4346
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, lineLen / nodes.length * 0.9, labelOffset, 10);
|
|
4347
4347
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4348
4348
|
"g",
|
|
4349
4349
|
{
|
|
4350
|
-
...
|
|
4350
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4351
4351
|
children: [
|
|
4352
4352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4353
4353
|
"line",
|
|
@@ -4356,7 +4356,7 @@ function TimelineRenderer({
|
|
|
4356
4356
|
y1: stemEndY,
|
|
4357
4357
|
x2: x,
|
|
4358
4358
|
y2: textY + (above ? fontSize : -fontSize),
|
|
4359
|
-
stroke:
|
|
4359
|
+
stroke: chunkLXUMBK2O_js.colour(i, palette),
|
|
4360
4360
|
strokeWidth: 1,
|
|
4361
4361
|
opacity: 0.5
|
|
4362
4362
|
}
|
|
@@ -4367,17 +4367,17 @@ function TimelineRenderer({
|
|
|
4367
4367
|
cx: x,
|
|
4368
4368
|
cy: lineY,
|
|
4369
4369
|
r: dotR,
|
|
4370
|
-
fill:
|
|
4371
|
-
opacity:
|
|
4370
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4371
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style)
|
|
4372
4372
|
}
|
|
4373
4373
|
),
|
|
4374
4374
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4375
|
-
|
|
4375
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
4376
4376
|
{
|
|
4377
|
-
text:
|
|
4377
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 20) ?? "",
|
|
4378
4378
|
x,
|
|
4379
4379
|
y: textY,
|
|
4380
|
-
fill:
|
|
4380
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4381
4381
|
fontSize,
|
|
4382
4382
|
anchor: above ? "bottom" : "top",
|
|
4383
4383
|
className: "pointer-events-none"
|
|
@@ -4410,8 +4410,8 @@ function BendingProcessRenderer({
|
|
|
4410
4410
|
const boxH = Math.min(cellH * 0.6, 32);
|
|
4411
4411
|
const rx = Math.min(5, boxH * 0.15);
|
|
4412
4412
|
const arrowSize = 6;
|
|
4413
|
-
const shadow =
|
|
4414
|
-
const sw =
|
|
4413
|
+
const shadow = chunkLXUMBK2O_js.styleShadow(style);
|
|
4414
|
+
const sw = chunkLXUMBK2O_js.styleStroke(style);
|
|
4415
4415
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4416
4416
|
"svg",
|
|
4417
4417
|
{
|
|
@@ -4425,7 +4425,7 @@ function BendingProcessRenderer({
|
|
|
4425
4425
|
const col = row % 2 === 0 ? colInRow : COLS - 1 - colInRow;
|
|
4426
4426
|
const nodeCx = padX + col * cellW + cellW / 2;
|
|
4427
4427
|
const nodeCy = padY + row * cellH + cellH / 2;
|
|
4428
|
-
const fontSize =
|
|
4428
|
+
const fontSize = chunkLXUMBK2O_js.fitFontSize(node.text, boxW * 0.85, boxH, 10);
|
|
4429
4429
|
let arrow = null;
|
|
4430
4430
|
if (i < nodes.length - 1) {
|
|
4431
4431
|
const nextRow = Math.floor((i + 1) / COLS);
|
|
@@ -4485,7 +4485,7 @@ function BendingProcessRenderer({
|
|
|
4485
4485
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4486
4486
|
"g",
|
|
4487
4487
|
{
|
|
4488
|
-
...
|
|
4488
|
+
...chunkLXUMBK2O_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4489
4489
|
children: [
|
|
4490
4490
|
arrow,
|
|
4491
4491
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4496,18 +4496,18 @@ function BendingProcessRenderer({
|
|
|
4496
4496
|
width: boxW,
|
|
4497
4497
|
height: boxH,
|
|
4498
4498
|
rx,
|
|
4499
|
-
fill:
|
|
4500
|
-
opacity:
|
|
4499
|
+
fill: chunkLXUMBK2O_js.colour(i, palette),
|
|
4500
|
+
opacity: chunkLXUMBK2O_js.nodeOpacity(i, nodes.length, style),
|
|
4501
4501
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
4502
4502
|
strokeWidth: sw
|
|
4503
4503
|
}
|
|
4504
4504
|
),
|
|
4505
4505
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4506
|
-
|
|
4506
|
+
chunkLXUMBK2O_js.SmartArtNodeText,
|
|
4507
4507
|
{
|
|
4508
4508
|
x: nodeCx,
|
|
4509
4509
|
y: nodeCy,
|
|
4510
|
-
text:
|
|
4510
|
+
text: chunkLXUMBK2O_js.truncate(node.text, 20),
|
|
4511
4511
|
fill: "white",
|
|
4512
4512
|
fontSize,
|
|
4513
4513
|
className: "pointer-events-none"
|
|
@@ -4548,21 +4548,21 @@ function SmartArtRendererImpl({
|
|
|
4548
4548
|
}
|
|
4549
4549
|
);
|
|
4550
4550
|
}
|
|
4551
|
-
const palette =
|
|
4552
|
-
const style =
|
|
4553
|
-
const a11y =
|
|
4551
|
+
const palette = chunkLXUMBK2O_js.resolvePalette(element);
|
|
4552
|
+
const style = chunkLXUMBK2O_js.resolveStyle(element);
|
|
4553
|
+
const a11y = chunkBXACB3BG_js.buildSmartArtA11y(smartArtData);
|
|
4554
4554
|
const nodeLabels = new Map(a11y.nodes.map((n) => [n.id, n.label]));
|
|
4555
4555
|
const editable = canEdit && Boolean(onUpdateElement);
|
|
4556
4556
|
const handleCommitNodeText = (nodeId, text) => {
|
|
4557
|
-
if (!onUpdateElement || !
|
|
4557
|
+
if (!onUpdateElement || !chunkBXACB3BG_js.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
4558
4558
|
return;
|
|
4559
4559
|
}
|
|
4560
4560
|
const updated = chunkAD3EAEY6_js.updateSmartArtNodeText(smartArtData, nodeId, text);
|
|
4561
4561
|
const box = { width: element.width, height: element.height };
|
|
4562
|
-
const reflowed =
|
|
4562
|
+
const reflowed = chunkBXACB3BG_js.rebuildDrawingShapesIfCleared(
|
|
4563
4563
|
updated,
|
|
4564
4564
|
smartArtData.layout,
|
|
4565
|
-
|
|
4565
|
+
chunkLXUMBK2O_js.resolveSmartArtDataPalette(updated),
|
|
4566
4566
|
style,
|
|
4567
4567
|
element.id,
|
|
4568
4568
|
box
|
|
@@ -4576,10 +4576,10 @@ function SmartArtRendererImpl({
|
|
|
4576
4576
|
const next = chunkAD3EAEY6_js.setSmartArtNodeStyle(smartArtData, nodeId, { fillColor: fill });
|
|
4577
4577
|
if (next !== smartArtData) {
|
|
4578
4578
|
const box = { width: element.width, height: element.height };
|
|
4579
|
-
const reflowed =
|
|
4579
|
+
const reflowed = chunkBXACB3BG_js.rebuildDrawingShapesIfCleared(
|
|
4580
4580
|
next,
|
|
4581
4581
|
smartArtData.layout,
|
|
4582
|
-
|
|
4582
|
+
chunkLXUMBK2O_js.resolveSmartArtDataPalette(next),
|
|
4583
4583
|
style,
|
|
4584
4584
|
element.id,
|
|
4585
4585
|
box
|
|
@@ -4602,7 +4602,7 @@ function SmartArtRendererImpl({
|
|
|
4602
4602
|
);
|
|
4603
4603
|
} else {
|
|
4604
4604
|
const namedLayout = smartArtData.layout;
|
|
4605
|
-
const layoutType = namedLayout ?
|
|
4605
|
+
const layoutType = namedLayout ? chunkLXUMBK2O_js.layoutToCategory(namedLayout) : (smartArtData.resolvedLayoutType ?? smartArtData.layoutType ?? "list").toLowerCase();
|
|
4606
4606
|
content = renderLayout(layoutType, element, nodes, palette, style, nodeLabels);
|
|
4607
4607
|
}
|
|
4608
4608
|
const body = editable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4616,7 +4616,7 @@ function SmartArtRendererImpl({
|
|
|
4616
4616
|
children: content
|
|
4617
4617
|
}
|
|
4618
4618
|
) : content;
|
|
4619
|
-
return
|
|
4619
|
+
return chunkLXUMBK2O_js.wrapChrome(chrome, body, className, { role: a11y.role, label: a11y.label });
|
|
4620
4620
|
}
|
|
4621
4621
|
function renderLayout(layoutType, element, nodes, palette, style, nodeLabels) {
|
|
4622
4622
|
if (layoutType.includes("hierarchy") || layoutType.includes("org")) {
|
|
@@ -4680,34 +4680,34 @@ function renderLayout(layoutType, element, nodes, palette, style, nodeLabels) {
|
|
|
4680
4680
|
return /* @__PURE__ */ jsxRuntime.jsx(BendingProcessRenderer, { element, nodes, palette, style });
|
|
4681
4681
|
}
|
|
4682
4682
|
if (layoutType.includes("stepdown")) {
|
|
4683
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4683
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderStepDownProcess(element, nodes, palette, style) });
|
|
4684
4684
|
}
|
|
4685
4685
|
if (layoutType.includes("alternatingflow") || layoutType.includes("alternating")) {
|
|
4686
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4686
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderAlternatingFlow(element, nodes, palette, style) });
|
|
4687
4687
|
}
|
|
4688
4688
|
if (layoutType.includes("descending")) {
|
|
4689
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4689
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderDescendingProcess(element, nodes, palette, style) });
|
|
4690
4690
|
}
|
|
4691
4691
|
if (layoutType.includes("pictureaccent")) {
|
|
4692
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4692
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderPictureAccentList(element, nodes, palette, style) });
|
|
4693
4693
|
}
|
|
4694
4694
|
if (layoutType.includes("verticalblock")) {
|
|
4695
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4695
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderVerticalBlockList(element, nodes, palette, style) });
|
|
4696
4696
|
}
|
|
4697
4697
|
if (layoutType.includes("grouped")) {
|
|
4698
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4698
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderGroupedList(element, nodes, palette, style) });
|
|
4699
4699
|
}
|
|
4700
4700
|
if (layoutType.includes("pyramidlist")) {
|
|
4701
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4701
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderPyramidList(element, nodes, palette, style) });
|
|
4702
4702
|
}
|
|
4703
4703
|
if (layoutType.includes("horizontalpicture")) {
|
|
4704
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4704
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderHorizontalPictureList(element, nodes, palette, style) });
|
|
4705
4705
|
}
|
|
4706
4706
|
if (layoutType.includes("accentprocess")) {
|
|
4707
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4707
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderAccentProcess(element, nodes, palette, style) });
|
|
4708
4708
|
}
|
|
4709
4709
|
if (layoutType.includes("verticalchevron")) {
|
|
4710
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4710
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkLXUMBK2O_js.renderVerticalChevronList(element, nodes, palette, style) });
|
|
4711
4711
|
}
|
|
4712
4712
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4713
4713
|
ListRenderer,
|
|
@@ -4806,9 +4806,9 @@ function SmartArt3DRenderer({
|
|
|
4806
4806
|
if (nodes.length === 0) {
|
|
4807
4807
|
return null;
|
|
4808
4808
|
}
|
|
4809
|
-
const palette =
|
|
4810
|
-
const style =
|
|
4811
|
-
const layoutResult =
|
|
4809
|
+
const palette = chunkLXUMBK2O_js.resolvePalette(element);
|
|
4810
|
+
const style = chunkLXUMBK2O_js.resolveStyle(element);
|
|
4811
|
+
const layoutResult = chunkBXACB3BG_js.computeSmartArtLayout(
|
|
4812
4812
|
nodes,
|
|
4813
4813
|
{ width: element.width, height: element.height },
|
|
4814
4814
|
palette,
|
|
@@ -4817,7 +4817,7 @@ function SmartArt3DRenderer({
|
|
|
4817
4817
|
resolvedLayoutType,
|
|
4818
4818
|
layout
|
|
4819
4819
|
);
|
|
4820
|
-
return
|
|
4820
|
+
return chunkBXACB3BG_js.buildSmartArt3DModel(layoutResult, {
|
|
4821
4821
|
background: chrome?.backgroundColor,
|
|
4822
4822
|
spatial: true
|
|
4823
4823
|
});
|
|
@@ -4844,7 +4844,7 @@ function SmartArt3DRenderer({
|
|
|
4844
4844
|
return sceneNode;
|
|
4845
4845
|
}
|
|
4846
4846
|
const handleCommitNodeText = (nodeId, text) => {
|
|
4847
|
-
if (!
|
|
4847
|
+
if (!chunkBXACB3BG_js.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
4848
4848
|
return;
|
|
4849
4849
|
}
|
|
4850
4850
|
onUpdateElement({
|
|
@@ -4893,11 +4893,11 @@ function SmartArtElement({
|
|
|
4893
4893
|
);
|
|
4894
4894
|
}
|
|
4895
4895
|
function groupIntoParagraphs2(element, fieldContext) {
|
|
4896
|
-
return
|
|
4896
|
+
return chunkBXACB3BG_js.groupIntoParagraphs(
|
|
4897
4897
|
element,
|
|
4898
4898
|
fieldContext ? (seg) => {
|
|
4899
4899
|
if (seg.fieldType) {
|
|
4900
|
-
const substituted =
|
|
4900
|
+
const substituted = chunkBXACB3BG_js.substituteFieldText(seg.text, seg.fieldType, fieldContext);
|
|
4901
4901
|
if (substituted !== seg.text) {
|
|
4902
4902
|
return { ...seg, text: substituted };
|
|
4903
4903
|
}
|
|
@@ -4927,13 +4927,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
4927
4927
|
if (s.strikethrough) {
|
|
4928
4928
|
decos.push("line-through");
|
|
4929
4929
|
}
|
|
4930
|
-
const fill = s.hyperlink ?
|
|
4930
|
+
const fill = s.hyperlink ? chunkBXACB3BG_js.normalizeHexColor(s.color || element.textStyle?.color, chunkLXUMBK2O_js.HYPERLINK_COLOR) : chunkBXACB3BG_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
4931
4931
|
return {
|
|
4932
4932
|
fill,
|
|
4933
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
4933
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkLXUMBK2O_js.DEFAULT_TEXT_FONT_SIZE,
|
|
4934
4934
|
fontWeight: s.bold ? 700 : 400,
|
|
4935
4935
|
fontStyle: s.italic ? "italic" : void 0,
|
|
4936
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") :
|
|
4936
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunkLXUMBK2O_js.DEFAULT_FONT_FAMILY,
|
|
4937
4937
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
4938
4938
|
};
|
|
4939
4939
|
}
|
|
@@ -4949,7 +4949,7 @@ function WarpedText({
|
|
|
4949
4949
|
}
|
|
4950
4950
|
const textEl = element;
|
|
4951
4951
|
const preset = textEl.textStyle?.textWarpPreset;
|
|
4952
|
-
if (!preset || !
|
|
4952
|
+
if (!preset || !chunkBXACB3BG_js.shouldUseSvgWarp(preset)) {
|
|
4953
4953
|
return null;
|
|
4954
4954
|
}
|
|
4955
4955
|
const paragraphs = groupIntoParagraphs2(textEl, fieldContext);
|
|
@@ -4962,9 +4962,9 @@ function WarpedText({
|
|
|
4962
4962
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
4963
4963
|
const align = textEl.textStyle?.align ?? "center";
|
|
4964
4964
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
4965
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
4966
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(textEl.textStyle.fontFamily) :
|
|
4967
|
-
const baseFill =
|
|
4965
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkLXUMBK2O_js.DEFAULT_TEXT_FONT_SIZE;
|
|
4966
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkLXUMBK2O_js.DEFAULT_FONT_FAMILY;
|
|
4967
|
+
const baseFill = chunkBXACB3BG_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
4968
4968
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4969
4969
|
"svg",
|
|
4970
4970
|
{
|
|
@@ -4984,7 +4984,7 @@ function WarpedText({
|
|
|
4984
4984
|
"path",
|
|
4985
4985
|
{
|
|
4986
4986
|
id: `${pathIdPrefix}-${i}`,
|
|
4987
|
-
d:
|
|
4987
|
+
d: chunkBXACB3BG_js.getWarpPath(preset, width, height, i, lineCount, warpAdj, warpAdj2),
|
|
4988
4988
|
fill: "none"
|
|
4989
4989
|
},
|
|
4990
4990
|
`${pathIdPrefix}-def-${i}`
|
|
@@ -5021,7 +5021,7 @@ function WarpedText({
|
|
|
5021
5021
|
);
|
|
5022
5022
|
}
|
|
5023
5023
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
5024
|
-
|
|
5024
|
+
chunkBXACB3BG_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
5025
5025
|
);
|
|
5026
5026
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
5027
5027
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -5089,11 +5089,11 @@ function renderTextElementBody(options) {
|
|
|
5089
5089
|
} = options;
|
|
5090
5090
|
const isLinkedTextBox = chunkAD3EAEY6_js.hasTextProperties(el) && el.linkedTxbxId !== void 0;
|
|
5091
5091
|
const linkedSegments = isLinkedTextBox && slideElements ? chunkAD3EAEY6_js.getLinkedTextBoxSegments(el, slideElements) : void 0;
|
|
5092
|
-
const useSvgWarp =
|
|
5092
|
+
const useSvgWarp = chunkBXACB3BG_js.shouldUseSvgWarp(
|
|
5093
5093
|
chunkAD3EAEY6_js.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
|
|
5094
5094
|
);
|
|
5095
|
-
const scene3dStyle = chunkAD3EAEY6_js.hasTextProperties(el) ?
|
|
5096
|
-
const composedTransform = [
|
|
5095
|
+
const scene3dStyle = chunkAD3EAEY6_js.hasTextProperties(el) ? chunkLXUMBK2O_js.buildTextBody3DSceneStyle(el.textStyle) : void 0;
|
|
5096
|
+
const composedTransform = [chunkBXACB3BG_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
5097
5097
|
const transformStyle = {
|
|
5098
5098
|
transform: composedTransform,
|
|
5099
5099
|
transformOrigin: "center",
|
|
@@ -5109,18 +5109,18 @@ function renderTextElementBody(options) {
|
|
|
5109
5109
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5110
5110
|
"div",
|
|
5111
5111
|
{
|
|
5112
|
-
className:
|
|
5112
|
+
className: chunkLXUMBK2O_js.cn(
|
|
5113
5113
|
"relative z-10 w-full h-full",
|
|
5114
5114
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
5115
5115
|
),
|
|
5116
|
-
style: { ...
|
|
5116
|
+
style: { ...chunkLXUMBK2O_js.getTextLayoutStyle(el), ...transformStyle },
|
|
5117
5117
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5118
5118
|
WarpedText,
|
|
5119
5119
|
{
|
|
5120
5120
|
element: el,
|
|
5121
5121
|
width: el.width,
|
|
5122
5122
|
height: el.height,
|
|
5123
|
-
fallbackColor:
|
|
5123
|
+
fallbackColor: chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR,
|
|
5124
5124
|
findHighlights: findHl,
|
|
5125
5125
|
fieldContext
|
|
5126
5126
|
}
|
|
@@ -5129,19 +5129,19 @@ function renderTextElementBody(options) {
|
|
|
5129
5129
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5130
5130
|
"div",
|
|
5131
5131
|
{
|
|
5132
|
-
className:
|
|
5132
|
+
className: chunkLXUMBK2O_js.cn(
|
|
5133
5133
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
5134
5134
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
5135
5135
|
),
|
|
5136
5136
|
style: {
|
|
5137
|
-
...
|
|
5137
|
+
...chunkLXUMBK2O_js.getTextLayoutStyle(el),
|
|
5138
5138
|
...txtS,
|
|
5139
|
-
...
|
|
5139
|
+
...chunkLXUMBK2O_js.getTextWarpStyle(txtSE),
|
|
5140
5140
|
...transformStyle
|
|
5141
5141
|
},
|
|
5142
|
-
children:
|
|
5142
|
+
children: chunkLXUMBK2O_js.renderTextSegments(
|
|
5143
5143
|
el,
|
|
5144
|
-
|
|
5144
|
+
chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR,
|
|
5145
5145
|
void 0,
|
|
5146
5146
|
findHl,
|
|
5147
5147
|
onHyperlinkClick,
|
|
@@ -5162,7 +5162,7 @@ function ZoomElementRenderer({
|
|
|
5162
5162
|
sourceSlideIndex
|
|
5163
5163
|
}) {
|
|
5164
5164
|
const { t } = reactI18next.useTranslation();
|
|
5165
|
-
const summaryView =
|
|
5165
|
+
const summaryView = chunkBXACB3BG_js.buildSummaryZoomView(element, (index) => {
|
|
5166
5166
|
const slide = slides?.[index];
|
|
5167
5167
|
return slide ? {
|
|
5168
5168
|
slideNumber: slide.slideNumber,
|
|
@@ -5441,7 +5441,7 @@ function renderBody(options) {
|
|
|
5441
5441
|
textDirection: txtSE?.textDirection,
|
|
5442
5442
|
textStyle: txtS,
|
|
5443
5443
|
textStyleRaw: txtSE,
|
|
5444
|
-
layoutStyle:
|
|
5444
|
+
layoutStyle: chunkLXUMBK2O_js.getTextLayoutStyle(el),
|
|
5445
5445
|
element: el,
|
|
5446
5446
|
onCommit,
|
|
5447
5447
|
onCancel,
|
|
@@ -5452,7 +5452,7 @@ function renderBody(options) {
|
|
|
5452
5452
|
] });
|
|
5453
5453
|
}
|
|
5454
5454
|
if (el.type === "table") {
|
|
5455
|
-
return
|
|
5455
|
+
return chunkLXUMBK2O_js.renderTableElement(el, txtS, {
|
|
5456
5456
|
editable: isSel,
|
|
5457
5457
|
selectedCell: isSel ? tableSt : null,
|
|
5458
5458
|
onSelectCell: onCellSel,
|
|
@@ -5483,7 +5483,7 @@ function renderBody(options) {
|
|
|
5483
5483
|
);
|
|
5484
5484
|
}
|
|
5485
5485
|
if (el.type === "media") {
|
|
5486
|
-
return
|
|
5486
|
+
return chunkLXUMBK2O_js.renderMediaElement(el, media, {
|
|
5487
5487
|
autoPlay: isPresentationPassive,
|
|
5488
5488
|
fullScreen: isPresentationPassive && Boolean(el.fullScreen),
|
|
5489
5489
|
isPresentationMode: isPresentationPassive,
|
|
@@ -5508,8 +5508,8 @@ function renderBody(options) {
|
|
|
5508
5508
|
}
|
|
5509
5509
|
return renderGroup(el.children);
|
|
5510
5510
|
}
|
|
5511
|
-
if (
|
|
5512
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
5511
|
+
if (chunkLXUMBK2O_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
5512
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBXACB3BG_js.getElementLabel(el) });
|
|
5513
5513
|
}
|
|
5514
5514
|
return renderTextElementBody(options);
|
|
5515
5515
|
}
|
|
@@ -5526,14 +5526,14 @@ function StaticElementRenderer({
|
|
|
5526
5526
|
positioned = true
|
|
5527
5527
|
}) {
|
|
5528
5528
|
const style = chunkAD3EAEY6_js.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
5529
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
5530
|
-
const fill =
|
|
5529
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkBXACB3BG_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
5530
|
+
const fill = chunkBXACB3BG_js.normalizeHexColor(style?.fillColor, chunkLXUMBK2O_js.DEFAULT_FILL_COLOR);
|
|
5531
5531
|
const strokeWidth = Math.max(0, style?.strokeWidth || 0);
|
|
5532
|
-
const stroke =
|
|
5533
|
-
const visualStyle =
|
|
5534
|
-
const textStyle =
|
|
5532
|
+
const stroke = chunkBXACB3BG_js.normalizeHexColor(style?.strokeColor, chunkLXUMBK2O_js.DEFAULT_STROKE_COLOR);
|
|
5533
|
+
const visualStyle = chunkLXUMBK2O_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
5534
|
+
const textStyle = chunkLXUMBK2O_js.getTextStyleForElement(
|
|
5535
5535
|
element,
|
|
5536
|
-
element.type === "shape" && hasFill ? "#ffffff" :
|
|
5536
|
+
element.type === "shape" && hasFill ? "#ffffff" : chunkLXUMBK2O_js.DEFAULT_TEXT_COLOR
|
|
5537
5537
|
);
|
|
5538
5538
|
const isImage = element.type === "picture" || element.type === "image";
|
|
5539
5539
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5546,7 +5546,7 @@ function StaticElementRenderer({
|
|
|
5546
5546
|
top: positioned ? element.y : void 0,
|
|
5547
5547
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
5548
5548
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
5549
|
-
transform: positioned ?
|
|
5549
|
+
transform: positioned ? chunkBXACB3BG_js.getElementTransform(element) : void 0,
|
|
5550
5550
|
transformOrigin: "center",
|
|
5551
5551
|
zIndex,
|
|
5552
5552
|
...visualStyle
|
|
@@ -5570,12 +5570,12 @@ function StaticElementRenderer({
|
|
|
5570
5570
|
spellCheck: false,
|
|
5571
5571
|
txtSE: chunkAD3EAEY6_js.hasTextProperties(element) ? element.textStyle : void 0,
|
|
5572
5572
|
txtS: textStyle,
|
|
5573
|
-
vecShape:
|
|
5574
|
-
imgStyle:
|
|
5575
|
-
imgFilter:
|
|
5576
|
-
imgOpacity:
|
|
5573
|
+
vecShape: chunkLXUMBK2O_js.renderVectorShape(element, hasFill, fill, strokeWidth, stroke),
|
|
5574
|
+
imgStyle: chunkLXUMBK2O_js.getImageRenderStyle(element),
|
|
5575
|
+
imgFilter: chunkBXACB3BG_js.getImageEffectsFilter(element),
|
|
5576
|
+
imgOpacity: chunkBXACB3BG_js.getImageEffectsOpacity(element),
|
|
5577
5577
|
imgAlt: "",
|
|
5578
|
-
isTxtEl:
|
|
5578
|
+
isTxtEl: chunkBXACB3BG_js.isEditableTextElement(element),
|
|
5579
5579
|
media: mediaDataUrls,
|
|
5580
5580
|
tableSt: null,
|
|
5581
5581
|
isSel: false,
|
|
@@ -5601,12 +5601,12 @@ function SlideThumbnailImpl({
|
|
|
5601
5601
|
}) {
|
|
5602
5602
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
5603
5603
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
5604
|
-
const scale =
|
|
5604
|
+
const scale = chunkLXUMBK2O_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeCanvasWidth;
|
|
5605
5605
|
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
5606
5606
|
const previewElements = [...templateElements, ...slide.elements].slice(0, 60);
|
|
5607
5607
|
const { t } = reactI18next.useTranslation();
|
|
5608
5608
|
const transitionLabel = slide.transition ? (() => {
|
|
5609
|
-
const opt =
|
|
5609
|
+
const opt = chunkLXUMBK2O_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
5610
5610
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
5611
5611
|
})() : void 0;
|
|
5612
5612
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6299,7 +6299,7 @@ function SectionHeader({
|
|
|
6299
6299
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6300
6300
|
lu.LuChevronDown,
|
|
6301
6301
|
{
|
|
6302
|
-
className:
|
|
6302
|
+
className: chunkLXUMBK2O_js.cn(
|
|
6303
6303
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
6304
6304
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
6305
6305
|
)
|
|
@@ -6401,7 +6401,7 @@ function LazyThumbnailInner({
|
|
|
6401
6401
|
className: "relative w-full overflow-hidden rounded border border-border bg-muted/30 animate-pulse",
|
|
6402
6402
|
style: {
|
|
6403
6403
|
height: previewHeight,
|
|
6404
|
-
minWidth:
|
|
6404
|
+
minWidth: chunkLXUMBK2O_js.SLIDE_NAV_THUMBNAIL_WIDTH
|
|
6405
6405
|
}
|
|
6406
6406
|
}
|
|
6407
6407
|
) });
|
|
@@ -6438,7 +6438,7 @@ function buildFlatPaneItems(sectionGroups, showSectionHeaders, collapsedSections
|
|
|
6438
6438
|
function estimateSlideItemHeight(canvasWidth, canvasHeight) {
|
|
6439
6439
|
const safeW = Math.max(canvasWidth, 1);
|
|
6440
6440
|
const safeH = Math.max(canvasHeight, 1);
|
|
6441
|
-
const scale =
|
|
6441
|
+
const scale = chunkLXUMBK2O_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeW;
|
|
6442
6442
|
const previewHeight = Math.max(56, Math.round(safeH * scale));
|
|
6443
6443
|
return previewHeight + 30;
|
|
6444
6444
|
}
|
|
@@ -6475,7 +6475,7 @@ function SlideItemInner({
|
|
|
6475
6475
|
);
|
|
6476
6476
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
6477
6477
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
6478
|
-
const scale =
|
|
6478
|
+
const scale = chunkLXUMBK2O_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeCanvasWidth;
|
|
6479
6479
|
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
6480
6480
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6481
6481
|
"button",
|
|
@@ -6484,7 +6484,7 @@ function SlideItemInner({
|
|
|
6484
6484
|
ref: slideRef,
|
|
6485
6485
|
"aria-label": `Go to slide ${slideIndex + 1}`,
|
|
6486
6486
|
"aria-current": isActive ? "true" : void 0,
|
|
6487
|
-
className:
|
|
6487
|
+
className: chunkLXUMBK2O_js.cn(
|
|
6488
6488
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
6489
6489
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
6490
6490
|
isHidden && "opacity-50"
|
|
@@ -6500,7 +6500,7 @@ function SlideItemInner({
|
|
|
6500
6500
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6501
6501
|
"span",
|
|
6502
6502
|
{
|
|
6503
|
-
className:
|
|
6503
|
+
className: chunkLXUMBK2O_js.cn(
|
|
6504
6504
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
6505
6505
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
6506
6506
|
),
|
|
@@ -6520,7 +6520,7 @@ function SlideItemInner({
|
|
|
6520
6520
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6521
6521
|
"div",
|
|
6522
6522
|
{
|
|
6523
|
-
className:
|
|
6523
|
+
className: chunkLXUMBK2O_js.cn(
|
|
6524
6524
|
"relative flex-1 overflow-hidden border transition-colors bg-white",
|
|
6525
6525
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
6526
6526
|
),
|
|
@@ -6653,7 +6653,7 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection) {
|
|
|
6653
6653
|
};
|
|
6654
6654
|
}
|
|
6655
6655
|
var EMPTY_TEMPLATE_ELEMENTS = [];
|
|
6656
|
-
var VIRTUALIZATION_THRESHOLD =
|
|
6656
|
+
var VIRTUALIZATION_THRESHOLD = chunkBXACB3BG_js.SLIDE_VIRTUALIZATION_THRESHOLD;
|
|
6657
6657
|
function SlidesPaneSidebar({
|
|
6658
6658
|
slides,
|
|
6659
6659
|
templateElementsBySlideId,
|
|
@@ -6725,7 +6725,7 @@ function SlidesPaneSidebar({
|
|
|
6725
6725
|
[sectionGroups, showSectionHeaders, collapsedSections]
|
|
6726
6726
|
);
|
|
6727
6727
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
6728
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
6728
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkLXUMBK2O_js.useVirtualizedSlides({
|
|
6729
6729
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
6730
6730
|
itemHeight: estimatedItemHeight
|
|
6731
6731
|
});
|
|
@@ -6955,7 +6955,7 @@ function HandoutMasterPanel({
|
|
|
6955
6955
|
{
|
|
6956
6956
|
type: "button",
|
|
6957
6957
|
"aria-pressed": slidesPerPage === count,
|
|
6958
|
-
className:
|
|
6958
|
+
className: chunkLXUMBK2O_js.cn(
|
|
6959
6959
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
6960
6960
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
6961
6961
|
),
|
|
@@ -7083,7 +7083,7 @@ function SlideMastersList({
|
|
|
7083
7083
|
"div",
|
|
7084
7084
|
{
|
|
7085
7085
|
ref: isMasterActive ? activeRef : void 0,
|
|
7086
|
-
className:
|
|
7086
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7087
7087
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
7088
7088
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
7089
7089
|
),
|
|
@@ -7100,7 +7100,7 @@ function SlideMastersList({
|
|
|
7100
7100
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7101
7101
|
"span",
|
|
7102
7102
|
{
|
|
7103
|
-
className:
|
|
7103
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7104
7104
|
"text-[10px] font-medium",
|
|
7105
7105
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
7106
7106
|
),
|
|
@@ -7116,7 +7116,7 @@ function SlideMastersList({
|
|
|
7116
7116
|
"div",
|
|
7117
7117
|
{
|
|
7118
7118
|
ref: isLayoutActive ? activeRef : void 0,
|
|
7119
|
-
className:
|
|
7119
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7120
7120
|
"group relative cursor-pointer rounded-md border-2 p-0.5 transition-all",
|
|
7121
7121
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
7122
7122
|
),
|
|
@@ -7133,7 +7133,7 @@ function SlideMastersList({
|
|
|
7133
7133
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7134
7134
|
"span",
|
|
7135
7135
|
{
|
|
7136
|
-
className:
|
|
7136
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7137
7137
|
"text-[9px]",
|
|
7138
7138
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
7139
7139
|
),
|
|
@@ -7217,7 +7217,7 @@ function MasterViewSidebar({
|
|
|
7217
7217
|
type: "button",
|
|
7218
7218
|
role: "tab",
|
|
7219
7219
|
"aria-selected": masterViewTab === tab.key,
|
|
7220
|
-
className:
|
|
7220
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7221
7221
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
7222
7222
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
7223
7223
|
),
|
|
@@ -7689,7 +7689,7 @@ function SectionBlock({
|
|
|
7689
7689
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7690
7690
|
lu.LuChevronDown,
|
|
7691
7691
|
{
|
|
7692
|
-
className:
|
|
7692
|
+
className: chunkLXUMBK2O_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
7693
7693
|
}
|
|
7694
7694
|
),
|
|
7695
7695
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -7736,7 +7736,7 @@ function SlideCardImpl({
|
|
|
7736
7736
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7737
7737
|
"div",
|
|
7738
7738
|
{
|
|
7739
|
-
className:
|
|
7739
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7740
7740
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
7741
7741
|
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",
|
|
7742
7742
|
slide.hidden && "opacity-40"
|
|
@@ -7755,7 +7755,7 @@ function SlideCardImpl({
|
|
|
7755
7755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7756
7756
|
"span",
|
|
7757
7757
|
{
|
|
7758
|
-
className:
|
|
7758
|
+
className: chunkLXUMBK2O_js.cn(
|
|
7759
7759
|
"text-[11px] font-medium",
|
|
7760
7760
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
7761
7761
|
),
|
|
@@ -8756,7 +8756,7 @@ function segmentsToEditorHtml(segments) {
|
|
|
8756
8756
|
inlineStyles.push(`font-family:${segment.style.fontFamily}`);
|
|
8757
8757
|
}
|
|
8758
8758
|
const text = escapeHtml(segment.text);
|
|
8759
|
-
if (segment.style.hyperlink &&
|
|
8759
|
+
if (segment.style.hyperlink && chunkBXACB3BG_js.isUrlSafe(segment.style.hyperlink)) {
|
|
8760
8760
|
const href = escapeHtml(segment.style.hyperlink);
|
|
8761
8761
|
return `<a href="${href}" style="color:#4a9eff;text-decoration:underline;cursor:pointer" data-hyperlink="${href}">${text}</a>`;
|
|
8762
8762
|
}
|
|
@@ -8839,7 +8839,7 @@ function renderRichNotesSegments(segments) {
|
|
|
8839
8839
|
if (segment.style.fontFamily) {
|
|
8840
8840
|
style.fontFamily = segment.style.fontFamily;
|
|
8841
8841
|
}
|
|
8842
|
-
if (segment.style.hyperlink &&
|
|
8842
|
+
if (segment.style.hyperlink && chunkBXACB3BG_js.isUrlSafe(segment.style.hyperlink)) {
|
|
8843
8843
|
const safeHref = segment.style.hyperlink;
|
|
8844
8844
|
style.color = "#4a9eff";
|
|
8845
8845
|
style.textDecoration = "underline";
|
|
@@ -8852,7 +8852,7 @@ function renderRichNotesSegments(segments) {
|
|
|
8852
8852
|
style,
|
|
8853
8853
|
onClick: (e) => {
|
|
8854
8854
|
e.preventDefault();
|
|
8855
|
-
|
|
8855
|
+
chunkBXACB3BG_js.safeOpenUrl(safeHref);
|
|
8856
8856
|
},
|
|
8857
8857
|
children: segment.text
|
|
8858
8858
|
},
|
|
@@ -9416,7 +9416,7 @@ function useSlideNotes({
|
|
|
9416
9416
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
9417
9417
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
9418
9418
|
e.preventDefault();
|
|
9419
|
-
|
|
9419
|
+
chunkBXACB3BG_js.safeOpenUrl(href);
|
|
9420
9420
|
}
|
|
9421
9421
|
}, []);
|
|
9422
9422
|
return {
|
|
@@ -9490,7 +9490,7 @@ var SlideNotesPanel = ({
|
|
|
9490
9490
|
});
|
|
9491
9491
|
const hasNotes = draft.trim().length > 0;
|
|
9492
9492
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
9493
|
-
const { dragY, handlers: dragHandlers } =
|
|
9493
|
+
const { dragY, handlers: dragHandlers } = chunkLXUMBK2O_js.useSheetDismissDrag(onToggle);
|
|
9494
9494
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9495
9495
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9496
9496
|
"button",
|
|
@@ -9504,7 +9504,7 @@ var SlideNotesPanel = ({
|
|
|
9504
9504
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9505
9505
|
"div",
|
|
9506
9506
|
{
|
|
9507
|
-
className:
|
|
9507
|
+
className: chunkLXUMBK2O_js.cn(
|
|
9508
9508
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
9509
9509
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
9510
9510
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -9761,8 +9761,8 @@ function VersionHistoryPanel({
|
|
|
9761
9761
|
className: "px-3 py-2.5 border-b border-border hover:bg-muted/50 group",
|
|
9762
9762
|
children: [
|
|
9763
9763
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
9764
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-foreground", children:
|
|
9765
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground", children:
|
|
9764
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-foreground", children: chunkBXACB3BG_js.formatVersionTimestamp(version.timestamp) }),
|
|
9765
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground", children: chunkBXACB3BG_js.formatRelativeTime(version.timestamp) })
|
|
9766
9766
|
] }),
|
|
9767
9767
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground mt-0.5", children: formatFileSize(version.size) }),
|
|
9768
9768
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 mt-1.5 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
@@ -9855,7 +9855,7 @@ function SlideDiffRow({
|
|
|
9855
9855
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9856
9856
|
"div",
|
|
9857
9857
|
{
|
|
9858
|
-
className:
|
|
9858
|
+
className: chunkLXUMBK2O_js.cn(
|
|
9859
9859
|
"rounded-lg border transition-colors",
|
|
9860
9860
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
9861
9861
|
),
|
|
@@ -9869,7 +9869,7 @@ function SlideDiffRow({
|
|
|
9869
9869
|
children: [
|
|
9870
9870
|
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" }),
|
|
9871
9871
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
9872
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
9872
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkLXUMBK2O_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
9873
9873
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
9874
9874
|
diff.changes.length,
|
|
9875
9875
|
" ",
|
|
@@ -9879,7 +9879,7 @@ function SlideDiffRow({
|
|
|
9879
9879
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9880
9880
|
"span",
|
|
9881
9881
|
{
|
|
9882
|
-
className:
|
|
9882
|
+
className: chunkLXUMBK2O_js.cn(
|
|
9883
9883
|
"text-[10px] font-medium",
|
|
9884
9884
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
9885
9885
|
),
|
|
@@ -9907,7 +9907,7 @@ function SlideDiffRow({
|
|
|
9907
9907
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9908
9908
|
"div",
|
|
9909
9909
|
{
|
|
9910
|
-
className:
|
|
9910
|
+
className: chunkLXUMBK2O_js.cn(
|
|
9911
9911
|
"rounded border overflow-hidden",
|
|
9912
9912
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
9913
9913
|
),
|
|
@@ -10073,7 +10073,7 @@ function useModalFocus(open, panelRef, onClose, initialFocusRef) {
|
|
|
10073
10073
|
if (!open || !panel) {
|
|
10074
10074
|
return;
|
|
10075
10075
|
}
|
|
10076
|
-
return
|
|
10076
|
+
return chunkBXACB3BG_js.activateModalFocus(panel, {
|
|
10077
10077
|
initialFocus: initialFocusRef?.current,
|
|
10078
10078
|
onEscape: onClose
|
|
10079
10079
|
});
|
|
@@ -10628,7 +10628,7 @@ function DocumentPropertiesDialog({
|
|
|
10628
10628
|
const handleClose = React14.useCallback(() => {
|
|
10629
10629
|
onClose();
|
|
10630
10630
|
}, [onClose]);
|
|
10631
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
10631
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(handleClose);
|
|
10632
10632
|
if (!isOpen) {
|
|
10633
10633
|
return null;
|
|
10634
10634
|
}
|
|
@@ -10776,7 +10776,7 @@ function FontEmbeddingPanel({
|
|
|
10776
10776
|
const scanFonts = React14.useCallback(async () => {
|
|
10777
10777
|
setScanning(true);
|
|
10778
10778
|
try {
|
|
10779
|
-
setAvailableFamilies(await
|
|
10779
|
+
setAvailableFamilies(await chunkBXACB3BG_js.scanAvailableFontFamilies(usedFontFamilies));
|
|
10780
10780
|
setScanned(true);
|
|
10781
10781
|
} catch {
|
|
10782
10782
|
} finally {
|
|
@@ -11159,7 +11159,7 @@ function PresentationAudienceEffects({ snapshot }) {
|
|
|
11159
11159
|
children: strokes.map((stroke) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11160
11160
|
"path",
|
|
11161
11161
|
{
|
|
11162
|
-
d:
|
|
11162
|
+
d: chunkBXACB3BG_js.presentationInkPath(stroke.points),
|
|
11163
11163
|
fill: "none",
|
|
11164
11164
|
stroke: stroke.color,
|
|
11165
11165
|
strokeWidth: stroke.width / 10,
|
|
@@ -11260,7 +11260,7 @@ function PresentationSubtitleBar({
|
|
|
11260
11260
|
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 }) }) });
|
|
11261
11261
|
}
|
|
11262
11262
|
function renderNotesSegments(segments) {
|
|
11263
|
-
return
|
|
11263
|
+
return chunkBXACB3BG_js.notesSegmentsToSpans(segments).map((span) => {
|
|
11264
11264
|
if (span.kind === "break") {
|
|
11265
11265
|
return React14__default.default.createElement("br", { key: span.key });
|
|
11266
11266
|
}
|
|
@@ -11398,7 +11398,7 @@ function ScaledSlidePreviewImpl({
|
|
|
11398
11398
|
{
|
|
11399
11399
|
className: "absolute inset-0",
|
|
11400
11400
|
style: {
|
|
11401
|
-
backgroundColor:
|
|
11401
|
+
backgroundColor: chunkBXACB3BG_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
11402
11402
|
}
|
|
11403
11403
|
}
|
|
11404
11404
|
),
|
|
@@ -11488,7 +11488,7 @@ function PresenterNotesRail({
|
|
|
11488
11488
|
const notesText = slide?.notes ?? "";
|
|
11489
11489
|
const notesSegments = slide?.notesSegments;
|
|
11490
11490
|
const [notesDraft, setNotesDraft] = React14.useState(notesText);
|
|
11491
|
-
const [fontSize, setFontSize] = React14.useState(
|
|
11491
|
+
const [fontSize, setFontSize] = React14.useState(chunkBXACB3BG_js.NOTES_FONT_SIZE_DEFAULT);
|
|
11492
11492
|
React14.useEffect(() => setNotesDraft(notesText), [current, notesText]);
|
|
11493
11493
|
const notes = React14.useMemo(
|
|
11494
11494
|
() => notesSegments?.length ? renderNotesSegments(notesSegments) : notesText.trim() ? notesText : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "italic text-muted-foreground", children: t("pptx.presenter.noNotes") }),
|
|
@@ -11498,11 +11498,11 @@ function PresenterNotesRail({
|
|
|
11498
11498
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between border-b border-border/60 px-4 py-3", children: [
|
|
11499
11499
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11500
11500
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("pptx.presenter.currentTime") }),
|
|
11501
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums", children:
|
|
11501
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums", children: chunkBXACB3BG_js.formatTime(new Date(now)) })
|
|
11502
11502
|
] }),
|
|
11503
11503
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-right", children: [
|
|
11504
11504
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("pptx.presenter.elapsed") }),
|
|
11505
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums text-primary", children:
|
|
11505
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-lg tabular-nums text-primary", children: chunkBXACB3BG_js.formatElapsed(elapsed) })
|
|
11506
11506
|
] })
|
|
11507
11507
|
] }),
|
|
11508
11508
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex items-center justify-between border-b border-border/60 px-4 py-2", children: [
|
|
@@ -11559,8 +11559,8 @@ function PresenterNotesRail({
|
|
|
11559
11559
|
"button",
|
|
11560
11560
|
{
|
|
11561
11561
|
type: "button",
|
|
11562
|
-
onClick: () => setFontSize(
|
|
11563
|
-
disabled: fontSize <=
|
|
11562
|
+
onClick: () => setFontSize(chunkBXACB3BG_js.clampNotesFontSize(fontSize - chunkBXACB3BG_js.NOTES_FONT_SIZE_STEP)),
|
|
11563
|
+
disabled: fontSize <= chunkBXACB3BG_js.NOTES_FONT_SIZE_MIN,
|
|
11564
11564
|
"aria-label": t("pptx.presenter.decreaseFontSize"),
|
|
11565
11565
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMinus, {})
|
|
11566
11566
|
}
|
|
@@ -11573,8 +11573,8 @@ function PresenterNotesRail({
|
|
|
11573
11573
|
"button",
|
|
11574
11574
|
{
|
|
11575
11575
|
type: "button",
|
|
11576
|
-
onClick: () => setFontSize(
|
|
11577
|
-
disabled: fontSize >=
|
|
11576
|
+
onClick: () => setFontSize(chunkBXACB3BG_js.clampNotesFontSize(fontSize + chunkBXACB3BG_js.NOTES_FONT_SIZE_STEP)),
|
|
11577
|
+
disabled: fontSize >= chunkBXACB3BG_js.NOTES_FONT_SIZE_MAX,
|
|
11578
11578
|
"aria-label": t("pptx.presenter.increaseFontSize"),
|
|
11579
11579
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPlus, {})
|
|
11580
11580
|
}
|
|
@@ -11660,7 +11660,7 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
11660
11660
|
const nextPoint = point(event);
|
|
11661
11661
|
if (pointer.tool === "eraser") {
|
|
11662
11662
|
onUpdate({
|
|
11663
|
-
inkStrokes:
|
|
11663
|
+
inkStrokes: chunkBXACB3BG_js.erasePresentationInkAt(
|
|
11664
11664
|
snapshot.inkStrokes ?? [],
|
|
11665
11665
|
snapshot.slideIndex,
|
|
11666
11666
|
nextPoint
|
|
@@ -11690,11 +11690,11 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
11690
11690
|
return;
|
|
11691
11691
|
}
|
|
11692
11692
|
if (pointer.tool === "laser") {
|
|
11693
|
-
onUpdate({ pointer:
|
|
11693
|
+
onUpdate({ pointer: chunkBXACB3BG_js.movePresenterPointer(pointer, nextPoint.x, nextPoint.y) });
|
|
11694
11694
|
}
|
|
11695
11695
|
if (pointer.tool === "eraser" && event.buttons === 1) {
|
|
11696
11696
|
onUpdate({
|
|
11697
|
-
inkStrokes:
|
|
11697
|
+
inkStrokes: chunkBXACB3BG_js.erasePresentationInkAt(
|
|
11698
11698
|
snapshot.inkStrokes ?? [],
|
|
11699
11699
|
snapshot.slideIndex,
|
|
11700
11700
|
nextPoint
|
|
@@ -11704,7 +11704,7 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
11704
11704
|
if (drawingId.current && event.buttons === 1) {
|
|
11705
11705
|
onUpdate({
|
|
11706
11706
|
inkStrokes: (snapshot.inkStrokes ?? []).map(
|
|
11707
|
-
(stroke) => stroke.id === drawingId.current ?
|
|
11707
|
+
(stroke) => stroke.id === drawingId.current ? chunkBXACB3BG_js.appendPresentationInkPoint(stroke, nextPoint) : stroke
|
|
11708
11708
|
)
|
|
11709
11709
|
});
|
|
11710
11710
|
}
|
|
@@ -11855,7 +11855,7 @@ function PresenterView({
|
|
|
11855
11855
|
"aria-valuemin": 0,
|
|
11856
11856
|
"aria-valuemax": 100,
|
|
11857
11857
|
"aria-label": t("pptx.presenter.timerProgress"),
|
|
11858
|
-
title: `${
|
|
11858
|
+
title: `${chunkBXACB3BG_js.formatElapsed(elapsed)} (segment ${timerSegment + 1})`,
|
|
11859
11859
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11860
11860
|
"div",
|
|
11861
11861
|
{
|
|
@@ -11882,7 +11882,7 @@ function MobilePresenterView({
|
|
|
11882
11882
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
11883
11883
|
return () => window.clearInterval(interval);
|
|
11884
11884
|
}, []);
|
|
11885
|
-
const elapsed =
|
|
11885
|
+
const elapsed = chunkBXACB3BG_js.mobileElapsedSince(presentationStartTime, now);
|
|
11886
11886
|
const currentSlide = slides[currentSlideIndex];
|
|
11887
11887
|
const nextSlide = currentSlideIndex + 1 < slides.length ? slides[currentSlideIndex + 1] : void 0;
|
|
11888
11888
|
if (!currentSlide) {
|
|
@@ -11891,8 +11891,8 @@ function MobilePresenterView({
|
|
|
11891
11891
|
const notesText = currentSlide.notes ?? "";
|
|
11892
11892
|
const notesSegments = currentSlide.notesSegments;
|
|
11893
11893
|
const hasRichNotes = notesSegments && notesSegments.length > 0;
|
|
11894
|
-
const atFirst =
|
|
11895
|
-
const atLast =
|
|
11894
|
+
const atFirst = chunkBXACB3BG_js.isFirstSlide(currentSlideIndex);
|
|
11895
|
+
const atLast = chunkBXACB3BG_js.isLastSlide(currentSlideIndex, slides.length);
|
|
11896
11896
|
const insetStyle = {
|
|
11897
11897
|
paddingTop: "env(safe-area-inset-top, 0px)",
|
|
11898
11898
|
paddingBottom: "env(safe-area-inset-bottom, 0px)",
|
|
@@ -11903,9 +11903,9 @@ function MobilePresenterView({
|
|
|
11903
11903
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-2 border-b border-border/60", children: [
|
|
11904
11904
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
11905
11905
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground uppercase tracking-wider", children: t("pptx.presenter.elapsed") }),
|
|
11906
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-mono tabular-nums text-primary", children:
|
|
11906
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-mono tabular-nums text-primary", children: chunkBXACB3BG_js.formatMobileElapsed(elapsed) })
|
|
11907
11907
|
] }),
|
|
11908
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-mono tabular-nums text-foreground", children:
|
|
11908
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-mono tabular-nums text-foreground", children: chunkBXACB3BG_js.mobileSlideCounter(currentSlideIndex, slides.length) }),
|
|
11909
11909
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11910
11910
|
"button",
|
|
11911
11911
|
{
|
|
@@ -12247,7 +12247,7 @@ function SelectionPane({
|
|
|
12247
12247
|
setDragIndex(null);
|
|
12248
12248
|
setDragOverIndex(null);
|
|
12249
12249
|
},
|
|
12250
|
-
className:
|
|
12250
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12251
12251
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
12252
12252
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
12253
12253
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -12304,7 +12304,7 @@ function RibbonGroup({
|
|
|
12304
12304
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12305
12305
|
"section",
|
|
12306
12306
|
{
|
|
12307
|
-
className:
|
|
12307
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12308
12308
|
"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",
|
|
12309
12309
|
className
|
|
12310
12310
|
),
|
|
@@ -12332,7 +12332,7 @@ function RibbonCommand({
|
|
|
12332
12332
|
onClick,
|
|
12333
12333
|
disabled,
|
|
12334
12334
|
title: title ?? label,
|
|
12335
|
-
className:
|
|
12335
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12336
12336
|
"inline-flex rounded-sm text-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-35",
|
|
12337
12337
|
active && "bg-primary/15 text-primary ring-1 ring-primary/35",
|
|
12338
12338
|
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]"
|
|
@@ -12341,7 +12341,7 @@ function RibbonCommand({
|
|
|
12341
12341
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12342
12342
|
"span",
|
|
12343
12343
|
{
|
|
12344
|
-
className:
|
|
12344
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12345
12345
|
"grid shrink-0 place-items-center text-primary",
|
|
12346
12346
|
compact ? "h-4 w-4 [&>svg]:h-4 [&>svg]:w-4" : "h-7 w-7 [&>svg]:h-6 [&>svg]:w-6"
|
|
12347
12347
|
),
|
|
@@ -12370,7 +12370,7 @@ function RibbonToggle({
|
|
|
12370
12370
|
"label",
|
|
12371
12371
|
{
|
|
12372
12372
|
title,
|
|
12373
|
-
className:
|
|
12373
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12374
12374
|
"flex h-[19px] items-center gap-1 whitespace-nowrap rounded-sm px-1 text-[10px] text-foreground",
|
|
12375
12375
|
checked && "bg-primary/15 text-primary"
|
|
12376
12376
|
),
|
|
@@ -12772,7 +12772,7 @@ function ArrangeSection(p) {
|
|
|
12772
12772
|
disabled: !p.canEdit || p.canActivateFormatPainter === false && !p.formatPainterActive,
|
|
12773
12773
|
"data-testid": "format-painter-toggle",
|
|
12774
12774
|
"data-active": p.formatPainterActive ? "true" : "false",
|
|
12775
|
-
className:
|
|
12775
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12776
12776
|
pill,
|
|
12777
12777
|
p.formatPainterActive ? "bg-amber-600 hover:bg-amber-500 text-amber-50" : ""
|
|
12778
12778
|
),
|
|
@@ -12885,7 +12885,7 @@ function DesignSection(p) {
|
|
|
12885
12885
|
{
|
|
12886
12886
|
onClick: p.onToggleThemeGallery,
|
|
12887
12887
|
disabled: !p.canEdit,
|
|
12888
|
-
className:
|
|
12888
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12889
12889
|
pill,
|
|
12890
12890
|
p.isThemeGalleryOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
12891
12891
|
),
|
|
@@ -12901,7 +12901,7 @@ function DesignSection(p) {
|
|
|
12901
12901
|
{
|
|
12902
12902
|
onClick: p.onToggleThemeEditor,
|
|
12903
12903
|
disabled: !p.canEdit,
|
|
12904
|
-
className:
|
|
12904
|
+
className: chunkLXUMBK2O_js.cn(pill, p.isThemeEditorOpen ? "bg-primary hover:bg-primary/80 text-white" : ""),
|
|
12905
12905
|
title: t("pptx.ribbon.editThemeTitle"),
|
|
12906
12906
|
children: [
|
|
12907
12907
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuPencil, { className: ics }),
|
|
@@ -12926,7 +12926,7 @@ function DesignSection(p) {
|
|
|
12926
12926
|
"button",
|
|
12927
12927
|
{
|
|
12928
12928
|
onClick: p.onToggleInspector,
|
|
12929
|
-
className:
|
|
12929
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12930
12930
|
pill,
|
|
12931
12931
|
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
12932
12932
|
),
|
|
@@ -12968,7 +12968,7 @@ function TransitionsSection(p) {
|
|
|
12968
12968
|
{
|
|
12969
12969
|
type: "button",
|
|
12970
12970
|
onClick: () => setSelected(preset.value),
|
|
12971
|
-
className:
|
|
12971
|
+
className: chunkLXUMBK2O_js.cn(
|
|
12972
12972
|
"flex-shrink-0 px-2 py-1 max-md:min-h-[44px] rounded border text-[11px] leading-tight transition-colors",
|
|
12973
12973
|
selected === preset.value ? "border-primary bg-primary/10 text-primary font-medium" : "border-border bg-muted hover:bg-accent text-foreground"
|
|
12974
12974
|
),
|
|
@@ -13053,7 +13053,7 @@ function TransitionsSection(p) {
|
|
|
13053
13053
|
{
|
|
13054
13054
|
type: "button",
|
|
13055
13055
|
onClick: p.onToggleInspector,
|
|
13056
|
-
className:
|
|
13056
|
+
className: chunkLXUMBK2O_js.cn(
|
|
13057
13057
|
pill,
|
|
13058
13058
|
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
13059
13059
|
),
|
|
@@ -13074,7 +13074,7 @@ function DrawSection(p) {
|
|
|
13074
13074
|
{
|
|
13075
13075
|
type: "button",
|
|
13076
13076
|
onClick: () => p.onSetActiveTool(tool.id),
|
|
13077
|
-
className:
|
|
13077
|
+
className: chunkLXUMBK2O_js.cn(
|
|
13078
13078
|
i < a.length - 1 ? gB : gL,
|
|
13079
13079
|
p.activeTool === tool.id ? tool.ac ?? "bg-accent text-foreground" : ""
|
|
13080
13080
|
),
|
|
@@ -13159,7 +13159,7 @@ function BackstageAction(props) {
|
|
|
13159
13159
|
function BackstageNewGallery(props) {
|
|
13160
13160
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13161
13161
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-7 text-[17px] font-semibold", children: "New" }),
|
|
13162
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-6", children:
|
|
13162
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-6", children: chunkBXACB3BG_js.BACKSTAGE_TEMPLATES.map((template) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13163
13163
|
"button",
|
|
13164
13164
|
{
|
|
13165
13165
|
type: "button",
|
|
@@ -13202,8 +13202,8 @@ function BackstageRecentList(props) {
|
|
|
13202
13202
|
/* @__PURE__ */ jsxRuntime.jsx("small", { className: "block truncate text-[11px] text-muted-foreground", children: file.location })
|
|
13203
13203
|
] })
|
|
13204
13204
|
] }),
|
|
13205
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children:
|
|
13206
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children:
|
|
13205
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children: chunkBXACB3BG_js.formatBackstageDate(file.timestamp) }),
|
|
13206
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children: chunkBXACB3BG_js.formatBackstageSize(file.size) })
|
|
13207
13207
|
]
|
|
13208
13208
|
},
|
|
13209
13209
|
file.key
|
|
@@ -13216,7 +13216,7 @@ function FileSection(p) {
|
|
|
13216
13216
|
const [query, setQuery] = React14.useState("");
|
|
13217
13217
|
const [recent, setRecent] = React14.useState([]);
|
|
13218
13218
|
React14.useEffect(() => {
|
|
13219
|
-
void
|
|
13219
|
+
void chunkBXACB3BG_js.listBackstageRecentFiles().then(setRecent);
|
|
13220
13220
|
}, []);
|
|
13221
13221
|
const visibleRecent = React14.useMemo(() => {
|
|
13222
13222
|
const q = query.trim().toLowerCase();
|
|
@@ -13228,7 +13228,7 @@ function FileSection(p) {
|
|
|
13228
13228
|
p.onClose();
|
|
13229
13229
|
}
|
|
13230
13230
|
};
|
|
13231
|
-
const title =
|
|
13231
|
+
const title = chunkBXACB3BG_js.BACKSTAGE_NAV.find((item) => item.id === page)?.label ?? "Home";
|
|
13232
13232
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13233
13233
|
"div",
|
|
13234
13234
|
{
|
|
@@ -13249,7 +13249,7 @@ function FileSection(p) {
|
|
|
13249
13249
|
}
|
|
13250
13250
|
),
|
|
13251
13251
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex min-h-0 flex-1 flex-col py-2", children: [
|
|
13252
|
-
|
|
13252
|
+
chunkBXACB3BG_js.BACKSTAGE_NAV.filter((item) => !item.group).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13253
13253
|
"button",
|
|
13254
13254
|
{
|
|
13255
13255
|
type: "button",
|
|
@@ -13263,7 +13263,7 @@ function FileSection(p) {
|
|
|
13263
13263
|
item.id
|
|
13264
13264
|
)),
|
|
13265
13265
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
|
|
13266
|
-
|
|
13266
|
+
chunkBXACB3BG_js.BACKSTAGE_NAV.filter((item) => item.group).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13267
13267
|
"button",
|
|
13268
13268
|
{
|
|
13269
13269
|
type: "button",
|
|
@@ -13551,7 +13551,7 @@ function SlidesGroup(p) {
|
|
|
13551
13551
|
type: "button",
|
|
13552
13552
|
onClick: handleNewSlide,
|
|
13553
13553
|
disabled: !p.canEdit || p.layoutOptions.length === 0,
|
|
13554
|
-
className:
|
|
13554
|
+
className: chunkLXUMBK2O_js.cn(
|
|
13555
13555
|
pill,
|
|
13556
13556
|
"whitespace-nowrap",
|
|
13557
13557
|
p.layoutOptions.length > 0 ? "rounded-r-none" : ""
|
|
@@ -13741,7 +13741,7 @@ function HomeSection(p) {
|
|
|
13741
13741
|
setTimeout(() => setCutFeedback(false), 600);
|
|
13742
13742
|
},
|
|
13743
13743
|
disabled: !p.canEdit,
|
|
13744
|
-
className:
|
|
13744
|
+
className: chunkLXUMBK2O_js.cn(gB, cutFeedback && "bg-green-600/20 text-green-400"),
|
|
13745
13745
|
title: t("pptx.arrange.cut"),
|
|
13746
13746
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuScissors, { className: ic2 })
|
|
13747
13747
|
}
|
|
@@ -13755,7 +13755,7 @@ function HomeSection(p) {
|
|
|
13755
13755
|
setCopiedFeedback(true);
|
|
13756
13756
|
setTimeout(() => setCopiedFeedback(false), 600);
|
|
13757
13757
|
},
|
|
13758
|
-
className:
|
|
13758
|
+
className: chunkLXUMBK2O_js.cn(gB, copiedFeedback && "bg-green-600/20 text-green-400"),
|
|
13759
13759
|
title: t("pptx.arrange.copy"),
|
|
13760
13760
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuCopy, { className: ic2 })
|
|
13761
13761
|
}
|
|
@@ -13768,7 +13768,7 @@ function HomeSection(p) {
|
|
|
13768
13768
|
disabled: !p.canEdit || p.canActivateFormatPainter === false && !p.formatPainterActive,
|
|
13769
13769
|
"data-testid": "format-painter-toggle",
|
|
13770
13770
|
"data-active": p.formatPainterActive ? "true" : "false",
|
|
13771
|
-
className:
|
|
13771
|
+
className: chunkLXUMBK2O_js.cn(
|
|
13772
13772
|
gL,
|
|
13773
13773
|
p.formatPainterActive ? "bg-amber-600 hover:bg-amber-500 text-amber-50" : ""
|
|
13774
13774
|
),
|
|
@@ -13860,7 +13860,7 @@ function InsertSection(p) {
|
|
|
13860
13860
|
const [datePickerOpen, setDatePickerOpen] = React14.useState(false);
|
|
13861
13861
|
const [datePickerValue, setDatePickerValue] = React14.useState("");
|
|
13862
13862
|
const [dateFormat, setDateFormat] = React14.useState("locale");
|
|
13863
|
-
const [newChartType, setNewChartType] = React14.useState(
|
|
13863
|
+
const [newChartType, setNewChartType] = React14.useState(chunkBXACB3BG_js.DEFAULT_INSERT_CHART_TYPE);
|
|
13864
13864
|
const datePickerRef = React14.useRef(null);
|
|
13865
13865
|
const openDatePicker = React14.useCallback(() => {
|
|
13866
13866
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -13943,7 +13943,7 @@ function InsertSection(p) {
|
|
|
13943
13943
|
onChange: (e) => p.onSetNewShapeType(e.target.value),
|
|
13944
13944
|
className: "bg-transparent py-1.5 pl-2 pr-1 outline-none text-xs",
|
|
13945
13945
|
title: t("pptx.insert.shapeType"),
|
|
13946
|
-
children:
|
|
13946
|
+
children: chunkLXUMBK2O_js.SHAPE_PRESETS.map((sp) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: sp.type, className: "bg-background", children: t(sp.i18nKey) }, sp.type))
|
|
13947
13947
|
}
|
|
13948
13948
|
),
|
|
13949
13949
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13954,7 +13954,7 @@ function InsertSection(p) {
|
|
|
13954
13954
|
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",
|
|
13955
13955
|
title: t("pptx.insert.addShape"),
|
|
13956
13956
|
children: [
|
|
13957
|
-
|
|
13957
|
+
chunkLXUMBK2O_js.SHAPE_PRESETS.find((sp) => sp.type === p.newShapeType)?.icon || /* @__PURE__ */ jsxRuntime.jsx(lu.LuSquare, { className: ic2 }),
|
|
13958
13958
|
t("pptx.insert.shape")
|
|
13959
13959
|
]
|
|
13960
13960
|
}
|
|
@@ -14007,7 +14007,7 @@ function InsertSection(p) {
|
|
|
14007
14007
|
onChange: (e) => setNewChartType(e.target.value),
|
|
14008
14008
|
className: "bg-transparent py-1.5 pl-2 pr-1 outline-none text-xs",
|
|
14009
14009
|
title: t("pptx.ribbon.chartType"),
|
|
14010
|
-
children:
|
|
14010
|
+
children: chunkBXACB3BG_js.INSERT_CHART_TYPES.map((ct) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: ct.type, className: "bg-background", children: ct.label }, ct.type))
|
|
14011
14011
|
}
|
|
14012
14012
|
),
|
|
14013
14013
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -14109,7 +14109,7 @@ function InsertSection(p) {
|
|
|
14109
14109
|
]
|
|
14110
14110
|
}
|
|
14111
14111
|
),
|
|
14112
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 top-full z-50 hidden group-hover:flex flex-col w-40 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1", children:
|
|
14112
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 top-full z-50 hidden group-hover:flex flex-col w-40 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1", children: chunkBXACB3BG_js.ACTION_BUTTON_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14113
14113
|
"button",
|
|
14114
14114
|
{
|
|
14115
14115
|
type: "button",
|
|
@@ -14209,16 +14209,7 @@ function InsertSection(p) {
|
|
|
14209
14209
|
)
|
|
14210
14210
|
] }) })
|
|
14211
14211
|
] }),
|
|
14212
|
-
p.onOpenHeaderFooter && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14213
|
-
"button",
|
|
14214
|
-
{
|
|
14215
|
-
type: "button",
|
|
14216
|
-
disabled: !canEdit,
|
|
14217
|
-
className: pill,
|
|
14218
|
-
onClick: p.onOpenHeaderFooter,
|
|
14219
|
-
children: t("pptx.headerFooter.title")
|
|
14220
|
-
}
|
|
14221
|
-
),
|
|
14212
|
+
p.onOpenHeaderFooter && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", disabled: !canEdit, className: pill, onClick: p.onOpenHeaderFooter, children: t("pptx.headerFooter.title") }),
|
|
14222
14213
|
datePickerOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14223
14214
|
"div",
|
|
14224
14215
|
{
|
|
@@ -15542,7 +15533,7 @@ function MobileSheet({
|
|
|
15542
15533
|
headerRight
|
|
15543
15534
|
}) {
|
|
15544
15535
|
const sheetRef = React14.useRef(null);
|
|
15545
|
-
const { dragY, dragging, handlers } =
|
|
15536
|
+
const { dragY, dragging, handlers } = chunkLXUMBK2O_js.useSheetDismissDrag(onClose);
|
|
15546
15537
|
useModalFocus(open, sheetRef, onClose);
|
|
15547
15538
|
if (!open) {
|
|
15548
15539
|
return null;
|
|
@@ -15566,7 +15557,7 @@ function MobileSheet({
|
|
|
15566
15557
|
"aria-modal": "true",
|
|
15567
15558
|
"aria-label": typeof title === "string" ? title : "Mobile panel",
|
|
15568
15559
|
tabIndex: -1,
|
|
15569
|
-
className:
|
|
15560
|
+
className: chunkLXUMBK2O_js.cn(
|
|
15570
15561
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
15571
15562
|
"animate-in slide-in-from-bottom duration-200",
|
|
15572
15563
|
className
|
|
@@ -15635,7 +15626,7 @@ function MobileMenuSheet(props) {
|
|
|
15635
15626
|
{
|
|
15636
15627
|
type: "button",
|
|
15637
15628
|
onClick: () => setActive(active === key ? null : key),
|
|
15638
|
-
className:
|
|
15629
|
+
className: chunkLXUMBK2O_js.cn(
|
|
15639
15630
|
"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]",
|
|
15640
15631
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
15641
15632
|
),
|
|
@@ -15932,7 +15923,7 @@ function MobileToolbar(props) {
|
|
|
15932
15923
|
{
|
|
15933
15924
|
type: "button",
|
|
15934
15925
|
onClick: () => onSetMode("present"),
|
|
15935
|
-
className:
|
|
15926
|
+
className: chunkLXUMBK2O_js.cn(btn, "text-primary"),
|
|
15936
15927
|
title: t("pptx.toolbar.present"),
|
|
15937
15928
|
"aria-label": t("pptx.toolbar.present"),
|
|
15938
15929
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPresentation, { className: "w-5 h-5" })
|
|
@@ -15943,7 +15934,7 @@ function MobileToolbar(props) {
|
|
|
15943
15934
|
{
|
|
15944
15935
|
type: "button",
|
|
15945
15936
|
onClick: props.onOpenShareDialog ?? props.onPackageForSharing,
|
|
15946
|
-
className:
|
|
15937
|
+
className: chunkLXUMBK2O_js.cn(btn, "bg-primary text-white hover:bg-primary/90 px-3"),
|
|
15947
15938
|
title: t("pptx.toolbar.share"),
|
|
15948
15939
|
"aria-label": t("pptx.toolbar.share"),
|
|
15949
15940
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuShare2, { className: "w-4 h-4" })
|
|
@@ -15968,7 +15959,7 @@ var FILL_COLORS = [
|
|
|
15968
15959
|
"#008888",
|
|
15969
15960
|
"#888888"
|
|
15970
15961
|
];
|
|
15971
|
-
var TOP_SHAPES =
|
|
15962
|
+
var TOP_SHAPES = chunkLXUMBK2O_js.SHAPE_PRESETS.slice(0, 12);
|
|
15972
15963
|
function DrawingGroup(p) {
|
|
15973
15964
|
const { t } = reactI18next.useTranslation();
|
|
15974
15965
|
const [shapesOpen, setShapesOpen] = React14.useState(false);
|
|
@@ -16049,7 +16040,7 @@ function DrawingGroup(p) {
|
|
|
16049
16040
|
"button",
|
|
16050
16041
|
{
|
|
16051
16042
|
type: "button",
|
|
16052
|
-
className:
|
|
16043
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16053
16044
|
"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-foreground hover:bg-muted transition-colors",
|
|
16054
16045
|
p.newShapeType === s.type && "bg-accent"
|
|
16055
16046
|
),
|
|
@@ -16193,7 +16184,7 @@ function DrawingGroup(p) {
|
|
|
16193
16184
|
{
|
|
16194
16185
|
type: "button",
|
|
16195
16186
|
disabled: true,
|
|
16196
|
-
className:
|
|
16187
|
+
className: chunkLXUMBK2O_js.cn(pill, "opacity-50 cursor-not-allowed"),
|
|
16197
16188
|
title: t("pptx.drawing.shapeEffectsUnavailable"),
|
|
16198
16189
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic2 })
|
|
16199
16190
|
}
|
|
@@ -16306,11 +16297,11 @@ function TabRowActions(p) {
|
|
|
16306
16297
|
{
|
|
16307
16298
|
type: "button",
|
|
16308
16299
|
onClick: p.onEnterRehearsalMode,
|
|
16309
|
-
className:
|
|
16300
|
+
className: chunkBXACB3BG_js.TAB_ROW_ACTION_CLASSES.record,
|
|
16310
16301
|
title: t("pptx.titleBar.record"),
|
|
16311
16302
|
"aria-label": t("pptx.titleBar.record"),
|
|
16312
16303
|
children: [
|
|
16313
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
16304
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TAB_ROW_ACTION_CLASSES.recordDot, "aria-hidden": "true" }),
|
|
16314
16305
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("pptx.titleBar.record") })
|
|
16315
16306
|
]
|
|
16316
16307
|
}
|
|
@@ -16320,7 +16311,7 @@ function TabRowActions(p) {
|
|
|
16320
16311
|
{
|
|
16321
16312
|
type: "button",
|
|
16322
16313
|
onClick: p.onOpenShareDialog ?? p.onPackageForSharing,
|
|
16323
|
-
className:
|
|
16314
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16324
16315
|
"relative inline-flex items-center gap-1 px-2.5 py-1 rounded-sm text-[11px] font-medium transition-colors whitespace-nowrap",
|
|
16325
16316
|
isCollaborating ? "bg-green-600 hover:bg-green-500 text-white" : "bg-primary hover:bg-primary/90 text-white"
|
|
16326
16317
|
),
|
|
@@ -16400,7 +16391,7 @@ function CustomShowsControls({
|
|
|
16400
16391
|
{
|
|
16401
16392
|
type: "button",
|
|
16402
16393
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
16403
|
-
className:
|
|
16394
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16404
16395
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
16405
16396
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
16406
16397
|
),
|
|
@@ -16448,7 +16439,7 @@ function PresentDropdown({
|
|
|
16448
16439
|
{
|
|
16449
16440
|
type: "button",
|
|
16450
16441
|
onClick: onPresent,
|
|
16451
|
-
className:
|
|
16442
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16452
16443
|
"px-2 py-1 transition-colors",
|
|
16453
16444
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
16454
16445
|
),
|
|
@@ -16461,7 +16452,7 @@ function PresentDropdown({
|
|
|
16461
16452
|
{
|
|
16462
16453
|
type: "button",
|
|
16463
16454
|
onClick: () => setOpen((prev) => !prev),
|
|
16464
|
-
className:
|
|
16455
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16465
16456
|
"px-1 py-1 transition-colors border-l border-border",
|
|
16466
16457
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
16467
16458
|
),
|
|
@@ -16649,7 +16640,7 @@ function OverflowMenu(p) {
|
|
|
16649
16640
|
{
|
|
16650
16641
|
type: "button",
|
|
16651
16642
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
16652
|
-
className:
|
|
16643
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16653
16644
|
"p-1.5 rounded transition-colors",
|
|
16654
16645
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
16655
16646
|
),
|
|
@@ -16704,7 +16695,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16704
16695
|
{
|
|
16705
16696
|
type: "button",
|
|
16706
16697
|
onClick: onToggleSidebar,
|
|
16707
|
-
className:
|
|
16698
|
+
className: chunkLXUMBK2O_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
16708
16699
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
16709
16700
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
16710
16701
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic2 })
|
|
@@ -16716,7 +16707,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16716
16707
|
{
|
|
16717
16708
|
type: "button",
|
|
16718
16709
|
onClick: p.onToggleComments,
|
|
16719
|
-
className:
|
|
16710
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16720
16711
|
qab,
|
|
16721
16712
|
"relative max-md:hidden",
|
|
16722
16713
|
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
@@ -16783,7 +16774,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16783
16774
|
{
|
|
16784
16775
|
type: "button",
|
|
16785
16776
|
onClick: onToggleInspector,
|
|
16786
|
-
className:
|
|
16777
|
+
className: chunkLXUMBK2O_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
16787
16778
|
title: t("pptx.toolbar.toggleInspector"),
|
|
16788
16779
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
16789
16780
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic2 })
|
|
@@ -16794,7 +16785,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16794
16785
|
{
|
|
16795
16786
|
type: "button",
|
|
16796
16787
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
16797
|
-
className:
|
|
16788
|
+
className: chunkLXUMBK2O_js.cn(qab, "text-muted-foreground"),
|
|
16798
16789
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
16799
16790
|
"aria-label": t("pptx.toolbar.settings"),
|
|
16800
16791
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -16839,14 +16830,14 @@ function Toolbar(p) {
|
|
|
16839
16830
|
role: "tablist",
|
|
16840
16831
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
16841
16832
|
children: [
|
|
16842
|
-
|
|
16833
|
+
chunkLXUMBK2O_js.TOOLBAR_SECTIONS.map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16843
16834
|
"button",
|
|
16844
16835
|
{
|
|
16845
16836
|
type: "button",
|
|
16846
16837
|
role: "tab",
|
|
16847
16838
|
"aria-selected": toolbarSection === s.id,
|
|
16848
16839
|
onClick: () => onSetToolbarSection(s.id),
|
|
16849
|
-
className:
|
|
16840
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16850
16841
|
"relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap transition-colors max-md:min-h-[36px] max-md:px-3",
|
|
16851
16842
|
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"
|
|
16852
16843
|
),
|
|
@@ -16868,7 +16859,7 @@ function Toolbar(p) {
|
|
|
16868
16859
|
{
|
|
16869
16860
|
type: "button",
|
|
16870
16861
|
onClick: p.onToggleCompactToolbar,
|
|
16871
|
-
className:
|
|
16862
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16872
16863
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
16873
16864
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
16874
16865
|
),
|
|
@@ -16884,7 +16875,7 @@ function Toolbar(p) {
|
|
|
16884
16875
|
showRibbon && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16885
16876
|
"div",
|
|
16886
16877
|
{
|
|
16887
|
-
className:
|
|
16878
|
+
className: chunkLXUMBK2O_js.cn(
|
|
16888
16879
|
"flex min-h-[82px] items-stretch gap-0 overflow-visible px-1 py-0.5 max-md:min-h-0 max-md:px-1 max-md:py-0.5 flex-nowrap",
|
|
16889
16880
|
isNarrowViewport && !isCompactToolbarOpen && "hidden"
|
|
16890
16881
|
),
|
|
@@ -17137,13 +17128,13 @@ function Toolbar(p) {
|
|
|
17137
17128
|
}
|
|
17138
17129
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px]";
|
|
17139
17130
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px]";
|
|
17140
|
-
var ENTRANCE_PRESETS =
|
|
17131
|
+
var ENTRANCE_PRESETS = chunkLXUMBK2O_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
17141
17132
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
17142
17133
|
);
|
|
17143
|
-
var EXIT_PRESETS =
|
|
17134
|
+
var EXIT_PRESETS = chunkLXUMBK2O_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
17144
17135
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
17145
17136
|
);
|
|
17146
|
-
var EMPHASIS_PRESETS =
|
|
17137
|
+
var EMPHASIS_PRESETS = chunkLXUMBK2O_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
17147
17138
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
17148
17139
|
);
|
|
17149
17140
|
var TRIGGER_OPTIONS = [
|
|
@@ -17245,7 +17236,7 @@ function AnimationTimelineSection({
|
|
|
17245
17236
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17246
17237
|
"div",
|
|
17247
17238
|
{
|
|
17248
|
-
className:
|
|
17239
|
+
className: chunkLXUMBK2O_js.cn(
|
|
17249
17240
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
17250
17241
|
animationTypeColor(bar.anim),
|
|
17251
17242
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -17279,7 +17270,7 @@ function AnimationTimelineSection({
|
|
|
17279
17270
|
onDragEnd: handleDragEnd,
|
|
17280
17271
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
17281
17272
|
onMouseLeave: handleAnimationHoverEnd,
|
|
17282
|
-
className:
|
|
17273
|
+
className: chunkLXUMBK2O_js.cn(
|
|
17283
17274
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
17284
17275
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
17285
17276
|
isDragging && "opacity-40",
|
|
@@ -17443,13 +17434,13 @@ function useAnimationPreview({
|
|
|
17443
17434
|
if (!preset || preset === "none") {
|
|
17444
17435
|
return;
|
|
17445
17436
|
}
|
|
17446
|
-
|
|
17437
|
+
chunkLXUMBK2O_js.startPreviewAnimation(anim.elementId, preset, {
|
|
17447
17438
|
direction: anim.direction,
|
|
17448
17439
|
durationMs: anim.durationMs ?? 500,
|
|
17449
17440
|
timingCurve: anim.timingCurve
|
|
17450
17441
|
});
|
|
17451
17442
|
}, []);
|
|
17452
|
-
const handleAnimationHoverEnd = React14.useCallback(() =>
|
|
17443
|
+
const handleAnimationHoverEnd = React14.useCallback(() => chunkLXUMBK2O_js.stopPreviewAnimation(), []);
|
|
17453
17444
|
const handlePreviewClick = React14.useCallback(() => {
|
|
17454
17445
|
if (!selectedElementAnimation) {
|
|
17455
17446
|
return;
|
|
@@ -17458,7 +17449,7 @@ function useAnimationPreview({
|
|
|
17458
17449
|
if (!preset || preset === "none") {
|
|
17459
17450
|
return;
|
|
17460
17451
|
}
|
|
17461
|
-
|
|
17452
|
+
chunkLXUMBK2O_js.startPreviewAnimation(selectedElementId, preset, {
|
|
17462
17453
|
direction: selectedElementAnimation.direction,
|
|
17463
17454
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
17464
17455
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -17631,14 +17622,14 @@ function useAnimationHandlers({
|
|
|
17631
17622
|
return anim.elementId.slice(0, 8);
|
|
17632
17623
|
}
|
|
17633
17624
|
const text = chunkAD3EAEY6_js.hasTextProperties(el) ? el.text : void 0;
|
|
17634
|
-
return text ||
|
|
17625
|
+
return text || chunkBXACB3BG_js.getElementLabel(el);
|
|
17635
17626
|
},
|
|
17636
17627
|
[activeSlide.elements]
|
|
17637
17628
|
);
|
|
17638
17629
|
const hasAnimation = Boolean(
|
|
17639
17630
|
selectedElementAnimation?.entrance || selectedElementAnimation?.exit || selectedElementAnimation?.emphasis
|
|
17640
17631
|
);
|
|
17641
|
-
const showDirectionPicker = hasAnimation && (
|
|
17632
|
+
const showDirectionPicker = hasAnimation && (chunkBXACB3BG_js.DIRECTIONAL_PRESETS.has(selectedElementAnimation?.entrance ?? "") || chunkBXACB3BG_js.DIRECTIONAL_PRESETS.has(selectedElementAnimation?.exit ?? ""));
|
|
17642
17633
|
const timelineBarData = React14.useMemo(() => {
|
|
17643
17634
|
if (sortedAnimations.length === 0) {
|
|
17644
17635
|
return [];
|
|
@@ -17790,7 +17781,7 @@ function AnimationPanel({
|
|
|
17790
17781
|
{
|
|
17791
17782
|
type: "button",
|
|
17792
17783
|
disabled: !canEdit,
|
|
17793
|
-
className:
|
|
17784
|
+
className: chunkLXUMBK2O_js.cn(
|
|
17794
17785
|
"flex items-center justify-center w-7 h-7 rounded border transition-colors",
|
|
17795
17786
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
17796
17787
|
),
|
|
@@ -17840,7 +17831,7 @@ function AnimationPanel({
|
|
|
17840
17831
|
className: SELECT_CLS,
|
|
17841
17832
|
children: [
|
|
17842
17833
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
17843
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
17834
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunkBXACB3BG_js.getElementLabel(el) }, el.id))
|
|
17844
17835
|
]
|
|
17845
17836
|
}
|
|
17846
17837
|
)
|
|
@@ -18032,7 +18023,7 @@ function ActionTriggerSection({
|
|
|
18032
18023
|
"select",
|
|
18033
18024
|
{
|
|
18034
18025
|
disabled: !canEdit,
|
|
18035
|
-
className:
|
|
18026
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-full"),
|
|
18036
18027
|
value: activeType,
|
|
18037
18028
|
onChange: (e) => onChangeType(e.target.value),
|
|
18038
18029
|
children: ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.label) }, o.value))
|
|
@@ -18043,7 +18034,7 @@ function ActionTriggerSection({
|
|
|
18043
18034
|
{
|
|
18044
18035
|
type: "text",
|
|
18045
18036
|
disabled: !canEdit,
|
|
18046
|
-
className:
|
|
18037
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-full"),
|
|
18047
18038
|
placeholder: "https://...",
|
|
18048
18039
|
value: action?.url ?? fallbackUrl ?? "",
|
|
18049
18040
|
onChange: (e) => onChangeUrl(e.target.value)
|
|
@@ -18054,7 +18045,7 @@ function ActionTriggerSection({
|
|
|
18054
18045
|
{
|
|
18055
18046
|
type: "number",
|
|
18056
18047
|
disabled: !canEdit,
|
|
18057
|
-
className:
|
|
18048
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-full"),
|
|
18058
18049
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
18059
18050
|
min: 1,
|
|
18060
18051
|
max: slideCount,
|
|
@@ -19709,7 +19700,7 @@ function ConnectorPanel({
|
|
|
19709
19700
|
"select",
|
|
19710
19701
|
{
|
|
19711
19702
|
disabled: !canEdit,
|
|
19712
|
-
className:
|
|
19703
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-full"),
|
|
19713
19704
|
value: selectedElement.shapeStyle?.[key] ?? "none",
|
|
19714
19705
|
onChange: (e) => onUpdateElementStyle({ [key]: e.target.value }),
|
|
19715
19706
|
children: [
|
|
@@ -19761,7 +19752,7 @@ function OlePropertiesPanel({
|
|
|
19761
19752
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19762
19753
|
"span",
|
|
19763
19754
|
{
|
|
19764
|
-
className:
|
|
19755
|
+
className: chunkLXUMBK2O_js.cn(
|
|
19765
19756
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
19766
19757
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
19767
19758
|
),
|
|
@@ -19820,7 +19811,7 @@ function LayerOrderButtons({
|
|
|
19820
19811
|
"button",
|
|
19821
19812
|
{
|
|
19822
19813
|
type: "button",
|
|
19823
|
-
className:
|
|
19814
|
+
className: chunkLXUMBK2O_js.cn("flex-1", BTN),
|
|
19824
19815
|
disabled: !canEdit,
|
|
19825
19816
|
onClick: () => onMoveLayer("forward"),
|
|
19826
19817
|
children: "\u2191 Forward"
|
|
@@ -19830,7 +19821,7 @@ function LayerOrderButtons({
|
|
|
19830
19821
|
"button",
|
|
19831
19822
|
{
|
|
19832
19823
|
type: "button",
|
|
19833
|
-
className:
|
|
19824
|
+
className: chunkLXUMBK2O_js.cn("flex-1", BTN),
|
|
19834
19825
|
disabled: !canEdit,
|
|
19835
19826
|
onClick: () => onMoveLayer("backward"),
|
|
19836
19827
|
children: "\u2193 Backward"
|
|
@@ -19847,14 +19838,14 @@ function ArtisticEffectsGallery({
|
|
|
19847
19838
|
const { t } = reactI18next.useTranslation();
|
|
19848
19839
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
19849
19840
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.image.artisticEffects") }),
|
|
19850
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19841
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkBXACB3BG_js.ARTISTIC_EFFECTS.map(([effectName, tKey, cssFilter]) => {
|
|
19851
19842
|
const isActive = effectName === "none" ? !fx?.artisticEffect : fx?.artisticEffect === effectName;
|
|
19852
19843
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19853
19844
|
"button",
|
|
19854
19845
|
{
|
|
19855
19846
|
type: "button",
|
|
19856
19847
|
disabled: !canEdit,
|
|
19857
|
-
className:
|
|
19848
|
+
className: chunkLXUMBK2O_js.cn(
|
|
19858
19849
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
19859
19850
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
19860
19851
|
),
|
|
@@ -19917,7 +19908,7 @@ function ColorChangeSection({
|
|
|
19917
19908
|
DebouncedColorInput,
|
|
19918
19909
|
{
|
|
19919
19910
|
disabled: !canEdit,
|
|
19920
|
-
value:
|
|
19911
|
+
value: chunkBXACB3BG_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
19921
19912
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19922
19913
|
onCommit: (hex) => updateEffects({
|
|
19923
19914
|
clrChange: {
|
|
@@ -19935,7 +19926,7 @@ function ColorChangeSection({
|
|
|
19935
19926
|
DebouncedColorInput,
|
|
19936
19927
|
{
|
|
19937
19928
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
19938
|
-
value:
|
|
19929
|
+
value: chunkBXACB3BG_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
19939
19930
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19940
19931
|
onCommit: (hex) => updateEffects({
|
|
19941
19932
|
clrChange: {
|
|
@@ -19997,7 +19988,7 @@ function ColorWashSection({
|
|
|
19997
19988
|
DebouncedColorInput,
|
|
19998
19989
|
{
|
|
19999
19990
|
disabled: !canEdit,
|
|
20000
|
-
value:
|
|
19991
|
+
value: chunkBXACB3BG_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
20001
19992
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
20002
19993
|
onCommit: (hex) => updateEffects({
|
|
20003
19994
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -20097,8 +20088,8 @@ function DuotonePanel({
|
|
|
20097
20088
|
}
|
|
20098
20089
|
});
|
|
20099
20090
|
}, [effects, onUpdateElement]);
|
|
20100
|
-
const shadowColor =
|
|
20101
|
-
const highlightColor =
|
|
20091
|
+
const shadowColor = chunkBXACB3BG_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
20092
|
+
const highlightColor = chunkBXACB3BG_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
20102
20093
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
20103
20094
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
20104
20095
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -20129,7 +20120,7 @@ function DuotonePanel({
|
|
|
20129
20120
|
] }),
|
|
20130
20121
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
20131
20122
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
20132
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
20123
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkBXACB3BG_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20133
20124
|
"button",
|
|
20134
20125
|
{
|
|
20135
20126
|
type: "button",
|
|
@@ -20303,7 +20294,7 @@ function ImagePropertiesPanel({
|
|
|
20303
20294
|
{
|
|
20304
20295
|
rows: 2,
|
|
20305
20296
|
disabled: !canEdit,
|
|
20306
|
-
className:
|
|
20297
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "resize-none text-[11px]"),
|
|
20307
20298
|
value: selectedElement.altText ?? "",
|
|
20308
20299
|
onChange: (e) => onUpdateElement({
|
|
20309
20300
|
altText: e.target.value
|
|
@@ -21262,11 +21253,11 @@ function ShapeTextPanels({
|
|
|
21262
21253
|
{
|
|
21263
21254
|
value: selectedElement.shapeType || "rect",
|
|
21264
21255
|
disabled: !canEdit,
|
|
21265
|
-
className:
|
|
21256
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-full"),
|
|
21266
21257
|
onChange: (e) => onUpdateElement({
|
|
21267
21258
|
shapeType: e.target.value
|
|
21268
21259
|
}),
|
|
21269
|
-
children:
|
|
21260
|
+
children: chunkLXUMBK2O_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
21270
21261
|
}
|
|
21271
21262
|
)
|
|
21272
21263
|
] }),
|
|
@@ -21279,7 +21270,7 @@ function ShapeTextPanels({
|
|
|
21279
21270
|
DebouncedColorInput,
|
|
21280
21271
|
{
|
|
21281
21272
|
disabled: !canEdit,
|
|
21282
|
-
value:
|
|
21273
|
+
value: chunkBXACB3BG_js.normalizeHexColor(selectedElement.shapeStyle?.fillColor, "#3b82f6"),
|
|
21283
21274
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21284
21275
|
onCommit: (hex) => onUpdateElementStyle({ fillColor: hex, fillMode: "solid" })
|
|
21285
21276
|
}
|
|
@@ -21291,7 +21282,7 @@ function ShapeTextPanels({
|
|
|
21291
21282
|
DebouncedColorInput,
|
|
21292
21283
|
{
|
|
21293
21284
|
disabled: !canEdit,
|
|
21294
|
-
value:
|
|
21285
|
+
value: chunkBXACB3BG_js.normalizeHexColor(selectedElement.shapeStyle?.strokeColor, "#1f2937"),
|
|
21295
21286
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21296
21287
|
onCommit: (hex) => onUpdateElementStyle({ strokeColor: hex })
|
|
21297
21288
|
}
|
|
@@ -21338,7 +21329,7 @@ function ShapeTextPanels({
|
|
|
21338
21329
|
DebouncedColorInput,
|
|
21339
21330
|
{
|
|
21340
21331
|
disabled: !canEdit,
|
|
21341
|
-
value:
|
|
21332
|
+
value: chunkBXACB3BG_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
21342
21333
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21343
21334
|
onCommit: (hex) => onUpdateTextStyle({ color: hex })
|
|
21344
21335
|
}
|
|
@@ -21396,7 +21387,7 @@ function TextFormatToggle({
|
|
|
21396
21387
|
{
|
|
21397
21388
|
type: "button",
|
|
21398
21389
|
disabled,
|
|
21399
|
-
className:
|
|
21390
|
+
className: chunkLXUMBK2O_js.cn(
|
|
21400
21391
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
21401
21392
|
italic && "italic",
|
|
21402
21393
|
underline && "underline",
|
|
@@ -21688,7 +21679,7 @@ function SmartArtLayoutSwitcher({
|
|
|
21688
21679
|
type: "button",
|
|
21689
21680
|
"data-testid": `smartart-layout-${type}`,
|
|
21690
21681
|
disabled: !canEdit,
|
|
21691
|
-
className:
|
|
21682
|
+
className: chunkLXUMBK2O_js.cn(
|
|
21692
21683
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
21693
21684
|
"text-[9px] leading-tight",
|
|
21694
21685
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -21760,7 +21751,7 @@ function SmartArtNodeStyleControls({
|
|
|
21760
21751
|
disabled: !canEdit,
|
|
21761
21752
|
"aria-label": `Bold ${label}`,
|
|
21762
21753
|
"aria-pressed": bold,
|
|
21763
|
-
className:
|
|
21754
|
+
className: chunkLXUMBK2O_js.cn(
|
|
21764
21755
|
EMPHASIS_BTN,
|
|
21765
21756
|
"font-bold",
|
|
21766
21757
|
bold ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -21776,7 +21767,7 @@ function SmartArtNodeStyleControls({
|
|
|
21776
21767
|
disabled: !canEdit,
|
|
21777
21768
|
"aria-label": `Italic ${label}`,
|
|
21778
21769
|
"aria-pressed": italic,
|
|
21779
|
-
className:
|
|
21770
|
+
className: chunkLXUMBK2O_js.cn(
|
|
21780
21771
|
EMPHASIS_BTN,
|
|
21781
21772
|
"italic",
|
|
21782
21773
|
italic ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -21815,7 +21806,7 @@ function SmartArtNodeRow({
|
|
|
21815
21806
|
"div",
|
|
21816
21807
|
{
|
|
21817
21808
|
role: "listitem",
|
|
21818
|
-
className:
|
|
21809
|
+
className: chunkLXUMBK2O_js.cn(
|
|
21819
21810
|
"rounded border bg-background/60 p-1.5",
|
|
21820
21811
|
isChild ? "border-border/60 ml-4" : "border-border"
|
|
21821
21812
|
),
|
|
@@ -21830,7 +21821,7 @@ function SmartArtNodeRow({
|
|
|
21830
21821
|
"data-testid": "smartart-node-text",
|
|
21831
21822
|
disabled: !canEdit,
|
|
21832
21823
|
"aria-label": label,
|
|
21833
|
-
className:
|
|
21824
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "flex-1 text-[11px] py-0.5"),
|
|
21834
21825
|
value: text,
|
|
21835
21826
|
onChange: (e) => onChangeText(nodeId, e.target.value),
|
|
21836
21827
|
onKeyDown: (e) => onKeyDown(e, nodeId),
|
|
@@ -21879,7 +21870,7 @@ function SmartArtNodeRow({
|
|
|
21879
21870
|
{
|
|
21880
21871
|
type: "button",
|
|
21881
21872
|
disabled: !canEdit || removeDisabled,
|
|
21882
|
-
className:
|
|
21873
|
+
className: chunkLXUMBK2O_js.cn(MINI_BTN, "hover:text-red-400"),
|
|
21883
21874
|
onClick: () => onRemove(nodeId),
|
|
21884
21875
|
"aria-label": `Remove ${label}`,
|
|
21885
21876
|
title: removeDisabled ? t("pptx.smartArt.layoutMinimum") : t("pptx.smartArt.remove"),
|
|
@@ -21934,10 +21925,10 @@ function SmartArtPropertiesPanel({
|
|
|
21934
21925
|
if (focusId) {
|
|
21935
21926
|
pendingFocusId.current = focusId;
|
|
21936
21927
|
}
|
|
21937
|
-
const reflowed = box ?
|
|
21928
|
+
const reflowed = box ? chunkBXACB3BG_js.rebuildDrawingShapesIfCleared(
|
|
21938
21929
|
newData,
|
|
21939
21930
|
newData.layout,
|
|
21940
|
-
|
|
21931
|
+
chunkLXUMBK2O_js.resolveSmartArtDataPalette(newData),
|
|
21941
21932
|
newData.style ?? "flat",
|
|
21942
21933
|
"inspector",
|
|
21943
21934
|
box
|
|
@@ -22046,7 +22037,7 @@ function SmartArtPropertiesPanel({
|
|
|
22046
22037
|
disabled: !canEdit,
|
|
22047
22038
|
"data-testid": "smartart-color-scheme",
|
|
22048
22039
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
22049
|
-
className:
|
|
22040
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-full"),
|
|
22050
22041
|
value: smartArtData.colorScheme ?? "colorful1",
|
|
22051
22042
|
onChange: (e) => updateSmartArt({ colorScheme: e.target.value }),
|
|
22052
22043
|
children: COLOR_SCHEMES.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: cs }, cs))
|
|
@@ -22061,7 +22052,7 @@ function SmartArtPropertiesPanel({
|
|
|
22061
22052
|
type: "button",
|
|
22062
22053
|
disabled: !canEdit,
|
|
22063
22054
|
"aria-pressed": (smartArtData.style ?? "flat") === s,
|
|
22064
|
-
className:
|
|
22055
|
+
className: chunkLXUMBK2O_js.cn(
|
|
22065
22056
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
22066
22057
|
(smartArtData.style ?? "flat") === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
22067
22058
|
),
|
|
@@ -22171,15 +22162,15 @@ function TableCellAdvancedFill({
|
|
|
22171
22162
|
};
|
|
22172
22163
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
22173
22164
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
22174
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22165
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.fillMode") }),
|
|
22175
22166
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22176
22167
|
"select",
|
|
22177
22168
|
{
|
|
22178
22169
|
disabled: !canEdit,
|
|
22179
|
-
className:
|
|
22170
|
+
className: chunkBXACB3BG_js.SEL,
|
|
22180
22171
|
value: fillMode,
|
|
22181
22172
|
onChange: (e) => handleFillModeChange(e.target.value),
|
|
22182
|
-
children:
|
|
22173
|
+
children: chunkBXACB3BG_js.FILL_MODE_OPTIONS.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value ?? "", children: t(opt.i18nKey) }, opt.value))
|
|
22183
22174
|
}
|
|
22184
22175
|
)
|
|
22185
22176
|
] }),
|
|
@@ -22200,20 +22191,20 @@ function TableCellAdvancedFill({
|
|
|
22200
22191
|
}
|
|
22201
22192
|
),
|
|
22202
22193
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
22203
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22194
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.SECTION_HEADING, children: t("pptx.table.margins") }),
|
|
22204
22195
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
22205
22196
|
["marginTop", "pptx.table.marginTop"],
|
|
22206
22197
|
["marginBottom", "pptx.table.marginBottom"],
|
|
22207
22198
|
["marginLeft", "pptx.table.marginLeft"],
|
|
22208
22199
|
["marginRight", "pptx.table.marginRight"]
|
|
22209
22200
|
].map(([key, i18nKey]) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22210
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22201
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t(i18nKey) }),
|
|
22211
22202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22212
22203
|
"input",
|
|
22213
22204
|
{
|
|
22214
22205
|
type: "number",
|
|
22215
22206
|
disabled: !canEdit,
|
|
22216
|
-
className:
|
|
22207
|
+
className: chunkBXACB3BG_js.NUM,
|
|
22217
22208
|
min: 0,
|
|
22218
22209
|
max: 200,
|
|
22219
22210
|
value: cellStyle[key] ?? 0,
|
|
@@ -22246,28 +22237,28 @@ function GradientControls({
|
|
|
22246
22237
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
22247
22238
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
22248
22239
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22249
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22240
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.gradientType") }),
|
|
22250
22241
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22251
22242
|
"select",
|
|
22252
22243
|
{
|
|
22253
22244
|
disabled: !canEdit,
|
|
22254
|
-
className:
|
|
22245
|
+
className: chunkBXACB3BG_js.SEL,
|
|
22255
22246
|
value: gradType,
|
|
22256
22247
|
onChange: (e) => onUpdateCellStyle({
|
|
22257
22248
|
gradientFillType: e.target.value
|
|
22258
22249
|
}),
|
|
22259
|
-
children:
|
|
22250
|
+
children: chunkBXACB3BG_js.GRADIENT_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
22260
22251
|
}
|
|
22261
22252
|
)
|
|
22262
22253
|
] }),
|
|
22263
22254
|
gradType === "linear" && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22264
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22255
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.gradientAngle") }),
|
|
22265
22256
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22266
22257
|
"input",
|
|
22267
22258
|
{
|
|
22268
22259
|
type: "number",
|
|
22269
22260
|
disabled: !canEdit,
|
|
22270
|
-
className:
|
|
22261
|
+
className: chunkBXACB3BG_js.NUM,
|
|
22271
22262
|
min: 0,
|
|
22272
22263
|
max: 360,
|
|
22273
22264
|
value: cellStyle.gradientFillAngle ?? 90,
|
|
@@ -22278,7 +22269,7 @@ function GradientControls({
|
|
|
22278
22269
|
)
|
|
22279
22270
|
] })
|
|
22280
22271
|
] }),
|
|
22281
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22272
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.gradientStops") }),
|
|
22282
22273
|
stops.map((stop, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
22283
22274
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22284
22275
|
"input",
|
|
@@ -22295,7 +22286,7 @@ function GradientControls({
|
|
|
22295
22286
|
{
|
|
22296
22287
|
type: "number",
|
|
22297
22288
|
disabled: !canEdit,
|
|
22298
|
-
className:
|
|
22289
|
+
className: chunkBXACB3BG_js.NUM,
|
|
22299
22290
|
min: 0,
|
|
22300
22291
|
max: 100,
|
|
22301
22292
|
value: Math.round(stop.position),
|
|
@@ -22326,23 +22317,23 @@ function PatternControls({
|
|
|
22326
22317
|
const { t } = reactI18next.useTranslation();
|
|
22327
22318
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
22328
22319
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22329
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22320
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.patternPreset") }),
|
|
22330
22321
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22331
22322
|
"select",
|
|
22332
22323
|
{
|
|
22333
22324
|
disabled: !canEdit,
|
|
22334
|
-
className:
|
|
22325
|
+
className: chunkBXACB3BG_js.SEL,
|
|
22335
22326
|
value: cellStyle.patternFillPreset ?? "ltDnDiag",
|
|
22336
22327
|
onChange: (e) => onUpdateCellStyle({
|
|
22337
22328
|
patternFillPreset: e.target.value
|
|
22338
22329
|
}),
|
|
22339
|
-
children:
|
|
22330
|
+
children: chunkBXACB3BG_js.PATTERN_OPTIONS.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p, children: p }, p))
|
|
22340
22331
|
}
|
|
22341
22332
|
)
|
|
22342
22333
|
] }),
|
|
22343
22334
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
22344
22335
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22345
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22336
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.patternForeground") }),
|
|
22346
22337
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22347
22338
|
"input",
|
|
22348
22339
|
{
|
|
@@ -22357,7 +22348,7 @@ function PatternControls({
|
|
|
22357
22348
|
)
|
|
22358
22349
|
] }),
|
|
22359
22350
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22360
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22351
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.LBL, children: t("pptx.table.patternBackground") }),
|
|
22361
22352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22362
22353
|
"input",
|
|
22363
22354
|
{
|
|
@@ -22429,7 +22420,7 @@ function TableCellFormattingPanel({
|
|
|
22429
22420
|
DebouncedColorInput,
|
|
22430
22421
|
{
|
|
22431
22422
|
disabled: !canEdit,
|
|
22432
|
-
value:
|
|
22423
|
+
value: chunkBXACB3BG_js.normalizeHexColor(cs.color, "#000000"),
|
|
22433
22424
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22434
22425
|
onCommit: (hex) => updateCellStyle({ color: hex })
|
|
22435
22426
|
}
|
|
@@ -22441,7 +22432,7 @@ function TableCellFormattingPanel({
|
|
|
22441
22432
|
DebouncedColorInput,
|
|
22442
22433
|
{
|
|
22443
22434
|
disabled: !canEdit,
|
|
22444
|
-
value:
|
|
22435
|
+
value: chunkBXACB3BG_js.normalizeHexColor(cs.backgroundColor, "#ffffff"),
|
|
22445
22436
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22446
22437
|
onCommit: (hex) => updateCellStyle({ backgroundColor: hex })
|
|
22447
22438
|
}
|
|
@@ -22465,7 +22456,7 @@ function TableCellFormattingPanel({
|
|
|
22465
22456
|
{
|
|
22466
22457
|
type: "button",
|
|
22467
22458
|
disabled: !canEdit,
|
|
22468
|
-
className:
|
|
22459
|
+
className: chunkLXUMBK2O_js.cn(
|
|
22469
22460
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22470
22461
|
cls,
|
|
22471
22462
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -22484,7 +22475,7 @@ function TableCellFormattingPanel({
|
|
|
22484
22475
|
{
|
|
22485
22476
|
type: "button",
|
|
22486
22477
|
disabled: !canEdit,
|
|
22487
|
-
className:
|
|
22478
|
+
className: chunkLXUMBK2O_js.cn(
|
|
22488
22479
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22489
22480
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22490
22481
|
),
|
|
@@ -22502,7 +22493,7 @@ function TableCellFormattingPanel({
|
|
|
22502
22493
|
{
|
|
22503
22494
|
type: "button",
|
|
22504
22495
|
disabled: !canEdit,
|
|
22505
|
-
className:
|
|
22496
|
+
className: chunkLXUMBK2O_js.cn(
|
|
22506
22497
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22507
22498
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22508
22499
|
),
|
|
@@ -22525,7 +22516,7 @@ function TableCellFormattingPanel({
|
|
|
22525
22516
|
DebouncedColorInput,
|
|
22526
22517
|
{
|
|
22527
22518
|
disabled: !canEdit,
|
|
22528
|
-
value:
|
|
22519
|
+
value: chunkBXACB3BG_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
22529
22520
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
22530
22521
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
22531
22522
|
}
|
|
@@ -22535,7 +22526,7 @@ function TableCellFormattingPanel({
|
|
|
22535
22526
|
{
|
|
22536
22527
|
type: "number",
|
|
22537
22528
|
disabled: !canEdit,
|
|
22538
|
-
className:
|
|
22529
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-14"),
|
|
22539
22530
|
min: 0,
|
|
22540
22531
|
max: 10,
|
|
22541
22532
|
value: cs[widthKey] ?? 1,
|
|
@@ -22551,9 +22542,9 @@ function TableCellFormattingPanel({
|
|
|
22551
22542
|
{
|
|
22552
22543
|
type: "button",
|
|
22553
22544
|
disabled: !canEdit,
|
|
22554
|
-
className:
|
|
22545
|
+
className: chunkLXUMBK2O_js.cn(BTN, "text-center"),
|
|
22555
22546
|
onClick: () => {
|
|
22556
|
-
const newRows =
|
|
22547
|
+
const newRows = chunkBXACB3BG_js.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
22557
22548
|
if (newRows) {
|
|
22558
22549
|
onUpdateTableData({ rows: newRows });
|
|
22559
22550
|
}
|
|
@@ -22566,9 +22557,9 @@ function TableCellFormattingPanel({
|
|
|
22566
22557
|
{
|
|
22567
22558
|
type: "button",
|
|
22568
22559
|
disabled: !canEdit,
|
|
22569
|
-
className:
|
|
22560
|
+
className: chunkLXUMBK2O_js.cn(BTN, "text-center"),
|
|
22570
22561
|
onClick: () => {
|
|
22571
|
-
const newRows =
|
|
22562
|
+
const newRows = chunkBXACB3BG_js.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
22572
22563
|
if (newRows) {
|
|
22573
22564
|
onUpdateTableData({ rows: newRows });
|
|
22574
22565
|
}
|
|
@@ -22581,9 +22572,9 @@ function TableCellFormattingPanel({
|
|
|
22581
22572
|
{
|
|
22582
22573
|
type: "button",
|
|
22583
22574
|
disabled: !canEdit,
|
|
22584
|
-
className:
|
|
22575
|
+
className: chunkLXUMBK2O_js.cn(BTN, "text-center"),
|
|
22585
22576
|
onClick: () => {
|
|
22586
|
-
const newRows =
|
|
22577
|
+
const newRows = chunkBXACB3BG_js.computeSplitCell(td, rowIndex, columnIndex);
|
|
22587
22578
|
if (newRows) {
|
|
22588
22579
|
onUpdateTableData({ rows: newRows });
|
|
22589
22580
|
}
|
|
@@ -22674,7 +22665,7 @@ function TablePropertiesPanel({
|
|
|
22674
22665
|
] }),
|
|
22675
22666
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
22676
22667
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.table.stylePresets") }),
|
|
22677
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
22668
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunkBXACB3BG_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22678
22669
|
"button",
|
|
22679
22670
|
{
|
|
22680
22671
|
type: "button",
|
|
@@ -22989,7 +22980,7 @@ function InspectorCommentRow({
|
|
|
22989
22980
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22990
22981
|
"div",
|
|
22991
22982
|
{
|
|
22992
|
-
className:
|
|
22983
|
+
className: chunkLXUMBK2O_js.cn(
|
|
22993
22984
|
"rounded border border-border bg-card p-2",
|
|
22994
22985
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
22995
22986
|
),
|
|
@@ -23002,7 +22993,7 @@ function InspectorCommentRow({
|
|
|
23002
22993
|
t("pptx.comments.resolved")
|
|
23003
22994
|
] })
|
|
23004
22995
|
] }),
|
|
23005
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
22996
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunkBXACB3BG_js.formatCommentTimestamp(comment.createdAt) })
|
|
23006
22997
|
] }),
|
|
23007
22998
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23008
22999
|
"button",
|
|
@@ -23010,12 +23001,12 @@ function InspectorCommentRow({
|
|
|
23010
23001
|
type: "button",
|
|
23011
23002
|
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",
|
|
23012
23003
|
title: t("pptx.comments.commentingOn", {
|
|
23013
|
-
element:
|
|
23004
|
+
element: chunkBXACB3BG_js.getElementLabel(targetElement)
|
|
23014
23005
|
}),
|
|
23015
23006
|
onClick: () => onSelectElement(targetElement.id),
|
|
23016
23007
|
children: [
|
|
23017
23008
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23018
|
-
|
|
23009
|
+
chunkBXACB3BG_js.getElementLabel(targetElement)
|
|
23019
23010
|
]
|
|
23020
23011
|
}
|
|
23021
23012
|
) : /* @__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") })),
|
|
@@ -23077,7 +23068,7 @@ function InspectorCommentRow({
|
|
|
23077
23068
|
"button",
|
|
23078
23069
|
{
|
|
23079
23070
|
type: "button",
|
|
23080
|
-
className:
|
|
23071
|
+
className: chunkLXUMBK2O_js.cn(
|
|
23081
23072
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
23082
23073
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
23083
23074
|
),
|
|
@@ -23244,7 +23235,7 @@ function InspectorCommentsSection({
|
|
|
23244
23235
|
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: [
|
|
23245
23236
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23246
23237
|
t("pptx.comments.commentingOn", {
|
|
23247
|
-
element:
|
|
23238
|
+
element: chunkBXACB3BG_js.getElementLabel(selectedElement)
|
|
23248
23239
|
})
|
|
23249
23240
|
] }),
|
|
23250
23241
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23252,7 +23243,7 @@ function InspectorCommentsSection({
|
|
|
23252
23243
|
{
|
|
23253
23244
|
rows: 2,
|
|
23254
23245
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
23255
|
-
element:
|
|
23246
|
+
element: chunkBXACB3BG_js.getElementLabel(selectedElement)
|
|
23256
23247
|
}) : t("pptx.comments.addPlaceholder"),
|
|
23257
23248
|
value: commentDraft,
|
|
23258
23249
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
@@ -23271,7 +23262,7 @@ function InspectorCommentsSection({
|
|
|
23271
23262
|
type: "button",
|
|
23272
23263
|
onClick: onAddComment,
|
|
23273
23264
|
disabled: !commentDraft.trim(),
|
|
23274
|
-
className:
|
|
23265
|
+
className: chunkLXUMBK2O_js.cn(
|
|
23275
23266
|
"w-full inline-flex items-center justify-center gap-1 rounded px-2 py-1 text-[11px] font-medium transition-colors",
|
|
23276
23267
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
23277
23268
|
),
|
|
@@ -23296,7 +23287,7 @@ function InspectorPaneHeader({
|
|
|
23296
23287
|
{
|
|
23297
23288
|
type: "button",
|
|
23298
23289
|
title: label,
|
|
23299
|
-
className:
|
|
23290
|
+
className: chunkLXUMBK2O_js.cn(
|
|
23300
23291
|
"flex items-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
23301
23292
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
23302
23293
|
),
|
|
@@ -23405,7 +23396,7 @@ function CustomPropertiesBlock({
|
|
|
23405
23396
|
"button",
|
|
23406
23397
|
{
|
|
23407
23398
|
type: "button",
|
|
23408
|
-
className:
|
|
23399
|
+
className: chunkLXUMBK2O_js.cn(BTN, "px-1.5 text-red-400 hover:text-red-300"),
|
|
23409
23400
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
23410
23401
|
children: "\xD7"
|
|
23411
23402
|
}
|
|
@@ -23540,7 +23531,7 @@ function PresentationSettingsCard({
|
|
|
23540
23531
|
"select",
|
|
23541
23532
|
{
|
|
23542
23533
|
disabled: !canEdit,
|
|
23543
|
-
className:
|
|
23534
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-28"),
|
|
23544
23535
|
value: presentationProperties.showType ?? "presented",
|
|
23545
23536
|
onChange: (e) => onUpdate({
|
|
23546
23537
|
showType: e.target.value
|
|
@@ -23598,7 +23589,7 @@ function PresentationSettingsCard({
|
|
|
23598
23589
|
min: 1,
|
|
23599
23590
|
max: 16,
|
|
23600
23591
|
disabled: !canEdit,
|
|
23601
|
-
className:
|
|
23592
|
+
className: chunkLXUMBK2O_js.cn(INPUT, "w-20"),
|
|
23602
23593
|
value: presentationProperties.printSlidesPerPage ?? 1,
|
|
23603
23594
|
onChange: (e) => onUpdate({ printSlidesPerPage: Number(e.target.value) })
|
|
23604
23595
|
}
|
|
@@ -23895,7 +23886,7 @@ function TagsSection({
|
|
|
23895
23886
|
"button",
|
|
23896
23887
|
{
|
|
23897
23888
|
type: "button",
|
|
23898
|
-
className:
|
|
23889
|
+
className: chunkLXUMBK2O_js.cn(BTN, "px-1.5 text-red-400 hover:text-red-300"),
|
|
23899
23890
|
title: t("pptx.tags.deleteTag"),
|
|
23900
23891
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
23901
23892
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -23995,7 +23986,7 @@ function PresentationPropertiesPanel({
|
|
|
23995
23986
|
canEdit
|
|
23996
23987
|
}
|
|
23997
23988
|
),
|
|
23998
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
23989
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkLXUMBK2O_js.cn(CARD, "space-y-1"), children: [
|
|
23999
23990
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: "Slide" }),
|
|
24000
23991
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
24001
23992
|
activeSlide.elements?.length ?? 0,
|
|
@@ -24016,14 +24007,14 @@ function SlideBackgroundPanel({
|
|
|
24016
24007
|
const { t } = reactI18next.useTranslation();
|
|
24017
24008
|
const bgImageInputRef = React14.useRef(null);
|
|
24018
24009
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24019
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
24010
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkLXUMBK2O_js.cn(CARD, "space-y-2"), children: [
|
|
24020
24011
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: "Background" }),
|
|
24021
24012
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
24022
24013
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: "Colour" }),
|
|
24023
24014
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24024
24015
|
DebouncedColorInput,
|
|
24025
24016
|
{
|
|
24026
|
-
value:
|
|
24017
|
+
value: chunkBXACB3BG_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
24027
24018
|
disabled: !canEdit,
|
|
24028
24019
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
24029
24020
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -24062,7 +24053,7 @@ function SlideBackgroundPanel({
|
|
|
24062
24053
|
"button",
|
|
24063
24054
|
{
|
|
24064
24055
|
type: "button",
|
|
24065
|
-
className:
|
|
24056
|
+
className: chunkLXUMBK2O_js.cn(BTN, "flex-1 text-center"),
|
|
24066
24057
|
disabled: !canEdit,
|
|
24067
24058
|
onClick: () => bgImageInputRef.current?.click(),
|
|
24068
24059
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -24095,7 +24086,7 @@ function SlideBackgroundPanel({
|
|
|
24095
24086
|
"button",
|
|
24096
24087
|
{
|
|
24097
24088
|
type: "button",
|
|
24098
|
-
className:
|
|
24089
|
+
className: chunkLXUMBK2O_js.cn(BTN, "w-full text-center text-red-400 hover:text-red-300"),
|
|
24099
24090
|
disabled: !canEdit,
|
|
24100
24091
|
onClick: () => onUpdateSlide({
|
|
24101
24092
|
backgroundColor: void 0,
|
|
@@ -24126,7 +24117,7 @@ function TemplateBackgroundCard({
|
|
|
24126
24117
|
onGetTemplateBackgroundColor
|
|
24127
24118
|
}) {
|
|
24128
24119
|
const { t } = reactI18next.useTranslation();
|
|
24129
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
24120
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkLXUMBK2O_js.cn(CARD, "space-y-2"), children: [
|
|
24130
24121
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
24131
24122
|
activeSlide.layoutPath && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
24132
24123
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24140,7 +24131,7 @@ function TemplateBackgroundCard({
|
|
|
24140
24131
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24141
24132
|
DebouncedColorInput,
|
|
24142
24133
|
{
|
|
24143
|
-
value:
|
|
24134
|
+
value: chunkBXACB3BG_js.normalizeHexColor(
|
|
24144
24135
|
onGetTemplateBackgroundColor(activeSlide.layoutPath),
|
|
24145
24136
|
"#ffffff"
|
|
24146
24137
|
),
|
|
@@ -24170,7 +24161,7 @@ function TemplateBackgroundCard({
|
|
|
24170
24161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24171
24162
|
DebouncedColorInput,
|
|
24172
24163
|
{
|
|
24173
|
-
value:
|
|
24164
|
+
value: chunkBXACB3BG_js.normalizeHexColor(onGetTemplateBackgroundColor(master.path), "#ffffff"),
|
|
24174
24165
|
disabled: !canEdit,
|
|
24175
24166
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
24176
24167
|
onCommit: (hex) => onSetTemplateBackground(master.path, hex)
|
|
@@ -24273,7 +24264,7 @@ function InspectorPane(props) {
|
|
|
24273
24264
|
} = props;
|
|
24274
24265
|
const hasSelection = selectedElement !== null;
|
|
24275
24266
|
const { t } = reactI18next.useTranslation();
|
|
24276
|
-
const { dragY, handlers: dragHandlers } =
|
|
24267
|
+
const { dragY, handlers: dragHandlers } = chunkLXUMBK2O_js.useSheetDismissDrag(onClose);
|
|
24277
24268
|
const {
|
|
24278
24269
|
animationPanelHeight,
|
|
24279
24270
|
effectiveThemeOptions,
|
|
@@ -24294,7 +24285,7 @@ function InspectorPane(props) {
|
|
|
24294
24285
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24295
24286
|
"div",
|
|
24296
24287
|
{
|
|
24297
|
-
className:
|
|
24288
|
+
className: chunkLXUMBK2O_js.cn(
|
|
24298
24289
|
// Shared styles
|
|
24299
24290
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
24300
24291
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -24332,7 +24323,7 @@ function InspectorPane(props) {
|
|
|
24332
24323
|
),
|
|
24333
24324
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
24334
24325
|
activeTab === "elements" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24335
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24326
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkLXUMBK2O_js.cn(HEADING, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24336
24327
|
activeSlide ? [...activeSlide.elements || []].reverse().map((el, ri) => {
|
|
24337
24328
|
const idx = (activeSlide.elements || []).length - 1 - ri;
|
|
24338
24329
|
const sel = selectedElement?.id === el.id || selectedElementIds.includes(el.id);
|
|
@@ -24341,7 +24332,7 @@ function InspectorPane(props) {
|
|
|
24341
24332
|
"div",
|
|
24342
24333
|
{
|
|
24343
24334
|
title: `${el.type} \u2014 ${el.id}`,
|
|
24344
|
-
className:
|
|
24335
|
+
className: chunkLXUMBK2O_js.cn(
|
|
24345
24336
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
24346
24337
|
sel ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
24347
24338
|
),
|
|
@@ -24749,7 +24740,7 @@ function PresentationToolbar({
|
|
|
24749
24740
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronLeft, { size: 18 })
|
|
24750
24741
|
}
|
|
24751
24742
|
),
|
|
24752
|
-
/* @__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:
|
|
24743
|
+
/* @__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: chunkBXACB3BG_js.formatSlideCounter(currentSlideIndex, totalSlides) }),
|
|
24753
24744
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24754
24745
|
"button",
|
|
24755
24746
|
{
|
|
@@ -24770,7 +24761,7 @@ function PresentationToolbar({
|
|
|
24770
24761
|
title: t("pptx.presenter.elapsed"),
|
|
24771
24762
|
children: [
|
|
24772
24763
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuTimer, { size: 14 }),
|
|
24773
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
24764
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: chunkBXACB3BG_js.formatElapsed(elapsed) })
|
|
24774
24765
|
]
|
|
24775
24766
|
}
|
|
24776
24767
|
),
|
|
@@ -24944,7 +24935,7 @@ function PresentationTouchControls({
|
|
|
24944
24935
|
onEndPresentation
|
|
24945
24936
|
}) {
|
|
24946
24937
|
const { t } = reactI18next.useTranslation();
|
|
24947
|
-
const { isTouchDevice } =
|
|
24938
|
+
const { isTouchDevice } = chunkLXUMBK2O_js.useIsMobile();
|
|
24948
24939
|
if (!isTouchDevice) {
|
|
24949
24940
|
return null;
|
|
24950
24941
|
}
|
|
@@ -25028,7 +25019,7 @@ function SlideLayer({ slide, templateElements, canvasSize }) {
|
|
|
25028
25019
|
style: {
|
|
25029
25020
|
width: safeWidth,
|
|
25030
25021
|
height: safeHeight,
|
|
25031
|
-
backgroundColor: slide.backgroundColor ?
|
|
25022
|
+
backgroundColor: slide.backgroundColor ? chunkBXACB3BG_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
25032
25023
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
25033
25024
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
25034
25025
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|
|
@@ -25071,7 +25062,7 @@ function PresentationTransitionOverlay({
|
|
|
25071
25062
|
};
|
|
25072
25063
|
}, [durationMs, onComplete]);
|
|
25073
25064
|
const animations = React14.useMemo(
|
|
25074
|
-
() =>
|
|
25065
|
+
() => chunkBXACB3BG_js.getSlideTransitionAnimations(
|
|
25075
25066
|
transition.type,
|
|
25076
25067
|
durationMs,
|
|
25077
25068
|
transition.direction,
|
|
@@ -25097,7 +25088,7 @@ function PresentationTransitionOverlay({
|
|
|
25097
25088
|
className: "pptx-react-transition-overlay absolute inset-0 pointer-events-none overflow-hidden",
|
|
25098
25089
|
style: { zIndex: outgoingZIndex },
|
|
25099
25090
|
children: [
|
|
25100
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25091
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkBXACB3BG_js.SLIDE_TRANSITION_KEYFRAMES }),
|
|
25101
25092
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25102
25093
|
"div",
|
|
25103
25094
|
{
|
|
@@ -25197,8 +25188,8 @@ function NotesPagePreview({
|
|
|
25197
25188
|
maxPages = 3
|
|
25198
25189
|
}) {
|
|
25199
25190
|
const { t } = reactI18next.useTranslation();
|
|
25200
|
-
const pages = React14.useMemo(() =>
|
|
25201
|
-
const printable = React14.useMemo(() =>
|
|
25191
|
+
const pages = React14.useMemo(() => chunkBXACB3BG_js.computeAllNotesPages(slideIndices), [slideIndices]);
|
|
25192
|
+
const printable = React14.useMemo(() => chunkBXACB3BG_js.getNotesPrintableArea(), []);
|
|
25202
25193
|
const visiblePages = pages.slice(0, maxPages);
|
|
25203
25194
|
const scaledW = printable.width * PREVIEW_SCALE;
|
|
25204
25195
|
const scaledH = printable.height * PREVIEW_SCALE;
|
|
@@ -25286,13 +25277,13 @@ function PrintPreview({
|
|
|
25286
25277
|
}) {
|
|
25287
25278
|
const { t } = reactI18next.useTranslation();
|
|
25288
25279
|
const pages = React14.useMemo(
|
|
25289
|
-
() =>
|
|
25280
|
+
() => chunkBXACB3BG_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
25290
25281
|
[slideIndices, slidesPerPage, orientation]
|
|
25291
25282
|
);
|
|
25292
|
-
const printable = React14.useMemo(() =>
|
|
25283
|
+
const printable = React14.useMemo(() => chunkBXACB3BG_js.getPrintableArea(orientation), [orientation]);
|
|
25293
25284
|
const visiblePages = pages.slice(0, maxPages);
|
|
25294
25285
|
const isThreePerPage = slidesPerPage === 3;
|
|
25295
|
-
const noteLineCount =
|
|
25286
|
+
const noteLineCount = chunkBXACB3BG_js.generateNoteLineCount();
|
|
25296
25287
|
const scaledW = printable.width * PREVIEW_SCALE2;
|
|
25297
25288
|
const scaledH = printable.height * PREVIEW_SCALE2;
|
|
25298
25289
|
const noteAreaFraction = 0.5;
|
|
@@ -25457,7 +25448,7 @@ function PrintSettingsPanel({
|
|
|
25457
25448
|
] }),
|
|
25458
25449
|
printWhat === "handouts" && /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { children: [
|
|
25459
25450
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide", children: t("pptx.print.slidesPerPage") }),
|
|
25460
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 flex-wrap", children:
|
|
25451
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 flex-wrap", children: chunkBXACB3BG_js.HANDOUT_OPTIONS.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
25461
25452
|
"button",
|
|
25462
25453
|
{
|
|
25463
25454
|
type: "button",
|
|
@@ -25643,13 +25634,13 @@ function PrintDialog({
|
|
|
25643
25634
|
defaultFrameSlides
|
|
25644
25635
|
}) {
|
|
25645
25636
|
const { t } = reactI18next.useTranslation();
|
|
25646
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
25637
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onClose);
|
|
25647
25638
|
const [printWhat, setPrintWhat] = React14.useState("slides");
|
|
25648
25639
|
const [orientation, setOrientation] = React14.useState("landscape");
|
|
25649
25640
|
const [colorMode, setColorMode] = React14.useState("color");
|
|
25650
25641
|
const [frameSlides, setFrameSlides] = React14.useState(defaultFrameSlides ?? false);
|
|
25651
25642
|
const [slidesPerPage, setSlidesPerPage] = React14.useState(
|
|
25652
|
-
|
|
25643
|
+
chunkBXACB3BG_js.HANDOUT_OPTIONS.includes(defaultSlidesPerPage) ? defaultSlidesPerPage : 6
|
|
25653
25644
|
);
|
|
25654
25645
|
const [slideRange, setSlideRange] = React14.useState("all");
|
|
25655
25646
|
const [customFrom, setCustomFrom] = React14.useState(1);
|
|
@@ -26172,19 +26163,19 @@ function BroadcastDialog({
|
|
|
26172
26163
|
const [serverUrl, setServerUrl] = React14.useState("");
|
|
26173
26164
|
const [copied, setCopied] = React14.useState(false);
|
|
26174
26165
|
const dialogRef = React14.useRef(null);
|
|
26175
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26166
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onClose);
|
|
26176
26167
|
useModalFocus(open, dialogRef, onClose);
|
|
26177
26168
|
React14.useEffect(() => {
|
|
26178
26169
|
if (open && !isBroadcasting) {
|
|
26179
|
-
const broadcastRoom = defaultRoomId ? `broadcast-${defaultRoomId}` :
|
|
26170
|
+
const broadcastRoom = defaultRoomId ? `broadcast-${defaultRoomId}` : chunkBXACB3BG_js.generateBroadcastRoomId();
|
|
26180
26171
|
setRoomId(broadcastRoom);
|
|
26181
26172
|
setUserName(defaultUserName ?? "");
|
|
26182
|
-
setServerUrl(defaultServerUrl ??
|
|
26173
|
+
setServerUrl(defaultServerUrl ?? chunkBXACB3BG_js.DEFAULT_BROADCAST_SERVER_URL);
|
|
26183
26174
|
}
|
|
26184
26175
|
}, [open, isBroadcasting, defaultRoomId, defaultUserName, defaultServerUrl]);
|
|
26185
26176
|
const activeRoomId = isBroadcasting ? collab.config.roomId : roomId;
|
|
26186
26177
|
const activeServerUrl = isBroadcasting ? collab.config.serverUrl : serverUrl;
|
|
26187
|
-
const broadcastUrl = typeof window !== "undefined" ?
|
|
26178
|
+
const broadcastUrl = typeof window !== "undefined" ? chunkBXACB3BG_js.buildBroadcastViewerUrl(activeRoomId, activeServerUrl, window.location) : activeRoomId;
|
|
26188
26179
|
const handleCopyUrl = React14.useCallback(() => {
|
|
26189
26180
|
void navigator.clipboard.writeText(broadcastUrl).then(() => {
|
|
26190
26181
|
setCopied(true);
|
|
@@ -26203,7 +26194,7 @@ function BroadcastDialog({
|
|
|
26203
26194
|
userName: userName.trim(),
|
|
26204
26195
|
role: "owner",
|
|
26205
26196
|
// A blank server broadcasts over the serverless peer-to-peer transport.
|
|
26206
|
-
transport:
|
|
26197
|
+
transport: chunkBXACB3BG_js.resolveTransportForServerUrl(trimmedServer)
|
|
26207
26198
|
});
|
|
26208
26199
|
setTimeout(() => {
|
|
26209
26200
|
onStartPresenting?.();
|
|
@@ -26473,7 +26464,7 @@ function isP2P(config) {
|
|
|
26473
26464
|
return config.transport === "webrtc" || !config.serverUrl?.trim();
|
|
26474
26465
|
}
|
|
26475
26466
|
function shareUrl(config) {
|
|
26476
|
-
return
|
|
26467
|
+
return chunkBXACB3BG_js.buildCollaborationShareUrl(
|
|
26477
26468
|
config,
|
|
26478
26469
|
typeof window === "undefined" ? void 0 : { origin: window.location.origin, pathname: window.location.pathname }
|
|
26479
26470
|
);
|
|
@@ -26709,7 +26700,7 @@ function StartSessionForm({
|
|
|
26709
26700
|
] });
|
|
26710
26701
|
}
|
|
26711
26702
|
function shareUrl2(config) {
|
|
26712
|
-
return
|
|
26703
|
+
return chunkBXACB3BG_js.buildCollaborationShareUrl(
|
|
26713
26704
|
config,
|
|
26714
26705
|
typeof window === "undefined" ? void 0 : { origin: window.location.origin, pathname: window.location.pathname }
|
|
26715
26706
|
);
|
|
@@ -26735,7 +26726,7 @@ function ShareDialog({
|
|
|
26735
26726
|
const [invitation, setInvitation] = React14.useState("");
|
|
26736
26727
|
const [copied, setCopied] = React14.useState(false);
|
|
26737
26728
|
const dialogRef = React14.useRef(null);
|
|
26738
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26729
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onClose);
|
|
26739
26730
|
useModalFocus(open, dialogRef, onClose);
|
|
26740
26731
|
React14.useEffect(() => {
|
|
26741
26732
|
if (activeCollaboration) {
|
|
@@ -26753,12 +26744,12 @@ function ShareDialog({
|
|
|
26753
26744
|
});
|
|
26754
26745
|
}, [activeCollaboration, roomId, serverUrl]);
|
|
26755
26746
|
const handleStartSharing = React14.useCallback(() => {
|
|
26756
|
-
const config = mode === "join" ?
|
|
26747
|
+
const config = mode === "join" ? chunkBXACB3BG_js.buildJoinCollaborationConfig({ invitation, userName, serverUrl }) : chunkBXACB3BG_js.buildCreateCollaborationConfig({ roomId, userName, serverUrl });
|
|
26757
26748
|
if (config) {
|
|
26758
26749
|
onStartCollaboration?.(config);
|
|
26759
26750
|
}
|
|
26760
26751
|
}, [invitation, mode, roomId, userName, serverUrl, onStartCollaboration]);
|
|
26761
|
-
const canStart = (mode === "join" ?
|
|
26752
|
+
const canStart = (mode === "join" ? chunkBXACB3BG_js.buildJoinCollaborationConfig({ invitation, userName, serverUrl }) : chunkBXACB3BG_js.buildCreateCollaborationConfig({ roomId, userName, serverUrl })) !== null;
|
|
26762
26753
|
if (!open) {
|
|
26763
26754
|
return null;
|
|
26764
26755
|
}
|
|
@@ -27010,12 +27001,12 @@ function HyperlinkEditDialog({
|
|
|
27010
27001
|
onCancel
|
|
27011
27002
|
}) {
|
|
27012
27003
|
const { t } = reactI18next.useTranslation();
|
|
27013
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27004
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onCancel);
|
|
27014
27005
|
const inputRef = React14.useRef(null);
|
|
27015
|
-
const detectedType =
|
|
27016
|
-
const emailParts =
|
|
27017
|
-
const detectedSlide =
|
|
27018
|
-
const detectedVerb = initialAction ?
|
|
27006
|
+
const detectedType = chunkLXUMBK2O_js.detectTargetType(initialUrl, initialAction);
|
|
27007
|
+
const emailParts = chunkLXUMBK2O_js.parseEmailUrl(initialUrl || "");
|
|
27008
|
+
const detectedSlide = chunkLXUMBK2O_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
27009
|
+
const detectedVerb = initialAction ? chunkLXUMBK2O_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
27019
27010
|
const [targetType, setTargetType] = React14.useState(detectedType);
|
|
27020
27011
|
const [url, setUrl] = React14.useState(
|
|
27021
27012
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -27046,7 +27037,7 @@ function HyperlinkEditDialog({
|
|
|
27046
27037
|
actionVerb
|
|
27047
27038
|
});
|
|
27048
27039
|
};
|
|
27049
|
-
const tabCls = (active) =>
|
|
27040
|
+
const tabCls = (active) => chunkLXUMBK2O_js.cn(
|
|
27050
27041
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
27051
27042
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
27052
27043
|
);
|
|
@@ -27264,7 +27255,7 @@ function CommentMarkersOverlay({
|
|
|
27264
27255
|
onCommentMarkerClick
|
|
27265
27256
|
}) {
|
|
27266
27257
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none z-[45]", children: comments.map((comment, idx) => {
|
|
27267
|
-
const pos =
|
|
27258
|
+
const pos = chunkBXACB3BG_js.getCommentMarkerPosition(comment, idx, canvasSize.width, canvasSize.height);
|
|
27268
27259
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27269
27260
|
"div",
|
|
27270
27261
|
{
|
|
@@ -27316,7 +27307,7 @@ function ConnectorOverlay({
|
|
|
27316
27307
|
style: { pointerEvents: connectorDragState ? "auto" : "none" },
|
|
27317
27308
|
children: [
|
|
27318
27309
|
activeSlide.elements.filter((el) => el.type !== "connector").map((el) => {
|
|
27319
|
-
const sites =
|
|
27310
|
+
const sites = chunkBXACB3BG_js.getConnectionSites(el.width, el.height);
|
|
27320
27311
|
return sites.map((site) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
27321
27312
|
"div",
|
|
27322
27313
|
{
|
|
@@ -27358,7 +27349,7 @@ function ConnectorDragPreview({
|
|
|
27358
27349
|
if (!startEl) {
|
|
27359
27350
|
return null;
|
|
27360
27351
|
}
|
|
27361
|
-
const startSites =
|
|
27352
|
+
const startSites = chunkBXACB3BG_js.getConnectionSites(startEl.width, startEl.height);
|
|
27362
27353
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
27363
27354
|
const sx = startEl.x + startSite.x;
|
|
27364
27355
|
const sy = startEl.y + startSite.y;
|
|
@@ -27436,7 +27427,7 @@ function DrawingOverlaySvg({
|
|
|
27436
27427
|
}
|
|
27437
27428
|
);
|
|
27438
27429
|
}
|
|
27439
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
27430
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkLXUMBK2O_js.GRID_SIZE, visible }) {
|
|
27440
27431
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
27441
27432
|
const patternId = React14.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
27442
27433
|
if (!visible) {
|
|
@@ -27457,15 +27448,15 @@ function GridOverlay({ canvasSize, gridSpacingPx = chunkH5V24JVW_js.GRID_SIZE, v
|
|
|
27457
27448
|
);
|
|
27458
27449
|
}
|
|
27459
27450
|
var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight }) => {
|
|
27460
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: widthPx, height:
|
|
27461
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: widthPx, height:
|
|
27451
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: widthPx, height: chunkBXACB3BG_js.RULER_THICKNESS, className: "block select-none", "aria-hidden": "true", children: [
|
|
27452
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: widthPx, height: chunkBXACB3BG_js.RULER_THICKNESS, className: "fill-gray-100 dark:fill-gray-800" }),
|
|
27462
27453
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27463
27454
|
"line",
|
|
27464
27455
|
{
|
|
27465
27456
|
x1: 0,
|
|
27466
|
-
y1:
|
|
27457
|
+
y1: chunkBXACB3BG_js.RULER_THICKNESS - 0.5,
|
|
27467
27458
|
x2: widthPx,
|
|
27468
|
-
y2:
|
|
27459
|
+
y2: chunkBXACB3BG_js.RULER_THICKNESS - 0.5,
|
|
27469
27460
|
className: "stroke-border",
|
|
27470
27461
|
strokeWidth: 1
|
|
27471
27462
|
}
|
|
@@ -27476,20 +27467,20 @@ var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight
|
|
|
27476
27467
|
x: highlight.start,
|
|
27477
27468
|
y: 0,
|
|
27478
27469
|
width: Math.max(highlight.end - highlight.start, 1),
|
|
27479
|
-
height:
|
|
27470
|
+
height: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27480
27471
|
className: "fill-primary/20"
|
|
27481
27472
|
}
|
|
27482
27473
|
),
|
|
27483
27474
|
ticks.map((tick, i) => {
|
|
27484
|
-
const tickHeight = tick.isMajor ?
|
|
27475
|
+
const tickHeight = tick.isMajor ? chunkBXACB3BG_js.RULER_THICKNESS * 0.6 : chunkBXACB3BG_js.RULER_THICKNESS * 0.3;
|
|
27485
27476
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
27486
27477
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27487
27478
|
"line",
|
|
27488
27479
|
{
|
|
27489
27480
|
x1: tick.position,
|
|
27490
|
-
y1:
|
|
27481
|
+
y1: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27491
27482
|
x2: tick.position,
|
|
27492
|
-
y2:
|
|
27483
|
+
y2: chunkBXACB3BG_js.RULER_THICKNESS - tickHeight,
|
|
27493
27484
|
className: "stroke-gray-400 dark:stroke-gray-500",
|
|
27494
27485
|
strokeWidth: tick.isMajor ? 1 : 0.5
|
|
27495
27486
|
}
|
|
@@ -27498,8 +27489,8 @@ var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight
|
|
|
27498
27489
|
"text",
|
|
27499
27490
|
{
|
|
27500
27491
|
x: tick.position + 2,
|
|
27501
|
-
y:
|
|
27502
|
-
fontSize:
|
|
27492
|
+
y: chunkBXACB3BG_js.RULER_FONT_SIZE + 1,
|
|
27493
|
+
fontSize: chunkBXACB3BG_js.RULER_FONT_SIZE,
|
|
27503
27494
|
className: "fill-gray-500 dark:fill-gray-400",
|
|
27504
27495
|
style: { fontFamily: "system-ui, sans-serif" },
|
|
27505
27496
|
children: tick.label
|
|
@@ -27511,11 +27502,11 @@ var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight
|
|
|
27511
27502
|
});
|
|
27512
27503
|
HorizontalRuler.displayName = "HorizontalRuler";
|
|
27513
27504
|
var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight }) => {
|
|
27514
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width:
|
|
27505
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: chunkBXACB3BG_js.RULER_THICKNESS, height: heightPx, className: "block select-none", "aria-hidden": "true", children: [
|
|
27515
27506
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27516
27507
|
"rect",
|
|
27517
27508
|
{
|
|
27518
|
-
width:
|
|
27509
|
+
width: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27519
27510
|
height: heightPx,
|
|
27520
27511
|
className: "fill-gray-100 dark:fill-gray-800"
|
|
27521
27512
|
}
|
|
@@ -27523,9 +27514,9 @@ var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight
|
|
|
27523
27514
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27524
27515
|
"line",
|
|
27525
27516
|
{
|
|
27526
|
-
x1:
|
|
27517
|
+
x1: chunkBXACB3BG_js.RULER_THICKNESS - 0.5,
|
|
27527
27518
|
y1: 0,
|
|
27528
|
-
x2:
|
|
27519
|
+
x2: chunkBXACB3BG_js.RULER_THICKNESS - 0.5,
|
|
27529
27520
|
y2: heightPx,
|
|
27530
27521
|
className: "stroke-border",
|
|
27531
27522
|
strokeWidth: 1
|
|
@@ -27536,20 +27527,20 @@ var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight
|
|
|
27536
27527
|
{
|
|
27537
27528
|
x: 0,
|
|
27538
27529
|
y: highlight.start,
|
|
27539
|
-
width:
|
|
27530
|
+
width: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27540
27531
|
height: Math.max(highlight.end - highlight.start, 1),
|
|
27541
27532
|
className: "fill-primary/20"
|
|
27542
27533
|
}
|
|
27543
27534
|
),
|
|
27544
27535
|
ticks.map((tick, i) => {
|
|
27545
|
-
const tickWidth = tick.isMajor ?
|
|
27536
|
+
const tickWidth = tick.isMajor ? chunkBXACB3BG_js.RULER_THICKNESS * 0.6 : chunkBXACB3BG_js.RULER_THICKNESS * 0.3;
|
|
27546
27537
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
27547
27538
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27548
27539
|
"line",
|
|
27549
27540
|
{
|
|
27550
|
-
x1:
|
|
27541
|
+
x1: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27551
27542
|
y1: tick.position,
|
|
27552
|
-
x2:
|
|
27543
|
+
x2: chunkBXACB3BG_js.RULER_THICKNESS - tickWidth,
|
|
27553
27544
|
y2: tick.position,
|
|
27554
27545
|
className: "stroke-gray-400 dark:stroke-gray-500",
|
|
27555
27546
|
strokeWidth: tick.isMajor ? 1 : 0.5
|
|
@@ -27559,8 +27550,8 @@ var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight
|
|
|
27559
27550
|
"text",
|
|
27560
27551
|
{
|
|
27561
27552
|
x: 2,
|
|
27562
|
-
y: tick.position +
|
|
27563
|
-
fontSize:
|
|
27553
|
+
y: tick.position + chunkBXACB3BG_js.RULER_FONT_SIZE + 2,
|
|
27554
|
+
fontSize: chunkBXACB3BG_js.RULER_FONT_SIZE,
|
|
27564
27555
|
className: "fill-gray-500 dark:fill-gray-400",
|
|
27565
27556
|
style: { fontFamily: "system-ui, sans-serif" },
|
|
27566
27557
|
children: tick.label
|
|
@@ -27580,11 +27571,11 @@ function Ruler({
|
|
|
27580
27571
|
onCreateGuideFromRuler
|
|
27581
27572
|
}) {
|
|
27582
27573
|
const hTicks = React14.useMemo(
|
|
27583
|
-
() =>
|
|
27574
|
+
() => chunkBXACB3BG_js.generateTicks(canvasSize.width, editorScale, unit),
|
|
27584
27575
|
[canvasSize.width, editorScale, unit]
|
|
27585
27576
|
);
|
|
27586
27577
|
const vTicks = React14.useMemo(
|
|
27587
|
-
() =>
|
|
27578
|
+
() => chunkBXACB3BG_js.generateTicks(canvasSize.height, editorScale, unit),
|
|
27588
27579
|
[canvasSize.height, editorScale, unit]
|
|
27589
27580
|
);
|
|
27590
27581
|
const hHighlight = React14.useMemo(() => {
|
|
@@ -27648,8 +27639,8 @@ function Ruler({
|
|
|
27648
27639
|
}
|
|
27649
27640
|
const rect = rulerEl.getBoundingClientRect();
|
|
27650
27641
|
const posScaled = e.clientY - rect.top;
|
|
27651
|
-
if (posScaled >
|
|
27652
|
-
const positionPx = (posScaled -
|
|
27642
|
+
if (posScaled > chunkBXACB3BG_js.RULER_THICKNESS) {
|
|
27643
|
+
const positionPx = (posScaled - chunkBXACB3BG_js.RULER_THICKNESS) / scale;
|
|
27653
27644
|
if (positionPx >= 0 && positionPx <= canvasSize.height) {
|
|
27654
27645
|
onCreateGuideFromRuler("h", positionPx);
|
|
27655
27646
|
}
|
|
@@ -27662,8 +27653,8 @@ function Ruler({
|
|
|
27662
27653
|
}
|
|
27663
27654
|
const rect = rulerEl.getBoundingClientRect();
|
|
27664
27655
|
const posScaled = e.clientX - rect.left;
|
|
27665
|
-
if (posScaled >
|
|
27666
|
-
const positionPx = (posScaled -
|
|
27656
|
+
if (posScaled > chunkBXACB3BG_js.RULER_THICKNESS) {
|
|
27657
|
+
const positionPx = (posScaled - chunkBXACB3BG_js.RULER_THICKNESS) / scale;
|
|
27667
27658
|
if (positionPx >= 0 && positionPx <= canvasSize.width) {
|
|
27668
27659
|
onCreateGuideFromRuler("v", positionPx);
|
|
27669
27660
|
}
|
|
@@ -27686,8 +27677,8 @@ function Ruler({
|
|
|
27686
27677
|
style: {
|
|
27687
27678
|
top: 0,
|
|
27688
27679
|
left: 0,
|
|
27689
|
-
width:
|
|
27690
|
-
height:
|
|
27680
|
+
width: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27681
|
+
height: chunkBXACB3BG_js.RULER_THICKNESS
|
|
27691
27682
|
}
|
|
27692
27683
|
}
|
|
27693
27684
|
),
|
|
@@ -27698,9 +27689,9 @@ function Ruler({
|
|
|
27698
27689
|
className: "absolute z-[50] overflow-visible",
|
|
27699
27690
|
style: {
|
|
27700
27691
|
top: 0,
|
|
27701
|
-
left:
|
|
27692
|
+
left: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27702
27693
|
width: scaledWidth,
|
|
27703
|
-
height:
|
|
27694
|
+
height: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27704
27695
|
cursor: onCreateGuideFromRuler ? "row-resize" : void 0
|
|
27705
27696
|
},
|
|
27706
27697
|
onPointerDown: handleHRulerPointerDown,
|
|
@@ -27714,9 +27705,9 @@ function Ruler({
|
|
|
27714
27705
|
ref: vRulerRef,
|
|
27715
27706
|
className: "absolute z-[50] overflow-visible",
|
|
27716
27707
|
style: {
|
|
27717
|
-
top:
|
|
27708
|
+
top: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27718
27709
|
left: 0,
|
|
27719
|
-
width:
|
|
27710
|
+
width: chunkBXACB3BG_js.RULER_THICKNESS,
|
|
27720
27711
|
height: scaledHeight,
|
|
27721
27712
|
cursor: onCreateGuideFromRuler ? "col-resize" : void 0
|
|
27722
27713
|
},
|
|
@@ -27961,8 +27952,8 @@ function useConnectorCreation({
|
|
|
27961
27952
|
setConnectorDragState(null);
|
|
27962
27953
|
return;
|
|
27963
27954
|
}
|
|
27964
|
-
const startSites =
|
|
27965
|
-
const endSites =
|
|
27955
|
+
const startSites = chunkBXACB3BG_js.getConnectionSites(startEl.width, startEl.height);
|
|
27956
|
+
const endSites = chunkBXACB3BG_js.getConnectionSites(endEl.width, endEl.height);
|
|
27966
27957
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
27967
27958
|
const endSite = endSites[targetSiteIndex] ?? endSites[0];
|
|
27968
27959
|
const sx = startEl.x + startSite.x;
|
|
@@ -28435,7 +28426,7 @@ function SlideCanvas({
|
|
|
28435
28426
|
onAddFreeformShape,
|
|
28436
28427
|
onEraseInkElement
|
|
28437
28428
|
});
|
|
28438
|
-
const rulerOffset = showRulers ?
|
|
28429
|
+
const rulerOffset = showRulers ? chunkBXACB3BG_js.RULER_THICKNESS : 0;
|
|
28439
28430
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28440
28431
|
"div",
|
|
28441
28432
|
{
|
|
@@ -28525,7 +28516,7 @@ function SlideCanvas({
|
|
|
28525
28516
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
28526
28517
|
renderInk: false,
|
|
28527
28518
|
renderGroups: false,
|
|
28528
|
-
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ?
|
|
28519
|
+
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ? chunkBXACB3BG_js.getShapeAdjustmentHandleDescriptor(element) : null,
|
|
28529
28520
|
onResizePointerDown: stableResizePointerDown,
|
|
28530
28521
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
28531
28522
|
onRotate: stableRotate,
|
|
@@ -28565,7 +28556,7 @@ function SlideCanvas({
|
|
|
28565
28556
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
28566
28557
|
renderInk: true,
|
|
28567
28558
|
renderGroups: true,
|
|
28568
|
-
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ?
|
|
28559
|
+
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ? chunkBXACB3BG_js.getShapeAdjustmentHandleDescriptor(element) : null,
|
|
28569
28560
|
onResizePointerDown: stableResizePointerDown,
|
|
28570
28561
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
28571
28562
|
onRotate: stableRotate,
|
|
@@ -28934,7 +28925,7 @@ function TitleBar(p) {
|
|
|
28934
28925
|
const [searchQuery, setSearchQuery] = React14.useState("");
|
|
28935
28926
|
const [searchFocused, setSearchFocused] = React14.useState(false);
|
|
28936
28927
|
const searchRef = React14.useRef(null);
|
|
28937
|
-
const commandResults =
|
|
28928
|
+
const commandResults = chunkBXACB3BG_js.filterCommands(searchQuery, t);
|
|
28938
28929
|
const handleCommandSelect = React14.useCallback(
|
|
28939
28930
|
(entry) => {
|
|
28940
28931
|
p.onCommandSearch?.(entry.command);
|
|
@@ -28968,17 +28959,17 @@ function TitleBar(p) {
|
|
|
28968
28959
|
document.addEventListener("mousedown", handler);
|
|
28969
28960
|
return () => document.removeEventListener("mousedown", handler);
|
|
28970
28961
|
}, []);
|
|
28971
|
-
const statusKey =
|
|
28962
|
+
const statusKey = chunkBXACB3BG_js.resolveTitleBarStatusKey({
|
|
28972
28963
|
autosaveState: p.autosaveStatus?.state ?? "idle",
|
|
28973
28964
|
isDirty: p.isDirty,
|
|
28974
28965
|
autosaveEnabled: p.autosaveEnabled,
|
|
28975
28966
|
disabledReason: p.autosaveStatus?.state === "disabled" ? p.autosaveStatus.reason : void 0
|
|
28976
28967
|
});
|
|
28977
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
28978
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
28968
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.container, "data-pptx-title-bar": "", children: [
|
|
28969
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.logo, "aria-hidden": "true", children: "P" }),
|
|
28979
28970
|
editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
28980
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
28981
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
28971
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.autosaveGroup, children: [
|
|
28972
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.autosaveLabel, children: t("pptx.titleBar.autoSave") }),
|
|
28982
28973
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28983
28974
|
"button",
|
|
28984
28975
|
{
|
|
@@ -28986,32 +28977,32 @@ function TitleBar(p) {
|
|
|
28986
28977
|
role: "switch",
|
|
28987
28978
|
"aria-checked": p.autosaveEnabled,
|
|
28988
28979
|
onClick: p.onToggleAutosave,
|
|
28989
|
-
className:
|
|
28990
|
-
|
|
28991
|
-
p.autosaveEnabled ?
|
|
28980
|
+
className: chunkLXUMBK2O_js.cn(
|
|
28981
|
+
chunkBXACB3BG_js.TITLE_BAR_CLASSES.toggleTrack,
|
|
28982
|
+
p.autosaveEnabled ? chunkBXACB3BG_js.TITLE_BAR_CLASSES.toggleTrackOn : chunkBXACB3BG_js.TITLE_BAR_CLASSES.toggleTrackOff
|
|
28992
28983
|
),
|
|
28993
28984
|
title: t("pptx.titleBar.toggleAutoSave"),
|
|
28994
28985
|
"aria-label": t("pptx.titleBar.toggleAutoSave"),
|
|
28995
28986
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28996
28987
|
"span",
|
|
28997
28988
|
{
|
|
28998
|
-
className:
|
|
28999
|
-
|
|
29000
|
-
p.autosaveEnabled ?
|
|
28989
|
+
className: chunkLXUMBK2O_js.cn(
|
|
28990
|
+
chunkBXACB3BG_js.TITLE_BAR_CLASSES.toggleKnob,
|
|
28991
|
+
p.autosaveEnabled ? chunkBXACB3BG_js.TITLE_BAR_CLASSES.toggleKnobOn : chunkBXACB3BG_js.TITLE_BAR_CLASSES.toggleKnobOff
|
|
29001
28992
|
)
|
|
29002
28993
|
}
|
|
29003
28994
|
)
|
|
29004
28995
|
}
|
|
29005
28996
|
),
|
|
29006
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
28997
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.autosaveLabel, children: t(p.autosaveEnabled ? "pptx.titleBar.autoSaveOn" : "pptx.titleBar.autoSaveOff") })
|
|
29007
28998
|
] }),
|
|
29008
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
28999
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.separator }),
|
|
29009
29000
|
p.onSave && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29010
29001
|
"button",
|
|
29011
29002
|
{
|
|
29012
29003
|
type: "button",
|
|
29013
29004
|
onClick: p.onSave,
|
|
29014
|
-
className:
|
|
29005
|
+
className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.quickButton,
|
|
29015
29006
|
title: t("pptx.titleBar.save"),
|
|
29016
29007
|
"aria-label": t("pptx.titleBar.save"),
|
|
29017
29008
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSave, { className: "w-3.5 h-3.5" })
|
|
@@ -29023,7 +29014,7 @@ function TitleBar(p) {
|
|
|
29023
29014
|
type: "button",
|
|
29024
29015
|
onClick: p.onUndo,
|
|
29025
29016
|
disabled: !p.canUndo,
|
|
29026
|
-
className:
|
|
29017
|
+
className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.quickButton,
|
|
29027
29018
|
title: p.undoLabel ? t("pptx.toolbar.undoAction", { action: p.undoLabel }) : t("pptx.toolbar.undo"),
|
|
29028
29019
|
"aria-label": t("pptx.toolbar.undo"),
|
|
29029
29020
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuUndo, { className: "w-3.5 h-3.5" })
|
|
@@ -29035,41 +29026,41 @@ function TitleBar(p) {
|
|
|
29035
29026
|
type: "button",
|
|
29036
29027
|
onClick: p.onRedo,
|
|
29037
29028
|
disabled: !p.canRedo,
|
|
29038
|
-
className:
|
|
29029
|
+
className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.quickButton,
|
|
29039
29030
|
title: p.redoLabel ? t("pptx.toolbar.redoAction", { action: p.redoLabel }) : t("pptx.toolbar.redo"),
|
|
29040
29031
|
"aria-label": t("pptx.toolbar.redo"),
|
|
29041
29032
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuRedo, { className: "w-3.5 h-3.5" })
|
|
29042
29033
|
}
|
|
29043
29034
|
),
|
|
29044
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29035
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.separator })
|
|
29045
29036
|
] }),
|
|
29046
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
29047
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29037
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.fileGroup, children: [
|
|
29038
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.fileName, children: p.fileName || t(chunkBXACB3BG_js.TITLE_BAR_DEFAULT_FILE_KEY) }),
|
|
29048
29039
|
editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
29049
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29040
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.statusDot, "aria-hidden": "true", children: "\u2022" }),
|
|
29050
29041
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29051
29042
|
"span",
|
|
29052
29043
|
{
|
|
29053
|
-
className:
|
|
29054
|
-
|
|
29055
|
-
p.autosaveStatus?.state === "error" && p.autosaveEnabled &&
|
|
29056
|
-
p.autosaveStatus?.state === "saving" && p.autosaveEnabled &&
|
|
29044
|
+
className: chunkLXUMBK2O_js.cn(
|
|
29045
|
+
chunkBXACB3BG_js.TITLE_BAR_CLASSES.statusText,
|
|
29046
|
+
p.autosaveStatus?.state === "error" && p.autosaveEnabled && chunkBXACB3BG_js.TITLE_BAR_CLASSES.statusError,
|
|
29047
|
+
p.autosaveStatus?.state === "saving" && p.autosaveEnabled && chunkBXACB3BG_js.TITLE_BAR_CLASSES.statusSaving
|
|
29057
29048
|
),
|
|
29058
29049
|
children: t(statusKey)
|
|
29059
29050
|
}
|
|
29060
29051
|
)
|
|
29061
29052
|
] })
|
|
29062
29053
|
] }),
|
|
29063
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29054
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_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: [
|
|
29064
29055
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
29065
29056
|
"div",
|
|
29066
29057
|
{
|
|
29067
|
-
className:
|
|
29068
|
-
|
|
29058
|
+
className: chunkLXUMBK2O_js.cn(
|
|
29059
|
+
chunkBXACB3BG_js.TITLE_BAR_CLASSES.searchBox,
|
|
29069
29060
|
(searchFocused || p.findReplaceOpen) && "text-foreground bg-background"
|
|
29070
29061
|
),
|
|
29071
29062
|
children: [
|
|
29072
|
-
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSearch, { className:
|
|
29063
|
+
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSearch, { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.searchIcon }),
|
|
29073
29064
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29074
29065
|
"input",
|
|
29075
29066
|
{
|
|
@@ -29126,7 +29117,7 @@ function TitleBar(p) {
|
|
|
29126
29117
|
) })
|
|
29127
29118
|
] })
|
|
29128
29119
|
] }) }),
|
|
29129
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29120
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkBXACB3BG_js.TITLE_BAR_CLASSES.rightSpacer })
|
|
29130
29121
|
] });
|
|
29131
29122
|
}
|
|
29132
29123
|
function ViewerToolbarSection(props) {
|
|
@@ -29269,7 +29260,7 @@ function ViewerToolbarSection(props) {
|
|
|
29269
29260
|
insertHandlers.handleAddTable();
|
|
29270
29261
|
break;
|
|
29271
29262
|
case "chart":
|
|
29272
|
-
insertHandlers.handleAddChart(
|
|
29263
|
+
insertHandlers.handleAddChart(chunkBXACB3BG_js.DEFAULT_INSERT_CHART_TYPE);
|
|
29273
29264
|
break;
|
|
29274
29265
|
case "smartArt":
|
|
29275
29266
|
dialogs.setIsSmartArtDialogOpen(true);
|
|
@@ -29460,7 +29451,7 @@ function ViewerToolbarSection(props) {
|
|
|
29460
29451
|
onOpenFile,
|
|
29461
29452
|
onOpenRecentFile,
|
|
29462
29453
|
onCreatePresentation: (templateId) => {
|
|
29463
|
-
s.setSlides(
|
|
29454
|
+
s.setSlides(chunkBXACB3BG_js.createBackstagePresentation(templateId));
|
|
29464
29455
|
s.setActiveSlideIndex(0);
|
|
29465
29456
|
s.setSelectedElementId(null);
|
|
29466
29457
|
s.setSelectedElementIds([]);
|
|
@@ -29515,7 +29506,7 @@ function ViewerToolbarSection(props) {
|
|
|
29515
29506
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
29516
29507
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29517
29508
|
formatPainterActive: s.formatPainterActive,
|
|
29518
|
-
canActivateFormatPainter:
|
|
29509
|
+
canActivateFormatPainter: chunkBXACB3BG_js.hasCopyableFormat(selectedElement),
|
|
29519
29510
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29520
29511
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29521
29512
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29626,9 +29617,9 @@ var TEMPLATES = [
|
|
|
29626
29617
|
];
|
|
29627
29618
|
var TEMPLATE_MATHML = TEMPLATES.map((tmpl) => {
|
|
29628
29619
|
try {
|
|
29629
|
-
const tmplOmml =
|
|
29630
|
-
const raw =
|
|
29631
|
-
return raw ?
|
|
29620
|
+
const tmplOmml = chunkBXACB3BG_js.convertLatexToOmml(tmpl.latex);
|
|
29621
|
+
const raw = chunkBXACB3BG_js.convertOmmlToMathMl(tmplOmml);
|
|
29622
|
+
return raw ? chunkBXACB3BG_js.sanitizeMathMl(raw) : "";
|
|
29632
29623
|
} catch {
|
|
29633
29624
|
return "";
|
|
29634
29625
|
}
|
|
@@ -29640,7 +29631,7 @@ function MathMlPreview({ mathml }) {
|
|
|
29640
29631
|
return;
|
|
29641
29632
|
}
|
|
29642
29633
|
if (mathml) {
|
|
29643
|
-
containerRef.current.innerHTML =
|
|
29634
|
+
containerRef.current.innerHTML = chunkBXACB3BG_js.sanitizeMathMl(mathml);
|
|
29644
29635
|
} else {
|
|
29645
29636
|
containerRef.current.innerHTML = "";
|
|
29646
29637
|
}
|
|
@@ -29661,12 +29652,12 @@ function EquationEditorDialog({
|
|
|
29661
29652
|
existingOmml
|
|
29662
29653
|
}) {
|
|
29663
29654
|
const { t } = reactI18next.useTranslation();
|
|
29664
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29655
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onClose);
|
|
29665
29656
|
const initialLatex = React14.useMemo(() => {
|
|
29666
29657
|
if (!existingOmml) {
|
|
29667
29658
|
return "";
|
|
29668
29659
|
}
|
|
29669
|
-
return
|
|
29660
|
+
return chunkBXACB3BG_js.convertOmmlToLatex(existingOmml);
|
|
29670
29661
|
}, [existingOmml]);
|
|
29671
29662
|
const [latex, setLatex] = React14.useState(initialLatex);
|
|
29672
29663
|
const deferredLatex = React14.useDeferredValue(latex);
|
|
@@ -29683,8 +29674,8 @@ function EquationEditorDialog({
|
|
|
29683
29674
|
return { mathml: "", omml: {} };
|
|
29684
29675
|
}
|
|
29685
29676
|
try {
|
|
29686
|
-
const ommlObj =
|
|
29687
|
-
const mathmlStr =
|
|
29677
|
+
const ommlObj = chunkBXACB3BG_js.convertLatexToOmml(deferredLatex);
|
|
29678
|
+
const mathmlStr = chunkBXACB3BG_js.convertOmmlToMathMl(ommlObj);
|
|
29688
29679
|
return { mathml: mathmlStr, omml: ommlObj };
|
|
29689
29680
|
} catch {
|
|
29690
29681
|
return { mathml: "", omml: {} };
|
|
@@ -29696,7 +29687,7 @@ function EquationEditorDialog({
|
|
|
29696
29687
|
}
|
|
29697
29688
|
let insertOmml = omml;
|
|
29698
29689
|
try {
|
|
29699
|
-
const fresh =
|
|
29690
|
+
const fresh = chunkBXACB3BG_js.convertLatexToOmml(latex);
|
|
29700
29691
|
if (fresh && Object.keys(fresh).length > 0) {
|
|
29701
29692
|
insertOmml = fresh;
|
|
29702
29693
|
}
|
|
@@ -29794,7 +29785,7 @@ function EquationEditorDialog({
|
|
|
29794
29785
|
{
|
|
29795
29786
|
type: "button",
|
|
29796
29787
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
29797
|
-
className:
|
|
29788
|
+
className: chunkLXUMBK2O_js.cn(
|
|
29798
29789
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
29799
29790
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
29800
29791
|
),
|
|
@@ -29850,7 +29841,7 @@ var PREVIEW_ELEMENT_HEIGHT = 340;
|
|
|
29850
29841
|
var PREVIEW_TILE_WIDTH = 64;
|
|
29851
29842
|
var FALLBACK_ITEMS = ["1", "2", "3"];
|
|
29852
29843
|
function buildPreviewElement(layout) {
|
|
29853
|
-
const preset =
|
|
29844
|
+
const preset = chunkBXACB3BG_js.PRESETS.find((p) => p.layout === layout);
|
|
29854
29845
|
return {
|
|
29855
29846
|
id: `smartart-preview-${layout}`,
|
|
29856
29847
|
type: "smartArt",
|
|
@@ -29858,7 +29849,7 @@ function buildPreviewElement(layout) {
|
|
|
29858
29849
|
y: 0,
|
|
29859
29850
|
width: PREVIEW_ELEMENT_WIDTH,
|
|
29860
29851
|
height: PREVIEW_ELEMENT_HEIGHT,
|
|
29861
|
-
smartArtData:
|
|
29852
|
+
smartArtData: chunkBXACB3BG_js.buildSmartArtPresetData(layout, preset?.defaultItems ?? FALLBACK_ITEMS)
|
|
29862
29853
|
};
|
|
29863
29854
|
}
|
|
29864
29855
|
function getPreviewForLayout(layout) {
|
|
@@ -29893,17 +29884,17 @@ function InsertSmartArtDialog({
|
|
|
29893
29884
|
onInsert
|
|
29894
29885
|
}) {
|
|
29895
29886
|
const { t } = reactI18next.useTranslation();
|
|
29896
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29887
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onClose);
|
|
29897
29888
|
const [activeCategory, setActiveCategory] = React14.useState("list");
|
|
29898
29889
|
const [selectedLayout, setSelectedLayout] = React14.useState(null);
|
|
29899
29890
|
const dialogRef = React14.useRef(null);
|
|
29900
29891
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
29901
|
-
const filteredPresets =
|
|
29892
|
+
const filteredPresets = chunkBXACB3BG_js.PRESETS.filter((p) => p.category === activeCategory);
|
|
29902
29893
|
const handleInsert = React14.useCallback(() => {
|
|
29903
29894
|
if (!selectedLayout) {
|
|
29904
29895
|
return;
|
|
29905
29896
|
}
|
|
29906
|
-
const preset =
|
|
29897
|
+
const preset = chunkBXACB3BG_js.PRESETS.find((p) => p.layout === selectedLayout);
|
|
29907
29898
|
if (!preset) {
|
|
29908
29899
|
return;
|
|
29909
29900
|
}
|
|
@@ -29966,7 +29957,7 @@ function InsertSmartArtDialog({
|
|
|
29966
29957
|
{
|
|
29967
29958
|
className: "w-40 border-r border-border py-2",
|
|
29968
29959
|
"aria-label": t("pptx.insertSmartArt.categories"),
|
|
29969
|
-
children:
|
|
29960
|
+
children: chunkBXACB3BG_js.CATEGORIES.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29970
29961
|
"button",
|
|
29971
29962
|
{
|
|
29972
29963
|
type: "button",
|
|
@@ -29974,7 +29965,7 @@ function InsertSmartArtDialog({
|
|
|
29974
29965
|
setActiveCategory(cat.id);
|
|
29975
29966
|
setSelectedLayout(null);
|
|
29976
29967
|
},
|
|
29977
|
-
className:
|
|
29968
|
+
className: chunkLXUMBK2O_js.cn(
|
|
29978
29969
|
"w-full text-left px-3 py-1.5 text-xs transition-colors",
|
|
29979
29970
|
activeCategory === cat.id ? "bg-primary text-white" : "text-foreground hover:bg-muted"
|
|
29980
29971
|
),
|
|
@@ -30002,7 +29993,7 @@ function InsertSmartArtDialog({
|
|
|
30002
29993
|
onInsert(preset.layout, preset.defaultItems);
|
|
30003
29994
|
onClose();
|
|
30004
29995
|
},
|
|
30005
|
-
className:
|
|
29996
|
+
className: chunkLXUMBK2O_js.cn(
|
|
30006
29997
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
30007
29998
|
selectedLayout === preset.layout ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
30008
29999
|
),
|
|
@@ -30032,7 +30023,7 @@ function InsertSmartArtDialog({
|
|
|
30032
30023
|
type: "button",
|
|
30033
30024
|
onClick: handleInsert,
|
|
30034
30025
|
disabled: !selectedLayout,
|
|
30035
|
-
className:
|
|
30026
|
+
className: chunkLXUMBK2O_js.cn(
|
|
30036
30027
|
"px-3 py-1.5 text-xs rounded transition-colors",
|
|
30037
30028
|
selectedLayout ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
30038
30029
|
),
|
|
@@ -30374,16 +30365,16 @@ function ViewerCanvasArea(props) {
|
|
|
30374
30365
|
if (mode === "present") {
|
|
30375
30366
|
presentation.handlePresentationAction(action);
|
|
30376
30367
|
} else if (action.url) {
|
|
30377
|
-
|
|
30368
|
+
chunkBXACB3BG_js.safeOpenUrl(action.url);
|
|
30378
30369
|
}
|
|
30379
30370
|
},
|
|
30380
30371
|
[mode, presentation]
|
|
30381
30372
|
);
|
|
30382
30373
|
const handleHyperlinkClick = React14.useCallback(
|
|
30383
30374
|
(url) => {
|
|
30384
|
-
if (
|
|
30375
|
+
if (chunkBXACB3BG_js.isPpactionUrl(url)) {
|
|
30385
30376
|
if (mode === "present") {
|
|
30386
|
-
const parsed =
|
|
30377
|
+
const parsed = chunkBXACB3BG_js.parsePpactionUrl(url);
|
|
30387
30378
|
if (parsed) {
|
|
30388
30379
|
const action = {
|
|
30389
30380
|
action: parsed.action,
|
|
@@ -30394,7 +30385,7 @@ function ViewerCanvasArea(props) {
|
|
|
30394
30385
|
}
|
|
30395
30386
|
return;
|
|
30396
30387
|
}
|
|
30397
|
-
|
|
30388
|
+
chunkBXACB3BG_js.safeOpenUrl(url);
|
|
30398
30389
|
},
|
|
30399
30390
|
[mode, presentation]
|
|
30400
30391
|
);
|
|
@@ -30421,7 +30412,7 @@ function ViewerCanvasArea(props) {
|
|
|
30421
30412
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30422
30413
|
}
|
|
30423
30414
|
}, [mode, presentation, s]);
|
|
30424
|
-
const swipe =
|
|
30415
|
+
const swipe = chunkLXUMBK2O_js.useSwipeNavigation({
|
|
30425
30416
|
enabled: swipeEnabled,
|
|
30426
30417
|
onNext: handleSwipeNext,
|
|
30427
30418
|
onPrev: handleSwipePrev
|
|
@@ -30882,7 +30873,7 @@ function ThemeColorSchemeEditor({
|
|
|
30882
30873
|
onMinorFontChange
|
|
30883
30874
|
}) {
|
|
30884
30875
|
const { t } = reactI18next.useTranslation();
|
|
30885
|
-
const previewGrid = React14.useMemo(() =>
|
|
30876
|
+
const previewGrid = React14.useMemo(() => chunkBXACB3BG_js.buildThemeColorGrid(editColors), [editColors]);
|
|
30886
30877
|
const handleColorText = React14.useCallback(
|
|
30887
30878
|
(val) => {
|
|
30888
30879
|
if (activePickerKey && /^#[0-9a-fA-F]{6}$/.test(val)) {
|
|
@@ -30902,15 +30893,15 @@ function ThemeColorSchemeEditor({
|
|
|
30902
30893
|
disabled: !canEdit,
|
|
30903
30894
|
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`,
|
|
30904
30895
|
style: { backgroundColor: editColors[key] },
|
|
30905
|
-
title: `${
|
|
30906
|
-
"aria-label": `${
|
|
30896
|
+
title: `${chunkBXACB3BG_js.THEME_COLOR_LABELS[key]}: ${editColors[key]}`,
|
|
30897
|
+
"aria-label": `${chunkBXACB3BG_js.THEME_COLOR_LABELS[key]}: ${editColors[key]}`,
|
|
30907
30898
|
onClick: () => onSetActivePickerKey(activePickerKey === key ? null : key)
|
|
30908
30899
|
}
|
|
30909
30900
|
),
|
|
30910
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children:
|
|
30901
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children: chunkBXACB3BG_js.THEME_COLOR_LABELS[key] })
|
|
30911
30902
|
] }, key)) }),
|
|
30912
30903
|
activePickerKey && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2 rounded bg-background p-2", children: [
|
|
30913
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children:
|
|
30904
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children: chunkBXACB3BG_js.THEME_COLOR_LABELS[activePickerKey] }),
|
|
30914
30905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30915
30906
|
"input",
|
|
30916
30907
|
{
|
|
@@ -31208,7 +31199,7 @@ function MobileDismissSheet({
|
|
|
31208
31199
|
className,
|
|
31209
31200
|
children
|
|
31210
31201
|
}) {
|
|
31211
|
-
const { dragY, handlers } =
|
|
31202
|
+
const { dragY, handlers } = chunkLXUMBK2O_js.useSheetDismissDrag(onClose);
|
|
31212
31203
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31213
31204
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31214
31205
|
"button",
|
|
@@ -31477,7 +31468,7 @@ function ThemeThumbnail({
|
|
|
31477
31468
|
{
|
|
31478
31469
|
type: "button",
|
|
31479
31470
|
onClick,
|
|
31480
|
-
className:
|
|
31471
|
+
className: chunkLXUMBK2O_js.cn(
|
|
31481
31472
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
31482
31473
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
31483
31474
|
),
|
|
@@ -32109,7 +32100,7 @@ function MobileBottomBar({
|
|
|
32109
32100
|
{
|
|
32110
32101
|
type: "button",
|
|
32111
32102
|
onClick,
|
|
32112
|
-
className:
|
|
32103
|
+
className: chunkLXUMBK2O_js.cn(
|
|
32113
32104
|
"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",
|
|
32114
32105
|
active ? "text-primary" : "text-muted-foreground hover:text-foreground"
|
|
32115
32106
|
),
|
|
@@ -32157,7 +32148,7 @@ function MobileChromeOverlay(props) {
|
|
|
32157
32148
|
canEdit,
|
|
32158
32149
|
commentCount
|
|
32159
32150
|
} = props;
|
|
32160
|
-
const { keyboardInset, isKeyboardOpen } =
|
|
32151
|
+
const { keyboardInset, isKeyboardOpen } = chunkLXUMBK2O_js.useKeyboardInsets();
|
|
32161
32152
|
const activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null;
|
|
32162
32153
|
const closeAllSheets = () => {
|
|
32163
32154
|
s.setIsSlidesPaneOpen(false);
|
|
@@ -32253,7 +32244,7 @@ function ToggleSwitch({
|
|
|
32253
32244
|
{
|
|
32254
32245
|
type: "button",
|
|
32255
32246
|
onClick: onToggle,
|
|
32256
|
-
className:
|
|
32247
|
+
className: chunkLXUMBK2O_js.cn(
|
|
32257
32248
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
32258
32249
|
enabled ? "bg-primary" : "bg-muted-foreground/30"
|
|
32259
32250
|
),
|
|
@@ -32263,7 +32254,7 @@ function ToggleSwitch({
|
|
|
32263
32254
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32264
32255
|
"span",
|
|
32265
32256
|
{
|
|
32266
|
-
className:
|
|
32257
|
+
className: chunkLXUMBK2O_js.cn(
|
|
32267
32258
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
32268
32259
|
enabled ? "translate-x-[18px]" : "translate-x-[3px]"
|
|
32269
32260
|
)
|
|
@@ -32290,7 +32281,7 @@ function SettingsDialog({
|
|
|
32290
32281
|
const [activeTab, setActiveTab] = React14.useState("general");
|
|
32291
32282
|
const [autoSave, setAutoSave] = React14.useState(true);
|
|
32292
32283
|
const { t } = reactI18next.useTranslation();
|
|
32293
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
32284
|
+
const { panelStyle, handlers: dragHandlers } = chunkLXUMBK2O_js.useModalDismissDrag(onClose);
|
|
32294
32285
|
const handleKeyDown = React14.useCallback(
|
|
32295
32286
|
(e) => {
|
|
32296
32287
|
if (e.key === "Escape") {
|
|
@@ -32362,7 +32353,7 @@ function SettingsDialog({
|
|
|
32362
32353
|
{
|
|
32363
32354
|
type: "button",
|
|
32364
32355
|
onClick: () => setActiveTab(tab.id),
|
|
32365
|
-
className:
|
|
32356
|
+
className: chunkLXUMBK2O_js.cn(
|
|
32366
32357
|
"px-3 py-2 text-xs font-medium transition-colors relative",
|
|
32367
32358
|
activeTab === tab.id ? "text-primary" : "text-muted-foreground hover:text-foreground"
|
|
32368
32359
|
),
|
|
@@ -32424,10 +32415,10 @@ function SettingsDialog({
|
|
|
32424
32415
|
}
|
|
32425
32416
|
)
|
|
32426
32417
|
] }),
|
|
32427
|
-
activeTab === "shortcuts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children:
|
|
32418
|
+
activeTab === "shortcuts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: chunkLXUMBK2O_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32428
32419
|
"div",
|
|
32429
32420
|
{
|
|
32430
|
-
className:
|
|
32421
|
+
className: chunkLXUMBK2O_js.cn(
|
|
32431
32422
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
32432
32423
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
32433
32424
|
),
|
|
@@ -32472,7 +32463,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32472
32463
|
smartArt3D = false
|
|
32473
32464
|
} = props;
|
|
32474
32465
|
React14.useEffect(() => {
|
|
32475
|
-
const css =
|
|
32466
|
+
const css = chunkBXACB3BG_js.buildUserFontFaceStyles(fonts);
|
|
32476
32467
|
if (!css) {
|
|
32477
32468
|
return;
|
|
32478
32469
|
}
|
|
@@ -32493,7 +32484,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32493
32484
|
return;
|
|
32494
32485
|
}
|
|
32495
32486
|
void (async () => {
|
|
32496
|
-
const picked = await
|
|
32487
|
+
const picked = await chunkBXACB3BG_js.openPptxFile();
|
|
32497
32488
|
if (picked) {
|
|
32498
32489
|
setContent(picked.buffer);
|
|
32499
32490
|
}
|
|
@@ -32501,7 +32492,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32501
32492
|
}, [hostOpenFile]);
|
|
32502
32493
|
const handleOpenRecentFile = React14.useCallback((key) => {
|
|
32503
32494
|
void (async () => {
|
|
32504
|
-
const bytes = await
|
|
32495
|
+
const bytes = await chunkBXACB3BG_js.readBackstageRecentFile(key);
|
|
32505
32496
|
if (bytes) {
|
|
32506
32497
|
setContent(bytes);
|
|
32507
32498
|
}
|
|
@@ -32511,8 +32502,8 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32511
32502
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = React14.useState(false);
|
|
32512
32503
|
const [autosaveEnabled, setAutosaveEnabled] = React14.useState(true);
|
|
32513
32504
|
const [isShareDialogOpen, setIsShareDialogOpen] = React14.useState(false);
|
|
32514
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
32515
|
-
const state =
|
|
32505
|
+
const { reducedMotion, toggleReducedMotion } = chunkLXUMBK2O_js.useReducedMotion();
|
|
32506
|
+
const state = chunkLXUMBK2O_js.useViewerState({ content, canEdit });
|
|
32516
32507
|
const {
|
|
32517
32508
|
containerRef,
|
|
32518
32509
|
mode,
|
|
@@ -32527,10 +32518,10 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32527
32518
|
activeSlide,
|
|
32528
32519
|
selectedElement
|
|
32529
32520
|
} = state;
|
|
32530
|
-
const mobile =
|
|
32521
|
+
const mobile = chunkLXUMBK2O_js.useIsMobile({ containerRef });
|
|
32531
32522
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
32532
|
-
const resizablePanels =
|
|
32533
|
-
const { gridSpacingPx, visibleSlideIndexes, slideSectionGroups, masterPseudoSlide } =
|
|
32523
|
+
const resizablePanels = chunkLXUMBK2O_js.useResizablePanels();
|
|
32524
|
+
const { gridSpacingPx, visibleSlideIndexes, slideSectionGroups, masterPseudoSlide } = chunkLXUMBK2O_js.useDerivedSlideState({
|
|
32534
32525
|
slides,
|
|
32535
32526
|
sections: state.sections,
|
|
32536
32527
|
customShows: state.customShows,
|
|
@@ -32552,11 +32543,11 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32552
32543
|
state.isDrawingRef
|
|
32553
32544
|
]
|
|
32554
32545
|
);
|
|
32555
|
-
const zoom =
|
|
32546
|
+
const zoom = chunkLXUMBK2O_js.useZoomViewport({
|
|
32556
32547
|
canvasSize,
|
|
32557
32548
|
selectedElements: state.selectedElements
|
|
32558
32549
|
});
|
|
32559
|
-
const history =
|
|
32550
|
+
const history = chunkLXUMBK2O_js.useEditorHistory({
|
|
32560
32551
|
slides,
|
|
32561
32552
|
canvasSize,
|
|
32562
32553
|
activeSlideIndex,
|
|
@@ -32578,7 +32569,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32578
32569
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
32579
32570
|
setHeaderFooter: state.setHeaderFooter
|
|
32580
32571
|
});
|
|
32581
|
-
const { presentation, annotations, actionSoundHandlerRef } =
|
|
32572
|
+
const { presentation, annotations, actionSoundHandlerRef } = chunkLXUMBK2O_js.usePresentationSetup({
|
|
32582
32573
|
mode,
|
|
32583
32574
|
slides,
|
|
32584
32575
|
visibleSlideIndexes,
|
|
@@ -32592,7 +32583,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32592
32583
|
setSlides: state.setSlides,
|
|
32593
32584
|
history
|
|
32594
32585
|
});
|
|
32595
|
-
|
|
32586
|
+
chunkLXUMBK2O_js.useTouchGestures({
|
|
32596
32587
|
targetRef: zoom.canvasViewportRef,
|
|
32597
32588
|
currentScale: zoom.scale,
|
|
32598
32589
|
callbacks: {
|
|
@@ -32614,7 +32605,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32614
32605
|
},
|
|
32615
32606
|
enabled: isTouchDevice
|
|
32616
32607
|
});
|
|
32617
|
-
const dialogs =
|
|
32608
|
+
const dialogs = chunkLXUMBK2O_js.useViewerDialogs({
|
|
32618
32609
|
mode,
|
|
32619
32610
|
slides,
|
|
32620
32611
|
activeSlide,
|
|
@@ -32655,7 +32646,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32655
32646
|
zoom.handleZoomToFit();
|
|
32656
32647
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
32657
32648
|
}, [mode]);
|
|
32658
|
-
const editorOps =
|
|
32649
|
+
const editorOps = chunkLXUMBK2O_js.useEditorOperations({
|
|
32659
32650
|
state,
|
|
32660
32651
|
history,
|
|
32661
32652
|
zoom,
|
|
@@ -32687,7 +32678,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32687
32678
|
autosaveStatus,
|
|
32688
32679
|
isEncryptedDialogOpen,
|
|
32689
32680
|
setIsEncryptedDialogOpen
|
|
32690
|
-
} =
|
|
32681
|
+
} = chunkLXUMBK2O_js.useViewerIntegration({
|
|
32691
32682
|
state,
|
|
32692
32683
|
zoom,
|
|
32693
32684
|
history,
|
|
@@ -33046,7 +33037,7 @@ function CollaborationDocumentSync({
|
|
|
33046
33037
|
}
|
|
33047
33038
|
return bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
|
|
33048
33039
|
}, []);
|
|
33049
|
-
|
|
33040
|
+
chunkLXUMBK2O_js.useYjsDocumentSync({
|
|
33050
33041
|
doc: collab?.doc ?? null,
|
|
33051
33042
|
slides,
|
|
33052
33043
|
templateElementsBySlideId,
|
|
@@ -33064,13 +33055,13 @@ function CollaborationFollowLayer({
|
|
|
33064
33055
|
slideCount
|
|
33065
33056
|
}) {
|
|
33066
33057
|
const collab = useCollaboration();
|
|
33067
|
-
const { followedClientId, followUser } =
|
|
33058
|
+
const { followedClientId, followUser } = chunkLXUMBK2O_js.useFollowMode({
|
|
33068
33059
|
collab,
|
|
33069
33060
|
activeSlideIndex,
|
|
33070
33061
|
setActiveSlideIndex,
|
|
33071
33062
|
slideCount
|
|
33072
33063
|
});
|
|
33073
|
-
|
|
33064
|
+
chunkLXUMBK2O_js.useBroadcastFollower({
|
|
33074
33065
|
collab,
|
|
33075
33066
|
activeSlideIndex,
|
|
33076
33067
|
setActiveSlideIndex,
|