pptx-react-viewer 3.16.1 → 3.16.3
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 +17 -0
- package/dist/{AiChatPanel-BUKJCMUY.js → AiChatPanel-G33WODR7.js} +24 -24
- package/dist/AiChatPanel-G33WODR7.js.br +0 -0
- package/dist/AiChatPanel-G33WODR7.js.gz +0 -0
- package/dist/{AiChatPanel-US56QZBD.mjs → AiChatPanel-X7NUNEJO.mjs} +3 -3
- package/dist/AiChatPanel-X7NUNEJO.mjs.br +0 -0
- package/dist/AiChatPanel-X7NUNEJO.mjs.gz +0 -0
- package/dist/{Area3DChartScene-6E4QEVTU.mjs → Area3DChartScene-HBTW5EQP.mjs} +1 -1
- package/dist/Area3DChartScene-HBTW5EQP.mjs.br +0 -0
- package/dist/Area3DChartScene-HBTW5EQP.mjs.gz +0 -0
- package/dist/{Area3DChartScene-APGQOK5A.js → Area3DChartScene-R3P4NSR5.js} +2 -2
- package/dist/{Area3DChartScene-APGQOK5A.js.br → Area3DChartScene-R3P4NSR5.js.br} +0 -0
- package/dist/Area3DChartScene-R3P4NSR5.js.gz +0 -0
- package/dist/{Bar3DChartScene-F4B5TNJR.js → Bar3DChartScene-6IKIGGD7.js} +2 -2
- package/dist/Bar3DChartScene-6IKIGGD7.js.br +0 -0
- package/dist/Bar3DChartScene-6IKIGGD7.js.gz +0 -0
- package/dist/{Bar3DChartScene-5GRGZFE4.mjs → Bar3DChartScene-RTHG6TVC.mjs} +1 -1
- package/dist/Bar3DChartScene-RTHG6TVC.mjs.br +0 -0
- package/dist/Bar3DChartScene-RTHG6TVC.mjs.gz +0 -0
- package/dist/{Line3DChartScene-6FUMMX2T.js → Line3DChartScene-HNNC2O66.js} +2 -2
- package/dist/Line3DChartScene-HNNC2O66.js.br +0 -0
- package/dist/Line3DChartScene-HNNC2O66.js.gz +0 -0
- package/dist/{Line3DChartScene-2VRLE5RI.mjs → Line3DChartScene-WQIUFVLB.mjs} +1 -1
- package/dist/Line3DChartScene-WQIUFVLB.mjs.br +0 -0
- package/dist/Line3DChartScene-WQIUFVLB.mjs.gz +0 -0
- package/dist/{Model3DScene-2MGI3CB6.js → Model3DScene-AAMDGTRI.js} +2 -2
- package/dist/Model3DScene-AAMDGTRI.js.br +0 -0
- package/dist/Model3DScene-AAMDGTRI.js.gz +0 -0
- package/dist/{Model3DScene-TCIKWJ7R.mjs → Model3DScene-BPHGVJQG.mjs} +1 -1
- package/dist/Model3DScene-BPHGVJQG.mjs.br +0 -0
- package/dist/Model3DScene-BPHGVJQG.mjs.gz +0 -0
- package/dist/{PieChart3DScene-OFZEEZRO.js → PieChart3DScene-LO6IJAWY.js} +2 -2
- package/dist/{PieChart3DScene-OFZEEZRO.js.br → PieChart3DScene-LO6IJAWY.js.br} +0 -0
- package/dist/PieChart3DScene-LO6IJAWY.js.gz +0 -0
- package/dist/{PieChart3DScene-O5NZKI4T.mjs → PieChart3DScene-S5OWDFJN.mjs} +1 -1
- package/dist/{PieChart3DScene-O5NZKI4T.mjs.br → PieChart3DScene-S5OWDFJN.mjs.br} +0 -0
- package/dist/PieChart3DScene-S5OWDFJN.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-WXPQGMT3.mjs → SurfaceChart3DScene-7CKYX5HW.mjs} +1 -1
- package/dist/SurfaceChart3DScene-7CKYX5HW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-7CKYX5HW.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-EK7KFNUQ.js → SurfaceChart3DScene-FLQRXC6F.js} +2 -2
- package/dist/{SurfaceChart3DScene-EK7KFNUQ.js.br → SurfaceChart3DScene-FLQRXC6F.js.br} +0 -0
- package/dist/SurfaceChart3DScene-FLQRXC6F.js.gz +0 -0
- package/dist/{chunk-GQVOQPNT.mjs → chunk-2G2MMJRA.mjs} +12 -12
- package/dist/chunk-2G2MMJRA.mjs.br +0 -0
- package/dist/chunk-2G2MMJRA.mjs.gz +0 -0
- package/dist/{chunk-LDFWF2KT.js → chunk-3TPQY6WR.js} +249 -242
- package/dist/chunk-3TPQY6WR.js.br +0 -0
- package/dist/chunk-3TPQY6WR.js.gz +0 -0
- package/dist/{chunk-2J64KPXY.js → chunk-4CLG3TRU.js} +169 -179
- package/dist/chunk-4CLG3TRU.js.br +0 -0
- package/dist/chunk-4CLG3TRU.js.gz +0 -0
- package/dist/{chunk-2DZJJ3VO.mjs → chunk-4U3OI6J3.mjs} +248 -243
- package/dist/chunk-4U3OI6J3.mjs.br +0 -0
- package/dist/chunk-4U3OI6J3.mjs.gz +0 -0
- package/dist/{chunk-CPWFKDGB.js → chunk-AAVKRMQA.js} +1290 -1290
- package/dist/chunk-AAVKRMQA.js.br +0 -0
- package/dist/chunk-AAVKRMQA.js.gz +0 -0
- package/dist/{chunk-C553GQRH.js → chunk-CVS2CHLU.js} +5 -5
- package/dist/chunk-CVS2CHLU.js.br +0 -0
- package/dist/chunk-CVS2CHLU.js.gz +0 -0
- package/dist/{chunk-Q2EGTNCU.js → chunk-QMLJFL7G.js} +469 -463
- package/dist/chunk-QMLJFL7G.js.br +0 -0
- package/dist/chunk-QMLJFL7G.js.gz +0 -0
- package/dist/{chunk-UISMOSNU.mjs → chunk-VA2JFII4.mjs} +1 -1
- package/dist/chunk-VA2JFII4.mjs.br +0 -0
- package/dist/chunk-VA2JFII4.mjs.gz +0 -0
- package/dist/{chunk-BDQBJ3AM.mjs → chunk-VVAXSNG5.mjs} +22 -16
- package/dist/chunk-VVAXSNG5.mjs.br +0 -0
- package/dist/chunk-VVAXSNG5.mjs.gz +0 -0
- package/dist/{chunk-VK3ASDDP.mjs → chunk-WTPGQ3K7.mjs} +3 -13
- package/dist/chunk-WTPGQ3K7.mjs.br +0 -0
- package/dist/chunk-WTPGQ3K7.mjs.gz +0 -0
- package/dist/index.js +45 -45
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-BUKJCMUY.js.br +0 -0
- package/dist/AiChatPanel-BUKJCMUY.js.gz +0 -0
- package/dist/AiChatPanel-US56QZBD.mjs.br +0 -0
- package/dist/AiChatPanel-US56QZBD.mjs.gz +0 -0
- package/dist/Area3DChartScene-6E4QEVTU.mjs.br +0 -0
- package/dist/Area3DChartScene-6E4QEVTU.mjs.gz +0 -0
- package/dist/Area3DChartScene-APGQOK5A.js.gz +0 -0
- package/dist/Bar3DChartScene-5GRGZFE4.mjs.br +0 -0
- package/dist/Bar3DChartScene-5GRGZFE4.mjs.gz +0 -0
- package/dist/Bar3DChartScene-F4B5TNJR.js.br +0 -0
- package/dist/Bar3DChartScene-F4B5TNJR.js.gz +0 -0
- package/dist/Line3DChartScene-2VRLE5RI.mjs.br +0 -0
- package/dist/Line3DChartScene-2VRLE5RI.mjs.gz +0 -0
- package/dist/Line3DChartScene-6FUMMX2T.js.br +0 -0
- package/dist/Line3DChartScene-6FUMMX2T.js.gz +0 -0
- package/dist/Model3DScene-2MGI3CB6.js.br +0 -0
- package/dist/Model3DScene-2MGI3CB6.js.gz +0 -0
- package/dist/Model3DScene-TCIKWJ7R.mjs.br +0 -0
- package/dist/Model3DScene-TCIKWJ7R.mjs.gz +0 -0
- package/dist/PieChart3DScene-O5NZKI4T.mjs.gz +0 -0
- package/dist/PieChart3DScene-OFZEEZRO.js.gz +0 -0
- package/dist/SurfaceChart3DScene-EK7KFNUQ.js.gz +0 -0
- package/dist/SurfaceChart3DScene-WXPQGMT3.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-WXPQGMT3.mjs.gz +0 -0
- package/dist/chunk-2DZJJ3VO.mjs.br +0 -0
- package/dist/chunk-2DZJJ3VO.mjs.gz +0 -0
- package/dist/chunk-2J64KPXY.js.br +0 -0
- package/dist/chunk-2J64KPXY.js.gz +0 -0
- package/dist/chunk-BDQBJ3AM.mjs.br +0 -0
- package/dist/chunk-BDQBJ3AM.mjs.gz +0 -0
- package/dist/chunk-C553GQRH.js.br +0 -0
- package/dist/chunk-C553GQRH.js.gz +0 -0
- package/dist/chunk-CPWFKDGB.js.br +0 -0
- package/dist/chunk-CPWFKDGB.js.gz +0 -0
- package/dist/chunk-GQVOQPNT.mjs.br +0 -0
- package/dist/chunk-GQVOQPNT.mjs.gz +0 -0
- package/dist/chunk-LDFWF2KT.js.br +0 -0
- package/dist/chunk-LDFWF2KT.js.gz +0 -0
- package/dist/chunk-Q2EGTNCU.js.br +0 -0
- package/dist/chunk-Q2EGTNCU.js.gz +0 -0
- package/dist/chunk-UISMOSNU.mjs.br +0 -0
- package/dist/chunk-UISMOSNU.mjs.gz +0 -0
- package/dist/chunk-VK3ASDDP.mjs.br +0 -0
- package/dist/chunk-VK3ASDDP.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3TPQY6WR_js = require('./chunk-3TPQY6WR.js');
|
|
4
4
|
var chunk3AJ54EAB_js = require('./chunk-3AJ54EAB.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 chunk3TPQY6WR_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 chunk3TPQY6WR_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 = chunk3TPQY6WR_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 = chunk3TPQY6WR_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 = chunk3TPQY6WR_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 (!chunk3TPQY6WR_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 (!chunk3TPQY6WR_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunk3TPQY6WR_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 = chunk3TPQY6WR_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 = chunk3TPQY6WR_js.hasShapeProperties(element) ? chunk3TPQY6WR_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 (!chunk3TPQY6WR_js.isImageLikeElement(element)) {
|
|
276
276
|
return void 0;
|
|
277
277
|
}
|
|
278
|
-
return
|
|
278
|
+
return chunk3TPQY6WR_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
279
279
|
}
|
|
280
280
|
function getImageTilingStyle2(element) {
|
|
281
|
-
return
|
|
281
|
+
return chunk3TPQY6WR_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" } : chunk3TPQY6WR_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 } = chunk3TPQY6WR_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 chunk3TPQY6WR_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 (chunk3TPQY6WR_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
|
+
...{ [chunk3TPQY6WR_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
621
621
|
children: [
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
623
|
FallbackIcon,
|
|
624
624
|
{
|
|
625
|
-
paths:
|
|
625
|
+
paths: chunk3TPQY6WR_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(chunk3TPQY6WR_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
|
+
...{ [chunk3TPQY6WR_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
648
648
|
children: [
|
|
649
649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
650
650
|
FallbackIcon,
|
|
651
651
|
{
|
|
652
|
-
paths:
|
|
652
|
+
paths: chunk3TPQY6WR_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(chunk3TPQY6WR_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 = chunk3TPQY6WR_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 ? chunk3AJ54EAB_js.translationsEn["pptx.media.posterAlt"] : chunk3AJ54EAB_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
678
678
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
679
|
-
style:
|
|
679
|
+
style: chunk3TPQY6WR_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 = chunk3TPQY6WR_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 chunk3TPQY6WR_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 (!chunk3TPQY6WR_js.hasTextProperties(element)) {
|
|
786
786
|
return {};
|
|
787
787
|
}
|
|
788
|
-
const writingMode =
|
|
789
|
-
const textOrientation =
|
|
790
|
-
const verticalDirection =
|
|
788
|
+
const writingMode = chunk3TPQY6WR_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
789
|
+
const textOrientation = chunk3TPQY6WR_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
790
|
+
const verticalDirection = chunk3TPQY6WR_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 = chunk3TPQY6WR_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
|
+
...chunk3TPQY6WR_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 chunk3TPQY6WR_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}${chunk3TPQY6WR_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 = chunk3TPQY6WR_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: chunk3TPQY6WR_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 = chunk3TPQY6WR_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 ? chunk3TPQY6WR_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] = chunk3TPQY6WR_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 = chunk3TPQY6WR_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 = chunk3TPQY6WR_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: chunk3TPQY6WR_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 = chunk3TPQY6WR_js.convertOmmlToMathMl(equationXml);
|
|
1211
|
+
const safeMathml = mathml ? chunk3TPQY6WR_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 = chunk3TPQY6WR_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 * chunk3TPQY6WR_js.resolveAutoFitFontScale(element.textStyle);
|
|
1349
1349
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1350
|
-
const fontKerning =
|
|
1350
|
+
const fontKerning = chunk3TPQY6WR_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1351
1351
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1352
|
-
const baseFontFamily = rawFontFamily ?
|
|
1352
|
+
const baseFontFamily = rawFontFamily ? chunk3TPQY6WR_js.getSubstituteFontFamily(
|
|
1353
1353
|
rawFontFamily,
|
|
1354
|
-
|
|
1354
|
+
chunk3TPQY6WR_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1355
1355
|
) : DEFAULT_FONT_FAMILY2;
|
|
1356
|
-
const scriptFonts =
|
|
1357
|
-
const needsScriptFonts =
|
|
1356
|
+
const scriptFonts = chunk3TPQY6WR_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1357
|
+
const needsScriptFonts = chunk3TPQY6WR_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 = chunk3TPQY6WR_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 = chunk3TPQY6WR_js.pieceLetterSpacing(
|
|
1374
1374
|
authoredLetterSpacing,
|
|
1375
|
-
|
|
1375
|
+
chunk3TPQY6WR_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1376
1376
|
);
|
|
1377
|
-
const hollow =
|
|
1377
|
+
const hollow = chunk3TPQY6WR_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 = chunk3TPQY6WR_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
|
+
chunk3TPQY6WR_js.buildTabContext(
|
|
1409
1409
|
element.textStyle?.tabStops,
|
|
1410
1410
|
element.textStyle?.defaultTabSize,
|
|
1411
1411
|
baseFontSize,
|
|
@@ -1433,7 +1433,7 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1433
1433
|
] });
|
|
1434
1434
|
}
|
|
1435
1435
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt) {
|
|
1436
|
-
if (!
|
|
1436
|
+
if (!chunk3TPQY6WR_js.hasTextProperties(element)) {
|
|
1437
1437
|
return emptyFallback || null;
|
|
1438
1438
|
}
|
|
1439
1439
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1443,7 +1443,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1443
1443
|
}
|
|
1444
1444
|
return element.text || emptyFallback || "";
|
|
1445
1445
|
}
|
|
1446
|
-
const paragraphs =
|
|
1446
|
+
const paragraphs = chunk3TPQY6WR_js.buildParagraphs(element, fieldContext, segmentOverrides);
|
|
1447
1447
|
const ctx = {
|
|
1448
1448
|
element,
|
|
1449
1449
|
fallbackColor,
|
|
@@ -1569,13 +1569,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1569
1569
|
);
|
|
1570
1570
|
}
|
|
1571
1571
|
function getDuotoneColors(element) {
|
|
1572
|
-
if (!
|
|
1572
|
+
if (!chunk3TPQY6WR_js.isImageLikeElement(element)) {
|
|
1573
1573
|
return void 0;
|
|
1574
1574
|
}
|
|
1575
1575
|
return element.imageEffects?.duotone;
|
|
1576
1576
|
}
|
|
1577
1577
|
function buildLineShadowCss(element) {
|
|
1578
|
-
if (!
|
|
1578
|
+
if (!chunk3TPQY6WR_js.hasShapeProperties(element)) {
|
|
1579
1579
|
return void 0;
|
|
1580
1580
|
}
|
|
1581
1581
|
const ss = element.shapeStyle;
|
|
@@ -1586,13 +1586,13 @@ function buildLineShadowCss(element) {
|
|
|
1586
1586
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1587
1587
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1588
1588
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1589
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1590
|
-
|
|
1589
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunk3TPQY6WR_js.colorWithOpacity(
|
|
1590
|
+
chunk3TPQY6WR_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1591
1591
|
opacity
|
|
1592
1592
|
)}`;
|
|
1593
1593
|
}
|
|
1594
1594
|
function buildLineGlowFilter(element) {
|
|
1595
|
-
if (!
|
|
1595
|
+
if (!chunk3TPQY6WR_js.hasShapeProperties(element)) {
|
|
1596
1596
|
return void 0;
|
|
1597
1597
|
}
|
|
1598
1598
|
const ss = element.shapeStyle;
|
|
@@ -1601,22 +1601,22 @@ function buildLineGlowFilter(element) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1603
1603
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1604
|
-
const glowCol =
|
|
1604
|
+
const glowCol = chunk3TPQY6WR_js.colorWithOpacity(chunk3TPQY6WR_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1605
1605
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1606
1606
|
}
|
|
1607
1607
|
function getDagDuotoneFilterId(elementId) {
|
|
1608
1608
|
return `dag-duotone-${elementId}`;
|
|
1609
1609
|
}
|
|
1610
1610
|
function hasDagDuotoneEffect(element) {
|
|
1611
|
-
if (!
|
|
1611
|
+
if (!chunk3TPQY6WR_js.hasShapeProperties(element)) {
|
|
1612
1612
|
return false;
|
|
1613
1613
|
}
|
|
1614
1614
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1615
1615
|
}
|
|
1616
1616
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1617
1617
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1618
|
-
const c1 =
|
|
1619
|
-
const c2 =
|
|
1618
|
+
const c1 = chunk3TPQY6WR_js.hexToRgbUnit(color1);
|
|
1619
|
+
const c2 = chunk3TPQY6WR_js.hexToRgbUnit(color2);
|
|
1620
1620
|
const grayscaleMatrix = [
|
|
1621
1621
|
0.2126,
|
|
1622
1622
|
0.7152,
|
|
@@ -1660,7 +1660,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1660
1660
|
|
|
1661
1661
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1662
1662
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1663
|
-
return
|
|
1663
|
+
return chunk3TPQY6WR_js.build3DExtrusionData(
|
|
1664
1664
|
shape3d,
|
|
1665
1665
|
scene3d,
|
|
1666
1666
|
fillColor,
|
|
@@ -1669,7 +1669,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1669
1669
|
);
|
|
1670
1670
|
}
|
|
1671
1671
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1672
|
-
|
|
1672
|
+
chunk3TPQY6WR_js.apply3dEffects(
|
|
1673
1673
|
base,
|
|
1674
1674
|
scene3d,
|
|
1675
1675
|
shape3d,
|
|
@@ -1684,11 +1684,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1684
1684
|
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;
|
|
1685
1685
|
}
|
|
1686
1686
|
function rendersWedgeCalloutVector(element) {
|
|
1687
|
-
return element.type === "shape" &&
|
|
1687
|
+
return element.type === "shape" && chunk3TPQY6WR_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1688
1688
|
}
|
|
1689
1689
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1690
1690
|
if (element.type === "group") {
|
|
1691
|
-
const fx2 =
|
|
1691
|
+
const fx2 = chunk3TPQY6WR_js.getComputedEffectStyle(element);
|
|
1692
1692
|
const groupStyle = {};
|
|
1693
1693
|
if (fx2.filter) {
|
|
1694
1694
|
groupStyle.filter = fx2.filter;
|
|
@@ -1698,13 +1698,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1698
1698
|
}
|
|
1699
1699
|
return groupStyle;
|
|
1700
1700
|
}
|
|
1701
|
-
if (!
|
|
1701
|
+
if (!chunk3TPQY6WR_js.hasShapeProperties(element)) {
|
|
1702
1702
|
return {};
|
|
1703
1703
|
}
|
|
1704
1704
|
const ss = element.shapeStyle;
|
|
1705
|
-
const fill = animatesFill ? void 0 :
|
|
1706
|
-
const fx =
|
|
1707
|
-
const stroke =
|
|
1705
|
+
const fill = animatesFill ? void 0 : chunk3TPQY6WR_js.getComputedFillStyle(element, parentGroupFill);
|
|
1706
|
+
const fx = chunk3TPQY6WR_js.getComputedEffectStyle(element);
|
|
1707
|
+
const stroke = chunk3TPQY6WR_js.getComputedStrokeStyle(element);
|
|
1708
1708
|
const base = {
|
|
1709
1709
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1710
1710
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1743,7 +1743,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1743
1743
|
};
|
|
1744
1744
|
Object.assign(
|
|
1745
1745
|
base,
|
|
1746
|
-
|
|
1746
|
+
chunk3TPQY6WR_js.getAnimationColorBaseStyle(element, {
|
|
1747
1747
|
animatesFill,
|
|
1748
1748
|
animatesStroke,
|
|
1749
1749
|
parentGroupFill
|
|
@@ -1765,7 +1765,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1765
1765
|
},
|
|
1766
1766
|
element.id
|
|
1767
1767
|
);
|
|
1768
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1768
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunk3TPQY6WR_js.isStrokeOnlyPresetElement(element)) {
|
|
1769
1769
|
base.backgroundColor = "transparent";
|
|
1770
1770
|
base.backgroundImage = void 0;
|
|
1771
1771
|
base.borderWidth = void 0;
|
|
@@ -1779,7 +1779,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1779
1779
|
if (rendersWedgeCalloutVector(element)) {
|
|
1780
1780
|
return base;
|
|
1781
1781
|
}
|
|
1782
|
-
const geometry =
|
|
1782
|
+
const geometry = chunk3TPQY6WR_js.resolveShapeGeometry(element);
|
|
1783
1783
|
switch (geometry.kind) {
|
|
1784
1784
|
case "bare":
|
|
1785
1785
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1805,13 +1805,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1805
1805
|
function getConnectorAdjustment(element, key, fallback) {
|
|
1806
1806
|
const direct = element.shapeAdjustments?.[key];
|
|
1807
1807
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1808
|
-
return
|
|
1808
|
+
return chunk3TPQY6WR_js.clampUnitInterval(direct / 1e5);
|
|
1809
1809
|
}
|
|
1810
1810
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1811
1811
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1812
|
-
return
|
|
1812
|
+
return chunk3TPQY6WR_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1813
1813
|
}
|
|
1814
|
-
return
|
|
1814
|
+
return chunk3TPQY6WR_js.clampUnitInterval(fallback);
|
|
1815
1815
|
}
|
|
1816
1816
|
function getConnectorPathGeometry(element) {
|
|
1817
1817
|
const width = Math.max(element.width, 0);
|
|
@@ -1976,11 +1976,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1976
1976
|
strokePaint,
|
|
1977
1977
|
strokeWidth,
|
|
1978
1978
|
dashArray,
|
|
1979
|
-
lineCap:
|
|
1979
|
+
lineCap: chunk3TPQY6WR_js.svgLineCap(shapeStyle?.lineCap),
|
|
1980
1980
|
lineJoin,
|
|
1981
1981
|
miterLimit,
|
|
1982
|
-
offsets:
|
|
1983
|
-
widths:
|
|
1982
|
+
offsets: chunk3TPQY6WR_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1983
|
+
widths: chunk3TPQY6WR_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1984
1984
|
};
|
|
1985
1985
|
}
|
|
1986
1986
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2003,12 +2003,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
2003
2003
|
}
|
|
2004
2004
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2005
2005
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2006
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2006
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunk3TPQY6WR_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2007
2007
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2008
|
-
const gradientPaint = gradient ?
|
|
2008
|
+
const gradientPaint = gradient ? chunk3TPQY6WR_js.svgGradientFillRef(gradient) : void 0;
|
|
2009
2009
|
const nodes = [];
|
|
2010
2010
|
if (subpaths && needsPerSubpath) {
|
|
2011
|
-
const paints =
|
|
2011
|
+
const paints = chunk3TPQY6WR_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2012
2012
|
paints.forEach((paint, idx) => {
|
|
2013
2013
|
if (paint.fill !== "none") {
|
|
2014
2014
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2037,7 +2037,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2037
2037
|
"path",
|
|
2038
2038
|
{
|
|
2039
2039
|
d: pathData,
|
|
2040
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2040
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunk3TPQY6WR_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2041
2041
|
stroke: "none",
|
|
2042
2042
|
vectorEffect: "non-scaling-stroke"
|
|
2043
2043
|
},
|
|
@@ -2063,14 +2063,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2063
2063
|
);
|
|
2064
2064
|
}
|
|
2065
2065
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2066
|
-
if (!
|
|
2066
|
+
if (!chunk3TPQY6WR_js.hasShapeProperties(element)) {
|
|
2067
2067
|
return null;
|
|
2068
2068
|
}
|
|
2069
2069
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2070
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2071
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2072
|
-
const dashType =
|
|
2073
|
-
const dashArray =
|
|
2070
|
+
const fillPaint = animatesFill ? "inherit" : chunk3TPQY6WR_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2071
|
+
const strokePaint = animatesStroke ? "inherit" : chunk3TPQY6WR_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2072
|
+
const dashType = chunk3TPQY6WR_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2073
|
+
const dashArray = chunk3TPQY6WR_js.getSvgStrokeDasharray(
|
|
2074
2074
|
dashType,
|
|
2075
2075
|
Math.max(strokeWidth, 1),
|
|
2076
2076
|
element.shapeStyle?.customDashSegments
|
|
@@ -2151,13 +2151,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2151
2151
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2152
2152
|
// without this the shape fell back to the parser's representative solid
|
|
2153
2153
|
// and lost every fade (issue #132).
|
|
2154
|
-
|
|
2154
|
+
chunk3TPQY6WR_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2155
2155
|
);
|
|
2156
2156
|
}
|
|
2157
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2157
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunk3TPQY6WR_js.buildStrokeOutline(element)) {
|
|
2158
2158
|
const width = Math.max(element.width, 1);
|
|
2159
2159
|
const height = Math.max(element.height, 1);
|
|
2160
|
-
const geometry =
|
|
2160
|
+
const geometry = chunk3TPQY6WR_js.getPresetShapeVectorGeometry(
|
|
2161
2161
|
element.shapeType || "rect",
|
|
2162
2162
|
width,
|
|
2163
2163
|
height,
|
|
@@ -2185,18 +2185,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2185
2185
|
);
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
|
-
if (element.type === "shape" &&
|
|
2188
|
+
if (element.type === "shape" && chunk3TPQY6WR_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2189
2189
|
const width = Math.max(element.width, 1);
|
|
2190
2190
|
const height = Math.max(element.height, 1);
|
|
2191
|
-
const geometry =
|
|
2191
|
+
const geometry = chunk3TPQY6WR_js.getPresetShapeVectorGeometry(
|
|
2192
2192
|
element.shapeType,
|
|
2193
2193
|
width,
|
|
2194
2194
|
height,
|
|
2195
2195
|
element.shapeAdjustments
|
|
2196
2196
|
);
|
|
2197
2197
|
if (geometry) {
|
|
2198
|
-
const gradient =
|
|
2199
|
-
const gradientPaint = gradient ?
|
|
2198
|
+
const gradient = chunk3TPQY6WR_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2199
|
+
const gradientPaint = gradient ? chunk3TPQY6WR_js.svgGradientFillRef(gradient) : void 0;
|
|
2200
2200
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2201
2201
|
"svg",
|
|
2202
2202
|
{
|
|
@@ -2229,18 +2229,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2229
2229
|
);
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
2232
|
-
if (
|
|
2232
|
+
if (chunk3TPQY6WR_js.isCalloutShape(normalizedType)) {
|
|
2233
2233
|
const width = Math.max(element.width, 1);
|
|
2234
2234
|
const height = Math.max(element.height, 1);
|
|
2235
|
-
const geometry =
|
|
2235
|
+
const geometry = chunk3TPQY6WR_js.getCalloutLeaderLineGeometry(
|
|
2236
2236
|
normalizedType,
|
|
2237
2237
|
width,
|
|
2238
2238
|
height,
|
|
2239
2239
|
element.shapeAdjustments
|
|
2240
2240
|
);
|
|
2241
2241
|
if (geometry && geometry.points.length >= 2) {
|
|
2242
|
-
const leaderPath =
|
|
2243
|
-
const bounds =
|
|
2242
|
+
const leaderPath = chunk3TPQY6WR_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2243
|
+
const bounds = chunk3TPQY6WR_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2244
2244
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2245
2245
|
const offsetLeft = bounds.minX;
|
|
2246
2246
|
const offsetTop = bounds.minY;
|
|
@@ -2303,10 +2303,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2303
2303
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2304
2304
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2305
2305
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2306
|
-
const connectorLineCap =
|
|
2306
|
+
const connectorLineCap = chunk3TPQY6WR_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2307
2307
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2308
|
-
const offsets =
|
|
2309
|
-
const widths =
|
|
2308
|
+
const offsets = chunk3TPQY6WR_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2309
|
+
const widths = chunk3TPQY6WR_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2310
2310
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2311
2311
|
"svg",
|
|
2312
2312
|
{
|
|
@@ -2373,15 +2373,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
const rawStops = stops.map((gs) => {
|
|
2375
2375
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2376
|
-
const color =
|
|
2377
|
-
const opacity =
|
|
2376
|
+
const color = chunk3TPQY6WR_js.parseDrawingColor(gs) ?? "#888888";
|
|
2377
|
+
const opacity = chunk3TPQY6WR_js.parseDrawingColorOpacity(gs);
|
|
2378
2378
|
return { position: pos, color, opacity };
|
|
2379
2379
|
}).sort((a, b) => a.position - b.position);
|
|
2380
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2380
|
+
const stopStrings = rawStops.map((s) => `${chunk3TPQY6WR_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2381
2381
|
const lin = gradFill["a:lin"];
|
|
2382
2382
|
if (lin) {
|
|
2383
2383
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2384
|
-
const angleDeg = Math.round(
|
|
2384
|
+
const angleDeg = Math.round(chunk3TPQY6WR_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2385
2385
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2386
2386
|
}
|
|
2387
2387
|
const path = gradFill["a:path"];
|
|
@@ -2395,7 +2395,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2395
2395
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2396
2396
|
} : void 0;
|
|
2397
2397
|
if (pathType === "rect") {
|
|
2398
|
-
return
|
|
2398
|
+
return chunk3TPQY6WR_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2399
2399
|
}
|
|
2400
2400
|
let cx = 50;
|
|
2401
2401
|
let cy = 50;
|
|
@@ -2417,8 +2417,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2417
2417
|
if (!pattFill) {
|
|
2418
2418
|
return void 0;
|
|
2419
2419
|
}
|
|
2420
|
-
const fgColor =
|
|
2421
|
-
const bgColor =
|
|
2420
|
+
const fgColor = chunk3TPQY6WR_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2421
|
+
const bgColor = chunk3TPQY6WR_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2422
2422
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2423
2423
|
switch (preset) {
|
|
2424
2424
|
case "ltHorz":
|
|
@@ -2529,11 +2529,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2529
2529
|
const prstDash = ln["a:prstDash"];
|
|
2530
2530
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2531
2531
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2532
|
-
const color =
|
|
2532
|
+
const color = chunk3TPQY6WR_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2533
2533
|
if (color) {
|
|
2534
|
-
const opacity =
|
|
2534
|
+
const opacity = chunk3TPQY6WR_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2535
2535
|
const key = `${edge.prefix}`;
|
|
2536
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2536
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunk3TPQY6WR_js.colorWithOpacity(color, opacity)}`;
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
2539
|
return borderStyle;
|
|
@@ -2546,7 +2546,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2546
2546
|
const textShadowParts = [];
|
|
2547
2547
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2548
2548
|
if (outerShdw) {
|
|
2549
|
-
const shdwColor =
|
|
2549
|
+
const shdwColor = chunk3TPQY6WR_js.parseDrawingColor(outerShdw);
|
|
2550
2550
|
if (shdwColor) {
|
|
2551
2551
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2552
2552
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2564,7 +2564,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
const glow = effectLst["a:glow"];
|
|
2566
2566
|
if (glow) {
|
|
2567
|
-
const glowColor =
|
|
2567
|
+
const glowColor = chunk3TPQY6WR_js.parseDrawingColor(glow);
|
|
2568
2568
|
if (glowColor) {
|
|
2569
2569
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2570
2570
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2586,21 +2586,11 @@ function extractCellText(cellXml) {
|
|
|
2586
2586
|
const textParts = [];
|
|
2587
2587
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2588
2588
|
runs.forEach((run) => {
|
|
2589
|
-
|
|
2590
|
-
if (typeof value === "string") {
|
|
2591
|
-
textParts.push(value);
|
|
2592
|
-
} else if (value !== void 0) {
|
|
2593
|
-
textParts.push(String(value));
|
|
2594
|
-
}
|
|
2589
|
+
textParts.push(chunk3TPQY6WR_js.xmlText(run["a:t"]) ?? "");
|
|
2595
2590
|
});
|
|
2596
2591
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2597
2592
|
fields.forEach((field) => {
|
|
2598
|
-
|
|
2599
|
-
if (typeof value === "string") {
|
|
2600
|
-
textParts.push(value);
|
|
2601
|
-
} else if (value !== void 0) {
|
|
2602
|
-
textParts.push(String(value));
|
|
2603
|
-
}
|
|
2593
|
+
textParts.push(chunk3TPQY6WR_js.xmlText(field["a:t"]) ?? "");
|
|
2604
2594
|
});
|
|
2605
2595
|
paragraphTexts.push(textParts.join(""));
|
|
2606
2596
|
});
|
|
@@ -2644,10 +2634,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2644
2634
|
if (runProps?.["@_u"] !== void 0) {
|
|
2645
2635
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2646
2636
|
}
|
|
2647
|
-
const runColor =
|
|
2637
|
+
const runColor = chunk3TPQY6WR_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunk3TPQY6WR_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2648
2638
|
if (runColor) {
|
|
2649
|
-
const opacity =
|
|
2650
|
-
cellStyle.color =
|
|
2639
|
+
const opacity = chunk3TPQY6WR_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2640
|
+
cellStyle.color = chunk3TPQY6WR_js.colorWithOpacity(runColor, opacity);
|
|
2651
2641
|
}
|
|
2652
2642
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2653
2643
|
if (fontFamily) {
|
|
@@ -2657,15 +2647,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2657
2647
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2658
2648
|
}
|
|
2659
2649
|
const cellProperties = cellXml["a:tcPr"];
|
|
2660
|
-
const cellFill =
|
|
2650
|
+
const cellFill = chunk3TPQY6WR_js.parseDrawingColor(
|
|
2661
2651
|
cellProperties?.["a:solidFill"],
|
|
2662
2652
|
schemeColorOverrides
|
|
2663
2653
|
);
|
|
2664
2654
|
if (cellFill) {
|
|
2665
|
-
const opacity =
|
|
2655
|
+
const opacity = chunk3TPQY6WR_js.parseDrawingColorOpacity(
|
|
2666
2656
|
cellProperties?.["a:solidFill"]
|
|
2667
2657
|
);
|
|
2668
|
-
cellStyle.backgroundColor =
|
|
2658
|
+
cellStyle.backgroundColor = chunk3TPQY6WR_js.colorWithOpacity(cellFill, opacity);
|
|
2669
2659
|
} else {
|
|
2670
2660
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2671
2661
|
if (gradCss) {
|
|
@@ -2680,16 +2670,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2680
2670
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2681
2671
|
Object.assign(cellStyle, edgeBorders);
|
|
2682
2672
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2683
|
-
const borderColor =
|
|
2673
|
+
const borderColor = chunk3TPQY6WR_js.parseDrawingColor(
|
|
2684
2674
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2685
2675
|
schemeColorOverrides
|
|
2686
|
-
) ||
|
|
2676
|
+
) || chunk3TPQY6WR_js.parseDrawingColor(
|
|
2687
2677
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2688
2678
|
schemeColorOverrides
|
|
2689
|
-
) ||
|
|
2679
|
+
) || chunk3TPQY6WR_js.parseDrawingColor(
|
|
2690
2680
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2691
2681
|
schemeColorOverrides
|
|
2692
|
-
) ||
|
|
2682
|
+
) || chunk3TPQY6WR_js.parseDrawingColor(
|
|
2693
2683
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2694
2684
|
schemeColorOverrides
|
|
2695
2685
|
);
|
|
@@ -2761,7 +2751,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2761
2751
|
if (element.type !== "table") {
|
|
2762
2752
|
return void 0;
|
|
2763
2753
|
}
|
|
2764
|
-
return
|
|
2754
|
+
return chunk3TPQY6WR_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2765
2755
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2766
2756
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2767
2757
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2837,7 +2827,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2837
2827
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2838
2828
|
"span",
|
|
2839
2829
|
{
|
|
2840
|
-
style: { position: "relative", ...
|
|
2830
|
+
style: { position: "relative", ...chunk3TPQY6WR_js.cellRunStyle(run) },
|
|
2841
2831
|
children: run.text
|
|
2842
2832
|
},
|
|
2843
2833
|
`r-${index}`
|
|
@@ -2845,7 +2835,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2845
2835
|
});
|
|
2846
2836
|
}
|
|
2847
2837
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2848
|
-
return
|
|
2838
|
+
return chunk3TPQY6WR_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2849
2839
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2850
2840
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2851
2841
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2978,7 +2968,7 @@ function TableResizeOverlay({
|
|
|
2978
2968
|
const containerRef = React7.useRef(null);
|
|
2979
2969
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2980
2970
|
const dragRef = React7.useRef(null);
|
|
2981
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2971
|
+
const colBoundaries = React7.useMemo(() => chunk3TPQY6WR_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2982
2972
|
const measureRows = React7.useCallback(() => {
|
|
2983
2973
|
const container = containerRef.current;
|
|
2984
2974
|
if (!container) {
|
|
@@ -3025,11 +3015,11 @@ function TableResizeOverlay({
|
|
|
3025
3015
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3026
3016
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3027
3017
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3028
|
-
onResizeColumns(
|
|
3018
|
+
onResizeColumns(chunk3TPQY6WR_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3029
3019
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3030
3020
|
const deltaY = e.clientY - drag.startPos;
|
|
3031
|
-
const newHeight =
|
|
3032
|
-
drag.initialRowHeight ??
|
|
3021
|
+
const newHeight = chunk3TPQY6WR_js.computeResizedRowHeight(
|
|
3022
|
+
drag.initialRowHeight ?? chunk3TPQY6WR_js.DEFAULT_ROW_HEIGHT,
|
|
3033
3023
|
deltaY
|
|
3034
3024
|
);
|
|
3035
3025
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3067,7 +3057,7 @@ function TableResizeOverlay({
|
|
|
3067
3057
|
e.stopPropagation();
|
|
3068
3058
|
const table = containerRef.current?.querySelector("table");
|
|
3069
3059
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3070
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3060
|
+
const actualHeight = tr?.offsetHeight ?? chunk3TPQY6WR_js.DEFAULT_ROW_HEIGHT;
|
|
3071
3061
|
document.body.style.cursor = "row-resize";
|
|
3072
3062
|
document.body.style.userSelect = "none";
|
|
3073
3063
|
dragRef.current = {
|
|
@@ -3107,14 +3097,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3107
3097
|
const rowCount = tableData.rows.length;
|
|
3108
3098
|
const columnCount = tableData.columnWidths.length;
|
|
3109
3099
|
const selectedCell = options?.selectedCell || null;
|
|
3110
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3100
|
+
const isEditable = Boolean(options?.editable) && chunk3TPQY6WR_js.canDrillDown(element);
|
|
3111
3101
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3112
3102
|
const sharedCtx = {
|
|
3113
3103
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3114
3104
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3115
3105
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3116
3106
|
};
|
|
3117
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3107
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunk3TPQY6WR_js.tableCellCss(
|
|
3118
3108
|
tableData,
|
|
3119
3109
|
cell,
|
|
3120
3110
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3127,7 +3117,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3127
3117
|
}
|
|
3128
3118
|
const first = selectedCell.selectedCells[0];
|
|
3129
3119
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3130
|
-
return
|
|
3120
|
+
return chunk3TPQY6WR_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3131
3121
|
})();
|
|
3132
3122
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3133
3123
|
TableResizeOverlay,
|
|
@@ -3148,9 +3138,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3148
3138
|
{
|
|
3149
3139
|
className: "w-full h-full border-collapse table-fixed",
|
|
3150
3140
|
style: {
|
|
3151
|
-
fontFamily:
|
|
3141
|
+
fontFamily: chunk3TPQY6WR_js.DEFAULT_FONT_FAMILY,
|
|
3152
3142
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3153
|
-
...
|
|
3143
|
+
...chunk3TPQY6WR_js.tableContainerCss(tableData)
|
|
3154
3144
|
},
|
|
3155
3145
|
children: [
|
|
3156
3146
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3169,7 +3159,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3169
3159
|
return null;
|
|
3170
3160
|
}
|
|
3171
3161
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3172
|
-
const isInMultiSelection =
|
|
3162
|
+
const isInMultiSelection = chunk3TPQY6WR_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3173
3163
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3174
3164
|
const diag = getCellDiagonalBorders2(
|
|
3175
3165
|
cell.style,
|
|
@@ -3198,7 +3188,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3198
3188
|
}
|
|
3199
3189
|
event.stopPropagation();
|
|
3200
3190
|
if (event.shiftKey && selectedCell) {
|
|
3201
|
-
const rect =
|
|
3191
|
+
const rect = chunk3TPQY6WR_js.computeSelectionRect(
|
|
3202
3192
|
selectedCell.rowIndex,
|
|
3203
3193
|
selectedCell.columnIndex,
|
|
3204
3194
|
rowIndex,
|
|
@@ -3208,7 +3198,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3208
3198
|
options?.onSelectCell?.({
|
|
3209
3199
|
rowIndex: selectedCell.rowIndex,
|
|
3210
3200
|
columnIndex: selectedCell.columnIndex,
|
|
3211
|
-
selectedCells:
|
|
3201
|
+
selectedCells: chunk3TPQY6WR_js.rectToCells(rect)
|
|
3212
3202
|
});
|
|
3213
3203
|
} else {
|
|
3214
3204
|
options?.onSelectCell?.({
|
|
@@ -3272,7 +3262,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3272
3262
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3AJ54EAB_js.translationsEn["pptx.table.title"] });
|
|
3273
3263
|
}
|
|
3274
3264
|
const selectedCell = options?.selectedCell || null;
|
|
3275
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3265
|
+
const isEditable = Boolean(options?.editable) && chunk3TPQY6WR_js.canDrillDown(element);
|
|
3276
3266
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3277
3267
|
const tableEl = element;
|
|
3278
3268
|
const xmlSelectionRect = (() => {
|
|
@@ -3284,7 +3274,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3284
3274
|
}
|
|
3285
3275
|
const first = selectedCell.selectedCells[0];
|
|
3286
3276
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3287
|
-
return
|
|
3277
|
+
return chunk3TPQY6WR_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3288
3278
|
})();
|
|
3289
3279
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3290
3280
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3306,9 +3296,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3306
3296
|
{
|
|
3307
3297
|
className: "w-full h-full border-collapse table-fixed",
|
|
3308
3298
|
style: {
|
|
3309
|
-
fontFamily:
|
|
3299
|
+
fontFamily: chunk3TPQY6WR_js.DEFAULT_FONT_FAMILY,
|
|
3310
3300
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3311
|
-
...
|
|
3301
|
+
...chunk3TPQY6WR_js.tableContainerCss(tableEl.tableData)
|
|
3312
3302
|
},
|
|
3313
3303
|
children: [
|
|
3314
3304
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3365,7 +3355,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3365
3355
|
color: textStyle.color,
|
|
3366
3356
|
...bandStyle,
|
|
3367
3357
|
...xmlCellStyle,
|
|
3368
|
-
...tdCellOverride ?
|
|
3358
|
+
...tdCellOverride ? chunk3TPQY6WR_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3369
3359
|
...diag ? { position: "relative" } : void 0
|
|
3370
3360
|
};
|
|
3371
3361
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3375,7 +3365,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3375
3365
|
"border px-1 py-0.5 align-top",
|
|
3376
3366
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3377
3367
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3378
|
-
|
|
3368
|
+
chunk3TPQY6WR_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3379
3369
|
),
|
|
3380
3370
|
colSpan,
|
|
3381
3371
|
rowSpan: rSpan,
|
|
@@ -3386,7 +3376,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3386
3376
|
}
|
|
3387
3377
|
event.stopPropagation();
|
|
3388
3378
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3389
|
-
const rect =
|
|
3379
|
+
const rect = chunk3TPQY6WR_js.computeSelectionRect(
|
|
3390
3380
|
selectedCell.rowIndex,
|
|
3391
3381
|
selectedCell.columnIndex,
|
|
3392
3382
|
rowIndex,
|
|
@@ -3396,7 +3386,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3396
3386
|
options?.onSelectCell?.({
|
|
3397
3387
|
rowIndex: selectedCell.rowIndex,
|
|
3398
3388
|
columnIndex: selectedCell.columnIndex,
|
|
3399
|
-
selectedCells:
|
|
3389
|
+
selectedCells: chunk3TPQY6WR_js.rectToCells(rect)
|
|
3400
3390
|
});
|
|
3401
3391
|
} else {
|
|
3402
3392
|
options?.onSelectCell?.({
|
|
@@ -3455,23 +3445,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3455
3445
|
);
|
|
3456
3446
|
}
|
|
3457
3447
|
function partAttrs(part) {
|
|
3458
|
-
return part ?
|
|
3448
|
+
return part ? chunk3TPQY6WR_js.chartPartToAttrs(part) : void 0;
|
|
3459
3449
|
}
|
|
3460
3450
|
function resolveReactPalette(chartData) {
|
|
3461
3451
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3462
3452
|
return chartData.colorPalette;
|
|
3463
3453
|
}
|
|
3464
|
-
return [...
|
|
3454
|
+
return [...chunk3TPQY6WR_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3465
3455
|
}
|
|
3466
3456
|
function buildReactChartViewModel(element) {
|
|
3467
3457
|
if (element.type !== "chart" || !element.chartData) {
|
|
3468
|
-
return
|
|
3458
|
+
return chunk3TPQY6WR_js.buildChartViewModel(element);
|
|
3469
3459
|
}
|
|
3470
3460
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3471
3461
|
...element,
|
|
3472
3462
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3473
3463
|
};
|
|
3474
|
-
return
|
|
3464
|
+
return chunk3TPQY6WR_js.buildChartViewModel(themedElement);
|
|
3475
3465
|
}
|
|
3476
3466
|
function renderPrimitive(prim, key) {
|
|
3477
3467
|
switch (prim.kind) {
|
|
@@ -3622,7 +3612,7 @@ function renderText(t, key) {
|
|
|
3622
3612
|
);
|
|
3623
3613
|
}
|
|
3624
3614
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3625
|
-
const legendItems =
|
|
3615
|
+
const legendItems = chunk3TPQY6WR_js.computeChartLegendLayout(vm);
|
|
3626
3616
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3627
3617
|
"svg",
|
|
3628
3618
|
{
|
|
@@ -3766,11 +3756,11 @@ function renderChartElement(element) {
|
|
|
3766
3756
|
if (!chartData || chartData.series.length === 0) {
|
|
3767
3757
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3AJ54EAB_js.translationsEn["pptx.chart.heading"] });
|
|
3768
3758
|
}
|
|
3769
|
-
const kind =
|
|
3759
|
+
const kind = chunk3TPQY6WR_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3770
3760
|
return renderChartViewModel(
|
|
3771
3761
|
element.id,
|
|
3772
3762
|
buildReactChartViewModel(element),
|
|
3773
|
-
|
|
3763
|
+
chunk3TPQY6WR_js.chartPreserveAspectRatio(kind)
|
|
3774
3764
|
);
|
|
3775
3765
|
}
|
|
3776
3766
|
|
|
@@ -3790,14 +3780,14 @@ function buildNotesPdf(pages) {
|
|
|
3790
3780
|
notes: page.notes,
|
|
3791
3781
|
slideNumber: page.slideNumber
|
|
3792
3782
|
}));
|
|
3793
|
-
const bytes =
|
|
3783
|
+
const bytes = chunk3TPQY6WR_js.buildNotesPdfBytes(images, meta);
|
|
3794
3784
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3795
3785
|
return URL.createObjectURL(blob);
|
|
3796
3786
|
}
|
|
3797
3787
|
|
|
3798
3788
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3799
3789
|
function buildPdfFromTiledImageData(pages) {
|
|
3800
|
-
const bytes =
|
|
3790
|
+
const bytes = chunk3TPQY6WR_js.buildTiledSlidesPdfBytes(pages);
|
|
3801
3791
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3802
3792
|
return URL.createObjectURL(blob);
|
|
3803
3793
|
}
|
|
@@ -3806,7 +3796,7 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3806
3796
|
var activePreview = null;
|
|
3807
3797
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3808
3798
|
stopPreviewAnimation();
|
|
3809
|
-
const descriptor =
|
|
3799
|
+
const descriptor = chunk3TPQY6WR_js.buildPreviewAnimation(preset, options);
|
|
3810
3800
|
if (!descriptor) {
|
|
3811
3801
|
return;
|
|
3812
3802
|
}
|
|
@@ -3819,7 +3809,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3819
3809
|
return;
|
|
3820
3810
|
}
|
|
3821
3811
|
const stage = domEl.offsetParent;
|
|
3822
|
-
const descriptor =
|
|
3812
|
+
const descriptor = chunk3TPQY6WR_js.buildMotionPathPreview({
|
|
3823
3813
|
path,
|
|
3824
3814
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3825
3815
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|