pptx-react-viewer 4.1.6 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AiChatPanel-Y2RKSHOO.mjs → AiChatPanel-SEIRQ3XP.mjs} +3 -3
- package/dist/AiChatPanel-SEIRQ3XP.mjs.br +0 -0
- package/dist/AiChatPanel-SEIRQ3XP.mjs.gz +0 -0
- package/dist/{AiChatPanel-DRCY3T2Z.js → AiChatPanel-VVTLQXQ5.js} +27 -27
- package/dist/AiChatPanel-VVTLQXQ5.js.br +0 -0
- package/dist/AiChatPanel-VVTLQXQ5.js.gz +0 -0
- package/dist/{Model3DScene-ITHRMCLT.mjs → Model3DScene-DCTVSK2F.mjs} +1 -1
- package/dist/Model3DScene-DCTVSK2F.mjs.br +0 -0
- package/dist/Model3DScene-DCTVSK2F.mjs.gz +0 -0
- package/dist/{Model3DScene-VJZS726S.js → Model3DScene-SCWQXMEA.js} +2 -2
- package/dist/Model3DScene-SCWQXMEA.js.br +0 -0
- package/dist/Model3DScene-SCWQXMEA.js.gz +0 -0
- package/dist/{chunk-IXS7DALE.js → OrbitControls-4TDJCTBA.js} +1 -0
- package/dist/OrbitControls-4TDJCTBA.js.br +0 -0
- package/dist/OrbitControls-4TDJCTBA.js.gz +0 -0
- package/dist/{chunk-MV2GCDBR.mjs → OrbitControls-WCOIJFFL.mjs} +1 -0
- package/dist/OrbitControls-WCOIJFFL.mjs.br +0 -0
- package/dist/OrbitControls-WCOIJFFL.mjs.gz +0 -0
- package/dist/{chunk-2O66VMWK.js → chunk-3WYNGYB6.js} +5 -5
- package/dist/chunk-3WYNGYB6.js.br +0 -0
- package/dist/chunk-3WYNGYB6.js.gz +0 -0
- package/dist/{chunk-OFSKGB3W.mjs → chunk-4GTDG2FH.mjs} +157 -579
- package/dist/chunk-4GTDG2FH.mjs.br +0 -0
- package/dist/chunk-4GTDG2FH.mjs.gz +0 -0
- package/dist/{chunk-P5LF34BT.js → chunk-5MRNT4V6.js} +173 -173
- package/dist/chunk-5MRNT4V6.js.br +0 -0
- package/dist/chunk-5MRNT4V6.js.gz +0 -0
- package/dist/{chunk-KDTE5JOW.mjs → chunk-B5YZABYX.mjs} +1 -1
- package/dist/chunk-B5YZABYX.mjs.br +0 -0
- package/dist/chunk-B5YZABYX.mjs.gz +0 -0
- package/dist/{chunk-LNSYROED.js → chunk-KTSDPBQZ.js} +1309 -1210
- package/dist/chunk-KTSDPBQZ.js.br +0 -0
- package/dist/chunk-KTSDPBQZ.js.gz +0 -0
- package/dist/{chunk-QEYWSHNE.mjs → chunk-L4XBWL7J.mjs} +1 -1
- package/dist/chunk-L4XBWL7J.mjs.br +0 -0
- package/dist/chunk-L4XBWL7J.mjs.gz +0 -0
- package/dist/{chunk-VWGJXNMR.js → chunk-P2SBIMYF.js} +1645 -2073
- package/dist/chunk-P2SBIMYF.js.br +0 -0
- package/dist/chunk-P2SBIMYF.js.gz +0 -0
- package/dist/{chunk-QMSSDBKN.js → chunk-S65QSO6T.js} +26522 -22546
- package/dist/chunk-S65QSO6T.js.br +0 -0
- package/dist/chunk-S65QSO6T.js.gz +0 -0
- package/dist/{chunk-FT3MMIXW.mjs → chunk-VPJOJJ36.mjs} +26518 -22532
- package/dist/chunk-VPJOJJ36.mjs.br +0 -0
- package/dist/chunk-VPJOJJ36.mjs.gz +0 -0
- package/dist/{chunk-YHTDDCSC.mjs → chunk-ZYIJODUR.mjs} +254 -155
- package/dist/chunk-ZYIJODUR.mjs.br +0 -0
- package/dist/chunk-ZYIJODUR.mjs.gz +0 -0
- package/dist/index.d.ts +65 -18
- package/dist/index.js +47 -47
- 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.d.ts +65 -18
- 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/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +48 -1
- 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-DRCY3T2Z.js.br +0 -0
- package/dist/AiChatPanel-DRCY3T2Z.js.gz +0 -0
- package/dist/AiChatPanel-Y2RKSHOO.mjs.br +0 -0
- package/dist/AiChatPanel-Y2RKSHOO.mjs.gz +0 -0
- package/dist/Area3DChartScene-J4LMNSGM.js +0 -64
- package/dist/Area3DChartScene-J4LMNSGM.js.br +0 -0
- package/dist/Area3DChartScene-J4LMNSGM.js.gz +0 -0
- package/dist/Area3DChartScene-TDACCSOI.mjs +0 -62
- package/dist/Area3DChartScene-TDACCSOI.mjs.br +0 -0
- package/dist/Area3DChartScene-TDACCSOI.mjs.gz +0 -0
- package/dist/Bar3DChartScene-AD72DLBJ.mjs +0 -62
- package/dist/Bar3DChartScene-AD72DLBJ.mjs.br +0 -0
- package/dist/Bar3DChartScene-AD72DLBJ.mjs.gz +0 -0
- package/dist/Bar3DChartScene-T7334CTK.js +0 -64
- package/dist/Bar3DChartScene-T7334CTK.js.br +0 -0
- package/dist/Bar3DChartScene-T7334CTK.js.gz +0 -0
- package/dist/Line3DChartScene-2ZQSCHK3.mjs +0 -62
- package/dist/Line3DChartScene-2ZQSCHK3.mjs.br +0 -0
- package/dist/Line3DChartScene-2ZQSCHK3.mjs.gz +0 -0
- package/dist/Line3DChartScene-ELVKCFJZ.js +0 -64
- package/dist/Line3DChartScene-ELVKCFJZ.js.br +0 -0
- package/dist/Line3DChartScene-ELVKCFJZ.js.gz +0 -0
- package/dist/Model3DScene-ITHRMCLT.mjs.br +0 -0
- package/dist/Model3DScene-ITHRMCLT.mjs.gz +0 -0
- package/dist/Model3DScene-VJZS726S.js.br +0 -0
- package/dist/Model3DScene-VJZS726S.js.gz +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs +0 -3
- package/dist/OrbitControls-2XOMWUVE.mjs.br +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.gz +0 -0
- package/dist/OrbitControls-CGYUF3BY.js +0 -12
- package/dist/OrbitControls-CGYUF3BY.js.br +0 -0
- package/dist/OrbitControls-CGYUF3BY.js.gz +0 -0
- package/dist/PieChart3DScene-N3DM33FW.js +0 -58
- package/dist/PieChart3DScene-N3DM33FW.js.br +0 -0
- package/dist/PieChart3DScene-N3DM33FW.js.gz +0 -0
- package/dist/PieChart3DScene-PYHOA7BO.mjs +0 -56
- package/dist/PieChart3DScene-PYHOA7BO.mjs.br +0 -0
- package/dist/PieChart3DScene-PYHOA7BO.mjs.gz +0 -0
- package/dist/SmartArt3DScene-D4VNNPHS.mjs +0 -500
- package/dist/SmartArt3DScene-D4VNNPHS.mjs.br +0 -0
- package/dist/SmartArt3DScene-D4VNNPHS.mjs.gz +0 -0
- package/dist/SmartArt3DScene-NHD7CZJ5.js +0 -502
- package/dist/SmartArt3DScene-NHD7CZJ5.js.br +0 -0
- package/dist/SmartArt3DScene-NHD7CZJ5.js.gz +0 -0
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs +0 -62
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-PUWIMT7V.js +0 -64
- package/dist/SurfaceChart3DScene-PUWIMT7V.js.br +0 -0
- package/dist/SurfaceChart3DScene-PUWIMT7V.js.gz +0 -0
- package/dist/chunk-2O66VMWK.js.br +0 -0
- package/dist/chunk-2O66VMWK.js.gz +0 -0
- package/dist/chunk-DNR6CH6I.js +0 -30
- package/dist/chunk-DNR6CH6I.js.br +0 -0
- package/dist/chunk-DNR6CH6I.js.gz +0 -0
- package/dist/chunk-FT3MMIXW.mjs.br +0 -0
- package/dist/chunk-FT3MMIXW.mjs.gz +0 -0
- package/dist/chunk-IXS7DALE.js.br +0 -0
- package/dist/chunk-IXS7DALE.js.gz +0 -0
- package/dist/chunk-KDTE5JOW.mjs.br +0 -0
- package/dist/chunk-KDTE5JOW.mjs.gz +0 -0
- package/dist/chunk-LNSYROED.js.br +0 -0
- package/dist/chunk-LNSYROED.js.gz +0 -0
- package/dist/chunk-MV2GCDBR.mjs.br +0 -0
- package/dist/chunk-MV2GCDBR.mjs.gz +0 -0
- package/dist/chunk-OFSKGB3W.mjs.br +0 -0
- package/dist/chunk-OFSKGB3W.mjs.gz +0 -0
- package/dist/chunk-P5LF34BT.js.br +0 -0
- package/dist/chunk-P5LF34BT.js.gz +0 -0
- package/dist/chunk-QEYWSHNE.mjs.br +0 -0
- package/dist/chunk-QEYWSHNE.mjs.gz +0 -0
- package/dist/chunk-QMSSDBKN.js.br +0 -0
- package/dist/chunk-QMSSDBKN.js.gz +0 -0
- package/dist/chunk-T6GFCLSM.mjs +0 -27
- package/dist/chunk-T6GFCLSM.mjs.br +0 -4
- package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
- package/dist/chunk-VWGJXNMR.js.br +0 -0
- package/dist/chunk-VWGJXNMR.js.gz +0 -0
- package/dist/chunk-YHTDDCSC.mjs.br +0 -0
- package/dist/chunk-YHTDDCSC.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkS65QSO6T_js = require('./chunk-S65QSO6T.js');
|
|
4
4
|
var chunkNXGUR2DO_js = require('./chunk-NXGUR2DO.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 chunkS65QSO6T_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 chunkS65QSO6T_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 = chunkS65QSO6T_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 = chunkS65QSO6T_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 = chunkS65QSO6T_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 (!chunkS65QSO6T_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 (!chunkS65QSO6T_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkS65QSO6T_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 = chunkS65QSO6T_js.getImageFitStyle(element);
|
|
246
|
+
const counterTransform = chunkS65QSO6T_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 = chunkS65QSO6T_js.hasShapeProperties(element) ? chunkS65QSO6T_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 (!chunkS65QSO6T_js.isImageLikeElement(element)) {
|
|
279
279
|
return void 0;
|
|
280
280
|
}
|
|
281
|
-
return
|
|
281
|
+
return chunkS65QSO6T_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
282
282
|
}
|
|
283
283
|
function getImageTilingStyle2(element) {
|
|
284
|
-
return
|
|
284
|
+
return chunkS65QSO6T_js.getImageTilingStyle(element);
|
|
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" } : chunkS65QSO6T_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] = React7.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 } = chunkS65QSO6T_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 chunkS65QSO6T_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 (chunkS65QSO6T_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
@@ -620,17 +620,17 @@ function Badge({
|
|
|
620
620
|
"div",
|
|
621
621
|
{
|
|
622
622
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
623
|
-
...{ [
|
|
623
|
+
...{ [chunkS65QSO6T_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
624
624
|
children: [
|
|
625
625
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
626
626
|
FallbackIcon,
|
|
627
627
|
{
|
|
628
|
-
paths:
|
|
628
|
+
paths: chunkS65QSO6T_js.mediaFallbackIcon(visual, element.mediaType),
|
|
629
629
|
size: isMissing ? 32 : 48,
|
|
630
630
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
631
631
|
}
|
|
632
632
|
),
|
|
633
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
633
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkS65QSO6T_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
634
634
|
]
|
|
635
635
|
}
|
|
636
636
|
);
|
|
@@ -647,17 +647,17 @@ function Placeholder({
|
|
|
647
647
|
"div",
|
|
648
648
|
{
|
|
649
649
|
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"}`,
|
|
650
|
-
...{ [
|
|
650
|
+
...{ [chunkS65QSO6T_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
651
651
|
children: [
|
|
652
652
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
653
653
|
FallbackIcon,
|
|
654
654
|
{
|
|
655
|
-
paths:
|
|
655
|
+
paths: chunkS65QSO6T_js.mediaFallbackIcon(visual, element.mediaType),
|
|
656
656
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
657
657
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
658
658
|
}
|
|
659
659
|
),
|
|
660
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
660
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkS65QSO6T_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
661
661
|
]
|
|
662
662
|
}
|
|
663
663
|
);
|
|
@@ -667,7 +667,7 @@ function renderMediaFallback({
|
|
|
667
667
|
posterUrl,
|
|
668
668
|
surface
|
|
669
669
|
}) {
|
|
670
|
-
const visual =
|
|
670
|
+
const visual = chunkS65QSO6T_js.mediaFallbackVisual(surface, {
|
|
671
671
|
hasPoster: Boolean(posterUrl),
|
|
672
672
|
missing: element.mediaMissing === true
|
|
673
673
|
});
|
|
@@ -679,7 +679,7 @@ function renderMediaFallback({
|
|
|
679
679
|
src: posterUrl,
|
|
680
680
|
alt: visual.dimPoster ? chunkNXGUR2DO_js.translationsEn["pptx.media.posterAlt"] : chunkNXGUR2DO_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
681
681
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
682
|
-
style:
|
|
682
|
+
style: chunkS65QSO6T_js.getImageFitStyle(element)
|
|
683
683
|
}
|
|
684
684
|
),
|
|
685
685
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -697,7 +697,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
697
697
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
698
698
|
const trimFragment = buildTrimFragment(element);
|
|
699
699
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
700
|
-
const shouldLoop =
|
|
700
|
+
const shouldLoop = chunkS65QSO6T_js.mediaPlaybackAttributes(element).loop;
|
|
701
701
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
702
702
|
const isFullScreen = options?.fullScreen === true;
|
|
703
703
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -780,20 +780,20 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
780
780
|
|
|
781
781
|
// src/viewer/utils/text-utils.tsx
|
|
782
782
|
function getTextStyleForElement(element, fallbackColor) {
|
|
783
|
-
return
|
|
783
|
+
return chunkS65QSO6T_js.buildTextBlockStyle(element, { fallbackColor });
|
|
784
784
|
}
|
|
785
785
|
|
|
786
786
|
// src/viewer/utils/text-layout.tsx
|
|
787
787
|
function getTextLayoutStyle(element) {
|
|
788
|
-
if (!
|
|
788
|
+
if (!chunkS65QSO6T_js.hasTextProperties(element)) {
|
|
789
789
|
return {};
|
|
790
790
|
}
|
|
791
|
-
const writingMode =
|
|
792
|
-
const textOrientation =
|
|
793
|
-
const verticalDirection =
|
|
791
|
+
const writingMode = chunkS65QSO6T_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
792
|
+
const textOrientation = chunkS65QSO6T_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
793
|
+
const verticalDirection = chunkS65QSO6T_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
794
794
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
795
795
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
796
|
-
const hasParagraphIndents =
|
|
796
|
+
const hasParagraphIndents = chunkS65QSO6T_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
797
797
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
798
798
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
799
799
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -802,7 +802,7 @@ function getTextLayoutStyle(element) {
|
|
|
802
802
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
803
803
|
return {
|
|
804
804
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
805
|
-
...
|
|
805
|
+
...chunkS65QSO6T_js.buildTextBodyLayoutStyle(element),
|
|
806
806
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
807
807
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
808
808
|
paddingTop: bodyTop,
|
|
@@ -830,7 +830,7 @@ function getTextLayoutStyle(element) {
|
|
|
830
830
|
|
|
831
831
|
// src/viewer/utils/text-effects.tsx
|
|
832
832
|
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
833
|
-
return
|
|
833
|
+
return chunkS65QSO6T_js.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1015,13 +1015,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1015
1015
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1016
1016
|
return renderedSegments;
|
|
1017
1017
|
}
|
|
1018
|
-
const paraKey = `${elementId}${
|
|
1018
|
+
const paraKey = `${elementId}${chunkS65QSO6T_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1019
1019
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1020
1020
|
if (paraState) {
|
|
1021
1021
|
const style = buildAnimStyle(paraState);
|
|
1022
1022
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1023
1023
|
}
|
|
1024
|
-
const spec =
|
|
1024
|
+
const spec = chunkS65QSO6T_js.buildTextBuildSpec(
|
|
1025
1025
|
elementId,
|
|
1026
1026
|
paraIndex,
|
|
1027
1027
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1039,7 +1039,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1039
1039
|
"span",
|
|
1040
1040
|
{
|
|
1041
1041
|
"data-anim-id": span.animId,
|
|
1042
|
-
style:
|
|
1042
|
+
style: chunkS65QSO6T_js.textBuildSpanStyle(span),
|
|
1043
1043
|
children: content
|
|
1044
1044
|
},
|
|
1045
1045
|
span.animId
|
|
@@ -1050,13 +1050,13 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1050
1050
|
if (!isUnderlineWords || !text) {
|
|
1051
1051
|
return inner(text, keyPrefix, metric);
|
|
1052
1052
|
}
|
|
1053
|
-
const pieces =
|
|
1053
|
+
const pieces = chunkS65QSO6T_js.splitWordsForUnderline(text);
|
|
1054
1054
|
if (pieces.length === 0) {
|
|
1055
1055
|
return inner(text, keyPrefix, metric);
|
|
1056
1056
|
}
|
|
1057
1057
|
const gapMetric = metric ? {
|
|
1058
1058
|
...metric,
|
|
1059
|
-
nestedStyle: metric.nestedStyle ?
|
|
1059
|
+
nestedStyle: metric.nestedStyle ? chunkS65QSO6T_js.stripUnderlineDecoration(metric.nestedStyle) : void 0
|
|
1060
1060
|
} : void 0;
|
|
1061
1061
|
return pieces.map((piece, i) => {
|
|
1062
1062
|
const key = `${keyPrefix}-u${i}`;
|
|
@@ -1089,7 +1089,7 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1089
1089
|
);
|
|
1090
1090
|
}
|
|
1091
1091
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1092
|
-
const [lineLayout] =
|
|
1092
|
+
const [lineLayout] = chunkS65QSO6T_js.buildRunTabLines(
|
|
1093
1093
|
line,
|
|
1094
1094
|
ctx,
|
|
1095
1095
|
nestedStyle,
|
|
@@ -1108,7 +1108,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1108
1108
|
if (!needsScriptFonts || !text) {
|
|
1109
1109
|
return text;
|
|
1110
1110
|
}
|
|
1111
|
-
const pieces =
|
|
1111
|
+
const pieces = chunkS65QSO6T_js.splitRunByScriptFont(
|
|
1112
1112
|
text,
|
|
1113
1113
|
scriptFonts,
|
|
1114
1114
|
baseFontFamily,
|
|
@@ -1125,7 +1125,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1125
1125
|
if (!metric || !text) {
|
|
1126
1126
|
return inner(text, keyPrefix);
|
|
1127
1127
|
}
|
|
1128
|
-
const pieces =
|
|
1128
|
+
const pieces = chunkS65QSO6T_js.splitRunForMetrics(text, metric.font);
|
|
1129
1129
|
if (pieces.length <= 1) {
|
|
1130
1130
|
return inner(text, keyPrefix);
|
|
1131
1131
|
}
|
|
@@ -1134,7 +1134,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1134
1134
|
{
|
|
1135
1135
|
style: {
|
|
1136
1136
|
...metric.nestedStyle,
|
|
1137
|
-
letterSpacing:
|
|
1137
|
+
letterSpacing: chunkS65QSO6T_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1138
1138
|
},
|
|
1139
1139
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1140
1140
|
},
|
|
@@ -1210,8 +1210,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1210
1210
|
});
|
|
1211
1211
|
}
|
|
1212
1212
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1213
|
-
const mathml =
|
|
1214
|
-
const safeMathml = mathml ?
|
|
1213
|
+
const mathml = chunkS65QSO6T_js.convertOmmlToMathMl(equationXml);
|
|
1214
|
+
const safeMathml = mathml ? chunkS65QSO6T_js.sanitizeMathMl(mathml) : "";
|
|
1215
1215
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1216
1216
|
"span",
|
|
1217
1217
|
{
|
|
@@ -1344,7 +1344,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1344
1344
|
const segmentStyle = segment?.style ?? {};
|
|
1345
1345
|
const textValue = run.text;
|
|
1346
1346
|
const lines = textValue.split("\n");
|
|
1347
|
-
const resolvedSegmentColor =
|
|
1347
|
+
const resolvedSegmentColor = chunkS65QSO6T_js.normalizeHexColor(
|
|
1348
1348
|
segmentStyle.color || element.textStyle?.color,
|
|
1349
1349
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1350
1350
|
);
|
|
@@ -1352,16 +1352,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1352
1352
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1353
1353
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1354
1354
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1355
|
-
const baseFontSize = rawFontSize *
|
|
1355
|
+
const baseFontSize = rawFontSize * chunkS65QSO6T_js.resolveAutoFitFontScale(element.textStyle);
|
|
1356
1356
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1357
|
-
const fontKerning =
|
|
1357
|
+
const fontKerning = chunkS65QSO6T_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1358
1358
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1359
|
-
const baseFontFamily = rawFontFamily ?
|
|
1359
|
+
const baseFontFamily = rawFontFamily ? chunkS65QSO6T_js.getSubstituteFontFamily(
|
|
1360
1360
|
rawFontFamily,
|
|
1361
|
-
|
|
1361
|
+
chunkS65QSO6T_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1362
1362
|
) : DEFAULT_FONT_FAMILY2;
|
|
1363
|
-
const scriptFonts =
|
|
1364
|
-
const needsScriptFonts =
|
|
1363
|
+
const scriptFonts = chunkS65QSO6T_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1364
|
+
const needsScriptFonts = chunkS65QSO6T_js.hasDistinctScriptFonts(scriptFonts);
|
|
1365
1365
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1366
1366
|
const metricFont = {
|
|
1367
1367
|
fontFamily: baseFontFamily,
|
|
@@ -1369,7 +1369,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1369
1369
|
bold: Boolean(segmentStyle.bold),
|
|
1370
1370
|
italic: Boolean(segmentStyle.italic)
|
|
1371
1371
|
};
|
|
1372
|
-
const nestedStyle =
|
|
1372
|
+
const nestedStyle = chunkS65QSO6T_js.nestedTextDecorationStyle(run.style);
|
|
1373
1373
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1374
1374
|
const spanStyle = { ...run.style };
|
|
1375
1375
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1377,11 +1377,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1377
1377
|
spanStyle.fontFamily = baseFontFamily;
|
|
1378
1378
|
spanStyle.verticalAlign = baselineShift;
|
|
1379
1379
|
spanStyle.fontKerning = fontKerning;
|
|
1380
|
-
spanStyle.letterSpacing =
|
|
1380
|
+
spanStyle.letterSpacing = chunkS65QSO6T_js.pieceLetterSpacing(
|
|
1381
1381
|
authoredLetterSpacing,
|
|
1382
|
-
|
|
1382
|
+
chunkS65QSO6T_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1383
1383
|
);
|
|
1384
|
-
const hollow =
|
|
1384
|
+
const hollow = chunkS65QSO6T_js.hollowTextFillStyle(segmentStyle, {
|
|
1385
1385
|
color: resolvedSegmentColor,
|
|
1386
1386
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1387
1387
|
});
|
|
@@ -1396,7 +1396,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1396
1396
|
const isUnderlineWords = Boolean(segmentStyle.underline) && segmentStyle.underlineStyle === "words";
|
|
1397
1397
|
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1398
1398
|
if (isUnderlineWords) {
|
|
1399
|
-
const stripped =
|
|
1399
|
+
const stripped = chunkS65QSO6T_js.stripUnderlineDecoration(spanStyle);
|
|
1400
1400
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
1401
1401
|
delete spanStyle.textDecorationStyle;
|
|
1402
1402
|
delete spanStyle.textDecorationThickness;
|
|
@@ -1412,7 +1412,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1412
1412
|
scriptFonts,
|
|
1413
1413
|
baseFontFamily,
|
|
1414
1414
|
findHighlights,
|
|
1415
|
-
|
|
1415
|
+
chunkS65QSO6T_js.buildTabContext(
|
|
1416
1416
|
element.textStyle?.tabStops,
|
|
1417
1417
|
element.textStyle?.defaultTabSize,
|
|
1418
1418
|
baseFontSize,
|
|
@@ -1444,14 +1444,14 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1444
1444
|
const segment = sourceRun ? segments[seed.segmentIndex] : { text: seed.text, style: seed.style };
|
|
1445
1445
|
const resolvedSegment = {
|
|
1446
1446
|
...segment,
|
|
1447
|
-
style:
|
|
1447
|
+
style: chunkS65QSO6T_js.withInlineListDecorationDefaults(segment.style, context.element.textStyle)
|
|
1448
1448
|
};
|
|
1449
|
-
const decorationCss =
|
|
1449
|
+
const decorationCss = chunkS65QSO6T_js.segmentStyleToCss(
|
|
1450
1450
|
resolvedSegment,
|
|
1451
|
-
|
|
1451
|
+
chunkS65QSO6T_js.resolveAutoFitFontScale(context.element.textStyle)
|
|
1452
1452
|
);
|
|
1453
|
-
|
|
1454
|
-
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...
|
|
1453
|
+
chunkS65QSO6T_js.applyUnderlineVariant(decorationCss, resolvedSegment);
|
|
1454
|
+
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...chunkS65QSO6T_js.nestedTextDecorationStyle(decorationCss) } } : {
|
|
1455
1455
|
text: seed.text,
|
|
1456
1456
|
style: decorationCss,
|
|
1457
1457
|
segmentIndex: seed.segmentIndex
|
|
@@ -1466,7 +1466,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1466
1466
|
});
|
|
1467
1467
|
}
|
|
1468
1468
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1469
|
-
if (!
|
|
1469
|
+
if (!chunkS65QSO6T_js.hasTextProperties(element)) {
|
|
1470
1470
|
return emptyFallback || null;
|
|
1471
1471
|
}
|
|
1472
1472
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1476,7 +1476,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1476
1476
|
}
|
|
1477
1477
|
return element.text || emptyFallback || "";
|
|
1478
1478
|
}
|
|
1479
|
-
const paragraphs =
|
|
1479
|
+
const paragraphs = chunkS65QSO6T_js.buildParagraphs(
|
|
1480
1480
|
element,
|
|
1481
1481
|
fieldContext,
|
|
1482
1482
|
segmentOverrides,
|
|
@@ -1622,13 +1622,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1622
1622
|
);
|
|
1623
1623
|
}
|
|
1624
1624
|
function getDuotoneColors(element) {
|
|
1625
|
-
if (!
|
|
1625
|
+
if (!chunkS65QSO6T_js.isImageLikeElement(element)) {
|
|
1626
1626
|
return void 0;
|
|
1627
1627
|
}
|
|
1628
1628
|
return element.imageEffects?.duotone;
|
|
1629
1629
|
}
|
|
1630
1630
|
function buildLineShadowCss(element) {
|
|
1631
|
-
if (!
|
|
1631
|
+
if (!chunkS65QSO6T_js.hasShapeProperties(element)) {
|
|
1632
1632
|
return void 0;
|
|
1633
1633
|
}
|
|
1634
1634
|
const ss = element.shapeStyle;
|
|
@@ -1639,13 +1639,13 @@ function buildLineShadowCss(element) {
|
|
|
1639
1639
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1640
1640
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1641
1641
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1642
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1643
|
-
|
|
1642
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkS65QSO6T_js.colorWithOpacity(
|
|
1643
|
+
chunkS65QSO6T_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1644
1644
|
opacity
|
|
1645
1645
|
)}`;
|
|
1646
1646
|
}
|
|
1647
1647
|
function buildLineGlowFilter(element) {
|
|
1648
|
-
if (!
|
|
1648
|
+
if (!chunkS65QSO6T_js.hasShapeProperties(element)) {
|
|
1649
1649
|
return void 0;
|
|
1650
1650
|
}
|
|
1651
1651
|
const ss = element.shapeStyle;
|
|
@@ -1654,22 +1654,22 @@ function buildLineGlowFilter(element) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1656
1656
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1657
|
-
const glowCol =
|
|
1657
|
+
const glowCol = chunkS65QSO6T_js.colorWithOpacity(chunkS65QSO6T_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1658
1658
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1659
1659
|
}
|
|
1660
1660
|
function getDagDuotoneFilterId(elementId) {
|
|
1661
1661
|
return `dag-duotone-${elementId}`;
|
|
1662
1662
|
}
|
|
1663
1663
|
function hasDagDuotoneEffect(element) {
|
|
1664
|
-
if (!
|
|
1664
|
+
if (!chunkS65QSO6T_js.hasShapeProperties(element)) {
|
|
1665
1665
|
return false;
|
|
1666
1666
|
}
|
|
1667
1667
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1668
1668
|
}
|
|
1669
1669
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1670
1670
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1671
|
-
const c1 =
|
|
1672
|
-
const c2 =
|
|
1671
|
+
const c1 = chunkS65QSO6T_js.hexToRgbUnit(color1);
|
|
1672
|
+
const c2 = chunkS65QSO6T_js.hexToRgbUnit(color2);
|
|
1673
1673
|
const grayscaleMatrix = [
|
|
1674
1674
|
0.2126,
|
|
1675
1675
|
0.7152,
|
|
@@ -1713,7 +1713,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1713
1713
|
|
|
1714
1714
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1715
1715
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1716
|
-
return
|
|
1716
|
+
return chunkS65QSO6T_js.build3DExtrusionData(
|
|
1717
1717
|
shape3d,
|
|
1718
1718
|
scene3d,
|
|
1719
1719
|
fillColor,
|
|
@@ -1722,7 +1722,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1722
1722
|
);
|
|
1723
1723
|
}
|
|
1724
1724
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1725
|
-
|
|
1725
|
+
chunkS65QSO6T_js.apply3dEffects(
|
|
1726
1726
|
base,
|
|
1727
1727
|
scene3d,
|
|
1728
1728
|
shape3d,
|
|
@@ -1737,11 +1737,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1737
1737
|
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;
|
|
1738
1738
|
}
|
|
1739
1739
|
function rendersWedgeCalloutVector(element) {
|
|
1740
|
-
return element.type === "shape" &&
|
|
1740
|
+
return element.type === "shape" && chunkS65QSO6T_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1741
1741
|
}
|
|
1742
1742
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1743
1743
|
if (element.type === "group") {
|
|
1744
|
-
const fx2 =
|
|
1744
|
+
const fx2 = chunkS65QSO6T_js.getComputedEffectStyle(element);
|
|
1745
1745
|
const groupStyle = {};
|
|
1746
1746
|
if (fx2.filter) {
|
|
1747
1747
|
groupStyle.filter = fx2.filter;
|
|
@@ -1751,13 +1751,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1751
1751
|
}
|
|
1752
1752
|
return groupStyle;
|
|
1753
1753
|
}
|
|
1754
|
-
if (!
|
|
1754
|
+
if (!chunkS65QSO6T_js.hasShapeProperties(element)) {
|
|
1755
1755
|
return {};
|
|
1756
1756
|
}
|
|
1757
1757
|
const ss = element.shapeStyle;
|
|
1758
|
-
const fill = animatesFill ? void 0 :
|
|
1759
|
-
const fx =
|
|
1760
|
-
const stroke =
|
|
1758
|
+
const fill = animatesFill ? void 0 : chunkS65QSO6T_js.getComputedFillStyle(element, parentGroupFill);
|
|
1759
|
+
const fx = chunkS65QSO6T_js.getComputedEffectStyle(element);
|
|
1760
|
+
const stroke = chunkS65QSO6T_js.getComputedStrokeStyle(element);
|
|
1761
1761
|
const base = {
|
|
1762
1762
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1763
1763
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1796,7 +1796,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1796
1796
|
};
|
|
1797
1797
|
Object.assign(
|
|
1798
1798
|
base,
|
|
1799
|
-
|
|
1799
|
+
chunkS65QSO6T_js.getAnimationColorBaseStyle(element, {
|
|
1800
1800
|
animatesFill,
|
|
1801
1801
|
animatesStroke,
|
|
1802
1802
|
parentGroupFill
|
|
@@ -1818,7 +1818,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1818
1818
|
},
|
|
1819
1819
|
element.id
|
|
1820
1820
|
);
|
|
1821
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1821
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkS65QSO6T_js.isStrokeOnlyPresetElement(element)) {
|
|
1822
1822
|
base.backgroundColor = "transparent";
|
|
1823
1823
|
base.backgroundImage = void 0;
|
|
1824
1824
|
base.borderWidth = void 0;
|
|
@@ -1832,7 +1832,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1832
1832
|
if (rendersWedgeCalloutVector(element)) {
|
|
1833
1833
|
return base;
|
|
1834
1834
|
}
|
|
1835
|
-
const geometry =
|
|
1835
|
+
const geometry = chunkS65QSO6T_js.resolveShapeGeometry(element);
|
|
1836
1836
|
switch (geometry.kind) {
|
|
1837
1837
|
case "bare":
|
|
1838
1838
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1856,7 +1856,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
1858
|
function getConnectorPathGeometry2(element) {
|
|
1859
|
-
return
|
|
1859
|
+
return chunkS65QSO6T_js.getConnectorPathGeometry(element);
|
|
1860
1860
|
}
|
|
1861
1861
|
var ARROW_SIZE_SCALE = {
|
|
1862
1862
|
sm: 0.6,
|
|
@@ -1925,11 +1925,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1925
1925
|
strokePaint,
|
|
1926
1926
|
strokeWidth,
|
|
1927
1927
|
dashArray,
|
|
1928
|
-
lineCap:
|
|
1928
|
+
lineCap: chunkS65QSO6T_js.svgLineCap(shapeStyle?.lineCap),
|
|
1929
1929
|
lineJoin,
|
|
1930
1930
|
miterLimit,
|
|
1931
|
-
offsets:
|
|
1932
|
-
widths:
|
|
1931
|
+
offsets: chunkS65QSO6T_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1932
|
+
widths: chunkS65QSO6T_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1933
1933
|
};
|
|
1934
1934
|
}
|
|
1935
1935
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -1952,12 +1952,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1954
1954
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1955
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1955
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkS65QSO6T_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
1956
1956
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
1957
|
-
const gradientPaint = gradient ?
|
|
1957
|
+
const gradientPaint = gradient ? chunkS65QSO6T_js.svgGradientFillRef(gradient) : void 0;
|
|
1958
1958
|
const nodes = [];
|
|
1959
1959
|
if (subpaths && needsPerSubpath) {
|
|
1960
|
-
const paints =
|
|
1960
|
+
const paints = chunkS65QSO6T_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
1961
1961
|
paints.forEach((paint, idx) => {
|
|
1962
1962
|
if (paint.fill !== "none") {
|
|
1963
1963
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -1986,7 +1986,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
1986
1986
|
"path",
|
|
1987
1987
|
{
|
|
1988
1988
|
d: pathData,
|
|
1989
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
1989
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkS65QSO6T_js.colorWithOpacity(fillColor, fillOpacity),
|
|
1990
1990
|
stroke: "none",
|
|
1991
1991
|
vectorEffect: "non-scaling-stroke"
|
|
1992
1992
|
},
|
|
@@ -2012,14 +2012,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2012
2012
|
);
|
|
2013
2013
|
}
|
|
2014
2014
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2015
|
-
if (!
|
|
2015
|
+
if (!chunkS65QSO6T_js.hasShapeProperties(element)) {
|
|
2016
2016
|
return null;
|
|
2017
2017
|
}
|
|
2018
2018
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2019
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2020
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2021
|
-
const dashType =
|
|
2022
|
-
const dashArray =
|
|
2019
|
+
const fillPaint = animatesFill ? "inherit" : chunkS65QSO6T_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2020
|
+
const strokePaint = animatesStroke ? "inherit" : chunkS65QSO6T_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2021
|
+
const dashType = chunkS65QSO6T_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2022
|
+
const dashArray = chunkS65QSO6T_js.getSvgStrokeDasharray(
|
|
2023
2023
|
dashType,
|
|
2024
2024
|
Math.max(strokeWidth, 1),
|
|
2025
2025
|
element.shapeStyle?.customDashSegments
|
|
@@ -2100,13 +2100,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2100
2100
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2101
2101
|
// without this the shape fell back to the parser's representative solid
|
|
2102
2102
|
// and lost every fade (issue #132).
|
|
2103
|
-
|
|
2103
|
+
chunkS65QSO6T_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2104
2104
|
);
|
|
2105
2105
|
}
|
|
2106
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2106
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkS65QSO6T_js.buildStrokeOutline(element)) {
|
|
2107
2107
|
const width = Math.max(element.width, 1);
|
|
2108
2108
|
const height = Math.max(element.height, 1);
|
|
2109
|
-
const geometry =
|
|
2109
|
+
const geometry = chunkS65QSO6T_js.getPresetShapeVectorGeometry(
|
|
2110
2110
|
element.shapeType || "rect",
|
|
2111
2111
|
width,
|
|
2112
2112
|
height,
|
|
@@ -2134,18 +2134,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2134
2134
|
);
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
2137
|
-
if (element.type === "shape" &&
|
|
2137
|
+
if (element.type === "shape" && chunkS65QSO6T_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2138
2138
|
const width = Math.max(element.width, 1);
|
|
2139
2139
|
const height = Math.max(element.height, 1);
|
|
2140
|
-
const geometry =
|
|
2140
|
+
const geometry = chunkS65QSO6T_js.getPresetShapeVectorGeometry(
|
|
2141
2141
|
element.shapeType,
|
|
2142
2142
|
width,
|
|
2143
2143
|
height,
|
|
2144
2144
|
element.shapeAdjustments
|
|
2145
2145
|
);
|
|
2146
2146
|
if (geometry) {
|
|
2147
|
-
const gradient =
|
|
2148
|
-
const gradientPaint = gradient ?
|
|
2147
|
+
const gradient = chunkS65QSO6T_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2148
|
+
const gradientPaint = gradient ? chunkS65QSO6T_js.svgGradientFillRef(gradient) : void 0;
|
|
2149
2149
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2150
2150
|
"svg",
|
|
2151
2151
|
{
|
|
@@ -2178,18 +2178,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2178
2178
|
);
|
|
2179
2179
|
}
|
|
2180
2180
|
}
|
|
2181
|
-
if (
|
|
2181
|
+
if (chunkS65QSO6T_js.isCalloutShape(normalizedType)) {
|
|
2182
2182
|
const width = Math.max(element.width, 1);
|
|
2183
2183
|
const height = Math.max(element.height, 1);
|
|
2184
|
-
const geometry =
|
|
2184
|
+
const geometry = chunkS65QSO6T_js.getCalloutLeaderLineGeometry(
|
|
2185
2185
|
normalizedType,
|
|
2186
2186
|
width,
|
|
2187
2187
|
height,
|
|
2188
2188
|
element.shapeAdjustments
|
|
2189
2189
|
);
|
|
2190
2190
|
if (geometry && geometry.points.length >= 2) {
|
|
2191
|
-
const leaderPath =
|
|
2192
|
-
const bounds =
|
|
2191
|
+
const leaderPath = chunkS65QSO6T_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2192
|
+
const bounds = chunkS65QSO6T_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2193
2193
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2194
2194
|
const offsetLeft = bounds.minX;
|
|
2195
2195
|
const offsetTop = bounds.minY;
|
|
@@ -2252,10 +2252,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2252
2252
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2253
2253
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2254
2254
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2255
|
-
const connectorLineCap =
|
|
2255
|
+
const connectorLineCap = chunkS65QSO6T_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2256
2256
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2257
|
-
const offsets =
|
|
2258
|
-
const widths =
|
|
2257
|
+
const offsets = chunkS65QSO6T_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2258
|
+
const widths = chunkS65QSO6T_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2259
2259
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2260
2260
|
"svg",
|
|
2261
2261
|
{
|
|
@@ -2322,15 +2322,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
const rawStops = stops.map((gs) => {
|
|
2324
2324
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2325
|
-
const color =
|
|
2326
|
-
const opacity =
|
|
2325
|
+
const color = chunkS65QSO6T_js.parseDrawingColor(gs) ?? "#888888";
|
|
2326
|
+
const opacity = chunkS65QSO6T_js.parseDrawingColorOpacity(gs);
|
|
2327
2327
|
return { position: pos, color, opacity };
|
|
2328
2328
|
}).sort((a, b) => a.position - b.position);
|
|
2329
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2329
|
+
const stopStrings = rawStops.map((s) => `${chunkS65QSO6T_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2330
2330
|
const lin = gradFill["a:lin"];
|
|
2331
2331
|
if (lin) {
|
|
2332
2332
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2333
|
-
const angleDeg = Math.round(
|
|
2333
|
+
const angleDeg = Math.round(chunkS65QSO6T_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2334
2334
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2335
2335
|
}
|
|
2336
2336
|
const path = gradFill["a:path"];
|
|
@@ -2344,7 +2344,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2344
2344
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2345
2345
|
} : void 0;
|
|
2346
2346
|
if (pathType === "rect") {
|
|
2347
|
-
return
|
|
2347
|
+
return chunkS65QSO6T_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2348
2348
|
}
|
|
2349
2349
|
let cx = 50;
|
|
2350
2350
|
let cy = 50;
|
|
@@ -2366,8 +2366,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2366
2366
|
if (!pattFill) {
|
|
2367
2367
|
return void 0;
|
|
2368
2368
|
}
|
|
2369
|
-
const fgColor =
|
|
2370
|
-
const bgColor =
|
|
2369
|
+
const fgColor = chunkS65QSO6T_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2370
|
+
const bgColor = chunkS65QSO6T_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2371
2371
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2372
2372
|
switch (preset) {
|
|
2373
2373
|
case "ltHorz":
|
|
@@ -2478,11 +2478,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2478
2478
|
const prstDash = ln["a:prstDash"];
|
|
2479
2479
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2480
2480
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2481
|
-
const color =
|
|
2481
|
+
const color = chunkS65QSO6T_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2482
2482
|
if (color) {
|
|
2483
|
-
const opacity =
|
|
2483
|
+
const opacity = chunkS65QSO6T_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2484
2484
|
const key = `${edge.prefix}`;
|
|
2485
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2485
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkS65QSO6T_js.colorWithOpacity(color, opacity)}`;
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
2488
|
return borderStyle;
|
|
@@ -2495,7 +2495,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2495
2495
|
const textShadowParts = [];
|
|
2496
2496
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2497
2497
|
if (outerShdw) {
|
|
2498
|
-
const shdwColor =
|
|
2498
|
+
const shdwColor = chunkS65QSO6T_js.parseDrawingColor(outerShdw);
|
|
2499
2499
|
if (shdwColor) {
|
|
2500
2500
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2501
2501
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2513,7 +2513,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
const glow = effectLst["a:glow"];
|
|
2515
2515
|
if (glow) {
|
|
2516
|
-
const glowColor =
|
|
2516
|
+
const glowColor = chunkS65QSO6T_js.parseDrawingColor(glow);
|
|
2517
2517
|
if (glowColor) {
|
|
2518
2518
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2519
2519
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2535,11 +2535,11 @@ function extractCellText(cellXml) {
|
|
|
2535
2535
|
const textParts = [];
|
|
2536
2536
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2537
2537
|
runs.forEach((run) => {
|
|
2538
|
-
textParts.push(
|
|
2538
|
+
textParts.push(chunkS65QSO6T_js.xmlText(run["a:t"]) ?? "");
|
|
2539
2539
|
});
|
|
2540
2540
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2541
2541
|
fields.forEach((field) => {
|
|
2542
|
-
textParts.push(
|
|
2542
|
+
textParts.push(chunkS65QSO6T_js.xmlText(field["a:t"]) ?? "");
|
|
2543
2543
|
});
|
|
2544
2544
|
paragraphTexts.push(textParts.join(""));
|
|
2545
2545
|
});
|
|
@@ -2583,10 +2583,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2583
2583
|
if (runProps?.["@_u"] !== void 0) {
|
|
2584
2584
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2585
2585
|
}
|
|
2586
|
-
const runColor =
|
|
2586
|
+
const runColor = chunkS65QSO6T_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkS65QSO6T_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2587
2587
|
if (runColor) {
|
|
2588
|
-
const opacity =
|
|
2589
|
-
cellStyle.color =
|
|
2588
|
+
const opacity = chunkS65QSO6T_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2589
|
+
cellStyle.color = chunkS65QSO6T_js.colorWithOpacity(runColor, opacity);
|
|
2590
2590
|
}
|
|
2591
2591
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2592
2592
|
if (fontFamily) {
|
|
@@ -2596,15 +2596,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2596
2596
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2597
2597
|
}
|
|
2598
2598
|
const cellProperties = cellXml["a:tcPr"];
|
|
2599
|
-
const cellFill =
|
|
2599
|
+
const cellFill = chunkS65QSO6T_js.parseDrawingColor(
|
|
2600
2600
|
cellProperties?.["a:solidFill"],
|
|
2601
2601
|
schemeColorOverrides
|
|
2602
2602
|
);
|
|
2603
2603
|
if (cellFill) {
|
|
2604
|
-
const opacity =
|
|
2604
|
+
const opacity = chunkS65QSO6T_js.parseDrawingColorOpacity(
|
|
2605
2605
|
cellProperties?.["a:solidFill"]
|
|
2606
2606
|
);
|
|
2607
|
-
cellStyle.backgroundColor =
|
|
2607
|
+
cellStyle.backgroundColor = chunkS65QSO6T_js.colorWithOpacity(cellFill, opacity);
|
|
2608
2608
|
} else {
|
|
2609
2609
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2610
2610
|
if (gradCss) {
|
|
@@ -2619,16 +2619,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2619
2619
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2620
2620
|
Object.assign(cellStyle, edgeBorders);
|
|
2621
2621
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2622
|
-
const borderColor =
|
|
2622
|
+
const borderColor = chunkS65QSO6T_js.parseDrawingColor(
|
|
2623
2623
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2624
2624
|
schemeColorOverrides
|
|
2625
|
-
) ||
|
|
2625
|
+
) || chunkS65QSO6T_js.parseDrawingColor(
|
|
2626
2626
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2627
2627
|
schemeColorOverrides
|
|
2628
|
-
) ||
|
|
2628
|
+
) || chunkS65QSO6T_js.parseDrawingColor(
|
|
2629
2629
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2630
2630
|
schemeColorOverrides
|
|
2631
|
-
) ||
|
|
2631
|
+
) || chunkS65QSO6T_js.parseDrawingColor(
|
|
2632
2632
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2633
2633
|
schemeColorOverrides
|
|
2634
2634
|
);
|
|
@@ -2700,7 +2700,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2700
2700
|
if (element.type !== "table") {
|
|
2701
2701
|
return void 0;
|
|
2702
2702
|
}
|
|
2703
|
-
return
|
|
2703
|
+
return chunkS65QSO6T_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2704
2704
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2705
2705
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2706
2706
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2780,7 +2780,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2780
2780
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2781
2781
|
"span",
|
|
2782
2782
|
{
|
|
2783
|
-
style: { position: "relative", ...
|
|
2783
|
+
style: { position: "relative", ...chunkS65QSO6T_js.cellRunStyle(run) },
|
|
2784
2784
|
children: run.text
|
|
2785
2785
|
},
|
|
2786
2786
|
`r-${index}`
|
|
@@ -2788,7 +2788,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2788
2788
|
});
|
|
2789
2789
|
}
|
|
2790
2790
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2791
|
-
return
|
|
2791
|
+
return chunkS65QSO6T_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2792
2792
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2793
2793
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2794
2794
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2921,7 +2921,7 @@ function TableResizeOverlay({
|
|
|
2921
2921
|
const containerRef = React7.useRef(null);
|
|
2922
2922
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2923
2923
|
const dragRef = React7.useRef(null);
|
|
2924
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2924
|
+
const colBoundaries = React7.useMemo(() => chunkS65QSO6T_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2925
2925
|
const measureRows = React7.useCallback(() => {
|
|
2926
2926
|
const container = containerRef.current;
|
|
2927
2927
|
if (!container) {
|
|
@@ -2968,11 +2968,11 @@ function TableResizeOverlay({
|
|
|
2968
2968
|
const rect = containerRef.current.getBoundingClientRect();
|
|
2969
2969
|
if (e.clientX !== drag.startPos && drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
2970
2970
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
2971
|
-
onResizeColumns(
|
|
2971
|
+
onResizeColumns(chunkS65QSO6T_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
2972
2972
|
} else if (e.clientY !== drag.startPos && drag.type === "row" && onResizeRow) {
|
|
2973
2973
|
const deltaY = e.clientY - drag.startPos;
|
|
2974
|
-
const newHeight =
|
|
2975
|
-
drag.initialRowHeight ??
|
|
2974
|
+
const newHeight = chunkS65QSO6T_js.computeResizedRowHeight(
|
|
2975
|
+
drag.initialRowHeight ?? chunkS65QSO6T_js.DEFAULT_ROW_HEIGHT,
|
|
2976
2976
|
deltaY
|
|
2977
2977
|
);
|
|
2978
2978
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3010,7 +3010,7 @@ function TableResizeOverlay({
|
|
|
3010
3010
|
e.stopPropagation();
|
|
3011
3011
|
const table = containerRef.current?.querySelector("table");
|
|
3012
3012
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3013
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3013
|
+
const actualHeight = tr?.offsetHeight ?? chunkS65QSO6T_js.DEFAULT_ROW_HEIGHT;
|
|
3014
3014
|
document.body.style.cursor = "row-resize";
|
|
3015
3015
|
document.body.style.userSelect = "none";
|
|
3016
3016
|
dragRef.current = {
|
|
@@ -3050,14 +3050,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3050
3050
|
const rowCount = tableData.rows.length;
|
|
3051
3051
|
const columnCount = tableData.columnWidths.length;
|
|
3052
3052
|
const selectedCell = options?.selectedCell || null;
|
|
3053
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3053
|
+
const isEditable = Boolean(options?.editable) && chunkS65QSO6T_js.canDrillDown(element);
|
|
3054
3054
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3055
3055
|
const sharedCtx = {
|
|
3056
3056
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3057
3057
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3058
3058
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3059
3059
|
};
|
|
3060
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3060
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkS65QSO6T_js.tableCellCss(
|
|
3061
3061
|
tableData,
|
|
3062
3062
|
cell,
|
|
3063
3063
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3070,7 +3070,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3070
3070
|
}
|
|
3071
3071
|
const first = selectedCell.selectedCells[0];
|
|
3072
3072
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3073
|
-
return
|
|
3073
|
+
return chunkS65QSO6T_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3074
3074
|
})();
|
|
3075
3075
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3076
3076
|
TableResizeOverlay,
|
|
@@ -3091,9 +3091,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3091
3091
|
{
|
|
3092
3092
|
className: "w-full h-full border-collapse table-fixed",
|
|
3093
3093
|
style: {
|
|
3094
|
-
fontFamily:
|
|
3094
|
+
fontFamily: chunkS65QSO6T_js.DEFAULT_FONT_FAMILY,
|
|
3095
3095
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3096
|
-
...
|
|
3096
|
+
...chunkS65QSO6T_js.tableContainerCss(tableData)
|
|
3097
3097
|
},
|
|
3098
3098
|
children: [
|
|
3099
3099
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3112,7 +3112,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3112
3112
|
return null;
|
|
3113
3113
|
}
|
|
3114
3114
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3115
|
-
const isInMultiSelection =
|
|
3115
|
+
const isInMultiSelection = chunkS65QSO6T_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3116
3116
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3117
3117
|
const diag = getCellDiagonalBorders2(
|
|
3118
3118
|
cell.style,
|
|
@@ -3141,7 +3141,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3141
3141
|
}
|
|
3142
3142
|
event.stopPropagation();
|
|
3143
3143
|
if (event.shiftKey && selectedCell) {
|
|
3144
|
-
const rect =
|
|
3144
|
+
const rect = chunkS65QSO6T_js.computeSelectionRect(
|
|
3145
3145
|
selectedCell.rowIndex,
|
|
3146
3146
|
selectedCell.columnIndex,
|
|
3147
3147
|
rowIndex,
|
|
@@ -3151,7 +3151,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3151
3151
|
options?.onSelectCell?.({
|
|
3152
3152
|
rowIndex: selectedCell.rowIndex,
|
|
3153
3153
|
columnIndex: selectedCell.columnIndex,
|
|
3154
|
-
selectedCells:
|
|
3154
|
+
selectedCells: chunkS65QSO6T_js.rectToCells(rect)
|
|
3155
3155
|
});
|
|
3156
3156
|
} else {
|
|
3157
3157
|
options?.onSelectCell?.({
|
|
@@ -3215,7 +3215,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3215
3215
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkNXGUR2DO_js.translationsEn["pptx.table.title"] });
|
|
3216
3216
|
}
|
|
3217
3217
|
const selectedCell = options?.selectedCell || null;
|
|
3218
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3218
|
+
const isEditable = Boolean(options?.editable) && chunkS65QSO6T_js.canDrillDown(element);
|
|
3219
3219
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3220
3220
|
const tableEl = element;
|
|
3221
3221
|
const xmlSelectionRect = (() => {
|
|
@@ -3227,7 +3227,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
const first = selectedCell.selectedCells[0];
|
|
3229
3229
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3230
|
-
return
|
|
3230
|
+
return chunkS65QSO6T_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3231
3231
|
})();
|
|
3232
3232
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3233
3233
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3249,9 +3249,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3249
3249
|
{
|
|
3250
3250
|
className: "w-full h-full border-collapse table-fixed",
|
|
3251
3251
|
style: {
|
|
3252
|
-
fontFamily:
|
|
3252
|
+
fontFamily: chunkS65QSO6T_js.DEFAULT_FONT_FAMILY,
|
|
3253
3253
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3254
|
-
...
|
|
3254
|
+
...chunkS65QSO6T_js.tableContainerCss(tableEl.tableData)
|
|
3255
3255
|
},
|
|
3256
3256
|
children: [
|
|
3257
3257
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3308,7 +3308,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3308
3308
|
color: textStyle.color,
|
|
3309
3309
|
...bandStyle,
|
|
3310
3310
|
...xmlCellStyle,
|
|
3311
|
-
...tdCellOverride ?
|
|
3311
|
+
...tdCellOverride ? chunkS65QSO6T_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3312
3312
|
...diag ? { position: "relative" } : void 0
|
|
3313
3313
|
};
|
|
3314
3314
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3318,7 +3318,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3318
3318
|
"border px-1 py-0.5 align-top",
|
|
3319
3319
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3320
3320
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3321
|
-
|
|
3321
|
+
chunkS65QSO6T_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3322
3322
|
),
|
|
3323
3323
|
colSpan,
|
|
3324
3324
|
rowSpan: rSpan,
|
|
@@ -3329,7 +3329,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3329
3329
|
}
|
|
3330
3330
|
event.stopPropagation();
|
|
3331
3331
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3332
|
-
const rect =
|
|
3332
|
+
const rect = chunkS65QSO6T_js.computeSelectionRect(
|
|
3333
3333
|
selectedCell.rowIndex,
|
|
3334
3334
|
selectedCell.columnIndex,
|
|
3335
3335
|
rowIndex,
|
|
@@ -3339,7 +3339,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3339
3339
|
options?.onSelectCell?.({
|
|
3340
3340
|
rowIndex: selectedCell.rowIndex,
|
|
3341
3341
|
columnIndex: selectedCell.columnIndex,
|
|
3342
|
-
selectedCells:
|
|
3342
|
+
selectedCells: chunkS65QSO6T_js.rectToCells(rect)
|
|
3343
3343
|
});
|
|
3344
3344
|
} else {
|
|
3345
3345
|
options?.onSelectCell?.({
|
|
@@ -3398,23 +3398,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3398
3398
|
);
|
|
3399
3399
|
}
|
|
3400
3400
|
function partAttrs(part) {
|
|
3401
|
-
return part ?
|
|
3401
|
+
return part ? chunkS65QSO6T_js.chartPartToAttrs(part) : void 0;
|
|
3402
3402
|
}
|
|
3403
3403
|
function resolveReactPalette(chartData) {
|
|
3404
3404
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3405
3405
|
return chartData.colorPalette;
|
|
3406
3406
|
}
|
|
3407
|
-
return [...
|
|
3407
|
+
return [...chunkS65QSO6T_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3408
3408
|
}
|
|
3409
3409
|
function buildReactChartViewModel(element) {
|
|
3410
3410
|
if (element.type !== "chart" || !element.chartData) {
|
|
3411
|
-
return
|
|
3411
|
+
return chunkS65QSO6T_js.buildChartViewModel(element);
|
|
3412
3412
|
}
|
|
3413
3413
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3414
3414
|
...element,
|
|
3415
3415
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3416
3416
|
};
|
|
3417
|
-
return
|
|
3417
|
+
return chunkS65QSO6T_js.buildChartViewModel(themedElement);
|
|
3418
3418
|
}
|
|
3419
3419
|
function renderPrimitive(prim, key) {
|
|
3420
3420
|
switch (prim.kind) {
|
|
@@ -3565,7 +3565,7 @@ function renderText(t, key) {
|
|
|
3565
3565
|
);
|
|
3566
3566
|
}
|
|
3567
3567
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3568
|
-
const legendItems =
|
|
3568
|
+
const legendItems = chunkS65QSO6T_js.computeChartLegendLayout(vm);
|
|
3569
3569
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3570
3570
|
"svg",
|
|
3571
3571
|
{
|
|
@@ -3711,11 +3711,11 @@ function renderChartElement(element) {
|
|
|
3711
3711
|
if (!chartData || chartData.series.length === 0) {
|
|
3712
3712
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkNXGUR2DO_js.translationsEn["pptx.chart.heading"] });
|
|
3713
3713
|
}
|
|
3714
|
-
const kind =
|
|
3714
|
+
const kind = chunkS65QSO6T_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3715
3715
|
return renderChartViewModel(
|
|
3716
3716
|
element.id,
|
|
3717
3717
|
buildReactChartViewModel(element),
|
|
3718
|
-
|
|
3718
|
+
chunkS65QSO6T_js.chartPreserveAspectRatio(kind)
|
|
3719
3719
|
);
|
|
3720
3720
|
}
|
|
3721
3721
|
|
|
@@ -3735,14 +3735,14 @@ function buildNotesPdf(pages) {
|
|
|
3735
3735
|
notes: page.notes,
|
|
3736
3736
|
slideNumber: page.slideNumber
|
|
3737
3737
|
}));
|
|
3738
|
-
const bytes =
|
|
3738
|
+
const bytes = chunkS65QSO6T_js.buildNotesPdfBytes(images, meta);
|
|
3739
3739
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3740
3740
|
return URL.createObjectURL(blob);
|
|
3741
3741
|
}
|
|
3742
3742
|
|
|
3743
3743
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3744
3744
|
function buildPdfFromTiledImageData(pages) {
|
|
3745
|
-
const bytes =
|
|
3745
|
+
const bytes = chunkS65QSO6T_js.buildTiledSlidesPdfBytes(pages);
|
|
3746
3746
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3747
3747
|
return URL.createObjectURL(blob);
|
|
3748
3748
|
}
|
|
@@ -3751,7 +3751,7 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3751
3751
|
var activePreview = null;
|
|
3752
3752
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3753
3753
|
stopPreviewAnimation();
|
|
3754
|
-
const descriptor =
|
|
3754
|
+
const descriptor = chunkS65QSO6T_js.buildPreviewAnimation(preset, options);
|
|
3755
3755
|
if (!descriptor) {
|
|
3756
3756
|
return;
|
|
3757
3757
|
}
|
|
@@ -3764,7 +3764,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3764
3764
|
return;
|
|
3765
3765
|
}
|
|
3766
3766
|
const stage = domEl.offsetParent;
|
|
3767
|
-
const descriptor =
|
|
3767
|
+
const descriptor = chunkS65QSO6T_js.buildMotionPathPreview({
|
|
3768
3768
|
path,
|
|
3769
3769
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3770
3770
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|