pptx-react-viewer 4.24.1 → 4.24.2
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 +11 -0
- package/dist/{AiChatPanel-NBZ2IZQO.mjs → AiChatPanel-OCGS4REH.mjs} +3 -3
- package/dist/AiChatPanel-OCGS4REH.mjs.br +0 -0
- package/dist/AiChatPanel-OCGS4REH.mjs.gz +0 -0
- package/dist/{AiChatPanel-6GZXTGXA.js → AiChatPanel-XRUVUXZV.js} +27 -27
- package/dist/AiChatPanel-XRUVUXZV.js.br +0 -0
- package/dist/AiChatPanel-XRUVUXZV.js.gz +0 -0
- package/dist/{Model3DScene-YQXR5Q7P.mjs → Model3DScene-UTF7C2I7.mjs} +1 -1
- package/dist/Model3DScene-UTF7C2I7.mjs.br +0 -0
- package/dist/Model3DScene-UTF7C2I7.mjs.gz +0 -0
- package/dist/{Model3DScene-5BX5BOJ2.js → Model3DScene-VSEMIJP4.js} +2 -2
- package/dist/Model3DScene-VSEMIJP4.js.br +0 -0
- package/dist/Model3DScene-VSEMIJP4.js.gz +0 -0
- package/dist/{chunk-J4Z3JQGJ.js → chunk-3ARZNYHA.js} +1115 -1115
- package/dist/chunk-3ARZNYHA.js.br +0 -0
- package/dist/chunk-3ARZNYHA.js.gz +0 -0
- package/dist/{chunk-EYHFT2GT.mjs → chunk-3DDSCNZX.mjs} +1 -1
- package/dist/chunk-3DDSCNZX.mjs.br +0 -0
- package/dist/{chunk-EYHFT2GT.mjs.gz → chunk-3DDSCNZX.mjs.gz} +0 -0
- package/dist/{chunk-OQ2LHVOJ.js → chunk-BOW27WFH.js} +5 -5
- package/dist/chunk-BOW27WFH.js.br +0 -0
- package/dist/chunk-BOW27WFH.js.gz +0 -0
- package/dist/{chunk-6UF53DM3.mjs → chunk-G56N6OGG.mjs} +1 -1
- package/dist/chunk-G56N6OGG.mjs.br +0 -0
- package/dist/chunk-G56N6OGG.mjs.gz +0 -0
- package/dist/{chunk-RACSFSEB.js → chunk-G5F3WAZE.js} +187 -187
- package/dist/chunk-G5F3WAZE.js.br +0 -0
- package/dist/chunk-G5F3WAZE.js.gz +0 -0
- package/dist/{chunk-6WHSZZKP.mjs → chunk-M243P5KZ.mjs} +7 -3
- package/dist/chunk-M243P5KZ.mjs.br +0 -0
- package/dist/chunk-M243P5KZ.mjs.gz +0 -0
- package/dist/{chunk-IYBAOA5G.js → chunk-PPGKTRGJ.js} +825 -821
- package/dist/chunk-PPGKTRGJ.js.br +0 -0
- package/dist/chunk-PPGKTRGJ.js.gz +0 -0
- package/dist/{chunk-TEXHBJQT.mjs → chunk-VFLCUB5I.mjs} +9 -2
- package/dist/chunk-VFLCUB5I.mjs.br +0 -0
- package/dist/{chunk-TEXHBJQT.mjs.gz → chunk-VFLCUB5I.mjs.gz} +0 -0
- package/dist/{chunk-EKHJAOUM.js → chunk-WEV3C7IC.js} +9 -2
- package/dist/chunk-WEV3C7IC.js.br +0 -0
- package/dist/{chunk-EKHJAOUM.js.gz → chunk-WEV3C7IC.js.gz} +0 -0
- package/dist/{chunk-CPPNOJCN.mjs → chunk-XDX6EEWB.mjs} +6 -6
- package/dist/chunk-XDX6EEWB.mjs.br +0 -0
- package/dist/chunk-XDX6EEWB.mjs.gz +0 -0
- package/dist/index.js +61 -61
- 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 +104 -104
- 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-6GZXTGXA.js.br +0 -0
- package/dist/AiChatPanel-6GZXTGXA.js.gz +0 -0
- package/dist/AiChatPanel-NBZ2IZQO.mjs.br +0 -0
- package/dist/AiChatPanel-NBZ2IZQO.mjs.gz +0 -0
- package/dist/Model3DScene-5BX5BOJ2.js.br +0 -0
- package/dist/Model3DScene-5BX5BOJ2.js.gz +0 -0
- package/dist/Model3DScene-YQXR5Q7P.mjs.br +0 -0
- package/dist/Model3DScene-YQXR5Q7P.mjs.gz +0 -0
- package/dist/chunk-6UF53DM3.mjs.br +0 -0
- package/dist/chunk-6UF53DM3.mjs.gz +0 -0
- package/dist/chunk-6WHSZZKP.mjs.br +0 -0
- package/dist/chunk-6WHSZZKP.mjs.gz +0 -0
- package/dist/chunk-CPPNOJCN.mjs.br +0 -0
- package/dist/chunk-CPPNOJCN.mjs.gz +0 -0
- package/dist/chunk-EKHJAOUM.js.br +0 -0
- package/dist/chunk-EYHFT2GT.mjs.br +0 -0
- package/dist/chunk-IYBAOA5G.js.br +0 -0
- package/dist/chunk-IYBAOA5G.js.gz +0 -0
- package/dist/chunk-J4Z3JQGJ.js.br +0 -0
- package/dist/chunk-J4Z3JQGJ.js.gz +0 -0
- package/dist/chunk-OQ2LHVOJ.js.br +0 -0
- package/dist/chunk-OQ2LHVOJ.js.gz +0 -0
- package/dist/chunk-RACSFSEB.js.br +0 -0
- package/dist/chunk-RACSFSEB.js.gz +0 -0
- package/dist/chunk-TEXHBJQT.mjs.br +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWEV3C7IC_js = require('./chunk-WEV3C7IC.js');
|
|
4
4
|
var chunkLKL6DQ55_js = require('./chunk-LKL6DQ55.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -15,7 +15,7 @@ var React8__default = /*#__PURE__*/_interopDefault(React8);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkWEV3C7IC_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 chunkWEV3C7IC_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 = chunkWEV3C7IC_js.VIEWER_SHORTCUT_REFERENCE;
|
|
65
65
|
|
|
66
66
|
// src/viewer/constants/transitions-animations.ts
|
|
67
67
|
var ANIMATION_PRESET_OPTIONS = [
|
|
@@ -89,7 +89,7 @@ var GLYPH_COMPONENTS = {
|
|
|
89
89
|
plus: lu.LuPlus,
|
|
90
90
|
triangle: lu.LuTriangle
|
|
91
91
|
};
|
|
92
|
-
var SHAPE_PRESETS =
|
|
92
|
+
var SHAPE_PRESETS = chunkWEV3C7IC_js.SHAPE_PRESET_DEFS.map(
|
|
93
93
|
(def) => ({
|
|
94
94
|
type: def.type,
|
|
95
95
|
label: def.label,
|
|
@@ -114,7 +114,7 @@ var ARROW_SIZE_OPTIONS = [
|
|
|
114
114
|
{ value: "med", label: "Medium", i18nKey: "pptx.connectorOptions.sizeMedium" },
|
|
115
115
|
{ value: "lg", label: "Large", i18nKey: "pptx.connectorOptions.sizeLarge" }
|
|
116
116
|
];
|
|
117
|
-
var STROKE_DASH_OPTIONS2 =
|
|
117
|
+
var STROKE_DASH_OPTIONS2 = chunkWEV3C7IC_js.STROKE_DASH_OPTIONS;
|
|
118
118
|
|
|
119
119
|
// src/viewer/utils/shape-types.tsx
|
|
120
120
|
function getShapeType(shapeType) {
|
|
@@ -223,7 +223,7 @@ function isConnectorOrLineElement(element) {
|
|
|
223
223
|
if (element.type === "connector") {
|
|
224
224
|
return true;
|
|
225
225
|
}
|
|
226
|
-
if (!
|
|
226
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
227
227
|
return false;
|
|
228
228
|
}
|
|
229
229
|
const st = getShapeType(element.shapeType);
|
|
@@ -232,18 +232,18 @@ function isConnectorOrLineElement(element) {
|
|
|
232
232
|
|
|
233
233
|
// src/viewer/utils/image-style.ts
|
|
234
234
|
function getImageMaskStyle(element) {
|
|
235
|
-
if (!
|
|
235
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkWEV3C7IC_js.resolveShapeGeometry(element);
|
|
239
239
|
if (geometry.kind === "borderRadius") {
|
|
240
240
|
return { borderRadius: geometry.radius };
|
|
241
241
|
}
|
|
242
242
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
243
243
|
}
|
|
244
244
|
function getImageRenderStyle(element) {
|
|
245
|
-
const fit =
|
|
246
|
-
const counterTransform =
|
|
245
|
+
const fit = chunkWEV3C7IC_js.getImageFitStyle(element);
|
|
246
|
+
const counterTransform = chunkWEV3C7IC_js.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
247
247
|
return {
|
|
248
248
|
// A translated/scaled crop, or a rotWithShape=false counter-transform,
|
|
249
249
|
// must be masked by the stationary wrapper, not by the moving/counter-
|
|
@@ -262,7 +262,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
function getImageSurfaceStyle(element) {
|
|
265
|
-
const fill =
|
|
265
|
+
const fill = chunkWEV3C7IC_js.hasShapeProperties(element) ? chunkWEV3C7IC_js.getComputedFillStyle(element) : void 0;
|
|
266
266
|
return {
|
|
267
267
|
position: "absolute",
|
|
268
268
|
inset: 0,
|
|
@@ -275,13 +275,13 @@ function getImageSurfaceStyle(element) {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
function getCropShapeClipPath2(element) {
|
|
278
|
-
if (!
|
|
278
|
+
if (!chunkWEV3C7IC_js.isImageLikeElement(element)) {
|
|
279
279
|
return void 0;
|
|
280
280
|
}
|
|
281
|
-
return
|
|
281
|
+
return chunkWEV3C7IC_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
282
282
|
}
|
|
283
283
|
function getImageTilingStyle2(element, nativeSize) {
|
|
284
|
-
return
|
|
284
|
+
return chunkWEV3C7IC_js.getImageTilingStyle(element, nativeSize);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -413,7 +413,7 @@ function VideoWithMetadata({
|
|
|
413
413
|
{
|
|
414
414
|
ref: mediaRef,
|
|
415
415
|
className: "w-full h-full pointer-events-auto",
|
|
416
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
416
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkWEV3C7IC_js.getImageFitStyle(element),
|
|
417
417
|
controls: showTransport,
|
|
418
418
|
preload: "metadata",
|
|
419
419
|
playsInline: true,
|
|
@@ -470,7 +470,7 @@ function PresentationMediaController({
|
|
|
470
470
|
const [isMediaPlaying, setIsMediaPlaying] = React8.useState(false);
|
|
471
471
|
const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
|
|
472
472
|
const hideWhenNotPlaying = isPresentationMode && element.hideWhenNotPlaying === true;
|
|
473
|
-
const { volume: playbackVolume, playbackRate } =
|
|
473
|
+
const { volume: playbackVolume, playbackRate } = chunkWEV3C7IC_js.mediaPlaybackAttributes({
|
|
474
474
|
loop: element.loop,
|
|
475
475
|
volume: element.volume,
|
|
476
476
|
playbackSpeed: element.playbackSpeed
|
|
@@ -518,7 +518,7 @@ function PresentationMediaController({
|
|
|
518
518
|
if (!el || !isPresentationMode) {
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
|
-
return
|
|
521
|
+
return chunkWEV3C7IC_js.scheduleMediaTrimAndFade(el, {
|
|
522
522
|
trimStartMs: element.trimStartMs,
|
|
523
523
|
trimEndMs: element.trimEndMs,
|
|
524
524
|
fadeInDuration: element.fadeInDuration,
|
|
@@ -539,7 +539,7 @@ function PresentationMediaController({
|
|
|
539
539
|
}
|
|
540
540
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
541
541
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
542
|
-
if (
|
|
542
|
+
if (chunkWEV3C7IC_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
@@ -571,7 +571,7 @@ function PresentationMediaController({
|
|
|
571
571
|
}, []);
|
|
572
572
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full h-full", style: wrapperStyle, children: [
|
|
573
573
|
children({ mediaRef, onPlay: noopOnPlay, isMediaPlaying }),
|
|
574
|
-
|
|
574
|
+
chunkWEV3C7IC_js.shouldShowMediaFullscreenStopButton({
|
|
575
575
|
fullScreen: isFullScreen,
|
|
576
576
|
presenting: isPresentationMode,
|
|
577
577
|
playing: isMediaPlaying
|
|
@@ -624,17 +624,17 @@ function Badge({
|
|
|
624
624
|
"div",
|
|
625
625
|
{
|
|
626
626
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
627
|
-
...{ [
|
|
627
|
+
...{ [chunkWEV3C7IC_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
628
628
|
children: [
|
|
629
629
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
630
630
|
FallbackIcon,
|
|
631
631
|
{
|
|
632
|
-
paths:
|
|
632
|
+
paths: chunkWEV3C7IC_js.mediaFallbackIcon(visual, element.mediaType),
|
|
633
633
|
size: isMissing ? 32 : 48,
|
|
634
634
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
635
635
|
}
|
|
636
636
|
),
|
|
637
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
637
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkWEV3C7IC_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
638
638
|
]
|
|
639
639
|
}
|
|
640
640
|
);
|
|
@@ -651,17 +651,17 @@ function Placeholder({
|
|
|
651
651
|
"div",
|
|
652
652
|
{
|
|
653
653
|
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"}`,
|
|
654
|
-
...{ [
|
|
654
|
+
...{ [chunkWEV3C7IC_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
655
655
|
children: [
|
|
656
656
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
657
657
|
FallbackIcon,
|
|
658
658
|
{
|
|
659
|
-
paths:
|
|
659
|
+
paths: chunkWEV3C7IC_js.mediaFallbackIcon(visual, element.mediaType),
|
|
660
660
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
661
661
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
662
662
|
}
|
|
663
663
|
),
|
|
664
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
664
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkWEV3C7IC_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
665
665
|
]
|
|
666
666
|
}
|
|
667
667
|
);
|
|
@@ -671,7 +671,7 @@ function renderMediaFallback({
|
|
|
671
671
|
posterUrl,
|
|
672
672
|
surface
|
|
673
673
|
}) {
|
|
674
|
-
const visual =
|
|
674
|
+
const visual = chunkWEV3C7IC_js.mediaFallbackVisual(surface, {
|
|
675
675
|
hasPoster: Boolean(posterUrl),
|
|
676
676
|
missing: element.mediaMissing === true
|
|
677
677
|
});
|
|
@@ -683,7 +683,7 @@ function renderMediaFallback({
|
|
|
683
683
|
src: posterUrl,
|
|
684
684
|
alt: visual.dimPoster ? chunkLKL6DQ55_js.translationsEn["pptx.media.posterAlt"] : chunkLKL6DQ55_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
685
685
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
686
|
-
style:
|
|
686
|
+
style: chunkWEV3C7IC_js.getImageFitStyle(element)
|
|
687
687
|
}
|
|
688
688
|
),
|
|
689
689
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -701,7 +701,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
701
701
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
702
702
|
const trimFragment = buildTrimFragment(element);
|
|
703
703
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
704
|
-
const shouldLoop =
|
|
704
|
+
const shouldLoop = chunkWEV3C7IC_js.mediaPlaybackAttributes(element).loop;
|
|
705
705
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
706
706
|
const isFullScreen = options?.fullScreen === true;
|
|
707
707
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -714,7 +714,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
714
714
|
return renderMediaFallback({ element, posterUrl, surface });
|
|
715
715
|
}
|
|
716
716
|
if (mediaType === "video") {
|
|
717
|
-
const onlineVideo =
|
|
717
|
+
const onlineVideo = chunkWEV3C7IC_js.getOnlineVideoEmbed(element);
|
|
718
718
|
if (onlineVideo) {
|
|
719
719
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
720
720
|
"iframe",
|
|
@@ -722,9 +722,9 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
722
722
|
src: onlineVideo.embedUrl,
|
|
723
723
|
title: chunkLKL6DQ55_js.translationsEn["pptx.media.onlineVideoTitle"],
|
|
724
724
|
className: "w-full h-full border-0 pointer-events-auto",
|
|
725
|
-
allow:
|
|
725
|
+
allow: chunkWEV3C7IC_js.ONLINE_VIDEO_IFRAME_ALLOW,
|
|
726
726
|
allowFullScreen: true,
|
|
727
|
-
sandbox:
|
|
727
|
+
sandbox: chunkWEV3C7IC_js.ONLINE_VIDEO_IFRAME_SANDBOX
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
730
|
}
|
|
@@ -798,27 +798,27 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
798
798
|
|
|
799
799
|
// src/viewer/utils/text-utils.tsx
|
|
800
800
|
function getTextStyleForElement(element, fallbackColor) {
|
|
801
|
-
return
|
|
801
|
+
return chunkWEV3C7IC_js.buildTextBlockStyle(element, { fallbackColor });
|
|
802
802
|
}
|
|
803
803
|
|
|
804
804
|
// src/viewer/utils/text-layout.tsx
|
|
805
805
|
function getTextLayoutStyle(element) {
|
|
806
|
-
if (!
|
|
806
|
+
if (!chunkWEV3C7IC_js.hasTextProperties(element)) {
|
|
807
807
|
return {};
|
|
808
808
|
}
|
|
809
|
-
const writingMode =
|
|
810
|
-
const textOrientation =
|
|
811
|
-
const verticalDirection =
|
|
809
|
+
const writingMode = chunkWEV3C7IC_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
810
|
+
const textOrientation = chunkWEV3C7IC_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
811
|
+
const verticalDirection = chunkWEV3C7IC_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
812
812
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
813
813
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
814
|
-
const hasParagraphIndents =
|
|
814
|
+
const hasParagraphIndents = chunkWEV3C7IC_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
815
815
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
816
816
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
817
817
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
818
818
|
const textIndent = !hasParagraphIndents && typeof paragraphIndent === "number" && paragraphIndent !== 0 ? paragraphIndent : void 0;
|
|
819
819
|
const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
|
|
820
820
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
821
|
-
const bodyLayoutStyle =
|
|
821
|
+
const bodyLayoutStyle = chunkWEV3C7IC_js.buildTextBodyLayoutStyle(element);
|
|
822
822
|
return {
|
|
823
823
|
...bodyLayoutStyle,
|
|
824
824
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
@@ -848,7 +848,7 @@ function getTextLayoutStyle(element) {
|
|
|
848
848
|
|
|
849
849
|
// src/viewer/utils/text-effects.tsx
|
|
850
850
|
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
851
|
-
return
|
|
851
|
+
return chunkWEV3C7IC_js.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
852
852
|
}
|
|
853
853
|
|
|
854
854
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1033,13 +1033,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1033
1033
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1034
1034
|
return renderedSegments;
|
|
1035
1035
|
}
|
|
1036
|
-
const paraKey = `${elementId}${
|
|
1036
|
+
const paraKey = `${elementId}${chunkWEV3C7IC_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1037
1037
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1038
1038
|
if (paraState) {
|
|
1039
1039
|
const style = buildAnimStyle(paraState);
|
|
1040
1040
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1041
1041
|
}
|
|
1042
|
-
const spec =
|
|
1042
|
+
const spec = chunkWEV3C7IC_js.buildTextBuildSpec(
|
|
1043
1043
|
elementId,
|
|
1044
1044
|
paraIndex,
|
|
1045
1045
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1057,7 +1057,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1057
1057
|
"span",
|
|
1058
1058
|
{
|
|
1059
1059
|
"data-anim-id": span.animId,
|
|
1060
|
-
style:
|
|
1060
|
+
style: chunkWEV3C7IC_js.textBuildSpanStyle(span),
|
|
1061
1061
|
children: content
|
|
1062
1062
|
},
|
|
1063
1063
|
span.animId
|
|
@@ -1068,17 +1068,17 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1068
1068
|
if (!isUnderlineWords || !text) {
|
|
1069
1069
|
return inner(text, keyPrefix, metric);
|
|
1070
1070
|
}
|
|
1071
|
-
const pieces =
|
|
1071
|
+
const pieces = chunkWEV3C7IC_js.splitWordsForUnderline(text);
|
|
1072
1072
|
if (pieces.length === 0) {
|
|
1073
1073
|
return inner(text, keyPrefix, metric);
|
|
1074
1074
|
}
|
|
1075
1075
|
const gapMetric = metric ? {
|
|
1076
1076
|
...metric,
|
|
1077
|
-
nestedStyle: metric.nestedStyle ?
|
|
1077
|
+
nestedStyle: metric.nestedStyle ? chunkWEV3C7IC_js.stripUnderlineDecoration(metric.nestedStyle) : void 0
|
|
1078
1078
|
} : void 0;
|
|
1079
1079
|
return pieces.map((piece, i) => {
|
|
1080
1080
|
const key = `${keyPrefix}-u${i}`;
|
|
1081
|
-
const following =
|
|
1081
|
+
const following = chunkWEV3C7IC_js.followingText(pieces, i, metric?.following);
|
|
1082
1082
|
if (!piece.underline) {
|
|
1083
1083
|
return /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: inner(piece.text, key, gapMetric && { ...gapMetric, following }) }, key);
|
|
1084
1084
|
}
|
|
@@ -1108,7 +1108,7 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1108
1108
|
);
|
|
1109
1109
|
}
|
|
1110
1110
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1111
|
-
const [lineLayout] =
|
|
1111
|
+
const [lineLayout] = chunkWEV3C7IC_js.buildRunTabLines(
|
|
1112
1112
|
line,
|
|
1113
1113
|
ctx,
|
|
1114
1114
|
nestedStyle,
|
|
@@ -1124,7 +1124,7 @@ function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underl
|
|
|
1124
1124
|
}) });
|
|
1125
1125
|
}
|
|
1126
1126
|
function renderEastAsianPieces(text, metric, keyPrefix, inner, baseStyle, following) {
|
|
1127
|
-
const parts =
|
|
1127
|
+
const parts = chunkWEV3C7IC_js.splitEastAsianBreaks(text, metric.eastAsian, metric.font, following);
|
|
1128
1128
|
if (parts.length === 1 && !parts[0].style) {
|
|
1129
1129
|
return inner(parts[0].text, keyPrefix);
|
|
1130
1130
|
}
|
|
@@ -1137,7 +1137,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1137
1137
|
if (!metric || !text) {
|
|
1138
1138
|
return inner(text, keyPrefix);
|
|
1139
1139
|
}
|
|
1140
|
-
const pieces =
|
|
1140
|
+
const pieces = chunkWEV3C7IC_js.splitRunForMetrics(text, metric.font);
|
|
1141
1141
|
if (pieces.length <= 1) {
|
|
1142
1142
|
return renderEastAsianPieces(text, metric, keyPrefix, inner, void 0, metric.following);
|
|
1143
1143
|
}
|
|
@@ -1145,7 +1145,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1145
1145
|
const key = `${keyPrefix}-w${i}`;
|
|
1146
1146
|
const style = {
|
|
1147
1147
|
...metric.nestedStyle,
|
|
1148
|
-
letterSpacing:
|
|
1148
|
+
letterSpacing: chunkWEV3C7IC_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1149
1149
|
};
|
|
1150
1150
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style, children: renderEastAsianPieces(
|
|
1151
1151
|
piece.text,
|
|
@@ -1153,7 +1153,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1153
1153
|
key,
|
|
1154
1154
|
inner,
|
|
1155
1155
|
style,
|
|
1156
|
-
|
|
1156
|
+
chunkWEV3C7IC_js.followingText(pieces, i, metric.following)
|
|
1157
1157
|
) }, key);
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
@@ -1161,7 +1161,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1161
1161
|
if (!needsScriptFonts || !text) {
|
|
1162
1162
|
return text;
|
|
1163
1163
|
}
|
|
1164
|
-
const pieces =
|
|
1164
|
+
const pieces = chunkWEV3C7IC_js.splitRunByScriptFont(
|
|
1165
1165
|
text,
|
|
1166
1166
|
scriptFonts,
|
|
1167
1167
|
baseFontFamily,
|
|
@@ -1236,15 +1236,15 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1236
1236
|
color: "inherit",
|
|
1237
1237
|
borderRadius: 2
|
|
1238
1238
|
},
|
|
1239
|
-
children: renderLeaf(chunk.text, chunkKey,
|
|
1239
|
+
children: renderLeaf(chunk.text, chunkKey, chunkWEV3C7IC_js.followingText(chunks, ci, metric?.following))
|
|
1240
1240
|
},
|
|
1241
1241
|
chunkKey
|
|
1242
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: renderLeaf(chunk.text, chunkKey,
|
|
1242
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: renderLeaf(chunk.text, chunkKey, chunkWEV3C7IC_js.followingText(chunks, ci, metric?.following)) }, chunkKey);
|
|
1243
1243
|
});
|
|
1244
1244
|
}
|
|
1245
1245
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber, fontSize) {
|
|
1246
|
-
const mathml =
|
|
1247
|
-
const safeMathml = mathml ?
|
|
1246
|
+
const mathml = chunkWEV3C7IC_js.convertOmmlToMathMl(equationXml);
|
|
1247
|
+
const safeMathml = mathml ? chunkWEV3C7IC_js.sanitizeMathMl(mathml) : "";
|
|
1248
1248
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1249
1249
|
"span",
|
|
1250
1250
|
{
|
|
@@ -1384,7 +1384,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1384
1384
|
const segmentStyle = segment?.style ?? {};
|
|
1385
1385
|
const textValue = run.text;
|
|
1386
1386
|
const lines = textValue.split("\n");
|
|
1387
|
-
const resolvedSegmentColor =
|
|
1387
|
+
const resolvedSegmentColor = chunkWEV3C7IC_js.normalizeHexColor(
|
|
1388
1388
|
segmentStyle.color || element.textStyle?.color,
|
|
1389
1389
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1390
1390
|
);
|
|
@@ -1392,30 +1392,30 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1392
1392
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1393
1393
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1394
1394
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1395
|
-
const baseFontSize =
|
|
1395
|
+
const baseFontSize = chunkWEV3C7IC_js.scaleFontSizeForAutoFit(
|
|
1396
1396
|
rawFontSize,
|
|
1397
|
-
|
|
1397
|
+
chunkWEV3C7IC_js.resolveAutoFitFontScale(element.textStyle)
|
|
1398
1398
|
);
|
|
1399
1399
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1400
|
-
const fontKerning =
|
|
1400
|
+
const fontKerning = chunkWEV3C7IC_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1401
1401
|
const scriptFallbackWins = Boolean(
|
|
1402
1402
|
segmentStyle.scriptFallbackFont && segmentStyle.fontFamilyIsCascadeDefault
|
|
1403
1403
|
);
|
|
1404
1404
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1405
|
-
const baseFontFamily = scriptFallbackWins ?
|
|
1405
|
+
const baseFontFamily = scriptFallbackWins ? chunkWEV3C7IC_js.getSubstituteFontFamily(segmentStyle.scriptFallbackFont) : rawFontFamily ? chunkWEV3C7IC_js.getSubstituteFontFamily(
|
|
1406
1406
|
rawFontFamily,
|
|
1407
|
-
|
|
1407
|
+
chunkWEV3C7IC_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1408
1408
|
) : DEFAULT_FONT_FAMILY2;
|
|
1409
|
-
const scriptFonts =
|
|
1410
|
-
const needsScriptFonts =
|
|
1411
|
-
const authoredLetterSpacing =
|
|
1409
|
+
const scriptFonts = chunkWEV3C7IC_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1410
|
+
const needsScriptFonts = chunkWEV3C7IC_js.hasDistinctScriptFonts(scriptFonts);
|
|
1411
|
+
const authoredLetterSpacing = chunkWEV3C7IC_js.authoredLetterSpacingPx(segmentStyle);
|
|
1412
1412
|
const metricFont = {
|
|
1413
1413
|
fontFamily: baseFontFamily,
|
|
1414
1414
|
fontSizePx: baseFontSize * baselineFontScale,
|
|
1415
1415
|
bold: Boolean(segmentStyle.bold),
|
|
1416
1416
|
italic: Boolean(segmentStyle.italic)
|
|
1417
1417
|
};
|
|
1418
|
-
const nestedStyle =
|
|
1418
|
+
const nestedStyle = chunkWEV3C7IC_js.nestedTextDecorationStyle(run.style);
|
|
1419
1419
|
const metricContext = {
|
|
1420
1420
|
font: metricFont,
|
|
1421
1421
|
authoredPx: authoredLetterSpacing,
|
|
@@ -1429,11 +1429,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1429
1429
|
spanStyle.fontFamily = baseFontFamily;
|
|
1430
1430
|
spanStyle.verticalAlign = baselineShift;
|
|
1431
1431
|
spanStyle.fontKerning = fontKerning;
|
|
1432
|
-
spanStyle.letterSpacing =
|
|
1432
|
+
spanStyle.letterSpacing = chunkWEV3C7IC_js.pieceLetterSpacing(
|
|
1433
1433
|
authoredLetterSpacing,
|
|
1434
|
-
|
|
1434
|
+
chunkWEV3C7IC_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1435
1435
|
);
|
|
1436
|
-
const hollow =
|
|
1436
|
+
const hollow = chunkWEV3C7IC_js.hollowTextFillStyle(segmentStyle, {
|
|
1437
1437
|
color: resolvedSegmentColor,
|
|
1438
1438
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1439
1439
|
});
|
|
@@ -1445,10 +1445,10 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1445
1445
|
spanStyle.direction = runRtl ? "rtl" : "ltr";
|
|
1446
1446
|
spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
|
|
1447
1447
|
}
|
|
1448
|
-
const isUnderlineWords =
|
|
1448
|
+
const isUnderlineWords = chunkWEV3C7IC_js.splitsUnderlineIntoWords(segmentStyle);
|
|
1449
1449
|
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1450
1450
|
if (isUnderlineWords) {
|
|
1451
|
-
const stripped =
|
|
1451
|
+
const stripped = chunkWEV3C7IC_js.stripUnderlineDecoration(spanStyle);
|
|
1452
1452
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
1453
1453
|
delete spanStyle.textDecorationStyle;
|
|
1454
1454
|
delete spanStyle.textDecorationThickness;
|
|
@@ -1464,7 +1464,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1464
1464
|
scriptFonts,
|
|
1465
1465
|
baseFontFamily,
|
|
1466
1466
|
findHighlights,
|
|
1467
|
-
|
|
1467
|
+
chunkWEV3C7IC_js.buildTabContext(
|
|
1468
1468
|
element.textStyle?.tabStops,
|
|
1469
1469
|
element.textStyle?.defaultTabSize,
|
|
1470
1470
|
baseFontSize,
|
|
@@ -1497,14 +1497,14 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1497
1497
|
const segment = sourceRun ? segments[seed.segmentIndex] : { text: seed.text, style: seed.style };
|
|
1498
1498
|
const resolvedSegment = {
|
|
1499
1499
|
...segment,
|
|
1500
|
-
style:
|
|
1500
|
+
style: chunkWEV3C7IC_js.withInlineListDecorationDefaults(segment.style, context.element.textStyle)
|
|
1501
1501
|
};
|
|
1502
|
-
const decorationCss =
|
|
1502
|
+
const decorationCss = chunkWEV3C7IC_js.segmentStyleToCss(
|
|
1503
1503
|
resolvedSegment,
|
|
1504
|
-
|
|
1504
|
+
chunkWEV3C7IC_js.resolveAutoFitFontScale(context.element.textStyle)
|
|
1505
1505
|
);
|
|
1506
|
-
|
|
1507
|
-
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...
|
|
1506
|
+
chunkWEV3C7IC_js.applyUnderlineVariant(decorationCss, resolvedSegment);
|
|
1507
|
+
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...chunkWEV3C7IC_js.nestedTextDecorationStyle(decorationCss) } } : {
|
|
1508
1508
|
text: seed.text,
|
|
1509
1509
|
style: decorationCss,
|
|
1510
1510
|
segmentIndex: seed.segmentIndex
|
|
@@ -1519,7 +1519,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1522
|
-
if (!
|
|
1522
|
+
if (!chunkWEV3C7IC_js.hasTextProperties(element)) {
|
|
1523
1523
|
return emptyFallback || null;
|
|
1524
1524
|
}
|
|
1525
1525
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1529,7 +1529,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1529
1529
|
}
|
|
1530
1530
|
return element.text || emptyFallback || "";
|
|
1531
1531
|
}
|
|
1532
|
-
const paragraphs =
|
|
1532
|
+
const paragraphs = chunkWEV3C7IC_js.buildParagraphs(element, fieldContext, segmentOverrides, {
|
|
1533
1533
|
preserveTrailingEmpty: inlineListSeed ? true : void 0,
|
|
1534
1534
|
eastAsianRunPieces: false
|
|
1535
1535
|
});
|
|
@@ -1576,7 +1576,7 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
|
|
|
1576
1576
|
const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map(
|
|
1577
1577
|
(run, i) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], {
|
|
1578
1578
|
...runCtx,
|
|
1579
|
-
eastAsianFollowing: para.eastAsianBreaks ?
|
|
1579
|
+
eastAsianFollowing: para.eastAsianBreaks ? chunkWEV3C7IC_js.followingText(runs, i) : void 0
|
|
1580
1580
|
})
|
|
1581
1581
|
);
|
|
1582
1582
|
const paraStyle = {
|
|
@@ -1682,13 +1682,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1682
1682
|
);
|
|
1683
1683
|
}
|
|
1684
1684
|
function getDuotoneColors(element) {
|
|
1685
|
-
if (!
|
|
1685
|
+
if (!chunkWEV3C7IC_js.isImageLikeElement(element)) {
|
|
1686
1686
|
return void 0;
|
|
1687
1687
|
}
|
|
1688
1688
|
return element.imageEffects?.duotone;
|
|
1689
1689
|
}
|
|
1690
1690
|
function buildLineShadowCss(element) {
|
|
1691
|
-
if (!
|
|
1691
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
1692
1692
|
return void 0;
|
|
1693
1693
|
}
|
|
1694
1694
|
const ss = element.shapeStyle;
|
|
@@ -1699,13 +1699,13 @@ function buildLineShadowCss(element) {
|
|
|
1699
1699
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1700
1700
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1701
1701
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1702
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1703
|
-
|
|
1702
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkWEV3C7IC_js.colorWithOpacity(
|
|
1703
|
+
chunkWEV3C7IC_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1704
1704
|
opacity
|
|
1705
1705
|
)}`;
|
|
1706
1706
|
}
|
|
1707
1707
|
function buildLineGlowFilter(element) {
|
|
1708
|
-
if (!
|
|
1708
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
1709
1709
|
return void 0;
|
|
1710
1710
|
}
|
|
1711
1711
|
const ss = element.shapeStyle;
|
|
@@ -1714,22 +1714,22 @@ function buildLineGlowFilter(element) {
|
|
|
1714
1714
|
}
|
|
1715
1715
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1716
1716
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1717
|
-
const glowCol =
|
|
1717
|
+
const glowCol = chunkWEV3C7IC_js.colorWithOpacity(chunkWEV3C7IC_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1718
1718
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1719
1719
|
}
|
|
1720
1720
|
function getDagDuotoneFilterId(elementId) {
|
|
1721
1721
|
return `dag-duotone-${elementId}`;
|
|
1722
1722
|
}
|
|
1723
1723
|
function hasDagDuotoneEffect(element) {
|
|
1724
|
-
if (!
|
|
1724
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
1725
1725
|
return false;
|
|
1726
1726
|
}
|
|
1727
1727
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1728
1728
|
}
|
|
1729
1729
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1730
1730
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1731
|
-
const c1 =
|
|
1732
|
-
const c2 =
|
|
1731
|
+
const c1 = chunkWEV3C7IC_js.hexToRgbUnit(color1);
|
|
1732
|
+
const c2 = chunkWEV3C7IC_js.hexToRgbUnit(color2);
|
|
1733
1733
|
const grayscaleMatrix = [
|
|
1734
1734
|
0.2126,
|
|
1735
1735
|
0.7152,
|
|
@@ -1773,7 +1773,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1773
1773
|
|
|
1774
1774
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1775
1775
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1776
|
-
return
|
|
1776
|
+
return chunkWEV3C7IC_js.build3DExtrusionData(
|
|
1777
1777
|
shape3d,
|
|
1778
1778
|
scene3d,
|
|
1779
1779
|
fillColor,
|
|
@@ -1782,7 +1782,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1782
1782
|
);
|
|
1783
1783
|
}
|
|
1784
1784
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1785
|
-
|
|
1785
|
+
chunkWEV3C7IC_js.apply3dEffects(
|
|
1786
1786
|
base,
|
|
1787
1787
|
scene3d,
|
|
1788
1788
|
shape3d,
|
|
@@ -1797,11 +1797,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1797
1797
|
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;
|
|
1798
1798
|
}
|
|
1799
1799
|
function rendersWedgeCalloutVector(element) {
|
|
1800
|
-
return element.type === "shape" &&
|
|
1800
|
+
return element.type === "shape" && chunkWEV3C7IC_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1801
1801
|
}
|
|
1802
1802
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1803
1803
|
if (element.type === "group") {
|
|
1804
|
-
const fx2 =
|
|
1804
|
+
const fx2 = chunkWEV3C7IC_js.getComputedEffectStyle(element);
|
|
1805
1805
|
const groupStyle = {};
|
|
1806
1806
|
if (fx2.filter) {
|
|
1807
1807
|
groupStyle.filter = fx2.filter;
|
|
@@ -1811,13 +1811,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1811
1811
|
}
|
|
1812
1812
|
return groupStyle;
|
|
1813
1813
|
}
|
|
1814
|
-
if (!
|
|
1814
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
1815
1815
|
return {};
|
|
1816
1816
|
}
|
|
1817
1817
|
const ss = element.shapeStyle;
|
|
1818
|
-
const fill = animatesFill ? void 0 :
|
|
1819
|
-
const fx =
|
|
1820
|
-
const stroke =
|
|
1818
|
+
const fill = animatesFill ? void 0 : chunkWEV3C7IC_js.getComputedFillStyle(element, parentGroupFill);
|
|
1819
|
+
const fx = chunkWEV3C7IC_js.getComputedEffectStyle(element);
|
|
1820
|
+
const stroke = chunkWEV3C7IC_js.getComputedStrokeStyle(element);
|
|
1821
1821
|
const base = {
|
|
1822
1822
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1823
1823
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1856,7 +1856,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1856
1856
|
};
|
|
1857
1857
|
Object.assign(
|
|
1858
1858
|
base,
|
|
1859
|
-
|
|
1859
|
+
chunkWEV3C7IC_js.getAnimationColorBaseStyle(element, {
|
|
1860
1860
|
animatesFill,
|
|
1861
1861
|
animatesStroke,
|
|
1862
1862
|
parentGroupFill
|
|
@@ -1878,7 +1878,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1878
1878
|
},
|
|
1879
1879
|
element.id
|
|
1880
1880
|
);
|
|
1881
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1881
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkWEV3C7IC_js.isStrokeOnlyPresetElement(element)) {
|
|
1882
1882
|
base.backgroundColor = "transparent";
|
|
1883
1883
|
base.backgroundImage = void 0;
|
|
1884
1884
|
base.borderWidth = void 0;
|
|
@@ -1892,7 +1892,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1892
1892
|
if (rendersWedgeCalloutVector(element)) {
|
|
1893
1893
|
return base;
|
|
1894
1894
|
}
|
|
1895
|
-
const geometry =
|
|
1895
|
+
const geometry = chunkWEV3C7IC_js.resolveShapeGeometry(element);
|
|
1896
1896
|
switch (geometry.kind) {
|
|
1897
1897
|
case "bare":
|
|
1898
1898
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1916,7 +1916,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
function getConnectorPathGeometry2(element) {
|
|
1919
|
-
return
|
|
1919
|
+
return chunkWEV3C7IC_js.getConnectorPathGeometry(element);
|
|
1920
1920
|
}
|
|
1921
1921
|
var ARROW_SIZE_SCALE = {
|
|
1922
1922
|
sm: 0.6,
|
|
@@ -1985,11 +1985,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1985
1985
|
strokePaint,
|
|
1986
1986
|
strokeWidth,
|
|
1987
1987
|
dashArray,
|
|
1988
|
-
lineCap:
|
|
1988
|
+
lineCap: chunkWEV3C7IC_js.svgLineCap(shapeStyle?.lineCap),
|
|
1989
1989
|
lineJoin,
|
|
1990
1990
|
miterLimit,
|
|
1991
|
-
offsets:
|
|
1992
|
-
widths:
|
|
1991
|
+
offsets: chunkWEV3C7IC_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1992
|
+
widths: chunkWEV3C7IC_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1993
1993
|
};
|
|
1994
1994
|
}
|
|
1995
1995
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2012,12 +2012,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
2012
2012
|
}
|
|
2013
2013
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2014
2014
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2015
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2015
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkWEV3C7IC_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2016
2016
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2017
|
-
const gradientPaint = gradient ?
|
|
2017
|
+
const gradientPaint = gradient ? chunkWEV3C7IC_js.svgGradientFillRef(gradient) : void 0;
|
|
2018
2018
|
const nodes = [];
|
|
2019
2019
|
if (subpaths && needsPerSubpath) {
|
|
2020
|
-
const paints =
|
|
2020
|
+
const paints = chunkWEV3C7IC_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2021
2021
|
paints.forEach((paint, idx) => {
|
|
2022
2022
|
if (paint.fill !== "none") {
|
|
2023
2023
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2046,7 +2046,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2046
2046
|
"path",
|
|
2047
2047
|
{
|
|
2048
2048
|
d: pathData,
|
|
2049
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2049
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkWEV3C7IC_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2050
2050
|
stroke: "none",
|
|
2051
2051
|
vectorEffect: "non-scaling-stroke"
|
|
2052
2052
|
},
|
|
@@ -2072,14 +2072,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2072
2072
|
);
|
|
2073
2073
|
}
|
|
2074
2074
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2075
|
-
if (!
|
|
2075
|
+
if (!chunkWEV3C7IC_js.hasShapeProperties(element)) {
|
|
2076
2076
|
return null;
|
|
2077
2077
|
}
|
|
2078
2078
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2079
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2080
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2081
|
-
const dashType =
|
|
2082
|
-
const dashArray =
|
|
2079
|
+
const fillPaint = animatesFill ? "inherit" : chunkWEV3C7IC_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2080
|
+
const strokePaint = animatesStroke ? "inherit" : chunkWEV3C7IC_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2081
|
+
const dashType = chunkWEV3C7IC_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2082
|
+
const dashArray = chunkWEV3C7IC_js.getSvgStrokeDasharray(
|
|
2083
2083
|
dashType,
|
|
2084
2084
|
Math.max(strokeWidth, 1),
|
|
2085
2085
|
element.shapeStyle?.customDashSegments
|
|
@@ -2160,13 +2160,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2160
2160
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2161
2161
|
// without this the shape fell back to the parser's representative solid
|
|
2162
2162
|
// and lost every fade (issue #132).
|
|
2163
|
-
|
|
2163
|
+
chunkWEV3C7IC_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2164
2164
|
);
|
|
2165
2165
|
}
|
|
2166
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2166
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkWEV3C7IC_js.buildStrokeOutline(element)) {
|
|
2167
2167
|
const width = Math.max(element.width, 1);
|
|
2168
2168
|
const height = Math.max(element.height, 1);
|
|
2169
|
-
const geometry =
|
|
2169
|
+
const geometry = chunkWEV3C7IC_js.getPresetShapeVectorGeometry(
|
|
2170
2170
|
element.shapeType || "rect",
|
|
2171
2171
|
width,
|
|
2172
2172
|
height,
|
|
@@ -2194,18 +2194,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2194
2194
|
);
|
|
2195
2195
|
}
|
|
2196
2196
|
}
|
|
2197
|
-
if (element.type === "shape" &&
|
|
2197
|
+
if (element.type === "shape" && chunkWEV3C7IC_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2198
2198
|
const width = Math.max(element.width, 1);
|
|
2199
2199
|
const height = Math.max(element.height, 1);
|
|
2200
|
-
const geometry =
|
|
2200
|
+
const geometry = chunkWEV3C7IC_js.getPresetShapeVectorGeometry(
|
|
2201
2201
|
element.shapeType,
|
|
2202
2202
|
width,
|
|
2203
2203
|
height,
|
|
2204
2204
|
element.shapeAdjustments
|
|
2205
2205
|
);
|
|
2206
2206
|
if (geometry) {
|
|
2207
|
-
const gradient =
|
|
2208
|
-
const gradientPaint = gradient ?
|
|
2207
|
+
const gradient = chunkWEV3C7IC_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2208
|
+
const gradientPaint = gradient ? chunkWEV3C7IC_js.svgGradientFillRef(gradient) : void 0;
|
|
2209
2209
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2210
2210
|
"svg",
|
|
2211
2211
|
{
|
|
@@ -2238,18 +2238,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2238
2238
|
);
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
|
-
if (
|
|
2241
|
+
if (chunkWEV3C7IC_js.isCalloutShape(normalizedType)) {
|
|
2242
2242
|
const width = Math.max(element.width, 1);
|
|
2243
2243
|
const height = Math.max(element.height, 1);
|
|
2244
|
-
const geometry =
|
|
2244
|
+
const geometry = chunkWEV3C7IC_js.getCalloutLeaderLineGeometry(
|
|
2245
2245
|
normalizedType,
|
|
2246
2246
|
width,
|
|
2247
2247
|
height,
|
|
2248
2248
|
element.shapeAdjustments
|
|
2249
2249
|
);
|
|
2250
2250
|
if (geometry && geometry.points.length >= 2) {
|
|
2251
|
-
const leaderPath =
|
|
2252
|
-
const bounds =
|
|
2251
|
+
const leaderPath = chunkWEV3C7IC_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2252
|
+
const bounds = chunkWEV3C7IC_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2253
2253
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2254
2254
|
const offsetLeft = bounds.minX;
|
|
2255
2255
|
const offsetTop = bounds.minY;
|
|
@@ -2312,10 +2312,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2312
2312
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2313
2313
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2314
2314
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2315
|
-
const connectorLineCap =
|
|
2315
|
+
const connectorLineCap = chunkWEV3C7IC_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2316
2316
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2317
|
-
const offsets =
|
|
2318
|
-
const widths =
|
|
2317
|
+
const offsets = chunkWEV3C7IC_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2318
|
+
const widths = chunkWEV3C7IC_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2319
2319
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2320
2320
|
"svg",
|
|
2321
2321
|
{
|
|
@@ -2382,15 +2382,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
const rawStops = stops.map((gs) => {
|
|
2384
2384
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2385
|
-
const color =
|
|
2386
|
-
const opacity =
|
|
2385
|
+
const color = chunkWEV3C7IC_js.parseDrawingColor(gs) ?? "#888888";
|
|
2386
|
+
const opacity = chunkWEV3C7IC_js.parseDrawingColorOpacity(gs);
|
|
2387
2387
|
return { position: pos, color, opacity };
|
|
2388
2388
|
}).sort((a, b) => a.position - b.position);
|
|
2389
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2389
|
+
const stopStrings = rawStops.map((s) => `${chunkWEV3C7IC_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2390
2390
|
const lin = gradFill["a:lin"];
|
|
2391
2391
|
if (lin) {
|
|
2392
2392
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2393
|
-
const angleDeg = Math.round(
|
|
2393
|
+
const angleDeg = Math.round(chunkWEV3C7IC_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2394
2394
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2395
2395
|
}
|
|
2396
2396
|
const path = gradFill["a:path"];
|
|
@@ -2404,7 +2404,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2404
2404
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2405
2405
|
} : void 0;
|
|
2406
2406
|
if (pathType === "rect") {
|
|
2407
|
-
return
|
|
2407
|
+
return chunkWEV3C7IC_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2408
2408
|
}
|
|
2409
2409
|
let cx = 50;
|
|
2410
2410
|
let cy = 50;
|
|
@@ -2426,8 +2426,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2426
2426
|
if (!pattFill) {
|
|
2427
2427
|
return void 0;
|
|
2428
2428
|
}
|
|
2429
|
-
const fgColor =
|
|
2430
|
-
const bgColor =
|
|
2429
|
+
const fgColor = chunkWEV3C7IC_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2430
|
+
const bgColor = chunkWEV3C7IC_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2431
2431
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2432
2432
|
switch (preset) {
|
|
2433
2433
|
case "ltHorz":
|
|
@@ -2538,11 +2538,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2538
2538
|
const prstDash = ln["a:prstDash"];
|
|
2539
2539
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2540
2540
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2541
|
-
const color =
|
|
2541
|
+
const color = chunkWEV3C7IC_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2542
2542
|
if (color) {
|
|
2543
|
-
const opacity =
|
|
2543
|
+
const opacity = chunkWEV3C7IC_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2544
2544
|
const key = `${edge.prefix}`;
|
|
2545
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2545
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkWEV3C7IC_js.colorWithOpacity(color, opacity)}`;
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
2548
|
return borderStyle;
|
|
@@ -2555,7 +2555,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2555
2555
|
const textShadowParts = [];
|
|
2556
2556
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2557
2557
|
if (outerShdw) {
|
|
2558
|
-
const shdwColor =
|
|
2558
|
+
const shdwColor = chunkWEV3C7IC_js.parseDrawingColor(outerShdw);
|
|
2559
2559
|
if (shdwColor) {
|
|
2560
2560
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2561
2561
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2573,7 +2573,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2573
2573
|
}
|
|
2574
2574
|
const glow = effectLst["a:glow"];
|
|
2575
2575
|
if (glow) {
|
|
2576
|
-
const glowColor =
|
|
2576
|
+
const glowColor = chunkWEV3C7IC_js.parseDrawingColor(glow);
|
|
2577
2577
|
if (glowColor) {
|
|
2578
2578
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2579
2579
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2595,11 +2595,11 @@ function extractCellText(cellXml) {
|
|
|
2595
2595
|
const textParts = [];
|
|
2596
2596
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2597
2597
|
runs.forEach((run) => {
|
|
2598
|
-
textParts.push(
|
|
2598
|
+
textParts.push(chunkWEV3C7IC_js.xmlText(run["a:t"]) ?? "");
|
|
2599
2599
|
});
|
|
2600
2600
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2601
2601
|
fields.forEach((field) => {
|
|
2602
|
-
textParts.push(
|
|
2602
|
+
textParts.push(chunkWEV3C7IC_js.xmlText(field["a:t"]) ?? "");
|
|
2603
2603
|
});
|
|
2604
2604
|
paragraphTexts.push(textParts.join(""));
|
|
2605
2605
|
});
|
|
@@ -2643,10 +2643,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2643
2643
|
if (runProps?.["@_u"] !== void 0) {
|
|
2644
2644
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2645
2645
|
}
|
|
2646
|
-
const runColor =
|
|
2646
|
+
const runColor = chunkWEV3C7IC_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkWEV3C7IC_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2647
2647
|
if (runColor) {
|
|
2648
|
-
const opacity =
|
|
2649
|
-
cellStyle.color =
|
|
2648
|
+
const opacity = chunkWEV3C7IC_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2649
|
+
cellStyle.color = chunkWEV3C7IC_js.colorWithOpacity(runColor, opacity);
|
|
2650
2650
|
}
|
|
2651
2651
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2652
2652
|
if (fontFamily) {
|
|
@@ -2656,15 +2656,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2656
2656
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2657
2657
|
}
|
|
2658
2658
|
const cellProperties = cellXml["a:tcPr"];
|
|
2659
|
-
const cellFill =
|
|
2659
|
+
const cellFill = chunkWEV3C7IC_js.parseDrawingColor(
|
|
2660
2660
|
cellProperties?.["a:solidFill"],
|
|
2661
2661
|
schemeColorOverrides
|
|
2662
2662
|
);
|
|
2663
2663
|
if (cellFill) {
|
|
2664
|
-
const opacity =
|
|
2664
|
+
const opacity = chunkWEV3C7IC_js.parseDrawingColorOpacity(
|
|
2665
2665
|
cellProperties?.["a:solidFill"]
|
|
2666
2666
|
);
|
|
2667
|
-
cellStyle.backgroundColor =
|
|
2667
|
+
cellStyle.backgroundColor = chunkWEV3C7IC_js.colorWithOpacity(cellFill, opacity);
|
|
2668
2668
|
} else {
|
|
2669
2669
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2670
2670
|
if (gradCss) {
|
|
@@ -2679,16 +2679,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2679
2679
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2680
2680
|
Object.assign(cellStyle, edgeBorders);
|
|
2681
2681
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2682
|
-
const borderColor =
|
|
2682
|
+
const borderColor = chunkWEV3C7IC_js.parseDrawingColor(
|
|
2683
2683
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2684
2684
|
schemeColorOverrides
|
|
2685
|
-
) ||
|
|
2685
|
+
) || chunkWEV3C7IC_js.parseDrawingColor(
|
|
2686
2686
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2687
2687
|
schemeColorOverrides
|
|
2688
|
-
) ||
|
|
2688
|
+
) || chunkWEV3C7IC_js.parseDrawingColor(
|
|
2689
2689
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2690
2690
|
schemeColorOverrides
|
|
2691
|
-
) ||
|
|
2691
|
+
) || chunkWEV3C7IC_js.parseDrawingColor(
|
|
2692
2692
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2693
2693
|
schemeColorOverrides
|
|
2694
2694
|
);
|
|
@@ -2760,7 +2760,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2760
2760
|
if (element.type !== "table") {
|
|
2761
2761
|
return void 0;
|
|
2762
2762
|
}
|
|
2763
|
-
return
|
|
2763
|
+
return chunkWEV3C7IC_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2764
2764
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2765
2765
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2766
2766
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2840,7 +2840,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2840
2840
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2841
2841
|
"span",
|
|
2842
2842
|
{
|
|
2843
|
-
style: { position: "relative", ...
|
|
2843
|
+
style: { position: "relative", ...chunkWEV3C7IC_js.cellRunStyle(run) },
|
|
2844
2844
|
children: run.text
|
|
2845
2845
|
},
|
|
2846
2846
|
`r-${index}`
|
|
@@ -2848,7 +2848,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2848
2848
|
});
|
|
2849
2849
|
}
|
|
2850
2850
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2851
|
-
return
|
|
2851
|
+
return chunkWEV3C7IC_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2852
2852
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2853
2853
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2854
2854
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2981,7 +2981,7 @@ function TableResizeOverlay({
|
|
|
2981
2981
|
const containerRef = React8.useRef(null);
|
|
2982
2982
|
const [rowBounds, setRowBounds] = React8.useState([]);
|
|
2983
2983
|
const dragRef = React8.useRef(null);
|
|
2984
|
-
const colBoundaries = React8.useMemo(() =>
|
|
2984
|
+
const colBoundaries = React8.useMemo(() => chunkWEV3C7IC_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2985
2985
|
const measureRows = React8.useCallback(() => {
|
|
2986
2986
|
const container = containerRef.current;
|
|
2987
2987
|
if (!container) {
|
|
@@ -3028,11 +3028,11 @@ function TableResizeOverlay({
|
|
|
3028
3028
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3029
3029
|
if (e.clientX !== drag.startPos && drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3030
3030
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3031
|
-
onResizeColumns(
|
|
3031
|
+
onResizeColumns(chunkWEV3C7IC_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3032
3032
|
} else if (e.clientY !== drag.startPos && drag.type === "row" && onResizeRow) {
|
|
3033
3033
|
const deltaY = e.clientY - drag.startPos;
|
|
3034
|
-
const newHeight =
|
|
3035
|
-
drag.initialRowHeight ??
|
|
3034
|
+
const newHeight = chunkWEV3C7IC_js.computeResizedRowHeight(
|
|
3035
|
+
drag.initialRowHeight ?? chunkWEV3C7IC_js.DEFAULT_ROW_HEIGHT,
|
|
3036
3036
|
deltaY
|
|
3037
3037
|
);
|
|
3038
3038
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3070,7 +3070,7 @@ function TableResizeOverlay({
|
|
|
3070
3070
|
e.stopPropagation();
|
|
3071
3071
|
const table = containerRef.current?.querySelector("table");
|
|
3072
3072
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3073
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3073
|
+
const actualHeight = tr?.offsetHeight ?? chunkWEV3C7IC_js.DEFAULT_ROW_HEIGHT;
|
|
3074
3074
|
document.body.style.cursor = "row-resize";
|
|
3075
3075
|
document.body.style.userSelect = "none";
|
|
3076
3076
|
dragRef.current = {
|
|
@@ -3110,14 +3110,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3110
3110
|
const rowCount = tableData.rows.length;
|
|
3111
3111
|
const columnCount = tableData.columnWidths.length;
|
|
3112
3112
|
const selectedCell = options?.selectedCell || null;
|
|
3113
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3113
|
+
const isEditable = Boolean(options?.editable) && chunkWEV3C7IC_js.canDrillDown(element);
|
|
3114
3114
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3115
3115
|
const sharedCtx = {
|
|
3116
3116
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3117
3117
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3118
3118
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3119
3119
|
};
|
|
3120
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3120
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkWEV3C7IC_js.tableCellCss(
|
|
3121
3121
|
tableData,
|
|
3122
3122
|
cell,
|
|
3123
3123
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3130,7 +3130,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3130
3130
|
}
|
|
3131
3131
|
const first = selectedCell.selectedCells[0];
|
|
3132
3132
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3133
|
-
return
|
|
3133
|
+
return chunkWEV3C7IC_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3134
3134
|
})();
|
|
3135
3135
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3136
3136
|
TableResizeOverlay,
|
|
@@ -3151,9 +3151,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3151
3151
|
{
|
|
3152
3152
|
className: "w-full h-full border-collapse table-fixed",
|
|
3153
3153
|
style: {
|
|
3154
|
-
fontFamily:
|
|
3154
|
+
fontFamily: chunkWEV3C7IC_js.DEFAULT_FONT_FAMILY,
|
|
3155
3155
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3156
|
-
...
|
|
3156
|
+
...chunkWEV3C7IC_js.tableContainerCss(tableData)
|
|
3157
3157
|
},
|
|
3158
3158
|
children: [
|
|
3159
3159
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3172,7 +3172,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3172
3172
|
return null;
|
|
3173
3173
|
}
|
|
3174
3174
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3175
|
-
const isInMultiSelection =
|
|
3175
|
+
const isInMultiSelection = chunkWEV3C7IC_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3176
3176
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3177
3177
|
const diag = getCellDiagonalBorders2(
|
|
3178
3178
|
cell.style,
|
|
@@ -3201,7 +3201,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3201
3201
|
}
|
|
3202
3202
|
event.stopPropagation();
|
|
3203
3203
|
if (event.shiftKey && selectedCell) {
|
|
3204
|
-
const rect =
|
|
3204
|
+
const rect = chunkWEV3C7IC_js.computeSelectionRect(
|
|
3205
3205
|
selectedCell.rowIndex,
|
|
3206
3206
|
selectedCell.columnIndex,
|
|
3207
3207
|
rowIndex,
|
|
@@ -3211,7 +3211,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3211
3211
|
options?.onSelectCell?.({
|
|
3212
3212
|
rowIndex: selectedCell.rowIndex,
|
|
3213
3213
|
columnIndex: selectedCell.columnIndex,
|
|
3214
|
-
selectedCells:
|
|
3214
|
+
selectedCells: chunkWEV3C7IC_js.rectToCells(rect)
|
|
3215
3215
|
});
|
|
3216
3216
|
} else {
|
|
3217
3217
|
options?.onSelectCell?.({
|
|
@@ -3275,7 +3275,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3275
3275
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkLKL6DQ55_js.translationsEn["pptx.table.title"] });
|
|
3276
3276
|
}
|
|
3277
3277
|
const selectedCell = options?.selectedCell || null;
|
|
3278
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3278
|
+
const isEditable = Boolean(options?.editable) && chunkWEV3C7IC_js.canDrillDown(element);
|
|
3279
3279
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3280
3280
|
const tableEl = element;
|
|
3281
3281
|
const xmlSelectionRect = (() => {
|
|
@@ -3287,7 +3287,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3287
3287
|
}
|
|
3288
3288
|
const first = selectedCell.selectedCells[0];
|
|
3289
3289
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3290
|
-
return
|
|
3290
|
+
return chunkWEV3C7IC_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3291
3291
|
})();
|
|
3292
3292
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3293
3293
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3309,9 +3309,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3309
3309
|
{
|
|
3310
3310
|
className: "w-full h-full border-collapse table-fixed",
|
|
3311
3311
|
style: {
|
|
3312
|
-
fontFamily:
|
|
3312
|
+
fontFamily: chunkWEV3C7IC_js.DEFAULT_FONT_FAMILY,
|
|
3313
3313
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3314
|
-
...
|
|
3314
|
+
...chunkWEV3C7IC_js.tableContainerCss(tableEl.tableData)
|
|
3315
3315
|
},
|
|
3316
3316
|
children: [
|
|
3317
3317
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3368,7 +3368,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3368
3368
|
color: textStyle.color,
|
|
3369
3369
|
...bandStyle,
|
|
3370
3370
|
...xmlCellStyle,
|
|
3371
|
-
...tdCellOverride ?
|
|
3371
|
+
...tdCellOverride ? chunkWEV3C7IC_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3372
3372
|
...diag ? { position: "relative" } : void 0
|
|
3373
3373
|
};
|
|
3374
3374
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3378,7 +3378,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3378
3378
|
"border px-1 py-0.5 align-top",
|
|
3379
3379
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3380
3380
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3381
|
-
|
|
3381
|
+
chunkWEV3C7IC_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3382
3382
|
),
|
|
3383
3383
|
colSpan,
|
|
3384
3384
|
rowSpan: rSpan,
|
|
@@ -3389,7 +3389,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3389
3389
|
}
|
|
3390
3390
|
event.stopPropagation();
|
|
3391
3391
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3392
|
-
const rect =
|
|
3392
|
+
const rect = chunkWEV3C7IC_js.computeSelectionRect(
|
|
3393
3393
|
selectedCell.rowIndex,
|
|
3394
3394
|
selectedCell.columnIndex,
|
|
3395
3395
|
rowIndex,
|
|
@@ -3399,7 +3399,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3399
3399
|
options?.onSelectCell?.({
|
|
3400
3400
|
rowIndex: selectedCell.rowIndex,
|
|
3401
3401
|
columnIndex: selectedCell.columnIndex,
|
|
3402
|
-
selectedCells:
|
|
3402
|
+
selectedCells: chunkWEV3C7IC_js.rectToCells(rect)
|
|
3403
3403
|
});
|
|
3404
3404
|
} else {
|
|
3405
3405
|
options?.onSelectCell?.({
|
|
@@ -3461,23 +3461,23 @@ function renderGradientStops(stops) {
|
|
|
3461
3461
|
return stops.map((stop, i) => /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: stop.offset, stopColor: stop.color, stopOpacity: stop.opacity }, i));
|
|
3462
3462
|
}
|
|
3463
3463
|
function partAttrs(part) {
|
|
3464
|
-
return part ?
|
|
3464
|
+
return part ? chunkWEV3C7IC_js.chartPartToAttrs(part) : void 0;
|
|
3465
3465
|
}
|
|
3466
3466
|
function resolveReactPalette(chartData) {
|
|
3467
3467
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3468
3468
|
return chartData.colorPalette;
|
|
3469
3469
|
}
|
|
3470
|
-
return [...
|
|
3470
|
+
return [...chunkWEV3C7IC_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3471
3471
|
}
|
|
3472
3472
|
function buildReactChartViewModel(element) {
|
|
3473
3473
|
if (element.type !== "chart" || !element.chartData) {
|
|
3474
|
-
return
|
|
3474
|
+
return chunkWEV3C7IC_js.buildChartViewModel(element);
|
|
3475
3475
|
}
|
|
3476
3476
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3477
3477
|
...element,
|
|
3478
3478
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3479
3479
|
};
|
|
3480
|
-
return
|
|
3480
|
+
return chunkWEV3C7IC_js.buildChartViewModel(themedElement);
|
|
3481
3481
|
}
|
|
3482
3482
|
function renderPrimitive(prim, key) {
|
|
3483
3483
|
switch (prim.kind) {
|
|
@@ -3629,7 +3629,7 @@ function renderText(t, key) {
|
|
|
3629
3629
|
);
|
|
3630
3630
|
}
|
|
3631
3631
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3632
|
-
const legendItems =
|
|
3632
|
+
const legendItems = chunkWEV3C7IC_js.computeChartLegendLayout(vm);
|
|
3633
3633
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3634
3634
|
"svg",
|
|
3635
3635
|
{
|
|
@@ -3798,11 +3798,11 @@ function renderChartElement(element) {
|
|
|
3798
3798
|
if (!chartData || chartData.series.length === 0) {
|
|
3799
3799
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkLKL6DQ55_js.translationsEn["pptx.chart.heading"] });
|
|
3800
3800
|
}
|
|
3801
|
-
const kind =
|
|
3801
|
+
const kind = chunkWEV3C7IC_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3802
3802
|
return renderChartViewModel(
|
|
3803
3803
|
element.id,
|
|
3804
3804
|
buildReactChartViewModel(element),
|
|
3805
|
-
|
|
3805
|
+
chunkWEV3C7IC_js.chartPreserveAspectRatio(kind)
|
|
3806
3806
|
);
|
|
3807
3807
|
}
|
|
3808
3808
|
|
|
@@ -3822,14 +3822,14 @@ function buildNotesPdf(pages) {
|
|
|
3822
3822
|
notes: page.notes,
|
|
3823
3823
|
slideNumber: page.slideNumber
|
|
3824
3824
|
}));
|
|
3825
|
-
const bytes =
|
|
3825
|
+
const bytes = chunkWEV3C7IC_js.buildNotesPdfBytes(images, meta);
|
|
3826
3826
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3827
3827
|
return URL.createObjectURL(blob);
|
|
3828
3828
|
}
|
|
3829
3829
|
|
|
3830
3830
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3831
3831
|
function buildPdfFromTiledImageData(pages) {
|
|
3832
|
-
const bytes =
|
|
3832
|
+
const bytes = chunkWEV3C7IC_js.buildTiledSlidesPdfBytes(pages);
|
|
3833
3833
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3834
3834
|
return URL.createObjectURL(blob);
|
|
3835
3835
|
}
|
|
@@ -3839,9 +3839,9 @@ var activePreview = null;
|
|
|
3839
3839
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3840
3840
|
stopPreviewAnimation();
|
|
3841
3841
|
const domEl = document.querySelector(`[data-element-id="${elementId}"]`);
|
|
3842
|
-
const descriptor =
|
|
3842
|
+
const descriptor = chunkWEV3C7IC_js.buildPreviewAnimation(preset, {
|
|
3843
3843
|
...options,
|
|
3844
|
-
geometry: domEl ?
|
|
3844
|
+
geometry: domEl ? chunkWEV3C7IC_js.measurePreviewGeometry(domEl) : void 0
|
|
3845
3845
|
});
|
|
3846
3846
|
if (!descriptor) {
|
|
3847
3847
|
return;
|
|
@@ -3855,7 +3855,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3855
3855
|
return;
|
|
3856
3856
|
}
|
|
3857
3857
|
const stage = domEl.offsetParent;
|
|
3858
|
-
const descriptor =
|
|
3858
|
+
const descriptor = chunkWEV3C7IC_js.buildMotionPathPreview({
|
|
3859
3859
|
path,
|
|
3860
3860
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3861
3861
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|