pptx-react-viewer 3.5.3 → 3.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AiChatPanel-L2HGGEND.mjs → AiChatPanel-CCJNQGER.mjs} +3 -3
- package/dist/AiChatPanel-CCJNQGER.mjs.br +0 -0
- package/dist/AiChatPanel-CCJNQGER.mjs.gz +0 -0
- package/dist/{AiChatPanel-ZEM3ZVA6.js → AiChatPanel-LPZWDNVU.js} +24 -24
- package/dist/AiChatPanel-LPZWDNVU.js.br +0 -0
- package/dist/AiChatPanel-LPZWDNVU.js.gz +0 -0
- package/dist/{Area3DChartScene-I7LMTNK5.js → Area3DChartScene-LJCWBNQ3.js} +2 -2
- package/dist/Area3DChartScene-LJCWBNQ3.js.br +0 -0
- package/dist/Area3DChartScene-LJCWBNQ3.js.gz +0 -0
- package/dist/{Area3DChartScene-EYNCHRB3.mjs → Area3DChartScene-P6YM6ZL7.mjs} +1 -1
- package/dist/Area3DChartScene-P6YM6ZL7.mjs.br +0 -0
- package/dist/Area3DChartScene-P6YM6ZL7.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-VPKQDPIO.js → Bar3DChartScene-7DNQ4X5T.js} +2 -2
- package/dist/Bar3DChartScene-7DNQ4X5T.js.br +1 -0
- package/dist/Bar3DChartScene-7DNQ4X5T.js.gz +0 -0
- package/dist/{Bar3DChartScene-6HQ6QWNB.mjs → Bar3DChartScene-DIVOJURZ.mjs} +1 -1
- package/dist/Bar3DChartScene-DIVOJURZ.mjs.br +0 -0
- package/dist/Bar3DChartScene-DIVOJURZ.mjs.gz +0 -0
- package/dist/{Line3DChartScene-VV362RMX.js → Line3DChartScene-UF6DHP36.js} +2 -2
- package/dist/Line3DChartScene-UF6DHP36.js.br +0 -0
- package/dist/Line3DChartScene-UF6DHP36.js.gz +0 -0
- package/dist/{Line3DChartScene-QYBKXNOD.mjs → Line3DChartScene-ZZVNUKIJ.mjs} +1 -1
- package/dist/Line3DChartScene-ZZVNUKIJ.mjs.br +0 -0
- package/dist/Line3DChartScene-ZZVNUKIJ.mjs.gz +0 -0
- package/dist/{Model3DScene-XA57KXA5.js → Model3DScene-C7MZ22DH.js} +2 -2
- package/dist/Model3DScene-C7MZ22DH.js.br +0 -0
- package/dist/Model3DScene-C7MZ22DH.js.gz +0 -0
- package/dist/{Model3DScene-YTLWTG52.mjs → Model3DScene-XXMAAKBR.mjs} +1 -1
- package/dist/Model3DScene-XXMAAKBR.mjs.br +0 -0
- package/dist/Model3DScene-XXMAAKBR.mjs.gz +0 -0
- package/dist/{PieChart3DScene-INBL4F5Z.mjs → PieChart3DScene-7LX3IL2Q.mjs} +1 -1
- package/dist/PieChart3DScene-7LX3IL2Q.mjs.br +0 -0
- package/dist/PieChart3DScene-7LX3IL2Q.mjs.gz +0 -0
- package/dist/{PieChart3DScene-IFZMTN5H.js → PieChart3DScene-N2Y25VG5.js} +2 -2
- package/dist/PieChart3DScene-N2Y25VG5.js.br +0 -0
- package/dist/PieChart3DScene-N2Y25VG5.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-EV6DBPJS.mjs → SurfaceChart3DScene-ADA7NUIW.mjs} +1 -1
- package/dist/SurfaceChart3DScene-ADA7NUIW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ADA7NUIW.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-FRSZVIVB.js → SurfaceChart3DScene-WXJHYOGJ.js} +2 -2
- package/dist/SurfaceChart3DScene-WXJHYOGJ.js.br +0 -0
- package/dist/SurfaceChart3DScene-WXJHYOGJ.js.gz +0 -0
- package/dist/{chunk-SIM2LXO2.js → chunk-2FMQ7M3L.js} +430 -430
- package/dist/chunk-2FMQ7M3L.js.br +0 -0
- package/dist/chunk-2FMQ7M3L.js.gz +0 -0
- package/dist/{chunk-3WM5TUY7.mjs → chunk-EVVWCF2M.mjs} +2 -2
- package/dist/chunk-EVVWCF2M.mjs.br +0 -0
- package/dist/chunk-EVVWCF2M.mjs.gz +0 -0
- package/dist/{chunk-PPL3WBC7.js → chunk-HHJZK26I.js} +1180 -1180
- package/dist/chunk-HHJZK26I.js.br +0 -0
- package/dist/chunk-HHJZK26I.js.gz +0 -0
- package/dist/{chunk-MSRRBA7G.mjs → chunk-IVPT3U5C.mjs} +1 -1
- package/dist/chunk-IVPT3U5C.mjs.br +0 -0
- package/dist/chunk-IVPT3U5C.mjs.gz +0 -0
- package/dist/{chunk-7AL6KAFX.mjs → chunk-IWQSAKPM.mjs} +12 -12
- package/dist/chunk-IWQSAKPM.mjs.br +0 -0
- package/dist/{chunk-7AL6KAFX.mjs.gz → chunk-IWQSAKPM.mjs.gz} +0 -0
- package/dist/{chunk-QPHGHUUJ.mjs → chunk-NM652EZS.mjs} +56 -1
- package/dist/chunk-NM652EZS.mjs.br +0 -0
- package/dist/{chunk-QPHGHUUJ.mjs.gz → chunk-NM652EZS.mjs.gz} +0 -0
- package/dist/{chunk-KOLCCOTS.mjs → chunk-U52MKWVA.mjs} +1 -1
- package/dist/chunk-U52MKWVA.mjs.br +0 -0
- package/dist/chunk-U52MKWVA.mjs.gz +0 -0
- package/dist/{chunk-BBSFZLYI.js → chunk-UOMFINNJ.js} +5 -5
- package/dist/chunk-UOMFINNJ.js.br +0 -0
- package/dist/chunk-UOMFINNJ.js.gz +0 -0
- package/dist/{chunk-QA573RUB.js → chunk-UTMTXJGM.js} +160 -160
- package/dist/chunk-UTMTXJGM.js.br +0 -0
- package/dist/chunk-UTMTXJGM.js.gz +0 -0
- package/dist/{chunk-HHDPQJF3.js → chunk-YQOK4E2A.js} +56 -1
- package/dist/chunk-YQOK4E2A.js.br +0 -0
- package/dist/{chunk-HHDPQJF3.js.gz → chunk-YQOK4E2A.js.gz} +0 -0
- package/dist/index.js +45 -45
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-L2HGGEND.mjs.br +0 -0
- package/dist/AiChatPanel-L2HGGEND.mjs.gz +0 -0
- package/dist/AiChatPanel-ZEM3ZVA6.js.br +0 -0
- package/dist/AiChatPanel-ZEM3ZVA6.js.gz +0 -0
- package/dist/Area3DChartScene-EYNCHRB3.mjs.br +0 -2
- package/dist/Area3DChartScene-EYNCHRB3.mjs.gz +0 -0
- package/dist/Area3DChartScene-I7LMTNK5.js.br +0 -0
- package/dist/Area3DChartScene-I7LMTNK5.js.gz +0 -0
- package/dist/Bar3DChartScene-6HQ6QWNB.mjs.br +0 -0
- package/dist/Bar3DChartScene-6HQ6QWNB.mjs.gz +0 -0
- package/dist/Bar3DChartScene-VPKQDPIO.js.br +0 -0
- package/dist/Bar3DChartScene-VPKQDPIO.js.gz +0 -0
- package/dist/Line3DChartScene-QYBKXNOD.mjs.br +0 -2
- package/dist/Line3DChartScene-QYBKXNOD.mjs.gz +0 -0
- package/dist/Line3DChartScene-VV362RMX.js.br +0 -0
- package/dist/Line3DChartScene-VV362RMX.js.gz +0 -0
- package/dist/Model3DScene-XA57KXA5.js.br +0 -0
- package/dist/Model3DScene-XA57KXA5.js.gz +0 -0
- package/dist/Model3DScene-YTLWTG52.mjs.br +0 -0
- package/dist/Model3DScene-YTLWTG52.mjs.gz +0 -0
- package/dist/PieChart3DScene-IFZMTN5H.js.br +0 -0
- package/dist/PieChart3DScene-IFZMTN5H.js.gz +0 -0
- package/dist/PieChart3DScene-INBL4F5Z.mjs.br +0 -0
- package/dist/PieChart3DScene-INBL4F5Z.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-EV6DBPJS.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-EV6DBPJS.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-FRSZVIVB.js.br +0 -0
- package/dist/SurfaceChart3DScene-FRSZVIVB.js.gz +0 -0
- package/dist/chunk-3WM5TUY7.mjs.br +0 -0
- package/dist/chunk-3WM5TUY7.mjs.gz +0 -0
- package/dist/chunk-7AL6KAFX.mjs.br +0 -0
- package/dist/chunk-BBSFZLYI.js.br +0 -0
- package/dist/chunk-BBSFZLYI.js.gz +0 -0
- package/dist/chunk-HHDPQJF3.js.br +0 -0
- package/dist/chunk-KOLCCOTS.mjs.br +0 -0
- package/dist/chunk-KOLCCOTS.mjs.gz +0 -0
- package/dist/chunk-MSRRBA7G.mjs.br +0 -0
- package/dist/chunk-MSRRBA7G.mjs.gz +0 -0
- package/dist/chunk-PPL3WBC7.js.br +0 -0
- package/dist/chunk-PPL3WBC7.js.gz +0 -0
- package/dist/chunk-QA573RUB.js.br +0 -0
- package/dist/chunk-QA573RUB.js.gz +0 -0
- package/dist/chunk-QPHGHUUJ.mjs.br +0 -0
- package/dist/chunk-SIM2LXO2.js.br +0 -0
- package/dist/chunk-SIM2LXO2.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYQOK4E2A_js = require('./chunk-YQOK4E2A.js');
|
|
4
4
|
var chunkUTIMT5CZ_js = require('./chunk-UTIMT5CZ.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkYQOK4E2A_js.getAnimationInitialStyle(preset, nativeAnimation);
|
|
19
19
|
}
|
|
20
20
|
function cn(...inputs) {
|
|
21
21
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -23,7 +23,7 @@ function cn(...inputs) {
|
|
|
23
23
|
|
|
24
24
|
// src/viewer/utils/clone.ts
|
|
25
25
|
function cloneHistorySnapshot2(snapshot) {
|
|
26
|
-
return
|
|
26
|
+
return chunkYQOK4E2A_js.cloneHistorySnapshot(snapshot);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/viewer/constants/scalar.ts
|
|
@@ -61,7 +61,7 @@ var TOOLBAR_SECTIONS = [
|
|
|
61
61
|
{ id: "view", labelKey: "pptx.ribbon.tab.view" },
|
|
62
62
|
{ id: "help", labelKey: "pptx.ribbon.tab.help" }
|
|
63
63
|
];
|
|
64
|
-
var SHORTCUT_REFERENCE_ITEMS =
|
|
64
|
+
var SHORTCUT_REFERENCE_ITEMS = chunkYQOK4E2A_js.VIEWER_SHORTCUT_REFERENCE;
|
|
65
65
|
|
|
66
66
|
// src/viewer/constants/theme.ts
|
|
67
67
|
var THEME_COLOR_SWATCHES = [
|
|
@@ -105,7 +105,7 @@ var GLYPH_COMPONENTS = {
|
|
|
105
105
|
plus: lu.LuPlus,
|
|
106
106
|
triangle: lu.LuTriangle
|
|
107
107
|
};
|
|
108
|
-
var SHAPE_PRESETS =
|
|
108
|
+
var SHAPE_PRESETS = chunkYQOK4E2A_js.SHAPE_PRESET_DEFS.map(
|
|
109
109
|
(def) => ({
|
|
110
110
|
type: def.type,
|
|
111
111
|
label: def.label,
|
|
@@ -130,7 +130,7 @@ var ARROW_SIZE_OPTIONS = [
|
|
|
130
130
|
{ value: "med", label: "Medium", i18nKey: "pptx.connectorOptions.sizeMedium" },
|
|
131
131
|
{ value: "lg", label: "Large", i18nKey: "pptx.connectorOptions.sizeLarge" }
|
|
132
132
|
];
|
|
133
|
-
var STROKE_DASH_OPTIONS2 =
|
|
133
|
+
var STROKE_DASH_OPTIONS2 = chunkYQOK4E2A_js.STROKE_DASH_OPTIONS;
|
|
134
134
|
|
|
135
135
|
// src/viewer/utils/shape-types.tsx
|
|
136
136
|
function getShapeType(shapeType) {
|
|
@@ -239,7 +239,7 @@ function isConnectorOrLineElement(element) {
|
|
|
239
239
|
if (element.type === "connector") {
|
|
240
240
|
return true;
|
|
241
241
|
}
|
|
242
|
-
if (!
|
|
242
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
243
243
|
return false;
|
|
244
244
|
}
|
|
245
245
|
const st = getShapeType(element.shapeType);
|
|
@@ -248,17 +248,17 @@ function isConnectorOrLineElement(element) {
|
|
|
248
248
|
|
|
249
249
|
// src/viewer/utils/image-style.ts
|
|
250
250
|
function getImageMaskStyle(element) {
|
|
251
|
-
if (!
|
|
251
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
252
252
|
return void 0;
|
|
253
253
|
}
|
|
254
|
-
const geometry =
|
|
254
|
+
const geometry = chunkYQOK4E2A_js.resolveShapeGeometry(element);
|
|
255
255
|
if (geometry.kind === "borderRadius") {
|
|
256
256
|
return { borderRadius: geometry.radius };
|
|
257
257
|
}
|
|
258
258
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
259
259
|
}
|
|
260
260
|
function getImageRenderStyle(element) {
|
|
261
|
-
const fit =
|
|
261
|
+
const fit = chunkYQOK4E2A_js.getImageFitStyle(element);
|
|
262
262
|
return {
|
|
263
263
|
// A translated/scaled crop must be masked by its stationary wrapper, not
|
|
264
264
|
// by the moving bitmap itself.
|
|
@@ -275,7 +275,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
function getImageSurfaceStyle(element) {
|
|
278
|
-
const fill =
|
|
278
|
+
const fill = chunkYQOK4E2A_js.hasShapeProperties(element) ? chunkYQOK4E2A_js.getComputedFillStyle(element) : void 0;
|
|
279
279
|
return {
|
|
280
280
|
position: "absolute",
|
|
281
281
|
inset: 0,
|
|
@@ -288,13 +288,13 @@ function getImageSurfaceStyle(element) {
|
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
290
|
function getCropShapeClipPath2(element) {
|
|
291
|
-
if (!
|
|
291
|
+
if (!chunkYQOK4E2A_js.isImageLikeElement(element)) {
|
|
292
292
|
return void 0;
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return chunkYQOK4E2A_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
295
295
|
}
|
|
296
296
|
function getImageTilingStyle2(element) {
|
|
297
|
-
return
|
|
297
|
+
return chunkYQOK4E2A_js.getImageTilingStyle(element);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -436,7 +436,7 @@ function VideoWithMetadata({
|
|
|
436
436
|
{
|
|
437
437
|
ref: mediaRef,
|
|
438
438
|
className: "w-full h-full pointer-events-auto",
|
|
439
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
439
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkYQOK4E2A_js.getImageFitStyle(element),
|
|
440
440
|
controls: showTransport,
|
|
441
441
|
preload: "metadata",
|
|
442
442
|
playsInline: true,
|
|
@@ -509,7 +509,7 @@ function PresentationMediaController({
|
|
|
509
509
|
}
|
|
510
510
|
};
|
|
511
511
|
}, []);
|
|
512
|
-
const { volume: playbackVolume, playbackRate } =
|
|
512
|
+
const { volume: playbackVolume, playbackRate } = chunkYQOK4E2A_js.mediaPlaybackAttributes({
|
|
513
513
|
loop: element.loop,
|
|
514
514
|
volume: element.volume,
|
|
515
515
|
playbackSpeed: element.playbackSpeed
|
|
@@ -644,7 +644,7 @@ function PresentationMediaController({
|
|
|
644
644
|
}
|
|
645
645
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
646
646
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
647
|
-
if (
|
|
647
|
+
if (chunkYQOK4E2A_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
648
648
|
return;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
@@ -723,17 +723,17 @@ function Badge({
|
|
|
723
723
|
"div",
|
|
724
724
|
{
|
|
725
725
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
726
|
-
...{ [
|
|
726
|
+
...{ [chunkYQOK4E2A_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
727
727
|
children: [
|
|
728
728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
729
729
|
FallbackIcon,
|
|
730
730
|
{
|
|
731
|
-
paths:
|
|
731
|
+
paths: chunkYQOK4E2A_js.mediaFallbackIcon(visual, element.mediaType),
|
|
732
732
|
size: isMissing ? 32 : 48,
|
|
733
733
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
734
734
|
}
|
|
735
735
|
),
|
|
736
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
736
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkYQOK4E2A_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
737
737
|
]
|
|
738
738
|
}
|
|
739
739
|
);
|
|
@@ -750,17 +750,17 @@ function Placeholder({
|
|
|
750
750
|
"div",
|
|
751
751
|
{
|
|
752
752
|
className: `w-full h-full flex flex-col items-center justify-center gap-1 pointer-events-none rounded ${isMissing ? "bg-black/30 border border-dashed border-white/20" : element.mediaType === "audio" ? "bg-black/10" : "bg-black/20"}`,
|
|
753
|
-
...{ [
|
|
753
|
+
...{ [chunkYQOK4E2A_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
754
754
|
children: [
|
|
755
755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
756
756
|
FallbackIcon,
|
|
757
757
|
{
|
|
758
|
-
paths:
|
|
758
|
+
paths: chunkYQOK4E2A_js.mediaFallbackIcon(visual, element.mediaType),
|
|
759
759
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
760
760
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
761
761
|
}
|
|
762
762
|
),
|
|
763
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
763
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkYQOK4E2A_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
764
764
|
]
|
|
765
765
|
}
|
|
766
766
|
);
|
|
@@ -770,7 +770,7 @@ function renderMediaFallback({
|
|
|
770
770
|
posterUrl,
|
|
771
771
|
surface
|
|
772
772
|
}) {
|
|
773
|
-
const visual =
|
|
773
|
+
const visual = chunkYQOK4E2A_js.mediaFallbackVisual(surface, {
|
|
774
774
|
hasPoster: Boolean(posterUrl),
|
|
775
775
|
missing: element.mediaMissing === true
|
|
776
776
|
});
|
|
@@ -782,7 +782,7 @@ function renderMediaFallback({
|
|
|
782
782
|
src: posterUrl,
|
|
783
783
|
alt: visual.dimPoster ? chunkUTIMT5CZ_js.translationsEn["pptx.media.posterAlt"] : chunkUTIMT5CZ_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
784
784
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
785
|
-
style:
|
|
785
|
+
style: chunkYQOK4E2A_js.getImageFitStyle(element)
|
|
786
786
|
}
|
|
787
787
|
),
|
|
788
788
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -800,7 +800,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
800
800
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
801
801
|
const trimFragment = buildTrimFragment(element);
|
|
802
802
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
803
|
-
const shouldLoop =
|
|
803
|
+
const shouldLoop = chunkYQOK4E2A_js.mediaPlaybackAttributes(element).loop;
|
|
804
804
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
805
805
|
const isFullScreen = options?.fullScreen === true;
|
|
806
806
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -883,20 +883,20 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
883
883
|
|
|
884
884
|
// src/viewer/utils/text-utils.tsx
|
|
885
885
|
function getTextStyleForElement(element, fallbackColor) {
|
|
886
|
-
return
|
|
886
|
+
return chunkYQOK4E2A_js.buildTextBlockStyle(element, { fallbackColor });
|
|
887
887
|
}
|
|
888
888
|
|
|
889
889
|
// src/viewer/utils/text-layout.tsx
|
|
890
890
|
function getTextLayoutStyle(element) {
|
|
891
|
-
if (!
|
|
891
|
+
if (!chunkYQOK4E2A_js.hasTextProperties(element)) {
|
|
892
892
|
return {};
|
|
893
893
|
}
|
|
894
|
-
const writingMode =
|
|
895
|
-
const textOrientation =
|
|
896
|
-
const verticalDirection =
|
|
894
|
+
const writingMode = chunkYQOK4E2A_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
895
|
+
const textOrientation = chunkYQOK4E2A_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
896
|
+
const verticalDirection = chunkYQOK4E2A_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
897
897
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
898
898
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
899
|
-
const hasParagraphIndents =
|
|
899
|
+
const hasParagraphIndents = chunkYQOK4E2A_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
900
900
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
901
901
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
902
902
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -905,7 +905,7 @@ function getTextLayoutStyle(element) {
|
|
|
905
905
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
906
906
|
return {
|
|
907
907
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
908
|
-
...
|
|
908
|
+
...chunkYQOK4E2A_js.buildTextBodyLayoutStyle(element),
|
|
909
909
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
910
910
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
911
911
|
paddingTop: bodyTop,
|
|
@@ -933,7 +933,7 @@ function getTextLayoutStyle(element) {
|
|
|
933
933
|
|
|
934
934
|
// src/viewer/utils/text-effects.tsx
|
|
935
935
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
936
|
-
return
|
|
936
|
+
return chunkYQOK4E2A_js.buildTextBody3DSceneStyle(textStyle);
|
|
937
937
|
}
|
|
938
938
|
|
|
939
939
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1118,13 +1118,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1118
1118
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1119
1119
|
return renderedSegments;
|
|
1120
1120
|
}
|
|
1121
|
-
const paraKey = `${elementId}${
|
|
1121
|
+
const paraKey = `${elementId}${chunkYQOK4E2A_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1122
1122
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1123
1123
|
if (paraState) {
|
|
1124
1124
|
const style = buildAnimStyle(paraState);
|
|
1125
1125
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1126
1126
|
}
|
|
1127
|
-
const spec =
|
|
1127
|
+
const spec = chunkYQOK4E2A_js.buildTextBuildSpec(
|
|
1128
1128
|
elementId,
|
|
1129
1129
|
paraIndex,
|
|
1130
1130
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1142,7 +1142,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1142
1142
|
"span",
|
|
1143
1143
|
{
|
|
1144
1144
|
"data-anim-id": span.animId,
|
|
1145
|
-
style:
|
|
1145
|
+
style: chunkYQOK4E2A_js.textBuildSpanStyle(span),
|
|
1146
1146
|
children: content
|
|
1147
1147
|
},
|
|
1148
1148
|
span.animId
|
|
@@ -1150,7 +1150,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1150
1150
|
});
|
|
1151
1151
|
}
|
|
1152
1152
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle) {
|
|
1153
|
-
const [lineLayout] =
|
|
1153
|
+
const [lineLayout] = chunkYQOK4E2A_js.buildRunTabLines(line, ctx, nestedStyle);
|
|
1154
1154
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", whiteSpace: "nowrap" }, children: lineLayout.pieces.map((piece, i) => {
|
|
1155
1155
|
const key = `${keyPrefix}-tab-${i}`;
|
|
1156
1156
|
return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
|
|
@@ -1163,7 +1163,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1163
1163
|
if (!needsScriptFonts || !text) {
|
|
1164
1164
|
return text;
|
|
1165
1165
|
}
|
|
1166
|
-
const pieces =
|
|
1166
|
+
const pieces = chunkYQOK4E2A_js.splitRunByScriptFont(
|
|
1167
1167
|
text,
|
|
1168
1168
|
scriptFonts,
|
|
1169
1169
|
baseFontFamily,
|
|
@@ -1180,7 +1180,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1180
1180
|
if (!metric || !text) {
|
|
1181
1181
|
return inner(text, keyPrefix);
|
|
1182
1182
|
}
|
|
1183
|
-
const pieces =
|
|
1183
|
+
const pieces = chunkYQOK4E2A_js.splitRunForMetrics(text, metric.font);
|
|
1184
1184
|
if (pieces.length <= 1) {
|
|
1185
1185
|
return inner(text, keyPrefix);
|
|
1186
1186
|
}
|
|
@@ -1189,7 +1189,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1189
1189
|
{
|
|
1190
1190
|
style: {
|
|
1191
1191
|
...metric.nestedStyle,
|
|
1192
|
-
letterSpacing:
|
|
1192
|
+
letterSpacing: chunkYQOK4E2A_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1193
1193
|
},
|
|
1194
1194
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1195
1195
|
},
|
|
@@ -1276,8 +1276,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
1278
1278
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1279
|
-
const mathml =
|
|
1280
|
-
const safeMathml = mathml ?
|
|
1279
|
+
const mathml = chunkYQOK4E2A_js.convertOmmlToMathMl(equationXml);
|
|
1280
|
+
const safeMathml = mathml ? chunkYQOK4E2A_js.sanitizeMathMl(mathml) : "";
|
|
1281
1281
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1282
1282
|
"span",
|
|
1283
1283
|
{
|
|
@@ -1405,7 +1405,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1405
1405
|
const segmentStyle = segment?.style ?? {};
|
|
1406
1406
|
const textValue = run.text;
|
|
1407
1407
|
const lines = textValue.split("\n");
|
|
1408
|
-
const resolvedSegmentColor =
|
|
1408
|
+
const resolvedSegmentColor = chunkYQOK4E2A_js.normalizeHexColor(
|
|
1409
1409
|
segmentStyle.color || element.textStyle?.color,
|
|
1410
1410
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1411
1411
|
);
|
|
@@ -1413,16 +1413,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1413
1413
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1414
1414
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1415
1415
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1416
|
-
const baseFontSize = rawFontSize *
|
|
1416
|
+
const baseFontSize = rawFontSize * chunkYQOK4E2A_js.resolveAutoFitFontScale(element.textStyle);
|
|
1417
1417
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1418
|
-
const fontKerning =
|
|
1418
|
+
const fontKerning = chunkYQOK4E2A_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1419
1419
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1420
|
-
const baseFontFamily = rawFontFamily ?
|
|
1420
|
+
const baseFontFamily = rawFontFamily ? chunkYQOK4E2A_js.getSubstituteFontFamily(
|
|
1421
1421
|
rawFontFamily,
|
|
1422
|
-
|
|
1422
|
+
chunkYQOK4E2A_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1423
1423
|
) : DEFAULT_FONT_FAMILY2;
|
|
1424
|
-
const scriptFonts =
|
|
1425
|
-
const needsScriptFonts =
|
|
1424
|
+
const scriptFonts = chunkYQOK4E2A_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1425
|
+
const needsScriptFonts = chunkYQOK4E2A_js.hasDistinctScriptFonts(scriptFonts);
|
|
1426
1426
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1427
1427
|
const metricFont = {
|
|
1428
1428
|
fontFamily: baseFontFamily,
|
|
@@ -1430,7 +1430,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1430
1430
|
bold: Boolean(segmentStyle.bold),
|
|
1431
1431
|
italic: Boolean(segmentStyle.italic)
|
|
1432
1432
|
};
|
|
1433
|
-
const nestedStyle =
|
|
1433
|
+
const nestedStyle = chunkYQOK4E2A_js.nestedTextDecorationStyle(run.style);
|
|
1434
1434
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1435
1435
|
const spanStyle = { ...run.style };
|
|
1436
1436
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1438,11 +1438,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1438
1438
|
spanStyle.fontFamily = baseFontFamily;
|
|
1439
1439
|
spanStyle.verticalAlign = baselineShift;
|
|
1440
1440
|
spanStyle.fontKerning = fontKerning;
|
|
1441
|
-
spanStyle.letterSpacing =
|
|
1441
|
+
spanStyle.letterSpacing = chunkYQOK4E2A_js.pieceLetterSpacing(
|
|
1442
1442
|
authoredLetterSpacing,
|
|
1443
|
-
|
|
1443
|
+
chunkYQOK4E2A_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1444
1444
|
);
|
|
1445
|
-
const hollow =
|
|
1445
|
+
const hollow = chunkYQOK4E2A_js.hollowTextFillStyle(segmentStyle, {
|
|
1446
1446
|
color: resolvedSegmentColor,
|
|
1447
1447
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1448
1448
|
});
|
|
@@ -1463,7 +1463,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1463
1463
|
scriptFonts,
|
|
1464
1464
|
baseFontFamily,
|
|
1465
1465
|
findHighlights,
|
|
1466
|
-
|
|
1466
|
+
chunkYQOK4E2A_js.buildTabContext(
|
|
1467
1467
|
element.textStyle?.tabStops,
|
|
1468
1468
|
element.textStyle?.defaultTabSize,
|
|
1469
1469
|
baseFontSize,
|
|
@@ -1489,7 +1489,7 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1489
1489
|
] });
|
|
1490
1490
|
}
|
|
1491
1491
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt) {
|
|
1492
|
-
if (!
|
|
1492
|
+
if (!chunkYQOK4E2A_js.hasTextProperties(element)) {
|
|
1493
1493
|
return emptyFallback || null;
|
|
1494
1494
|
}
|
|
1495
1495
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1499,7 +1499,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1499
1499
|
}
|
|
1500
1500
|
return element.text || emptyFallback || "";
|
|
1501
1501
|
}
|
|
1502
|
-
const paragraphs =
|
|
1502
|
+
const paragraphs = chunkYQOK4E2A_js.buildParagraphs(element, fieldContext, segmentOverrides);
|
|
1503
1503
|
const ctx = {
|
|
1504
1504
|
element,
|
|
1505
1505
|
fallbackColor,
|
|
@@ -1625,13 +1625,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1625
1625
|
);
|
|
1626
1626
|
}
|
|
1627
1627
|
function getDuotoneColors(element) {
|
|
1628
|
-
if (!
|
|
1628
|
+
if (!chunkYQOK4E2A_js.isImageLikeElement(element)) {
|
|
1629
1629
|
return void 0;
|
|
1630
1630
|
}
|
|
1631
1631
|
return element.imageEffects?.duotone;
|
|
1632
1632
|
}
|
|
1633
1633
|
function buildLineShadowCss(element) {
|
|
1634
|
-
if (!
|
|
1634
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
1635
1635
|
return void 0;
|
|
1636
1636
|
}
|
|
1637
1637
|
const ss = element.shapeStyle;
|
|
@@ -1642,13 +1642,13 @@ function buildLineShadowCss(element) {
|
|
|
1642
1642
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1643
1643
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1644
1644
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1645
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1646
|
-
|
|
1645
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkYQOK4E2A_js.colorWithOpacity(
|
|
1646
|
+
chunkYQOK4E2A_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1647
1647
|
opacity
|
|
1648
1648
|
)}`;
|
|
1649
1649
|
}
|
|
1650
1650
|
function buildLineGlowFilter(element) {
|
|
1651
|
-
if (!
|
|
1651
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
1652
1652
|
return void 0;
|
|
1653
1653
|
}
|
|
1654
1654
|
const ss = element.shapeStyle;
|
|
@@ -1657,22 +1657,22 @@ function buildLineGlowFilter(element) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1659
1659
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1660
|
-
const glowCol =
|
|
1660
|
+
const glowCol = chunkYQOK4E2A_js.colorWithOpacity(chunkYQOK4E2A_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1661
1661
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1662
1662
|
}
|
|
1663
1663
|
function getDagDuotoneFilterId(elementId) {
|
|
1664
1664
|
return `dag-duotone-${elementId}`;
|
|
1665
1665
|
}
|
|
1666
1666
|
function hasDagDuotoneEffect(element) {
|
|
1667
|
-
if (!
|
|
1667
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
1668
1668
|
return false;
|
|
1669
1669
|
}
|
|
1670
1670
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1671
1671
|
}
|
|
1672
1672
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1673
1673
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1674
|
-
const c1 =
|
|
1675
|
-
const c2 =
|
|
1674
|
+
const c1 = chunkYQOK4E2A_js.hexToRgbUnit(color1);
|
|
1675
|
+
const c2 = chunkYQOK4E2A_js.hexToRgbUnit(color2);
|
|
1676
1676
|
const grayscaleMatrix = [
|
|
1677
1677
|
0.2126,
|
|
1678
1678
|
0.7152,
|
|
@@ -1716,7 +1716,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1716
1716
|
|
|
1717
1717
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1718
1718
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1719
|
-
return
|
|
1719
|
+
return chunkYQOK4E2A_js.build3DExtrusionData(
|
|
1720
1720
|
shape3d,
|
|
1721
1721
|
scene3d,
|
|
1722
1722
|
fillColor,
|
|
@@ -1725,7 +1725,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1725
1725
|
);
|
|
1726
1726
|
}
|
|
1727
1727
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
1728
|
-
|
|
1728
|
+
chunkYQOK4E2A_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
1729
1729
|
}
|
|
1730
1730
|
|
|
1731
1731
|
// src/viewer/utils/shape-visual-style.ts
|
|
@@ -1733,16 +1733,16 @@ function rendersCustomVectorPath(element) {
|
|
|
1733
1733
|
return (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
|
|
1734
1734
|
}
|
|
1735
1735
|
function rendersWedgeCalloutVector(element) {
|
|
1736
|
-
return element.type === "shape" &&
|
|
1736
|
+
return element.type === "shape" && chunkYQOK4E2A_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1737
1737
|
}
|
|
1738
1738
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1739
|
-
if (!
|
|
1739
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
1740
1740
|
return {};
|
|
1741
1741
|
}
|
|
1742
1742
|
const ss = element.shapeStyle;
|
|
1743
|
-
const fill = animatesFill ? void 0 :
|
|
1744
|
-
const fx =
|
|
1745
|
-
const stroke =
|
|
1743
|
+
const fill = animatesFill ? void 0 : chunkYQOK4E2A_js.getComputedFillStyle(element, parentGroupFill);
|
|
1744
|
+
const fx = chunkYQOK4E2A_js.getComputedEffectStyle(element);
|
|
1745
|
+
const stroke = chunkYQOK4E2A_js.getComputedStrokeStyle(element);
|
|
1746
1746
|
const base = {
|
|
1747
1747
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1748
1748
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1781,7 +1781,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1781
1781
|
};
|
|
1782
1782
|
Object.assign(
|
|
1783
1783
|
base,
|
|
1784
|
-
|
|
1784
|
+
chunkYQOK4E2A_js.getAnimationColorBaseStyle(element, {
|
|
1785
1785
|
animatesFill,
|
|
1786
1786
|
animatesStroke,
|
|
1787
1787
|
parentGroupFill
|
|
@@ -1793,7 +1793,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1793
1793
|
base.borderStyle = void 0;
|
|
1794
1794
|
}
|
|
1795
1795
|
apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor);
|
|
1796
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1796
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkYQOK4E2A_js.isStrokeOnlyPresetElement(element)) {
|
|
1797
1797
|
base.backgroundColor = "transparent";
|
|
1798
1798
|
base.backgroundImage = void 0;
|
|
1799
1799
|
base.borderWidth = void 0;
|
|
@@ -1807,7 +1807,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1807
1807
|
if (rendersWedgeCalloutVector(element)) {
|
|
1808
1808
|
return base;
|
|
1809
1809
|
}
|
|
1810
|
-
const geometry =
|
|
1810
|
+
const geometry = chunkYQOK4E2A_js.resolveShapeGeometry(element);
|
|
1811
1811
|
switch (geometry.kind) {
|
|
1812
1812
|
case "bare":
|
|
1813
1813
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1833,13 +1833,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1833
1833
|
function getConnectorAdjustment(element, key, fallback) {
|
|
1834
1834
|
const direct = element.shapeAdjustments?.[key];
|
|
1835
1835
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1836
|
-
return
|
|
1836
|
+
return chunkYQOK4E2A_js.clampUnitInterval(direct / 1e5);
|
|
1837
1837
|
}
|
|
1838
1838
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1839
1839
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1840
|
-
return
|
|
1840
|
+
return chunkYQOK4E2A_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1841
1841
|
}
|
|
1842
|
-
return
|
|
1842
|
+
return chunkYQOK4E2A_js.clampUnitInterval(fallback);
|
|
1843
1843
|
}
|
|
1844
1844
|
function getConnectorPathGeometry(element) {
|
|
1845
1845
|
const width = Math.max(element.width, 0);
|
|
@@ -1976,11 +1976,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1976
1976
|
strokePaint,
|
|
1977
1977
|
strokeWidth,
|
|
1978
1978
|
dashArray,
|
|
1979
|
-
lineCap:
|
|
1979
|
+
lineCap: chunkYQOK4E2A_js.svgLineCap(shapeStyle?.lineCap),
|
|
1980
1980
|
lineJoin,
|
|
1981
1981
|
miterLimit,
|
|
1982
|
-
offsets:
|
|
1983
|
-
widths:
|
|
1982
|
+
offsets: chunkYQOK4E2A_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1983
|
+
widths: chunkYQOK4E2A_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1984
1984
|
};
|
|
1985
1985
|
}
|
|
1986
1986
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2028,12 +2028,12 @@ function gradientDefs(gradient) {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2030
2030
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2031
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2031
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkYQOK4E2A_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2032
2032
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2033
|
-
const gradientPaint = gradient ?
|
|
2033
|
+
const gradientPaint = gradient ? chunkYQOK4E2A_js.svgGradientFillRef(gradient) : void 0;
|
|
2034
2034
|
const nodes = [];
|
|
2035
2035
|
if (subpaths && needsPerSubpath) {
|
|
2036
|
-
const paints =
|
|
2036
|
+
const paints = chunkYQOK4E2A_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2037
2037
|
paints.forEach((paint, idx) => {
|
|
2038
2038
|
if (paint.fill !== "none") {
|
|
2039
2039
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2062,7 +2062,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2062
2062
|
"path",
|
|
2063
2063
|
{
|
|
2064
2064
|
d: pathData,
|
|
2065
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2065
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkYQOK4E2A_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2066
2066
|
stroke: "none",
|
|
2067
2067
|
vectorEffect: "non-scaling-stroke"
|
|
2068
2068
|
},
|
|
@@ -2105,14 +2105,14 @@ function renderGradientDefs(gradient) {
|
|
|
2105
2105
|
) });
|
|
2106
2106
|
}
|
|
2107
2107
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2108
|
-
if (!
|
|
2108
|
+
if (!chunkYQOK4E2A_js.hasShapeProperties(element)) {
|
|
2109
2109
|
return null;
|
|
2110
2110
|
}
|
|
2111
2111
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2112
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2113
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2114
|
-
const dashType =
|
|
2115
|
-
const dashArray =
|
|
2112
|
+
const fillPaint = animatesFill ? "inherit" : chunkYQOK4E2A_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2113
|
+
const strokePaint = animatesStroke ? "inherit" : chunkYQOK4E2A_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2114
|
+
const dashType = chunkYQOK4E2A_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2115
|
+
const dashArray = chunkYQOK4E2A_js.getSvgStrokeDasharray(
|
|
2116
2116
|
dashType,
|
|
2117
2117
|
Math.max(strokeWidth, 1),
|
|
2118
2118
|
element.shapeStyle?.customDashSegments
|
|
@@ -2193,13 +2193,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2193
2193
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2194
2194
|
// without this the shape fell back to the parser's representative solid
|
|
2195
2195
|
// and lost every fade (issue #132).
|
|
2196
|
-
|
|
2196
|
+
chunkYQOK4E2A_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2197
2197
|
);
|
|
2198
2198
|
}
|
|
2199
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2199
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkYQOK4E2A_js.buildStrokeOutline(element)) {
|
|
2200
2200
|
const width = Math.max(element.width, 1);
|
|
2201
2201
|
const height = Math.max(element.height, 1);
|
|
2202
|
-
const geometry =
|
|
2202
|
+
const geometry = chunkYQOK4E2A_js.getPresetShapeVectorGeometry(
|
|
2203
2203
|
element.shapeType || "rect",
|
|
2204
2204
|
width,
|
|
2205
2205
|
height,
|
|
@@ -2227,18 +2227,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2227
2227
|
);
|
|
2228
2228
|
}
|
|
2229
2229
|
}
|
|
2230
|
-
if (element.type === "shape" &&
|
|
2230
|
+
if (element.type === "shape" && chunkYQOK4E2A_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2231
2231
|
const width = Math.max(element.width, 1);
|
|
2232
2232
|
const height = Math.max(element.height, 1);
|
|
2233
|
-
const geometry =
|
|
2233
|
+
const geometry = chunkYQOK4E2A_js.getPresetShapeVectorGeometry(
|
|
2234
2234
|
element.shapeType,
|
|
2235
2235
|
width,
|
|
2236
2236
|
height,
|
|
2237
2237
|
element.shapeAdjustments
|
|
2238
2238
|
);
|
|
2239
2239
|
if (geometry) {
|
|
2240
|
-
const gradient =
|
|
2241
|
-
const gradientPaint = gradient ?
|
|
2240
|
+
const gradient = chunkYQOK4E2A_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2241
|
+
const gradientPaint = gradient ? chunkYQOK4E2A_js.svgGradientFillRef(gradient) : void 0;
|
|
2242
2242
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2243
2243
|
"svg",
|
|
2244
2244
|
{
|
|
@@ -2271,18 +2271,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2271
2271
|
);
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
|
-
if (
|
|
2274
|
+
if (chunkYQOK4E2A_js.isCalloutShape(normalizedType)) {
|
|
2275
2275
|
const width = Math.max(element.width, 1);
|
|
2276
2276
|
const height = Math.max(element.height, 1);
|
|
2277
|
-
const geometry =
|
|
2277
|
+
const geometry = chunkYQOK4E2A_js.getCalloutLeaderLineGeometry(
|
|
2278
2278
|
normalizedType,
|
|
2279
2279
|
width,
|
|
2280
2280
|
height,
|
|
2281
2281
|
element.shapeAdjustments
|
|
2282
2282
|
);
|
|
2283
2283
|
if (geometry && geometry.points.length >= 2) {
|
|
2284
|
-
const leaderPath =
|
|
2285
|
-
const bounds =
|
|
2284
|
+
const leaderPath = chunkYQOK4E2A_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2285
|
+
const bounds = chunkYQOK4E2A_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2286
2286
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2287
2287
|
const offsetLeft = bounds.minX;
|
|
2288
2288
|
const offsetTop = bounds.minY;
|
|
@@ -2345,10 +2345,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2345
2345
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2346
2346
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2347
2347
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2348
|
-
const connectorLineCap =
|
|
2348
|
+
const connectorLineCap = chunkYQOK4E2A_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2349
2349
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2350
|
-
const offsets =
|
|
2351
|
-
const widths =
|
|
2350
|
+
const offsets = chunkYQOK4E2A_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2351
|
+
const widths = chunkYQOK4E2A_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2352
2352
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2353
2353
|
"svg",
|
|
2354
2354
|
{
|
|
@@ -2415,15 +2415,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2415
2415
|
}
|
|
2416
2416
|
const rawStops = stops.map((gs) => {
|
|
2417
2417
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2418
|
-
const color =
|
|
2419
|
-
const opacity =
|
|
2418
|
+
const color = chunkYQOK4E2A_js.parseDrawingColor(gs) ?? "#888888";
|
|
2419
|
+
const opacity = chunkYQOK4E2A_js.parseDrawingColorOpacity(gs);
|
|
2420
2420
|
return { position: pos, color, opacity };
|
|
2421
2421
|
}).sort((a, b) => a.position - b.position);
|
|
2422
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2422
|
+
const stopStrings = rawStops.map((s) => `${chunkYQOK4E2A_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2423
2423
|
const lin = gradFill["a:lin"];
|
|
2424
2424
|
if (lin) {
|
|
2425
2425
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2426
|
-
const angleDeg = Math.round(
|
|
2426
|
+
const angleDeg = Math.round(chunkYQOK4E2A_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2427
2427
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2428
2428
|
}
|
|
2429
2429
|
const path = gradFill["a:path"];
|
|
@@ -2437,7 +2437,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2437
2437
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2438
2438
|
} : void 0;
|
|
2439
2439
|
if (pathType === "rect") {
|
|
2440
|
-
return
|
|
2440
|
+
return chunkYQOK4E2A_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2441
2441
|
}
|
|
2442
2442
|
let cx = 50;
|
|
2443
2443
|
let cy = 50;
|
|
@@ -2459,8 +2459,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2459
2459
|
if (!pattFill) {
|
|
2460
2460
|
return void 0;
|
|
2461
2461
|
}
|
|
2462
|
-
const fgColor =
|
|
2463
|
-
const bgColor =
|
|
2462
|
+
const fgColor = chunkYQOK4E2A_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2463
|
+
const bgColor = chunkYQOK4E2A_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2464
2464
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2465
2465
|
switch (preset) {
|
|
2466
2466
|
case "ltHorz":
|
|
@@ -2571,11 +2571,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2571
2571
|
const prstDash = ln["a:prstDash"];
|
|
2572
2572
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2573
2573
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2574
|
-
const color =
|
|
2574
|
+
const color = chunkYQOK4E2A_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2575
2575
|
if (color) {
|
|
2576
|
-
const opacity =
|
|
2576
|
+
const opacity = chunkYQOK4E2A_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2577
2577
|
const key = `${edge.prefix}`;
|
|
2578
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2578
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkYQOK4E2A_js.colorWithOpacity(color, opacity)}`;
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
2581
|
return borderStyle;
|
|
@@ -2588,7 +2588,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2588
2588
|
const textShadowParts = [];
|
|
2589
2589
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2590
2590
|
if (outerShdw) {
|
|
2591
|
-
const shdwColor =
|
|
2591
|
+
const shdwColor = chunkYQOK4E2A_js.parseDrawingColor(outerShdw);
|
|
2592
2592
|
if (shdwColor) {
|
|
2593
2593
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2594
2594
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2606,7 +2606,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
const glow = effectLst["a:glow"];
|
|
2608
2608
|
if (glow) {
|
|
2609
|
-
const glowColor =
|
|
2609
|
+
const glowColor = chunkYQOK4E2A_js.parseDrawingColor(glow);
|
|
2610
2610
|
if (glowColor) {
|
|
2611
2611
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2612
2612
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2686,10 +2686,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2686
2686
|
if (runProps?.["@_u"] !== void 0) {
|
|
2687
2687
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2688
2688
|
}
|
|
2689
|
-
const runColor =
|
|
2689
|
+
const runColor = chunkYQOK4E2A_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkYQOK4E2A_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2690
2690
|
if (runColor) {
|
|
2691
|
-
const opacity =
|
|
2692
|
-
cellStyle.color =
|
|
2691
|
+
const opacity = chunkYQOK4E2A_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2692
|
+
cellStyle.color = chunkYQOK4E2A_js.colorWithOpacity(runColor, opacity);
|
|
2693
2693
|
}
|
|
2694
2694
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2695
2695
|
if (fontFamily) {
|
|
@@ -2699,15 +2699,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2699
2699
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2700
2700
|
}
|
|
2701
2701
|
const cellProperties = cellXml["a:tcPr"];
|
|
2702
|
-
const cellFill =
|
|
2702
|
+
const cellFill = chunkYQOK4E2A_js.parseDrawingColor(
|
|
2703
2703
|
cellProperties?.["a:solidFill"],
|
|
2704
2704
|
schemeColorOverrides
|
|
2705
2705
|
);
|
|
2706
2706
|
if (cellFill) {
|
|
2707
|
-
const opacity =
|
|
2707
|
+
const opacity = chunkYQOK4E2A_js.parseDrawingColorOpacity(
|
|
2708
2708
|
cellProperties?.["a:solidFill"]
|
|
2709
2709
|
);
|
|
2710
|
-
cellStyle.backgroundColor =
|
|
2710
|
+
cellStyle.backgroundColor = chunkYQOK4E2A_js.colorWithOpacity(cellFill, opacity);
|
|
2711
2711
|
} else {
|
|
2712
2712
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2713
2713
|
if (gradCss) {
|
|
@@ -2722,16 +2722,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2722
2722
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2723
2723
|
Object.assign(cellStyle, edgeBorders);
|
|
2724
2724
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2725
|
-
const borderColor =
|
|
2725
|
+
const borderColor = chunkYQOK4E2A_js.parseDrawingColor(
|
|
2726
2726
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2727
2727
|
schemeColorOverrides
|
|
2728
|
-
) ||
|
|
2728
|
+
) || chunkYQOK4E2A_js.parseDrawingColor(
|
|
2729
2729
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2730
2730
|
schemeColorOverrides
|
|
2731
|
-
) ||
|
|
2731
|
+
) || chunkYQOK4E2A_js.parseDrawingColor(
|
|
2732
2732
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2733
2733
|
schemeColorOverrides
|
|
2734
|
-
) ||
|
|
2734
|
+
) || chunkYQOK4E2A_js.parseDrawingColor(
|
|
2735
2735
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2736
2736
|
schemeColorOverrides
|
|
2737
2737
|
);
|
|
@@ -2803,7 +2803,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2803
2803
|
if (element.type !== "table") {
|
|
2804
2804
|
return void 0;
|
|
2805
2805
|
}
|
|
2806
|
-
return
|
|
2806
|
+
return chunkYQOK4E2A_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2807
2807
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2808
2808
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2809
2809
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2879,7 +2879,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2879
2879
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2880
2880
|
"span",
|
|
2881
2881
|
{
|
|
2882
|
-
style: { position: "relative", ...
|
|
2882
|
+
style: { position: "relative", ...chunkYQOK4E2A_js.cellRunStyle(run) },
|
|
2883
2883
|
children: run.text
|
|
2884
2884
|
},
|
|
2885
2885
|
`r-${index}`
|
|
@@ -2887,7 +2887,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2887
2887
|
});
|
|
2888
2888
|
}
|
|
2889
2889
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2890
|
-
return
|
|
2890
|
+
return chunkYQOK4E2A_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2891
2891
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2892
2892
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2893
2893
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3020,7 +3020,7 @@ function TableResizeOverlay({
|
|
|
3020
3020
|
const containerRef = React6.useRef(null);
|
|
3021
3021
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3022
3022
|
const dragRef = React6.useRef(null);
|
|
3023
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3023
|
+
const colBoundaries = React6.useMemo(() => chunkYQOK4E2A_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3024
3024
|
const measureRows = React6.useCallback(() => {
|
|
3025
3025
|
const container = containerRef.current;
|
|
3026
3026
|
if (!container) {
|
|
@@ -3067,11 +3067,11 @@ function TableResizeOverlay({
|
|
|
3067
3067
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3068
3068
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3069
3069
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3070
|
-
onResizeColumns(
|
|
3070
|
+
onResizeColumns(chunkYQOK4E2A_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3071
3071
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3072
3072
|
const deltaY = e.clientY - drag.startPos;
|
|
3073
|
-
const newHeight =
|
|
3074
|
-
drag.initialRowHeight ??
|
|
3073
|
+
const newHeight = chunkYQOK4E2A_js.computeResizedRowHeight(
|
|
3074
|
+
drag.initialRowHeight ?? chunkYQOK4E2A_js.DEFAULT_ROW_HEIGHT,
|
|
3075
3075
|
deltaY
|
|
3076
3076
|
);
|
|
3077
3077
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3109,7 +3109,7 @@ function TableResizeOverlay({
|
|
|
3109
3109
|
e.stopPropagation();
|
|
3110
3110
|
const table = containerRef.current?.querySelector("table");
|
|
3111
3111
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3112
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3112
|
+
const actualHeight = tr?.offsetHeight ?? chunkYQOK4E2A_js.DEFAULT_ROW_HEIGHT;
|
|
3113
3113
|
document.body.style.cursor = "row-resize";
|
|
3114
3114
|
document.body.style.userSelect = "none";
|
|
3115
3115
|
dragRef.current = {
|
|
@@ -3156,7 +3156,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3156
3156
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3157
3157
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3158
3158
|
};
|
|
3159
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3159
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkYQOK4E2A_js.tableCellCss(
|
|
3160
3160
|
tableData,
|
|
3161
3161
|
cell,
|
|
3162
3162
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3169,7 +3169,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
const first = selectedCell.selectedCells[0];
|
|
3171
3171
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3172
|
-
return
|
|
3172
|
+
return chunkYQOK4E2A_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3173
3173
|
})();
|
|
3174
3174
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3175
3175
|
TableResizeOverlay,
|
|
@@ -3190,9 +3190,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3190
3190
|
{
|
|
3191
3191
|
className: "w-full h-full border-collapse table-fixed",
|
|
3192
3192
|
style: {
|
|
3193
|
-
fontFamily:
|
|
3193
|
+
fontFamily: chunkYQOK4E2A_js.DEFAULT_FONT_FAMILY,
|
|
3194
3194
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3195
|
-
...
|
|
3195
|
+
...chunkYQOK4E2A_js.tableContainerCss(tableData)
|
|
3196
3196
|
},
|
|
3197
3197
|
children: [
|
|
3198
3198
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3211,7 +3211,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3211
3211
|
return null;
|
|
3212
3212
|
}
|
|
3213
3213
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3214
|
-
const isInMultiSelection =
|
|
3214
|
+
const isInMultiSelection = chunkYQOK4E2A_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3215
3215
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3216
3216
|
const diag = getCellDiagonalBorders2(
|
|
3217
3217
|
cell.style,
|
|
@@ -3240,7 +3240,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
event.stopPropagation();
|
|
3242
3242
|
if (event.shiftKey && selectedCell) {
|
|
3243
|
-
const rect =
|
|
3243
|
+
const rect = chunkYQOK4E2A_js.computeSelectionRect(
|
|
3244
3244
|
selectedCell.rowIndex,
|
|
3245
3245
|
selectedCell.columnIndex,
|
|
3246
3246
|
rowIndex,
|
|
@@ -3250,7 +3250,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3250
3250
|
options?.onSelectCell?.({
|
|
3251
3251
|
rowIndex: selectedCell.rowIndex,
|
|
3252
3252
|
columnIndex: selectedCell.columnIndex,
|
|
3253
|
-
selectedCells:
|
|
3253
|
+
selectedCells: chunkYQOK4E2A_js.rectToCells(rect)
|
|
3254
3254
|
});
|
|
3255
3255
|
} else {
|
|
3256
3256
|
options?.onSelectCell?.({
|
|
@@ -3326,7 +3326,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3326
3326
|
}
|
|
3327
3327
|
const first = selectedCell.selectedCells[0];
|
|
3328
3328
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3329
|
-
return
|
|
3329
|
+
return chunkYQOK4E2A_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3330
3330
|
})();
|
|
3331
3331
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3332
3332
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3348,9 +3348,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3348
3348
|
{
|
|
3349
3349
|
className: "w-full h-full border-collapse table-fixed",
|
|
3350
3350
|
style: {
|
|
3351
|
-
fontFamily:
|
|
3351
|
+
fontFamily: chunkYQOK4E2A_js.DEFAULT_FONT_FAMILY,
|
|
3352
3352
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3353
|
-
...
|
|
3353
|
+
...chunkYQOK4E2A_js.tableContainerCss(tableEl.tableData)
|
|
3354
3354
|
},
|
|
3355
3355
|
children: [
|
|
3356
3356
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3407,7 +3407,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3407
3407
|
color: textStyle.color,
|
|
3408
3408
|
...bandStyle,
|
|
3409
3409
|
...xmlCellStyle,
|
|
3410
|
-
...tdCellOverride ?
|
|
3410
|
+
...tdCellOverride ? chunkYQOK4E2A_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3411
3411
|
...diag ? { position: "relative" } : void 0
|
|
3412
3412
|
};
|
|
3413
3413
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3417,7 +3417,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3417
3417
|
"border px-1 py-0.5 align-top",
|
|
3418
3418
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3419
3419
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3420
|
-
|
|
3420
|
+
chunkYQOK4E2A_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3421
3421
|
),
|
|
3422
3422
|
colSpan,
|
|
3423
3423
|
rowSpan: rSpan,
|
|
@@ -3428,7 +3428,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3428
3428
|
}
|
|
3429
3429
|
event.stopPropagation();
|
|
3430
3430
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3431
|
-
const rect =
|
|
3431
|
+
const rect = chunkYQOK4E2A_js.computeSelectionRect(
|
|
3432
3432
|
selectedCell.rowIndex,
|
|
3433
3433
|
selectedCell.columnIndex,
|
|
3434
3434
|
rowIndex,
|
|
@@ -3438,7 +3438,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3438
3438
|
options?.onSelectCell?.({
|
|
3439
3439
|
rowIndex: selectedCell.rowIndex,
|
|
3440
3440
|
columnIndex: selectedCell.columnIndex,
|
|
3441
|
-
selectedCells:
|
|
3441
|
+
selectedCells: chunkYQOK4E2A_js.rectToCells(rect)
|
|
3442
3442
|
});
|
|
3443
3443
|
} else {
|
|
3444
3444
|
options?.onSelectCell?.({
|
|
@@ -3497,23 +3497,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3497
3497
|
);
|
|
3498
3498
|
}
|
|
3499
3499
|
function partAttrs(part) {
|
|
3500
|
-
return part ?
|
|
3500
|
+
return part ? chunkYQOK4E2A_js.chartPartToAttrs(part) : void 0;
|
|
3501
3501
|
}
|
|
3502
3502
|
function resolveReactPalette(chartData) {
|
|
3503
3503
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3504
3504
|
return chartData.colorPalette;
|
|
3505
3505
|
}
|
|
3506
|
-
return [...
|
|
3506
|
+
return [...chunkYQOK4E2A_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3507
3507
|
}
|
|
3508
3508
|
function buildReactChartViewModel(element) {
|
|
3509
3509
|
if (element.type !== "chart" || !element.chartData) {
|
|
3510
|
-
return
|
|
3510
|
+
return chunkYQOK4E2A_js.buildChartViewModel(element);
|
|
3511
3511
|
}
|
|
3512
3512
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3513
3513
|
...element,
|
|
3514
3514
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3515
3515
|
};
|
|
3516
|
-
return
|
|
3516
|
+
return chunkYQOK4E2A_js.buildChartViewModel(themedElement);
|
|
3517
3517
|
}
|
|
3518
3518
|
function renderPrimitive(prim, key) {
|
|
3519
3519
|
switch (prim.kind) {
|
|
@@ -3662,7 +3662,7 @@ function renderText(t, key) {
|
|
|
3662
3662
|
);
|
|
3663
3663
|
}
|
|
3664
3664
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3665
|
-
const legendItems =
|
|
3665
|
+
const legendItems = chunkYQOK4E2A_js.computeChartLegendLayout(vm);
|
|
3666
3666
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3667
3667
|
"svg",
|
|
3668
3668
|
{
|
|
@@ -3761,11 +3761,11 @@ function renderChartElement(element) {
|
|
|
3761
3761
|
if (!chartData || chartData.series.length === 0) {
|
|
3762
3762
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkUTIMT5CZ_js.translationsEn["pptx.chart.heading"] });
|
|
3763
3763
|
}
|
|
3764
|
-
const kind =
|
|
3764
|
+
const kind = chunkYQOK4E2A_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3765
3765
|
return renderChartViewModel(
|
|
3766
3766
|
element.id,
|
|
3767
3767
|
buildReactChartViewModel(element),
|
|
3768
|
-
|
|
3768
|
+
chunkYQOK4E2A_js.chartPreserveAspectRatio(kind)
|
|
3769
3769
|
);
|
|
3770
3770
|
}
|
|
3771
3771
|
|
|
@@ -3785,14 +3785,14 @@ function buildNotesPdf(pages) {
|
|
|
3785
3785
|
notes: page.notes,
|
|
3786
3786
|
slideNumber: page.slideNumber
|
|
3787
3787
|
}));
|
|
3788
|
-
const bytes =
|
|
3788
|
+
const bytes = chunkYQOK4E2A_js.buildNotesPdfBytes(images, meta);
|
|
3789
3789
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3790
3790
|
return URL.createObjectURL(blob);
|
|
3791
3791
|
}
|
|
3792
3792
|
|
|
3793
3793
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3794
3794
|
function buildPdfFromImageData(images) {
|
|
3795
|
-
const bytes =
|
|
3795
|
+
const bytes = chunkYQOK4E2A_js.buildSlidesPdfBytes(images);
|
|
3796
3796
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3797
3797
|
return URL.createObjectURL(blob);
|
|
3798
3798
|
}
|
|
@@ -3801,7 +3801,7 @@ function buildPdfFromImageData(images) {
|
|
|
3801
3801
|
var activePreview = null;
|
|
3802
3802
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3803
3803
|
stopPreviewAnimation();
|
|
3804
|
-
const descriptor =
|
|
3804
|
+
const descriptor = chunkYQOK4E2A_js.buildPreviewAnimation(preset, options);
|
|
3805
3805
|
if (!descriptor) {
|
|
3806
3806
|
return;
|
|
3807
3807
|
}
|
|
@@ -3814,7 +3814,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3814
3814
|
return;
|
|
3815
3815
|
}
|
|
3816
3816
|
const stage = domEl.offsetParent;
|
|
3817
|
-
const descriptor =
|
|
3817
|
+
const descriptor = chunkYQOK4E2A_js.buildMotionPathPreview({
|
|
3818
3818
|
path,
|
|
3819
3819
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3820
3820
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|