pptx-react-viewer 3.8.0 → 3.9.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 +8 -0
- package/dist/{AiChatPanel-XLQM4BQJ.js → AiChatPanel-3A42W7RW.js} +25 -25
- package/dist/AiChatPanel-3A42W7RW.js.br +0 -0
- package/dist/AiChatPanel-3A42W7RW.js.gz +0 -0
- package/dist/{AiChatPanel-A5DCEHTO.mjs → AiChatPanel-II6VOOAL.mjs} +4 -4
- package/dist/AiChatPanel-II6VOOAL.mjs.br +0 -0
- package/dist/AiChatPanel-II6VOOAL.mjs.gz +0 -0
- package/dist/{Area3DChartScene-5CMEMIBI.mjs → Area3DChartScene-JM3CQ3WQ.mjs} +21 -4
- package/dist/Area3DChartScene-JM3CQ3WQ.mjs.br +0 -0
- package/dist/Area3DChartScene-JM3CQ3WQ.mjs.gz +0 -0
- package/dist/{Area3DChartScene-RZ3V3WOR.js → Area3DChartScene-XJK4ZA4R.js} +21 -4
- package/dist/Area3DChartScene-XJK4ZA4R.js.br +0 -0
- package/dist/Area3DChartScene-XJK4ZA4R.js.gz +0 -0
- package/dist/{Bar3DChartScene-KHCQ6TEC.js → Bar3DChartScene-RGRZY5P6.js} +21 -4
- package/dist/Bar3DChartScene-RGRZY5P6.js.br +0 -0
- package/dist/Bar3DChartScene-RGRZY5P6.js.gz +0 -0
- package/dist/{Bar3DChartScene-H3MYUJKV.mjs → Bar3DChartScene-VNFWI2QG.mjs} +21 -4
- package/dist/Bar3DChartScene-VNFWI2QG.mjs.br +0 -0
- package/dist/Bar3DChartScene-VNFWI2QG.mjs.gz +0 -0
- package/dist/{Line3DChartScene-YFRPJHDX.mjs → Line3DChartScene-GXOWGIFJ.mjs} +21 -4
- package/dist/Line3DChartScene-GXOWGIFJ.mjs.br +0 -0
- package/dist/Line3DChartScene-GXOWGIFJ.mjs.gz +0 -0
- package/dist/{Line3DChartScene-QEACF3U3.js → Line3DChartScene-MEY42DBF.js} +21 -4
- package/dist/Line3DChartScene-MEY42DBF.js.br +0 -0
- package/dist/Line3DChartScene-MEY42DBF.js.gz +0 -0
- package/dist/{Model3DScene-QQWKGJ3T.js → Model3DScene-MWXTGHDM.js} +2 -2
- package/dist/Model3DScene-MWXTGHDM.js.br +0 -0
- package/dist/Model3DScene-MWXTGHDM.js.gz +0 -0
- package/dist/{Model3DScene-O24KP723.mjs → Model3DScene-WJ3MMIZH.mjs} +1 -1
- package/dist/Model3DScene-WJ3MMIZH.mjs.br +0 -0
- package/dist/Model3DScene-WJ3MMIZH.mjs.gz +0 -0
- package/dist/{PieChart3DScene-L3MHKQHW.js → PieChart3DScene-FJJGOQIS.js} +15 -4
- package/dist/PieChart3DScene-FJJGOQIS.js.br +0 -0
- package/dist/PieChart3DScene-FJJGOQIS.js.gz +0 -0
- package/dist/{PieChart3DScene-CI6CW22C.mjs → PieChart3DScene-WXJEDYMK.mjs} +15 -4
- package/dist/PieChart3DScene-WXJEDYMK.mjs.br +0 -0
- package/dist/PieChart3DScene-WXJEDYMK.mjs.gz +0 -0
- package/dist/{SmartArt3DScene-ZO3KFDI2.js → SmartArt3DScene-BK7QN3WT.js} +85 -23
- package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
- package/dist/{SmartArt3DScene-XCFVGCXE.mjs → SmartArt3DScene-ODKCGJBO.mjs} +85 -23
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-JUXRC3K2.mjs → SurfaceChart3DScene-IKPE2SVE.mjs} +19 -4
- package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-5IER6VFW.js → SurfaceChart3DScene-VDK3F224.js} +19 -4
- package/dist/SurfaceChart3DScene-VDK3F224.js.br +0 -0
- package/dist/SurfaceChart3DScene-VDK3F224.js.gz +0 -0
- package/dist/{chunk-4222CHFH.js → chunk-3NIJ5HIZ.js} +3187 -2514
- package/dist/chunk-3NIJ5HIZ.js.br +0 -0
- package/dist/chunk-3NIJ5HIZ.js.gz +0 -0
- package/dist/{chunk-RNP5HP4L.mjs → chunk-3Y63XPIN.mjs} +1 -1
- package/dist/chunk-3Y63XPIN.mjs.br +0 -0
- package/dist/{chunk-RNP5HP4L.mjs.gz → chunk-3Y63XPIN.mjs.gz} +0 -0
- package/dist/{chunk-DE3S3UHX.js → chunk-5CPGDXD6.js} +518 -442
- package/dist/chunk-5CPGDXD6.js.br +0 -0
- package/dist/chunk-5CPGDXD6.js.gz +0 -0
- package/dist/{chunk-PFPKBNNZ.mjs → chunk-76Z3X6JX.mjs} +1189 -516
- package/dist/chunk-76Z3X6JX.mjs.br +0 -0
- package/dist/chunk-76Z3X6JX.mjs.gz +0 -0
- package/dist/chunk-DNR6CH6I.js +30 -0
- package/dist/chunk-DNR6CH6I.js.br +0 -0
- package/dist/chunk-DNR6CH6I.js.gz +0 -0
- package/dist/{chunk-SN5EUDIT.js → chunk-G3JPCRKN.js} +13644 -7350
- package/dist/chunk-G3JPCRKN.js.br +0 -0
- package/dist/chunk-G3JPCRKN.js.gz +0 -0
- package/dist/{chunk-FRZIBZTE.mjs → chunk-JBSAKP4Z.mjs} +15 -0
- package/dist/chunk-JBSAKP4Z.mjs.br +0 -0
- package/dist/{chunk-FRZIBZTE.mjs.gz → chunk-JBSAKP4Z.mjs.gz} +0 -0
- package/dist/{chunk-F5NPGNMA.js → chunk-K6Q6KLA6.js} +5 -5
- package/dist/chunk-K6Q6KLA6.js.br +0 -0
- package/dist/chunk-K6Q6KLA6.js.gz +0 -0
- package/dist/{chunk-QWA5YEIZ.js → chunk-LBJAVP3H.js} +194 -178
- package/dist/chunk-LBJAVP3H.js.br +0 -0
- package/dist/chunk-LBJAVP3H.js.gz +0 -0
- package/dist/{chunk-RHWQKZLB.mjs → chunk-NTWFXLZX.mjs} +23 -7
- package/dist/chunk-NTWFXLZX.mjs.br +0 -0
- package/dist/chunk-NTWFXLZX.mjs.gz +0 -0
- package/dist/{chunk-UPJW34YG.mjs → chunk-PCCM7NVY.mjs} +85 -9
- package/dist/chunk-PCCM7NVY.mjs.br +0 -0
- package/dist/chunk-PCCM7NVY.mjs.gz +0 -0
- package/dist/chunk-T6GFCLSM.mjs +27 -0
- package/dist/chunk-T6GFCLSM.mjs.br +4 -0
- package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
- package/dist/{chunk-L3ZIBQEB.js → chunk-TEVGDXVW.js} +15 -0
- package/dist/chunk-TEVGDXVW.js.br +0 -0
- package/dist/{chunk-L3ZIBQEB.js.gz → chunk-TEVGDXVW.js.gz} +0 -0
- package/dist/{chunk-6IMB5DNJ.mjs → chunk-VQX7G75Z.mjs} +13621 -7340
- package/dist/chunk-VQX7G75Z.mjs.br +0 -0
- package/dist/chunk-VQX7G75Z.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +388 -80
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +445 -81
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- 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 +338 -43
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
- package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
- package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
- package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
- package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
- package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
- package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
- package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
- package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
- package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
- package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
- package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
- package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
- package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
- package/dist/Model3DScene-O24KP723.mjs.br +0 -0
- package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
- package/dist/Model3DScene-QQWKGJ3T.js.br +0 -0
- package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
- package/dist/PieChart3DScene-CI6CW22C.mjs.br +0 -0
- package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
- package/dist/PieChart3DScene-L3MHKQHW.js.br +0 -0
- package/dist/PieChart3DScene-L3MHKQHW.js.gz +0 -0
- package/dist/SmartArt3DScene-XCFVGCXE.mjs.br +0 -0
- package/dist/SmartArt3DScene-XCFVGCXE.mjs.gz +0 -0
- package/dist/SmartArt3DScene-ZO3KFDI2.js.br +0 -0
- package/dist/SmartArt3DScene-ZO3KFDI2.js.gz +0 -0
- package/dist/SurfaceChart3DScene-5IER6VFW.js.br +0 -0
- package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
- package/dist/chunk-4222CHFH.js.br +0 -0
- package/dist/chunk-4222CHFH.js.gz +0 -0
- package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
- package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
- package/dist/chunk-DE3S3UHX.js.br +0 -0
- package/dist/chunk-DE3S3UHX.js.gz +0 -0
- package/dist/chunk-F5NPGNMA.js.br +0 -0
- package/dist/chunk-F5NPGNMA.js.gz +0 -0
- package/dist/chunk-FRZIBZTE.mjs.br +0 -0
- package/dist/chunk-L3ZIBQEB.js.br +0 -0
- package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
- package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
- package/dist/chunk-QWA5YEIZ.js.br +0 -0
- package/dist/chunk-QWA5YEIZ.js.gz +0 -0
- package/dist/chunk-RHWQKZLB.mjs.br +0 -0
- package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
- package/dist/chunk-RNP5HP4L.mjs.br +0 -0
- package/dist/chunk-SN5EUDIT.js.br +0 -0
- package/dist/chunk-SN5EUDIT.js.gz +0 -0
- package/dist/chunk-UPJW34YG.mjs.br +0 -0
- package/dist/chunk-UPJW34YG.mjs.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkG3JPCRKN_js = require('./chunk-G3JPCRKN.js');
|
|
4
|
+
var chunkTEVGDXVW_js = require('./chunk-TEVGDXVW.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React7 = require('react');
|
|
@@ -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 chunkG3JPCRKN_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 chunkG3JPCRKN_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 = chunkG3JPCRKN_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 = chunkG3JPCRKN_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 = chunkG3JPCRKN_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 (!chunkG3JPCRKN_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 (!chunkG3JPCRKN_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkG3JPCRKN_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 = chunkG3JPCRKN_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 = chunkG3JPCRKN_js.hasShapeProperties(element) ? chunkG3JPCRKN_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 (!chunkG3JPCRKN_js.isImageLikeElement(element)) {
|
|
276
276
|
return void 0;
|
|
277
277
|
}
|
|
278
|
-
return
|
|
278
|
+
return chunkG3JPCRKN_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
279
279
|
}
|
|
280
280
|
function getImageTilingStyle2(element) {
|
|
281
|
-
return
|
|
281
|
+
return chunkG3JPCRKN_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" } : chunkG3JPCRKN_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 } = chunkG3JPCRKN_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 chunkG3JPCRKN_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 (chunkG3JPCRKN_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
@@ -581,7 +581,7 @@ function PresentationMediaController({
|
|
|
581
581
|
] });
|
|
582
582
|
}
|
|
583
583
|
function label(key) {
|
|
584
|
-
return key === void 0 ? void 0 :
|
|
584
|
+
return key === void 0 ? void 0 : chunkTEVGDXVW_js.translationsEn[key];
|
|
585
585
|
}
|
|
586
586
|
function FallbackIcon({
|
|
587
587
|
paths,
|
|
@@ -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
|
+
...{ [chunkG3JPCRKN_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
621
621
|
children: [
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
623
|
FallbackIcon,
|
|
624
624
|
{
|
|
625
|
-
paths:
|
|
625
|
+
paths: chunkG3JPCRKN_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(chunkG3JPCRKN_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
|
+
...{ [chunkG3JPCRKN_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
648
648
|
children: [
|
|
649
649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
650
650
|
FallbackIcon,
|
|
651
651
|
{
|
|
652
|
-
paths:
|
|
652
|
+
paths: chunkG3JPCRKN_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(chunkG3JPCRKN_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 = chunkG3JPCRKN_js.mediaFallbackVisual(surface, {
|
|
668
668
|
hasPoster: Boolean(posterUrl),
|
|
669
669
|
missing: element.mediaMissing === true
|
|
670
670
|
});
|
|
@@ -674,9 +674,9 @@ function renderMediaFallback({
|
|
|
674
674
|
"img",
|
|
675
675
|
{
|
|
676
676
|
src: posterUrl,
|
|
677
|
-
alt: visual.dimPoster ?
|
|
677
|
+
alt: visual.dimPoster ? chunkTEVGDXVW_js.translationsEn["pptx.media.posterAlt"] : chunkTEVGDXVW_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
678
678
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
679
|
-
style:
|
|
679
|
+
style: chunkG3JPCRKN_js.getImageFitStyle(element)
|
|
680
680
|
}
|
|
681
681
|
),
|
|
682
682
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -686,7 +686,7 @@ function renderMediaFallback({
|
|
|
686
686
|
}
|
|
687
687
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
688
688
|
if (element.type !== "media") {
|
|
689
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
689
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkTEVGDXVW_js.translationsEn["pptx.media.title"] });
|
|
690
690
|
}
|
|
691
691
|
const mediaType = element.mediaType;
|
|
692
692
|
const mediaPath = element.mediaPath;
|
|
@@ -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 = chunkG3JPCRKN_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;
|
|
@@ -772,25 +772,25 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
772
772
|
if (surface.presenting || surface.preview) {
|
|
773
773
|
return null;
|
|
774
774
|
}
|
|
775
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
775
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkTEVGDXVW_js.translationsEn["pptx.media.title"] });
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
// src/viewer/utils/text-utils.tsx
|
|
779
779
|
function getTextStyleForElement(element, fallbackColor) {
|
|
780
|
-
return
|
|
780
|
+
return chunkG3JPCRKN_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 (!chunkG3JPCRKN_js.hasTextProperties(element)) {
|
|
786
786
|
return {};
|
|
787
787
|
}
|
|
788
|
-
const writingMode =
|
|
789
|
-
const textOrientation =
|
|
790
|
-
const verticalDirection =
|
|
788
|
+
const writingMode = chunkG3JPCRKN_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
789
|
+
const textOrientation = chunkG3JPCRKN_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
790
|
+
const verticalDirection = chunkG3JPCRKN_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 = chunkG3JPCRKN_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
|
+
...chunkG3JPCRKN_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,
|
|
@@ -826,8 +826,8 @@ function getTextLayoutStyle(element) {
|
|
|
826
826
|
}
|
|
827
827
|
|
|
828
828
|
// src/viewer/utils/text-effects.tsx
|
|
829
|
-
function buildTextBody3DSceneStyle2(textStyle) {
|
|
830
|
-
return
|
|
829
|
+
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
830
|
+
return chunkG3JPCRKN_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}${chunkG3JPCRKN_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 = chunkG3JPCRKN_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: chunkG3JPCRKN_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 = chunkG3JPCRKN_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 ? chunkG3JPCRKN_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] = chunkG3JPCRKN_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 = chunkG3JPCRKN_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 = chunkG3JPCRKN_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: chunkG3JPCRKN_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 = chunkG3JPCRKN_js.convertOmmlToMathMl(equationXml);
|
|
1211
|
+
const safeMathml = mathml ? chunkG3JPCRKN_js.sanitizeMathMl(mathml) : "";
|
|
1212
1212
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1213
1213
|
"span",
|
|
1214
1214
|
{
|
|
@@ -1218,7 +1218,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1218
1218
|
},
|
|
1219
1219
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1220
1220
|
}
|
|
1221
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1221
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkTEVGDXVW_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1222
1222
|
if (equationNumber) {
|
|
1223
1223
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1224
1224
|
"span",
|
|
@@ -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 = chunkG3JPCRKN_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 * chunkG3JPCRKN_js.resolveAutoFitFontScale(element.textStyle);
|
|
1349
1349
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1350
|
-
const fontKerning =
|
|
1350
|
+
const fontKerning = chunkG3JPCRKN_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1351
1351
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1352
|
-
const baseFontFamily = rawFontFamily ?
|
|
1352
|
+
const baseFontFamily = rawFontFamily ? chunkG3JPCRKN_js.getSubstituteFontFamily(
|
|
1353
1353
|
rawFontFamily,
|
|
1354
|
-
|
|
1354
|
+
chunkG3JPCRKN_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1355
1355
|
) : DEFAULT_FONT_FAMILY2;
|
|
1356
|
-
const scriptFonts =
|
|
1357
|
-
const needsScriptFonts =
|
|
1356
|
+
const scriptFonts = chunkG3JPCRKN_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1357
|
+
const needsScriptFonts = chunkG3JPCRKN_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 = chunkG3JPCRKN_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 = chunkG3JPCRKN_js.pieceLetterSpacing(
|
|
1374
1374
|
authoredLetterSpacing,
|
|
1375
|
-
|
|
1375
|
+
chunkG3JPCRKN_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1376
1376
|
);
|
|
1377
|
-
const hollow =
|
|
1377
|
+
const hollow = chunkG3JPCRKN_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 = chunkG3JPCRKN_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
|
+
chunkG3JPCRKN_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 (!chunkG3JPCRKN_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 = chunkG3JPCRKN_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 (!chunkG3JPCRKN_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 (!chunkG3JPCRKN_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 ${chunkG3JPCRKN_js.colorWithOpacity(
|
|
1590
|
+
chunkG3JPCRKN_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1591
1591
|
opacity
|
|
1592
1592
|
)}`;
|
|
1593
1593
|
}
|
|
1594
1594
|
function buildLineGlowFilter(element) {
|
|
1595
|
-
if (!
|
|
1595
|
+
if (!chunkG3JPCRKN_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 = chunkG3JPCRKN_js.colorWithOpacity(chunkG3JPCRKN_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 (!chunkG3JPCRKN_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 = chunkG3JPCRKN_js.hexToRgbUnit(color1);
|
|
1619
|
+
const c2 = chunkG3JPCRKN_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 chunkG3JPCRKN_js.build3DExtrusionData(
|
|
1664
1664
|
shape3d,
|
|
1665
1665
|
scene3d,
|
|
1666
1666
|
fillColor,
|
|
@@ -1668,8 +1668,8 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1668
1668
|
elementHeight
|
|
1669
1669
|
);
|
|
1670
1670
|
}
|
|
1671
|
-
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
1672
|
-
|
|
1671
|
+
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize) {
|
|
1672
|
+
chunkG3JPCRKN_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback, elementSize);
|
|
1673
1673
|
}
|
|
1674
1674
|
|
|
1675
1675
|
// src/viewer/utils/shape-visual-style.ts
|
|
@@ -1677,16 +1677,27 @@ function rendersCustomVectorPath(element) {
|
|
|
1677
1677
|
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;
|
|
1678
1678
|
}
|
|
1679
1679
|
function rendersWedgeCalloutVector(element) {
|
|
1680
|
-
return element.type === "shape" &&
|
|
1680
|
+
return element.type === "shape" && chunkG3JPCRKN_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1681
1681
|
}
|
|
1682
1682
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1683
|
-
if (
|
|
1683
|
+
if (element.type === "group") {
|
|
1684
|
+
const fx2 = chunkG3JPCRKN_js.getComputedEffectStyle(element);
|
|
1685
|
+
const groupStyle = {};
|
|
1686
|
+
if (fx2.filter) {
|
|
1687
|
+
groupStyle.filter = fx2.filter;
|
|
1688
|
+
}
|
|
1689
|
+
if (fx2.overflowVisible) {
|
|
1690
|
+
groupStyle.overflow = "visible";
|
|
1691
|
+
}
|
|
1692
|
+
return groupStyle;
|
|
1693
|
+
}
|
|
1694
|
+
if (!chunkG3JPCRKN_js.hasShapeProperties(element)) {
|
|
1684
1695
|
return {};
|
|
1685
1696
|
}
|
|
1686
1697
|
const ss = element.shapeStyle;
|
|
1687
|
-
const fill = animatesFill ? void 0 :
|
|
1688
|
-
const fx =
|
|
1689
|
-
const stroke =
|
|
1698
|
+
const fill = animatesFill ? void 0 : chunkG3JPCRKN_js.getComputedFillStyle(element, parentGroupFill);
|
|
1699
|
+
const fx = chunkG3JPCRKN_js.getComputedEffectStyle(element);
|
|
1700
|
+
const stroke = chunkG3JPCRKN_js.getComputedStrokeStyle(element);
|
|
1690
1701
|
const base = {
|
|
1691
1702
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1692
1703
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1725,7 +1736,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1725
1736
|
};
|
|
1726
1737
|
Object.assign(
|
|
1727
1738
|
base,
|
|
1728
|
-
|
|
1739
|
+
chunkG3JPCRKN_js.getAnimationColorBaseStyle(element, {
|
|
1729
1740
|
animatesFill,
|
|
1730
1741
|
animatesStroke,
|
|
1731
1742
|
parentGroupFill
|
|
@@ -1736,8 +1747,11 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1736
1747
|
base.borderColor = void 0;
|
|
1737
1748
|
base.borderStyle = void 0;
|
|
1738
1749
|
}
|
|
1739
|
-
apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor
|
|
1740
|
-
|
|
1750
|
+
apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor, {
|
|
1751
|
+
width: element.width,
|
|
1752
|
+
height: element.height
|
|
1753
|
+
});
|
|
1754
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkG3JPCRKN_js.isStrokeOnlyPresetElement(element)) {
|
|
1741
1755
|
base.backgroundColor = "transparent";
|
|
1742
1756
|
base.backgroundImage = void 0;
|
|
1743
1757
|
base.borderWidth = void 0;
|
|
@@ -1751,7 +1765,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1751
1765
|
if (rendersWedgeCalloutVector(element)) {
|
|
1752
1766
|
return base;
|
|
1753
1767
|
}
|
|
1754
|
-
const geometry =
|
|
1768
|
+
const geometry = chunkG3JPCRKN_js.resolveShapeGeometry(element);
|
|
1755
1769
|
switch (geometry.kind) {
|
|
1756
1770
|
case "bare":
|
|
1757
1771
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1777,13 +1791,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1777
1791
|
function getConnectorAdjustment(element, key, fallback) {
|
|
1778
1792
|
const direct = element.shapeAdjustments?.[key];
|
|
1779
1793
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1780
|
-
return
|
|
1794
|
+
return chunkG3JPCRKN_js.clampUnitInterval(direct / 1e5);
|
|
1781
1795
|
}
|
|
1782
1796
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1783
1797
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1784
|
-
return
|
|
1798
|
+
return chunkG3JPCRKN_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1785
1799
|
}
|
|
1786
|
-
return
|
|
1800
|
+
return chunkG3JPCRKN_js.clampUnitInterval(fallback);
|
|
1787
1801
|
}
|
|
1788
1802
|
function getConnectorPathGeometry(element) {
|
|
1789
1803
|
const width = Math.max(element.width, 0);
|
|
@@ -1948,11 +1962,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1948
1962
|
strokePaint,
|
|
1949
1963
|
strokeWidth,
|
|
1950
1964
|
dashArray,
|
|
1951
|
-
lineCap:
|
|
1965
|
+
lineCap: chunkG3JPCRKN_js.svgLineCap(shapeStyle?.lineCap),
|
|
1952
1966
|
lineJoin,
|
|
1953
1967
|
miterLimit,
|
|
1954
|
-
offsets:
|
|
1955
|
-
widths:
|
|
1968
|
+
offsets: chunkG3JPCRKN_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1969
|
+
widths: chunkG3JPCRKN_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1956
1970
|
};
|
|
1957
1971
|
}
|
|
1958
1972
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -1975,12 +1989,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1975
1989
|
}
|
|
1976
1990
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1977
1991
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1978
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1992
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkG3JPCRKN_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
1979
1993
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
1980
|
-
const gradientPaint = gradient ?
|
|
1994
|
+
const gradientPaint = gradient ? chunkG3JPCRKN_js.svgGradientFillRef(gradient) : void 0;
|
|
1981
1995
|
const nodes = [];
|
|
1982
1996
|
if (subpaths && needsPerSubpath) {
|
|
1983
|
-
const paints =
|
|
1997
|
+
const paints = chunkG3JPCRKN_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
1984
1998
|
paints.forEach((paint, idx) => {
|
|
1985
1999
|
if (paint.fill !== "none") {
|
|
1986
2000
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2009,7 +2023,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2009
2023
|
"path",
|
|
2010
2024
|
{
|
|
2011
2025
|
d: pathData,
|
|
2012
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2026
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkG3JPCRKN_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2013
2027
|
stroke: "none",
|
|
2014
2028
|
vectorEffect: "non-scaling-stroke"
|
|
2015
2029
|
},
|
|
@@ -2035,14 +2049,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2035
2049
|
);
|
|
2036
2050
|
}
|
|
2037
2051
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2038
|
-
if (!
|
|
2052
|
+
if (!chunkG3JPCRKN_js.hasShapeProperties(element)) {
|
|
2039
2053
|
return null;
|
|
2040
2054
|
}
|
|
2041
2055
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2042
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2043
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2044
|
-
const dashType =
|
|
2045
|
-
const dashArray =
|
|
2056
|
+
const fillPaint = animatesFill ? "inherit" : chunkG3JPCRKN_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2057
|
+
const strokePaint = animatesStroke ? "inherit" : chunkG3JPCRKN_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2058
|
+
const dashType = chunkG3JPCRKN_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2059
|
+
const dashArray = chunkG3JPCRKN_js.getSvgStrokeDasharray(
|
|
2046
2060
|
dashType,
|
|
2047
2061
|
Math.max(strokeWidth, 1),
|
|
2048
2062
|
element.shapeStyle?.customDashSegments
|
|
@@ -2123,13 +2137,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2123
2137
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2124
2138
|
// without this the shape fell back to the parser's representative solid
|
|
2125
2139
|
// and lost every fade (issue #132).
|
|
2126
|
-
|
|
2140
|
+
chunkG3JPCRKN_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2127
2141
|
);
|
|
2128
2142
|
}
|
|
2129
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2143
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkG3JPCRKN_js.buildStrokeOutline(element)) {
|
|
2130
2144
|
const width = Math.max(element.width, 1);
|
|
2131
2145
|
const height = Math.max(element.height, 1);
|
|
2132
|
-
const geometry =
|
|
2146
|
+
const geometry = chunkG3JPCRKN_js.getPresetShapeVectorGeometry(
|
|
2133
2147
|
element.shapeType || "rect",
|
|
2134
2148
|
width,
|
|
2135
2149
|
height,
|
|
@@ -2157,18 +2171,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2157
2171
|
);
|
|
2158
2172
|
}
|
|
2159
2173
|
}
|
|
2160
|
-
if (element.type === "shape" &&
|
|
2174
|
+
if (element.type === "shape" && chunkG3JPCRKN_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2161
2175
|
const width = Math.max(element.width, 1);
|
|
2162
2176
|
const height = Math.max(element.height, 1);
|
|
2163
|
-
const geometry =
|
|
2177
|
+
const geometry = chunkG3JPCRKN_js.getPresetShapeVectorGeometry(
|
|
2164
2178
|
element.shapeType,
|
|
2165
2179
|
width,
|
|
2166
2180
|
height,
|
|
2167
2181
|
element.shapeAdjustments
|
|
2168
2182
|
);
|
|
2169
2183
|
if (geometry) {
|
|
2170
|
-
const gradient =
|
|
2171
|
-
const gradientPaint = gradient ?
|
|
2184
|
+
const gradient = chunkG3JPCRKN_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2185
|
+
const gradientPaint = gradient ? chunkG3JPCRKN_js.svgGradientFillRef(gradient) : void 0;
|
|
2172
2186
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2173
2187
|
"svg",
|
|
2174
2188
|
{
|
|
@@ -2201,18 +2215,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2201
2215
|
);
|
|
2202
2216
|
}
|
|
2203
2217
|
}
|
|
2204
|
-
if (
|
|
2218
|
+
if (chunkG3JPCRKN_js.isCalloutShape(normalizedType)) {
|
|
2205
2219
|
const width = Math.max(element.width, 1);
|
|
2206
2220
|
const height = Math.max(element.height, 1);
|
|
2207
|
-
const geometry =
|
|
2221
|
+
const geometry = chunkG3JPCRKN_js.getCalloutLeaderLineGeometry(
|
|
2208
2222
|
normalizedType,
|
|
2209
2223
|
width,
|
|
2210
2224
|
height,
|
|
2211
2225
|
element.shapeAdjustments
|
|
2212
2226
|
);
|
|
2213
2227
|
if (geometry && geometry.points.length >= 2) {
|
|
2214
|
-
const leaderPath =
|
|
2215
|
-
const bounds =
|
|
2228
|
+
const leaderPath = chunkG3JPCRKN_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2229
|
+
const bounds = chunkG3JPCRKN_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2216
2230
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2217
2231
|
const offsetLeft = bounds.minX;
|
|
2218
2232
|
const offsetTop = bounds.minY;
|
|
@@ -2275,10 +2289,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2275
2289
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2276
2290
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2277
2291
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2278
|
-
const connectorLineCap =
|
|
2292
|
+
const connectorLineCap = chunkG3JPCRKN_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2279
2293
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2280
|
-
const offsets =
|
|
2281
|
-
const widths =
|
|
2294
|
+
const offsets = chunkG3JPCRKN_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2295
|
+
const widths = chunkG3JPCRKN_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2282
2296
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2283
2297
|
"svg",
|
|
2284
2298
|
{
|
|
@@ -2345,15 +2359,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2345
2359
|
}
|
|
2346
2360
|
const rawStops = stops.map((gs) => {
|
|
2347
2361
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2348
|
-
const color =
|
|
2349
|
-
const opacity =
|
|
2362
|
+
const color = chunkG3JPCRKN_js.parseDrawingColor(gs) ?? "#888888";
|
|
2363
|
+
const opacity = chunkG3JPCRKN_js.parseDrawingColorOpacity(gs);
|
|
2350
2364
|
return { position: pos, color, opacity };
|
|
2351
2365
|
}).sort((a, b) => a.position - b.position);
|
|
2352
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2366
|
+
const stopStrings = rawStops.map((s) => `${chunkG3JPCRKN_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2353
2367
|
const lin = gradFill["a:lin"];
|
|
2354
2368
|
if (lin) {
|
|
2355
2369
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2356
|
-
const angleDeg = Math.round(
|
|
2370
|
+
const angleDeg = Math.round(chunkG3JPCRKN_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2357
2371
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2358
2372
|
}
|
|
2359
2373
|
const path = gradFill["a:path"];
|
|
@@ -2367,7 +2381,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2367
2381
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2368
2382
|
} : void 0;
|
|
2369
2383
|
if (pathType === "rect") {
|
|
2370
|
-
return
|
|
2384
|
+
return chunkG3JPCRKN_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2371
2385
|
}
|
|
2372
2386
|
let cx = 50;
|
|
2373
2387
|
let cy = 50;
|
|
@@ -2389,8 +2403,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2389
2403
|
if (!pattFill) {
|
|
2390
2404
|
return void 0;
|
|
2391
2405
|
}
|
|
2392
|
-
const fgColor =
|
|
2393
|
-
const bgColor =
|
|
2406
|
+
const fgColor = chunkG3JPCRKN_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2407
|
+
const bgColor = chunkG3JPCRKN_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2394
2408
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2395
2409
|
switch (preset) {
|
|
2396
2410
|
case "ltHorz":
|
|
@@ -2501,11 +2515,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2501
2515
|
const prstDash = ln["a:prstDash"];
|
|
2502
2516
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2503
2517
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2504
|
-
const color =
|
|
2518
|
+
const color = chunkG3JPCRKN_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2505
2519
|
if (color) {
|
|
2506
|
-
const opacity =
|
|
2520
|
+
const opacity = chunkG3JPCRKN_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2507
2521
|
const key = `${edge.prefix}`;
|
|
2508
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2522
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkG3JPCRKN_js.colorWithOpacity(color, opacity)}`;
|
|
2509
2523
|
}
|
|
2510
2524
|
}
|
|
2511
2525
|
return borderStyle;
|
|
@@ -2518,7 +2532,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2518
2532
|
const textShadowParts = [];
|
|
2519
2533
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2520
2534
|
if (outerShdw) {
|
|
2521
|
-
const shdwColor =
|
|
2535
|
+
const shdwColor = chunkG3JPCRKN_js.parseDrawingColor(outerShdw);
|
|
2522
2536
|
if (shdwColor) {
|
|
2523
2537
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2524
2538
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2536,7 +2550,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2536
2550
|
}
|
|
2537
2551
|
const glow = effectLst["a:glow"];
|
|
2538
2552
|
if (glow) {
|
|
2539
|
-
const glowColor =
|
|
2553
|
+
const glowColor = chunkG3JPCRKN_js.parseDrawingColor(glow);
|
|
2540
2554
|
if (glowColor) {
|
|
2541
2555
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2542
2556
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2616,10 +2630,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2616
2630
|
if (runProps?.["@_u"] !== void 0) {
|
|
2617
2631
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2618
2632
|
}
|
|
2619
|
-
const runColor =
|
|
2633
|
+
const runColor = chunkG3JPCRKN_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkG3JPCRKN_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2620
2634
|
if (runColor) {
|
|
2621
|
-
const opacity =
|
|
2622
|
-
cellStyle.color =
|
|
2635
|
+
const opacity = chunkG3JPCRKN_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2636
|
+
cellStyle.color = chunkG3JPCRKN_js.colorWithOpacity(runColor, opacity);
|
|
2623
2637
|
}
|
|
2624
2638
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2625
2639
|
if (fontFamily) {
|
|
@@ -2629,15 +2643,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2629
2643
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2630
2644
|
}
|
|
2631
2645
|
const cellProperties = cellXml["a:tcPr"];
|
|
2632
|
-
const cellFill =
|
|
2646
|
+
const cellFill = chunkG3JPCRKN_js.parseDrawingColor(
|
|
2633
2647
|
cellProperties?.["a:solidFill"],
|
|
2634
2648
|
schemeColorOverrides
|
|
2635
2649
|
);
|
|
2636
2650
|
if (cellFill) {
|
|
2637
|
-
const opacity =
|
|
2651
|
+
const opacity = chunkG3JPCRKN_js.parseDrawingColorOpacity(
|
|
2638
2652
|
cellProperties?.["a:solidFill"]
|
|
2639
2653
|
);
|
|
2640
|
-
cellStyle.backgroundColor =
|
|
2654
|
+
cellStyle.backgroundColor = chunkG3JPCRKN_js.colorWithOpacity(cellFill, opacity);
|
|
2641
2655
|
} else {
|
|
2642
2656
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2643
2657
|
if (gradCss) {
|
|
@@ -2652,16 +2666,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2652
2666
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2653
2667
|
Object.assign(cellStyle, edgeBorders);
|
|
2654
2668
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2655
|
-
const borderColor =
|
|
2669
|
+
const borderColor = chunkG3JPCRKN_js.parseDrawingColor(
|
|
2656
2670
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2657
2671
|
schemeColorOverrides
|
|
2658
|
-
) ||
|
|
2672
|
+
) || chunkG3JPCRKN_js.parseDrawingColor(
|
|
2659
2673
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2660
2674
|
schemeColorOverrides
|
|
2661
|
-
) ||
|
|
2675
|
+
) || chunkG3JPCRKN_js.parseDrawingColor(
|
|
2662
2676
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2663
2677
|
schemeColorOverrides
|
|
2664
|
-
) ||
|
|
2678
|
+
) || chunkG3JPCRKN_js.parseDrawingColor(
|
|
2665
2679
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2666
2680
|
schemeColorOverrides
|
|
2667
2681
|
);
|
|
@@ -2733,7 +2747,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2733
2747
|
if (element.type !== "table") {
|
|
2734
2748
|
return void 0;
|
|
2735
2749
|
}
|
|
2736
|
-
return
|
|
2750
|
+
return chunkG3JPCRKN_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2737
2751
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2738
2752
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2739
2753
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2809,7 +2823,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2809
2823
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2810
2824
|
"span",
|
|
2811
2825
|
{
|
|
2812
|
-
style: { position: "relative", ...
|
|
2826
|
+
style: { position: "relative", ...chunkG3JPCRKN_js.cellRunStyle(run) },
|
|
2813
2827
|
children: run.text
|
|
2814
2828
|
},
|
|
2815
2829
|
`r-${index}`
|
|
@@ -2817,7 +2831,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2817
2831
|
});
|
|
2818
2832
|
}
|
|
2819
2833
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2820
|
-
return
|
|
2834
|
+
return chunkG3JPCRKN_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2821
2835
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2822
2836
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2823
2837
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2950,7 +2964,7 @@ function TableResizeOverlay({
|
|
|
2950
2964
|
const containerRef = React7.useRef(null);
|
|
2951
2965
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2952
2966
|
const dragRef = React7.useRef(null);
|
|
2953
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2967
|
+
const colBoundaries = React7.useMemo(() => chunkG3JPCRKN_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2954
2968
|
const measureRows = React7.useCallback(() => {
|
|
2955
2969
|
const container = containerRef.current;
|
|
2956
2970
|
if (!container) {
|
|
@@ -2997,11 +3011,11 @@ function TableResizeOverlay({
|
|
|
2997
3011
|
const rect = containerRef.current.getBoundingClientRect();
|
|
2998
3012
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
2999
3013
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3000
|
-
onResizeColumns(
|
|
3014
|
+
onResizeColumns(chunkG3JPCRKN_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3001
3015
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3002
3016
|
const deltaY = e.clientY - drag.startPos;
|
|
3003
|
-
const newHeight =
|
|
3004
|
-
drag.initialRowHeight ??
|
|
3017
|
+
const newHeight = chunkG3JPCRKN_js.computeResizedRowHeight(
|
|
3018
|
+
drag.initialRowHeight ?? chunkG3JPCRKN_js.DEFAULT_ROW_HEIGHT,
|
|
3005
3019
|
deltaY
|
|
3006
3020
|
);
|
|
3007
3021
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3039,7 +3053,7 @@ function TableResizeOverlay({
|
|
|
3039
3053
|
e.stopPropagation();
|
|
3040
3054
|
const table = containerRef.current?.querySelector("table");
|
|
3041
3055
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3042
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3056
|
+
const actualHeight = tr?.offsetHeight ?? chunkG3JPCRKN_js.DEFAULT_ROW_HEIGHT;
|
|
3043
3057
|
document.body.style.cursor = "row-resize";
|
|
3044
3058
|
document.body.style.userSelect = "none";
|
|
3045
3059
|
dragRef.current = {
|
|
@@ -3079,14 +3093,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3079
3093
|
const rowCount = tableData.rows.length;
|
|
3080
3094
|
const columnCount = tableData.columnWidths.length;
|
|
3081
3095
|
const selectedCell = options?.selectedCell || null;
|
|
3082
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3096
|
+
const isEditable = Boolean(options?.editable) && chunkG3JPCRKN_js.canDrillDown(element);
|
|
3083
3097
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3084
3098
|
const sharedCtx = {
|
|
3085
3099
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3086
3100
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3087
3101
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3088
3102
|
};
|
|
3089
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3103
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkG3JPCRKN_js.tableCellCss(
|
|
3090
3104
|
tableData,
|
|
3091
3105
|
cell,
|
|
3092
3106
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3099,7 +3113,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3099
3113
|
}
|
|
3100
3114
|
const first = selectedCell.selectedCells[0];
|
|
3101
3115
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3102
|
-
return
|
|
3116
|
+
return chunkG3JPCRKN_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3103
3117
|
})();
|
|
3104
3118
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3105
3119
|
TableResizeOverlay,
|
|
@@ -3120,9 +3134,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3120
3134
|
{
|
|
3121
3135
|
className: "w-full h-full border-collapse table-fixed",
|
|
3122
3136
|
style: {
|
|
3123
|
-
fontFamily:
|
|
3137
|
+
fontFamily: chunkG3JPCRKN_js.DEFAULT_FONT_FAMILY,
|
|
3124
3138
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3125
|
-
...
|
|
3139
|
+
...chunkG3JPCRKN_js.tableContainerCss(tableData)
|
|
3126
3140
|
},
|
|
3127
3141
|
children: [
|
|
3128
3142
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3141,7 +3155,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3141
3155
|
return null;
|
|
3142
3156
|
}
|
|
3143
3157
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3144
|
-
const isInMultiSelection =
|
|
3158
|
+
const isInMultiSelection = chunkG3JPCRKN_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3145
3159
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3146
3160
|
const diag = getCellDiagonalBorders2(
|
|
3147
3161
|
cell.style,
|
|
@@ -3170,7 +3184,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3170
3184
|
}
|
|
3171
3185
|
event.stopPropagation();
|
|
3172
3186
|
if (event.shiftKey && selectedCell) {
|
|
3173
|
-
const rect =
|
|
3187
|
+
const rect = chunkG3JPCRKN_js.computeSelectionRect(
|
|
3174
3188
|
selectedCell.rowIndex,
|
|
3175
3189
|
selectedCell.columnIndex,
|
|
3176
3190
|
rowIndex,
|
|
@@ -3180,7 +3194,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3180
3194
|
options?.onSelectCell?.({
|
|
3181
3195
|
rowIndex: selectedCell.rowIndex,
|
|
3182
3196
|
columnIndex: selectedCell.columnIndex,
|
|
3183
|
-
selectedCells:
|
|
3197
|
+
selectedCells: chunkG3JPCRKN_js.rectToCells(rect)
|
|
3184
3198
|
});
|
|
3185
3199
|
} else {
|
|
3186
3200
|
options?.onSelectCell?.({
|
|
@@ -3241,10 +3255,10 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3241
3255
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3242
3256
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3243
3257
|
}
|
|
3244
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3258
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkTEVGDXVW_js.translationsEn["pptx.table.title"] });
|
|
3245
3259
|
}
|
|
3246
3260
|
const selectedCell = options?.selectedCell || null;
|
|
3247
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3261
|
+
const isEditable = Boolean(options?.editable) && chunkG3JPCRKN_js.canDrillDown(element);
|
|
3248
3262
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3249
3263
|
const tableEl = element;
|
|
3250
3264
|
const xmlSelectionRect = (() => {
|
|
@@ -3256,7 +3270,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3256
3270
|
}
|
|
3257
3271
|
const first = selectedCell.selectedCells[0];
|
|
3258
3272
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3259
|
-
return
|
|
3273
|
+
return chunkG3JPCRKN_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3260
3274
|
})();
|
|
3261
3275
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3262
3276
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3278,9 +3292,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3278
3292
|
{
|
|
3279
3293
|
className: "w-full h-full border-collapse table-fixed",
|
|
3280
3294
|
style: {
|
|
3281
|
-
fontFamily:
|
|
3295
|
+
fontFamily: chunkG3JPCRKN_js.DEFAULT_FONT_FAMILY,
|
|
3282
3296
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3283
|
-
...
|
|
3297
|
+
...chunkG3JPCRKN_js.tableContainerCss(tableEl.tableData)
|
|
3284
3298
|
},
|
|
3285
3299
|
children: [
|
|
3286
3300
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3337,7 +3351,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3337
3351
|
color: textStyle.color,
|
|
3338
3352
|
...bandStyle,
|
|
3339
3353
|
...xmlCellStyle,
|
|
3340
|
-
...tdCellOverride ?
|
|
3354
|
+
...tdCellOverride ? chunkG3JPCRKN_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3341
3355
|
...diag ? { position: "relative" } : void 0
|
|
3342
3356
|
};
|
|
3343
3357
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3347,7 +3361,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3347
3361
|
"border px-1 py-0.5 align-top",
|
|
3348
3362
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3349
3363
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3350
|
-
|
|
3364
|
+
chunkG3JPCRKN_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3351
3365
|
),
|
|
3352
3366
|
colSpan,
|
|
3353
3367
|
rowSpan: rSpan,
|
|
@@ -3358,7 +3372,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3358
3372
|
}
|
|
3359
3373
|
event.stopPropagation();
|
|
3360
3374
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3361
|
-
const rect =
|
|
3375
|
+
const rect = chunkG3JPCRKN_js.computeSelectionRect(
|
|
3362
3376
|
selectedCell.rowIndex,
|
|
3363
3377
|
selectedCell.columnIndex,
|
|
3364
3378
|
rowIndex,
|
|
@@ -3368,7 +3382,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3368
3382
|
options?.onSelectCell?.({
|
|
3369
3383
|
rowIndex: selectedCell.rowIndex,
|
|
3370
3384
|
columnIndex: selectedCell.columnIndex,
|
|
3371
|
-
selectedCells:
|
|
3385
|
+
selectedCells: chunkG3JPCRKN_js.rectToCells(rect)
|
|
3372
3386
|
});
|
|
3373
3387
|
} else {
|
|
3374
3388
|
options?.onSelectCell?.({
|
|
@@ -3427,23 +3441,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3427
3441
|
);
|
|
3428
3442
|
}
|
|
3429
3443
|
function partAttrs(part) {
|
|
3430
|
-
return part ?
|
|
3444
|
+
return part ? chunkG3JPCRKN_js.chartPartToAttrs(part) : void 0;
|
|
3431
3445
|
}
|
|
3432
3446
|
function resolveReactPalette(chartData) {
|
|
3433
3447
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3434
3448
|
return chartData.colorPalette;
|
|
3435
3449
|
}
|
|
3436
|
-
return [...
|
|
3450
|
+
return [...chunkG3JPCRKN_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3437
3451
|
}
|
|
3438
3452
|
function buildReactChartViewModel(element) {
|
|
3439
3453
|
if (element.type !== "chart" || !element.chartData) {
|
|
3440
|
-
return
|
|
3454
|
+
return chunkG3JPCRKN_js.buildChartViewModel(element);
|
|
3441
3455
|
}
|
|
3442
3456
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3443
3457
|
...element,
|
|
3444
3458
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3445
3459
|
};
|
|
3446
|
-
return
|
|
3460
|
+
return chunkG3JPCRKN_js.buildChartViewModel(themedElement);
|
|
3447
3461
|
}
|
|
3448
3462
|
function renderPrimitive(prim, key) {
|
|
3449
3463
|
switch (prim.kind) {
|
|
@@ -3526,6 +3540,7 @@ function renderPrimitive(prim, key) {
|
|
|
3526
3540
|
strokeWidth: l.strokeWidth,
|
|
3527
3541
|
strokeDasharray: l.dashArray,
|
|
3528
3542
|
opacity: l.opacity ?? 1,
|
|
3543
|
+
transform: l.transform,
|
|
3529
3544
|
children: l.title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: l.title }) : null
|
|
3530
3545
|
},
|
|
3531
3546
|
key
|
|
@@ -3542,6 +3557,7 @@ function renderPrimitive(prim, key) {
|
|
|
3542
3557
|
strokeWidth: p.strokeWidth,
|
|
3543
3558
|
opacity: p.opacity ?? 1,
|
|
3544
3559
|
strokeDasharray: p.dashArray,
|
|
3560
|
+
transform: p.transform,
|
|
3545
3561
|
...partAttrs(p.part),
|
|
3546
3562
|
children: p.title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: p.title }) : null
|
|
3547
3563
|
},
|
|
@@ -3592,7 +3608,7 @@ function renderText(t, key) {
|
|
|
3592
3608
|
);
|
|
3593
3609
|
}
|
|
3594
3610
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3595
|
-
const legendItems =
|
|
3611
|
+
const legendItems = chunkG3JPCRKN_js.computeChartLegendLayout(vm);
|
|
3596
3612
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3597
3613
|
"svg",
|
|
3598
3614
|
{
|
|
@@ -3730,17 +3746,17 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3730
3746
|
}
|
|
3731
3747
|
function renderChartElement(element) {
|
|
3732
3748
|
if (element.type !== "chart") {
|
|
3733
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3749
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkTEVGDXVW_js.translationsEn["pptx.chart.heading"] });
|
|
3734
3750
|
}
|
|
3735
3751
|
const chartData = element.chartData;
|
|
3736
3752
|
if (!chartData || chartData.series.length === 0) {
|
|
3737
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3753
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkTEVGDXVW_js.translationsEn["pptx.chart.heading"] });
|
|
3738
3754
|
}
|
|
3739
|
-
const kind =
|
|
3755
|
+
const kind = chunkG3JPCRKN_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3740
3756
|
return renderChartViewModel(
|
|
3741
3757
|
element.id,
|
|
3742
3758
|
buildReactChartViewModel(element),
|
|
3743
|
-
|
|
3759
|
+
chunkG3JPCRKN_js.chartPreserveAspectRatio(kind)
|
|
3744
3760
|
);
|
|
3745
3761
|
}
|
|
3746
3762
|
|
|
@@ -3760,14 +3776,14 @@ function buildNotesPdf(pages) {
|
|
|
3760
3776
|
notes: page.notes,
|
|
3761
3777
|
slideNumber: page.slideNumber
|
|
3762
3778
|
}));
|
|
3763
|
-
const bytes =
|
|
3779
|
+
const bytes = chunkG3JPCRKN_js.buildNotesPdfBytes(images, meta);
|
|
3764
3780
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3765
3781
|
return URL.createObjectURL(blob);
|
|
3766
3782
|
}
|
|
3767
3783
|
|
|
3768
3784
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3769
3785
|
function buildPdfFromImageData(images) {
|
|
3770
|
-
const bytes =
|
|
3786
|
+
const bytes = chunkG3JPCRKN_js.buildSlidesPdfBytes(images);
|
|
3771
3787
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3772
3788
|
return URL.createObjectURL(blob);
|
|
3773
3789
|
}
|
|
@@ -3776,7 +3792,7 @@ function buildPdfFromImageData(images) {
|
|
|
3776
3792
|
var activePreview = null;
|
|
3777
3793
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3778
3794
|
stopPreviewAnimation();
|
|
3779
|
-
const descriptor =
|
|
3795
|
+
const descriptor = chunkG3JPCRKN_js.buildPreviewAnimation(preset, options);
|
|
3780
3796
|
if (!descriptor) {
|
|
3781
3797
|
return;
|
|
3782
3798
|
}
|
|
@@ -3789,7 +3805,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3789
3805
|
return;
|
|
3790
3806
|
}
|
|
3791
3807
|
const stage = domEl.offsetParent;
|
|
3792
|
-
const descriptor =
|
|
3808
|
+
const descriptor = chunkG3JPCRKN_js.buildMotionPathPreview({
|
|
3793
3809
|
path,
|
|
3794
3810
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3795
3811
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|