pptx-react-viewer 1.19.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/{Model3DScene-CQP7JLKK.js → Model3DScene-3RYDRQOD.js} +2 -2
- package/dist/Model3DScene-3RYDRQOD.js.br +0 -0
- package/dist/Model3DScene-3RYDRQOD.js.gz +0 -0
- package/dist/{Model3DScene-J2KBVMEZ.mjs → Model3DScene-SLGODOXT.mjs} +1 -1
- package/dist/{Model3DScene-J2KBVMEZ.mjs.br → Model3DScene-SLGODOXT.mjs.br} +0 -0
- package/dist/Model3DScene-SLGODOXT.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-U6LVKSKR.js → SurfaceChart3DScene-3UZ5HZ2W.js} +2 -2
- package/dist/{SurfaceChart3DScene-U6LVKSKR.js.br → SurfaceChart3DScene-3UZ5HZ2W.js.br} +0 -0
- package/dist/SurfaceChart3DScene-3UZ5HZ2W.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-52VUVZSC.mjs → SurfaceChart3DScene-YL4QD3O5.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-52VUVZSC.mjs.br → SurfaceChart3DScene-YL4QD3O5.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-YL4QD3O5.mjs.gz +0 -0
- package/dist/{chunk-XGTMHQR7.mjs → chunk-3TRQKGBU.mjs} +2 -2
- package/dist/chunk-3TRQKGBU.mjs.br +0 -0
- package/dist/chunk-3TRQKGBU.mjs.gz +0 -0
- package/dist/{chunk-DBZLZMED.js → chunk-7JYQRDRI.js} +681 -690
- package/dist/chunk-7JYQRDRI.js.br +0 -0
- package/dist/chunk-7JYQRDRI.js.gz +0 -0
- package/dist/{chunk-P3T4E6JQ.js → chunk-G5GATDE4.js} +3 -6
- package/dist/chunk-G5GATDE4.js.br +0 -0
- package/dist/{chunk-P3T4E6JQ.js.gz → chunk-G5GATDE4.js.gz} +0 -0
- package/dist/{chunk-YF6JD4DO.js → chunk-H5V24JVW.js} +382 -382
- package/dist/chunk-H5V24JVW.js.br +0 -0
- package/dist/chunk-H5V24JVW.js.gz +0 -0
- package/dist/{chunk-SLJXGFZS.mjs → chunk-TG2ZYU7Y.mjs} +3 -11
- package/dist/chunk-TG2ZYU7Y.mjs.br +0 -0
- package/dist/chunk-TG2ZYU7Y.mjs.gz +0 -0
- package/dist/{chunk-R7FTNSSP.mjs → chunk-VOU7OCQM.mjs} +3 -6
- package/dist/chunk-VOU7OCQM.mjs.br +0 -0
- package/dist/{chunk-R7FTNSSP.mjs.gz → chunk-VOU7OCQM.mjs.gz} +0 -0
- package/dist/hooks-unstable.js +73 -73
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +2 -2
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/index.js +17 -17
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/pptx-viewer.css +2 -2
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +12 -12
- package/dist/Model3DScene-CQP7JLKK.js.br +0 -0
- package/dist/Model3DScene-CQP7JLKK.js.gz +0 -0
- package/dist/Model3DScene-J2KBVMEZ.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-52VUVZSC.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-U6LVKSKR.js.gz +0 -0
- package/dist/chunk-DBZLZMED.js.br +0 -0
- package/dist/chunk-DBZLZMED.js.gz +0 -0
- package/dist/chunk-P3T4E6JQ.js.br +0 -0
- package/dist/chunk-R7FTNSSP.mjs.br +0 -0
- package/dist/chunk-SLJXGFZS.mjs.br +0 -0
- package/dist/chunk-SLJXGFZS.mjs.gz +0 -0
- package/dist/chunk-XGTMHQR7.mjs.br +0 -0
- package/dist/chunk-XGTMHQR7.mjs.gz +0 -0
- package/dist/chunk-YF6JD4DO.js.br +0 -0
- package/dist/chunk-YF6JD4DO.js.gz +0 -0
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkH5V24JVW_js = require('./chunk-H5V24JVW.js');
|
|
4
|
+
var chunkG5GATDE4_js = require('./chunk-G5GATDE4.js');
|
|
5
5
|
var chunkAALZCSY4_js = require('./chunk-AALZCSY4.js');
|
|
6
6
|
var chunkAD3EAEY6_js = require('./chunk-AD3EAEY6.js');
|
|
7
7
|
var React14 = require('react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
10
|
var lu = require('react-icons/lu');
|
|
11
|
-
var DOMPurify = require('dompurify');
|
|
12
11
|
|
|
13
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
13
|
|
|
15
14
|
var React14__default = /*#__PURE__*/_interopDefault(React14);
|
|
16
|
-
var DOMPurify__default = /*#__PURE__*/_interopDefault(DOMPurify);
|
|
17
15
|
|
|
18
16
|
var ViewerThemeContext = React14.createContext(void 0);
|
|
19
17
|
function ViewerThemeProvider({ theme, children }) {
|
|
@@ -27,7 +25,7 @@ function useThemeStyle(theme) {
|
|
|
27
25
|
if (!theme) {
|
|
28
26
|
return void 0;
|
|
29
27
|
}
|
|
30
|
-
const vars =
|
|
28
|
+
const vars = chunkG5GATDE4_js.themeToCssVars(theme);
|
|
31
29
|
if (Object.keys(vars).length === 0) {
|
|
32
30
|
return void 0;
|
|
33
31
|
}
|
|
@@ -44,7 +42,7 @@ function CollaborationProvider({
|
|
|
44
42
|
canvasHeight,
|
|
45
43
|
children
|
|
46
44
|
}) {
|
|
47
|
-
const value =
|
|
45
|
+
const value = chunkH5V24JVW_js.useCollaborativeState({
|
|
48
46
|
config,
|
|
49
47
|
canvasWidth,
|
|
50
48
|
canvasHeight
|
|
@@ -476,7 +474,7 @@ function LoadingState({ className }) {
|
|
|
476
474
|
role: "status",
|
|
477
475
|
"aria-live": "polite",
|
|
478
476
|
"aria-atomic": "true",
|
|
479
|
-
className:
|
|
477
|
+
className: chunkH5V24JVW_js.cn(
|
|
480
478
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
481
479
|
className
|
|
482
480
|
),
|
|
@@ -499,7 +497,7 @@ function ErrorState({ className, error }) {
|
|
|
499
497
|
{
|
|
500
498
|
role: "alert",
|
|
501
499
|
"aria-live": "assertive",
|
|
502
|
-
className:
|
|
500
|
+
className: chunkH5V24JVW_js.cn(
|
|
503
501
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
504
502
|
className
|
|
505
503
|
),
|
|
@@ -530,7 +528,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
530
528
|
}
|
|
531
529
|
)
|
|
532
530
|
] }),
|
|
533
|
-
/* @__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: chunkH5V24JVW_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
534
532
|
"div",
|
|
535
533
|
{
|
|
536
534
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -590,14 +588,14 @@ function AccessibilityPanel({
|
|
|
590
588
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
591
589
|
"aria-checked": reducedMotion ?? false,
|
|
592
590
|
onClick: onToggleReducedMotion,
|
|
593
|
-
className:
|
|
591
|
+
className: chunkH5V24JVW_js.cn(
|
|
594
592
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
595
593
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
596
594
|
),
|
|
597
595
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
598
596
|
"span",
|
|
599
597
|
{
|
|
600
|
-
className:
|
|
598
|
+
className: chunkH5V24JVW_js.cn(
|
|
601
599
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
602
600
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
603
601
|
)
|
|
@@ -616,7 +614,7 @@ function AccessibilityPanel({
|
|
|
616
614
|
"div",
|
|
617
615
|
{
|
|
618
616
|
role: "listitem",
|
|
619
|
-
className:
|
|
617
|
+
className: chunkH5V24JVW_js.cn(
|
|
620
618
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
621
619
|
/* Severity-based background and text colouring */
|
|
622
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"
|
|
@@ -648,7 +646,7 @@ function ExportProgressModal({
|
|
|
648
646
|
if (!isOpen) {
|
|
649
647
|
return null;
|
|
650
648
|
}
|
|
651
|
-
const clampedProgress =
|
|
649
|
+
const clampedProgress = chunkG5GATDE4_js.clampPercent(progress);
|
|
652
650
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
653
651
|
"div",
|
|
654
652
|
{
|
|
@@ -737,7 +735,7 @@ function StatusBar({
|
|
|
737
735
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
738
736
|
"span",
|
|
739
737
|
{
|
|
740
|
-
className:
|
|
738
|
+
className: chunkH5V24JVW_js.cn(
|
|
741
739
|
"shrink-0 max-md:hidden",
|
|
742
740
|
autosaveStatus?.state === "error" ? "text-red-400" : autosaveStatus?.state === "saving" ? "text-yellow-400" : ""
|
|
743
741
|
),
|
|
@@ -750,7 +748,7 @@ function StatusBar({
|
|
|
750
748
|
{
|
|
751
749
|
type: "button",
|
|
752
750
|
onClick: onToggleNotes,
|
|
753
|
-
className:
|
|
751
|
+
className: chunkH5V24JVW_js.cn(
|
|
754
752
|
vb,
|
|
755
753
|
"flex items-center gap-1 text-[10px]",
|
|
756
754
|
isNotesExpanded && "text-primary"
|
|
@@ -770,7 +768,7 @@ function StatusBar({
|
|
|
770
768
|
{
|
|
771
769
|
type: "button",
|
|
772
770
|
onClick: () => onSetMode("edit"),
|
|
773
|
-
className:
|
|
771
|
+
className: chunkH5V24JVW_js.cn(vb, mode === "edit" && "text-primary"),
|
|
774
772
|
title: t("pptx.statusBar.normalView"),
|
|
775
773
|
"aria-label": t("pptx.statusBar.normalView"),
|
|
776
774
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMonitor, { className: "w-3.5 h-3.5" })
|
|
@@ -792,7 +790,7 @@ function StatusBar({
|
|
|
792
790
|
{
|
|
793
791
|
type: "button",
|
|
794
792
|
onClick: () => onSetMode("present"),
|
|
795
|
-
className:
|
|
793
|
+
className: chunkH5V24JVW_js.cn(vb, mode === "present" && "text-primary"),
|
|
796
794
|
title: t("pptx.statusBar.slideShow"),
|
|
797
795
|
"aria-label": t("pptx.statusBar.slideShow"),
|
|
798
796
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPresentation, { className: "w-3.5 h-3.5" })
|
|
@@ -882,7 +880,7 @@ function ResizeHandle({
|
|
|
882
880
|
{
|
|
883
881
|
role: "separator",
|
|
884
882
|
"aria-orientation": direction,
|
|
885
|
-
className:
|
|
883
|
+
className: chunkH5V24JVW_js.cn(
|
|
886
884
|
// Outer container: generous hit area for easy clicking.
|
|
887
885
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
888
886
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -893,7 +891,7 @@ function ResizeHandle({
|
|
|
893
891
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
894
892
|
"div",
|
|
895
893
|
{
|
|
896
|
-
className:
|
|
894
|
+
className: chunkH5V24JVW_js.cn(
|
|
897
895
|
"absolute transition-colors",
|
|
898
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"
|
|
899
897
|
)
|
|
@@ -905,7 +903,7 @@ function ResizeHandle({
|
|
|
905
903
|
|
|
906
904
|
// src/viewer/utils/slide-background-style.ts
|
|
907
905
|
function getReactSlideBackgroundStyle(slide) {
|
|
908
|
-
const style =
|
|
906
|
+
const style = chunkG5GATDE4_js.getSlideBackgroundStyle(slide);
|
|
909
907
|
return {
|
|
910
908
|
backgroundColor: style["background-color"],
|
|
911
909
|
backgroundImage: style["background-image"],
|
|
@@ -960,7 +958,7 @@ function ChartElementView({
|
|
|
960
958
|
const selectedPart = selection?.elementId === element.id ? selection.part : null;
|
|
961
959
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
962
960
|
const viewModel = React14.useMemo(
|
|
963
|
-
() => canEdit ?
|
|
961
|
+
() => canEdit ? chunkH5V24JVW_js.buildReactChartViewModel(element) : null,
|
|
964
962
|
[canEdit, element]
|
|
965
963
|
);
|
|
966
964
|
React14.useEffect(ensureInteractionStyles, []);
|
|
@@ -1011,7 +1009,7 @@ function ChartElementView({
|
|
|
1011
1009
|
if (!canEdit) {
|
|
1012
1010
|
return;
|
|
1013
1011
|
}
|
|
1014
|
-
const part =
|
|
1012
|
+
const part = chunkG5GATDE4_js.findChartPartTarget(e.target);
|
|
1015
1013
|
if (!part) {
|
|
1016
1014
|
return;
|
|
1017
1015
|
}
|
|
@@ -1029,7 +1027,7 @@ function ChartElementView({
|
|
|
1029
1027
|
drag: viewModel.valueDrag,
|
|
1030
1028
|
svgHeight: viewModel.svgHeight,
|
|
1031
1029
|
startClientY: e.clientY,
|
|
1032
|
-
anchorViewY:
|
|
1030
|
+
anchorViewY: chunkG5GATDE4_js.dragAnchorViewY(startValue, viewModel.valueDrag, part.seriesIndex),
|
|
1033
1031
|
baseChartData: element.chartData,
|
|
1034
1032
|
moved: false,
|
|
1035
1033
|
lastData: null
|
|
@@ -1055,8 +1053,8 @@ function ChartElementView({
|
|
|
1055
1053
|
active.moved = true;
|
|
1056
1054
|
const deltaViewY = (e.clientY - active.startClientY) / rect.height * active.svgHeight;
|
|
1057
1055
|
const viewY = active.anchorViewY + deltaViewY;
|
|
1058
|
-
const value =
|
|
1059
|
-
active.lastData =
|
|
1056
|
+
const value = chunkG5GATDE4_js.dragValueForPart(viewY, active.drag, active.part.seriesIndex);
|
|
1057
|
+
active.lastData = chunkG5GATDE4_js.withChartPointValue(
|
|
1060
1058
|
active.baseChartData,
|
|
1061
1059
|
active.part.seriesIndex,
|
|
1062
1060
|
active.part.pointIndex,
|
|
@@ -1083,14 +1081,14 @@ function ChartElementView({
|
|
|
1083
1081
|
setTitleDraft(element.chartData?.title ?? "");
|
|
1084
1082
|
return;
|
|
1085
1083
|
}
|
|
1086
|
-
if (
|
|
1084
|
+
if (chunkG5GATDE4_js.findChartPartTarget(e.target)) {
|
|
1087
1085
|
e.stopPropagation();
|
|
1088
1086
|
}
|
|
1089
1087
|
};
|
|
1090
1088
|
const commitTitle = () => {
|
|
1091
1089
|
if (titleDraft !== null && element.chartData && onUpdateElement) {
|
|
1092
1090
|
onUpdateElement({
|
|
1093
|
-
chartData:
|
|
1091
|
+
chartData: chunkG5GATDE4_js.withChartTitle(element.chartData, titleDraft)
|
|
1094
1092
|
});
|
|
1095
1093
|
}
|
|
1096
1094
|
setTitleDraft(null);
|
|
@@ -1106,8 +1104,8 @@ function ChartElementView({
|
|
|
1106
1104
|
onPointerUp: handlePointerUp,
|
|
1107
1105
|
onDoubleClick: handleDoubleClick,
|
|
1108
1106
|
children: [
|
|
1109
|
-
|
|
1110
|
-
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
|
+
chunkH5V24JVW_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: chunkG5GATDE4_js.formatAxisValue(dragValue) }),
|
|
1111
1109
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1112
1110
|
"input",
|
|
1113
1111
|
{
|
|
@@ -1141,23 +1139,23 @@ function ColorChangedImage({
|
|
|
1141
1139
|
className,
|
|
1142
1140
|
alt
|
|
1143
1141
|
}) {
|
|
1144
|
-
const tolerance = tolerancePct ??
|
|
1145
|
-
const cacheKey =
|
|
1142
|
+
const tolerance = tolerancePct ?? chunkG5GATDE4_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
1143
|
+
const cacheKey = chunkG5GATDE4_js.buildCacheKey(
|
|
1146
1144
|
src,
|
|
1147
1145
|
clrChange.clrFrom,
|
|
1148
1146
|
clrChange.clrTo,
|
|
1149
1147
|
tolerance,
|
|
1150
1148
|
Boolean(clrChange.clrToTransparent)
|
|
1151
1149
|
);
|
|
1152
|
-
const cached =
|
|
1150
|
+
const cached = chunkG5GATDE4_js.getCachedResult(cacheKey);
|
|
1153
1151
|
const [processedSrc, setProcessedSrc] = React14.useState(cached ?? null);
|
|
1154
1152
|
React14.useEffect(() => {
|
|
1155
|
-
if (
|
|
1156
|
-
setProcessedSrc(
|
|
1153
|
+
if (chunkG5GATDE4_js.getCachedResult(cacheKey)) {
|
|
1154
|
+
setProcessedSrc(chunkG5GATDE4_js.getCachedResult(cacheKey) ?? null);
|
|
1157
1155
|
return;
|
|
1158
1156
|
}
|
|
1159
1157
|
let cancelled = false;
|
|
1160
|
-
|
|
1158
|
+
chunkG5GATDE4_js.applyColorChange(
|
|
1161
1159
|
src,
|
|
1162
1160
|
clrChange.clrFrom,
|
|
1163
1161
|
clrChange.clrTo,
|
|
@@ -1165,7 +1163,7 @@ function ColorChangedImage({
|
|
|
1165
1163
|
Boolean(clrChange.clrToTransparent)
|
|
1166
1164
|
).then((result) => {
|
|
1167
1165
|
if (!cancelled) {
|
|
1168
|
-
|
|
1166
|
+
chunkG5GATDE4_js.setCachedResult(cacheKey, result.dataUrl);
|
|
1169
1167
|
setProcessedSrc(result.dataUrl);
|
|
1170
1168
|
}
|
|
1171
1169
|
return void 0;
|
|
@@ -1196,19 +1194,19 @@ function DuotoneImage({
|
|
|
1196
1194
|
className,
|
|
1197
1195
|
alt
|
|
1198
1196
|
}) {
|
|
1199
|
-
const cacheKey =
|
|
1200
|
-
const cached =
|
|
1197
|
+
const cacheKey = chunkG5GATDE4_js.buildDuotoneCacheKey(src, duotone.color1, duotone.color2);
|
|
1198
|
+
const cached = chunkG5GATDE4_js.getDuotoneCachedResult(cacheKey);
|
|
1201
1199
|
const [processedSrc, setProcessedSrc] = React14.useState(cached ?? null);
|
|
1202
1200
|
React14.useEffect(() => {
|
|
1203
|
-
const cachedResult =
|
|
1201
|
+
const cachedResult = chunkG5GATDE4_js.getDuotoneCachedResult(cacheKey);
|
|
1204
1202
|
if (cachedResult) {
|
|
1205
1203
|
setProcessedSrc(cachedResult);
|
|
1206
1204
|
return;
|
|
1207
1205
|
}
|
|
1208
1206
|
let cancelled = false;
|
|
1209
|
-
|
|
1207
|
+
chunkG5GATDE4_js.applyDuotone(src, duotone.color1, duotone.color2).then((result) => {
|
|
1210
1208
|
if (!cancelled) {
|
|
1211
|
-
|
|
1209
|
+
chunkG5GATDE4_js.setDuotoneCachedResult(cacheKey, result.dataUrl);
|
|
1212
1210
|
setProcessedSrc(result.dataUrl);
|
|
1213
1211
|
}
|
|
1214
1212
|
return void 0;
|
|
@@ -1233,7 +1231,7 @@ function DuotoneImage({
|
|
|
1233
1231
|
);
|
|
1234
1232
|
}
|
|
1235
1233
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
1236
|
-
return
|
|
1234
|
+
return chunkG5GATDE4_js.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1237
1235
|
"svg",
|
|
1238
1236
|
{
|
|
1239
1237
|
width: 0,
|
|
@@ -1299,7 +1297,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
1299
1297
|
...filter ? { filter } : {},
|
|
1300
1298
|
...opacity !== void 0 ? { opacity } : {}
|
|
1301
1299
|
};
|
|
1302
|
-
if (
|
|
1300
|
+
if (chunkH5V24JVW_js.isImageTiled(el)) {
|
|
1303
1301
|
const tileSrc = imgSrc(el);
|
|
1304
1302
|
if (!tileSrc) {
|
|
1305
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" });
|
|
@@ -1310,18 +1308,18 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
1310
1308
|
"div",
|
|
1311
1309
|
{
|
|
1312
1310
|
className: "pointer-events-none select-none w-full h-full",
|
|
1313
|
-
style: { ...
|
|
1311
|
+
style: { ...chunkH5V24JVW_js.getImageTilingStyle(el), ...effectStyles }
|
|
1314
1312
|
}
|
|
1315
1313
|
)
|
|
1316
1314
|
] });
|
|
1317
1315
|
}
|
|
1318
|
-
const colorWash =
|
|
1316
|
+
const colorWash = chunkG5GATDE4_js.getImageColorWashStyle(
|
|
1319
1317
|
chunkAD3EAEY6_js.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
|
|
1320
1318
|
);
|
|
1321
1319
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
1322
|
-
const duotoneColors =
|
|
1320
|
+
const duotoneColors = chunkH5V24JVW_js.getDuotoneColors(el);
|
|
1323
1321
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
1324
|
-
const filterForImg = useDuotoneCanvas ?
|
|
1322
|
+
const filterForImg = useDuotoneCanvas ? chunkG5GATDE4_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
1325
1323
|
const canvasEffectStyles = {
|
|
1326
1324
|
...filterForImg ? { filter: filterForImg } : {},
|
|
1327
1325
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -1532,7 +1530,7 @@ function ResizeHandles({
|
|
|
1532
1530
|
"button",
|
|
1533
1531
|
{
|
|
1534
1532
|
type: "button",
|
|
1535
|
-
className:
|
|
1533
|
+
className: chunkH5V24JVW_js.cn("absolute z-10 group", posClass, cursor),
|
|
1536
1534
|
style: peStyle,
|
|
1537
1535
|
onPointerDown: (e) => handleResizePointer(e, handle),
|
|
1538
1536
|
onMouseDown: (e) => {
|
|
@@ -1550,7 +1548,7 @@ function ResizeHandles({
|
|
|
1550
1548
|
"button",
|
|
1551
1549
|
{
|
|
1552
1550
|
type: "button",
|
|
1553
|
-
className:
|
|
1551
|
+
className: chunkH5V24JVW_js.cn("absolute z-10", posClass, cursor),
|
|
1554
1552
|
style: peStyle,
|
|
1555
1553
|
onPointerDown: (e) => handleResizePointer(e, handle),
|
|
1556
1554
|
onMouseDown: (e) => {
|
|
@@ -1558,7 +1556,7 @@ function ResizeHandles({
|
|
|
1558
1556
|
onResizePointerDown(elementId, e, handle);
|
|
1559
1557
|
},
|
|
1560
1558
|
children: [
|
|
1561
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1559
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH5V24JVW_js.cn(sizeClass, "border border-white bg-primary shadow") }),
|
|
1562
1560
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-2 max-md:-inset-1" })
|
|
1563
1561
|
]
|
|
1564
1562
|
},
|
|
@@ -1637,10 +1635,10 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1637
1635
|
const viewHeight = Math.max(el.height, 1);
|
|
1638
1636
|
const ss = shapeEl?.shapeStyle;
|
|
1639
1637
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
1640
|
-
const strokeColor =
|
|
1641
|
-
const strokePaint =
|
|
1642
|
-
const dashType =
|
|
1643
|
-
const dashArray =
|
|
1638
|
+
const strokeColor = chunkG5GATDE4_js.normalizeHexColor(ss?.strokeColor, chunkH5V24JVW_js.DEFAULT_STROKE_COLOR);
|
|
1639
|
+
const strokePaint = chunkG5GATDE4_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
1640
|
+
const dashType = chunkG5GATDE4_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
1641
|
+
const dashArray = chunkG5GATDE4_js.getSvgStrokeDasharray(
|
|
1644
1642
|
dashType,
|
|
1645
1643
|
Math.max(strokeWidth, 1),
|
|
1646
1644
|
ss?.customDashSegments
|
|
@@ -1651,14 +1649,14 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1651
1649
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1652
1650
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
1653
1651
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
1654
|
-
const compoundOffsets =
|
|
1655
|
-
const compoundWidths =
|
|
1656
|
-
const strokeCap =
|
|
1652
|
+
const compoundOffsets = chunkG5GATDE4_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
1653
|
+
const compoundWidths = chunkG5GATDE4_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1654
|
+
const strokeCap = chunkG5GATDE4_js.svgLineCap(ss?.lineCap);
|
|
1657
1655
|
const textEl = chunkAD3EAEY6_js.hasTextProperties(el) ? el : void 0;
|
|
1658
1656
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
1659
1657
|
const connectorTextSegments = textEl?.textSegments;
|
|
1660
1658
|
const connectorTextStyle = textEl?.textStyle;
|
|
1661
|
-
const pathGeometry = shapeEl ?
|
|
1659
|
+
const pathGeometry = shapeEl ? chunkH5V24JVW_js.getConnectorPathGeometry(shapeEl) : {
|
|
1662
1660
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
1663
1661
|
startX: 0,
|
|
1664
1662
|
startY: 0,
|
|
@@ -1667,8 +1665,8 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1667
1665
|
};
|
|
1668
1666
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
1669
1667
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
1670
|
-
const lineShadow =
|
|
1671
|
-
const lineGlow =
|
|
1668
|
+
const lineShadow = chunkH5V24JVW_js.buildLineShadowCss(el);
|
|
1669
|
+
const lineGlow = chunkH5V24JVW_js.buildLineGlowFilter(el);
|
|
1672
1670
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1673
1671
|
"div",
|
|
1674
1672
|
{
|
|
@@ -1678,9 +1676,9 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1678
1676
|
style: {
|
|
1679
1677
|
left: el.x,
|
|
1680
1678
|
top: el.y,
|
|
1681
|
-
width: Math.max(el.width,
|
|
1682
|
-
height: Math.max(el.height,
|
|
1683
|
-
transform:
|
|
1679
|
+
width: Math.max(el.width, chunkH5V24JVW_js.MIN_ELEMENT_SIZE),
|
|
1680
|
+
height: Math.max(el.height, chunkH5V24JVW_js.MIN_ELEMENT_SIZE),
|
|
1681
|
+
transform: chunkG5GATDE4_js.getElementTransform(el),
|
|
1684
1682
|
transformOrigin: "center",
|
|
1685
1683
|
background: "transparent",
|
|
1686
1684
|
border: "none",
|
|
@@ -1701,14 +1699,14 @@ var ConnectorElementRenderer = React14__default.default.memo(
|
|
|
1701
1699
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
1702
1700
|
children: [
|
|
1703
1701
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
1704
|
-
|
|
1702
|
+
chunkH5V24JVW_js.renderConnectorMarker(
|
|
1705
1703
|
startMarkerId,
|
|
1706
1704
|
startArrow,
|
|
1707
1705
|
strokePaint,
|
|
1708
1706
|
ss?.connectorStartArrowWidth,
|
|
1709
1707
|
ss?.connectorStartArrowLength
|
|
1710
1708
|
),
|
|
1711
|
-
|
|
1709
|
+
chunkH5V24JVW_js.renderConnectorMarker(
|
|
1712
1710
|
endMarkerId,
|
|
1713
1711
|
endArrow,
|
|
1714
1712
|
strokePaint,
|
|
@@ -1920,14 +1918,14 @@ function elementHasTextHyperlink(el) {
|
|
|
1920
1918
|
return Boolean(el.textSegments?.some((segment) => Boolean(segment.style?.hyperlink)));
|
|
1921
1919
|
}
|
|
1922
1920
|
function renderDagDuotoneFilterForElement(el) {
|
|
1923
|
-
if (!
|
|
1921
|
+
if (!chunkH5V24JVW_js.hasDagDuotoneEffect(el)) {
|
|
1924
1922
|
return null;
|
|
1925
1923
|
}
|
|
1926
1924
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
1927
1925
|
if (!duotone) {
|
|
1928
1926
|
return null;
|
|
1929
1927
|
}
|
|
1930
|
-
return
|
|
1928
|
+
return chunkH5V24JVW_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
1931
1929
|
}
|
|
1932
1930
|
function getContainerStyle({
|
|
1933
1931
|
el,
|
|
@@ -1944,12 +1942,12 @@ function getContainerStyle({
|
|
|
1944
1942
|
return {
|
|
1945
1943
|
left: isFullscreenMedia ? 0 : el.x,
|
|
1946
1944
|
top: isFullscreenMedia ? 0 : el.y,
|
|
1947
|
-
width: isFullscreenMedia ? "100%" : Math.max(el.width,
|
|
1948
|
-
height: isFullscreenMedia ? "100%" : Math.max(el.height,
|
|
1949
|
-
transform: isFullscreenMedia ? "none" :
|
|
1945
|
+
width: isFullscreenMedia ? "100%" : Math.max(el.width, chunkH5V24JVW_js.MIN_ELEMENT_SIZE),
|
|
1946
|
+
height: isFullscreenMedia ? "100%" : Math.max(el.height, chunkH5V24JVW_js.MIN_ELEMENT_SIZE),
|
|
1947
|
+
transform: isFullscreenMedia ? "none" : chunkG5GATDE4_js.getElementTransform(el),
|
|
1950
1948
|
transformOrigin: "center",
|
|
1951
1949
|
overflow: overflowValue,
|
|
1952
|
-
clipPath: isImg && !has3DExtrusion ?
|
|
1950
|
+
clipPath: isImg && !has3DExtrusion ? chunkH5V24JVW_js.getCropShapeClipPath(el) : void 0,
|
|
1953
1951
|
zIndex: isFullscreenMedia ? 20 : zIndex,
|
|
1954
1952
|
opacity,
|
|
1955
1953
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
@@ -1983,9 +1981,9 @@ function ActionIndicator({
|
|
|
1983
1981
|
function shapeParams(element) {
|
|
1984
1982
|
const style = chunkAD3EAEY6_js.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
1985
1983
|
const strokeWidth = Math.max(0, style?.strokeWidth || 0);
|
|
1986
|
-
const strokeColor =
|
|
1987
|
-
const fillColor =
|
|
1988
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
1984
|
+
const strokeColor = chunkG5GATDE4_js.normalizeHexColor(style?.strokeColor, chunkH5V24JVW_js.DEFAULT_STROKE_COLOR);
|
|
1985
|
+
const fillColor = chunkG5GATDE4_js.normalizeHexColor(style?.fillColor, chunkH5V24JVW_js.DEFAULT_FILL_COLOR);
|
|
1986
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkG5GATDE4_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
1989
1987
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
1990
1988
|
}
|
|
1991
1989
|
var Extrusion3DOverlay = React14__default.default.memo(({ data }) => {
|
|
@@ -2104,17 +2102,17 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2104
2102
|
const chartUpdateHandler = smartArtUpdateHandler;
|
|
2105
2103
|
const { hf, fc, sw, sc } = shapeParams(el);
|
|
2106
2104
|
const elementLocks = el.locks;
|
|
2107
|
-
const isTxt =
|
|
2105
|
+
const isTxt = chunkG5GATDE4_js.isEditableTextElement(el) && !elementLocks?.noTextEdit;
|
|
2108
2106
|
const txtSE = chunkAD3EAEY6_js.hasTextProperties(el) ? el.textStyle : void 0;
|
|
2109
|
-
const ss =
|
|
2110
|
-
const ts =
|
|
2111
|
-
const vs =
|
|
2107
|
+
const ss = chunkH5V24JVW_js.getShapeVisualStyle(el, hf, fc, sw, sc);
|
|
2108
|
+
const ts = chunkH5V24JVW_js.getTextStyleForElement(el, chunkH5V24JVW_js.DEFAULT_TEXT_COLOR);
|
|
2109
|
+
const vs = chunkH5V24JVW_js.renderVectorShape(el, hf, fc, sw, sc);
|
|
2112
2110
|
const isImg = el.type === "picture" || el.type === "image";
|
|
2113
2111
|
const isModel3D = el.type === "model3d";
|
|
2114
|
-
const isConn =
|
|
2112
|
+
const isConn = chunkH5V24JVW_js.isConnectorOrLineElement(el);
|
|
2115
2113
|
const shapeStyle3d = chunkAD3EAEY6_js.hasShapeProperties(el) ? el.shapeStyle : void 0;
|
|
2116
2114
|
const extrusionData = React14.useMemo(
|
|
2117
|
-
() =>
|
|
2115
|
+
() => chunkH5V24JVW_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
2118
2116
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
2119
2117
|
);
|
|
2120
2118
|
const [isMediaPlaying, setIsMediaPlaying] = React14.useState(false);
|
|
@@ -2154,9 +2152,9 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2154
2152
|
const cur = effectiveIsInlineEditing ? "cursor-text" : effectiveCanInteract ? elementLocks?.noMove ? "cursor-default" : "cursor-move" : hasAction || isZoom ? "cursor-pointer" : "";
|
|
2155
2153
|
const isPresentationPassive = !effectiveCanInteract;
|
|
2156
2154
|
const isFullscreenMedia = el.type === "media" && Boolean(el.fullScreen) && isPresentationPassive && isMediaPlaying;
|
|
2157
|
-
const ariaRole = isActionable ? "button" :
|
|
2158
|
-
const ariaLabel =
|
|
2159
|
-
const ariaRoleDescription =
|
|
2155
|
+
const ariaRole = isActionable ? "button" : chunkG5GATDE4_js.getAriaRole(el);
|
|
2156
|
+
const ariaLabel = chunkG5GATDE4_js.getAriaLabel(el);
|
|
2157
|
+
const ariaRoleDescription = chunkG5GATDE4_js.getAriaRoleDescription(el);
|
|
2160
2158
|
const isFocusable = effectiveCanInteract || isActionable;
|
|
2161
2159
|
const interactionProps = getElementInteractionProps({
|
|
2162
2160
|
element: el,
|
|
@@ -2178,7 +2176,7 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2178
2176
|
"aria-roledescription": ariaRoleDescription,
|
|
2179
2177
|
"aria-selected": isSelected ? true : void 0,
|
|
2180
2178
|
tabIndex: isFocusable ? 0 : -1,
|
|
2181
|
-
className:
|
|
2179
|
+
className: chunkH5V24JVW_js.cn(
|
|
2182
2180
|
"absolute border",
|
|
2183
2181
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
2184
2182
|
cur,
|
|
@@ -2211,9 +2209,9 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2211
2209
|
txtSE,
|
|
2212
2210
|
txtS: ts,
|
|
2213
2211
|
vecShape: vs,
|
|
2214
|
-
imgStyle:
|
|
2215
|
-
imgFilter:
|
|
2216
|
-
imgOpacity:
|
|
2212
|
+
imgStyle: chunkH5V24JVW_js.getImageRenderStyle(el),
|
|
2213
|
+
imgFilter: chunkG5GATDE4_js.getImageEffectsFilter(el),
|
|
2214
|
+
imgOpacity: chunkG5GATDE4_js.getImageEffectsOpacity(el),
|
|
2217
2215
|
imgAlt: imageAltText,
|
|
2218
2216
|
isTxtEl: isTxt,
|
|
2219
2217
|
media: mediaDataUrls,
|
|
@@ -2279,7 +2277,7 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2279
2277
|
onResizePointerDown,
|
|
2280
2278
|
onAdjustmentPointerDown,
|
|
2281
2279
|
rotation: el.rotation,
|
|
2282
|
-
nonRotationTransform:
|
|
2280
|
+
nonRotationTransform: chunkG5GATDE4_js.getElementTransformWithoutRotation(el),
|
|
2283
2281
|
onRotate: elementLocks?.noRotation ? void 0 : onRotate
|
|
2284
2282
|
}
|
|
2285
2283
|
)
|
|
@@ -2289,8 +2287,8 @@ var ElementRenderer = React14__default.default.memo(
|
|
|
2289
2287
|
}
|
|
2290
2288
|
);
|
|
2291
2289
|
function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefix) {
|
|
2292
|
-
const points =
|
|
2293
|
-
const circles =
|
|
2290
|
+
const points = chunkG5GATDE4_js.extractPathPoints(pathD);
|
|
2291
|
+
const circles = chunkG5GATDE4_js.generatePressureCircles(points, widths, {
|
|
2294
2292
|
baseWidth,
|
|
2295
2293
|
minRadius: 0.5,
|
|
2296
2294
|
maxRadius: baseWidth * 1.5
|
|
@@ -2300,8 +2298,8 @@ function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefi
|
|
|
2300
2298
|
function renderInk(el, options) {
|
|
2301
2299
|
const replay = options?.replay ?? false;
|
|
2302
2300
|
Boolean(el.inkPointPressures) && el.inkPointPressures.length > 0;
|
|
2303
|
-
Boolean(el.inkWidths) && el.inkWidths.length > 1 &&
|
|
2304
|
-
const replayStyles = replay ?
|
|
2301
|
+
Boolean(el.inkWidths) && el.inkWidths.length > 1 && chunkG5GATDE4_js.hasPressureVariation(el.inkWidths);
|
|
2302
|
+
const replayStyles = replay ? chunkG5GATDE4_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
2305
2303
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2306
2304
|
"svg",
|
|
2307
2305
|
{
|
|
@@ -2309,18 +2307,18 @@ function renderInk(el, options) {
|
|
|
2309
2307
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
2310
2308
|
preserveAspectRatio: "none",
|
|
2311
2309
|
children: [
|
|
2312
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
2310
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkG5GATDE4_js.INK_REPLAY_KEYFRAMES }),
|
|
2313
2311
|
el.inkPaths.map((d, i) => {
|
|
2314
|
-
const color =
|
|
2315
|
-
const width =
|
|
2316
|
-
const opacity =
|
|
2312
|
+
const color = chunkG5GATDE4_js.resolveInkColor(el.inkColors, i);
|
|
2313
|
+
const width = chunkG5GATDE4_js.resolveInkWidth(el.inkWidths, i);
|
|
2314
|
+
const opacity = chunkG5GATDE4_js.resolveInkOpacity(el.inkOpacities, i);
|
|
2317
2315
|
{
|
|
2318
2316
|
const pointPressures = el.inkPointPressures?.[i];
|
|
2319
|
-
if (pointPressures && pointPressures.length > 1 &&
|
|
2320
|
-
const pointWidths =
|
|
2317
|
+
if (pointPressures && pointPressures.length > 1 && chunkG5GATDE4_js.hasPressureVariation(pointPressures)) {
|
|
2318
|
+
const pointWidths = chunkG5GATDE4_js.pressuresToWidths(pointPressures, width);
|
|
2321
2319
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(d, pointWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
|
|
2322
2320
|
}
|
|
2323
|
-
if (el.inkWidths && el.inkWidths.length > 1 &&
|
|
2321
|
+
if (el.inkWidths && el.inkWidths.length > 1 && chunkG5GATDE4_js.hasPressureVariation(el.inkWidths)) {
|
|
2324
2322
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(d, el.inkWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
|
|
2325
2323
|
}
|
|
2326
2324
|
}
|
|
@@ -2355,10 +2353,10 @@ function renderInk(el, options) {
|
|
|
2355
2353
|
function renderGroup(children) {
|
|
2356
2354
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: children.map((c, childIndex) => {
|
|
2357
2355
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
2358
|
-
const ss =
|
|
2359
|
-
const vs =
|
|
2360
|
-
const ts =
|
|
2361
|
-
const isTxt =
|
|
2356
|
+
const ss = chunkH5V24JVW_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
2357
|
+
const vs = chunkH5V24JVW_js.renderVectorShape(c, hf, fc, sw, sc);
|
|
2358
|
+
const ts = chunkH5V24JVW_js.getTextStyleForElement(c, chunkH5V24JVW_js.DEFAULT_TEXT_COLOR);
|
|
2359
|
+
const isTxt = chunkG5GATDE4_js.isEditableTextElement(c);
|
|
2362
2360
|
const isI = c.type === "picture" || c.type === "image";
|
|
2363
2361
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2364
2362
|
"div",
|
|
@@ -2367,12 +2365,12 @@ function renderGroup(children) {
|
|
|
2367
2365
|
style: {
|
|
2368
2366
|
left: c.x,
|
|
2369
2367
|
top: c.y,
|
|
2370
|
-
width: Math.max(c.width,
|
|
2371
|
-
height: Math.max(c.height,
|
|
2372
|
-
transform:
|
|
2368
|
+
width: Math.max(c.width, chunkH5V24JVW_js.MIN_ELEMENT_SIZE),
|
|
2369
|
+
height: Math.max(c.height, chunkH5V24JVW_js.MIN_ELEMENT_SIZE),
|
|
2370
|
+
transform: chunkG5GATDE4_js.getElementTransform(c),
|
|
2373
2371
|
transformOrigin: "center",
|
|
2374
2372
|
overflow: isI ? "hidden" : void 0,
|
|
2375
|
-
clipPath: isI ?
|
|
2373
|
+
clipPath: isI ? chunkH5V24JVW_js.getCropShapeClipPath(c) : void 0,
|
|
2376
2374
|
...ss,
|
|
2377
2375
|
// Explicit z-index preserves document order stacking within the
|
|
2378
2376
|
// group: later children in the array (= later in p:grpSp XML)
|
|
@@ -2380,11 +2378,11 @@ function renderGroup(children) {
|
|
|
2380
2378
|
// Placed after ...ss to ensure it is never overwritten.
|
|
2381
2379
|
zIndex: childIndex
|
|
2382
2380
|
},
|
|
2383
|
-
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) ? chunkH5V24JVW_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2384
2382
|
"div",
|
|
2385
2383
|
{
|
|
2386
2384
|
className: "pointer-events-none select-none w-full h-full",
|
|
2387
|
-
style:
|
|
2385
|
+
style: chunkH5V24JVW_js.getImageTilingStyle(c)
|
|
2388
2386
|
}
|
|
2389
2387
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2390
2388
|
"img",
|
|
@@ -2392,7 +2390,7 @@ function renderGroup(children) {
|
|
|
2392
2390
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
2393
2391
|
alt: chunkAALZCSY4_js.translationsEn["pptx.ink.groupChildAlt"],
|
|
2394
2392
|
className: "pointer-events-none select-none",
|
|
2395
|
-
style:
|
|
2393
|
+
style: chunkH5V24JVW_js.getImageRenderStyle(c),
|
|
2396
2394
|
draggable: false
|
|
2397
2395
|
}
|
|
2398
2396
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -2402,7 +2400,7 @@ function renderGroup(children) {
|
|
|
2402
2400
|
{
|
|
2403
2401
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
2404
2402
|
style: ts,
|
|
2405
|
-
children:
|
|
2403
|
+
children: chunkH5V24JVW_js.renderTextSegments(c, chunkH5V24JVW_js.DEFAULT_TEXT_COLOR)
|
|
2406
2404
|
}
|
|
2407
2405
|
) : null
|
|
2408
2406
|
] })
|
|
@@ -2415,7 +2413,7 @@ function renderContentPart(el, options) {
|
|
|
2415
2413
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
2416
2414
|
const replay = options?.replay ?? false;
|
|
2417
2415
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
2418
|
-
const replayStyles = replay ?
|
|
2416
|
+
const replayStyles = replay ? chunkG5GATDE4_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
2419
2417
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2420
2418
|
"svg",
|
|
2421
2419
|
{
|
|
@@ -2423,10 +2421,10 @@ function renderContentPart(el, options) {
|
|
|
2423
2421
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
2424
2422
|
preserveAspectRatio: "none",
|
|
2425
2423
|
children: [
|
|
2426
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
2424
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkG5GATDE4_js.INK_REPLAY_KEYFRAMES }),
|
|
2427
2425
|
el.inkStrokes.map((stroke, i) => {
|
|
2428
|
-
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 &&
|
|
2429
|
-
const pointWidths =
|
|
2426
|
+
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 && chunkG5GATDE4_js.hasPressureVariation(stroke.pressures)) {
|
|
2427
|
+
const pointWidths = chunkG5GATDE4_js.pressuresToWidths(stroke.pressures, stroke.width);
|
|
2430
2428
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: renderPressureStroke(
|
|
2431
2429
|
stroke.path,
|
|
2432
2430
|
pointWidths,
|
|
@@ -2638,16 +2636,16 @@ function getOleIcon(type, color, size = 32) {
|
|
|
2638
2636
|
}
|
|
2639
2637
|
}
|
|
2640
2638
|
function getOleAriaLabel(el) {
|
|
2641
|
-
const oleType =
|
|
2642
|
-
const typeLabel =
|
|
2639
|
+
const oleType = chunkG5GATDE4_js.resolveOleType(el);
|
|
2640
|
+
const typeLabel = chunkG5GATDE4_js.getOleTypeLabel(oleType);
|
|
2643
2641
|
if (el.fileName) {
|
|
2644
2642
|
return `${typeLabel}: ${el.fileName}`;
|
|
2645
2643
|
}
|
|
2646
2644
|
return typeLabel;
|
|
2647
2645
|
}
|
|
2648
2646
|
function renderOleBadge(oleType) {
|
|
2649
|
-
const color =
|
|
2650
|
-
const shortLabel =
|
|
2647
|
+
const color = chunkG5GATDE4_js.getOleTypeColor(oleType);
|
|
2648
|
+
const shortLabel = chunkG5GATDE4_js.getOleBadgeLabel(oleType);
|
|
2651
2649
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", className: "absolute bottom-1 right-1 z-10", children: [
|
|
2652
2650
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "2", width: "20", height: "20", rx: "3", fill: color }),
|
|
2653
2651
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2739,11 +2737,11 @@ function InlineTextEditor({
|
|
|
2739
2737
|
mountedRef.current = true;
|
|
2740
2738
|
return;
|
|
2741
2739
|
}
|
|
2742
|
-
const pending =
|
|
2740
|
+
const pending = chunkG5GATDE4_js.getPendingSelectionRestore();
|
|
2743
2741
|
if (!pending || !editorRef.current) {
|
|
2744
2742
|
return;
|
|
2745
2743
|
}
|
|
2746
|
-
|
|
2744
|
+
chunkG5GATDE4_js.restoreSegmentSelection(
|
|
2747
2745
|
editorRef.current,
|
|
2748
2746
|
pending.startSegIdx,
|
|
2749
2747
|
pending.startOffset,
|
|
@@ -2751,8 +2749,8 @@ function InlineTextEditor({
|
|
|
2751
2749
|
pending.endOffset
|
|
2752
2750
|
);
|
|
2753
2751
|
});
|
|
2754
|
-
const warpStyle =
|
|
2755
|
-
const compensationTransform =
|
|
2752
|
+
const warpStyle = chunkH5V24JVW_js.getTextWarpStyle(textStyleRaw);
|
|
2753
|
+
const compensationTransform = chunkG5GATDE4_js.getTextCompensationTransform(element);
|
|
2756
2754
|
const warpTransform = warpStyle?.transform;
|
|
2757
2755
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
2758
2756
|
const wrapperStyle = {
|
|
@@ -2827,7 +2825,7 @@ function InlineTextEditor({
|
|
|
2827
2825
|
const text = e.clipboardData.getData("text/plain");
|
|
2828
2826
|
document.execCommand("insertText", false, text);
|
|
2829
2827
|
},
|
|
2830
|
-
children: seed.hasRichSegments ?
|
|
2828
|
+
children: seed.hasRichSegments ? chunkH5V24JVW_js.renderTextSegments(element, chunkH5V24JVW_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
2831
2829
|
}
|
|
2832
2830
|
);
|
|
2833
2831
|
}
|
|
@@ -2837,7 +2835,7 @@ function FailedToLoad() {
|
|
|
2837
2835
|
var LazyModel3DScene = React14__default.default.lazy(
|
|
2838
2836
|
async () => {
|
|
2839
2837
|
try {
|
|
2840
|
-
return await import('./Model3DScene-
|
|
2838
|
+
return await import('./Model3DScene-3RYDRQOD.js');
|
|
2841
2839
|
} catch {
|
|
2842
2840
|
return { default: FailedToLoad };
|
|
2843
2841
|
}
|
|
@@ -2982,11 +2980,11 @@ function buildEmbedInfo(el) {
|
|
|
2982
2980
|
const canDownload = Boolean(el.oleEmbeddedData);
|
|
2983
2981
|
return {
|
|
2984
2982
|
fileName: el.oleEmbeddedFileName ?? el.fileName,
|
|
2985
|
-
readableSize:
|
|
2983
|
+
readableSize: chunkG5GATDE4_js.formatBytes(el.oleEmbeddedByteSize),
|
|
2986
2984
|
progId: el.oleProgId,
|
|
2987
|
-
typeLabel:
|
|
2985
|
+
typeLabel: chunkG5GATDE4_js.getOleTypeLabel(chunkG5GATDE4_js.resolveOleType(el)),
|
|
2988
2986
|
canDownload,
|
|
2989
|
-
canOpenInBrowser: canDownload &&
|
|
2987
|
+
canOpenInBrowser: canDownload && chunkG5GATDE4_js.isBrowserOpenableMime(el.oleEmbeddedMimeType)
|
|
2990
2988
|
};
|
|
2991
2989
|
}
|
|
2992
2990
|
function buildTooltip(info) {
|
|
@@ -3036,7 +3034,7 @@ function OleActionFooter({ el, info }) {
|
|
|
3036
3034
|
"button",
|
|
3037
3035
|
{
|
|
3038
3036
|
type: "button",
|
|
3039
|
-
onClick: () =>
|
|
3037
|
+
onClick: () => chunkG5GATDE4_js.openUrlInNewTab(el.oleEmbeddedData),
|
|
3040
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",
|
|
3041
3039
|
title: `Open ${downloadName} in a new tab`,
|
|
3042
3040
|
children: t("pptx.ole.open")
|
|
@@ -3048,7 +3046,7 @@ function OleActionFooter({ el, info }) {
|
|
|
3048
3046
|
);
|
|
3049
3047
|
}
|
|
3050
3048
|
function OleRenderer({ element: el }) {
|
|
3051
|
-
const oleType =
|
|
3049
|
+
const oleType = chunkG5GATDE4_js.resolveOleType(el);
|
|
3052
3050
|
const ariaLabel = getOleAriaLabel(el);
|
|
3053
3051
|
const info = buildEmbedInfo(el);
|
|
3054
3052
|
const tooltip = buildTooltip(info);
|
|
@@ -3076,8 +3074,8 @@ function OleRenderer({ element: el }) {
|
|
|
3076
3074
|
}
|
|
3077
3075
|
);
|
|
3078
3076
|
}
|
|
3079
|
-
const color =
|
|
3080
|
-
const label =
|
|
3077
|
+
const color = chunkG5GATDE4_js.getOleTypeColor(oleType);
|
|
3078
|
+
const label = chunkG5GATDE4_js.getOleTypeLabel(oleType);
|
|
3081
3079
|
const displayName = info.fileName ?? label;
|
|
3082
3080
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3083
3081
|
"div",
|
|
@@ -3222,7 +3220,7 @@ function useSmartArtHoverState(containerRef) {
|
|
|
3222
3220
|
cancelPendingHide();
|
|
3223
3221
|
setHoveredNodeId(nodeEl.getAttribute(NODE_ID_ATTR));
|
|
3224
3222
|
setHoveredNodeRect(
|
|
3225
|
-
|
|
3223
|
+
chunkG5GATDE4_js.computeInlineEditorRect(
|
|
3226
3224
|
nodeEl.getBoundingClientRect(),
|
|
3227
3225
|
container.getBoundingClientRect()
|
|
3228
3226
|
)
|
|
@@ -3281,7 +3279,7 @@ function SmartArtEditableLayer({
|
|
|
3281
3279
|
const textRect = textEl?.getBoundingClientRect();
|
|
3282
3280
|
const hasTextRect = textRect !== void 0 && textRect.width > 0 && textRect.height > 0;
|
|
3283
3281
|
const sourceRect = hasTextRect ? textRect : nodeEl.getBoundingClientRect();
|
|
3284
|
-
const rect =
|
|
3282
|
+
const rect = chunkG5GATDE4_js.computeInlineEditorRect(sourceRect, container.getBoundingClientRect());
|
|
3285
3283
|
const paddedRect = {
|
|
3286
3284
|
left: rect.left - EDITOR_PADDING,
|
|
3287
3285
|
top: rect.top - EDITOR_PADDING,
|
|
@@ -3298,7 +3296,7 @@ function SmartArtEditableLayer({
|
|
|
3298
3296
|
if (!canEdit) {
|
|
3299
3297
|
return children;
|
|
3300
3298
|
}
|
|
3301
|
-
const initialText = edit ?
|
|
3299
|
+
const initialText = edit ? chunkG5GATDE4_js.findSmartArtNodeText(smartArtData, edit.nodeId) ?? "" : "";
|
|
3302
3300
|
const showStyleBar = !edit && hoveredNodeId !== null && hoveredNodeRect !== null && palette !== void 0 && onChangeNodeStyle !== void 0;
|
|
3303
3301
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3304
3302
|
"div",
|
|
@@ -3397,8 +3395,8 @@ function DrawingShapeRenderer({
|
|
|
3397
3395
|
}
|
|
3398
3396
|
const drawingW = maxX - minX || 1;
|
|
3399
3397
|
const drawingH = maxY - minY || 1;
|
|
3400
|
-
const shadow =
|
|
3401
|
-
const sw =
|
|
3398
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3399
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
3402
3400
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3403
3401
|
"svg",
|
|
3404
3402
|
{
|
|
@@ -3407,7 +3405,7 @@ function DrawingShapeRenderer({
|
|
|
3407
3405
|
preserveAspectRatio: "xMidYMid meet",
|
|
3408
3406
|
"data-testid": "smartart-drawing-shapes",
|
|
3409
3407
|
children: shapes.map((shape, i) => {
|
|
3410
|
-
const fill = shape.fillColor ??
|
|
3408
|
+
const fill = shape.fillColor ?? chunkH5V24JVW_js.colour(i, palette);
|
|
3411
3409
|
const relX = shape.x - minX;
|
|
3412
3410
|
const relY = shape.y - minY;
|
|
3413
3411
|
const rx = shape.shapeType === "roundRect" ? Math.min(shape.width, shape.height) * 0.1 : 0;
|
|
@@ -3416,10 +3414,10 @@ function DrawingShapeRenderer({
|
|
|
3416
3414
|
const rotation = shape.rotation ? `rotate(${shape.rotation} ${relX + shape.width / 2} ${relY + shape.height / 2})` : void 0;
|
|
3417
3415
|
const strokeCol = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
|
|
3418
3416
|
const strokeW = shape.strokeWidth ?? sw;
|
|
3419
|
-
const fontSize = shape.fontSize ??
|
|
3420
|
-
const nodeId = nodes ?
|
|
3417
|
+
const fontSize = shape.fontSize ?? chunkH5V24JVW_js.fitFontSize(shape.text ?? "", shape.width * 0.85, shape.height, 14);
|
|
3418
|
+
const nodeId = nodes ? chunkG5GATDE4_js.resolveDrawingShapeNodeId(shape, i, shapes, nodes) : void 0;
|
|
3421
3419
|
const nodeLabel = nodeId ? nodeLabels?.get(nodeId) : void 0;
|
|
3422
|
-
const groupProps = nodeId ?
|
|
3420
|
+
const groupProps = nodeId ? chunkH5V24JVW_js.smartArtNodeGroupProps(nodeId, shadow, nodeLabel) : { style: { filter: shadow } };
|
|
3423
3421
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { ...groupProps, children: [
|
|
3424
3422
|
nodeLabel ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: nodeLabel }) : null,
|
|
3425
3423
|
isEllipse ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3437,7 +3435,7 @@ function DrawingShapeRenderer({
|
|
|
3437
3435
|
) : isChevron ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3438
3436
|
"polygon",
|
|
3439
3437
|
{
|
|
3440
|
-
points:
|
|
3438
|
+
points: chunkH5V24JVW_js.chevronPoints(relX, relY, shape.width, shape.height),
|
|
3441
3439
|
fill,
|
|
3442
3440
|
stroke: strokeCol,
|
|
3443
3441
|
strokeWidth: strokeW,
|
|
@@ -3458,11 +3456,11 @@ function DrawingShapeRenderer({
|
|
|
3458
3456
|
}
|
|
3459
3457
|
),
|
|
3460
3458
|
shape.text ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3461
|
-
|
|
3459
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3462
3460
|
{
|
|
3463
3461
|
x: relX + shape.width / 2,
|
|
3464
3462
|
y: relY + shape.height / 2,
|
|
3465
|
-
text:
|
|
3463
|
+
text: chunkH5V24JVW_js.truncate(shape.text, 40),
|
|
3466
3464
|
fill: shape.fontColor ?? "white",
|
|
3467
3465
|
fontSize,
|
|
3468
3466
|
className: "pointer-events-none"
|
|
@@ -3478,7 +3476,7 @@ function DrawingShapeRenderer({
|
|
|
3478
3476
|
function resolveNodeStyle(node, index, palette) {
|
|
3479
3477
|
const style = node.style;
|
|
3480
3478
|
return {
|
|
3481
|
-
fill: style?.fillColor ??
|
|
3479
|
+
fill: style?.fillColor ?? chunkH5V24JVW_js.colour(index, palette),
|
|
3482
3480
|
fontColor: style?.fontColor ?? "white",
|
|
3483
3481
|
fontWeight: style?.bold ? 700 : void 0,
|
|
3484
3482
|
fontStyle: style?.italic ? "italic" : void 0,
|
|
@@ -3500,8 +3498,8 @@ function ListRenderer({
|
|
|
3500
3498
|
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3501
3499
|
const itemW = w - pad * 2;
|
|
3502
3500
|
const rx = Math.min(6, itemH * 0.15);
|
|
3503
|
-
const shadow =
|
|
3504
|
-
const sw =
|
|
3501
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3502
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
3505
3503
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3506
3504
|
"svg",
|
|
3507
3505
|
{
|
|
@@ -3511,13 +3509,13 @@ function ListRenderer({
|
|
|
3511
3509
|
"data-testid": "smartart-list",
|
|
3512
3510
|
children: nodes.map((node, i) => {
|
|
3513
3511
|
const y = pad + i * (itemH + gap);
|
|
3514
|
-
const fontSize =
|
|
3512
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, itemW * 0.9, itemH, 12);
|
|
3515
3513
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3516
3514
|
const label = nodeLabels?.get(node.id);
|
|
3517
3515
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3518
3516
|
"g",
|
|
3519
3517
|
{
|
|
3520
|
-
...
|
|
3518
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3521
3519
|
children: [
|
|
3522
3520
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3523
3521
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3529,17 +3527,17 @@ function ListRenderer({
|
|
|
3529
3527
|
height: itemH,
|
|
3530
3528
|
rx,
|
|
3531
3529
|
fill: ns.fill,
|
|
3532
|
-
opacity:
|
|
3530
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style),
|
|
3533
3531
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3534
3532
|
strokeWidth: sw
|
|
3535
3533
|
}
|
|
3536
3534
|
),
|
|
3537
3535
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3538
|
-
|
|
3536
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3539
3537
|
{
|
|
3540
3538
|
x: pad + itemW / 2,
|
|
3541
3539
|
y: y + itemH / 2,
|
|
3542
|
-
text:
|
|
3540
|
+
text: chunkH5V24JVW_js.truncate(node.text, 40),
|
|
3543
3541
|
fill: ns.fontColor,
|
|
3544
3542
|
fontWeight: ns.fontWeight,
|
|
3545
3543
|
fontStyle: ns.fontStyle,
|
|
@@ -3571,8 +3569,8 @@ function ProcessRenderer({
|
|
|
3571
3569
|
const itemW = (usableW - gap * (nodes.length - 1)) / nodes.length;
|
|
3572
3570
|
const itemH = Math.min(h - pad * 2, h * 0.6);
|
|
3573
3571
|
const yMid = h / 2;
|
|
3574
|
-
const shadow =
|
|
3575
|
-
const sw =
|
|
3572
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3573
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
3576
3574
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3577
3575
|
"svg",
|
|
3578
3576
|
{
|
|
@@ -3586,13 +3584,13 @@ function ProcessRenderer({
|
|
|
3586
3584
|
const isFirst = i === 0;
|
|
3587
3585
|
const isLast = i === nodes.length - 1;
|
|
3588
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}`;
|
|
3589
|
-
const fontSize =
|
|
3587
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, itemW * 0.7, itemH, 12);
|
|
3590
3588
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3591
3589
|
const label = nodeLabels?.get(node.id);
|
|
3592
3590
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3593
3591
|
"g",
|
|
3594
3592
|
{
|
|
3595
|
-
...
|
|
3593
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3596
3594
|
children: [
|
|
3597
3595
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3598
3596
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3600,17 +3598,17 @@ function ProcessRenderer({
|
|
|
3600
3598
|
{
|
|
3601
3599
|
points,
|
|
3602
3600
|
fill: ns.fill,
|
|
3603
|
-
opacity:
|
|
3601
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style),
|
|
3604
3602
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3605
3603
|
strokeWidth: sw
|
|
3606
3604
|
}
|
|
3607
3605
|
),
|
|
3608
3606
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3609
|
-
|
|
3607
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3610
3608
|
{
|
|
3611
3609
|
x: x + itemW / 2,
|
|
3612
3610
|
y: yMid,
|
|
3613
|
-
text:
|
|
3611
|
+
text: chunkH5V24JVW_js.truncate(node.text, 25),
|
|
3614
3612
|
fill: ns.fontColor,
|
|
3615
3613
|
fontWeight: ns.fontWeight,
|
|
3616
3614
|
fontStyle: ns.fontStyle,
|
|
@@ -3640,8 +3638,8 @@ function CycleRenderer({
|
|
|
3640
3638
|
const cy = h / 2;
|
|
3641
3639
|
const radius = size * 0.35;
|
|
3642
3640
|
const nodeR = Math.max(size * 0.06, Math.min(size * 0.12, 200 / nodes.length));
|
|
3643
|
-
const shadow =
|
|
3644
|
-
const sw =
|
|
3641
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3642
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
3645
3643
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3646
3644
|
"svg",
|
|
3647
3645
|
{
|
|
@@ -3680,13 +3678,13 @@ function CycleRenderer({
|
|
|
3680
3678
|
const angle = i / nodes.length * Math.PI * 2 - Math.PI / 2;
|
|
3681
3679
|
const nx = cx + radius * Math.cos(angle);
|
|
3682
3680
|
const ny = cy + radius * Math.sin(angle);
|
|
3683
|
-
const fontSize =
|
|
3681
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, nodeR * 1.4, nodeR * 2, 11);
|
|
3684
3682
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3685
3683
|
const label = nodeLabels?.get(node.id);
|
|
3686
3684
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3687
3685
|
"g",
|
|
3688
3686
|
{
|
|
3689
|
-
...
|
|
3687
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3690
3688
|
children: [
|
|
3691
3689
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3692
3690
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3696,17 +3694,17 @@ function CycleRenderer({
|
|
|
3696
3694
|
cy: ny,
|
|
3697
3695
|
r: nodeR,
|
|
3698
3696
|
fill: ns.fill,
|
|
3699
|
-
opacity:
|
|
3697
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style),
|
|
3700
3698
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3701
3699
|
strokeWidth: sw
|
|
3702
3700
|
}
|
|
3703
3701
|
),
|
|
3704
3702
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3705
|
-
|
|
3703
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3706
3704
|
{
|
|
3707
3705
|
x: nx,
|
|
3708
3706
|
y: ny,
|
|
3709
|
-
text:
|
|
3707
|
+
text: chunkH5V24JVW_js.truncate(node.text, 20),
|
|
3710
3708
|
fill: ns.fontColor,
|
|
3711
3709
|
fontWeight: ns.fontWeight,
|
|
3712
3710
|
fontStyle: ns.fontStyle,
|
|
@@ -3741,8 +3739,8 @@ function MatrixRenderer({
|
|
|
3741
3739
|
const cellW = (usableW - gap * (cols - 1)) / cols;
|
|
3742
3740
|
const cellH = (usableH - gap * (rows - 1)) / rows;
|
|
3743
3741
|
const rx = Math.min(6, Math.min(cellW, cellH) * 0.1);
|
|
3744
|
-
const shadow =
|
|
3745
|
-
const sw =
|
|
3742
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3743
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
3746
3744
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3747
3745
|
"svg",
|
|
3748
3746
|
{
|
|
@@ -3755,13 +3753,13 @@ function MatrixRenderer({
|
|
|
3755
3753
|
const row = Math.floor(i / cols);
|
|
3756
3754
|
const x = pad + col * (cellW + gap);
|
|
3757
3755
|
const y = pad + row * (cellH + gap);
|
|
3758
|
-
const fontSize =
|
|
3756
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, cellW * 0.85, cellH, 12);
|
|
3759
3757
|
const ns = resolveNodeStyle(node, i, palette);
|
|
3760
3758
|
const label = nodeLabels?.get(node.id);
|
|
3761
3759
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3762
3760
|
"g",
|
|
3763
3761
|
{
|
|
3764
|
-
...
|
|
3762
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow, label),
|
|
3765
3763
|
children: [
|
|
3766
3764
|
label ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: label }) : null,
|
|
3767
3765
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3773,17 +3771,17 @@ function MatrixRenderer({
|
|
|
3773
3771
|
height: cellH,
|
|
3774
3772
|
rx,
|
|
3775
3773
|
fill: ns.fill,
|
|
3776
|
-
opacity:
|
|
3774
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style),
|
|
3777
3775
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3778
3776
|
strokeWidth: sw
|
|
3779
3777
|
}
|
|
3780
3778
|
),
|
|
3781
3779
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3782
|
-
|
|
3780
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3783
3781
|
{
|
|
3784
3782
|
x: x + cellW / 2,
|
|
3785
3783
|
y: y + cellH / 2,
|
|
3786
|
-
text:
|
|
3784
|
+
text: chunkH5V24JVW_js.truncate(node.text, 30),
|
|
3787
3785
|
fill: ns.fontColor,
|
|
3788
3786
|
fontWeight: ns.fontWeight ?? 500,
|
|
3789
3787
|
fontStyle: ns.fontStyle,
|
|
@@ -3812,8 +3810,8 @@ function PyramidRenderer({
|
|
|
3812
3810
|
const usableH = h - pad * 2;
|
|
3813
3811
|
const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3814
3812
|
const maxW = w - pad * 2;
|
|
3815
|
-
const shadow =
|
|
3816
|
-
const sw =
|
|
3813
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3814
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
3817
3815
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3818
3816
|
"svg",
|
|
3819
3817
|
{
|
|
@@ -3837,28 +3835,28 @@ function PyramidRenderer({
|
|
|
3837
3835
|
`${bottomRight},${y + bandH}`,
|
|
3838
3836
|
`${bottomLeft},${y + bandH}`
|
|
3839
3837
|
].join(" ");
|
|
3840
|
-
const fontSize =
|
|
3838
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, topW * 0.85, bandH, 12);
|
|
3841
3839
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3842
3840
|
"g",
|
|
3843
3841
|
{
|
|
3844
|
-
...
|
|
3842
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
3845
3843
|
children: [
|
|
3846
3844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3847
3845
|
"polygon",
|
|
3848
3846
|
{
|
|
3849
3847
|
points,
|
|
3850
|
-
fill:
|
|
3851
|
-
opacity:
|
|
3848
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
3849
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style),
|
|
3852
3850
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3853
3851
|
strokeWidth: sw
|
|
3854
3852
|
}
|
|
3855
3853
|
),
|
|
3856
3854
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3857
|
-
|
|
3855
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3858
3856
|
{
|
|
3859
3857
|
x: w / 2,
|
|
3860
3858
|
y: y + bandH / 2,
|
|
3861
|
-
text:
|
|
3859
|
+
text: chunkH5V24JVW_js.truncate(node.text, 30),
|
|
3862
3860
|
fill: "white",
|
|
3863
3861
|
fontSize,
|
|
3864
3862
|
className: "pointer-events-none"
|
|
@@ -3880,7 +3878,7 @@ function VennRenderer({
|
|
|
3880
3878
|
}) {
|
|
3881
3879
|
const w = element.width;
|
|
3882
3880
|
const h = element.height;
|
|
3883
|
-
const shadow =
|
|
3881
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3884
3882
|
if (nodes.length <= 4) {
|
|
3885
3883
|
const cx = w / 2;
|
|
3886
3884
|
const cy2 = h / 2;
|
|
@@ -3897,19 +3895,19 @@ function VennRenderer({
|
|
|
3897
3895
|
const angle = i / nodes.length * Math.PI * 2 - Math.PI / 2;
|
|
3898
3896
|
const nx = cx + spread * Math.cos(angle);
|
|
3899
3897
|
const ny = cy2 + spread * Math.sin(angle);
|
|
3900
|
-
const fontSize =
|
|
3898
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, r2 * 1.2, r2 * 2, 11);
|
|
3901
3899
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3902
3900
|
"g",
|
|
3903
3901
|
{
|
|
3904
|
-
...
|
|
3902
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
3905
3903
|
children: [
|
|
3906
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy: ny, r: r2, fill:
|
|
3904
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy: ny, r: r2, fill: chunkH5V24JVW_js.colour(i, palette), opacity: 0.35 }),
|
|
3907
3905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3908
|
-
|
|
3906
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3909
3907
|
{
|
|
3910
3908
|
x: nx,
|
|
3911
3909
|
y: ny,
|
|
3912
|
-
text:
|
|
3910
|
+
text: chunkH5V24JVW_js.truncate(node.text, 20),
|
|
3913
3911
|
fill: "white",
|
|
3914
3912
|
fontSize,
|
|
3915
3913
|
fontWeight: "bold",
|
|
@@ -3938,19 +3936,19 @@ function VennRenderer({
|
|
|
3938
3936
|
"data-testid": "smartart-venn",
|
|
3939
3937
|
children: nodes.map((node, i) => {
|
|
3940
3938
|
const nx = offsetX + i * (r * 2 - overlap);
|
|
3941
|
-
const fontSize =
|
|
3939
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, r * 1.2, r * 2, 10);
|
|
3942
3940
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3943
3941
|
"g",
|
|
3944
3942
|
{
|
|
3945
|
-
...
|
|
3943
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
3946
3944
|
children: [
|
|
3947
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy, r, fill:
|
|
3945
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: nx, cy, r, fill: chunkH5V24JVW_js.colour(i, palette), opacity: 0.35 }),
|
|
3948
3946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3949
|
-
|
|
3947
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
3950
3948
|
{
|
|
3951
3949
|
x: nx,
|
|
3952
3950
|
y: cy,
|
|
3953
|
-
text:
|
|
3951
|
+
text: chunkH5V24JVW_js.truncate(node.text, 20),
|
|
3954
3952
|
fill: "white",
|
|
3955
3953
|
fontSize,
|
|
3956
3954
|
fontWeight: "bold",
|
|
@@ -3976,7 +3974,7 @@ function FunnelRenderer({
|
|
|
3976
3974
|
const pad = 8;
|
|
3977
3975
|
const usableW = w - pad * 2;
|
|
3978
3976
|
const stageH = (h - pad * 2) / nodes.length;
|
|
3979
|
-
const shadow =
|
|
3977
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
3980
3978
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3981
3979
|
"svg",
|
|
3982
3980
|
{
|
|
@@ -3998,26 +3996,26 @@ function FunnelRenderer({
|
|
|
3998
3996
|
`${bottomRight},${y + stageH}`,
|
|
3999
3997
|
`${bottomLeft},${y + stageH}`
|
|
4000
3998
|
].join(" ");
|
|
4001
|
-
const fontSize =
|
|
3999
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, topWidth * 0.85, stageH, 11);
|
|
4002
4000
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4003
4001
|
"g",
|
|
4004
4002
|
{
|
|
4005
|
-
...
|
|
4003
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4006
4004
|
children: [
|
|
4007
4005
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4008
4006
|
"polygon",
|
|
4009
4007
|
{
|
|
4010
4008
|
points,
|
|
4011
|
-
fill:
|
|
4012
|
-
opacity:
|
|
4009
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4010
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style)
|
|
4013
4011
|
}
|
|
4014
4012
|
),
|
|
4015
4013
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4016
|
-
|
|
4014
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
4017
4015
|
{
|
|
4018
4016
|
x: w / 2,
|
|
4019
4017
|
y: y + stageH / 2,
|
|
4020
|
-
text:
|
|
4018
|
+
text: chunkH5V24JVW_js.truncate(node.text, 30),
|
|
4021
4019
|
fill: "white",
|
|
4022
4020
|
fontSize,
|
|
4023
4021
|
className: "pointer-events-none"
|
|
@@ -4044,7 +4042,7 @@ function TargetRenderer({
|
|
|
4044
4042
|
const maxR = Math.min(cx - 8, cy - 8);
|
|
4045
4043
|
const fontSize = Math.max(7, Math.min(10, maxR / (nodes.length + 1)));
|
|
4046
4044
|
const labelX = cx + maxR + 8;
|
|
4047
|
-
const shadow =
|
|
4045
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
4048
4046
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4049
4047
|
"svg",
|
|
4050
4048
|
{
|
|
@@ -4057,7 +4055,7 @@ function TargetRenderer({
|
|
|
4057
4055
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4058
4056
|
"g",
|
|
4059
4057
|
{
|
|
4060
|
-
...
|
|
4058
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4061
4059
|
children: [
|
|
4062
4060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4063
4061
|
"circle",
|
|
@@ -4065,8 +4063,8 @@ function TargetRenderer({
|
|
|
4065
4063
|
cx,
|
|
4066
4064
|
cy,
|
|
4067
4065
|
r: Math.max(r, 4),
|
|
4068
|
-
fill:
|
|
4069
|
-
opacity:
|
|
4066
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4067
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style)
|
|
4070
4068
|
}
|
|
4071
4069
|
),
|
|
4072
4070
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4076,7 +4074,7 @@ function TargetRenderer({
|
|
|
4076
4074
|
y1: cy,
|
|
4077
4075
|
x2: labelX - 2,
|
|
4078
4076
|
y2: 8 + i * (fontSize + 6),
|
|
4079
|
-
stroke:
|
|
4077
|
+
stroke: chunkH5V24JVW_js.colour(i, palette),
|
|
4080
4078
|
strokeWidth: 1,
|
|
4081
4079
|
opacity: 0.6
|
|
4082
4080
|
}
|
|
@@ -4088,10 +4086,10 @@ function TargetRenderer({
|
|
|
4088
4086
|
y: 8 + i * (fontSize + 6) + fontSize / 2,
|
|
4089
4087
|
textAnchor: "start",
|
|
4090
4088
|
dominantBaseline: "central",
|
|
4091
|
-
fill:
|
|
4089
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4092
4090
|
fontSize,
|
|
4093
4091
|
className: "pointer-events-none",
|
|
4094
|
-
children:
|
|
4092
|
+
children: chunkH5V24JVW_js.truncate(node.text, 30)
|
|
4095
4093
|
}
|
|
4096
4094
|
)
|
|
4097
4095
|
]
|
|
@@ -4108,12 +4106,12 @@ function HierarchyRenderer({
|
|
|
4108
4106
|
palette,
|
|
4109
4107
|
style
|
|
4110
4108
|
}) {
|
|
4111
|
-
const roots =
|
|
4109
|
+
const roots = chunkH5V24JVW_js.buildTree(nodes);
|
|
4112
4110
|
if (roots.length === 0) {
|
|
4113
4111
|
return /* @__PURE__ */ jsxRuntime.jsx(ListRenderer, { element, nodes, palette, style });
|
|
4114
4112
|
}
|
|
4115
|
-
const totalLeaves = roots.reduce((s, r) => s +
|
|
4116
|
-
const depth = Math.max(...roots.map(
|
|
4113
|
+
const totalLeaves = roots.reduce((s, r) => s + chunkH5V24JVW_js.treeWidth(r), 0);
|
|
4114
|
+
const depth = Math.max(...roots.map(chunkH5V24JVW_js.treeDepth));
|
|
4117
4115
|
const svgW = element.width;
|
|
4118
4116
|
const svgH = element.height;
|
|
4119
4117
|
const cellW = svgW / totalLeaves;
|
|
@@ -4121,24 +4119,24 @@ function HierarchyRenderer({
|
|
|
4121
4119
|
const boxW = Math.min(cellW * 0.8, 140);
|
|
4122
4120
|
const boxH = Math.min(cellH * 0.4, 36);
|
|
4123
4121
|
const rx = Math.min(6, boxH * 0.15);
|
|
4124
|
-
const shadow =
|
|
4125
|
-
const sw =
|
|
4122
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
4123
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
4126
4124
|
const elements = [];
|
|
4127
4125
|
let colourIdx = 0;
|
|
4128
4126
|
function renderTreeNode(t, xOffset, level) {
|
|
4129
|
-
const w =
|
|
4127
|
+
const w = chunkH5V24JVW_js.treeWidth(t);
|
|
4130
4128
|
const nodeCx = (xOffset + w / 2) * cellW;
|
|
4131
4129
|
const nodeCy = level * cellH + cellH / 2;
|
|
4132
4130
|
const ci = colourIdx++;
|
|
4133
|
-
const fontSize =
|
|
4131
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(t.node.text, boxW * 0.9, boxH, 11);
|
|
4134
4132
|
for (const child of t.children) {
|
|
4135
|
-
const childW =
|
|
4133
|
+
const childW = chunkH5V24JVW_js.treeWidth(child);
|
|
4136
4134
|
let childOffset2 = xOffset;
|
|
4137
4135
|
for (const c of t.children) {
|
|
4138
4136
|
if (c === child) {
|
|
4139
4137
|
break;
|
|
4140
4138
|
}
|
|
4141
|
-
childOffset2 +=
|
|
4139
|
+
childOffset2 += chunkH5V24JVW_js.treeWidth(c);
|
|
4142
4140
|
}
|
|
4143
4141
|
const childCx = (childOffset2 + childW / 2) * cellW;
|
|
4144
4142
|
const childCy = (level + 1) * cellH + cellH / 2;
|
|
@@ -4161,7 +4159,7 @@ function HierarchyRenderer({
|
|
|
4161
4159
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4162
4160
|
"g",
|
|
4163
4161
|
{
|
|
4164
|
-
...
|
|
4162
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(t.node.id, shadow),
|
|
4165
4163
|
children: [
|
|
4166
4164
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4167
4165
|
"rect",
|
|
@@ -4171,18 +4169,18 @@ function HierarchyRenderer({
|
|
|
4171
4169
|
width: boxW,
|
|
4172
4170
|
height: boxH,
|
|
4173
4171
|
rx,
|
|
4174
|
-
fill:
|
|
4175
|
-
opacity:
|
|
4172
|
+
fill: chunkH5V24JVW_js.colour(ci, palette),
|
|
4173
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(ci, nodes.length, style),
|
|
4176
4174
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
4177
4175
|
strokeWidth: sw
|
|
4178
4176
|
}
|
|
4179
4177
|
),
|
|
4180
4178
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4181
|
-
|
|
4179
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
4182
4180
|
{
|
|
4183
4181
|
x: nodeCx,
|
|
4184
4182
|
y: nodeCy,
|
|
4185
|
-
text:
|
|
4183
|
+
text: chunkH5V24JVW_js.truncate(t.node.text, 40),
|
|
4186
4184
|
fill: "white",
|
|
4187
4185
|
fontSize,
|
|
4188
4186
|
className: "pointer-events-none"
|
|
@@ -4196,7 +4194,7 @@ function HierarchyRenderer({
|
|
|
4196
4194
|
let childOffset = xOffset;
|
|
4197
4195
|
for (const child of t.children) {
|
|
4198
4196
|
renderTreeNode(child, childOffset, level + 1);
|
|
4199
|
-
childOffset +=
|
|
4197
|
+
childOffset += chunkH5V24JVW_js.treeWidth(child);
|
|
4200
4198
|
}
|
|
4201
4199
|
return w;
|
|
4202
4200
|
}
|
|
@@ -4231,7 +4229,7 @@ function GearRenderer({
|
|
|
4231
4229
|
const gearR = Math.min(spacing * 0.4, h * 0.35);
|
|
4232
4230
|
const innerR = gearR * 0.7;
|
|
4233
4231
|
const teethCount = 8;
|
|
4234
|
-
const shadow =
|
|
4232
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
4235
4233
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4236
4234
|
"svg",
|
|
4237
4235
|
{
|
|
@@ -4243,27 +4241,27 @@ function GearRenderer({
|
|
|
4243
4241
|
gearNodes.map((node, i) => {
|
|
4244
4242
|
const gx = spacing * (i + 1);
|
|
4245
4243
|
const gy = h / 2 + (i % 2 === 0 ? 0 : gearR * 0.35);
|
|
4246
|
-
const fontSize =
|
|
4244
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, innerR * 1.2, innerR * 2, 11);
|
|
4247
4245
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4248
4246
|
"g",
|
|
4249
4247
|
{
|
|
4250
|
-
...
|
|
4248
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4251
4249
|
children: [
|
|
4252
4250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4253
4251
|
"path",
|
|
4254
4252
|
{
|
|
4255
|
-
d:
|
|
4256
|
-
fill:
|
|
4257
|
-
opacity:
|
|
4253
|
+
d: chunkH5V24JVW_js.gearPath(gx, gy, gearR, innerR, teethCount),
|
|
4254
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4255
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style)
|
|
4258
4256
|
}
|
|
4259
4257
|
),
|
|
4260
4258
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: gx, cy: gy, r: innerR * 0.5, fill: "white", opacity: 0.25 }),
|
|
4261
4259
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4262
|
-
|
|
4260
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
4263
4261
|
{
|
|
4264
4262
|
x: gx,
|
|
4265
4263
|
y: gy,
|
|
4266
|
-
text:
|
|
4264
|
+
text: chunkH5V24JVW_js.truncate(node.text, 20),
|
|
4267
4265
|
fill: "white",
|
|
4268
4266
|
fontSize,
|
|
4269
4267
|
fontWeight: "bold",
|
|
@@ -4285,8 +4283,8 @@ function GearRenderer({
|
|
|
4285
4283
|
cx: lx,
|
|
4286
4284
|
cy: ly,
|
|
4287
4285
|
r: 3,
|
|
4288
|
-
fill:
|
|
4289
|
-
opacity:
|
|
4286
|
+
fill: chunkH5V24JVW_js.colour(gearCount + i, palette),
|
|
4287
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(gearCount + i, nodes.length, style)
|
|
4290
4288
|
}
|
|
4291
4289
|
),
|
|
4292
4290
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4296,10 +4294,10 @@ function GearRenderer({
|
|
|
4296
4294
|
y: ly,
|
|
4297
4295
|
textAnchor: "start",
|
|
4298
4296
|
dominantBaseline: "central",
|
|
4299
|
-
fill:
|
|
4297
|
+
fill: chunkH5V24JVW_js.colour(gearCount + i, palette),
|
|
4300
4298
|
fontSize: 10,
|
|
4301
4299
|
className: "pointer-events-none",
|
|
4302
|
-
children:
|
|
4300
|
+
children: chunkH5V24JVW_js.truncate(node.text, 30)
|
|
4303
4301
|
}
|
|
4304
4302
|
)
|
|
4305
4303
|
] }, `${element.id}-gear-extra-${node.id}-${i}`);
|
|
@@ -4323,7 +4321,7 @@ function TimelineRenderer({
|
|
|
4323
4321
|
const lineLen = lineEndX - lineStartX;
|
|
4324
4322
|
const dotR = Math.max(4, Math.min(8, lineLen / (nodes.length * 4)));
|
|
4325
4323
|
const labelOffset = Math.min(h * 0.28, 40);
|
|
4326
|
-
const shadow =
|
|
4324
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
4327
4325
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4328
4326
|
"svg",
|
|
4329
4327
|
{
|
|
@@ -4345,11 +4343,11 @@ function TimelineRenderer({
|
|
|
4345
4343
|
const above = i % 2 === 0;
|
|
4346
4344
|
const textY = above ? lineY - labelOffset : lineY + labelOffset;
|
|
4347
4345
|
const stemEndY = above ? lineY - dotR - 2 : lineY + dotR + 2;
|
|
4348
|
-
const fontSize =
|
|
4346
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, lineLen / nodes.length * 0.9, labelOffset, 10);
|
|
4349
4347
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4350
4348
|
"g",
|
|
4351
4349
|
{
|
|
4352
|
-
...
|
|
4350
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4353
4351
|
children: [
|
|
4354
4352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4355
4353
|
"line",
|
|
@@ -4358,7 +4356,7 @@ function TimelineRenderer({
|
|
|
4358
4356
|
y1: stemEndY,
|
|
4359
4357
|
x2: x,
|
|
4360
4358
|
y2: textY + (above ? fontSize : -fontSize),
|
|
4361
|
-
stroke:
|
|
4359
|
+
stroke: chunkH5V24JVW_js.colour(i, palette),
|
|
4362
4360
|
strokeWidth: 1,
|
|
4363
4361
|
opacity: 0.5
|
|
4364
4362
|
}
|
|
@@ -4369,17 +4367,17 @@ function TimelineRenderer({
|
|
|
4369
4367
|
cx: x,
|
|
4370
4368
|
cy: lineY,
|
|
4371
4369
|
r: dotR,
|
|
4372
|
-
fill:
|
|
4373
|
-
opacity:
|
|
4370
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4371
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style)
|
|
4374
4372
|
}
|
|
4375
4373
|
),
|
|
4376
4374
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4377
|
-
|
|
4375
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
4378
4376
|
{
|
|
4379
|
-
text:
|
|
4377
|
+
text: chunkH5V24JVW_js.truncate(node.text, 20) ?? "",
|
|
4380
4378
|
x,
|
|
4381
4379
|
y: textY,
|
|
4382
|
-
fill:
|
|
4380
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4383
4381
|
fontSize,
|
|
4384
4382
|
anchor: above ? "bottom" : "top",
|
|
4385
4383
|
className: "pointer-events-none"
|
|
@@ -4412,8 +4410,8 @@ function BendingProcessRenderer({
|
|
|
4412
4410
|
const boxH = Math.min(cellH * 0.6, 32);
|
|
4413
4411
|
const rx = Math.min(5, boxH * 0.15);
|
|
4414
4412
|
const arrowSize = 6;
|
|
4415
|
-
const shadow =
|
|
4416
|
-
const sw =
|
|
4413
|
+
const shadow = chunkH5V24JVW_js.styleShadow(style);
|
|
4414
|
+
const sw = chunkH5V24JVW_js.styleStroke(style);
|
|
4417
4415
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4418
4416
|
"svg",
|
|
4419
4417
|
{
|
|
@@ -4427,7 +4425,7 @@ function BendingProcessRenderer({
|
|
|
4427
4425
|
const col = row % 2 === 0 ? colInRow : COLS - 1 - colInRow;
|
|
4428
4426
|
const nodeCx = padX + col * cellW + cellW / 2;
|
|
4429
4427
|
const nodeCy = padY + row * cellH + cellH / 2;
|
|
4430
|
-
const fontSize =
|
|
4428
|
+
const fontSize = chunkH5V24JVW_js.fitFontSize(node.text, boxW * 0.85, boxH, 10);
|
|
4431
4429
|
let arrow = null;
|
|
4432
4430
|
if (i < nodes.length - 1) {
|
|
4433
4431
|
const nextRow = Math.floor((i + 1) / COLS);
|
|
@@ -4487,7 +4485,7 @@ function BendingProcessRenderer({
|
|
|
4487
4485
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4488
4486
|
"g",
|
|
4489
4487
|
{
|
|
4490
|
-
...
|
|
4488
|
+
...chunkH5V24JVW_js.smartArtNodeGroupProps(node.id, shadow),
|
|
4491
4489
|
children: [
|
|
4492
4490
|
arrow,
|
|
4493
4491
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4498,18 +4496,18 @@ function BendingProcessRenderer({
|
|
|
4498
4496
|
width: boxW,
|
|
4499
4497
|
height: boxH,
|
|
4500
4498
|
rx,
|
|
4501
|
-
fill:
|
|
4502
|
-
opacity:
|
|
4499
|
+
fill: chunkH5V24JVW_js.colour(i, palette),
|
|
4500
|
+
opacity: chunkH5V24JVW_js.nodeOpacity(i, nodes.length, style),
|
|
4503
4501
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
4504
4502
|
strokeWidth: sw
|
|
4505
4503
|
}
|
|
4506
4504
|
),
|
|
4507
4505
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4508
|
-
|
|
4506
|
+
chunkH5V24JVW_js.SmartArtNodeText,
|
|
4509
4507
|
{
|
|
4510
4508
|
x: nodeCx,
|
|
4511
4509
|
y: nodeCy,
|
|
4512
|
-
text:
|
|
4510
|
+
text: chunkH5V24JVW_js.truncate(node.text, 20),
|
|
4513
4511
|
fill: "white",
|
|
4514
4512
|
fontSize,
|
|
4515
4513
|
className: "pointer-events-none"
|
|
@@ -4550,21 +4548,21 @@ function SmartArtRendererImpl({
|
|
|
4550
4548
|
}
|
|
4551
4549
|
);
|
|
4552
4550
|
}
|
|
4553
|
-
const palette =
|
|
4554
|
-
const style =
|
|
4555
|
-
const a11y =
|
|
4551
|
+
const palette = chunkH5V24JVW_js.resolvePalette(element);
|
|
4552
|
+
const style = chunkH5V24JVW_js.resolveStyle(element);
|
|
4553
|
+
const a11y = chunkG5GATDE4_js.buildSmartArtA11y(smartArtData);
|
|
4556
4554
|
const nodeLabels = new Map(a11y.nodes.map((n) => [n.id, n.label]));
|
|
4557
4555
|
const editable = canEdit && Boolean(onUpdateElement);
|
|
4558
4556
|
const handleCommitNodeText = (nodeId, text) => {
|
|
4559
|
-
if (!onUpdateElement || !
|
|
4557
|
+
if (!onUpdateElement || !chunkG5GATDE4_js.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
4560
4558
|
return;
|
|
4561
4559
|
}
|
|
4562
4560
|
const updated = chunkAD3EAEY6_js.updateSmartArtNodeText(smartArtData, nodeId, text);
|
|
4563
4561
|
const box = { width: element.width, height: element.height };
|
|
4564
|
-
const reflowed =
|
|
4562
|
+
const reflowed = chunkG5GATDE4_js.rebuildDrawingShapesIfCleared(
|
|
4565
4563
|
updated,
|
|
4566
4564
|
smartArtData.layout,
|
|
4567
|
-
|
|
4565
|
+
chunkH5V24JVW_js.resolveSmartArtDataPalette(updated),
|
|
4568
4566
|
style,
|
|
4569
4567
|
element.id,
|
|
4570
4568
|
box
|
|
@@ -4578,10 +4576,10 @@ function SmartArtRendererImpl({
|
|
|
4578
4576
|
const next = chunkAD3EAEY6_js.setSmartArtNodeStyle(smartArtData, nodeId, { fillColor: fill });
|
|
4579
4577
|
if (next !== smartArtData) {
|
|
4580
4578
|
const box = { width: element.width, height: element.height };
|
|
4581
|
-
const reflowed =
|
|
4579
|
+
const reflowed = chunkG5GATDE4_js.rebuildDrawingShapesIfCleared(
|
|
4582
4580
|
next,
|
|
4583
4581
|
smartArtData.layout,
|
|
4584
|
-
|
|
4582
|
+
chunkH5V24JVW_js.resolveSmartArtDataPalette(next),
|
|
4585
4583
|
style,
|
|
4586
4584
|
element.id,
|
|
4587
4585
|
box
|
|
@@ -4604,7 +4602,7 @@ function SmartArtRendererImpl({
|
|
|
4604
4602
|
);
|
|
4605
4603
|
} else {
|
|
4606
4604
|
const namedLayout = smartArtData.layout;
|
|
4607
|
-
const layoutType = namedLayout ?
|
|
4605
|
+
const layoutType = namedLayout ? chunkH5V24JVW_js.layoutToCategory(namedLayout) : (smartArtData.resolvedLayoutType ?? smartArtData.layoutType ?? "list").toLowerCase();
|
|
4608
4606
|
content = renderLayout(layoutType, element, nodes, palette, style, nodeLabels);
|
|
4609
4607
|
}
|
|
4610
4608
|
const body = editable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4618,7 +4616,7 @@ function SmartArtRendererImpl({
|
|
|
4618
4616
|
children: content
|
|
4619
4617
|
}
|
|
4620
4618
|
) : content;
|
|
4621
|
-
return
|
|
4619
|
+
return chunkH5V24JVW_js.wrapChrome(chrome, body, className, { role: a11y.role, label: a11y.label });
|
|
4622
4620
|
}
|
|
4623
4621
|
function renderLayout(layoutType, element, nodes, palette, style, nodeLabels) {
|
|
4624
4622
|
if (layoutType.includes("hierarchy") || layoutType.includes("org")) {
|
|
@@ -4682,34 +4680,34 @@ function renderLayout(layoutType, element, nodes, palette, style, nodeLabels) {
|
|
|
4682
4680
|
return /* @__PURE__ */ jsxRuntime.jsx(BendingProcessRenderer, { element, nodes, palette, style });
|
|
4683
4681
|
}
|
|
4684
4682
|
if (layoutType.includes("stepdown")) {
|
|
4685
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4683
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderStepDownProcess(element, nodes, palette, style) });
|
|
4686
4684
|
}
|
|
4687
4685
|
if (layoutType.includes("alternatingflow") || layoutType.includes("alternating")) {
|
|
4688
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4686
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderAlternatingFlow(element, nodes, palette, style) });
|
|
4689
4687
|
}
|
|
4690
4688
|
if (layoutType.includes("descending")) {
|
|
4691
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4689
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderDescendingProcess(element, nodes, palette, style) });
|
|
4692
4690
|
}
|
|
4693
4691
|
if (layoutType.includes("pictureaccent")) {
|
|
4694
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4692
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderPictureAccentList(element, nodes, palette, style) });
|
|
4695
4693
|
}
|
|
4696
4694
|
if (layoutType.includes("verticalblock")) {
|
|
4697
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4695
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderVerticalBlockList(element, nodes, palette, style) });
|
|
4698
4696
|
}
|
|
4699
4697
|
if (layoutType.includes("grouped")) {
|
|
4700
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4698
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderGroupedList(element, nodes, palette, style) });
|
|
4701
4699
|
}
|
|
4702
4700
|
if (layoutType.includes("pyramidlist")) {
|
|
4703
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4701
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderPyramidList(element, nodes, palette, style) });
|
|
4704
4702
|
}
|
|
4705
4703
|
if (layoutType.includes("horizontalpicture")) {
|
|
4706
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4704
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderHorizontalPictureList(element, nodes, palette, style) });
|
|
4707
4705
|
}
|
|
4708
4706
|
if (layoutType.includes("accentprocess")) {
|
|
4709
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4707
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderAccentProcess(element, nodes, palette, style) });
|
|
4710
4708
|
}
|
|
4711
4709
|
if (layoutType.includes("verticalchevron")) {
|
|
4712
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
4710
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: chunkH5V24JVW_js.renderVerticalChevronList(element, nodes, palette, style) });
|
|
4713
4711
|
}
|
|
4714
4712
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4715
4713
|
ListRenderer,
|
|
@@ -4808,9 +4806,9 @@ function SmartArt3DRenderer({
|
|
|
4808
4806
|
if (nodes.length === 0) {
|
|
4809
4807
|
return null;
|
|
4810
4808
|
}
|
|
4811
|
-
const palette =
|
|
4812
|
-
const style =
|
|
4813
|
-
const layoutResult =
|
|
4809
|
+
const palette = chunkH5V24JVW_js.resolvePalette(element);
|
|
4810
|
+
const style = chunkH5V24JVW_js.resolveStyle(element);
|
|
4811
|
+
const layoutResult = chunkG5GATDE4_js.computeSmartArtLayout(
|
|
4814
4812
|
nodes,
|
|
4815
4813
|
{ width: element.width, height: element.height },
|
|
4816
4814
|
palette,
|
|
@@ -4819,7 +4817,7 @@ function SmartArt3DRenderer({
|
|
|
4819
4817
|
resolvedLayoutType,
|
|
4820
4818
|
layout
|
|
4821
4819
|
);
|
|
4822
|
-
return
|
|
4820
|
+
return chunkG5GATDE4_js.buildSmartArt3DModel(layoutResult, {
|
|
4823
4821
|
background: chrome?.backgroundColor,
|
|
4824
4822
|
spatial: true
|
|
4825
4823
|
});
|
|
@@ -4846,7 +4844,7 @@ function SmartArt3DRenderer({
|
|
|
4846
4844
|
return sceneNode;
|
|
4847
4845
|
}
|
|
4848
4846
|
const handleCommitNodeText = (nodeId, text) => {
|
|
4849
|
-
if (!
|
|
4847
|
+
if (!chunkG5GATDE4_js.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
4850
4848
|
return;
|
|
4851
4849
|
}
|
|
4852
4850
|
onUpdateElement({
|
|
@@ -4895,11 +4893,11 @@ function SmartArtElement({
|
|
|
4895
4893
|
);
|
|
4896
4894
|
}
|
|
4897
4895
|
function groupIntoParagraphs2(element, fieldContext) {
|
|
4898
|
-
return
|
|
4896
|
+
return chunkG5GATDE4_js.groupIntoParagraphs(
|
|
4899
4897
|
element,
|
|
4900
4898
|
fieldContext ? (seg) => {
|
|
4901
4899
|
if (seg.fieldType) {
|
|
4902
|
-
const substituted =
|
|
4900
|
+
const substituted = chunkG5GATDE4_js.substituteFieldText(seg.text, seg.fieldType, fieldContext);
|
|
4903
4901
|
if (substituted !== seg.text) {
|
|
4904
4902
|
return { ...seg, text: substituted };
|
|
4905
4903
|
}
|
|
@@ -4929,13 +4927,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
4929
4927
|
if (s.strikethrough) {
|
|
4930
4928
|
decos.push("line-through");
|
|
4931
4929
|
}
|
|
4932
|
-
const fill = s.hyperlink ?
|
|
4930
|
+
const fill = s.hyperlink ? chunkG5GATDE4_js.normalizeHexColor(s.color || element.textStyle?.color, chunkH5V24JVW_js.HYPERLINK_COLOR) : chunkG5GATDE4_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
4933
4931
|
return {
|
|
4934
4932
|
fill,
|
|
4935
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
4933
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkH5V24JVW_js.DEFAULT_TEXT_FONT_SIZE,
|
|
4936
4934
|
fontWeight: s.bold ? 700 : 400,
|
|
4937
4935
|
fontStyle: s.italic ? "italic" : void 0,
|
|
4938
|
-
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 || "") : chunkH5V24JVW_js.DEFAULT_FONT_FAMILY,
|
|
4939
4937
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
4940
4938
|
};
|
|
4941
4939
|
}
|
|
@@ -4951,7 +4949,7 @@ function WarpedText({
|
|
|
4951
4949
|
}
|
|
4952
4950
|
const textEl = element;
|
|
4953
4951
|
const preset = textEl.textStyle?.textWarpPreset;
|
|
4954
|
-
if (!preset || !
|
|
4952
|
+
if (!preset || !chunkG5GATDE4_js.shouldUseSvgWarp(preset)) {
|
|
4955
4953
|
return null;
|
|
4956
4954
|
}
|
|
4957
4955
|
const paragraphs = groupIntoParagraphs2(textEl, fieldContext);
|
|
@@ -4964,9 +4962,9 @@ function WarpedText({
|
|
|
4964
4962
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
4965
4963
|
const align = textEl.textStyle?.align ?? "center";
|
|
4966
4964
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
4967
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
4968
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(textEl.textStyle.fontFamily) :
|
|
4969
|
-
const baseFill =
|
|
4965
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkH5V24JVW_js.DEFAULT_TEXT_FONT_SIZE;
|
|
4966
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkH5V24JVW_js.DEFAULT_FONT_FAMILY;
|
|
4967
|
+
const baseFill = chunkG5GATDE4_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
4970
4968
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4971
4969
|
"svg",
|
|
4972
4970
|
{
|
|
@@ -4986,7 +4984,7 @@ function WarpedText({
|
|
|
4986
4984
|
"path",
|
|
4987
4985
|
{
|
|
4988
4986
|
id: `${pathIdPrefix}-${i}`,
|
|
4989
|
-
d:
|
|
4987
|
+
d: chunkG5GATDE4_js.getWarpPath(preset, width, height, i, lineCount, warpAdj, warpAdj2),
|
|
4990
4988
|
fill: "none"
|
|
4991
4989
|
},
|
|
4992
4990
|
`${pathIdPrefix}-def-${i}`
|
|
@@ -5023,7 +5021,7 @@ function WarpedText({
|
|
|
5023
5021
|
);
|
|
5024
5022
|
}
|
|
5025
5023
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
5026
|
-
|
|
5024
|
+
chunkG5GATDE4_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
5027
5025
|
);
|
|
5028
5026
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
5029
5027
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -5091,11 +5089,11 @@ function renderTextElementBody(options) {
|
|
|
5091
5089
|
} = options;
|
|
5092
5090
|
const isLinkedTextBox = chunkAD3EAEY6_js.hasTextProperties(el) && el.linkedTxbxId !== void 0;
|
|
5093
5091
|
const linkedSegments = isLinkedTextBox && slideElements ? chunkAD3EAEY6_js.getLinkedTextBoxSegments(el, slideElements) : void 0;
|
|
5094
|
-
const useSvgWarp =
|
|
5092
|
+
const useSvgWarp = chunkG5GATDE4_js.shouldUseSvgWarp(
|
|
5095
5093
|
chunkAD3EAEY6_js.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
|
|
5096
5094
|
);
|
|
5097
|
-
const scene3dStyle = chunkAD3EAEY6_js.hasTextProperties(el) ?
|
|
5098
|
-
const composedTransform = [
|
|
5095
|
+
const scene3dStyle = chunkAD3EAEY6_js.hasTextProperties(el) ? chunkH5V24JVW_js.buildTextBody3DSceneStyle(el.textStyle) : void 0;
|
|
5096
|
+
const composedTransform = [chunkG5GATDE4_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
5099
5097
|
const transformStyle = {
|
|
5100
5098
|
transform: composedTransform,
|
|
5101
5099
|
transformOrigin: "center",
|
|
@@ -5111,18 +5109,18 @@ function renderTextElementBody(options) {
|
|
|
5111
5109
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5112
5110
|
"div",
|
|
5113
5111
|
{
|
|
5114
|
-
className:
|
|
5112
|
+
className: chunkH5V24JVW_js.cn(
|
|
5115
5113
|
"relative z-10 w-full h-full",
|
|
5116
5114
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
5117
5115
|
),
|
|
5118
|
-
style: { ...
|
|
5116
|
+
style: { ...chunkH5V24JVW_js.getTextLayoutStyle(el), ...transformStyle },
|
|
5119
5117
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5120
5118
|
WarpedText,
|
|
5121
5119
|
{
|
|
5122
5120
|
element: el,
|
|
5123
5121
|
width: el.width,
|
|
5124
5122
|
height: el.height,
|
|
5125
|
-
fallbackColor:
|
|
5123
|
+
fallbackColor: chunkH5V24JVW_js.DEFAULT_TEXT_COLOR,
|
|
5126
5124
|
findHighlights: findHl,
|
|
5127
5125
|
fieldContext
|
|
5128
5126
|
}
|
|
@@ -5131,19 +5129,19 @@ function renderTextElementBody(options) {
|
|
|
5131
5129
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5132
5130
|
"div",
|
|
5133
5131
|
{
|
|
5134
|
-
className:
|
|
5132
|
+
className: chunkH5V24JVW_js.cn(
|
|
5135
5133
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
5136
5134
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
5137
5135
|
),
|
|
5138
5136
|
style: {
|
|
5139
|
-
...
|
|
5137
|
+
...chunkH5V24JVW_js.getTextLayoutStyle(el),
|
|
5140
5138
|
...txtS,
|
|
5141
|
-
...
|
|
5139
|
+
...chunkH5V24JVW_js.getTextWarpStyle(txtSE),
|
|
5142
5140
|
...transformStyle
|
|
5143
5141
|
},
|
|
5144
|
-
children:
|
|
5142
|
+
children: chunkH5V24JVW_js.renderTextSegments(
|
|
5145
5143
|
el,
|
|
5146
|
-
|
|
5144
|
+
chunkH5V24JVW_js.DEFAULT_TEXT_COLOR,
|
|
5147
5145
|
void 0,
|
|
5148
5146
|
findHl,
|
|
5149
5147
|
onHyperlinkClick,
|
|
@@ -5164,7 +5162,7 @@ function ZoomElementRenderer({
|
|
|
5164
5162
|
sourceSlideIndex
|
|
5165
5163
|
}) {
|
|
5166
5164
|
const { t } = reactI18next.useTranslation();
|
|
5167
|
-
const summaryView =
|
|
5165
|
+
const summaryView = chunkG5GATDE4_js.buildSummaryZoomView(element, (index) => {
|
|
5168
5166
|
const slide = slides?.[index];
|
|
5169
5167
|
return slide ? {
|
|
5170
5168
|
slideNumber: slide.slideNumber,
|
|
@@ -5443,7 +5441,7 @@ function renderBody(options) {
|
|
|
5443
5441
|
textDirection: txtSE?.textDirection,
|
|
5444
5442
|
textStyle: txtS,
|
|
5445
5443
|
textStyleRaw: txtSE,
|
|
5446
|
-
layoutStyle:
|
|
5444
|
+
layoutStyle: chunkH5V24JVW_js.getTextLayoutStyle(el),
|
|
5447
5445
|
element: el,
|
|
5448
5446
|
onCommit,
|
|
5449
5447
|
onCancel,
|
|
@@ -5454,7 +5452,7 @@ function renderBody(options) {
|
|
|
5454
5452
|
] });
|
|
5455
5453
|
}
|
|
5456
5454
|
if (el.type === "table") {
|
|
5457
|
-
return
|
|
5455
|
+
return chunkH5V24JVW_js.renderTableElement(el, txtS, {
|
|
5458
5456
|
editable: isSel,
|
|
5459
5457
|
selectedCell: isSel ? tableSt : null,
|
|
5460
5458
|
onSelectCell: onCellSel,
|
|
@@ -5485,7 +5483,7 @@ function renderBody(options) {
|
|
|
5485
5483
|
);
|
|
5486
5484
|
}
|
|
5487
5485
|
if (el.type === "media") {
|
|
5488
|
-
return
|
|
5486
|
+
return chunkH5V24JVW_js.renderMediaElement(el, media, {
|
|
5489
5487
|
autoPlay: isPresentationPassive,
|
|
5490
5488
|
fullScreen: isPresentationPassive && Boolean(el.fullScreen),
|
|
5491
5489
|
isPresentationMode: isPresentationPassive,
|
|
@@ -5510,8 +5508,8 @@ function renderBody(options) {
|
|
|
5510
5508
|
}
|
|
5511
5509
|
return renderGroup(el.children);
|
|
5512
5510
|
}
|
|
5513
|
-
if (
|
|
5514
|
-
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 (chunkH5V24JVW_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: chunkG5GATDE4_js.getElementLabel(el) });
|
|
5515
5513
|
}
|
|
5516
5514
|
return renderTextElementBody(options);
|
|
5517
5515
|
}
|
|
@@ -5528,14 +5526,14 @@ function StaticElementRenderer({
|
|
|
5528
5526
|
positioned = true
|
|
5529
5527
|
}) {
|
|
5530
5528
|
const style = chunkAD3EAEY6_js.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
5531
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
5532
|
-
const fill =
|
|
5529
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkG5GATDE4_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
5530
|
+
const fill = chunkG5GATDE4_js.normalizeHexColor(style?.fillColor, chunkH5V24JVW_js.DEFAULT_FILL_COLOR);
|
|
5533
5531
|
const strokeWidth = Math.max(0, style?.strokeWidth || 0);
|
|
5534
|
-
const stroke =
|
|
5535
|
-
const visualStyle =
|
|
5536
|
-
const textStyle =
|
|
5532
|
+
const stroke = chunkG5GATDE4_js.normalizeHexColor(style?.strokeColor, chunkH5V24JVW_js.DEFAULT_STROKE_COLOR);
|
|
5533
|
+
const visualStyle = chunkH5V24JVW_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
5534
|
+
const textStyle = chunkH5V24JVW_js.getTextStyleForElement(
|
|
5537
5535
|
element,
|
|
5538
|
-
element.type === "shape" && hasFill ? "#ffffff" :
|
|
5536
|
+
element.type === "shape" && hasFill ? "#ffffff" : chunkH5V24JVW_js.DEFAULT_TEXT_COLOR
|
|
5539
5537
|
);
|
|
5540
5538
|
const isImage = element.type === "picture" || element.type === "image";
|
|
5541
5539
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5548,7 +5546,7 @@ function StaticElementRenderer({
|
|
|
5548
5546
|
top: positioned ? element.y : void 0,
|
|
5549
5547
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
5550
5548
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
5551
|
-
transform: positioned ?
|
|
5549
|
+
transform: positioned ? chunkG5GATDE4_js.getElementTransform(element) : void 0,
|
|
5552
5550
|
transformOrigin: "center",
|
|
5553
5551
|
zIndex,
|
|
5554
5552
|
...visualStyle
|
|
@@ -5572,12 +5570,12 @@ function StaticElementRenderer({
|
|
|
5572
5570
|
spellCheck: false,
|
|
5573
5571
|
txtSE: chunkAD3EAEY6_js.hasTextProperties(element) ? element.textStyle : void 0,
|
|
5574
5572
|
txtS: textStyle,
|
|
5575
|
-
vecShape:
|
|
5576
|
-
imgStyle:
|
|
5577
|
-
imgFilter:
|
|
5578
|
-
imgOpacity:
|
|
5573
|
+
vecShape: chunkH5V24JVW_js.renderVectorShape(element, hasFill, fill, strokeWidth, stroke),
|
|
5574
|
+
imgStyle: chunkH5V24JVW_js.getImageRenderStyle(element),
|
|
5575
|
+
imgFilter: chunkG5GATDE4_js.getImageEffectsFilter(element),
|
|
5576
|
+
imgOpacity: chunkG5GATDE4_js.getImageEffectsOpacity(element),
|
|
5579
5577
|
imgAlt: "",
|
|
5580
|
-
isTxtEl:
|
|
5578
|
+
isTxtEl: chunkG5GATDE4_js.isEditableTextElement(element),
|
|
5581
5579
|
media: mediaDataUrls,
|
|
5582
5580
|
tableSt: null,
|
|
5583
5581
|
isSel: false,
|
|
@@ -5603,12 +5601,12 @@ function SlideThumbnailImpl({
|
|
|
5603
5601
|
}) {
|
|
5604
5602
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
5605
5603
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
5606
|
-
const scale =
|
|
5604
|
+
const scale = chunkH5V24JVW_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeCanvasWidth;
|
|
5607
5605
|
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
5608
5606
|
const previewElements = [...templateElements, ...slide.elements].slice(0, 60);
|
|
5609
5607
|
const { t } = reactI18next.useTranslation();
|
|
5610
5608
|
const transitionLabel = slide.transition ? (() => {
|
|
5611
|
-
const opt =
|
|
5609
|
+
const opt = chunkH5V24JVW_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
5612
5610
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
5613
5611
|
})() : void 0;
|
|
5614
5612
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6301,7 +6299,7 @@ function SectionHeader({
|
|
|
6301
6299
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6302
6300
|
lu.LuChevronDown,
|
|
6303
6301
|
{
|
|
6304
|
-
className:
|
|
6302
|
+
className: chunkH5V24JVW_js.cn(
|
|
6305
6303
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
6306
6304
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
6307
6305
|
)
|
|
@@ -6403,7 +6401,7 @@ function LazyThumbnailInner({
|
|
|
6403
6401
|
className: "relative w-full overflow-hidden rounded border border-border bg-muted/30 animate-pulse",
|
|
6404
6402
|
style: {
|
|
6405
6403
|
height: previewHeight,
|
|
6406
|
-
minWidth:
|
|
6404
|
+
minWidth: chunkH5V24JVW_js.SLIDE_NAV_THUMBNAIL_WIDTH
|
|
6407
6405
|
}
|
|
6408
6406
|
}
|
|
6409
6407
|
) });
|
|
@@ -6440,7 +6438,7 @@ function buildFlatPaneItems(sectionGroups, showSectionHeaders, collapsedSections
|
|
|
6440
6438
|
function estimateSlideItemHeight(canvasWidth, canvasHeight) {
|
|
6441
6439
|
const safeW = Math.max(canvasWidth, 1);
|
|
6442
6440
|
const safeH = Math.max(canvasHeight, 1);
|
|
6443
|
-
const scale =
|
|
6441
|
+
const scale = chunkH5V24JVW_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeW;
|
|
6444
6442
|
const previewHeight = Math.max(56, Math.round(safeH * scale));
|
|
6445
6443
|
return previewHeight + 30;
|
|
6446
6444
|
}
|
|
@@ -6477,7 +6475,7 @@ function SlideItemInner({
|
|
|
6477
6475
|
);
|
|
6478
6476
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
6479
6477
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
6480
|
-
const scale =
|
|
6478
|
+
const scale = chunkH5V24JVW_js.SLIDE_NAV_THUMBNAIL_WIDTH / safeCanvasWidth;
|
|
6481
6479
|
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
6482
6480
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6483
6481
|
"button",
|
|
@@ -6486,7 +6484,7 @@ function SlideItemInner({
|
|
|
6486
6484
|
ref: slideRef,
|
|
6487
6485
|
"aria-label": `Go to slide ${slideIndex + 1}`,
|
|
6488
6486
|
"aria-current": isActive ? "true" : void 0,
|
|
6489
|
-
className:
|
|
6487
|
+
className: chunkH5V24JVW_js.cn(
|
|
6490
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",
|
|
6491
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",
|
|
6492
6490
|
isHidden && "opacity-50"
|
|
@@ -6502,7 +6500,7 @@ function SlideItemInner({
|
|
|
6502
6500
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6503
6501
|
"span",
|
|
6504
6502
|
{
|
|
6505
|
-
className:
|
|
6503
|
+
className: chunkH5V24JVW_js.cn(
|
|
6506
6504
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
6507
6505
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
6508
6506
|
),
|
|
@@ -6522,7 +6520,7 @@ function SlideItemInner({
|
|
|
6522
6520
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6523
6521
|
"div",
|
|
6524
6522
|
{
|
|
6525
|
-
className:
|
|
6523
|
+
className: chunkH5V24JVW_js.cn(
|
|
6526
6524
|
"relative flex-1 overflow-hidden border transition-colors bg-white",
|
|
6527
6525
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
6528
6526
|
),
|
|
@@ -6655,7 +6653,7 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection) {
|
|
|
6655
6653
|
};
|
|
6656
6654
|
}
|
|
6657
6655
|
var EMPTY_TEMPLATE_ELEMENTS = [];
|
|
6658
|
-
var VIRTUALIZATION_THRESHOLD =
|
|
6656
|
+
var VIRTUALIZATION_THRESHOLD = chunkG5GATDE4_js.SLIDE_VIRTUALIZATION_THRESHOLD;
|
|
6659
6657
|
function SlidesPaneSidebar({
|
|
6660
6658
|
slides,
|
|
6661
6659
|
templateElementsBySlideId,
|
|
@@ -6727,7 +6725,7 @@ function SlidesPaneSidebar({
|
|
|
6727
6725
|
[sectionGroups, showSectionHeaders, collapsedSections]
|
|
6728
6726
|
);
|
|
6729
6727
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
6730
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
6728
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkH5V24JVW_js.useVirtualizedSlides({
|
|
6731
6729
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
6732
6730
|
itemHeight: estimatedItemHeight
|
|
6733
6731
|
});
|
|
@@ -6957,7 +6955,7 @@ function HandoutMasterPanel({
|
|
|
6957
6955
|
{
|
|
6958
6956
|
type: "button",
|
|
6959
6957
|
"aria-pressed": slidesPerPage === count,
|
|
6960
|
-
className:
|
|
6958
|
+
className: chunkH5V24JVW_js.cn(
|
|
6961
6959
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
6962
6960
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
6963
6961
|
),
|
|
@@ -7085,7 +7083,7 @@ function SlideMastersList({
|
|
|
7085
7083
|
"div",
|
|
7086
7084
|
{
|
|
7087
7085
|
ref: isMasterActive ? activeRef : void 0,
|
|
7088
|
-
className:
|
|
7086
|
+
className: chunkH5V24JVW_js.cn(
|
|
7089
7087
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
7090
7088
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
7091
7089
|
),
|
|
@@ -7102,7 +7100,7 @@ function SlideMastersList({
|
|
|
7102
7100
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7103
7101
|
"span",
|
|
7104
7102
|
{
|
|
7105
|
-
className:
|
|
7103
|
+
className: chunkH5V24JVW_js.cn(
|
|
7106
7104
|
"text-[10px] font-medium",
|
|
7107
7105
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
7108
7106
|
),
|
|
@@ -7118,7 +7116,7 @@ function SlideMastersList({
|
|
|
7118
7116
|
"div",
|
|
7119
7117
|
{
|
|
7120
7118
|
ref: isLayoutActive ? activeRef : void 0,
|
|
7121
|
-
className:
|
|
7119
|
+
className: chunkH5V24JVW_js.cn(
|
|
7122
7120
|
"group relative cursor-pointer rounded-md border-2 p-0.5 transition-all",
|
|
7123
7121
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
7124
7122
|
),
|
|
@@ -7135,7 +7133,7 @@ function SlideMastersList({
|
|
|
7135
7133
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7136
7134
|
"span",
|
|
7137
7135
|
{
|
|
7138
|
-
className:
|
|
7136
|
+
className: chunkH5V24JVW_js.cn(
|
|
7139
7137
|
"text-[9px]",
|
|
7140
7138
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
7141
7139
|
),
|
|
@@ -7219,7 +7217,7 @@ function MasterViewSidebar({
|
|
|
7219
7217
|
type: "button",
|
|
7220
7218
|
role: "tab",
|
|
7221
7219
|
"aria-selected": masterViewTab === tab.key,
|
|
7222
|
-
className:
|
|
7220
|
+
className: chunkH5V24JVW_js.cn(
|
|
7223
7221
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
7224
7222
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
7225
7223
|
),
|
|
@@ -7691,7 +7689,7 @@ function SectionBlock({
|
|
|
7691
7689
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7692
7690
|
lu.LuChevronDown,
|
|
7693
7691
|
{
|
|
7694
|
-
className:
|
|
7692
|
+
className: chunkH5V24JVW_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
7695
7693
|
}
|
|
7696
7694
|
),
|
|
7697
7695
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -7738,7 +7736,7 @@ function SlideCardImpl({
|
|
|
7738
7736
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7739
7737
|
"div",
|
|
7740
7738
|
{
|
|
7741
|
-
className:
|
|
7739
|
+
className: chunkH5V24JVW_js.cn(
|
|
7742
7740
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
7743
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",
|
|
7744
7742
|
slide.hidden && "opacity-40"
|
|
@@ -7757,7 +7755,7 @@ function SlideCardImpl({
|
|
|
7757
7755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7758
7756
|
"span",
|
|
7759
7757
|
{
|
|
7760
|
-
className:
|
|
7758
|
+
className: chunkH5V24JVW_js.cn(
|
|
7761
7759
|
"text-[11px] font-medium",
|
|
7762
7760
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
7763
7761
|
),
|
|
@@ -8758,7 +8756,7 @@ function segmentsToEditorHtml(segments) {
|
|
|
8758
8756
|
inlineStyles.push(`font-family:${segment.style.fontFamily}`);
|
|
8759
8757
|
}
|
|
8760
8758
|
const text = escapeHtml(segment.text);
|
|
8761
|
-
if (segment.style.hyperlink &&
|
|
8759
|
+
if (segment.style.hyperlink && chunkG5GATDE4_js.isUrlSafe(segment.style.hyperlink)) {
|
|
8762
8760
|
const href = escapeHtml(segment.style.hyperlink);
|
|
8763
8761
|
return `<a href="${href}" style="color:#4a9eff;text-decoration:underline;cursor:pointer" data-hyperlink="${href}">${text}</a>`;
|
|
8764
8762
|
}
|
|
@@ -8841,7 +8839,7 @@ function renderRichNotesSegments(segments) {
|
|
|
8841
8839
|
if (segment.style.fontFamily) {
|
|
8842
8840
|
style.fontFamily = segment.style.fontFamily;
|
|
8843
8841
|
}
|
|
8844
|
-
if (segment.style.hyperlink &&
|
|
8842
|
+
if (segment.style.hyperlink && chunkG5GATDE4_js.isUrlSafe(segment.style.hyperlink)) {
|
|
8845
8843
|
const safeHref = segment.style.hyperlink;
|
|
8846
8844
|
style.color = "#4a9eff";
|
|
8847
8845
|
style.textDecoration = "underline";
|
|
@@ -8854,7 +8852,7 @@ function renderRichNotesSegments(segments) {
|
|
|
8854
8852
|
style,
|
|
8855
8853
|
onClick: (e) => {
|
|
8856
8854
|
e.preventDefault();
|
|
8857
|
-
|
|
8855
|
+
chunkG5GATDE4_js.safeOpenUrl(safeHref);
|
|
8858
8856
|
},
|
|
8859
8857
|
children: segment.text
|
|
8860
8858
|
},
|
|
@@ -9418,7 +9416,7 @@ function useSlideNotes({
|
|
|
9418
9416
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
9419
9417
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
9420
9418
|
e.preventDefault();
|
|
9421
|
-
|
|
9419
|
+
chunkG5GATDE4_js.safeOpenUrl(href);
|
|
9422
9420
|
}
|
|
9423
9421
|
}, []);
|
|
9424
9422
|
return {
|
|
@@ -9492,7 +9490,7 @@ var SlideNotesPanel = ({
|
|
|
9492
9490
|
});
|
|
9493
9491
|
const hasNotes = draft.trim().length > 0;
|
|
9494
9492
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
9495
|
-
const { dragY, handlers: dragHandlers } =
|
|
9493
|
+
const { dragY, handlers: dragHandlers } = chunkH5V24JVW_js.useSheetDismissDrag(onToggle);
|
|
9496
9494
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9497
9495
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9498
9496
|
"button",
|
|
@@ -9506,7 +9504,7 @@ var SlideNotesPanel = ({
|
|
|
9506
9504
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9507
9505
|
"div",
|
|
9508
9506
|
{
|
|
9509
|
-
className:
|
|
9507
|
+
className: chunkH5V24JVW_js.cn(
|
|
9510
9508
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
9511
9509
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
9512
9510
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -9763,8 +9761,8 @@ function VersionHistoryPanel({
|
|
|
9763
9761
|
className: "px-3 py-2.5 border-b border-border hover:bg-muted/50 group",
|
|
9764
9762
|
children: [
|
|
9765
9763
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
9766
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-foreground", children:
|
|
9767
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground", children:
|
|
9764
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-foreground", children: chunkG5GATDE4_js.formatVersionTimestamp(version.timestamp) }),
|
|
9765
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground", children: chunkG5GATDE4_js.formatRelativeTime(version.timestamp) })
|
|
9768
9766
|
] }),
|
|
9769
9767
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] text-muted-foreground mt-0.5", children: formatFileSize(version.size) }),
|
|
9770
9768
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 mt-1.5 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
@@ -9857,7 +9855,7 @@ function SlideDiffRow({
|
|
|
9857
9855
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9858
9856
|
"div",
|
|
9859
9857
|
{
|
|
9860
|
-
className:
|
|
9858
|
+
className: chunkH5V24JVW_js.cn(
|
|
9861
9859
|
"rounded-lg border transition-colors",
|
|
9862
9860
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
9863
9861
|
),
|
|
@@ -9871,7 +9869,7 @@ function SlideDiffRow({
|
|
|
9871
9869
|
children: [
|
|
9872
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" }),
|
|
9873
9871
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
9874
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
9872
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkH5V24JVW_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
9875
9873
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
9876
9874
|
diff.changes.length,
|
|
9877
9875
|
" ",
|
|
@@ -9881,7 +9879,7 @@ function SlideDiffRow({
|
|
|
9881
9879
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9882
9880
|
"span",
|
|
9883
9881
|
{
|
|
9884
|
-
className:
|
|
9882
|
+
className: chunkH5V24JVW_js.cn(
|
|
9885
9883
|
"text-[10px] font-medium",
|
|
9886
9884
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
9887
9885
|
),
|
|
@@ -9909,7 +9907,7 @@ function SlideDiffRow({
|
|
|
9909
9907
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9910
9908
|
"div",
|
|
9911
9909
|
{
|
|
9912
|
-
className:
|
|
9910
|
+
className: chunkH5V24JVW_js.cn(
|
|
9913
9911
|
"rounded border overflow-hidden",
|
|
9914
9912
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
9915
9913
|
),
|
|
@@ -10075,7 +10073,7 @@ function useModalFocus(open, panelRef, onClose, initialFocusRef) {
|
|
|
10075
10073
|
if (!open || !panel) {
|
|
10076
10074
|
return;
|
|
10077
10075
|
}
|
|
10078
|
-
return
|
|
10076
|
+
return chunkG5GATDE4_js.activateModalFocus(panel, {
|
|
10079
10077
|
initialFocus: initialFocusRef?.current,
|
|
10080
10078
|
onEscape: onClose
|
|
10081
10079
|
});
|
|
@@ -10630,7 +10628,7 @@ function DocumentPropertiesDialog({
|
|
|
10630
10628
|
const handleClose = React14.useCallback(() => {
|
|
10631
10629
|
onClose();
|
|
10632
10630
|
}, [onClose]);
|
|
10633
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
10631
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(handleClose);
|
|
10634
10632
|
if (!isOpen) {
|
|
10635
10633
|
return null;
|
|
10636
10634
|
}
|
|
@@ -10778,7 +10776,7 @@ function FontEmbeddingPanel({
|
|
|
10778
10776
|
const scanFonts = React14.useCallback(async () => {
|
|
10779
10777
|
setScanning(true);
|
|
10780
10778
|
try {
|
|
10781
|
-
setAvailableFamilies(await
|
|
10779
|
+
setAvailableFamilies(await chunkG5GATDE4_js.scanAvailableFontFamilies(usedFontFamilies));
|
|
10782
10780
|
setScanned(true);
|
|
10783
10781
|
} catch {
|
|
10784
10782
|
} finally {
|
|
@@ -11161,7 +11159,7 @@ function PresentationAudienceEffects({ snapshot }) {
|
|
|
11161
11159
|
children: strokes.map((stroke) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11162
11160
|
"path",
|
|
11163
11161
|
{
|
|
11164
|
-
d:
|
|
11162
|
+
d: chunkG5GATDE4_js.presentationInkPath(stroke.points),
|
|
11165
11163
|
fill: "none",
|
|
11166
11164
|
stroke: stroke.color,
|
|
11167
11165
|
strokeWidth: stroke.width / 10,
|
|
@@ -11262,7 +11260,7 @@ function PresentationSubtitleBar({
|
|
|
11262
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 }) }) });
|
|
11263
11261
|
}
|
|
11264
11262
|
function renderNotesSegments(segments) {
|
|
11265
|
-
return
|
|
11263
|
+
return chunkG5GATDE4_js.notesSegmentsToSpans(segments).map((span) => {
|
|
11266
11264
|
if (span.kind === "break") {
|
|
11267
11265
|
return React14__default.default.createElement("br", { key: span.key });
|
|
11268
11266
|
}
|
|
@@ -11400,7 +11398,7 @@ function ScaledSlidePreviewImpl({
|
|
|
11400
11398
|
{
|
|
11401
11399
|
className: "absolute inset-0",
|
|
11402
11400
|
style: {
|
|
11403
|
-
backgroundColor:
|
|
11401
|
+
backgroundColor: chunkG5GATDE4_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
11404
11402
|
}
|
|
11405
11403
|
}
|
|
11406
11404
|
),
|
|
@@ -11490,7 +11488,7 @@ function PresenterNotesRail({
|
|
|
11490
11488
|
const notesText = slide?.notes ?? "";
|
|
11491
11489
|
const notesSegments = slide?.notesSegments;
|
|
11492
11490
|
const [notesDraft, setNotesDraft] = React14.useState(notesText);
|
|
11493
|
-
const [fontSize, setFontSize] = React14.useState(
|
|
11491
|
+
const [fontSize, setFontSize] = React14.useState(chunkG5GATDE4_js.NOTES_FONT_SIZE_DEFAULT);
|
|
11494
11492
|
React14.useEffect(() => setNotesDraft(notesText), [current, notesText]);
|
|
11495
11493
|
const notes = React14.useMemo(
|
|
11496
11494
|
() => notesSegments?.length ? renderNotesSegments(notesSegments) : notesText.trim() ? notesText : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "italic text-muted-foreground", children: t("pptx.presenter.noNotes") }),
|
|
@@ -11500,11 +11498,11 @@ function PresenterNotesRail({
|
|
|
11500
11498
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between border-b border-border/60 px-4 py-3", children: [
|
|
11501
11499
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11502
11500
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("pptx.presenter.currentTime") }),
|
|
11503
|
-
/* @__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: chunkG5GATDE4_js.formatTime(new Date(now)) })
|
|
11504
11502
|
] }),
|
|
11505
11503
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-right", children: [
|
|
11506
11504
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("pptx.presenter.elapsed") }),
|
|
11507
|
-
/* @__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: chunkG5GATDE4_js.formatElapsed(elapsed) })
|
|
11508
11506
|
] })
|
|
11509
11507
|
] }),
|
|
11510
11508
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex items-center justify-between border-b border-border/60 px-4 py-2", children: [
|
|
@@ -11561,8 +11559,8 @@ function PresenterNotesRail({
|
|
|
11561
11559
|
"button",
|
|
11562
11560
|
{
|
|
11563
11561
|
type: "button",
|
|
11564
|
-
onClick: () => setFontSize(
|
|
11565
|
-
disabled: fontSize <=
|
|
11562
|
+
onClick: () => setFontSize(chunkG5GATDE4_js.clampNotesFontSize(fontSize - chunkG5GATDE4_js.NOTES_FONT_SIZE_STEP)),
|
|
11563
|
+
disabled: fontSize <= chunkG5GATDE4_js.NOTES_FONT_SIZE_MIN,
|
|
11566
11564
|
"aria-label": t("pptx.presenter.decreaseFontSize"),
|
|
11567
11565
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMinus, {})
|
|
11568
11566
|
}
|
|
@@ -11575,8 +11573,8 @@ function PresenterNotesRail({
|
|
|
11575
11573
|
"button",
|
|
11576
11574
|
{
|
|
11577
11575
|
type: "button",
|
|
11578
|
-
onClick: () => setFontSize(
|
|
11579
|
-
disabled: fontSize >=
|
|
11576
|
+
onClick: () => setFontSize(chunkG5GATDE4_js.clampNotesFontSize(fontSize + chunkG5GATDE4_js.NOTES_FONT_SIZE_STEP)),
|
|
11577
|
+
disabled: fontSize >= chunkG5GATDE4_js.NOTES_FONT_SIZE_MAX,
|
|
11580
11578
|
"aria-label": t("pptx.presenter.increaseFontSize"),
|
|
11581
11579
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPlus, {})
|
|
11582
11580
|
}
|
|
@@ -11662,7 +11660,7 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
11662
11660
|
const nextPoint = point(event);
|
|
11663
11661
|
if (pointer.tool === "eraser") {
|
|
11664
11662
|
onUpdate({
|
|
11665
|
-
inkStrokes:
|
|
11663
|
+
inkStrokes: chunkG5GATDE4_js.erasePresentationInkAt(
|
|
11666
11664
|
snapshot.inkStrokes ?? [],
|
|
11667
11665
|
snapshot.slideIndex,
|
|
11668
11666
|
nextPoint
|
|
@@ -11692,11 +11690,11 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
11692
11690
|
return;
|
|
11693
11691
|
}
|
|
11694
11692
|
if (pointer.tool === "laser") {
|
|
11695
|
-
onUpdate({ pointer:
|
|
11693
|
+
onUpdate({ pointer: chunkG5GATDE4_js.movePresenterPointer(pointer, nextPoint.x, nextPoint.y) });
|
|
11696
11694
|
}
|
|
11697
11695
|
if (pointer.tool === "eraser" && event.buttons === 1) {
|
|
11698
11696
|
onUpdate({
|
|
11699
|
-
inkStrokes:
|
|
11697
|
+
inkStrokes: chunkG5GATDE4_js.erasePresentationInkAt(
|
|
11700
11698
|
snapshot.inkStrokes ?? [],
|
|
11701
11699
|
snapshot.slideIndex,
|
|
11702
11700
|
nextPoint
|
|
@@ -11706,7 +11704,7 @@ function usePresenterInk(snapshot, onUpdate) {
|
|
|
11706
11704
|
if (drawingId.current && event.buttons === 1) {
|
|
11707
11705
|
onUpdate({
|
|
11708
11706
|
inkStrokes: (snapshot.inkStrokes ?? []).map(
|
|
11709
|
-
(stroke) => stroke.id === drawingId.current ?
|
|
11707
|
+
(stroke) => stroke.id === drawingId.current ? chunkG5GATDE4_js.appendPresentationInkPoint(stroke, nextPoint) : stroke
|
|
11710
11708
|
)
|
|
11711
11709
|
});
|
|
11712
11710
|
}
|
|
@@ -11857,7 +11855,7 @@ function PresenterView({
|
|
|
11857
11855
|
"aria-valuemin": 0,
|
|
11858
11856
|
"aria-valuemax": 100,
|
|
11859
11857
|
"aria-label": t("pptx.presenter.timerProgress"),
|
|
11860
|
-
title: `${
|
|
11858
|
+
title: `${chunkG5GATDE4_js.formatElapsed(elapsed)} (segment ${timerSegment + 1})`,
|
|
11861
11859
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11862
11860
|
"div",
|
|
11863
11861
|
{
|
|
@@ -11884,7 +11882,7 @@ function MobilePresenterView({
|
|
|
11884
11882
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
11885
11883
|
return () => window.clearInterval(interval);
|
|
11886
11884
|
}, []);
|
|
11887
|
-
const elapsed =
|
|
11885
|
+
const elapsed = chunkG5GATDE4_js.mobileElapsedSince(presentationStartTime, now);
|
|
11888
11886
|
const currentSlide = slides[currentSlideIndex];
|
|
11889
11887
|
const nextSlide = currentSlideIndex + 1 < slides.length ? slides[currentSlideIndex + 1] : void 0;
|
|
11890
11888
|
if (!currentSlide) {
|
|
@@ -11893,8 +11891,8 @@ function MobilePresenterView({
|
|
|
11893
11891
|
const notesText = currentSlide.notes ?? "";
|
|
11894
11892
|
const notesSegments = currentSlide.notesSegments;
|
|
11895
11893
|
const hasRichNotes = notesSegments && notesSegments.length > 0;
|
|
11896
|
-
const atFirst =
|
|
11897
|
-
const atLast =
|
|
11894
|
+
const atFirst = chunkG5GATDE4_js.isFirstSlide(currentSlideIndex);
|
|
11895
|
+
const atLast = chunkG5GATDE4_js.isLastSlide(currentSlideIndex, slides.length);
|
|
11898
11896
|
const insetStyle = {
|
|
11899
11897
|
paddingTop: "env(safe-area-inset-top, 0px)",
|
|
11900
11898
|
paddingBottom: "env(safe-area-inset-bottom, 0px)",
|
|
@@ -11905,9 +11903,9 @@ function MobilePresenterView({
|
|
|
11905
11903
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-2 border-b border-border/60", children: [
|
|
11906
11904
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
11907
11905
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground uppercase tracking-wider", children: t("pptx.presenter.elapsed") }),
|
|
11908
|
-
/* @__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: chunkG5GATDE4_js.formatMobileElapsed(elapsed) })
|
|
11909
11907
|
] }),
|
|
11910
|
-
/* @__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: chunkG5GATDE4_js.mobileSlideCounter(currentSlideIndex, slides.length) }),
|
|
11911
11909
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11912
11910
|
"button",
|
|
11913
11911
|
{
|
|
@@ -12249,7 +12247,7 @@ function SelectionPane({
|
|
|
12249
12247
|
setDragIndex(null);
|
|
12250
12248
|
setDragOverIndex(null);
|
|
12251
12249
|
},
|
|
12252
|
-
className:
|
|
12250
|
+
className: chunkH5V24JVW_js.cn(
|
|
12253
12251
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
12254
12252
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
12255
12253
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -12306,7 +12304,7 @@ function RibbonGroup({
|
|
|
12306
12304
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12307
12305
|
"section",
|
|
12308
12306
|
{
|
|
12309
|
-
className:
|
|
12307
|
+
className: chunkH5V24JVW_js.cn(
|
|
12310
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",
|
|
12311
12309
|
className
|
|
12312
12310
|
),
|
|
@@ -12334,7 +12332,7 @@ function RibbonCommand({
|
|
|
12334
12332
|
onClick,
|
|
12335
12333
|
disabled,
|
|
12336
12334
|
title: title ?? label,
|
|
12337
|
-
className:
|
|
12335
|
+
className: chunkH5V24JVW_js.cn(
|
|
12338
12336
|
"inline-flex rounded-sm text-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-35",
|
|
12339
12337
|
active && "bg-primary/15 text-primary ring-1 ring-primary/35",
|
|
12340
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]"
|
|
@@ -12343,7 +12341,7 @@ function RibbonCommand({
|
|
|
12343
12341
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12344
12342
|
"span",
|
|
12345
12343
|
{
|
|
12346
|
-
className:
|
|
12344
|
+
className: chunkH5V24JVW_js.cn(
|
|
12347
12345
|
"grid shrink-0 place-items-center text-primary",
|
|
12348
12346
|
compact ? "h-4 w-4 [&>svg]:h-4 [&>svg]:w-4" : "h-7 w-7 [&>svg]:h-6 [&>svg]:w-6"
|
|
12349
12347
|
),
|
|
@@ -12372,7 +12370,7 @@ function RibbonToggle({
|
|
|
12372
12370
|
"label",
|
|
12373
12371
|
{
|
|
12374
12372
|
title,
|
|
12375
|
-
className:
|
|
12373
|
+
className: chunkH5V24JVW_js.cn(
|
|
12376
12374
|
"flex h-[19px] items-center gap-1 whitespace-nowrap rounded-sm px-1 text-[10px] text-foreground",
|
|
12377
12375
|
checked && "bg-primary/15 text-primary"
|
|
12378
12376
|
),
|
|
@@ -12774,7 +12772,7 @@ function ArrangeSection(p) {
|
|
|
12774
12772
|
disabled: !p.canEdit || p.canActivateFormatPainter === false && !p.formatPainterActive,
|
|
12775
12773
|
"data-testid": "format-painter-toggle",
|
|
12776
12774
|
"data-active": p.formatPainterActive ? "true" : "false",
|
|
12777
|
-
className:
|
|
12775
|
+
className: chunkH5V24JVW_js.cn(
|
|
12778
12776
|
pill,
|
|
12779
12777
|
p.formatPainterActive ? "bg-amber-600 hover:bg-amber-500 text-amber-50" : ""
|
|
12780
12778
|
),
|
|
@@ -12887,7 +12885,7 @@ function DesignSection(p) {
|
|
|
12887
12885
|
{
|
|
12888
12886
|
onClick: p.onToggleThemeGallery,
|
|
12889
12887
|
disabled: !p.canEdit,
|
|
12890
|
-
className:
|
|
12888
|
+
className: chunkH5V24JVW_js.cn(
|
|
12891
12889
|
pill,
|
|
12892
12890
|
p.isThemeGalleryOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
12893
12891
|
),
|
|
@@ -12903,7 +12901,7 @@ function DesignSection(p) {
|
|
|
12903
12901
|
{
|
|
12904
12902
|
onClick: p.onToggleThemeEditor,
|
|
12905
12903
|
disabled: !p.canEdit,
|
|
12906
|
-
className:
|
|
12904
|
+
className: chunkH5V24JVW_js.cn(pill, p.isThemeEditorOpen ? "bg-primary hover:bg-primary/80 text-white" : ""),
|
|
12907
12905
|
title: t("pptx.ribbon.editThemeTitle"),
|
|
12908
12906
|
children: [
|
|
12909
12907
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuPencil, { className: ics }),
|
|
@@ -12928,7 +12926,7 @@ function DesignSection(p) {
|
|
|
12928
12926
|
"button",
|
|
12929
12927
|
{
|
|
12930
12928
|
onClick: p.onToggleInspector,
|
|
12931
|
-
className:
|
|
12929
|
+
className: chunkH5V24JVW_js.cn(
|
|
12932
12930
|
pill,
|
|
12933
12931
|
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
12934
12932
|
),
|
|
@@ -12970,7 +12968,7 @@ function TransitionsSection(p) {
|
|
|
12970
12968
|
{
|
|
12971
12969
|
type: "button",
|
|
12972
12970
|
onClick: () => setSelected(preset.value),
|
|
12973
|
-
className:
|
|
12971
|
+
className: chunkH5V24JVW_js.cn(
|
|
12974
12972
|
"flex-shrink-0 px-2 py-1 max-md:min-h-[44px] rounded border text-[11px] leading-tight transition-colors",
|
|
12975
12973
|
selected === preset.value ? "border-primary bg-primary/10 text-primary font-medium" : "border-border bg-muted hover:bg-accent text-foreground"
|
|
12976
12974
|
),
|
|
@@ -13055,7 +13053,7 @@ function TransitionsSection(p) {
|
|
|
13055
13053
|
{
|
|
13056
13054
|
type: "button",
|
|
13057
13055
|
onClick: p.onToggleInspector,
|
|
13058
|
-
className:
|
|
13056
|
+
className: chunkH5V24JVW_js.cn(
|
|
13059
13057
|
pill,
|
|
13060
13058
|
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
13061
13059
|
),
|
|
@@ -13076,7 +13074,7 @@ function DrawSection(p) {
|
|
|
13076
13074
|
{
|
|
13077
13075
|
type: "button",
|
|
13078
13076
|
onClick: () => p.onSetActiveTool(tool.id),
|
|
13079
|
-
className:
|
|
13077
|
+
className: chunkH5V24JVW_js.cn(
|
|
13080
13078
|
i < a.length - 1 ? gB : gL,
|
|
13081
13079
|
p.activeTool === tool.id ? tool.ac ?? "bg-accent text-foreground" : ""
|
|
13082
13080
|
),
|
|
@@ -13161,7 +13159,7 @@ function BackstageAction(props) {
|
|
|
13161
13159
|
function BackstageNewGallery(props) {
|
|
13162
13160
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13163
13161
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-7 text-[17px] font-semibold", children: "New" }),
|
|
13164
|
-
/* @__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: chunkG5GATDE4_js.BACKSTAGE_TEMPLATES.map((template) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13165
13163
|
"button",
|
|
13166
13164
|
{
|
|
13167
13165
|
type: "button",
|
|
@@ -13204,8 +13202,8 @@ function BackstageRecentList(props) {
|
|
|
13204
13202
|
/* @__PURE__ */ jsxRuntime.jsx("small", { className: "block truncate text-[11px] text-muted-foreground", children: file.location })
|
|
13205
13203
|
] })
|
|
13206
13204
|
] }),
|
|
13207
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children:
|
|
13208
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children:
|
|
13205
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children: chunkG5GATDE4_js.formatBackstageDate(file.timestamp) }),
|
|
13206
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-muted-foreground", children: chunkG5GATDE4_js.formatBackstageSize(file.size) })
|
|
13209
13207
|
]
|
|
13210
13208
|
},
|
|
13211
13209
|
file.key
|
|
@@ -13218,7 +13216,7 @@ function FileSection(p) {
|
|
|
13218
13216
|
const [query, setQuery] = React14.useState("");
|
|
13219
13217
|
const [recent, setRecent] = React14.useState([]);
|
|
13220
13218
|
React14.useEffect(() => {
|
|
13221
|
-
void
|
|
13219
|
+
void chunkG5GATDE4_js.listBackstageRecentFiles().then(setRecent);
|
|
13222
13220
|
}, []);
|
|
13223
13221
|
const visibleRecent = React14.useMemo(() => {
|
|
13224
13222
|
const q = query.trim().toLowerCase();
|
|
@@ -13230,7 +13228,7 @@ function FileSection(p) {
|
|
|
13230
13228
|
p.onClose();
|
|
13231
13229
|
}
|
|
13232
13230
|
};
|
|
13233
|
-
const title =
|
|
13231
|
+
const title = chunkG5GATDE4_js.BACKSTAGE_NAV.find((item) => item.id === page)?.label ?? "Home";
|
|
13234
13232
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13235
13233
|
"div",
|
|
13236
13234
|
{
|
|
@@ -13251,7 +13249,7 @@ function FileSection(p) {
|
|
|
13251
13249
|
}
|
|
13252
13250
|
),
|
|
13253
13251
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex min-h-0 flex-1 flex-col py-2", children: [
|
|
13254
|
-
|
|
13252
|
+
chunkG5GATDE4_js.BACKSTAGE_NAV.filter((item) => !item.group).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13255
13253
|
"button",
|
|
13256
13254
|
{
|
|
13257
13255
|
type: "button",
|
|
@@ -13265,7 +13263,7 @@ function FileSection(p) {
|
|
|
13265
13263
|
item.id
|
|
13266
13264
|
)),
|
|
13267
13265
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
|
|
13268
|
-
|
|
13266
|
+
chunkG5GATDE4_js.BACKSTAGE_NAV.filter((item) => item.group).map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13269
13267
|
"button",
|
|
13270
13268
|
{
|
|
13271
13269
|
type: "button",
|
|
@@ -13553,7 +13551,7 @@ function SlidesGroup(p) {
|
|
|
13553
13551
|
type: "button",
|
|
13554
13552
|
onClick: handleNewSlide,
|
|
13555
13553
|
disabled: !p.canEdit || p.layoutOptions.length === 0,
|
|
13556
|
-
className:
|
|
13554
|
+
className: chunkH5V24JVW_js.cn(
|
|
13557
13555
|
pill,
|
|
13558
13556
|
"whitespace-nowrap",
|
|
13559
13557
|
p.layoutOptions.length > 0 ? "rounded-r-none" : ""
|
|
@@ -13743,7 +13741,7 @@ function HomeSection(p) {
|
|
|
13743
13741
|
setTimeout(() => setCutFeedback(false), 600);
|
|
13744
13742
|
},
|
|
13745
13743
|
disabled: !p.canEdit,
|
|
13746
|
-
className:
|
|
13744
|
+
className: chunkH5V24JVW_js.cn(gB, cutFeedback && "bg-green-600/20 text-green-400"),
|
|
13747
13745
|
title: t("pptx.arrange.cut"),
|
|
13748
13746
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuScissors, { className: ic2 })
|
|
13749
13747
|
}
|
|
@@ -13757,7 +13755,7 @@ function HomeSection(p) {
|
|
|
13757
13755
|
setCopiedFeedback(true);
|
|
13758
13756
|
setTimeout(() => setCopiedFeedback(false), 600);
|
|
13759
13757
|
},
|
|
13760
|
-
className:
|
|
13758
|
+
className: chunkH5V24JVW_js.cn(gB, copiedFeedback && "bg-green-600/20 text-green-400"),
|
|
13761
13759
|
title: t("pptx.arrange.copy"),
|
|
13762
13760
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuCopy, { className: ic2 })
|
|
13763
13761
|
}
|
|
@@ -13770,7 +13768,7 @@ function HomeSection(p) {
|
|
|
13770
13768
|
disabled: !p.canEdit || p.canActivateFormatPainter === false && !p.formatPainterActive,
|
|
13771
13769
|
"data-testid": "format-painter-toggle",
|
|
13772
13770
|
"data-active": p.formatPainterActive ? "true" : "false",
|
|
13773
|
-
className:
|
|
13771
|
+
className: chunkH5V24JVW_js.cn(
|
|
13774
13772
|
gL,
|
|
13775
13773
|
p.formatPainterActive ? "bg-amber-600 hover:bg-amber-500 text-amber-50" : ""
|
|
13776
13774
|
),
|
|
@@ -13862,7 +13860,7 @@ function InsertSection(p) {
|
|
|
13862
13860
|
const [datePickerOpen, setDatePickerOpen] = React14.useState(false);
|
|
13863
13861
|
const [datePickerValue, setDatePickerValue] = React14.useState("");
|
|
13864
13862
|
const [dateFormat, setDateFormat] = React14.useState("locale");
|
|
13865
|
-
const [newChartType, setNewChartType] = React14.useState(
|
|
13863
|
+
const [newChartType, setNewChartType] = React14.useState(chunkG5GATDE4_js.DEFAULT_INSERT_CHART_TYPE);
|
|
13866
13864
|
const datePickerRef = React14.useRef(null);
|
|
13867
13865
|
const openDatePicker = React14.useCallback(() => {
|
|
13868
13866
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -13945,7 +13943,7 @@ function InsertSection(p) {
|
|
|
13945
13943
|
onChange: (e) => p.onSetNewShapeType(e.target.value),
|
|
13946
13944
|
className: "bg-transparent py-1.5 pl-2 pr-1 outline-none text-xs",
|
|
13947
13945
|
title: t("pptx.insert.shapeType"),
|
|
13948
|
-
children:
|
|
13946
|
+
children: chunkH5V24JVW_js.SHAPE_PRESETS.map((sp) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: sp.type, className: "bg-background", children: t(sp.i18nKey) }, sp.type))
|
|
13949
13947
|
}
|
|
13950
13948
|
),
|
|
13951
13949
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13956,7 +13954,7 @@ function InsertSection(p) {
|
|
|
13956
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",
|
|
13957
13955
|
title: t("pptx.insert.addShape"),
|
|
13958
13956
|
children: [
|
|
13959
|
-
|
|
13957
|
+
chunkH5V24JVW_js.SHAPE_PRESETS.find((sp) => sp.type === p.newShapeType)?.icon || /* @__PURE__ */ jsxRuntime.jsx(lu.LuSquare, { className: ic2 }),
|
|
13960
13958
|
t("pptx.insert.shape")
|
|
13961
13959
|
]
|
|
13962
13960
|
}
|
|
@@ -14009,7 +14007,7 @@ function InsertSection(p) {
|
|
|
14009
14007
|
onChange: (e) => setNewChartType(e.target.value),
|
|
14010
14008
|
className: "bg-transparent py-1.5 pl-2 pr-1 outline-none text-xs",
|
|
14011
14009
|
title: t("pptx.ribbon.chartType"),
|
|
14012
|
-
children:
|
|
14010
|
+
children: chunkG5GATDE4_js.INSERT_CHART_TYPES.map((ct) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: ct.type, className: "bg-background", children: ct.label }, ct.type))
|
|
14013
14011
|
}
|
|
14014
14012
|
),
|
|
14015
14013
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -14111,7 +14109,7 @@ function InsertSection(p) {
|
|
|
14111
14109
|
]
|
|
14112
14110
|
}
|
|
14113
14111
|
),
|
|
14114
|
-
/* @__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: chunkG5GATDE4_js.ACTION_BUTTON_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14115
14113
|
"button",
|
|
14116
14114
|
{
|
|
14117
14115
|
type: "button",
|
|
@@ -15544,7 +15542,7 @@ function MobileSheet({
|
|
|
15544
15542
|
headerRight
|
|
15545
15543
|
}) {
|
|
15546
15544
|
const sheetRef = React14.useRef(null);
|
|
15547
|
-
const { dragY, dragging, handlers } =
|
|
15545
|
+
const { dragY, dragging, handlers } = chunkH5V24JVW_js.useSheetDismissDrag(onClose);
|
|
15548
15546
|
useModalFocus(open, sheetRef, onClose);
|
|
15549
15547
|
if (!open) {
|
|
15550
15548
|
return null;
|
|
@@ -15568,7 +15566,7 @@ function MobileSheet({
|
|
|
15568
15566
|
"aria-modal": "true",
|
|
15569
15567
|
"aria-label": typeof title === "string" ? title : "Mobile panel",
|
|
15570
15568
|
tabIndex: -1,
|
|
15571
|
-
className:
|
|
15569
|
+
className: chunkH5V24JVW_js.cn(
|
|
15572
15570
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
15573
15571
|
"animate-in slide-in-from-bottom duration-200",
|
|
15574
15572
|
className
|
|
@@ -15637,7 +15635,7 @@ function MobileMenuSheet(props) {
|
|
|
15637
15635
|
{
|
|
15638
15636
|
type: "button",
|
|
15639
15637
|
onClick: () => setActive(active === key ? null : key),
|
|
15640
|
-
className:
|
|
15638
|
+
className: chunkH5V24JVW_js.cn(
|
|
15641
15639
|
"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]",
|
|
15642
15640
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
15643
15641
|
),
|
|
@@ -15934,7 +15932,7 @@ function MobileToolbar(props) {
|
|
|
15934
15932
|
{
|
|
15935
15933
|
type: "button",
|
|
15936
15934
|
onClick: () => onSetMode("present"),
|
|
15937
|
-
className:
|
|
15935
|
+
className: chunkH5V24JVW_js.cn(btn, "text-primary"),
|
|
15938
15936
|
title: t("pptx.toolbar.present"),
|
|
15939
15937
|
"aria-label": t("pptx.toolbar.present"),
|
|
15940
15938
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPresentation, { className: "w-5 h-5" })
|
|
@@ -15945,7 +15943,7 @@ function MobileToolbar(props) {
|
|
|
15945
15943
|
{
|
|
15946
15944
|
type: "button",
|
|
15947
15945
|
onClick: props.onOpenShareDialog ?? props.onPackageForSharing,
|
|
15948
|
-
className:
|
|
15946
|
+
className: chunkH5V24JVW_js.cn(btn, "bg-primary text-white hover:bg-primary/90 px-3"),
|
|
15949
15947
|
title: t("pptx.toolbar.share"),
|
|
15950
15948
|
"aria-label": t("pptx.toolbar.share"),
|
|
15951
15949
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuShare2, { className: "w-4 h-4" })
|
|
@@ -15970,7 +15968,7 @@ var FILL_COLORS = [
|
|
|
15970
15968
|
"#008888",
|
|
15971
15969
|
"#888888"
|
|
15972
15970
|
];
|
|
15973
|
-
var TOP_SHAPES =
|
|
15971
|
+
var TOP_SHAPES = chunkH5V24JVW_js.SHAPE_PRESETS.slice(0, 12);
|
|
15974
15972
|
function DrawingGroup(p) {
|
|
15975
15973
|
const { t } = reactI18next.useTranslation();
|
|
15976
15974
|
const [shapesOpen, setShapesOpen] = React14.useState(false);
|
|
@@ -16051,7 +16049,7 @@ function DrawingGroup(p) {
|
|
|
16051
16049
|
"button",
|
|
16052
16050
|
{
|
|
16053
16051
|
type: "button",
|
|
16054
|
-
className:
|
|
16052
|
+
className: chunkH5V24JVW_js.cn(
|
|
16055
16053
|
"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-foreground hover:bg-muted transition-colors",
|
|
16056
16054
|
p.newShapeType === s.type && "bg-accent"
|
|
16057
16055
|
),
|
|
@@ -16195,7 +16193,7 @@ function DrawingGroup(p) {
|
|
|
16195
16193
|
{
|
|
16196
16194
|
type: "button",
|
|
16197
16195
|
disabled: true,
|
|
16198
|
-
className:
|
|
16196
|
+
className: chunkH5V24JVW_js.cn(pill, "opacity-50 cursor-not-allowed"),
|
|
16199
16197
|
title: t("pptx.drawing.shapeEffectsUnavailable"),
|
|
16200
16198
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic2 })
|
|
16201
16199
|
}
|
|
@@ -16308,11 +16306,11 @@ function TabRowActions(p) {
|
|
|
16308
16306
|
{
|
|
16309
16307
|
type: "button",
|
|
16310
16308
|
onClick: p.onEnterRehearsalMode,
|
|
16311
|
-
className:
|
|
16309
|
+
className: chunkG5GATDE4_js.TAB_ROW_ACTION_CLASSES.record,
|
|
16312
16310
|
title: t("pptx.titleBar.record"),
|
|
16313
16311
|
"aria-label": t("pptx.titleBar.record"),
|
|
16314
16312
|
children: [
|
|
16315
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
16313
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TAB_ROW_ACTION_CLASSES.recordDot, "aria-hidden": "true" }),
|
|
16316
16314
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("pptx.titleBar.record") })
|
|
16317
16315
|
]
|
|
16318
16316
|
}
|
|
@@ -16322,7 +16320,7 @@ function TabRowActions(p) {
|
|
|
16322
16320
|
{
|
|
16323
16321
|
type: "button",
|
|
16324
16322
|
onClick: p.onOpenShareDialog ?? p.onPackageForSharing,
|
|
16325
|
-
className:
|
|
16323
|
+
className: chunkH5V24JVW_js.cn(
|
|
16326
16324
|
"relative inline-flex items-center gap-1 px-2.5 py-1 rounded-sm text-[11px] font-medium transition-colors whitespace-nowrap",
|
|
16327
16325
|
isCollaborating ? "bg-green-600 hover:bg-green-500 text-white" : "bg-primary hover:bg-primary/90 text-white"
|
|
16328
16326
|
),
|
|
@@ -16402,7 +16400,7 @@ function CustomShowsControls({
|
|
|
16402
16400
|
{
|
|
16403
16401
|
type: "button",
|
|
16404
16402
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
16405
|
-
className:
|
|
16403
|
+
className: chunkH5V24JVW_js.cn(
|
|
16406
16404
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
16407
16405
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
16408
16406
|
),
|
|
@@ -16450,7 +16448,7 @@ function PresentDropdown({
|
|
|
16450
16448
|
{
|
|
16451
16449
|
type: "button",
|
|
16452
16450
|
onClick: onPresent,
|
|
16453
|
-
className:
|
|
16451
|
+
className: chunkH5V24JVW_js.cn(
|
|
16454
16452
|
"px-2 py-1 transition-colors",
|
|
16455
16453
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
16456
16454
|
),
|
|
@@ -16463,7 +16461,7 @@ function PresentDropdown({
|
|
|
16463
16461
|
{
|
|
16464
16462
|
type: "button",
|
|
16465
16463
|
onClick: () => setOpen((prev) => !prev),
|
|
16466
|
-
className:
|
|
16464
|
+
className: chunkH5V24JVW_js.cn(
|
|
16467
16465
|
"px-1 py-1 transition-colors border-l border-border",
|
|
16468
16466
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
16469
16467
|
),
|
|
@@ -16651,7 +16649,7 @@ function OverflowMenu(p) {
|
|
|
16651
16649
|
{
|
|
16652
16650
|
type: "button",
|
|
16653
16651
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
16654
|
-
className:
|
|
16652
|
+
className: chunkH5V24JVW_js.cn(
|
|
16655
16653
|
"p-1.5 rounded transition-colors",
|
|
16656
16654
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
16657
16655
|
),
|
|
@@ -16706,7 +16704,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16706
16704
|
{
|
|
16707
16705
|
type: "button",
|
|
16708
16706
|
onClick: onToggleSidebar,
|
|
16709
|
-
className:
|
|
16707
|
+
className: chunkH5V24JVW_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
16710
16708
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
16711
16709
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
16712
16710
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic2 })
|
|
@@ -16718,7 +16716,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16718
16716
|
{
|
|
16719
16717
|
type: "button",
|
|
16720
16718
|
onClick: p.onToggleComments,
|
|
16721
|
-
className:
|
|
16719
|
+
className: chunkH5V24JVW_js.cn(
|
|
16722
16720
|
qab,
|
|
16723
16721
|
"relative max-md:hidden",
|
|
16724
16722
|
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
@@ -16785,7 +16783,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16785
16783
|
{
|
|
16786
16784
|
type: "button",
|
|
16787
16785
|
onClick: onToggleInspector,
|
|
16788
|
-
className:
|
|
16786
|
+
className: chunkH5V24JVW_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
16789
16787
|
title: t("pptx.toolbar.toggleInspector"),
|
|
16790
16788
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
16791
16789
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic2 })
|
|
@@ -16796,7 +16794,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
16796
16794
|
{
|
|
16797
16795
|
type: "button",
|
|
16798
16796
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
16799
|
-
className:
|
|
16797
|
+
className: chunkH5V24JVW_js.cn(qab, "text-muted-foreground"),
|
|
16800
16798
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
16801
16799
|
"aria-label": t("pptx.toolbar.settings"),
|
|
16802
16800
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -16841,14 +16839,14 @@ function Toolbar(p) {
|
|
|
16841
16839
|
role: "tablist",
|
|
16842
16840
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
16843
16841
|
children: [
|
|
16844
|
-
|
|
16842
|
+
chunkH5V24JVW_js.TOOLBAR_SECTIONS.map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16845
16843
|
"button",
|
|
16846
16844
|
{
|
|
16847
16845
|
type: "button",
|
|
16848
16846
|
role: "tab",
|
|
16849
16847
|
"aria-selected": toolbarSection === s.id,
|
|
16850
16848
|
onClick: () => onSetToolbarSection(s.id),
|
|
16851
|
-
className:
|
|
16849
|
+
className: chunkH5V24JVW_js.cn(
|
|
16852
16850
|
"relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap transition-colors max-md:min-h-[36px] max-md:px-3",
|
|
16853
16851
|
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"
|
|
16854
16852
|
),
|
|
@@ -16870,7 +16868,7 @@ function Toolbar(p) {
|
|
|
16870
16868
|
{
|
|
16871
16869
|
type: "button",
|
|
16872
16870
|
onClick: p.onToggleCompactToolbar,
|
|
16873
|
-
className:
|
|
16871
|
+
className: chunkH5V24JVW_js.cn(
|
|
16874
16872
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
16875
16873
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
16876
16874
|
),
|
|
@@ -16886,7 +16884,7 @@ function Toolbar(p) {
|
|
|
16886
16884
|
showRibbon && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16887
16885
|
"div",
|
|
16888
16886
|
{
|
|
16889
|
-
className:
|
|
16887
|
+
className: chunkH5V24JVW_js.cn(
|
|
16890
16888
|
"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",
|
|
16891
16889
|
isNarrowViewport && !isCompactToolbarOpen && "hidden"
|
|
16892
16890
|
),
|
|
@@ -17139,13 +17137,13 @@ function Toolbar(p) {
|
|
|
17139
17137
|
}
|
|
17140
17138
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px]";
|
|
17141
17139
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px]";
|
|
17142
|
-
var ENTRANCE_PRESETS =
|
|
17140
|
+
var ENTRANCE_PRESETS = chunkH5V24JVW_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
17143
17141
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
17144
17142
|
);
|
|
17145
|
-
var EXIT_PRESETS =
|
|
17143
|
+
var EXIT_PRESETS = chunkH5V24JVW_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
17146
17144
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
17147
17145
|
);
|
|
17148
|
-
var EMPHASIS_PRESETS =
|
|
17146
|
+
var EMPHASIS_PRESETS = chunkH5V24JVW_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
17149
17147
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
17150
17148
|
);
|
|
17151
17149
|
var TRIGGER_OPTIONS = [
|
|
@@ -17247,7 +17245,7 @@ function AnimationTimelineSection({
|
|
|
17247
17245
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17248
17246
|
"div",
|
|
17249
17247
|
{
|
|
17250
|
-
className:
|
|
17248
|
+
className: chunkH5V24JVW_js.cn(
|
|
17251
17249
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
17252
17250
|
animationTypeColor(bar.anim),
|
|
17253
17251
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -17281,7 +17279,7 @@ function AnimationTimelineSection({
|
|
|
17281
17279
|
onDragEnd: handleDragEnd,
|
|
17282
17280
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
17283
17281
|
onMouseLeave: handleAnimationHoverEnd,
|
|
17284
|
-
className:
|
|
17282
|
+
className: chunkH5V24JVW_js.cn(
|
|
17285
17283
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
17286
17284
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
17287
17285
|
isDragging && "opacity-40",
|
|
@@ -17445,13 +17443,13 @@ function useAnimationPreview({
|
|
|
17445
17443
|
if (!preset || preset === "none") {
|
|
17446
17444
|
return;
|
|
17447
17445
|
}
|
|
17448
|
-
|
|
17446
|
+
chunkH5V24JVW_js.startPreviewAnimation(anim.elementId, preset, {
|
|
17449
17447
|
direction: anim.direction,
|
|
17450
17448
|
durationMs: anim.durationMs ?? 500,
|
|
17451
17449
|
timingCurve: anim.timingCurve
|
|
17452
17450
|
});
|
|
17453
17451
|
}, []);
|
|
17454
|
-
const handleAnimationHoverEnd = React14.useCallback(() =>
|
|
17452
|
+
const handleAnimationHoverEnd = React14.useCallback(() => chunkH5V24JVW_js.stopPreviewAnimation(), []);
|
|
17455
17453
|
const handlePreviewClick = React14.useCallback(() => {
|
|
17456
17454
|
if (!selectedElementAnimation) {
|
|
17457
17455
|
return;
|
|
@@ -17460,7 +17458,7 @@ function useAnimationPreview({
|
|
|
17460
17458
|
if (!preset || preset === "none") {
|
|
17461
17459
|
return;
|
|
17462
17460
|
}
|
|
17463
|
-
|
|
17461
|
+
chunkH5V24JVW_js.startPreviewAnimation(selectedElementId, preset, {
|
|
17464
17462
|
direction: selectedElementAnimation.direction,
|
|
17465
17463
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
17466
17464
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -17633,14 +17631,14 @@ function useAnimationHandlers({
|
|
|
17633
17631
|
return anim.elementId.slice(0, 8);
|
|
17634
17632
|
}
|
|
17635
17633
|
const text = chunkAD3EAEY6_js.hasTextProperties(el) ? el.text : void 0;
|
|
17636
|
-
return text ||
|
|
17634
|
+
return text || chunkG5GATDE4_js.getElementLabel(el);
|
|
17637
17635
|
},
|
|
17638
17636
|
[activeSlide.elements]
|
|
17639
17637
|
);
|
|
17640
17638
|
const hasAnimation = Boolean(
|
|
17641
17639
|
selectedElementAnimation?.entrance || selectedElementAnimation?.exit || selectedElementAnimation?.emphasis
|
|
17642
17640
|
);
|
|
17643
|
-
const showDirectionPicker = hasAnimation && (
|
|
17641
|
+
const showDirectionPicker = hasAnimation && (chunkG5GATDE4_js.DIRECTIONAL_PRESETS.has(selectedElementAnimation?.entrance ?? "") || chunkG5GATDE4_js.DIRECTIONAL_PRESETS.has(selectedElementAnimation?.exit ?? ""));
|
|
17644
17642
|
const timelineBarData = React14.useMemo(() => {
|
|
17645
17643
|
if (sortedAnimations.length === 0) {
|
|
17646
17644
|
return [];
|
|
@@ -17792,7 +17790,7 @@ function AnimationPanel({
|
|
|
17792
17790
|
{
|
|
17793
17791
|
type: "button",
|
|
17794
17792
|
disabled: !canEdit,
|
|
17795
|
-
className:
|
|
17793
|
+
className: chunkH5V24JVW_js.cn(
|
|
17796
17794
|
"flex items-center justify-center w-7 h-7 rounded border transition-colors",
|
|
17797
17795
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
17798
17796
|
),
|
|
@@ -17842,7 +17840,7 @@ function AnimationPanel({
|
|
|
17842
17840
|
className: SELECT_CLS,
|
|
17843
17841
|
children: [
|
|
17844
17842
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
17845
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
17843
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunkG5GATDE4_js.getElementLabel(el) }, el.id))
|
|
17846
17844
|
]
|
|
17847
17845
|
}
|
|
17848
17846
|
)
|
|
@@ -18034,7 +18032,7 @@ function ActionTriggerSection({
|
|
|
18034
18032
|
"select",
|
|
18035
18033
|
{
|
|
18036
18034
|
disabled: !canEdit,
|
|
18037
|
-
className:
|
|
18035
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-full"),
|
|
18038
18036
|
value: activeType,
|
|
18039
18037
|
onChange: (e) => onChangeType(e.target.value),
|
|
18040
18038
|
children: ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.label) }, o.value))
|
|
@@ -18045,7 +18043,7 @@ function ActionTriggerSection({
|
|
|
18045
18043
|
{
|
|
18046
18044
|
type: "text",
|
|
18047
18045
|
disabled: !canEdit,
|
|
18048
|
-
className:
|
|
18046
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-full"),
|
|
18049
18047
|
placeholder: "https://...",
|
|
18050
18048
|
value: action?.url ?? fallbackUrl ?? "",
|
|
18051
18049
|
onChange: (e) => onChangeUrl(e.target.value)
|
|
@@ -18056,7 +18054,7 @@ function ActionTriggerSection({
|
|
|
18056
18054
|
{
|
|
18057
18055
|
type: "number",
|
|
18058
18056
|
disabled: !canEdit,
|
|
18059
|
-
className:
|
|
18057
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-full"),
|
|
18060
18058
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
18061
18059
|
min: 1,
|
|
18062
18060
|
max: slideCount,
|
|
@@ -19711,7 +19709,7 @@ function ConnectorPanel({
|
|
|
19711
19709
|
"select",
|
|
19712
19710
|
{
|
|
19713
19711
|
disabled: !canEdit,
|
|
19714
|
-
className:
|
|
19712
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-full"),
|
|
19715
19713
|
value: selectedElement.shapeStyle?.[key] ?? "none",
|
|
19716
19714
|
onChange: (e) => onUpdateElementStyle({ [key]: e.target.value }),
|
|
19717
19715
|
children: [
|
|
@@ -19763,7 +19761,7 @@ function OlePropertiesPanel({
|
|
|
19763
19761
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19764
19762
|
"span",
|
|
19765
19763
|
{
|
|
19766
|
-
className:
|
|
19764
|
+
className: chunkH5V24JVW_js.cn(
|
|
19767
19765
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
19768
19766
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
19769
19767
|
),
|
|
@@ -19822,7 +19820,7 @@ function LayerOrderButtons({
|
|
|
19822
19820
|
"button",
|
|
19823
19821
|
{
|
|
19824
19822
|
type: "button",
|
|
19825
|
-
className:
|
|
19823
|
+
className: chunkH5V24JVW_js.cn("flex-1", BTN),
|
|
19826
19824
|
disabled: !canEdit,
|
|
19827
19825
|
onClick: () => onMoveLayer("forward"),
|
|
19828
19826
|
children: "\u2191 Forward"
|
|
@@ -19832,7 +19830,7 @@ function LayerOrderButtons({
|
|
|
19832
19830
|
"button",
|
|
19833
19831
|
{
|
|
19834
19832
|
type: "button",
|
|
19835
|
-
className:
|
|
19833
|
+
className: chunkH5V24JVW_js.cn("flex-1", BTN),
|
|
19836
19834
|
disabled: !canEdit,
|
|
19837
19835
|
onClick: () => onMoveLayer("backward"),
|
|
19838
19836
|
children: "\u2193 Backward"
|
|
@@ -19849,14 +19847,14 @@ function ArtisticEffectsGallery({
|
|
|
19849
19847
|
const { t } = reactI18next.useTranslation();
|
|
19850
19848
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
19851
19849
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.image.artisticEffects") }),
|
|
19852
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19850
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkG5GATDE4_js.ARTISTIC_EFFECTS.map(([effectName, tKey, cssFilter]) => {
|
|
19853
19851
|
const isActive = effectName === "none" ? !fx?.artisticEffect : fx?.artisticEffect === effectName;
|
|
19854
19852
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19855
19853
|
"button",
|
|
19856
19854
|
{
|
|
19857
19855
|
type: "button",
|
|
19858
19856
|
disabled: !canEdit,
|
|
19859
|
-
className:
|
|
19857
|
+
className: chunkH5V24JVW_js.cn(
|
|
19860
19858
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
19861
19859
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
19862
19860
|
),
|
|
@@ -19919,7 +19917,7 @@ function ColorChangeSection({
|
|
|
19919
19917
|
DebouncedColorInput,
|
|
19920
19918
|
{
|
|
19921
19919
|
disabled: !canEdit,
|
|
19922
|
-
value:
|
|
19920
|
+
value: chunkG5GATDE4_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
19923
19921
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19924
19922
|
onCommit: (hex) => updateEffects({
|
|
19925
19923
|
clrChange: {
|
|
@@ -19937,7 +19935,7 @@ function ColorChangeSection({
|
|
|
19937
19935
|
DebouncedColorInput,
|
|
19938
19936
|
{
|
|
19939
19937
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
19940
|
-
value:
|
|
19938
|
+
value: chunkG5GATDE4_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
19941
19939
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
19942
19940
|
onCommit: (hex) => updateEffects({
|
|
19943
19941
|
clrChange: {
|
|
@@ -19999,7 +19997,7 @@ function ColorWashSection({
|
|
|
19999
19997
|
DebouncedColorInput,
|
|
20000
19998
|
{
|
|
20001
19999
|
disabled: !canEdit,
|
|
20002
|
-
value:
|
|
20000
|
+
value: chunkG5GATDE4_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
20003
20001
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
20004
20002
|
onCommit: (hex) => updateEffects({
|
|
20005
20003
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -20099,8 +20097,8 @@ function DuotonePanel({
|
|
|
20099
20097
|
}
|
|
20100
20098
|
});
|
|
20101
20099
|
}, [effects, onUpdateElement]);
|
|
20102
|
-
const shadowColor =
|
|
20103
|
-
const highlightColor =
|
|
20100
|
+
const shadowColor = chunkG5GATDE4_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
20101
|
+
const highlightColor = chunkG5GATDE4_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
20104
20102
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
20105
20103
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
20106
20104
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -20131,7 +20129,7 @@ function DuotonePanel({
|
|
|
20131
20129
|
] }),
|
|
20132
20130
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
20133
20131
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
20134
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
20132
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkG5GATDE4_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20135
20133
|
"button",
|
|
20136
20134
|
{
|
|
20137
20135
|
type: "button",
|
|
@@ -20305,7 +20303,7 @@ function ImagePropertiesPanel({
|
|
|
20305
20303
|
{
|
|
20306
20304
|
rows: 2,
|
|
20307
20305
|
disabled: !canEdit,
|
|
20308
|
-
className:
|
|
20306
|
+
className: chunkH5V24JVW_js.cn(INPUT, "resize-none text-[11px]"),
|
|
20309
20307
|
value: selectedElement.altText ?? "",
|
|
20310
20308
|
onChange: (e) => onUpdateElement({
|
|
20311
20309
|
altText: e.target.value
|
|
@@ -21264,11 +21262,11 @@ function ShapeTextPanels({
|
|
|
21264
21262
|
{
|
|
21265
21263
|
value: selectedElement.shapeType || "rect",
|
|
21266
21264
|
disabled: !canEdit,
|
|
21267
|
-
className:
|
|
21265
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-full"),
|
|
21268
21266
|
onChange: (e) => onUpdateElement({
|
|
21269
21267
|
shapeType: e.target.value
|
|
21270
21268
|
}),
|
|
21271
|
-
children:
|
|
21269
|
+
children: chunkH5V24JVW_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
21272
21270
|
}
|
|
21273
21271
|
)
|
|
21274
21272
|
] }),
|
|
@@ -21281,7 +21279,7 @@ function ShapeTextPanels({
|
|
|
21281
21279
|
DebouncedColorInput,
|
|
21282
21280
|
{
|
|
21283
21281
|
disabled: !canEdit,
|
|
21284
|
-
value:
|
|
21282
|
+
value: chunkG5GATDE4_js.normalizeHexColor(selectedElement.shapeStyle?.fillColor, "#3b82f6"),
|
|
21285
21283
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21286
21284
|
onCommit: (hex) => onUpdateElementStyle({ fillColor: hex, fillMode: "solid" })
|
|
21287
21285
|
}
|
|
@@ -21293,7 +21291,7 @@ function ShapeTextPanels({
|
|
|
21293
21291
|
DebouncedColorInput,
|
|
21294
21292
|
{
|
|
21295
21293
|
disabled: !canEdit,
|
|
21296
|
-
value:
|
|
21294
|
+
value: chunkG5GATDE4_js.normalizeHexColor(selectedElement.shapeStyle?.strokeColor, "#1f2937"),
|
|
21297
21295
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21298
21296
|
onCommit: (hex) => onUpdateElementStyle({ strokeColor: hex })
|
|
21299
21297
|
}
|
|
@@ -21340,7 +21338,7 @@ function ShapeTextPanels({
|
|
|
21340
21338
|
DebouncedColorInput,
|
|
21341
21339
|
{
|
|
21342
21340
|
disabled: !canEdit,
|
|
21343
|
-
value:
|
|
21341
|
+
value: chunkG5GATDE4_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
21344
21342
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21345
21343
|
onCommit: (hex) => onUpdateTextStyle({ color: hex })
|
|
21346
21344
|
}
|
|
@@ -21398,7 +21396,7 @@ function TextFormatToggle({
|
|
|
21398
21396
|
{
|
|
21399
21397
|
type: "button",
|
|
21400
21398
|
disabled,
|
|
21401
|
-
className:
|
|
21399
|
+
className: chunkH5V24JVW_js.cn(
|
|
21402
21400
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
21403
21401
|
italic && "italic",
|
|
21404
21402
|
underline && "underline",
|
|
@@ -21690,7 +21688,7 @@ function SmartArtLayoutSwitcher({
|
|
|
21690
21688
|
type: "button",
|
|
21691
21689
|
"data-testid": `smartart-layout-${type}`,
|
|
21692
21690
|
disabled: !canEdit,
|
|
21693
|
-
className:
|
|
21691
|
+
className: chunkH5V24JVW_js.cn(
|
|
21694
21692
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
21695
21693
|
"text-[9px] leading-tight",
|
|
21696
21694
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -21762,7 +21760,7 @@ function SmartArtNodeStyleControls({
|
|
|
21762
21760
|
disabled: !canEdit,
|
|
21763
21761
|
"aria-label": `Bold ${label}`,
|
|
21764
21762
|
"aria-pressed": bold,
|
|
21765
|
-
className:
|
|
21763
|
+
className: chunkH5V24JVW_js.cn(
|
|
21766
21764
|
EMPHASIS_BTN,
|
|
21767
21765
|
"font-bold",
|
|
21768
21766
|
bold ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -21778,7 +21776,7 @@ function SmartArtNodeStyleControls({
|
|
|
21778
21776
|
disabled: !canEdit,
|
|
21779
21777
|
"aria-label": `Italic ${label}`,
|
|
21780
21778
|
"aria-pressed": italic,
|
|
21781
|
-
className:
|
|
21779
|
+
className: chunkH5V24JVW_js.cn(
|
|
21782
21780
|
EMPHASIS_BTN,
|
|
21783
21781
|
"italic",
|
|
21784
21782
|
italic ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground"
|
|
@@ -21817,7 +21815,7 @@ function SmartArtNodeRow({
|
|
|
21817
21815
|
"div",
|
|
21818
21816
|
{
|
|
21819
21817
|
role: "listitem",
|
|
21820
|
-
className:
|
|
21818
|
+
className: chunkH5V24JVW_js.cn(
|
|
21821
21819
|
"rounded border bg-background/60 p-1.5",
|
|
21822
21820
|
isChild ? "border-border/60 ml-4" : "border-border"
|
|
21823
21821
|
),
|
|
@@ -21832,7 +21830,7 @@ function SmartArtNodeRow({
|
|
|
21832
21830
|
"data-testid": "smartart-node-text",
|
|
21833
21831
|
disabled: !canEdit,
|
|
21834
21832
|
"aria-label": label,
|
|
21835
|
-
className:
|
|
21833
|
+
className: chunkH5V24JVW_js.cn(INPUT, "flex-1 text-[11px] py-0.5"),
|
|
21836
21834
|
value: text,
|
|
21837
21835
|
onChange: (e) => onChangeText(nodeId, e.target.value),
|
|
21838
21836
|
onKeyDown: (e) => onKeyDown(e, nodeId),
|
|
@@ -21881,7 +21879,7 @@ function SmartArtNodeRow({
|
|
|
21881
21879
|
{
|
|
21882
21880
|
type: "button",
|
|
21883
21881
|
disabled: !canEdit || removeDisabled,
|
|
21884
|
-
className:
|
|
21882
|
+
className: chunkH5V24JVW_js.cn(MINI_BTN, "hover:text-red-400"),
|
|
21885
21883
|
onClick: () => onRemove(nodeId),
|
|
21886
21884
|
"aria-label": `Remove ${label}`,
|
|
21887
21885
|
title: removeDisabled ? t("pptx.smartArt.layoutMinimum") : t("pptx.smartArt.remove"),
|
|
@@ -21936,10 +21934,10 @@ function SmartArtPropertiesPanel({
|
|
|
21936
21934
|
if (focusId) {
|
|
21937
21935
|
pendingFocusId.current = focusId;
|
|
21938
21936
|
}
|
|
21939
|
-
const reflowed = box ?
|
|
21937
|
+
const reflowed = box ? chunkG5GATDE4_js.rebuildDrawingShapesIfCleared(
|
|
21940
21938
|
newData,
|
|
21941
21939
|
newData.layout,
|
|
21942
|
-
|
|
21940
|
+
chunkH5V24JVW_js.resolveSmartArtDataPalette(newData),
|
|
21943
21941
|
newData.style ?? "flat",
|
|
21944
21942
|
"inspector",
|
|
21945
21943
|
box
|
|
@@ -22048,7 +22046,7 @@ function SmartArtPropertiesPanel({
|
|
|
22048
22046
|
disabled: !canEdit,
|
|
22049
22047
|
"data-testid": "smartart-color-scheme",
|
|
22050
22048
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
22051
|
-
className:
|
|
22049
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-full"),
|
|
22052
22050
|
value: smartArtData.colorScheme ?? "colorful1",
|
|
22053
22051
|
onChange: (e) => updateSmartArt({ colorScheme: e.target.value }),
|
|
22054
22052
|
children: COLOR_SCHEMES.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: cs }, cs))
|
|
@@ -22063,7 +22061,7 @@ function SmartArtPropertiesPanel({
|
|
|
22063
22061
|
type: "button",
|
|
22064
22062
|
disabled: !canEdit,
|
|
22065
22063
|
"aria-pressed": (smartArtData.style ?? "flat") === s,
|
|
22066
|
-
className:
|
|
22064
|
+
className: chunkH5V24JVW_js.cn(
|
|
22067
22065
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
22068
22066
|
(smartArtData.style ?? "flat") === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
22069
22067
|
),
|
|
@@ -22173,15 +22171,15 @@ function TableCellAdvancedFill({
|
|
|
22173
22171
|
};
|
|
22174
22172
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
22175
22173
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
22176
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22174
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.fillMode") }),
|
|
22177
22175
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22178
22176
|
"select",
|
|
22179
22177
|
{
|
|
22180
22178
|
disabled: !canEdit,
|
|
22181
|
-
className:
|
|
22179
|
+
className: chunkG5GATDE4_js.SEL,
|
|
22182
22180
|
value: fillMode,
|
|
22183
22181
|
onChange: (e) => handleFillModeChange(e.target.value),
|
|
22184
|
-
children:
|
|
22182
|
+
children: chunkG5GATDE4_js.FILL_MODE_OPTIONS.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value ?? "", children: t(opt.i18nKey) }, opt.value))
|
|
22185
22183
|
}
|
|
22186
22184
|
)
|
|
22187
22185
|
] }),
|
|
@@ -22202,20 +22200,20 @@ function TableCellAdvancedFill({
|
|
|
22202
22200
|
}
|
|
22203
22201
|
),
|
|
22204
22202
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
22205
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22203
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.SECTION_HEADING, children: t("pptx.table.margins") }),
|
|
22206
22204
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
22207
22205
|
["marginTop", "pptx.table.marginTop"],
|
|
22208
22206
|
["marginBottom", "pptx.table.marginBottom"],
|
|
22209
22207
|
["marginLeft", "pptx.table.marginLeft"],
|
|
22210
22208
|
["marginRight", "pptx.table.marginRight"]
|
|
22211
22209
|
].map(([key, i18nKey]) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22212
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22210
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t(i18nKey) }),
|
|
22213
22211
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22214
22212
|
"input",
|
|
22215
22213
|
{
|
|
22216
22214
|
type: "number",
|
|
22217
22215
|
disabled: !canEdit,
|
|
22218
|
-
className:
|
|
22216
|
+
className: chunkG5GATDE4_js.NUM,
|
|
22219
22217
|
min: 0,
|
|
22220
22218
|
max: 200,
|
|
22221
22219
|
value: cellStyle[key] ?? 0,
|
|
@@ -22248,28 +22246,28 @@ function GradientControls({
|
|
|
22248
22246
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
22249
22247
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
22250
22248
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22251
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22249
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.gradientType") }),
|
|
22252
22250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22253
22251
|
"select",
|
|
22254
22252
|
{
|
|
22255
22253
|
disabled: !canEdit,
|
|
22256
|
-
className:
|
|
22254
|
+
className: chunkG5GATDE4_js.SEL,
|
|
22257
22255
|
value: gradType,
|
|
22258
22256
|
onChange: (e) => onUpdateCellStyle({
|
|
22259
22257
|
gradientFillType: e.target.value
|
|
22260
22258
|
}),
|
|
22261
|
-
children:
|
|
22259
|
+
children: chunkG5GATDE4_js.GRADIENT_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
22262
22260
|
}
|
|
22263
22261
|
)
|
|
22264
22262
|
] }),
|
|
22265
22263
|
gradType === "linear" && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22266
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22264
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.gradientAngle") }),
|
|
22267
22265
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22268
22266
|
"input",
|
|
22269
22267
|
{
|
|
22270
22268
|
type: "number",
|
|
22271
22269
|
disabled: !canEdit,
|
|
22272
|
-
className:
|
|
22270
|
+
className: chunkG5GATDE4_js.NUM,
|
|
22273
22271
|
min: 0,
|
|
22274
22272
|
max: 360,
|
|
22275
22273
|
value: cellStyle.gradientFillAngle ?? 90,
|
|
@@ -22280,7 +22278,7 @@ function GradientControls({
|
|
|
22280
22278
|
)
|
|
22281
22279
|
] })
|
|
22282
22280
|
] }),
|
|
22283
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22281
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.gradientStops") }),
|
|
22284
22282
|
stops.map((stop, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
22285
22283
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22286
22284
|
"input",
|
|
@@ -22297,7 +22295,7 @@ function GradientControls({
|
|
|
22297
22295
|
{
|
|
22298
22296
|
type: "number",
|
|
22299
22297
|
disabled: !canEdit,
|
|
22300
|
-
className:
|
|
22298
|
+
className: chunkG5GATDE4_js.NUM,
|
|
22301
22299
|
min: 0,
|
|
22302
22300
|
max: 100,
|
|
22303
22301
|
value: Math.round(stop.position),
|
|
@@ -22328,23 +22326,23 @@ function PatternControls({
|
|
|
22328
22326
|
const { t } = reactI18next.useTranslation();
|
|
22329
22327
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
22330
22328
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22331
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22329
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.patternPreset") }),
|
|
22332
22330
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22333
22331
|
"select",
|
|
22334
22332
|
{
|
|
22335
22333
|
disabled: !canEdit,
|
|
22336
|
-
className:
|
|
22334
|
+
className: chunkG5GATDE4_js.SEL,
|
|
22337
22335
|
value: cellStyle.patternFillPreset ?? "ltDnDiag",
|
|
22338
22336
|
onChange: (e) => onUpdateCellStyle({
|
|
22339
22337
|
patternFillPreset: e.target.value
|
|
22340
22338
|
}),
|
|
22341
|
-
children:
|
|
22339
|
+
children: chunkG5GATDE4_js.PATTERN_OPTIONS.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p, children: p }, p))
|
|
22342
22340
|
}
|
|
22343
22341
|
)
|
|
22344
22342
|
] }),
|
|
22345
22343
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
22346
22344
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22347
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22345
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.patternForeground") }),
|
|
22348
22346
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22349
22347
|
"input",
|
|
22350
22348
|
{
|
|
@@ -22359,7 +22357,7 @@ function PatternControls({
|
|
|
22359
22357
|
)
|
|
22360
22358
|
] }),
|
|
22361
22359
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
22362
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
22360
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.LBL, children: t("pptx.table.patternBackground") }),
|
|
22363
22361
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22364
22362
|
"input",
|
|
22365
22363
|
{
|
|
@@ -22431,7 +22429,7 @@ function TableCellFormattingPanel({
|
|
|
22431
22429
|
DebouncedColorInput,
|
|
22432
22430
|
{
|
|
22433
22431
|
disabled: !canEdit,
|
|
22434
|
-
value:
|
|
22432
|
+
value: chunkG5GATDE4_js.normalizeHexColor(cs.color, "#000000"),
|
|
22435
22433
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22436
22434
|
onCommit: (hex) => updateCellStyle({ color: hex })
|
|
22437
22435
|
}
|
|
@@ -22443,7 +22441,7 @@ function TableCellFormattingPanel({
|
|
|
22443
22441
|
DebouncedColorInput,
|
|
22444
22442
|
{
|
|
22445
22443
|
disabled: !canEdit,
|
|
22446
|
-
value:
|
|
22444
|
+
value: chunkG5GATDE4_js.normalizeHexColor(cs.backgroundColor, "#ffffff"),
|
|
22447
22445
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22448
22446
|
onCommit: (hex) => updateCellStyle({ backgroundColor: hex })
|
|
22449
22447
|
}
|
|
@@ -22467,7 +22465,7 @@ function TableCellFormattingPanel({
|
|
|
22467
22465
|
{
|
|
22468
22466
|
type: "button",
|
|
22469
22467
|
disabled: !canEdit,
|
|
22470
|
-
className:
|
|
22468
|
+
className: chunkH5V24JVW_js.cn(
|
|
22471
22469
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22472
22470
|
cls,
|
|
22473
22471
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -22486,7 +22484,7 @@ function TableCellFormattingPanel({
|
|
|
22486
22484
|
{
|
|
22487
22485
|
type: "button",
|
|
22488
22486
|
disabled: !canEdit,
|
|
22489
|
-
className:
|
|
22487
|
+
className: chunkH5V24JVW_js.cn(
|
|
22490
22488
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22491
22489
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22492
22490
|
),
|
|
@@ -22504,7 +22502,7 @@ function TableCellFormattingPanel({
|
|
|
22504
22502
|
{
|
|
22505
22503
|
type: "button",
|
|
22506
22504
|
disabled: !canEdit,
|
|
22507
|
-
className:
|
|
22505
|
+
className: chunkH5V24JVW_js.cn(
|
|
22508
22506
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22509
22507
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22510
22508
|
),
|
|
@@ -22527,7 +22525,7 @@ function TableCellFormattingPanel({
|
|
|
22527
22525
|
DebouncedColorInput,
|
|
22528
22526
|
{
|
|
22529
22527
|
disabled: !canEdit,
|
|
22530
|
-
value:
|
|
22528
|
+
value: chunkG5GATDE4_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
22531
22529
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
22532
22530
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
22533
22531
|
}
|
|
@@ -22537,7 +22535,7 @@ function TableCellFormattingPanel({
|
|
|
22537
22535
|
{
|
|
22538
22536
|
type: "number",
|
|
22539
22537
|
disabled: !canEdit,
|
|
22540
|
-
className:
|
|
22538
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-14"),
|
|
22541
22539
|
min: 0,
|
|
22542
22540
|
max: 10,
|
|
22543
22541
|
value: cs[widthKey] ?? 1,
|
|
@@ -22553,9 +22551,9 @@ function TableCellFormattingPanel({
|
|
|
22553
22551
|
{
|
|
22554
22552
|
type: "button",
|
|
22555
22553
|
disabled: !canEdit,
|
|
22556
|
-
className:
|
|
22554
|
+
className: chunkH5V24JVW_js.cn(BTN, "text-center"),
|
|
22557
22555
|
onClick: () => {
|
|
22558
|
-
const newRows =
|
|
22556
|
+
const newRows = chunkG5GATDE4_js.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
22559
22557
|
if (newRows) {
|
|
22560
22558
|
onUpdateTableData({ rows: newRows });
|
|
22561
22559
|
}
|
|
@@ -22568,9 +22566,9 @@ function TableCellFormattingPanel({
|
|
|
22568
22566
|
{
|
|
22569
22567
|
type: "button",
|
|
22570
22568
|
disabled: !canEdit,
|
|
22571
|
-
className:
|
|
22569
|
+
className: chunkH5V24JVW_js.cn(BTN, "text-center"),
|
|
22572
22570
|
onClick: () => {
|
|
22573
|
-
const newRows =
|
|
22571
|
+
const newRows = chunkG5GATDE4_js.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
22574
22572
|
if (newRows) {
|
|
22575
22573
|
onUpdateTableData({ rows: newRows });
|
|
22576
22574
|
}
|
|
@@ -22583,9 +22581,9 @@ function TableCellFormattingPanel({
|
|
|
22583
22581
|
{
|
|
22584
22582
|
type: "button",
|
|
22585
22583
|
disabled: !canEdit,
|
|
22586
|
-
className:
|
|
22584
|
+
className: chunkH5V24JVW_js.cn(BTN, "text-center"),
|
|
22587
22585
|
onClick: () => {
|
|
22588
|
-
const newRows =
|
|
22586
|
+
const newRows = chunkG5GATDE4_js.computeSplitCell(td, rowIndex, columnIndex);
|
|
22589
22587
|
if (newRows) {
|
|
22590
22588
|
onUpdateTableData({ rows: newRows });
|
|
22591
22589
|
}
|
|
@@ -22676,7 +22674,7 @@ function TablePropertiesPanel({
|
|
|
22676
22674
|
] }),
|
|
22677
22675
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
22678
22676
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.table.stylePresets") }),
|
|
22679
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
22677
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunkG5GATDE4_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22680
22678
|
"button",
|
|
22681
22679
|
{
|
|
22682
22680
|
type: "button",
|
|
@@ -22991,7 +22989,7 @@ function InspectorCommentRow({
|
|
|
22991
22989
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22992
22990
|
"div",
|
|
22993
22991
|
{
|
|
22994
|
-
className:
|
|
22992
|
+
className: chunkH5V24JVW_js.cn(
|
|
22995
22993
|
"rounded border border-border bg-card p-2",
|
|
22996
22994
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
22997
22995
|
),
|
|
@@ -23004,7 +23002,7 @@ function InspectorCommentRow({
|
|
|
23004
23002
|
t("pptx.comments.resolved")
|
|
23005
23003
|
] })
|
|
23006
23004
|
] }),
|
|
23007
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
23005
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunkG5GATDE4_js.formatCommentTimestamp(comment.createdAt) })
|
|
23008
23006
|
] }),
|
|
23009
23007
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23010
23008
|
"button",
|
|
@@ -23012,12 +23010,12 @@ function InspectorCommentRow({
|
|
|
23012
23010
|
type: "button",
|
|
23013
23011
|
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",
|
|
23014
23012
|
title: t("pptx.comments.commentingOn", {
|
|
23015
|
-
element:
|
|
23013
|
+
element: chunkG5GATDE4_js.getElementLabel(targetElement)
|
|
23016
23014
|
}),
|
|
23017
23015
|
onClick: () => onSelectElement(targetElement.id),
|
|
23018
23016
|
children: [
|
|
23019
23017
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23020
|
-
|
|
23018
|
+
chunkG5GATDE4_js.getElementLabel(targetElement)
|
|
23021
23019
|
]
|
|
23022
23020
|
}
|
|
23023
23021
|
) : /* @__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") })),
|
|
@@ -23079,7 +23077,7 @@ function InspectorCommentRow({
|
|
|
23079
23077
|
"button",
|
|
23080
23078
|
{
|
|
23081
23079
|
type: "button",
|
|
23082
|
-
className:
|
|
23080
|
+
className: chunkH5V24JVW_js.cn(
|
|
23083
23081
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
23084
23082
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
23085
23083
|
),
|
|
@@ -23246,7 +23244,7 @@ function InspectorCommentsSection({
|
|
|
23246
23244
|
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: [
|
|
23247
23245
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23248
23246
|
t("pptx.comments.commentingOn", {
|
|
23249
|
-
element:
|
|
23247
|
+
element: chunkG5GATDE4_js.getElementLabel(selectedElement)
|
|
23250
23248
|
})
|
|
23251
23249
|
] }),
|
|
23252
23250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23254,7 +23252,7 @@ function InspectorCommentsSection({
|
|
|
23254
23252
|
{
|
|
23255
23253
|
rows: 2,
|
|
23256
23254
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
23257
|
-
element:
|
|
23255
|
+
element: chunkG5GATDE4_js.getElementLabel(selectedElement)
|
|
23258
23256
|
}) : t("pptx.comments.addPlaceholder"),
|
|
23259
23257
|
value: commentDraft,
|
|
23260
23258
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
@@ -23273,7 +23271,7 @@ function InspectorCommentsSection({
|
|
|
23273
23271
|
type: "button",
|
|
23274
23272
|
onClick: onAddComment,
|
|
23275
23273
|
disabled: !commentDraft.trim(),
|
|
23276
|
-
className:
|
|
23274
|
+
className: chunkH5V24JVW_js.cn(
|
|
23277
23275
|
"w-full inline-flex items-center justify-center gap-1 rounded px-2 py-1 text-[11px] font-medium transition-colors",
|
|
23278
23276
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
23279
23277
|
),
|
|
@@ -23298,7 +23296,7 @@ function InspectorPaneHeader({
|
|
|
23298
23296
|
{
|
|
23299
23297
|
type: "button",
|
|
23300
23298
|
title: label,
|
|
23301
|
-
className:
|
|
23299
|
+
className: chunkH5V24JVW_js.cn(
|
|
23302
23300
|
"flex items-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
23303
23301
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
23304
23302
|
),
|
|
@@ -23407,7 +23405,7 @@ function CustomPropertiesBlock({
|
|
|
23407
23405
|
"button",
|
|
23408
23406
|
{
|
|
23409
23407
|
type: "button",
|
|
23410
|
-
className:
|
|
23408
|
+
className: chunkH5V24JVW_js.cn(BTN, "px-1.5 text-red-400 hover:text-red-300"),
|
|
23411
23409
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
23412
23410
|
children: "\xD7"
|
|
23413
23411
|
}
|
|
@@ -23542,7 +23540,7 @@ function PresentationSettingsCard({
|
|
|
23542
23540
|
"select",
|
|
23543
23541
|
{
|
|
23544
23542
|
disabled: !canEdit,
|
|
23545
|
-
className:
|
|
23543
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-28"),
|
|
23546
23544
|
value: presentationProperties.showType ?? "presented",
|
|
23547
23545
|
onChange: (e) => onUpdate({
|
|
23548
23546
|
showType: e.target.value
|
|
@@ -23600,7 +23598,7 @@ function PresentationSettingsCard({
|
|
|
23600
23598
|
min: 1,
|
|
23601
23599
|
max: 16,
|
|
23602
23600
|
disabled: !canEdit,
|
|
23603
|
-
className:
|
|
23601
|
+
className: chunkH5V24JVW_js.cn(INPUT, "w-20"),
|
|
23604
23602
|
value: presentationProperties.printSlidesPerPage ?? 1,
|
|
23605
23603
|
onChange: (e) => onUpdate({ printSlidesPerPage: Number(e.target.value) })
|
|
23606
23604
|
}
|
|
@@ -23897,7 +23895,7 @@ function TagsSection({
|
|
|
23897
23895
|
"button",
|
|
23898
23896
|
{
|
|
23899
23897
|
type: "button",
|
|
23900
|
-
className:
|
|
23898
|
+
className: chunkH5V24JVW_js.cn(BTN, "px-1.5 text-red-400 hover:text-red-300"),
|
|
23901
23899
|
title: t("pptx.tags.deleteTag"),
|
|
23902
23900
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
23903
23901
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -23997,7 +23995,7 @@ function PresentationPropertiesPanel({
|
|
|
23997
23995
|
canEdit
|
|
23998
23996
|
}
|
|
23999
23997
|
),
|
|
24000
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
23998
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH5V24JVW_js.cn(CARD, "space-y-1"), children: [
|
|
24001
23999
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: "Slide" }),
|
|
24002
24000
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
24003
24001
|
activeSlide.elements?.length ?? 0,
|
|
@@ -24018,14 +24016,14 @@ function SlideBackgroundPanel({
|
|
|
24018
24016
|
const { t } = reactI18next.useTranslation();
|
|
24019
24017
|
const bgImageInputRef = React14.useRef(null);
|
|
24020
24018
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24021
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
24019
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH5V24JVW_js.cn(CARD, "space-y-2"), children: [
|
|
24022
24020
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: "Background" }),
|
|
24023
24021
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
24024
24022
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: "Colour" }),
|
|
24025
24023
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24026
24024
|
DebouncedColorInput,
|
|
24027
24025
|
{
|
|
24028
|
-
value:
|
|
24026
|
+
value: chunkG5GATDE4_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
24029
24027
|
disabled: !canEdit,
|
|
24030
24028
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
24031
24029
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -24064,7 +24062,7 @@ function SlideBackgroundPanel({
|
|
|
24064
24062
|
"button",
|
|
24065
24063
|
{
|
|
24066
24064
|
type: "button",
|
|
24067
|
-
className:
|
|
24065
|
+
className: chunkH5V24JVW_js.cn(BTN, "flex-1 text-center"),
|
|
24068
24066
|
disabled: !canEdit,
|
|
24069
24067
|
onClick: () => bgImageInputRef.current?.click(),
|
|
24070
24068
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -24097,7 +24095,7 @@ function SlideBackgroundPanel({
|
|
|
24097
24095
|
"button",
|
|
24098
24096
|
{
|
|
24099
24097
|
type: "button",
|
|
24100
|
-
className:
|
|
24098
|
+
className: chunkH5V24JVW_js.cn(BTN, "w-full text-center text-red-400 hover:text-red-300"),
|
|
24101
24099
|
disabled: !canEdit,
|
|
24102
24100
|
onClick: () => onUpdateSlide({
|
|
24103
24101
|
backgroundColor: void 0,
|
|
@@ -24128,7 +24126,7 @@ function TemplateBackgroundCard({
|
|
|
24128
24126
|
onGetTemplateBackgroundColor
|
|
24129
24127
|
}) {
|
|
24130
24128
|
const { t } = reactI18next.useTranslation();
|
|
24131
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
24129
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH5V24JVW_js.cn(CARD, "space-y-2"), children: [
|
|
24132
24130
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
24133
24131
|
activeSlide.layoutPath && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
24134
24132
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24142,7 +24140,7 @@ function TemplateBackgroundCard({
|
|
|
24142
24140
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24143
24141
|
DebouncedColorInput,
|
|
24144
24142
|
{
|
|
24145
|
-
value:
|
|
24143
|
+
value: chunkG5GATDE4_js.normalizeHexColor(
|
|
24146
24144
|
onGetTemplateBackgroundColor(activeSlide.layoutPath),
|
|
24147
24145
|
"#ffffff"
|
|
24148
24146
|
),
|
|
@@ -24172,7 +24170,7 @@ function TemplateBackgroundCard({
|
|
|
24172
24170
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24173
24171
|
DebouncedColorInput,
|
|
24174
24172
|
{
|
|
24175
|
-
value:
|
|
24173
|
+
value: chunkG5GATDE4_js.normalizeHexColor(onGetTemplateBackgroundColor(master.path), "#ffffff"),
|
|
24176
24174
|
disabled: !canEdit,
|
|
24177
24175
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
24178
24176
|
onCommit: (hex) => onSetTemplateBackground(master.path, hex)
|
|
@@ -24275,7 +24273,7 @@ function InspectorPane(props) {
|
|
|
24275
24273
|
} = props;
|
|
24276
24274
|
const hasSelection = selectedElement !== null;
|
|
24277
24275
|
const { t } = reactI18next.useTranslation();
|
|
24278
|
-
const { dragY, handlers: dragHandlers } =
|
|
24276
|
+
const { dragY, handlers: dragHandlers } = chunkH5V24JVW_js.useSheetDismissDrag(onClose);
|
|
24279
24277
|
const {
|
|
24280
24278
|
animationPanelHeight,
|
|
24281
24279
|
effectiveThemeOptions,
|
|
@@ -24296,7 +24294,7 @@ function InspectorPane(props) {
|
|
|
24296
24294
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24297
24295
|
"div",
|
|
24298
24296
|
{
|
|
24299
|
-
className:
|
|
24297
|
+
className: chunkH5V24JVW_js.cn(
|
|
24300
24298
|
// Shared styles
|
|
24301
24299
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
24302
24300
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -24334,7 +24332,7 @@ function InspectorPane(props) {
|
|
|
24334
24332
|
),
|
|
24335
24333
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
24336
24334
|
activeTab === "elements" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24337
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24335
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH5V24JVW_js.cn(HEADING, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24338
24336
|
activeSlide ? [...activeSlide.elements || []].reverse().map((el, ri) => {
|
|
24339
24337
|
const idx = (activeSlide.elements || []).length - 1 - ri;
|
|
24340
24338
|
const sel = selectedElement?.id === el.id || selectedElementIds.includes(el.id);
|
|
@@ -24343,7 +24341,7 @@ function InspectorPane(props) {
|
|
|
24343
24341
|
"div",
|
|
24344
24342
|
{
|
|
24345
24343
|
title: `${el.type} \u2014 ${el.id}`,
|
|
24346
|
-
className:
|
|
24344
|
+
className: chunkH5V24JVW_js.cn(
|
|
24347
24345
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
24348
24346
|
sel ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
24349
24347
|
),
|
|
@@ -24751,7 +24749,7 @@ function PresentationToolbar({
|
|
|
24751
24749
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronLeft, { size: 18 })
|
|
24752
24750
|
}
|
|
24753
24751
|
),
|
|
24754
|
-
/* @__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:
|
|
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: chunkG5GATDE4_js.formatSlideCounter(currentSlideIndex, totalSlides) }),
|
|
24755
24753
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24756
24754
|
"button",
|
|
24757
24755
|
{
|
|
@@ -24772,7 +24770,7 @@ function PresentationToolbar({
|
|
|
24772
24770
|
title: t("pptx.presenter.elapsed"),
|
|
24773
24771
|
children: [
|
|
24774
24772
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuTimer, { size: 14 }),
|
|
24775
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
24773
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: chunkG5GATDE4_js.formatElapsed(elapsed) })
|
|
24776
24774
|
]
|
|
24777
24775
|
}
|
|
24778
24776
|
),
|
|
@@ -24946,7 +24944,7 @@ function PresentationTouchControls({
|
|
|
24946
24944
|
onEndPresentation
|
|
24947
24945
|
}) {
|
|
24948
24946
|
const { t } = reactI18next.useTranslation();
|
|
24949
|
-
const { isTouchDevice } =
|
|
24947
|
+
const { isTouchDevice } = chunkH5V24JVW_js.useIsMobile();
|
|
24950
24948
|
if (!isTouchDevice) {
|
|
24951
24949
|
return null;
|
|
24952
24950
|
}
|
|
@@ -25030,7 +25028,7 @@ function SlideLayer({ slide, templateElements, canvasSize }) {
|
|
|
25030
25028
|
style: {
|
|
25031
25029
|
width: safeWidth,
|
|
25032
25030
|
height: safeHeight,
|
|
25033
|
-
backgroundColor: slide.backgroundColor ?
|
|
25031
|
+
backgroundColor: slide.backgroundColor ? chunkG5GATDE4_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
25034
25032
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
25035
25033
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
25036
25034
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|
|
@@ -25073,7 +25071,7 @@ function PresentationTransitionOverlay({
|
|
|
25073
25071
|
};
|
|
25074
25072
|
}, [durationMs, onComplete]);
|
|
25075
25073
|
const animations = React14.useMemo(
|
|
25076
|
-
() =>
|
|
25074
|
+
() => chunkG5GATDE4_js.getSlideTransitionAnimations(
|
|
25077
25075
|
transition.type,
|
|
25078
25076
|
durationMs,
|
|
25079
25077
|
transition.direction,
|
|
@@ -25099,7 +25097,7 @@ function PresentationTransitionOverlay({
|
|
|
25099
25097
|
className: "pptx-react-transition-overlay absolute inset-0 pointer-events-none overflow-hidden",
|
|
25100
25098
|
style: { zIndex: outgoingZIndex },
|
|
25101
25099
|
children: [
|
|
25102
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25100
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkG5GATDE4_js.SLIDE_TRANSITION_KEYFRAMES }),
|
|
25103
25101
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25104
25102
|
"div",
|
|
25105
25103
|
{
|
|
@@ -25199,8 +25197,8 @@ function NotesPagePreview({
|
|
|
25199
25197
|
maxPages = 3
|
|
25200
25198
|
}) {
|
|
25201
25199
|
const { t } = reactI18next.useTranslation();
|
|
25202
|
-
const pages = React14.useMemo(() =>
|
|
25203
|
-
const printable = React14.useMemo(() =>
|
|
25200
|
+
const pages = React14.useMemo(() => chunkG5GATDE4_js.computeAllNotesPages(slideIndices), [slideIndices]);
|
|
25201
|
+
const printable = React14.useMemo(() => chunkG5GATDE4_js.getNotesPrintableArea(), []);
|
|
25204
25202
|
const visiblePages = pages.slice(0, maxPages);
|
|
25205
25203
|
const scaledW = printable.width * PREVIEW_SCALE;
|
|
25206
25204
|
const scaledH = printable.height * PREVIEW_SCALE;
|
|
@@ -25288,13 +25286,13 @@ function PrintPreview({
|
|
|
25288
25286
|
}) {
|
|
25289
25287
|
const { t } = reactI18next.useTranslation();
|
|
25290
25288
|
const pages = React14.useMemo(
|
|
25291
|
-
() =>
|
|
25289
|
+
() => chunkG5GATDE4_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
25292
25290
|
[slideIndices, slidesPerPage, orientation]
|
|
25293
25291
|
);
|
|
25294
|
-
const printable = React14.useMemo(() =>
|
|
25292
|
+
const printable = React14.useMemo(() => chunkG5GATDE4_js.getPrintableArea(orientation), [orientation]);
|
|
25295
25293
|
const visiblePages = pages.slice(0, maxPages);
|
|
25296
25294
|
const isThreePerPage = slidesPerPage === 3;
|
|
25297
|
-
const noteLineCount =
|
|
25295
|
+
const noteLineCount = chunkG5GATDE4_js.generateNoteLineCount();
|
|
25298
25296
|
const scaledW = printable.width * PREVIEW_SCALE2;
|
|
25299
25297
|
const scaledH = printable.height * PREVIEW_SCALE2;
|
|
25300
25298
|
const noteAreaFraction = 0.5;
|
|
@@ -25459,7 +25457,7 @@ function PrintSettingsPanel({
|
|
|
25459
25457
|
] }),
|
|
25460
25458
|
printWhat === "handouts" && /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { children: [
|
|
25461
25459
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide", children: t("pptx.print.slidesPerPage") }),
|
|
25462
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 flex-wrap", children:
|
|
25460
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 flex-wrap", children: chunkG5GATDE4_js.HANDOUT_OPTIONS.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
25463
25461
|
"button",
|
|
25464
25462
|
{
|
|
25465
25463
|
type: "button",
|
|
@@ -25645,13 +25643,13 @@ function PrintDialog({
|
|
|
25645
25643
|
defaultFrameSlides
|
|
25646
25644
|
}) {
|
|
25647
25645
|
const { t } = reactI18next.useTranslation();
|
|
25648
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
25646
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onClose);
|
|
25649
25647
|
const [printWhat, setPrintWhat] = React14.useState("slides");
|
|
25650
25648
|
const [orientation, setOrientation] = React14.useState("landscape");
|
|
25651
25649
|
const [colorMode, setColorMode] = React14.useState("color");
|
|
25652
25650
|
const [frameSlides, setFrameSlides] = React14.useState(defaultFrameSlides ?? false);
|
|
25653
25651
|
const [slidesPerPage, setSlidesPerPage] = React14.useState(
|
|
25654
|
-
|
|
25652
|
+
chunkG5GATDE4_js.HANDOUT_OPTIONS.includes(defaultSlidesPerPage) ? defaultSlidesPerPage : 6
|
|
25655
25653
|
);
|
|
25656
25654
|
const [slideRange, setSlideRange] = React14.useState("all");
|
|
25657
25655
|
const [customFrom, setCustomFrom] = React14.useState(1);
|
|
@@ -26174,19 +26172,19 @@ function BroadcastDialog({
|
|
|
26174
26172
|
const [serverUrl, setServerUrl] = React14.useState("");
|
|
26175
26173
|
const [copied, setCopied] = React14.useState(false);
|
|
26176
26174
|
const dialogRef = React14.useRef(null);
|
|
26177
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26175
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onClose);
|
|
26178
26176
|
useModalFocus(open, dialogRef, onClose);
|
|
26179
26177
|
React14.useEffect(() => {
|
|
26180
26178
|
if (open && !isBroadcasting) {
|
|
26181
|
-
const broadcastRoom = defaultRoomId ? `broadcast-${defaultRoomId}` :
|
|
26179
|
+
const broadcastRoom = defaultRoomId ? `broadcast-${defaultRoomId}` : chunkG5GATDE4_js.generateBroadcastRoomId();
|
|
26182
26180
|
setRoomId(broadcastRoom);
|
|
26183
26181
|
setUserName(defaultUserName ?? "");
|
|
26184
|
-
setServerUrl(defaultServerUrl ??
|
|
26182
|
+
setServerUrl(defaultServerUrl ?? chunkG5GATDE4_js.DEFAULT_BROADCAST_SERVER_URL);
|
|
26185
26183
|
}
|
|
26186
26184
|
}, [open, isBroadcasting, defaultRoomId, defaultUserName, defaultServerUrl]);
|
|
26187
26185
|
const activeRoomId = isBroadcasting ? collab.config.roomId : roomId;
|
|
26188
26186
|
const activeServerUrl = isBroadcasting ? collab.config.serverUrl : serverUrl;
|
|
26189
|
-
const broadcastUrl = typeof window !== "undefined" ?
|
|
26187
|
+
const broadcastUrl = typeof window !== "undefined" ? chunkG5GATDE4_js.buildBroadcastViewerUrl(activeRoomId, activeServerUrl, window.location) : activeRoomId;
|
|
26190
26188
|
const handleCopyUrl = React14.useCallback(() => {
|
|
26191
26189
|
void navigator.clipboard.writeText(broadcastUrl).then(() => {
|
|
26192
26190
|
setCopied(true);
|
|
@@ -26205,7 +26203,7 @@ function BroadcastDialog({
|
|
|
26205
26203
|
userName: userName.trim(),
|
|
26206
26204
|
role: "owner",
|
|
26207
26205
|
// A blank server broadcasts over the serverless peer-to-peer transport.
|
|
26208
|
-
transport:
|
|
26206
|
+
transport: chunkG5GATDE4_js.resolveTransportForServerUrl(trimmedServer)
|
|
26209
26207
|
});
|
|
26210
26208
|
setTimeout(() => {
|
|
26211
26209
|
onStartPresenting?.();
|
|
@@ -26475,7 +26473,7 @@ function isP2P(config) {
|
|
|
26475
26473
|
return config.transport === "webrtc" || !config.serverUrl?.trim();
|
|
26476
26474
|
}
|
|
26477
26475
|
function shareUrl(config) {
|
|
26478
|
-
return
|
|
26476
|
+
return chunkG5GATDE4_js.buildCollaborationShareUrl(
|
|
26479
26477
|
config,
|
|
26480
26478
|
typeof window === "undefined" ? void 0 : { origin: window.location.origin, pathname: window.location.pathname }
|
|
26481
26479
|
);
|
|
@@ -26711,7 +26709,7 @@ function StartSessionForm({
|
|
|
26711
26709
|
] });
|
|
26712
26710
|
}
|
|
26713
26711
|
function shareUrl2(config) {
|
|
26714
|
-
return
|
|
26712
|
+
return chunkG5GATDE4_js.buildCollaborationShareUrl(
|
|
26715
26713
|
config,
|
|
26716
26714
|
typeof window === "undefined" ? void 0 : { origin: window.location.origin, pathname: window.location.pathname }
|
|
26717
26715
|
);
|
|
@@ -26737,7 +26735,7 @@ function ShareDialog({
|
|
|
26737
26735
|
const [invitation, setInvitation] = React14.useState("");
|
|
26738
26736
|
const [copied, setCopied] = React14.useState(false);
|
|
26739
26737
|
const dialogRef = React14.useRef(null);
|
|
26740
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26738
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onClose);
|
|
26741
26739
|
useModalFocus(open, dialogRef, onClose);
|
|
26742
26740
|
React14.useEffect(() => {
|
|
26743
26741
|
if (activeCollaboration) {
|
|
@@ -26755,12 +26753,12 @@ function ShareDialog({
|
|
|
26755
26753
|
});
|
|
26756
26754
|
}, [activeCollaboration, roomId, serverUrl]);
|
|
26757
26755
|
const handleStartSharing = React14.useCallback(() => {
|
|
26758
|
-
const config = mode === "join" ?
|
|
26756
|
+
const config = mode === "join" ? chunkG5GATDE4_js.buildJoinCollaborationConfig({ invitation, userName, serverUrl }) : chunkG5GATDE4_js.buildCreateCollaborationConfig({ roomId, userName, serverUrl });
|
|
26759
26757
|
if (config) {
|
|
26760
26758
|
onStartCollaboration?.(config);
|
|
26761
26759
|
}
|
|
26762
26760
|
}, [invitation, mode, roomId, userName, serverUrl, onStartCollaboration]);
|
|
26763
|
-
const canStart = (mode === "join" ?
|
|
26761
|
+
const canStart = (mode === "join" ? chunkG5GATDE4_js.buildJoinCollaborationConfig({ invitation, userName, serverUrl }) : chunkG5GATDE4_js.buildCreateCollaborationConfig({ roomId, userName, serverUrl })) !== null;
|
|
26764
26762
|
if (!open) {
|
|
26765
26763
|
return null;
|
|
26766
26764
|
}
|
|
@@ -27012,12 +27010,12 @@ function HyperlinkEditDialog({
|
|
|
27012
27010
|
onCancel
|
|
27013
27011
|
}) {
|
|
27014
27012
|
const { t } = reactI18next.useTranslation();
|
|
27015
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27013
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onCancel);
|
|
27016
27014
|
const inputRef = React14.useRef(null);
|
|
27017
|
-
const detectedType =
|
|
27018
|
-
const emailParts =
|
|
27019
|
-
const detectedSlide =
|
|
27020
|
-
const detectedVerb = initialAction ?
|
|
27015
|
+
const detectedType = chunkH5V24JVW_js.detectTargetType(initialUrl, initialAction);
|
|
27016
|
+
const emailParts = chunkH5V24JVW_js.parseEmailUrl(initialUrl || "");
|
|
27017
|
+
const detectedSlide = chunkH5V24JVW_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
27018
|
+
const detectedVerb = initialAction ? chunkH5V24JVW_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
27021
27019
|
const [targetType, setTargetType] = React14.useState(detectedType);
|
|
27022
27020
|
const [url, setUrl] = React14.useState(
|
|
27023
27021
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -27048,7 +27046,7 @@ function HyperlinkEditDialog({
|
|
|
27048
27046
|
actionVerb
|
|
27049
27047
|
});
|
|
27050
27048
|
};
|
|
27051
|
-
const tabCls = (active) =>
|
|
27049
|
+
const tabCls = (active) => chunkH5V24JVW_js.cn(
|
|
27052
27050
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
27053
27051
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
27054
27052
|
);
|
|
@@ -27266,7 +27264,7 @@ function CommentMarkersOverlay({
|
|
|
27266
27264
|
onCommentMarkerClick
|
|
27267
27265
|
}) {
|
|
27268
27266
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none z-[45]", children: comments.map((comment, idx) => {
|
|
27269
|
-
const pos =
|
|
27267
|
+
const pos = chunkG5GATDE4_js.getCommentMarkerPosition(comment, idx, canvasSize.width, canvasSize.height);
|
|
27270
27268
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27271
27269
|
"div",
|
|
27272
27270
|
{
|
|
@@ -27318,7 +27316,7 @@ function ConnectorOverlay({
|
|
|
27318
27316
|
style: { pointerEvents: connectorDragState ? "auto" : "none" },
|
|
27319
27317
|
children: [
|
|
27320
27318
|
activeSlide.elements.filter((el) => el.type !== "connector").map((el) => {
|
|
27321
|
-
const sites =
|
|
27319
|
+
const sites = chunkG5GATDE4_js.getConnectionSites(el.width, el.height);
|
|
27322
27320
|
return sites.map((site) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
27323
27321
|
"div",
|
|
27324
27322
|
{
|
|
@@ -27360,7 +27358,7 @@ function ConnectorDragPreview({
|
|
|
27360
27358
|
if (!startEl) {
|
|
27361
27359
|
return null;
|
|
27362
27360
|
}
|
|
27363
|
-
const startSites =
|
|
27361
|
+
const startSites = chunkG5GATDE4_js.getConnectionSites(startEl.width, startEl.height);
|
|
27364
27362
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
27365
27363
|
const sx = startEl.x + startSite.x;
|
|
27366
27364
|
const sy = startEl.y + startSite.y;
|
|
@@ -27438,7 +27436,7 @@ function DrawingOverlaySvg({
|
|
|
27438
27436
|
}
|
|
27439
27437
|
);
|
|
27440
27438
|
}
|
|
27441
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
27439
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkH5V24JVW_js.GRID_SIZE, visible }) {
|
|
27442
27440
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
27443
27441
|
const patternId = React14.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
27444
27442
|
if (!visible) {
|
|
@@ -27459,15 +27457,15 @@ function GridOverlay({ canvasSize, gridSpacingPx = chunkYF6JD4DO_js.GRID_SIZE, v
|
|
|
27459
27457
|
);
|
|
27460
27458
|
}
|
|
27461
27459
|
var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight }) => {
|
|
27462
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: widthPx, height:
|
|
27463
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: widthPx, height:
|
|
27460
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: widthPx, height: chunkG5GATDE4_js.RULER_THICKNESS, className: "block select-none", "aria-hidden": "true", children: [
|
|
27461
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: widthPx, height: chunkG5GATDE4_js.RULER_THICKNESS, className: "fill-gray-100 dark:fill-gray-800" }),
|
|
27464
27462
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27465
27463
|
"line",
|
|
27466
27464
|
{
|
|
27467
27465
|
x1: 0,
|
|
27468
|
-
y1:
|
|
27466
|
+
y1: chunkG5GATDE4_js.RULER_THICKNESS - 0.5,
|
|
27469
27467
|
x2: widthPx,
|
|
27470
|
-
y2:
|
|
27468
|
+
y2: chunkG5GATDE4_js.RULER_THICKNESS - 0.5,
|
|
27471
27469
|
className: "stroke-border",
|
|
27472
27470
|
strokeWidth: 1
|
|
27473
27471
|
}
|
|
@@ -27478,20 +27476,20 @@ var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight
|
|
|
27478
27476
|
x: highlight.start,
|
|
27479
27477
|
y: 0,
|
|
27480
27478
|
width: Math.max(highlight.end - highlight.start, 1),
|
|
27481
|
-
height:
|
|
27479
|
+
height: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27482
27480
|
className: "fill-primary/20"
|
|
27483
27481
|
}
|
|
27484
27482
|
),
|
|
27485
27483
|
ticks.map((tick, i) => {
|
|
27486
|
-
const tickHeight = tick.isMajor ?
|
|
27484
|
+
const tickHeight = tick.isMajor ? chunkG5GATDE4_js.RULER_THICKNESS * 0.6 : chunkG5GATDE4_js.RULER_THICKNESS * 0.3;
|
|
27487
27485
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
27488
27486
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27489
27487
|
"line",
|
|
27490
27488
|
{
|
|
27491
27489
|
x1: tick.position,
|
|
27492
|
-
y1:
|
|
27490
|
+
y1: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27493
27491
|
x2: tick.position,
|
|
27494
|
-
y2:
|
|
27492
|
+
y2: chunkG5GATDE4_js.RULER_THICKNESS - tickHeight,
|
|
27495
27493
|
className: "stroke-gray-400 dark:stroke-gray-500",
|
|
27496
27494
|
strokeWidth: tick.isMajor ? 1 : 0.5
|
|
27497
27495
|
}
|
|
@@ -27500,8 +27498,8 @@ var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight
|
|
|
27500
27498
|
"text",
|
|
27501
27499
|
{
|
|
27502
27500
|
x: tick.position + 2,
|
|
27503
|
-
y:
|
|
27504
|
-
fontSize:
|
|
27501
|
+
y: chunkG5GATDE4_js.RULER_FONT_SIZE + 1,
|
|
27502
|
+
fontSize: chunkG5GATDE4_js.RULER_FONT_SIZE,
|
|
27505
27503
|
className: "fill-gray-500 dark:fill-gray-400",
|
|
27506
27504
|
style: { fontFamily: "system-ui, sans-serif" },
|
|
27507
27505
|
children: tick.label
|
|
@@ -27513,11 +27511,11 @@ var HorizontalRuler = React14__default.default.memo(({ ticks, widthPx, highlight
|
|
|
27513
27511
|
});
|
|
27514
27512
|
HorizontalRuler.displayName = "HorizontalRuler";
|
|
27515
27513
|
var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight }) => {
|
|
27516
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width:
|
|
27514
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: chunkG5GATDE4_js.RULER_THICKNESS, height: heightPx, className: "block select-none", "aria-hidden": "true", children: [
|
|
27517
27515
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27518
27516
|
"rect",
|
|
27519
27517
|
{
|
|
27520
|
-
width:
|
|
27518
|
+
width: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27521
27519
|
height: heightPx,
|
|
27522
27520
|
className: "fill-gray-100 dark:fill-gray-800"
|
|
27523
27521
|
}
|
|
@@ -27525,9 +27523,9 @@ var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight
|
|
|
27525
27523
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27526
27524
|
"line",
|
|
27527
27525
|
{
|
|
27528
|
-
x1:
|
|
27526
|
+
x1: chunkG5GATDE4_js.RULER_THICKNESS - 0.5,
|
|
27529
27527
|
y1: 0,
|
|
27530
|
-
x2:
|
|
27528
|
+
x2: chunkG5GATDE4_js.RULER_THICKNESS - 0.5,
|
|
27531
27529
|
y2: heightPx,
|
|
27532
27530
|
className: "stroke-border",
|
|
27533
27531
|
strokeWidth: 1
|
|
@@ -27538,20 +27536,20 @@ var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight
|
|
|
27538
27536
|
{
|
|
27539
27537
|
x: 0,
|
|
27540
27538
|
y: highlight.start,
|
|
27541
|
-
width:
|
|
27539
|
+
width: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27542
27540
|
height: Math.max(highlight.end - highlight.start, 1),
|
|
27543
27541
|
className: "fill-primary/20"
|
|
27544
27542
|
}
|
|
27545
27543
|
),
|
|
27546
27544
|
ticks.map((tick, i) => {
|
|
27547
|
-
const tickWidth = tick.isMajor ?
|
|
27545
|
+
const tickWidth = tick.isMajor ? chunkG5GATDE4_js.RULER_THICKNESS * 0.6 : chunkG5GATDE4_js.RULER_THICKNESS * 0.3;
|
|
27548
27546
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
27549
27547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27550
27548
|
"line",
|
|
27551
27549
|
{
|
|
27552
|
-
x1:
|
|
27550
|
+
x1: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27553
27551
|
y1: tick.position,
|
|
27554
|
-
x2:
|
|
27552
|
+
x2: chunkG5GATDE4_js.RULER_THICKNESS - tickWidth,
|
|
27555
27553
|
y2: tick.position,
|
|
27556
27554
|
className: "stroke-gray-400 dark:stroke-gray-500",
|
|
27557
27555
|
strokeWidth: tick.isMajor ? 1 : 0.5
|
|
@@ -27561,8 +27559,8 @@ var VerticalRuler = React14__default.default.memo(({ ticks, heightPx, highlight
|
|
|
27561
27559
|
"text",
|
|
27562
27560
|
{
|
|
27563
27561
|
x: 2,
|
|
27564
|
-
y: tick.position +
|
|
27565
|
-
fontSize:
|
|
27562
|
+
y: tick.position + chunkG5GATDE4_js.RULER_FONT_SIZE + 2,
|
|
27563
|
+
fontSize: chunkG5GATDE4_js.RULER_FONT_SIZE,
|
|
27566
27564
|
className: "fill-gray-500 dark:fill-gray-400",
|
|
27567
27565
|
style: { fontFamily: "system-ui, sans-serif" },
|
|
27568
27566
|
children: tick.label
|
|
@@ -27582,11 +27580,11 @@ function Ruler({
|
|
|
27582
27580
|
onCreateGuideFromRuler
|
|
27583
27581
|
}) {
|
|
27584
27582
|
const hTicks = React14.useMemo(
|
|
27585
|
-
() =>
|
|
27583
|
+
() => chunkG5GATDE4_js.generateTicks(canvasSize.width, editorScale, unit),
|
|
27586
27584
|
[canvasSize.width, editorScale, unit]
|
|
27587
27585
|
);
|
|
27588
27586
|
const vTicks = React14.useMemo(
|
|
27589
|
-
() =>
|
|
27587
|
+
() => chunkG5GATDE4_js.generateTicks(canvasSize.height, editorScale, unit),
|
|
27590
27588
|
[canvasSize.height, editorScale, unit]
|
|
27591
27589
|
);
|
|
27592
27590
|
const hHighlight = React14.useMemo(() => {
|
|
@@ -27650,8 +27648,8 @@ function Ruler({
|
|
|
27650
27648
|
}
|
|
27651
27649
|
const rect = rulerEl.getBoundingClientRect();
|
|
27652
27650
|
const posScaled = e.clientY - rect.top;
|
|
27653
|
-
if (posScaled >
|
|
27654
|
-
const positionPx = (posScaled -
|
|
27651
|
+
if (posScaled > chunkG5GATDE4_js.RULER_THICKNESS) {
|
|
27652
|
+
const positionPx = (posScaled - chunkG5GATDE4_js.RULER_THICKNESS) / scale;
|
|
27655
27653
|
if (positionPx >= 0 && positionPx <= canvasSize.height) {
|
|
27656
27654
|
onCreateGuideFromRuler("h", positionPx);
|
|
27657
27655
|
}
|
|
@@ -27664,8 +27662,8 @@ function Ruler({
|
|
|
27664
27662
|
}
|
|
27665
27663
|
const rect = rulerEl.getBoundingClientRect();
|
|
27666
27664
|
const posScaled = e.clientX - rect.left;
|
|
27667
|
-
if (posScaled >
|
|
27668
|
-
const positionPx = (posScaled -
|
|
27665
|
+
if (posScaled > chunkG5GATDE4_js.RULER_THICKNESS) {
|
|
27666
|
+
const positionPx = (posScaled - chunkG5GATDE4_js.RULER_THICKNESS) / scale;
|
|
27669
27667
|
if (positionPx >= 0 && positionPx <= canvasSize.width) {
|
|
27670
27668
|
onCreateGuideFromRuler("v", positionPx);
|
|
27671
27669
|
}
|
|
@@ -27688,8 +27686,8 @@ function Ruler({
|
|
|
27688
27686
|
style: {
|
|
27689
27687
|
top: 0,
|
|
27690
27688
|
left: 0,
|
|
27691
|
-
width:
|
|
27692
|
-
height:
|
|
27689
|
+
width: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27690
|
+
height: chunkG5GATDE4_js.RULER_THICKNESS
|
|
27693
27691
|
}
|
|
27694
27692
|
}
|
|
27695
27693
|
),
|
|
@@ -27700,9 +27698,9 @@ function Ruler({
|
|
|
27700
27698
|
className: "absolute z-[50] overflow-visible",
|
|
27701
27699
|
style: {
|
|
27702
27700
|
top: 0,
|
|
27703
|
-
left:
|
|
27701
|
+
left: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27704
27702
|
width: scaledWidth,
|
|
27705
|
-
height:
|
|
27703
|
+
height: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27706
27704
|
cursor: onCreateGuideFromRuler ? "row-resize" : void 0
|
|
27707
27705
|
},
|
|
27708
27706
|
onPointerDown: handleHRulerPointerDown,
|
|
@@ -27716,9 +27714,9 @@ function Ruler({
|
|
|
27716
27714
|
ref: vRulerRef,
|
|
27717
27715
|
className: "absolute z-[50] overflow-visible",
|
|
27718
27716
|
style: {
|
|
27719
|
-
top:
|
|
27717
|
+
top: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27720
27718
|
left: 0,
|
|
27721
|
-
width:
|
|
27719
|
+
width: chunkG5GATDE4_js.RULER_THICKNESS,
|
|
27722
27720
|
height: scaledHeight,
|
|
27723
27721
|
cursor: onCreateGuideFromRuler ? "col-resize" : void 0
|
|
27724
27722
|
},
|
|
@@ -27963,8 +27961,8 @@ function useConnectorCreation({
|
|
|
27963
27961
|
setConnectorDragState(null);
|
|
27964
27962
|
return;
|
|
27965
27963
|
}
|
|
27966
|
-
const startSites =
|
|
27967
|
-
const endSites =
|
|
27964
|
+
const startSites = chunkG5GATDE4_js.getConnectionSites(startEl.width, startEl.height);
|
|
27965
|
+
const endSites = chunkG5GATDE4_js.getConnectionSites(endEl.width, endEl.height);
|
|
27968
27966
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
27969
27967
|
const endSite = endSites[targetSiteIndex] ?? endSites[0];
|
|
27970
27968
|
const sx = startEl.x + startSite.x;
|
|
@@ -28437,7 +28435,7 @@ function SlideCanvas({
|
|
|
28437
28435
|
onAddFreeformShape,
|
|
28438
28436
|
onEraseInkElement
|
|
28439
28437
|
});
|
|
28440
|
-
const rulerOffset = showRulers ?
|
|
28438
|
+
const rulerOffset = showRulers ? chunkG5GATDE4_js.RULER_THICKNESS : 0;
|
|
28441
28439
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28442
28440
|
"div",
|
|
28443
28441
|
{
|
|
@@ -28527,7 +28525,7 @@ function SlideCanvas({
|
|
|
28527
28525
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
28528
28526
|
renderInk: false,
|
|
28529
28527
|
renderGroups: false,
|
|
28530
|
-
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ?
|
|
28528
|
+
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ? chunkG5GATDE4_js.getShapeAdjustmentHandleDescriptor(element) : null,
|
|
28531
28529
|
onResizePointerDown: stableResizePointerDown,
|
|
28532
28530
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
28533
28531
|
onRotate: stableRotate,
|
|
@@ -28567,7 +28565,7 @@ function SlideCanvas({
|
|
|
28567
28565
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
28568
28566
|
renderInk: true,
|
|
28569
28567
|
renderGroups: true,
|
|
28570
|
-
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ?
|
|
28568
|
+
adjustmentHandleDescriptor: isEditableCanvas && selectedElement?.id === element.id ? chunkG5GATDE4_js.getShapeAdjustmentHandleDescriptor(element) : null,
|
|
28571
28569
|
onResizePointerDown: stableResizePointerDown,
|
|
28572
28570
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
28573
28571
|
onRotate: stableRotate,
|
|
@@ -28936,7 +28934,7 @@ function TitleBar(p) {
|
|
|
28936
28934
|
const [searchQuery, setSearchQuery] = React14.useState("");
|
|
28937
28935
|
const [searchFocused, setSearchFocused] = React14.useState(false);
|
|
28938
28936
|
const searchRef = React14.useRef(null);
|
|
28939
|
-
const commandResults =
|
|
28937
|
+
const commandResults = chunkG5GATDE4_js.filterCommands(searchQuery, t);
|
|
28940
28938
|
const handleCommandSelect = React14.useCallback(
|
|
28941
28939
|
(entry) => {
|
|
28942
28940
|
p.onCommandSearch?.(entry.command);
|
|
@@ -28970,17 +28968,17 @@ function TitleBar(p) {
|
|
|
28970
28968
|
document.addEventListener("mousedown", handler);
|
|
28971
28969
|
return () => document.removeEventListener("mousedown", handler);
|
|
28972
28970
|
}, []);
|
|
28973
|
-
const statusKey =
|
|
28971
|
+
const statusKey = chunkG5GATDE4_js.resolveTitleBarStatusKey({
|
|
28974
28972
|
autosaveState: p.autosaveStatus?.state ?? "idle",
|
|
28975
28973
|
isDirty: p.isDirty,
|
|
28976
28974
|
autosaveEnabled: p.autosaveEnabled,
|
|
28977
28975
|
disabledReason: p.autosaveStatus?.state === "disabled" ? p.autosaveStatus.reason : void 0
|
|
28978
28976
|
});
|
|
28979
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
28980
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
28977
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.container, "data-pptx-title-bar": "", children: [
|
|
28978
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.logo, "aria-hidden": "true", children: "P" }),
|
|
28981
28979
|
editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
28982
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
28983
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
28980
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.autosaveGroup, children: [
|
|
28981
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.autosaveLabel, children: t("pptx.titleBar.autoSave") }),
|
|
28984
28982
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28985
28983
|
"button",
|
|
28986
28984
|
{
|
|
@@ -28988,32 +28986,32 @@ function TitleBar(p) {
|
|
|
28988
28986
|
role: "switch",
|
|
28989
28987
|
"aria-checked": p.autosaveEnabled,
|
|
28990
28988
|
onClick: p.onToggleAutosave,
|
|
28991
|
-
className:
|
|
28992
|
-
|
|
28993
|
-
p.autosaveEnabled ?
|
|
28989
|
+
className: chunkH5V24JVW_js.cn(
|
|
28990
|
+
chunkG5GATDE4_js.TITLE_BAR_CLASSES.toggleTrack,
|
|
28991
|
+
p.autosaveEnabled ? chunkG5GATDE4_js.TITLE_BAR_CLASSES.toggleTrackOn : chunkG5GATDE4_js.TITLE_BAR_CLASSES.toggleTrackOff
|
|
28994
28992
|
),
|
|
28995
28993
|
title: t("pptx.titleBar.toggleAutoSave"),
|
|
28996
28994
|
"aria-label": t("pptx.titleBar.toggleAutoSave"),
|
|
28997
28995
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28998
28996
|
"span",
|
|
28999
28997
|
{
|
|
29000
|
-
className:
|
|
29001
|
-
|
|
29002
|
-
p.autosaveEnabled ?
|
|
28998
|
+
className: chunkH5V24JVW_js.cn(
|
|
28999
|
+
chunkG5GATDE4_js.TITLE_BAR_CLASSES.toggleKnob,
|
|
29000
|
+
p.autosaveEnabled ? chunkG5GATDE4_js.TITLE_BAR_CLASSES.toggleKnobOn : chunkG5GATDE4_js.TITLE_BAR_CLASSES.toggleKnobOff
|
|
29003
29001
|
)
|
|
29004
29002
|
}
|
|
29005
29003
|
)
|
|
29006
29004
|
}
|
|
29007
29005
|
),
|
|
29008
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29006
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.autosaveLabel, children: t(p.autosaveEnabled ? "pptx.titleBar.autoSaveOn" : "pptx.titleBar.autoSaveOff") })
|
|
29009
29007
|
] }),
|
|
29010
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29008
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.separator }),
|
|
29011
29009
|
p.onSave && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29012
29010
|
"button",
|
|
29013
29011
|
{
|
|
29014
29012
|
type: "button",
|
|
29015
29013
|
onClick: p.onSave,
|
|
29016
|
-
className:
|
|
29014
|
+
className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.quickButton,
|
|
29017
29015
|
title: t("pptx.titleBar.save"),
|
|
29018
29016
|
"aria-label": t("pptx.titleBar.save"),
|
|
29019
29017
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSave, { className: "w-3.5 h-3.5" })
|
|
@@ -29025,7 +29023,7 @@ function TitleBar(p) {
|
|
|
29025
29023
|
type: "button",
|
|
29026
29024
|
onClick: p.onUndo,
|
|
29027
29025
|
disabled: !p.canUndo,
|
|
29028
|
-
className:
|
|
29026
|
+
className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.quickButton,
|
|
29029
29027
|
title: p.undoLabel ? t("pptx.toolbar.undoAction", { action: p.undoLabel }) : t("pptx.toolbar.undo"),
|
|
29030
29028
|
"aria-label": t("pptx.toolbar.undo"),
|
|
29031
29029
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuUndo, { className: "w-3.5 h-3.5" })
|
|
@@ -29037,41 +29035,41 @@ function TitleBar(p) {
|
|
|
29037
29035
|
type: "button",
|
|
29038
29036
|
onClick: p.onRedo,
|
|
29039
29037
|
disabled: !p.canRedo,
|
|
29040
|
-
className:
|
|
29038
|
+
className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.quickButton,
|
|
29041
29039
|
title: p.redoLabel ? t("pptx.toolbar.redoAction", { action: p.redoLabel }) : t("pptx.toolbar.redo"),
|
|
29042
29040
|
"aria-label": t("pptx.toolbar.redo"),
|
|
29043
29041
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuRedo, { className: "w-3.5 h-3.5" })
|
|
29044
29042
|
}
|
|
29045
29043
|
),
|
|
29046
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29044
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.separator })
|
|
29047
29045
|
] }),
|
|
29048
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
29049
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29046
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.fileGroup, children: [
|
|
29047
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.fileName, children: p.fileName || t(chunkG5GATDE4_js.TITLE_BAR_DEFAULT_FILE_KEY) }),
|
|
29050
29048
|
editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
29051
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29049
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.statusDot, "aria-hidden": "true", children: "\u2022" }),
|
|
29052
29050
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29053
29051
|
"span",
|
|
29054
29052
|
{
|
|
29055
|
-
className:
|
|
29056
|
-
|
|
29057
|
-
p.autosaveStatus?.state === "error" && p.autosaveEnabled &&
|
|
29058
|
-
p.autosaveStatus?.state === "saving" && p.autosaveEnabled &&
|
|
29053
|
+
className: chunkH5V24JVW_js.cn(
|
|
29054
|
+
chunkG5GATDE4_js.TITLE_BAR_CLASSES.statusText,
|
|
29055
|
+
p.autosaveStatus?.state === "error" && p.autosaveEnabled && chunkG5GATDE4_js.TITLE_BAR_CLASSES.statusError,
|
|
29056
|
+
p.autosaveStatus?.state === "saving" && p.autosaveEnabled && chunkG5GATDE4_js.TITLE_BAR_CLASSES.statusSaving
|
|
29059
29057
|
),
|
|
29060
29058
|
children: t(statusKey)
|
|
29061
29059
|
}
|
|
29062
29060
|
)
|
|
29063
29061
|
] })
|
|
29064
29062
|
] }),
|
|
29065
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29063
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_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: [
|
|
29066
29064
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
29067
29065
|
"div",
|
|
29068
29066
|
{
|
|
29069
|
-
className:
|
|
29070
|
-
|
|
29067
|
+
className: chunkH5V24JVW_js.cn(
|
|
29068
|
+
chunkG5GATDE4_js.TITLE_BAR_CLASSES.searchBox,
|
|
29071
29069
|
(searchFocused || p.findReplaceOpen) && "text-foreground bg-background"
|
|
29072
29070
|
),
|
|
29073
29071
|
children: [
|
|
29074
|
-
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSearch, { className:
|
|
29072
|
+
/* @__PURE__ */ jsxRuntime.jsx(lu.LuSearch, { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.searchIcon }),
|
|
29075
29073
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29076
29074
|
"input",
|
|
29077
29075
|
{
|
|
@@ -29128,7 +29126,7 @@ function TitleBar(p) {
|
|
|
29128
29126
|
) })
|
|
29129
29127
|
] })
|
|
29130
29128
|
] }) }),
|
|
29131
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
29129
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkG5GATDE4_js.TITLE_BAR_CLASSES.rightSpacer })
|
|
29132
29130
|
] });
|
|
29133
29131
|
}
|
|
29134
29132
|
function ViewerToolbarSection(props) {
|
|
@@ -29271,7 +29269,7 @@ function ViewerToolbarSection(props) {
|
|
|
29271
29269
|
insertHandlers.handleAddTable();
|
|
29272
29270
|
break;
|
|
29273
29271
|
case "chart":
|
|
29274
|
-
insertHandlers.handleAddChart(
|
|
29272
|
+
insertHandlers.handleAddChart(chunkG5GATDE4_js.DEFAULT_INSERT_CHART_TYPE);
|
|
29275
29273
|
break;
|
|
29276
29274
|
case "smartArt":
|
|
29277
29275
|
dialogs.setIsSmartArtDialogOpen(true);
|
|
@@ -29462,7 +29460,7 @@ function ViewerToolbarSection(props) {
|
|
|
29462
29460
|
onOpenFile,
|
|
29463
29461
|
onOpenRecentFile,
|
|
29464
29462
|
onCreatePresentation: (templateId) => {
|
|
29465
|
-
s.setSlides(
|
|
29463
|
+
s.setSlides(chunkG5GATDE4_js.createBackstagePresentation(templateId));
|
|
29466
29464
|
s.setActiveSlideIndex(0);
|
|
29467
29465
|
s.setSelectedElementId(null);
|
|
29468
29466
|
s.setSelectedElementIds([]);
|
|
@@ -29517,7 +29515,7 @@ function ViewerToolbarSection(props) {
|
|
|
29517
29515
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
29518
29516
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29519
29517
|
formatPainterActive: s.formatPainterActive,
|
|
29520
|
-
canActivateFormatPainter:
|
|
29518
|
+
canActivateFormatPainter: chunkG5GATDE4_js.hasCopyableFormat(selectedElement),
|
|
29521
29519
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29522
29520
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29523
29521
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29564,13 +29562,6 @@ function ViewerToolbarSection(props) {
|
|
|
29564
29562
|
)
|
|
29565
29563
|
] });
|
|
29566
29564
|
}
|
|
29567
|
-
function sanitizeMathMl(markup) {
|
|
29568
|
-
const purify = DOMPurify__default.default;
|
|
29569
|
-
if (typeof purify.sanitize !== "function") {
|
|
29570
|
-
return markup;
|
|
29571
|
-
}
|
|
29572
|
-
return purify.sanitize(markup, { USE_PROFILES: { mathMl: true, svg: true } });
|
|
29573
|
-
}
|
|
29574
29565
|
var TEMPLATES = [
|
|
29575
29566
|
{
|
|
29576
29567
|
label: "Fraction",
|
|
@@ -29635,9 +29626,9 @@ var TEMPLATES = [
|
|
|
29635
29626
|
];
|
|
29636
29627
|
var TEMPLATE_MATHML = TEMPLATES.map((tmpl) => {
|
|
29637
29628
|
try {
|
|
29638
|
-
const tmplOmml =
|
|
29639
|
-
const raw =
|
|
29640
|
-
return raw ? sanitizeMathMl(raw) : "";
|
|
29629
|
+
const tmplOmml = chunkG5GATDE4_js.convertLatexToOmml(tmpl.latex);
|
|
29630
|
+
const raw = chunkG5GATDE4_js.convertOmmlToMathMl(tmplOmml);
|
|
29631
|
+
return raw ? chunkG5GATDE4_js.sanitizeMathMl(raw) : "";
|
|
29641
29632
|
} catch {
|
|
29642
29633
|
return "";
|
|
29643
29634
|
}
|
|
@@ -29649,7 +29640,7 @@ function MathMlPreview({ mathml }) {
|
|
|
29649
29640
|
return;
|
|
29650
29641
|
}
|
|
29651
29642
|
if (mathml) {
|
|
29652
|
-
containerRef.current.innerHTML = sanitizeMathMl(mathml);
|
|
29643
|
+
containerRef.current.innerHTML = chunkG5GATDE4_js.sanitizeMathMl(mathml);
|
|
29653
29644
|
} else {
|
|
29654
29645
|
containerRef.current.innerHTML = "";
|
|
29655
29646
|
}
|
|
@@ -29670,12 +29661,12 @@ function EquationEditorDialog({
|
|
|
29670
29661
|
existingOmml
|
|
29671
29662
|
}) {
|
|
29672
29663
|
const { t } = reactI18next.useTranslation();
|
|
29673
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29664
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onClose);
|
|
29674
29665
|
const initialLatex = React14.useMemo(() => {
|
|
29675
29666
|
if (!existingOmml) {
|
|
29676
29667
|
return "";
|
|
29677
29668
|
}
|
|
29678
|
-
return
|
|
29669
|
+
return chunkG5GATDE4_js.convertOmmlToLatex(existingOmml);
|
|
29679
29670
|
}, [existingOmml]);
|
|
29680
29671
|
const [latex, setLatex] = React14.useState(initialLatex);
|
|
29681
29672
|
const deferredLatex = React14.useDeferredValue(latex);
|
|
@@ -29692,8 +29683,8 @@ function EquationEditorDialog({
|
|
|
29692
29683
|
return { mathml: "", omml: {} };
|
|
29693
29684
|
}
|
|
29694
29685
|
try {
|
|
29695
|
-
const ommlObj =
|
|
29696
|
-
const mathmlStr =
|
|
29686
|
+
const ommlObj = chunkG5GATDE4_js.convertLatexToOmml(deferredLatex);
|
|
29687
|
+
const mathmlStr = chunkG5GATDE4_js.convertOmmlToMathMl(ommlObj);
|
|
29697
29688
|
return { mathml: mathmlStr, omml: ommlObj };
|
|
29698
29689
|
} catch {
|
|
29699
29690
|
return { mathml: "", omml: {} };
|
|
@@ -29705,7 +29696,7 @@ function EquationEditorDialog({
|
|
|
29705
29696
|
}
|
|
29706
29697
|
let insertOmml = omml;
|
|
29707
29698
|
try {
|
|
29708
|
-
const fresh =
|
|
29699
|
+
const fresh = chunkG5GATDE4_js.convertLatexToOmml(latex);
|
|
29709
29700
|
if (fresh && Object.keys(fresh).length > 0) {
|
|
29710
29701
|
insertOmml = fresh;
|
|
29711
29702
|
}
|
|
@@ -29803,7 +29794,7 @@ function EquationEditorDialog({
|
|
|
29803
29794
|
{
|
|
29804
29795
|
type: "button",
|
|
29805
29796
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
29806
|
-
className:
|
|
29797
|
+
className: chunkH5V24JVW_js.cn(
|
|
29807
29798
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
29808
29799
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
29809
29800
|
),
|
|
@@ -29859,7 +29850,7 @@ var PREVIEW_ELEMENT_HEIGHT = 340;
|
|
|
29859
29850
|
var PREVIEW_TILE_WIDTH = 64;
|
|
29860
29851
|
var FALLBACK_ITEMS = ["1", "2", "3"];
|
|
29861
29852
|
function buildPreviewElement(layout) {
|
|
29862
|
-
const preset =
|
|
29853
|
+
const preset = chunkG5GATDE4_js.PRESETS.find((p) => p.layout === layout);
|
|
29863
29854
|
return {
|
|
29864
29855
|
id: `smartart-preview-${layout}`,
|
|
29865
29856
|
type: "smartArt",
|
|
@@ -29867,7 +29858,7 @@ function buildPreviewElement(layout) {
|
|
|
29867
29858
|
y: 0,
|
|
29868
29859
|
width: PREVIEW_ELEMENT_WIDTH,
|
|
29869
29860
|
height: PREVIEW_ELEMENT_HEIGHT,
|
|
29870
|
-
smartArtData:
|
|
29861
|
+
smartArtData: chunkG5GATDE4_js.buildSmartArtPresetData(layout, preset?.defaultItems ?? FALLBACK_ITEMS)
|
|
29871
29862
|
};
|
|
29872
29863
|
}
|
|
29873
29864
|
function getPreviewForLayout(layout) {
|
|
@@ -29902,17 +29893,17 @@ function InsertSmartArtDialog({
|
|
|
29902
29893
|
onInsert
|
|
29903
29894
|
}) {
|
|
29904
29895
|
const { t } = reactI18next.useTranslation();
|
|
29905
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29896
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onClose);
|
|
29906
29897
|
const [activeCategory, setActiveCategory] = React14.useState("list");
|
|
29907
29898
|
const [selectedLayout, setSelectedLayout] = React14.useState(null);
|
|
29908
29899
|
const dialogRef = React14.useRef(null);
|
|
29909
29900
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
29910
|
-
const filteredPresets =
|
|
29901
|
+
const filteredPresets = chunkG5GATDE4_js.PRESETS.filter((p) => p.category === activeCategory);
|
|
29911
29902
|
const handleInsert = React14.useCallback(() => {
|
|
29912
29903
|
if (!selectedLayout) {
|
|
29913
29904
|
return;
|
|
29914
29905
|
}
|
|
29915
|
-
const preset =
|
|
29906
|
+
const preset = chunkG5GATDE4_js.PRESETS.find((p) => p.layout === selectedLayout);
|
|
29916
29907
|
if (!preset) {
|
|
29917
29908
|
return;
|
|
29918
29909
|
}
|
|
@@ -29975,7 +29966,7 @@ function InsertSmartArtDialog({
|
|
|
29975
29966
|
{
|
|
29976
29967
|
className: "w-40 border-r border-border py-2",
|
|
29977
29968
|
"aria-label": t("pptx.insertSmartArt.categories"),
|
|
29978
|
-
children:
|
|
29969
|
+
children: chunkG5GATDE4_js.CATEGORIES.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29979
29970
|
"button",
|
|
29980
29971
|
{
|
|
29981
29972
|
type: "button",
|
|
@@ -29983,7 +29974,7 @@ function InsertSmartArtDialog({
|
|
|
29983
29974
|
setActiveCategory(cat.id);
|
|
29984
29975
|
setSelectedLayout(null);
|
|
29985
29976
|
},
|
|
29986
|
-
className:
|
|
29977
|
+
className: chunkH5V24JVW_js.cn(
|
|
29987
29978
|
"w-full text-left px-3 py-1.5 text-xs transition-colors",
|
|
29988
29979
|
activeCategory === cat.id ? "bg-primary text-white" : "text-foreground hover:bg-muted"
|
|
29989
29980
|
),
|
|
@@ -30011,7 +30002,7 @@ function InsertSmartArtDialog({
|
|
|
30011
30002
|
onInsert(preset.layout, preset.defaultItems);
|
|
30012
30003
|
onClose();
|
|
30013
30004
|
},
|
|
30014
|
-
className:
|
|
30005
|
+
className: chunkH5V24JVW_js.cn(
|
|
30015
30006
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
30016
30007
|
selectedLayout === preset.layout ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
30017
30008
|
),
|
|
@@ -30041,7 +30032,7 @@ function InsertSmartArtDialog({
|
|
|
30041
30032
|
type: "button",
|
|
30042
30033
|
onClick: handleInsert,
|
|
30043
30034
|
disabled: !selectedLayout,
|
|
30044
|
-
className:
|
|
30035
|
+
className: chunkH5V24JVW_js.cn(
|
|
30045
30036
|
"px-3 py-1.5 text-xs rounded transition-colors",
|
|
30046
30037
|
selectedLayout ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
30047
30038
|
),
|
|
@@ -30383,16 +30374,16 @@ function ViewerCanvasArea(props) {
|
|
|
30383
30374
|
if (mode === "present") {
|
|
30384
30375
|
presentation.handlePresentationAction(action);
|
|
30385
30376
|
} else if (action.url) {
|
|
30386
|
-
|
|
30377
|
+
chunkG5GATDE4_js.safeOpenUrl(action.url);
|
|
30387
30378
|
}
|
|
30388
30379
|
},
|
|
30389
30380
|
[mode, presentation]
|
|
30390
30381
|
);
|
|
30391
30382
|
const handleHyperlinkClick = React14.useCallback(
|
|
30392
30383
|
(url) => {
|
|
30393
|
-
if (
|
|
30384
|
+
if (chunkG5GATDE4_js.isPpactionUrl(url)) {
|
|
30394
30385
|
if (mode === "present") {
|
|
30395
|
-
const parsed =
|
|
30386
|
+
const parsed = chunkG5GATDE4_js.parsePpactionUrl(url);
|
|
30396
30387
|
if (parsed) {
|
|
30397
30388
|
const action = {
|
|
30398
30389
|
action: parsed.action,
|
|
@@ -30403,7 +30394,7 @@ function ViewerCanvasArea(props) {
|
|
|
30403
30394
|
}
|
|
30404
30395
|
return;
|
|
30405
30396
|
}
|
|
30406
|
-
|
|
30397
|
+
chunkG5GATDE4_js.safeOpenUrl(url);
|
|
30407
30398
|
},
|
|
30408
30399
|
[mode, presentation]
|
|
30409
30400
|
);
|
|
@@ -30430,7 +30421,7 @@ function ViewerCanvasArea(props) {
|
|
|
30430
30421
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30431
30422
|
}
|
|
30432
30423
|
}, [mode, presentation, s]);
|
|
30433
|
-
const swipe =
|
|
30424
|
+
const swipe = chunkH5V24JVW_js.useSwipeNavigation({
|
|
30434
30425
|
enabled: swipeEnabled,
|
|
30435
30426
|
onNext: handleSwipeNext,
|
|
30436
30427
|
onPrev: handleSwipePrev
|
|
@@ -30891,7 +30882,7 @@ function ThemeColorSchemeEditor({
|
|
|
30891
30882
|
onMinorFontChange
|
|
30892
30883
|
}) {
|
|
30893
30884
|
const { t } = reactI18next.useTranslation();
|
|
30894
|
-
const previewGrid = React14.useMemo(() =>
|
|
30885
|
+
const previewGrid = React14.useMemo(() => chunkG5GATDE4_js.buildThemeColorGrid(editColors), [editColors]);
|
|
30895
30886
|
const handleColorText = React14.useCallback(
|
|
30896
30887
|
(val) => {
|
|
30897
30888
|
if (activePickerKey && /^#[0-9a-fA-F]{6}$/.test(val)) {
|
|
@@ -30911,15 +30902,15 @@ function ThemeColorSchemeEditor({
|
|
|
30911
30902
|
disabled: !canEdit,
|
|
30912
30903
|
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`,
|
|
30913
30904
|
style: { backgroundColor: editColors[key] },
|
|
30914
|
-
title: `${
|
|
30915
|
-
"aria-label": `${
|
|
30905
|
+
title: `${chunkG5GATDE4_js.THEME_COLOR_LABELS[key]}: ${editColors[key]}`,
|
|
30906
|
+
"aria-label": `${chunkG5GATDE4_js.THEME_COLOR_LABELS[key]}: ${editColors[key]}`,
|
|
30916
30907
|
onClick: () => onSetActivePickerKey(activePickerKey === key ? null : key)
|
|
30917
30908
|
}
|
|
30918
30909
|
),
|
|
30919
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children:
|
|
30910
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children: chunkG5GATDE4_js.THEME_COLOR_LABELS[key] })
|
|
30920
30911
|
] }, key)) }),
|
|
30921
30912
|
activePickerKey && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2 rounded bg-background p-2", children: [
|
|
30922
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children:
|
|
30913
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children: chunkG5GATDE4_js.THEME_COLOR_LABELS[activePickerKey] }),
|
|
30923
30914
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30924
30915
|
"input",
|
|
30925
30916
|
{
|
|
@@ -31217,7 +31208,7 @@ function MobileDismissSheet({
|
|
|
31217
31208
|
className,
|
|
31218
31209
|
children
|
|
31219
31210
|
}) {
|
|
31220
|
-
const { dragY, handlers } =
|
|
31211
|
+
const { dragY, handlers } = chunkH5V24JVW_js.useSheetDismissDrag(onClose);
|
|
31221
31212
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31222
31213
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31223
31214
|
"button",
|
|
@@ -31486,7 +31477,7 @@ function ThemeThumbnail({
|
|
|
31486
31477
|
{
|
|
31487
31478
|
type: "button",
|
|
31488
31479
|
onClick,
|
|
31489
|
-
className:
|
|
31480
|
+
className: chunkH5V24JVW_js.cn(
|
|
31490
31481
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
31491
31482
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
31492
31483
|
),
|
|
@@ -32118,7 +32109,7 @@ function MobileBottomBar({
|
|
|
32118
32109
|
{
|
|
32119
32110
|
type: "button",
|
|
32120
32111
|
onClick,
|
|
32121
|
-
className:
|
|
32112
|
+
className: chunkH5V24JVW_js.cn(
|
|
32122
32113
|
"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",
|
|
32123
32114
|
active ? "text-primary" : "text-muted-foreground hover:text-foreground"
|
|
32124
32115
|
),
|
|
@@ -32166,7 +32157,7 @@ function MobileChromeOverlay(props) {
|
|
|
32166
32157
|
canEdit,
|
|
32167
32158
|
commentCount
|
|
32168
32159
|
} = props;
|
|
32169
|
-
const { keyboardInset, isKeyboardOpen } =
|
|
32160
|
+
const { keyboardInset, isKeyboardOpen } = chunkH5V24JVW_js.useKeyboardInsets();
|
|
32170
32161
|
const activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null;
|
|
32171
32162
|
const closeAllSheets = () => {
|
|
32172
32163
|
s.setIsSlidesPaneOpen(false);
|
|
@@ -32262,7 +32253,7 @@ function ToggleSwitch({
|
|
|
32262
32253
|
{
|
|
32263
32254
|
type: "button",
|
|
32264
32255
|
onClick: onToggle,
|
|
32265
|
-
className:
|
|
32256
|
+
className: chunkH5V24JVW_js.cn(
|
|
32266
32257
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
32267
32258
|
enabled ? "bg-primary" : "bg-muted-foreground/30"
|
|
32268
32259
|
),
|
|
@@ -32272,7 +32263,7 @@ function ToggleSwitch({
|
|
|
32272
32263
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32273
32264
|
"span",
|
|
32274
32265
|
{
|
|
32275
|
-
className:
|
|
32266
|
+
className: chunkH5V24JVW_js.cn(
|
|
32276
32267
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
32277
32268
|
enabled ? "translate-x-[18px]" : "translate-x-[3px]"
|
|
32278
32269
|
)
|
|
@@ -32299,7 +32290,7 @@ function SettingsDialog({
|
|
|
32299
32290
|
const [activeTab, setActiveTab] = React14.useState("general");
|
|
32300
32291
|
const [autoSave, setAutoSave] = React14.useState(true);
|
|
32301
32292
|
const { t } = reactI18next.useTranslation();
|
|
32302
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
32293
|
+
const { panelStyle, handlers: dragHandlers } = chunkH5V24JVW_js.useModalDismissDrag(onClose);
|
|
32303
32294
|
const handleKeyDown = React14.useCallback(
|
|
32304
32295
|
(e) => {
|
|
32305
32296
|
if (e.key === "Escape") {
|
|
@@ -32371,7 +32362,7 @@ function SettingsDialog({
|
|
|
32371
32362
|
{
|
|
32372
32363
|
type: "button",
|
|
32373
32364
|
onClick: () => setActiveTab(tab.id),
|
|
32374
|
-
className:
|
|
32365
|
+
className: chunkH5V24JVW_js.cn(
|
|
32375
32366
|
"px-3 py-2 text-xs font-medium transition-colors relative",
|
|
32376
32367
|
activeTab === tab.id ? "text-primary" : "text-muted-foreground hover:text-foreground"
|
|
32377
32368
|
),
|
|
@@ -32433,10 +32424,10 @@ function SettingsDialog({
|
|
|
32433
32424
|
}
|
|
32434
32425
|
)
|
|
32435
32426
|
] }),
|
|
32436
|
-
activeTab === "shortcuts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children:
|
|
32427
|
+
activeTab === "shortcuts" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: chunkH5V24JVW_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32437
32428
|
"div",
|
|
32438
32429
|
{
|
|
32439
|
-
className:
|
|
32430
|
+
className: chunkH5V24JVW_js.cn(
|
|
32440
32431
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
32441
32432
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
32442
32433
|
),
|
|
@@ -32481,7 +32472,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32481
32472
|
smartArt3D = false
|
|
32482
32473
|
} = props;
|
|
32483
32474
|
React14.useEffect(() => {
|
|
32484
|
-
const css =
|
|
32475
|
+
const css = chunkG5GATDE4_js.buildUserFontFaceStyles(fonts);
|
|
32485
32476
|
if (!css) {
|
|
32486
32477
|
return;
|
|
32487
32478
|
}
|
|
@@ -32502,7 +32493,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32502
32493
|
return;
|
|
32503
32494
|
}
|
|
32504
32495
|
void (async () => {
|
|
32505
|
-
const picked = await
|
|
32496
|
+
const picked = await chunkG5GATDE4_js.openPptxFile();
|
|
32506
32497
|
if (picked) {
|
|
32507
32498
|
setContent(picked.buffer);
|
|
32508
32499
|
}
|
|
@@ -32510,7 +32501,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32510
32501
|
}, [hostOpenFile]);
|
|
32511
32502
|
const handleOpenRecentFile = React14.useCallback((key) => {
|
|
32512
32503
|
void (async () => {
|
|
32513
|
-
const bytes = await
|
|
32504
|
+
const bytes = await chunkG5GATDE4_js.readBackstageRecentFile(key);
|
|
32514
32505
|
if (bytes) {
|
|
32515
32506
|
setContent(bytes);
|
|
32516
32507
|
}
|
|
@@ -32520,8 +32511,8 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32520
32511
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = React14.useState(false);
|
|
32521
32512
|
const [autosaveEnabled, setAutosaveEnabled] = React14.useState(true);
|
|
32522
32513
|
const [isShareDialogOpen, setIsShareDialogOpen] = React14.useState(false);
|
|
32523
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
32524
|
-
const state =
|
|
32514
|
+
const { reducedMotion, toggleReducedMotion } = chunkH5V24JVW_js.useReducedMotion();
|
|
32515
|
+
const state = chunkH5V24JVW_js.useViewerState({ content, canEdit });
|
|
32525
32516
|
const {
|
|
32526
32517
|
containerRef,
|
|
32527
32518
|
mode,
|
|
@@ -32536,10 +32527,10 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32536
32527
|
activeSlide,
|
|
32537
32528
|
selectedElement
|
|
32538
32529
|
} = state;
|
|
32539
|
-
const mobile =
|
|
32530
|
+
const mobile = chunkH5V24JVW_js.useIsMobile({ containerRef });
|
|
32540
32531
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
32541
|
-
const resizablePanels =
|
|
32542
|
-
const { gridSpacingPx, visibleSlideIndexes, slideSectionGroups, masterPseudoSlide } =
|
|
32532
|
+
const resizablePanels = chunkH5V24JVW_js.useResizablePanels();
|
|
32533
|
+
const { gridSpacingPx, visibleSlideIndexes, slideSectionGroups, masterPseudoSlide } = chunkH5V24JVW_js.useDerivedSlideState({
|
|
32543
32534
|
slides,
|
|
32544
32535
|
sections: state.sections,
|
|
32545
32536
|
customShows: state.customShows,
|
|
@@ -32561,11 +32552,11 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32561
32552
|
state.isDrawingRef
|
|
32562
32553
|
]
|
|
32563
32554
|
);
|
|
32564
|
-
const zoom =
|
|
32555
|
+
const zoom = chunkH5V24JVW_js.useZoomViewport({
|
|
32565
32556
|
canvasSize,
|
|
32566
32557
|
selectedElements: state.selectedElements
|
|
32567
32558
|
});
|
|
32568
|
-
const history =
|
|
32559
|
+
const history = chunkH5V24JVW_js.useEditorHistory({
|
|
32569
32560
|
slides,
|
|
32570
32561
|
canvasSize,
|
|
32571
32562
|
activeSlideIndex,
|
|
@@ -32587,7 +32578,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32587
32578
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
32588
32579
|
setHeaderFooter: state.setHeaderFooter
|
|
32589
32580
|
});
|
|
32590
|
-
const { presentation, annotations, actionSoundHandlerRef } =
|
|
32581
|
+
const { presentation, annotations, actionSoundHandlerRef } = chunkH5V24JVW_js.usePresentationSetup({
|
|
32591
32582
|
mode,
|
|
32592
32583
|
slides,
|
|
32593
32584
|
visibleSlideIndexes,
|
|
@@ -32601,7 +32592,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32601
32592
|
setSlides: state.setSlides,
|
|
32602
32593
|
history
|
|
32603
32594
|
});
|
|
32604
|
-
|
|
32595
|
+
chunkH5V24JVW_js.useTouchGestures({
|
|
32605
32596
|
targetRef: zoom.canvasViewportRef,
|
|
32606
32597
|
currentScale: zoom.scale,
|
|
32607
32598
|
callbacks: {
|
|
@@ -32623,7 +32614,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32623
32614
|
},
|
|
32624
32615
|
enabled: isTouchDevice
|
|
32625
32616
|
});
|
|
32626
|
-
const dialogs =
|
|
32617
|
+
const dialogs = chunkH5V24JVW_js.useViewerDialogs({
|
|
32627
32618
|
mode,
|
|
32628
32619
|
slides,
|
|
32629
32620
|
activeSlide,
|
|
@@ -32664,7 +32655,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32664
32655
|
zoom.handleZoomToFit();
|
|
32665
32656
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
32666
32657
|
}, [mode]);
|
|
32667
|
-
const editorOps =
|
|
32658
|
+
const editorOps = chunkH5V24JVW_js.useEditorOperations({
|
|
32668
32659
|
state,
|
|
32669
32660
|
history,
|
|
32670
32661
|
zoom,
|
|
@@ -32696,7 +32687,7 @@ var PowerPointViewer = React14.forwardRef(
|
|
|
32696
32687
|
autosaveStatus,
|
|
32697
32688
|
isEncryptedDialogOpen,
|
|
32698
32689
|
setIsEncryptedDialogOpen
|
|
32699
|
-
} =
|
|
32690
|
+
} = chunkH5V24JVW_js.useViewerIntegration({
|
|
32700
32691
|
state,
|
|
32701
32692
|
zoom,
|
|
32702
32693
|
history,
|
|
@@ -33055,7 +33046,7 @@ function CollaborationDocumentSync({
|
|
|
33055
33046
|
}
|
|
33056
33047
|
return bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
|
|
33057
33048
|
}, []);
|
|
33058
|
-
|
|
33049
|
+
chunkH5V24JVW_js.useYjsDocumentSync({
|
|
33059
33050
|
doc: collab?.doc ?? null,
|
|
33060
33051
|
slides,
|
|
33061
33052
|
templateElementsBySlideId,
|
|
@@ -33073,13 +33064,13 @@ function CollaborationFollowLayer({
|
|
|
33073
33064
|
slideCount
|
|
33074
33065
|
}) {
|
|
33075
33066
|
const collab = useCollaboration();
|
|
33076
|
-
const { followedClientId, followUser } =
|
|
33067
|
+
const { followedClientId, followUser } = chunkH5V24JVW_js.useFollowMode({
|
|
33077
33068
|
collab,
|
|
33078
33069
|
activeSlideIndex,
|
|
33079
33070
|
setActiveSlideIndex,
|
|
33080
33071
|
slideCount
|
|
33081
33072
|
});
|
|
33082
|
-
|
|
33073
|
+
chunkH5V24JVW_js.useBroadcastFollower({
|
|
33083
33074
|
collab,
|
|
33084
33075
|
activeSlideIndex,
|
|
33085
33076
|
setActiveSlideIndex,
|