pptx-react-viewer 3.19.0 → 3.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/{AiChatPanel-WDVU4RIM.js → AiChatPanel-DLADHD56.js} +24 -24
- package/dist/AiChatPanel-DLADHD56.js.br +0 -0
- package/dist/AiChatPanel-DLADHD56.js.gz +0 -0
- package/dist/{AiChatPanel-3M7XWTVE.mjs → AiChatPanel-MSALNPYW.mjs} +3 -3
- package/dist/AiChatPanel-MSALNPYW.mjs.br +0 -0
- package/dist/AiChatPanel-MSALNPYW.mjs.gz +0 -0
- package/dist/{Area3DChartScene-CTVWVXNW.mjs → Area3DChartScene-53ZVPYKG.mjs} +1 -1
- package/dist/Area3DChartScene-53ZVPYKG.mjs.br +0 -0
- package/dist/Area3DChartScene-53ZVPYKG.mjs.gz +0 -0
- package/dist/{Area3DChartScene-N5KPQFC6.js → Area3DChartScene-BQQHOYRS.js} +2 -2
- package/dist/Area3DChartScene-BQQHOYRS.js.br +0 -0
- package/dist/Area3DChartScene-BQQHOYRS.js.gz +0 -0
- package/dist/{Bar3DChartScene-PXFSFZRX.mjs → Bar3DChartScene-IN67ZH3P.mjs} +1 -1
- package/dist/{Bar3DChartScene-PXFSFZRX.mjs.br → Bar3DChartScene-IN67ZH3P.mjs.br} +0 -0
- package/dist/Bar3DChartScene-IN67ZH3P.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-3QRUPVPT.js → Bar3DChartScene-PNQOIOIH.js} +2 -2
- package/dist/Bar3DChartScene-PNQOIOIH.js.br +0 -0
- package/dist/Bar3DChartScene-PNQOIOIH.js.gz +0 -0
- package/dist/{Line3DChartScene-LLL3BU4Q.mjs → Line3DChartScene-4SQUUAOW.mjs} +1 -1
- package/dist/{Line3DChartScene-LLL3BU4Q.mjs.br → Line3DChartScene-4SQUUAOW.mjs.br} +0 -0
- package/dist/Line3DChartScene-4SQUUAOW.mjs.gz +0 -0
- package/dist/{Line3DChartScene-776WLKR5.js → Line3DChartScene-CFSTMTFH.js} +2 -2
- package/dist/Line3DChartScene-CFSTMTFH.js.br +0 -0
- package/dist/Line3DChartScene-CFSTMTFH.js.gz +0 -0
- package/dist/{Model3DScene-7TM2XSJY.js → Model3DScene-DXNAYZ6P.js} +2 -2
- package/dist/Model3DScene-DXNAYZ6P.js.br +0 -0
- package/dist/Model3DScene-DXNAYZ6P.js.gz +0 -0
- package/dist/{Model3DScene-FMQ4FDC5.mjs → Model3DScene-TA55BJY7.mjs} +1 -1
- package/dist/{Model3DScene-FMQ4FDC5.mjs.br → Model3DScene-TA55BJY7.mjs.br} +0 -0
- package/dist/Model3DScene-TA55BJY7.mjs.gz +0 -0
- package/dist/{PieChart3DScene-DZY4MQCG.js → PieChart3DScene-NCBKTWAO.js} +2 -2
- package/dist/PieChart3DScene-NCBKTWAO.js.br +0 -0
- package/dist/PieChart3DScene-NCBKTWAO.js.gz +0 -0
- package/dist/{PieChart3DScene-2YNQ5J7A.mjs → PieChart3DScene-TQOCHJOY.mjs} +1 -1
- package/dist/{PieChart3DScene-2YNQ5J7A.mjs.br → PieChart3DScene-TQOCHJOY.mjs.br} +0 -0
- package/dist/PieChart3DScene-TQOCHJOY.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-XJHLH2EM.mjs → SurfaceChart3DScene-7CSF2GPT.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-XJHLH2EM.mjs.br → SurfaceChart3DScene-7CSF2GPT.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-7CSF2GPT.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-G3MWPEL3.js → SurfaceChart3DScene-VA6IRLFG.js} +2 -2
- package/dist/SurfaceChart3DScene-VA6IRLFG.js.br +0 -0
- package/dist/SurfaceChart3DScene-VA6IRLFG.js.gz +0 -0
- package/dist/{chunk-F552WUJN.mjs → chunk-3KVLOKA6.mjs} +15 -1
- package/dist/chunk-3KVLOKA6.mjs.br +0 -0
- package/dist/{chunk-F552WUJN.mjs.gz → chunk-3KVLOKA6.mjs.gz} +0 -0
- package/dist/{chunk-V6S72IRP.js → chunk-4WUGOCYU.js} +172 -172
- package/dist/chunk-4WUGOCYU.js.br +0 -0
- package/dist/chunk-4WUGOCYU.js.gz +0 -0
- package/dist/{chunk-2QWLARCW.js → chunk-AZEDCITO.js} +803 -796
- package/dist/chunk-AZEDCITO.js.br +0 -0
- package/dist/chunk-AZEDCITO.js.gz +0 -0
- package/dist/{chunk-3R5A2E2K.mjs → chunk-DNQ3PGGU.mjs} +27 -20
- package/dist/chunk-DNQ3PGGU.mjs.br +0 -0
- package/dist/chunk-DNQ3PGGU.mjs.gz +0 -0
- package/dist/{chunk-LBMPJYAR.js → chunk-EJSRXEXA.js} +15 -0
- package/dist/chunk-EJSRXEXA.js.br +0 -0
- package/dist/{chunk-LBMPJYAR.js.gz → chunk-EJSRXEXA.js.gz} +0 -0
- package/dist/{chunk-4KKKJ5MJ.mjs → chunk-LBKKSCVS.mjs} +1 -1
- package/dist/chunk-LBKKSCVS.mjs.br +0 -0
- package/dist/chunk-LBKKSCVS.mjs.gz +0 -0
- package/dist/{chunk-7VFH2FRI.mjs → chunk-RCUPQJVY.mjs} +1 -1
- package/dist/chunk-RCUPQJVY.mjs.br +0 -0
- package/dist/chunk-RCUPQJVY.mjs.gz +0 -0
- package/dist/{chunk-36O4SE4R.js → chunk-YVZKXCML.js} +5 -5
- package/dist/chunk-YVZKXCML.js.br +0 -0
- package/dist/chunk-YVZKXCML.js.gz +0 -0
- package/dist/{chunk-V3BOQ52U.mjs → chunk-Z3KMGLXL.mjs} +64 -56
- package/dist/chunk-Z3KMGLXL.mjs.br +0 -0
- package/dist/chunk-Z3KMGLXL.mjs.gz +0 -0
- package/dist/{chunk-6DYDAKHG.js → chunk-ZHPBQVBK.js} +1102 -1094
- package/dist/chunk-ZHPBQVBK.js.br +0 -0
- package/dist/chunk-ZHPBQVBK.js.gz +0 -0
- package/dist/index.js +46 -46
- 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-3M7XWTVE.mjs.br +0 -0
- package/dist/AiChatPanel-3M7XWTVE.mjs.gz +0 -0
- package/dist/AiChatPanel-WDVU4RIM.js.br +0 -0
- package/dist/AiChatPanel-WDVU4RIM.js.gz +0 -0
- package/dist/Area3DChartScene-CTVWVXNW.mjs.br +0 -0
- package/dist/Area3DChartScene-CTVWVXNW.mjs.gz +0 -0
- package/dist/Area3DChartScene-N5KPQFC6.js.br +0 -0
- package/dist/Area3DChartScene-N5KPQFC6.js.gz +0 -0
- package/dist/Bar3DChartScene-3QRUPVPT.js.br +0 -0
- package/dist/Bar3DChartScene-3QRUPVPT.js.gz +0 -0
- package/dist/Bar3DChartScene-PXFSFZRX.mjs.gz +0 -0
- package/dist/Line3DChartScene-776WLKR5.js.br +0 -0
- package/dist/Line3DChartScene-776WLKR5.js.gz +0 -0
- package/dist/Line3DChartScene-LLL3BU4Q.mjs.gz +0 -0
- package/dist/Model3DScene-7TM2XSJY.js.br +0 -0
- package/dist/Model3DScene-7TM2XSJY.js.gz +0 -0
- package/dist/Model3DScene-FMQ4FDC5.mjs.gz +0 -0
- package/dist/PieChart3DScene-2YNQ5J7A.mjs.gz +0 -0
- package/dist/PieChart3DScene-DZY4MQCG.js.br +0 -0
- package/dist/PieChart3DScene-DZY4MQCG.js.gz +0 -0
- package/dist/SurfaceChart3DScene-G3MWPEL3.js.br +0 -0
- package/dist/SurfaceChart3DScene-G3MWPEL3.js.gz +0 -0
- package/dist/SurfaceChart3DScene-XJHLH2EM.mjs.gz +0 -0
- package/dist/chunk-2QWLARCW.js.br +0 -0
- package/dist/chunk-2QWLARCW.js.gz +0 -0
- package/dist/chunk-36O4SE4R.js.br +0 -0
- package/dist/chunk-36O4SE4R.js.gz +0 -0
- package/dist/chunk-3R5A2E2K.mjs.br +0 -0
- package/dist/chunk-3R5A2E2K.mjs.gz +0 -0
- package/dist/chunk-4KKKJ5MJ.mjs.br +0 -0
- package/dist/chunk-4KKKJ5MJ.mjs.gz +0 -0
- package/dist/chunk-6DYDAKHG.js.br +0 -0
- package/dist/chunk-6DYDAKHG.js.gz +0 -0
- package/dist/chunk-7VFH2FRI.mjs.br +0 -0
- package/dist/chunk-7VFH2FRI.mjs.gz +0 -0
- package/dist/chunk-F552WUJN.mjs.br +0 -0
- package/dist/chunk-LBMPJYAR.js.br +0 -0
- package/dist/chunk-V3BOQ52U.mjs.br +0 -0
- package/dist/chunk-V3BOQ52U.mjs.gz +0 -0
- package/dist/chunk-V6S72IRP.js.br +0 -0
- package/dist/chunk-V6S72IRP.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkEJSRXEXA_js = require('./chunk-EJSRXEXA.js');
|
|
4
4
|
var chunkBRJN3ZMG_js = require('./chunk-BRJN3ZMG.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -15,7 +15,7 @@ var React7__default = /*#__PURE__*/_interopDefault(React7);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkEJSRXEXA_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 chunkEJSRXEXA_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 = chunkEJSRXEXA_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 = chunkEJSRXEXA_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 = chunkEJSRXEXA_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 (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
227
227
|
return false;
|
|
228
228
|
}
|
|
229
229
|
const st = getShapeType(element.shapeType);
|
|
@@ -232,17 +232,17 @@ function isConnectorOrLineElement(element) {
|
|
|
232
232
|
|
|
233
233
|
// src/viewer/utils/image-style.ts
|
|
234
234
|
function getImageMaskStyle(element) {
|
|
235
|
-
if (!
|
|
235
|
+
if (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkEJSRXEXA_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 =
|
|
245
|
+
const fit = chunkEJSRXEXA_js.getImageFitStyle(element);
|
|
246
246
|
return {
|
|
247
247
|
// A translated/scaled crop must be masked by its stationary wrapper, not
|
|
248
248
|
// by the moving bitmap itself.
|
|
@@ -259,7 +259,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
function getImageSurfaceStyle(element) {
|
|
262
|
-
const fill =
|
|
262
|
+
const fill = chunkEJSRXEXA_js.hasShapeProperties(element) ? chunkEJSRXEXA_js.getComputedFillStyle(element) : void 0;
|
|
263
263
|
return {
|
|
264
264
|
position: "absolute",
|
|
265
265
|
inset: 0,
|
|
@@ -272,13 +272,13 @@ function getImageSurfaceStyle(element) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
function getCropShapeClipPath2(element) {
|
|
275
|
-
if (!
|
|
275
|
+
if (!chunkEJSRXEXA_js.isImageLikeElement(element)) {
|
|
276
276
|
return void 0;
|
|
277
277
|
}
|
|
278
|
-
return
|
|
278
|
+
return chunkEJSRXEXA_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
279
279
|
}
|
|
280
280
|
function getImageTilingStyle2(element) {
|
|
281
|
-
return
|
|
281
|
+
return chunkEJSRXEXA_js.getImageTilingStyle(element);
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -410,7 +410,7 @@ function VideoWithMetadata({
|
|
|
410
410
|
{
|
|
411
411
|
ref: mediaRef,
|
|
412
412
|
className: "w-full h-full pointer-events-auto",
|
|
413
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
413
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkEJSRXEXA_js.getImageFitStyle(element),
|
|
414
414
|
controls: showTransport,
|
|
415
415
|
preload: "metadata",
|
|
416
416
|
playsInline: true,
|
|
@@ -467,7 +467,7 @@ function PresentationMediaController({
|
|
|
467
467
|
const [isMediaPlaying, setIsMediaPlaying] = React7.useState(false);
|
|
468
468
|
const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
|
|
469
469
|
const hideWhenNotPlaying = isPresentationMode && element.hideWhenNotPlaying === true;
|
|
470
|
-
const { volume: playbackVolume, playbackRate } =
|
|
470
|
+
const { volume: playbackVolume, playbackRate } = chunkEJSRXEXA_js.mediaPlaybackAttributes({
|
|
471
471
|
loop: element.loop,
|
|
472
472
|
volume: element.volume,
|
|
473
473
|
playbackSpeed: element.playbackSpeed
|
|
@@ -515,7 +515,7 @@ function PresentationMediaController({
|
|
|
515
515
|
if (!el || !isPresentationMode) {
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
return
|
|
518
|
+
return chunkEJSRXEXA_js.scheduleMediaTrimAndFade(el, {
|
|
519
519
|
trimStartMs: element.trimStartMs,
|
|
520
520
|
trimEndMs: element.trimEndMs,
|
|
521
521
|
fadeInDuration: element.fadeInDuration,
|
|
@@ -536,7 +536,7 @@ function PresentationMediaController({
|
|
|
536
536
|
}
|
|
537
537
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
538
538
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
539
|
-
if (
|
|
539
|
+
if (chunkEJSRXEXA_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
@@ -617,17 +617,17 @@ function Badge({
|
|
|
617
617
|
"div",
|
|
618
618
|
{
|
|
619
619
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
620
|
-
...{ [
|
|
620
|
+
...{ [chunkEJSRXEXA_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
621
621
|
children: [
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
623
|
FallbackIcon,
|
|
624
624
|
{
|
|
625
|
-
paths:
|
|
625
|
+
paths: chunkEJSRXEXA_js.mediaFallbackIcon(visual, element.mediaType),
|
|
626
626
|
size: isMissing ? 32 : 48,
|
|
627
627
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
628
628
|
}
|
|
629
629
|
),
|
|
630
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
630
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkEJSRXEXA_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
631
631
|
]
|
|
632
632
|
}
|
|
633
633
|
);
|
|
@@ -644,17 +644,17 @@ function Placeholder({
|
|
|
644
644
|
"div",
|
|
645
645
|
{
|
|
646
646
|
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"}`,
|
|
647
|
-
...{ [
|
|
647
|
+
...{ [chunkEJSRXEXA_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
648
648
|
children: [
|
|
649
649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
650
650
|
FallbackIcon,
|
|
651
651
|
{
|
|
652
|
-
paths:
|
|
652
|
+
paths: chunkEJSRXEXA_js.mediaFallbackIcon(visual, element.mediaType),
|
|
653
653
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
654
654
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
655
655
|
}
|
|
656
656
|
),
|
|
657
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
657
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkEJSRXEXA_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
658
658
|
]
|
|
659
659
|
}
|
|
660
660
|
);
|
|
@@ -664,7 +664,7 @@ function renderMediaFallback({
|
|
|
664
664
|
posterUrl,
|
|
665
665
|
surface
|
|
666
666
|
}) {
|
|
667
|
-
const visual =
|
|
667
|
+
const visual = chunkEJSRXEXA_js.mediaFallbackVisual(surface, {
|
|
668
668
|
hasPoster: Boolean(posterUrl),
|
|
669
669
|
missing: element.mediaMissing === true
|
|
670
670
|
});
|
|
@@ -676,7 +676,7 @@ function renderMediaFallback({
|
|
|
676
676
|
src: posterUrl,
|
|
677
677
|
alt: visual.dimPoster ? chunkBRJN3ZMG_js.translationsEn["pptx.media.posterAlt"] : chunkBRJN3ZMG_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
678
678
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
679
|
-
style:
|
|
679
|
+
style: chunkEJSRXEXA_js.getImageFitStyle(element)
|
|
680
680
|
}
|
|
681
681
|
),
|
|
682
682
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -694,7 +694,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
694
694
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
695
695
|
const trimFragment = buildTrimFragment(element);
|
|
696
696
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
697
|
-
const shouldLoop =
|
|
697
|
+
const shouldLoop = chunkEJSRXEXA_js.mediaPlaybackAttributes(element).loop;
|
|
698
698
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
699
699
|
const isFullScreen = options?.fullScreen === true;
|
|
700
700
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -777,20 +777,20 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
777
777
|
|
|
778
778
|
// src/viewer/utils/text-utils.tsx
|
|
779
779
|
function getTextStyleForElement(element, fallbackColor) {
|
|
780
|
-
return
|
|
780
|
+
return chunkEJSRXEXA_js.buildTextBlockStyle(element, { fallbackColor });
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
// src/viewer/utils/text-layout.tsx
|
|
784
784
|
function getTextLayoutStyle(element) {
|
|
785
|
-
if (!
|
|
785
|
+
if (!chunkEJSRXEXA_js.hasTextProperties(element)) {
|
|
786
786
|
return {};
|
|
787
787
|
}
|
|
788
|
-
const writingMode =
|
|
789
|
-
const textOrientation =
|
|
790
|
-
const verticalDirection =
|
|
788
|
+
const writingMode = chunkEJSRXEXA_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
789
|
+
const textOrientation = chunkEJSRXEXA_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
790
|
+
const verticalDirection = chunkEJSRXEXA_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
791
791
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
792
792
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
793
|
-
const hasParagraphIndents =
|
|
793
|
+
const hasParagraphIndents = chunkEJSRXEXA_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
794
794
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
795
795
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
796
796
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -799,7 +799,7 @@ function getTextLayoutStyle(element) {
|
|
|
799
799
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
800
800
|
return {
|
|
801
801
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
802
|
-
...
|
|
802
|
+
...chunkEJSRXEXA_js.buildTextBodyLayoutStyle(element),
|
|
803
803
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
804
804
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
805
805
|
paddingTop: bodyTop,
|
|
@@ -827,7 +827,7 @@ function getTextLayoutStyle(element) {
|
|
|
827
827
|
|
|
828
828
|
// src/viewer/utils/text-effects.tsx
|
|
829
829
|
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
830
|
-
return
|
|
830
|
+
return chunkEJSRXEXA_js.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1012,13 +1012,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1012
1012
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1013
1013
|
return renderedSegments;
|
|
1014
1014
|
}
|
|
1015
|
-
const paraKey = `${elementId}${
|
|
1015
|
+
const paraKey = `${elementId}${chunkEJSRXEXA_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1016
1016
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1017
1017
|
if (paraState) {
|
|
1018
1018
|
const style = buildAnimStyle(paraState);
|
|
1019
1019
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1020
1020
|
}
|
|
1021
|
-
const spec =
|
|
1021
|
+
const spec = chunkEJSRXEXA_js.buildTextBuildSpec(
|
|
1022
1022
|
elementId,
|
|
1023
1023
|
paraIndex,
|
|
1024
1024
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1036,7 +1036,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1036
1036
|
"span",
|
|
1037
1037
|
{
|
|
1038
1038
|
"data-anim-id": span.animId,
|
|
1039
|
-
style:
|
|
1039
|
+
style: chunkEJSRXEXA_js.textBuildSpanStyle(span),
|
|
1040
1040
|
children: content
|
|
1041
1041
|
},
|
|
1042
1042
|
span.animId
|
|
@@ -1047,13 +1047,13 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1047
1047
|
if (!isUnderlineWords || !text) {
|
|
1048
1048
|
return inner(text, keyPrefix, metric);
|
|
1049
1049
|
}
|
|
1050
|
-
const pieces =
|
|
1050
|
+
const pieces = chunkEJSRXEXA_js.splitWordsForUnderline(text);
|
|
1051
1051
|
if (pieces.length === 0) {
|
|
1052
1052
|
return inner(text, keyPrefix, metric);
|
|
1053
1053
|
}
|
|
1054
1054
|
const gapMetric = metric ? {
|
|
1055
1055
|
...metric,
|
|
1056
|
-
nestedStyle: metric.nestedStyle ?
|
|
1056
|
+
nestedStyle: metric.nestedStyle ? chunkEJSRXEXA_js.stripUnderlineDecoration(metric.nestedStyle) : void 0
|
|
1057
1057
|
} : void 0;
|
|
1058
1058
|
return pieces.map((piece, i) => {
|
|
1059
1059
|
const key = `${keyPrefix}-u${i}`;
|
|
@@ -1086,7 +1086,7 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1086
1086
|
);
|
|
1087
1087
|
}
|
|
1088
1088
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1089
|
-
const [lineLayout] =
|
|
1089
|
+
const [lineLayout] = chunkEJSRXEXA_js.buildRunTabLines(
|
|
1090
1090
|
line,
|
|
1091
1091
|
ctx,
|
|
1092
1092
|
nestedStyle,
|
|
@@ -1105,7 +1105,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1105
1105
|
if (!needsScriptFonts || !text) {
|
|
1106
1106
|
return text;
|
|
1107
1107
|
}
|
|
1108
|
-
const pieces =
|
|
1108
|
+
const pieces = chunkEJSRXEXA_js.splitRunByScriptFont(
|
|
1109
1109
|
text,
|
|
1110
1110
|
scriptFonts,
|
|
1111
1111
|
baseFontFamily,
|
|
@@ -1122,7 +1122,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1122
1122
|
if (!metric || !text) {
|
|
1123
1123
|
return inner(text, keyPrefix);
|
|
1124
1124
|
}
|
|
1125
|
-
const pieces =
|
|
1125
|
+
const pieces = chunkEJSRXEXA_js.splitRunForMetrics(text, metric.font);
|
|
1126
1126
|
if (pieces.length <= 1) {
|
|
1127
1127
|
return inner(text, keyPrefix);
|
|
1128
1128
|
}
|
|
@@ -1131,7 +1131,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1131
1131
|
{
|
|
1132
1132
|
style: {
|
|
1133
1133
|
...metric.nestedStyle,
|
|
1134
|
-
letterSpacing:
|
|
1134
|
+
letterSpacing: chunkEJSRXEXA_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1135
1135
|
},
|
|
1136
1136
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1137
1137
|
},
|
|
@@ -1207,8 +1207,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1207
1207
|
});
|
|
1208
1208
|
}
|
|
1209
1209
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1210
|
-
const mathml =
|
|
1211
|
-
const safeMathml = mathml ?
|
|
1210
|
+
const mathml = chunkEJSRXEXA_js.convertOmmlToMathMl(equationXml);
|
|
1211
|
+
const safeMathml = mathml ? chunkEJSRXEXA_js.sanitizeMathMl(mathml) : "";
|
|
1212
1212
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1213
1213
|
"span",
|
|
1214
1214
|
{
|
|
@@ -1337,7 +1337,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1337
1337
|
const segmentStyle = segment?.style ?? {};
|
|
1338
1338
|
const textValue = run.text;
|
|
1339
1339
|
const lines = textValue.split("\n");
|
|
1340
|
-
const resolvedSegmentColor =
|
|
1340
|
+
const resolvedSegmentColor = chunkEJSRXEXA_js.normalizeHexColor(
|
|
1341
1341
|
segmentStyle.color || element.textStyle?.color,
|
|
1342
1342
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1343
1343
|
);
|
|
@@ -1345,16 +1345,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1345
1345
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1346
1346
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1347
1347
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1348
|
-
const baseFontSize = rawFontSize *
|
|
1348
|
+
const baseFontSize = rawFontSize * chunkEJSRXEXA_js.resolveAutoFitFontScale(element.textStyle);
|
|
1349
1349
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1350
|
-
const fontKerning =
|
|
1350
|
+
const fontKerning = chunkEJSRXEXA_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1351
1351
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1352
|
-
const baseFontFamily = rawFontFamily ?
|
|
1352
|
+
const baseFontFamily = rawFontFamily ? chunkEJSRXEXA_js.getSubstituteFontFamily(
|
|
1353
1353
|
rawFontFamily,
|
|
1354
|
-
|
|
1354
|
+
chunkEJSRXEXA_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1355
1355
|
) : DEFAULT_FONT_FAMILY2;
|
|
1356
|
-
const scriptFonts =
|
|
1357
|
-
const needsScriptFonts =
|
|
1356
|
+
const scriptFonts = chunkEJSRXEXA_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1357
|
+
const needsScriptFonts = chunkEJSRXEXA_js.hasDistinctScriptFonts(scriptFonts);
|
|
1358
1358
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1359
1359
|
const metricFont = {
|
|
1360
1360
|
fontFamily: baseFontFamily,
|
|
@@ -1362,7 +1362,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1362
1362
|
bold: Boolean(segmentStyle.bold),
|
|
1363
1363
|
italic: Boolean(segmentStyle.italic)
|
|
1364
1364
|
};
|
|
1365
|
-
const nestedStyle =
|
|
1365
|
+
const nestedStyle = chunkEJSRXEXA_js.nestedTextDecorationStyle(run.style);
|
|
1366
1366
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1367
1367
|
const spanStyle = { ...run.style };
|
|
1368
1368
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1370,11 +1370,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1370
1370
|
spanStyle.fontFamily = baseFontFamily;
|
|
1371
1371
|
spanStyle.verticalAlign = baselineShift;
|
|
1372
1372
|
spanStyle.fontKerning = fontKerning;
|
|
1373
|
-
spanStyle.letterSpacing =
|
|
1373
|
+
spanStyle.letterSpacing = chunkEJSRXEXA_js.pieceLetterSpacing(
|
|
1374
1374
|
authoredLetterSpacing,
|
|
1375
|
-
|
|
1375
|
+
chunkEJSRXEXA_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1376
1376
|
);
|
|
1377
|
-
const hollow =
|
|
1377
|
+
const hollow = chunkEJSRXEXA_js.hollowTextFillStyle(segmentStyle, {
|
|
1378
1378
|
color: resolvedSegmentColor,
|
|
1379
1379
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1380
1380
|
});
|
|
@@ -1389,7 +1389,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1389
1389
|
const isUnderlineWords = Boolean(segmentStyle.underline) && segmentStyle.underlineStyle === "words";
|
|
1390
1390
|
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1391
1391
|
if (isUnderlineWords) {
|
|
1392
|
-
const stripped =
|
|
1392
|
+
const stripped = chunkEJSRXEXA_js.stripUnderlineDecoration(spanStyle);
|
|
1393
1393
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
1394
1394
|
delete spanStyle.textDecorationStyle;
|
|
1395
1395
|
delete spanStyle.textDecorationThickness;
|
|
@@ -1405,7 +1405,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1405
1405
|
scriptFonts,
|
|
1406
1406
|
baseFontFamily,
|
|
1407
1407
|
findHighlights,
|
|
1408
|
-
|
|
1408
|
+
chunkEJSRXEXA_js.buildTabContext(
|
|
1409
1409
|
element.textStyle?.tabStops,
|
|
1410
1410
|
element.textStyle?.defaultTabSize,
|
|
1411
1411
|
baseFontSize,
|
|
@@ -1437,14 +1437,14 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1437
1437
|
const segment = sourceRun ? segments[seed.segmentIndex] : { text: seed.text, style: seed.style };
|
|
1438
1438
|
const resolvedSegment = {
|
|
1439
1439
|
...segment,
|
|
1440
|
-
style:
|
|
1440
|
+
style: chunkEJSRXEXA_js.withInlineListDecorationDefaults(segment.style, context.element.textStyle)
|
|
1441
1441
|
};
|
|
1442
|
-
const decorationCss =
|
|
1442
|
+
const decorationCss = chunkEJSRXEXA_js.segmentStyleToCss(
|
|
1443
1443
|
resolvedSegment,
|
|
1444
|
-
|
|
1444
|
+
chunkEJSRXEXA_js.resolveAutoFitFontScale(context.element.textStyle)
|
|
1445
1445
|
);
|
|
1446
|
-
|
|
1447
|
-
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...
|
|
1446
|
+
chunkEJSRXEXA_js.applyUnderlineVariant(decorationCss, resolvedSegment);
|
|
1447
|
+
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...chunkEJSRXEXA_js.nestedTextDecorationStyle(decorationCss) } } : {
|
|
1448
1448
|
text: seed.text,
|
|
1449
1449
|
style: decorationCss,
|
|
1450
1450
|
segmentIndex: seed.segmentIndex
|
|
@@ -1459,7 +1459,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1459
1459
|
});
|
|
1460
1460
|
}
|
|
1461
1461
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1462
|
-
if (!
|
|
1462
|
+
if (!chunkEJSRXEXA_js.hasTextProperties(element)) {
|
|
1463
1463
|
return emptyFallback || null;
|
|
1464
1464
|
}
|
|
1465
1465
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1469,7 +1469,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1469
1469
|
}
|
|
1470
1470
|
return element.text || emptyFallback || "";
|
|
1471
1471
|
}
|
|
1472
|
-
const paragraphs =
|
|
1472
|
+
const paragraphs = chunkEJSRXEXA_js.buildParagraphs(
|
|
1473
1473
|
element,
|
|
1474
1474
|
fieldContext,
|
|
1475
1475
|
segmentOverrides,
|
|
@@ -1615,13 +1615,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1615
1615
|
);
|
|
1616
1616
|
}
|
|
1617
1617
|
function getDuotoneColors(element) {
|
|
1618
|
-
if (!
|
|
1618
|
+
if (!chunkEJSRXEXA_js.isImageLikeElement(element)) {
|
|
1619
1619
|
return void 0;
|
|
1620
1620
|
}
|
|
1621
1621
|
return element.imageEffects?.duotone;
|
|
1622
1622
|
}
|
|
1623
1623
|
function buildLineShadowCss(element) {
|
|
1624
|
-
if (!
|
|
1624
|
+
if (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
1625
1625
|
return void 0;
|
|
1626
1626
|
}
|
|
1627
1627
|
const ss = element.shapeStyle;
|
|
@@ -1632,13 +1632,13 @@ function buildLineShadowCss(element) {
|
|
|
1632
1632
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1633
1633
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1634
1634
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1635
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1636
|
-
|
|
1635
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkEJSRXEXA_js.colorWithOpacity(
|
|
1636
|
+
chunkEJSRXEXA_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1637
1637
|
opacity
|
|
1638
1638
|
)}`;
|
|
1639
1639
|
}
|
|
1640
1640
|
function buildLineGlowFilter(element) {
|
|
1641
|
-
if (!
|
|
1641
|
+
if (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
1642
1642
|
return void 0;
|
|
1643
1643
|
}
|
|
1644
1644
|
const ss = element.shapeStyle;
|
|
@@ -1647,22 +1647,22 @@ function buildLineGlowFilter(element) {
|
|
|
1647
1647
|
}
|
|
1648
1648
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1649
1649
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1650
|
-
const glowCol =
|
|
1650
|
+
const glowCol = chunkEJSRXEXA_js.colorWithOpacity(chunkEJSRXEXA_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1651
1651
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1652
1652
|
}
|
|
1653
1653
|
function getDagDuotoneFilterId(elementId) {
|
|
1654
1654
|
return `dag-duotone-${elementId}`;
|
|
1655
1655
|
}
|
|
1656
1656
|
function hasDagDuotoneEffect(element) {
|
|
1657
|
-
if (!
|
|
1657
|
+
if (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
1658
1658
|
return false;
|
|
1659
1659
|
}
|
|
1660
1660
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1661
1661
|
}
|
|
1662
1662
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1663
1663
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1664
|
-
const c1 =
|
|
1665
|
-
const c2 =
|
|
1664
|
+
const c1 = chunkEJSRXEXA_js.hexToRgbUnit(color1);
|
|
1665
|
+
const c2 = chunkEJSRXEXA_js.hexToRgbUnit(color2);
|
|
1666
1666
|
const grayscaleMatrix = [
|
|
1667
1667
|
0.2126,
|
|
1668
1668
|
0.7152,
|
|
@@ -1706,7 +1706,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1706
1706
|
|
|
1707
1707
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1708
1708
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1709
|
-
return
|
|
1709
|
+
return chunkEJSRXEXA_js.build3DExtrusionData(
|
|
1710
1710
|
shape3d,
|
|
1711
1711
|
scene3d,
|
|
1712
1712
|
fillColor,
|
|
@@ -1715,7 +1715,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1715
1715
|
);
|
|
1716
1716
|
}
|
|
1717
1717
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1718
|
-
|
|
1718
|
+
chunkEJSRXEXA_js.apply3dEffects(
|
|
1719
1719
|
base,
|
|
1720
1720
|
scene3d,
|
|
1721
1721
|
shape3d,
|
|
@@ -1730,11 +1730,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1730
1730
|
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;
|
|
1731
1731
|
}
|
|
1732
1732
|
function rendersWedgeCalloutVector(element) {
|
|
1733
|
-
return element.type === "shape" &&
|
|
1733
|
+
return element.type === "shape" && chunkEJSRXEXA_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1734
1734
|
}
|
|
1735
1735
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1736
1736
|
if (element.type === "group") {
|
|
1737
|
-
const fx2 =
|
|
1737
|
+
const fx2 = chunkEJSRXEXA_js.getComputedEffectStyle(element);
|
|
1738
1738
|
const groupStyle = {};
|
|
1739
1739
|
if (fx2.filter) {
|
|
1740
1740
|
groupStyle.filter = fx2.filter;
|
|
@@ -1744,13 +1744,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1744
1744
|
}
|
|
1745
1745
|
return groupStyle;
|
|
1746
1746
|
}
|
|
1747
|
-
if (!
|
|
1747
|
+
if (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
1748
1748
|
return {};
|
|
1749
1749
|
}
|
|
1750
1750
|
const ss = element.shapeStyle;
|
|
1751
|
-
const fill = animatesFill ? void 0 :
|
|
1752
|
-
const fx =
|
|
1753
|
-
const stroke =
|
|
1751
|
+
const fill = animatesFill ? void 0 : chunkEJSRXEXA_js.getComputedFillStyle(element, parentGroupFill);
|
|
1752
|
+
const fx = chunkEJSRXEXA_js.getComputedEffectStyle(element);
|
|
1753
|
+
const stroke = chunkEJSRXEXA_js.getComputedStrokeStyle(element);
|
|
1754
1754
|
const base = {
|
|
1755
1755
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1756
1756
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1789,7 +1789,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1789
1789
|
};
|
|
1790
1790
|
Object.assign(
|
|
1791
1791
|
base,
|
|
1792
|
-
|
|
1792
|
+
chunkEJSRXEXA_js.getAnimationColorBaseStyle(element, {
|
|
1793
1793
|
animatesFill,
|
|
1794
1794
|
animatesStroke,
|
|
1795
1795
|
parentGroupFill
|
|
@@ -1811,7 +1811,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1811
1811
|
},
|
|
1812
1812
|
element.id
|
|
1813
1813
|
);
|
|
1814
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1814
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkEJSRXEXA_js.isStrokeOnlyPresetElement(element)) {
|
|
1815
1815
|
base.backgroundColor = "transparent";
|
|
1816
1816
|
base.backgroundImage = void 0;
|
|
1817
1817
|
base.borderWidth = void 0;
|
|
@@ -1825,7 +1825,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1825
1825
|
if (rendersWedgeCalloutVector(element)) {
|
|
1826
1826
|
return base;
|
|
1827
1827
|
}
|
|
1828
|
-
const geometry =
|
|
1828
|
+
const geometry = chunkEJSRXEXA_js.resolveShapeGeometry(element);
|
|
1829
1829
|
switch (geometry.kind) {
|
|
1830
1830
|
case "bare":
|
|
1831
1831
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1849,7 +1849,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
1851
|
function getConnectorPathGeometry2(element) {
|
|
1852
|
-
return
|
|
1852
|
+
return chunkEJSRXEXA_js.getConnectorPathGeometry(element);
|
|
1853
1853
|
}
|
|
1854
1854
|
var ARROW_SIZE_SCALE = {
|
|
1855
1855
|
sm: 0.6,
|
|
@@ -1918,11 +1918,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1918
1918
|
strokePaint,
|
|
1919
1919
|
strokeWidth,
|
|
1920
1920
|
dashArray,
|
|
1921
|
-
lineCap:
|
|
1921
|
+
lineCap: chunkEJSRXEXA_js.svgLineCap(shapeStyle?.lineCap),
|
|
1922
1922
|
lineJoin,
|
|
1923
1923
|
miterLimit,
|
|
1924
|
-
offsets:
|
|
1925
|
-
widths:
|
|
1924
|
+
offsets: chunkEJSRXEXA_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1925
|
+
widths: chunkEJSRXEXA_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1926
1926
|
};
|
|
1927
1927
|
}
|
|
1928
1928
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -1945,12 +1945,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1947
1947
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1948
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1948
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkEJSRXEXA_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
1949
1949
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
1950
|
-
const gradientPaint = gradient ?
|
|
1950
|
+
const gradientPaint = gradient ? chunkEJSRXEXA_js.svgGradientFillRef(gradient) : void 0;
|
|
1951
1951
|
const nodes = [];
|
|
1952
1952
|
if (subpaths && needsPerSubpath) {
|
|
1953
|
-
const paints =
|
|
1953
|
+
const paints = chunkEJSRXEXA_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
1954
1954
|
paints.forEach((paint, idx) => {
|
|
1955
1955
|
if (paint.fill !== "none") {
|
|
1956
1956
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -1979,7 +1979,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
1979
1979
|
"path",
|
|
1980
1980
|
{
|
|
1981
1981
|
d: pathData,
|
|
1982
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
1982
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkEJSRXEXA_js.colorWithOpacity(fillColor, fillOpacity),
|
|
1983
1983
|
stroke: "none",
|
|
1984
1984
|
vectorEffect: "non-scaling-stroke"
|
|
1985
1985
|
},
|
|
@@ -2005,14 +2005,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2005
2005
|
);
|
|
2006
2006
|
}
|
|
2007
2007
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2008
|
-
if (!
|
|
2008
|
+
if (!chunkEJSRXEXA_js.hasShapeProperties(element)) {
|
|
2009
2009
|
return null;
|
|
2010
2010
|
}
|
|
2011
2011
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2012
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2013
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2014
|
-
const dashType =
|
|
2015
|
-
const dashArray =
|
|
2012
|
+
const fillPaint = animatesFill ? "inherit" : chunkEJSRXEXA_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2013
|
+
const strokePaint = animatesStroke ? "inherit" : chunkEJSRXEXA_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2014
|
+
const dashType = chunkEJSRXEXA_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2015
|
+
const dashArray = chunkEJSRXEXA_js.getSvgStrokeDasharray(
|
|
2016
2016
|
dashType,
|
|
2017
2017
|
Math.max(strokeWidth, 1),
|
|
2018
2018
|
element.shapeStyle?.customDashSegments
|
|
@@ -2093,13 +2093,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2093
2093
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2094
2094
|
// without this the shape fell back to the parser's representative solid
|
|
2095
2095
|
// and lost every fade (issue #132).
|
|
2096
|
-
|
|
2096
|
+
chunkEJSRXEXA_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2097
2097
|
);
|
|
2098
2098
|
}
|
|
2099
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2099
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkEJSRXEXA_js.buildStrokeOutline(element)) {
|
|
2100
2100
|
const width = Math.max(element.width, 1);
|
|
2101
2101
|
const height = Math.max(element.height, 1);
|
|
2102
|
-
const geometry =
|
|
2102
|
+
const geometry = chunkEJSRXEXA_js.getPresetShapeVectorGeometry(
|
|
2103
2103
|
element.shapeType || "rect",
|
|
2104
2104
|
width,
|
|
2105
2105
|
height,
|
|
@@ -2127,18 +2127,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2127
2127
|
);
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
|
-
if (element.type === "shape" &&
|
|
2130
|
+
if (element.type === "shape" && chunkEJSRXEXA_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2131
2131
|
const width = Math.max(element.width, 1);
|
|
2132
2132
|
const height = Math.max(element.height, 1);
|
|
2133
|
-
const geometry =
|
|
2133
|
+
const geometry = chunkEJSRXEXA_js.getPresetShapeVectorGeometry(
|
|
2134
2134
|
element.shapeType,
|
|
2135
2135
|
width,
|
|
2136
2136
|
height,
|
|
2137
2137
|
element.shapeAdjustments
|
|
2138
2138
|
);
|
|
2139
2139
|
if (geometry) {
|
|
2140
|
-
const gradient =
|
|
2141
|
-
const gradientPaint = gradient ?
|
|
2140
|
+
const gradient = chunkEJSRXEXA_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2141
|
+
const gradientPaint = gradient ? chunkEJSRXEXA_js.svgGradientFillRef(gradient) : void 0;
|
|
2142
2142
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2143
2143
|
"svg",
|
|
2144
2144
|
{
|
|
@@ -2171,18 +2171,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2171
2171
|
);
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
|
-
if (
|
|
2174
|
+
if (chunkEJSRXEXA_js.isCalloutShape(normalizedType)) {
|
|
2175
2175
|
const width = Math.max(element.width, 1);
|
|
2176
2176
|
const height = Math.max(element.height, 1);
|
|
2177
|
-
const geometry =
|
|
2177
|
+
const geometry = chunkEJSRXEXA_js.getCalloutLeaderLineGeometry(
|
|
2178
2178
|
normalizedType,
|
|
2179
2179
|
width,
|
|
2180
2180
|
height,
|
|
2181
2181
|
element.shapeAdjustments
|
|
2182
2182
|
);
|
|
2183
2183
|
if (geometry && geometry.points.length >= 2) {
|
|
2184
|
-
const leaderPath =
|
|
2185
|
-
const bounds =
|
|
2184
|
+
const leaderPath = chunkEJSRXEXA_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2185
|
+
const bounds = chunkEJSRXEXA_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2186
2186
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2187
2187
|
const offsetLeft = bounds.minX;
|
|
2188
2188
|
const offsetTop = bounds.minY;
|
|
@@ -2245,10 +2245,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2245
2245
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2246
2246
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2247
2247
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2248
|
-
const connectorLineCap =
|
|
2248
|
+
const connectorLineCap = chunkEJSRXEXA_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2249
2249
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2250
|
-
const offsets =
|
|
2251
|
-
const widths =
|
|
2250
|
+
const offsets = chunkEJSRXEXA_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2251
|
+
const widths = chunkEJSRXEXA_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2252
2252
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2253
2253
|
"svg",
|
|
2254
2254
|
{
|
|
@@ -2315,15 +2315,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2315
2315
|
}
|
|
2316
2316
|
const rawStops = stops.map((gs) => {
|
|
2317
2317
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2318
|
-
const color =
|
|
2319
|
-
const opacity =
|
|
2318
|
+
const color = chunkEJSRXEXA_js.parseDrawingColor(gs) ?? "#888888";
|
|
2319
|
+
const opacity = chunkEJSRXEXA_js.parseDrawingColorOpacity(gs);
|
|
2320
2320
|
return { position: pos, color, opacity };
|
|
2321
2321
|
}).sort((a, b) => a.position - b.position);
|
|
2322
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2322
|
+
const stopStrings = rawStops.map((s) => `${chunkEJSRXEXA_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2323
2323
|
const lin = gradFill["a:lin"];
|
|
2324
2324
|
if (lin) {
|
|
2325
2325
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2326
|
-
const angleDeg = Math.round(
|
|
2326
|
+
const angleDeg = Math.round(chunkEJSRXEXA_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2327
2327
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2328
2328
|
}
|
|
2329
2329
|
const path = gradFill["a:path"];
|
|
@@ -2337,7 +2337,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2337
2337
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2338
2338
|
} : void 0;
|
|
2339
2339
|
if (pathType === "rect") {
|
|
2340
|
-
return
|
|
2340
|
+
return chunkEJSRXEXA_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2341
2341
|
}
|
|
2342
2342
|
let cx = 50;
|
|
2343
2343
|
let cy = 50;
|
|
@@ -2359,8 +2359,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2359
2359
|
if (!pattFill) {
|
|
2360
2360
|
return void 0;
|
|
2361
2361
|
}
|
|
2362
|
-
const fgColor =
|
|
2363
|
-
const bgColor =
|
|
2362
|
+
const fgColor = chunkEJSRXEXA_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2363
|
+
const bgColor = chunkEJSRXEXA_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2364
2364
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2365
2365
|
switch (preset) {
|
|
2366
2366
|
case "ltHorz":
|
|
@@ -2471,11 +2471,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2471
2471
|
const prstDash = ln["a:prstDash"];
|
|
2472
2472
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2473
2473
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2474
|
-
const color =
|
|
2474
|
+
const color = chunkEJSRXEXA_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2475
2475
|
if (color) {
|
|
2476
|
-
const opacity =
|
|
2476
|
+
const opacity = chunkEJSRXEXA_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2477
2477
|
const key = `${edge.prefix}`;
|
|
2478
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2478
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkEJSRXEXA_js.colorWithOpacity(color, opacity)}`;
|
|
2479
2479
|
}
|
|
2480
2480
|
}
|
|
2481
2481
|
return borderStyle;
|
|
@@ -2488,7 +2488,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2488
2488
|
const textShadowParts = [];
|
|
2489
2489
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2490
2490
|
if (outerShdw) {
|
|
2491
|
-
const shdwColor =
|
|
2491
|
+
const shdwColor = chunkEJSRXEXA_js.parseDrawingColor(outerShdw);
|
|
2492
2492
|
if (shdwColor) {
|
|
2493
2493
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2494
2494
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2506,7 +2506,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
const glow = effectLst["a:glow"];
|
|
2508
2508
|
if (glow) {
|
|
2509
|
-
const glowColor =
|
|
2509
|
+
const glowColor = chunkEJSRXEXA_js.parseDrawingColor(glow);
|
|
2510
2510
|
if (glowColor) {
|
|
2511
2511
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2512
2512
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2528,11 +2528,11 @@ function extractCellText(cellXml) {
|
|
|
2528
2528
|
const textParts = [];
|
|
2529
2529
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2530
2530
|
runs.forEach((run) => {
|
|
2531
|
-
textParts.push(
|
|
2531
|
+
textParts.push(chunkEJSRXEXA_js.xmlText(run["a:t"]) ?? "");
|
|
2532
2532
|
});
|
|
2533
2533
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2534
2534
|
fields.forEach((field) => {
|
|
2535
|
-
textParts.push(
|
|
2535
|
+
textParts.push(chunkEJSRXEXA_js.xmlText(field["a:t"]) ?? "");
|
|
2536
2536
|
});
|
|
2537
2537
|
paragraphTexts.push(textParts.join(""));
|
|
2538
2538
|
});
|
|
@@ -2576,10 +2576,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2576
2576
|
if (runProps?.["@_u"] !== void 0) {
|
|
2577
2577
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2578
2578
|
}
|
|
2579
|
-
const runColor =
|
|
2579
|
+
const runColor = chunkEJSRXEXA_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkEJSRXEXA_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2580
2580
|
if (runColor) {
|
|
2581
|
-
const opacity =
|
|
2582
|
-
cellStyle.color =
|
|
2581
|
+
const opacity = chunkEJSRXEXA_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2582
|
+
cellStyle.color = chunkEJSRXEXA_js.colorWithOpacity(runColor, opacity);
|
|
2583
2583
|
}
|
|
2584
2584
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2585
2585
|
if (fontFamily) {
|
|
@@ -2589,15 +2589,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2589
2589
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2590
2590
|
}
|
|
2591
2591
|
const cellProperties = cellXml["a:tcPr"];
|
|
2592
|
-
const cellFill =
|
|
2592
|
+
const cellFill = chunkEJSRXEXA_js.parseDrawingColor(
|
|
2593
2593
|
cellProperties?.["a:solidFill"],
|
|
2594
2594
|
schemeColorOverrides
|
|
2595
2595
|
);
|
|
2596
2596
|
if (cellFill) {
|
|
2597
|
-
const opacity =
|
|
2597
|
+
const opacity = chunkEJSRXEXA_js.parseDrawingColorOpacity(
|
|
2598
2598
|
cellProperties?.["a:solidFill"]
|
|
2599
2599
|
);
|
|
2600
|
-
cellStyle.backgroundColor =
|
|
2600
|
+
cellStyle.backgroundColor = chunkEJSRXEXA_js.colorWithOpacity(cellFill, opacity);
|
|
2601
2601
|
} else {
|
|
2602
2602
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2603
2603
|
if (gradCss) {
|
|
@@ -2612,16 +2612,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2612
2612
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2613
2613
|
Object.assign(cellStyle, edgeBorders);
|
|
2614
2614
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2615
|
-
const borderColor =
|
|
2615
|
+
const borderColor = chunkEJSRXEXA_js.parseDrawingColor(
|
|
2616
2616
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2617
2617
|
schemeColorOverrides
|
|
2618
|
-
) ||
|
|
2618
|
+
) || chunkEJSRXEXA_js.parseDrawingColor(
|
|
2619
2619
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2620
2620
|
schemeColorOverrides
|
|
2621
|
-
) ||
|
|
2621
|
+
) || chunkEJSRXEXA_js.parseDrawingColor(
|
|
2622
2622
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2623
2623
|
schemeColorOverrides
|
|
2624
|
-
) ||
|
|
2624
|
+
) || chunkEJSRXEXA_js.parseDrawingColor(
|
|
2625
2625
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2626
2626
|
schemeColorOverrides
|
|
2627
2627
|
);
|
|
@@ -2693,7 +2693,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2693
2693
|
if (element.type !== "table") {
|
|
2694
2694
|
return void 0;
|
|
2695
2695
|
}
|
|
2696
|
-
return
|
|
2696
|
+
return chunkEJSRXEXA_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2697
2697
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2698
2698
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2699
2699
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2773,7 +2773,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2773
2773
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2774
2774
|
"span",
|
|
2775
2775
|
{
|
|
2776
|
-
style: { position: "relative", ...
|
|
2776
|
+
style: { position: "relative", ...chunkEJSRXEXA_js.cellRunStyle(run) },
|
|
2777
2777
|
children: run.text
|
|
2778
2778
|
},
|
|
2779
2779
|
`r-${index}`
|
|
@@ -2781,7 +2781,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2781
2781
|
});
|
|
2782
2782
|
}
|
|
2783
2783
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2784
|
-
return
|
|
2784
|
+
return chunkEJSRXEXA_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2785
2785
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2786
2786
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2787
2787
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2914,7 +2914,7 @@ function TableResizeOverlay({
|
|
|
2914
2914
|
const containerRef = React7.useRef(null);
|
|
2915
2915
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2916
2916
|
const dragRef = React7.useRef(null);
|
|
2917
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2917
|
+
const colBoundaries = React7.useMemo(() => chunkEJSRXEXA_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2918
2918
|
const measureRows = React7.useCallback(() => {
|
|
2919
2919
|
const container = containerRef.current;
|
|
2920
2920
|
if (!container) {
|
|
@@ -2961,11 +2961,11 @@ function TableResizeOverlay({
|
|
|
2961
2961
|
const rect = containerRef.current.getBoundingClientRect();
|
|
2962
2962
|
if (e.clientX !== drag.startPos && drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
2963
2963
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
2964
|
-
onResizeColumns(
|
|
2964
|
+
onResizeColumns(chunkEJSRXEXA_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
2965
2965
|
} else if (e.clientY !== drag.startPos && drag.type === "row" && onResizeRow) {
|
|
2966
2966
|
const deltaY = e.clientY - drag.startPos;
|
|
2967
|
-
const newHeight =
|
|
2968
|
-
drag.initialRowHeight ??
|
|
2967
|
+
const newHeight = chunkEJSRXEXA_js.computeResizedRowHeight(
|
|
2968
|
+
drag.initialRowHeight ?? chunkEJSRXEXA_js.DEFAULT_ROW_HEIGHT,
|
|
2969
2969
|
deltaY
|
|
2970
2970
|
);
|
|
2971
2971
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3003,7 +3003,7 @@ function TableResizeOverlay({
|
|
|
3003
3003
|
e.stopPropagation();
|
|
3004
3004
|
const table = containerRef.current?.querySelector("table");
|
|
3005
3005
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3006
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3006
|
+
const actualHeight = tr?.offsetHeight ?? chunkEJSRXEXA_js.DEFAULT_ROW_HEIGHT;
|
|
3007
3007
|
document.body.style.cursor = "row-resize";
|
|
3008
3008
|
document.body.style.userSelect = "none";
|
|
3009
3009
|
dragRef.current = {
|
|
@@ -3043,14 +3043,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3043
3043
|
const rowCount = tableData.rows.length;
|
|
3044
3044
|
const columnCount = tableData.columnWidths.length;
|
|
3045
3045
|
const selectedCell = options?.selectedCell || null;
|
|
3046
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3046
|
+
const isEditable = Boolean(options?.editable) && chunkEJSRXEXA_js.canDrillDown(element);
|
|
3047
3047
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3048
3048
|
const sharedCtx = {
|
|
3049
3049
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3050
3050
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3051
3051
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3052
3052
|
};
|
|
3053
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3053
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkEJSRXEXA_js.tableCellCss(
|
|
3054
3054
|
tableData,
|
|
3055
3055
|
cell,
|
|
3056
3056
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3063,7 +3063,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3063
3063
|
}
|
|
3064
3064
|
const first = selectedCell.selectedCells[0];
|
|
3065
3065
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3066
|
-
return
|
|
3066
|
+
return chunkEJSRXEXA_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3067
3067
|
})();
|
|
3068
3068
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3069
3069
|
TableResizeOverlay,
|
|
@@ -3084,9 +3084,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3084
3084
|
{
|
|
3085
3085
|
className: "w-full h-full border-collapse table-fixed",
|
|
3086
3086
|
style: {
|
|
3087
|
-
fontFamily:
|
|
3087
|
+
fontFamily: chunkEJSRXEXA_js.DEFAULT_FONT_FAMILY,
|
|
3088
3088
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3089
|
-
...
|
|
3089
|
+
...chunkEJSRXEXA_js.tableContainerCss(tableData)
|
|
3090
3090
|
},
|
|
3091
3091
|
children: [
|
|
3092
3092
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3105,7 +3105,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3105
3105
|
return null;
|
|
3106
3106
|
}
|
|
3107
3107
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3108
|
-
const isInMultiSelection =
|
|
3108
|
+
const isInMultiSelection = chunkEJSRXEXA_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3109
3109
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3110
3110
|
const diag = getCellDiagonalBorders2(
|
|
3111
3111
|
cell.style,
|
|
@@ -3134,7 +3134,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3134
3134
|
}
|
|
3135
3135
|
event.stopPropagation();
|
|
3136
3136
|
if (event.shiftKey && selectedCell) {
|
|
3137
|
-
const rect =
|
|
3137
|
+
const rect = chunkEJSRXEXA_js.computeSelectionRect(
|
|
3138
3138
|
selectedCell.rowIndex,
|
|
3139
3139
|
selectedCell.columnIndex,
|
|
3140
3140
|
rowIndex,
|
|
@@ -3144,7 +3144,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3144
3144
|
options?.onSelectCell?.({
|
|
3145
3145
|
rowIndex: selectedCell.rowIndex,
|
|
3146
3146
|
columnIndex: selectedCell.columnIndex,
|
|
3147
|
-
selectedCells:
|
|
3147
|
+
selectedCells: chunkEJSRXEXA_js.rectToCells(rect)
|
|
3148
3148
|
});
|
|
3149
3149
|
} else {
|
|
3150
3150
|
options?.onSelectCell?.({
|
|
@@ -3208,7 +3208,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3208
3208
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.table.title"] });
|
|
3209
3209
|
}
|
|
3210
3210
|
const selectedCell = options?.selectedCell || null;
|
|
3211
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3211
|
+
const isEditable = Boolean(options?.editable) && chunkEJSRXEXA_js.canDrillDown(element);
|
|
3212
3212
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3213
3213
|
const tableEl = element;
|
|
3214
3214
|
const xmlSelectionRect = (() => {
|
|
@@ -3220,7 +3220,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3220
3220
|
}
|
|
3221
3221
|
const first = selectedCell.selectedCells[0];
|
|
3222
3222
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3223
|
-
return
|
|
3223
|
+
return chunkEJSRXEXA_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3224
3224
|
})();
|
|
3225
3225
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3226
3226
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3242,9 +3242,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3242
3242
|
{
|
|
3243
3243
|
className: "w-full h-full border-collapse table-fixed",
|
|
3244
3244
|
style: {
|
|
3245
|
-
fontFamily:
|
|
3245
|
+
fontFamily: chunkEJSRXEXA_js.DEFAULT_FONT_FAMILY,
|
|
3246
3246
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3247
|
-
...
|
|
3247
|
+
...chunkEJSRXEXA_js.tableContainerCss(tableEl.tableData)
|
|
3248
3248
|
},
|
|
3249
3249
|
children: [
|
|
3250
3250
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3301,7 +3301,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3301
3301
|
color: textStyle.color,
|
|
3302
3302
|
...bandStyle,
|
|
3303
3303
|
...xmlCellStyle,
|
|
3304
|
-
...tdCellOverride ?
|
|
3304
|
+
...tdCellOverride ? chunkEJSRXEXA_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3305
3305
|
...diag ? { position: "relative" } : void 0
|
|
3306
3306
|
};
|
|
3307
3307
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3311,7 +3311,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3311
3311
|
"border px-1 py-0.5 align-top",
|
|
3312
3312
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3313
3313
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3314
|
-
|
|
3314
|
+
chunkEJSRXEXA_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3315
3315
|
),
|
|
3316
3316
|
colSpan,
|
|
3317
3317
|
rowSpan: rSpan,
|
|
@@ -3322,7 +3322,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
event.stopPropagation();
|
|
3324
3324
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3325
|
-
const rect =
|
|
3325
|
+
const rect = chunkEJSRXEXA_js.computeSelectionRect(
|
|
3326
3326
|
selectedCell.rowIndex,
|
|
3327
3327
|
selectedCell.columnIndex,
|
|
3328
3328
|
rowIndex,
|
|
@@ -3332,7 +3332,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3332
3332
|
options?.onSelectCell?.({
|
|
3333
3333
|
rowIndex: selectedCell.rowIndex,
|
|
3334
3334
|
columnIndex: selectedCell.columnIndex,
|
|
3335
|
-
selectedCells:
|
|
3335
|
+
selectedCells: chunkEJSRXEXA_js.rectToCells(rect)
|
|
3336
3336
|
});
|
|
3337
3337
|
} else {
|
|
3338
3338
|
options?.onSelectCell?.({
|
|
@@ -3391,23 +3391,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3391
3391
|
);
|
|
3392
3392
|
}
|
|
3393
3393
|
function partAttrs(part) {
|
|
3394
|
-
return part ?
|
|
3394
|
+
return part ? chunkEJSRXEXA_js.chartPartToAttrs(part) : void 0;
|
|
3395
3395
|
}
|
|
3396
3396
|
function resolveReactPalette(chartData) {
|
|
3397
3397
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3398
3398
|
return chartData.colorPalette;
|
|
3399
3399
|
}
|
|
3400
|
-
return [...
|
|
3400
|
+
return [...chunkEJSRXEXA_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3401
3401
|
}
|
|
3402
3402
|
function buildReactChartViewModel(element) {
|
|
3403
3403
|
if (element.type !== "chart" || !element.chartData) {
|
|
3404
|
-
return
|
|
3404
|
+
return chunkEJSRXEXA_js.buildChartViewModel(element);
|
|
3405
3405
|
}
|
|
3406
3406
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3407
3407
|
...element,
|
|
3408
3408
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3409
3409
|
};
|
|
3410
|
-
return
|
|
3410
|
+
return chunkEJSRXEXA_js.buildChartViewModel(themedElement);
|
|
3411
3411
|
}
|
|
3412
3412
|
function renderPrimitive(prim, key) {
|
|
3413
3413
|
switch (prim.kind) {
|
|
@@ -3558,7 +3558,7 @@ function renderText(t, key) {
|
|
|
3558
3558
|
);
|
|
3559
3559
|
}
|
|
3560
3560
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3561
|
-
const legendItems =
|
|
3561
|
+
const legendItems = chunkEJSRXEXA_js.computeChartLegendLayout(vm);
|
|
3562
3562
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3563
3563
|
"svg",
|
|
3564
3564
|
{
|
|
@@ -3702,11 +3702,11 @@ function renderChartElement(element) {
|
|
|
3702
3702
|
if (!chartData || chartData.series.length === 0) {
|
|
3703
3703
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.chart.heading"] });
|
|
3704
3704
|
}
|
|
3705
|
-
const kind =
|
|
3705
|
+
const kind = chunkEJSRXEXA_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3706
3706
|
return renderChartViewModel(
|
|
3707
3707
|
element.id,
|
|
3708
3708
|
buildReactChartViewModel(element),
|
|
3709
|
-
|
|
3709
|
+
chunkEJSRXEXA_js.chartPreserveAspectRatio(kind)
|
|
3710
3710
|
);
|
|
3711
3711
|
}
|
|
3712
3712
|
|
|
@@ -3726,14 +3726,14 @@ function buildNotesPdf(pages) {
|
|
|
3726
3726
|
notes: page.notes,
|
|
3727
3727
|
slideNumber: page.slideNumber
|
|
3728
3728
|
}));
|
|
3729
|
-
const bytes =
|
|
3729
|
+
const bytes = chunkEJSRXEXA_js.buildNotesPdfBytes(images, meta);
|
|
3730
3730
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3731
3731
|
return URL.createObjectURL(blob);
|
|
3732
3732
|
}
|
|
3733
3733
|
|
|
3734
3734
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3735
3735
|
function buildPdfFromTiledImageData(pages) {
|
|
3736
|
-
const bytes =
|
|
3736
|
+
const bytes = chunkEJSRXEXA_js.buildTiledSlidesPdfBytes(pages);
|
|
3737
3737
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3738
3738
|
return URL.createObjectURL(blob);
|
|
3739
3739
|
}
|
|
@@ -3742,7 +3742,7 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3742
3742
|
var activePreview = null;
|
|
3743
3743
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3744
3744
|
stopPreviewAnimation();
|
|
3745
|
-
const descriptor =
|
|
3745
|
+
const descriptor = chunkEJSRXEXA_js.buildPreviewAnimation(preset, options);
|
|
3746
3746
|
if (!descriptor) {
|
|
3747
3747
|
return;
|
|
3748
3748
|
}
|
|
@@ -3755,7 +3755,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3755
3755
|
return;
|
|
3756
3756
|
}
|
|
3757
3757
|
const stage = domEl.offsetParent;
|
|
3758
|
-
const descriptor =
|
|
3758
|
+
const descriptor = chunkEJSRXEXA_js.buildMotionPathPreview({
|
|
3759
3759
|
path,
|
|
3760
3760
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3761
3761
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|