pptx-react-viewer 3.18.0 → 3.19.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 +37 -0
- package/README.md +22 -0
- package/dist/{AiChatPanel-DDZC6IRK.mjs → AiChatPanel-3M7XWTVE.mjs} +3 -3
- package/dist/AiChatPanel-3M7XWTVE.mjs.br +0 -0
- package/dist/AiChatPanel-3M7XWTVE.mjs.gz +0 -0
- package/dist/{AiChatPanel-T2QSCUQR.js → AiChatPanel-WDVU4RIM.js} +24 -24
- package/dist/AiChatPanel-WDVU4RIM.js.br +0 -0
- package/dist/AiChatPanel-WDVU4RIM.js.gz +0 -0
- package/dist/{Area3DChartScene-WTKQDHC7.mjs → Area3DChartScene-CTVWVXNW.mjs} +1 -1
- package/dist/Area3DChartScene-CTVWVXNW.mjs.br +0 -0
- package/dist/Area3DChartScene-CTVWVXNW.mjs.gz +0 -0
- package/dist/{Area3DChartScene-WEU2MP3B.js → Area3DChartScene-N5KPQFC6.js} +2 -2
- package/dist/{Area3DChartScene-WEU2MP3B.js.br → Area3DChartScene-N5KPQFC6.js.br} +0 -0
- package/dist/Area3DChartScene-N5KPQFC6.js.gz +0 -0
- package/dist/{Bar3DChartScene-25G6TG53.js → Bar3DChartScene-3QRUPVPT.js} +2 -2
- package/dist/Bar3DChartScene-3QRUPVPT.js.br +0 -0
- package/dist/Bar3DChartScene-3QRUPVPT.js.gz +0 -0
- package/dist/{Bar3DChartScene-A5ICLHXS.mjs → Bar3DChartScene-PXFSFZRX.mjs} +1 -1
- package/dist/{Bar3DChartScene-A5ICLHXS.mjs.br → Bar3DChartScene-PXFSFZRX.mjs.br} +0 -0
- package/dist/Bar3DChartScene-PXFSFZRX.mjs.gz +0 -0
- package/dist/{Line3DChartScene-WRZ52Z2Z.js → Line3DChartScene-776WLKR5.js} +2 -2
- package/dist/Line3DChartScene-776WLKR5.js.br +0 -0
- package/dist/Line3DChartScene-776WLKR5.js.gz +0 -0
- package/dist/{Line3DChartScene-ARCDLHXQ.mjs → Line3DChartScene-LLL3BU4Q.mjs} +1 -1
- package/dist/{Line3DChartScene-ARCDLHXQ.mjs.br → Line3DChartScene-LLL3BU4Q.mjs.br} +0 -0
- package/dist/Line3DChartScene-LLL3BU4Q.mjs.gz +0 -0
- package/dist/{Model3DScene-JGUG5NPX.js → Model3DScene-7TM2XSJY.js} +2 -2
- package/dist/Model3DScene-7TM2XSJY.js.br +0 -0
- package/dist/Model3DScene-7TM2XSJY.js.gz +0 -0
- package/dist/{Model3DScene-PBKBL2YU.mjs → Model3DScene-FMQ4FDC5.mjs} +1 -1
- package/dist/Model3DScene-FMQ4FDC5.mjs.br +0 -0
- package/dist/Model3DScene-FMQ4FDC5.mjs.gz +0 -0
- package/dist/{PieChart3DScene-ZNKXS62H.mjs → PieChart3DScene-2YNQ5J7A.mjs} +1 -1
- package/dist/{PieChart3DScene-ZNKXS62H.mjs.br → PieChart3DScene-2YNQ5J7A.mjs.br} +0 -0
- package/dist/PieChart3DScene-2YNQ5J7A.mjs.gz +0 -0
- package/dist/{PieChart3DScene-S25DNSRS.js → PieChart3DScene-DZY4MQCG.js} +2 -2
- package/dist/{PieChart3DScene-S25DNSRS.js.br → PieChart3DScene-DZY4MQCG.js.br} +0 -0
- package/dist/PieChart3DScene-DZY4MQCG.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-LXBC3HMV.js → SurfaceChart3DScene-G3MWPEL3.js} +2 -2
- package/dist/{SurfaceChart3DScene-LXBC3HMV.js.br → SurfaceChart3DScene-G3MWPEL3.js.br} +0 -0
- package/dist/SurfaceChart3DScene-G3MWPEL3.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-EBT7RPCX.mjs → SurfaceChart3DScene-XJHLH2EM.mjs} +1 -1
- package/dist/SurfaceChart3DScene-XJHLH2EM.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-XJHLH2EM.mjs.gz +0 -0
- package/dist/{chunk-WGBXO4LM.js → chunk-2QWLARCW.js} +7277 -1263
- package/dist/chunk-2QWLARCW.js.br +0 -0
- package/dist/chunk-2QWLARCW.js.gz +0 -0
- package/dist/{chunk-2LTTSFLD.js → chunk-36O4SE4R.js} +5 -5
- package/dist/chunk-36O4SE4R.js.br +0 -0
- package/dist/chunk-36O4SE4R.js.gz +0 -0
- package/dist/{chunk-5S3A6HL3.mjs → chunk-3R5A2E2K.mjs} +6211 -219
- package/dist/chunk-3R5A2E2K.mjs.br +0 -0
- package/dist/chunk-3R5A2E2K.mjs.gz +0 -0
- package/dist/{chunk-WRO37U2O.mjs → chunk-4KKKJ5MJ.mjs} +1 -1
- package/dist/chunk-4KKKJ5MJ.mjs.br +0 -0
- package/dist/chunk-4KKKJ5MJ.mjs.gz +0 -0
- package/dist/{chunk-6R2EUDJQ.js → chunk-6DYDAKHG.js} +1966 -7218
- package/dist/chunk-6DYDAKHG.js.br +0 -0
- package/dist/chunk-6DYDAKHG.js.gz +0 -0
- package/dist/{chunk-2OCTGK4L.mjs → chunk-7VFH2FRI.mjs} +61 -15
- package/dist/chunk-7VFH2FRI.mjs.br +0 -0
- package/dist/chunk-7VFH2FRI.mjs.gz +0 -0
- package/dist/{chunk-GNRVDNCV.mjs → chunk-F552WUJN.mjs} +4914 -2647
- package/dist/chunk-F552WUJN.mjs.br +0 -0
- package/dist/chunk-F552WUJN.mjs.gz +0 -0
- package/dist/{chunk-V32F4I45.js → chunk-LBMPJYAR.js} +4967 -2647
- package/dist/chunk-LBMPJYAR.js.br +0 -0
- package/dist/chunk-LBMPJYAR.js.gz +0 -0
- package/dist/{chunk-3KKPRPVE.mjs → chunk-V3BOQ52U.mjs} +158 -5410
- package/dist/chunk-V3BOQ52U.mjs.br +0 -0
- package/dist/chunk-V3BOQ52U.mjs.gz +0 -0
- package/dist/{chunk-LJ46KXUV.js → chunk-V6S72IRP.js} +226 -180
- package/dist/chunk-V6S72IRP.js.br +0 -0
- package/dist/chunk-V6S72IRP.js.gz +0 -0
- package/dist/i18n/de.cjs +3765 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.d.cts +3 -0
- package/dist/i18n/de.d.mts +3 -0
- package/dist/i18n/de.mjs +3738 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +3765 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.d.cts +3 -0
- package/dist/i18n/es.d.mts +3 -0
- package/dist/i18n/es.mjs +3738 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +3765 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.d.cts +3 -0
- package/dist/i18n/fr.d.mts +3 -0
- package/dist/i18n/fr.mjs +3738 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +3803 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.d.cts +3 -0
- package/dist/i18n/zh-CN.d.mts +3 -0
- package/dist/i18n/zh-CN.mjs +3776 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +65 -4
- package/dist/index.js +49 -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 +2408 -2055
- package/dist/internals.js +182 -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/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 +13 -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 +44 -4
- package/dist/AiChatPanel-DDZC6IRK.mjs.br +0 -0
- package/dist/AiChatPanel-DDZC6IRK.mjs.gz +0 -0
- package/dist/AiChatPanel-T2QSCUQR.js.br +0 -0
- package/dist/AiChatPanel-T2QSCUQR.js.gz +0 -0
- package/dist/Area3DChartScene-WEU2MP3B.js.gz +0 -0
- package/dist/Area3DChartScene-WTKQDHC7.mjs.br +0 -0
- package/dist/Area3DChartScene-WTKQDHC7.mjs.gz +0 -0
- package/dist/Bar3DChartScene-25G6TG53.js.br +0 -0
- package/dist/Bar3DChartScene-25G6TG53.js.gz +0 -0
- package/dist/Bar3DChartScene-A5ICLHXS.mjs.gz +0 -0
- package/dist/Line3DChartScene-ARCDLHXQ.mjs.gz +0 -0
- package/dist/Line3DChartScene-WRZ52Z2Z.js.br +0 -0
- package/dist/Line3DChartScene-WRZ52Z2Z.js.gz +0 -0
- package/dist/Model3DScene-JGUG5NPX.js.br +0 -0
- package/dist/Model3DScene-JGUG5NPX.js.gz +0 -0
- package/dist/Model3DScene-PBKBL2YU.mjs.br +0 -0
- package/dist/Model3DScene-PBKBL2YU.mjs.gz +0 -0
- package/dist/PieChart3DScene-S25DNSRS.js.gz +0 -0
- package/dist/PieChart3DScene-ZNKXS62H.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cde_wzd0.d.ts +0 -21
- package/dist/PowerPointViewer-Cde_wzd0.d.ts.map +0 -1
- package/dist/SurfaceChart3DScene-EBT7RPCX.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-EBT7RPCX.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-LXBC3HMV.js.gz +0 -0
- package/dist/audience-content-store-A8Km8rBo.d.ts +0 -402
- package/dist/audience-content-store-A8Km8rBo.d.ts.map +0 -1
- package/dist/chunk-2LTTSFLD.js.br +0 -0
- package/dist/chunk-2LTTSFLD.js.gz +0 -0
- package/dist/chunk-2OCTGK4L.mjs.br +0 -0
- package/dist/chunk-2OCTGK4L.mjs.gz +0 -0
- package/dist/chunk-3KKPRPVE.mjs.br +0 -0
- package/dist/chunk-3KKPRPVE.mjs.gz +0 -0
- package/dist/chunk-5S3A6HL3.mjs.br +0 -0
- package/dist/chunk-5S3A6HL3.mjs.gz +0 -0
- package/dist/chunk-6R2EUDJQ.js.br +0 -0
- package/dist/chunk-6R2EUDJQ.js.gz +0 -0
- package/dist/chunk-GNRVDNCV.mjs.br +0 -0
- package/dist/chunk-GNRVDNCV.mjs.gz +0 -0
- package/dist/chunk-LJ46KXUV.js.br +0 -0
- package/dist/chunk-LJ46KXUV.js.gz +0 -0
- package/dist/chunk-V32F4I45.js.br +0 -0
- package/dist/chunk-V32F4I45.js.gz +0 -0
- package/dist/chunk-WGBXO4LM.js.br +0 -0
- package/dist/chunk-WGBXO4LM.js.gz +0 -0
- package/dist/chunk-WRO37U2O.mjs.br +0 -0
- package/dist/chunk-WRO37U2O.mjs.gz +0 -0
- package/dist/index-CGKutKk1.d.ts +0 -46
- package/dist/index-CGKutKk1.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internals.d.ts.map +0 -1
- package/dist/types-BqB2ZCwS.d.ts +0 -836
- package/dist/types-BqB2ZCwS.d.ts.map +0 -1
- package/dist/useViewerBuildingBlocks-4Tj6P8Fm.d.ts +0 -523
- package/dist/useViewerBuildingBlocks-4Tj6P8Fm.d.ts.map +0 -1
- package/dist/viewer/index.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLBMPJYAR_js = require('./chunk-LBMPJYAR.js');
|
|
4
4
|
var chunkBRJN3ZMG_js = require('./chunk-BRJN3ZMG.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -15,7 +15,7 @@ var React7__default = /*#__PURE__*/_interopDefault(React7);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkLBMPJYAR_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 chunkLBMPJYAR_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 = chunkLBMPJYAR_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 = chunkLBMPJYAR_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 = chunkLBMPJYAR_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 (!chunkLBMPJYAR_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 (!chunkLBMPJYAR_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkLBMPJYAR_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 = chunkLBMPJYAR_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 = chunkLBMPJYAR_js.hasShapeProperties(element) ? chunkLBMPJYAR_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 (!chunkLBMPJYAR_js.isImageLikeElement(element)) {
|
|
276
276
|
return void 0;
|
|
277
277
|
}
|
|
278
|
-
return
|
|
278
|
+
return chunkLBMPJYAR_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
279
279
|
}
|
|
280
280
|
function getImageTilingStyle2(element) {
|
|
281
|
-
return
|
|
281
|
+
return chunkLBMPJYAR_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" } : chunkLBMPJYAR_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 } = chunkLBMPJYAR_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 chunkLBMPJYAR_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 (chunkLBMPJYAR_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
|
+
...{ [chunkLBMPJYAR_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
621
621
|
children: [
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
623
|
FallbackIcon,
|
|
624
624
|
{
|
|
625
|
-
paths:
|
|
625
|
+
paths: chunkLBMPJYAR_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(chunkLBMPJYAR_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
|
+
...{ [chunkLBMPJYAR_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
648
648
|
children: [
|
|
649
649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
650
650
|
FallbackIcon,
|
|
651
651
|
{
|
|
652
|
-
paths:
|
|
652
|
+
paths: chunkLBMPJYAR_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(chunkLBMPJYAR_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 = chunkLBMPJYAR_js.mediaFallbackVisual(surface, {
|
|
668
668
|
hasPoster: Boolean(posterUrl),
|
|
669
669
|
missing: element.mediaMissing === true
|
|
670
670
|
});
|
|
@@ -676,7 +676,7 @@ function renderMediaFallback({
|
|
|
676
676
|
src: posterUrl,
|
|
677
677
|
alt: visual.dimPoster ? chunkBRJN3ZMG_js.translationsEn["pptx.media.posterAlt"] : chunkBRJN3ZMG_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
678
678
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
679
|
-
style:
|
|
679
|
+
style: chunkLBMPJYAR_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 = chunkLBMPJYAR_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 chunkLBMPJYAR_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 (!chunkLBMPJYAR_js.hasTextProperties(element)) {
|
|
786
786
|
return {};
|
|
787
787
|
}
|
|
788
|
-
const writingMode =
|
|
789
|
-
const textOrientation =
|
|
790
|
-
const verticalDirection =
|
|
788
|
+
const writingMode = chunkLBMPJYAR_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
789
|
+
const textOrientation = chunkLBMPJYAR_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
790
|
+
const verticalDirection = chunkLBMPJYAR_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 = chunkLBMPJYAR_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
|
+
...chunkLBMPJYAR_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 chunkLBMPJYAR_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}${chunkLBMPJYAR_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 = chunkLBMPJYAR_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: chunkLBMPJYAR_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 = chunkLBMPJYAR_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 ? chunkLBMPJYAR_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] = chunkLBMPJYAR_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 = chunkLBMPJYAR_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 = chunkLBMPJYAR_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: chunkLBMPJYAR_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 = chunkLBMPJYAR_js.convertOmmlToMathMl(equationXml);
|
|
1211
|
+
const safeMathml = mathml ? chunkLBMPJYAR_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 = chunkLBMPJYAR_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 * chunkLBMPJYAR_js.resolveAutoFitFontScale(element.textStyle);
|
|
1349
1349
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1350
|
-
const fontKerning =
|
|
1350
|
+
const fontKerning = chunkLBMPJYAR_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1351
1351
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1352
|
-
const baseFontFamily = rawFontFamily ?
|
|
1352
|
+
const baseFontFamily = rawFontFamily ? chunkLBMPJYAR_js.getSubstituteFontFamily(
|
|
1353
1353
|
rawFontFamily,
|
|
1354
|
-
|
|
1354
|
+
chunkLBMPJYAR_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1355
1355
|
) : DEFAULT_FONT_FAMILY2;
|
|
1356
|
-
const scriptFonts =
|
|
1357
|
-
const needsScriptFonts =
|
|
1356
|
+
const scriptFonts = chunkLBMPJYAR_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1357
|
+
const needsScriptFonts = chunkLBMPJYAR_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 = chunkLBMPJYAR_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 = chunkLBMPJYAR_js.pieceLetterSpacing(
|
|
1374
1374
|
authoredLetterSpacing,
|
|
1375
|
-
|
|
1375
|
+
chunkLBMPJYAR_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1376
1376
|
);
|
|
1377
|
-
const hollow =
|
|
1377
|
+
const hollow = chunkLBMPJYAR_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 = chunkLBMPJYAR_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
|
+
chunkLBMPJYAR_js.buildTabContext(
|
|
1409
1409
|
element.textStyle?.tabStops,
|
|
1410
1410
|
element.textStyle?.defaultTabSize,
|
|
1411
1411
|
baseFontSize,
|
|
@@ -1432,8 +1432,34 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1432
1432
|
/* @__PURE__ */ jsxRuntime.jsx("rp", { children: ")" })
|
|
1433
1433
|
] });
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1436
|
-
|
|
1435
|
+
function renderSeededListRun(seed, runs, segments, context) {
|
|
1436
|
+
const sourceRun = runs.find((candidate) => candidate.segmentIndex === seed.segmentIndex);
|
|
1437
|
+
const segment = sourceRun ? segments[seed.segmentIndex] : { text: seed.text, style: seed.style };
|
|
1438
|
+
const resolvedSegment = {
|
|
1439
|
+
...segment,
|
|
1440
|
+
style: chunkLBMPJYAR_js.withInlineListDecorationDefaults(segment.style, context.element.textStyle)
|
|
1441
|
+
};
|
|
1442
|
+
const decorationCss = chunkLBMPJYAR_js.segmentStyleToCss(
|
|
1443
|
+
resolvedSegment,
|
|
1444
|
+
chunkLBMPJYAR_js.resolveAutoFitFontScale(context.element.textStyle)
|
|
1445
|
+
);
|
|
1446
|
+
chunkLBMPJYAR_js.applyUnderlineVariant(decorationCss, resolvedSegment);
|
|
1447
|
+
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...chunkLBMPJYAR_js.nestedTextDecorationStyle(decorationCss) } } : {
|
|
1448
|
+
text: seed.text,
|
|
1449
|
+
style: decorationCss,
|
|
1450
|
+
segmentIndex: seed.segmentIndex
|
|
1451
|
+
};
|
|
1452
|
+
const rendered = renderParagraphRun(run, resolvedSegment, context);
|
|
1453
|
+
if (!React7__default.default.isValidElement(rendered)) {
|
|
1454
|
+
return rendered;
|
|
1455
|
+
}
|
|
1456
|
+
return React7__default.default.cloneElement(rendered, {
|
|
1457
|
+
"data-pptx-list-run": seed.token,
|
|
1458
|
+
...seed.text === "" ? { children: /* @__PURE__ */ jsxRuntime.jsx("br", {}) } : {}
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1462
|
+
if (!chunkLBMPJYAR_js.hasTextProperties(element)) {
|
|
1437
1463
|
return emptyFallback || null;
|
|
1438
1464
|
}
|
|
1439
1465
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1443,7 +1469,12 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1443
1469
|
}
|
|
1444
1470
|
return element.text || emptyFallback || "";
|
|
1445
1471
|
}
|
|
1446
|
-
const paragraphs =
|
|
1472
|
+
const paragraphs = chunkLBMPJYAR_js.buildParagraphs(
|
|
1473
|
+
element,
|
|
1474
|
+
fieldContext,
|
|
1475
|
+
segmentOverrides,
|
|
1476
|
+
inlineListSeed ? { preserveTrailingEmpty: true } : void 0
|
|
1477
|
+
);
|
|
1447
1478
|
const ctx = {
|
|
1448
1479
|
element,
|
|
1449
1480
|
fallbackColor,
|
|
@@ -1452,7 +1483,15 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1452
1483
|
requireCtrlClick
|
|
1453
1484
|
};
|
|
1454
1485
|
return paragraphs.map(
|
|
1455
|
-
(para, paraIndex) => renderParagraph(
|
|
1486
|
+
(para, paraIndex) => renderParagraph(
|
|
1487
|
+
para,
|
|
1488
|
+
paraIndex,
|
|
1489
|
+
paragraphs.length,
|
|
1490
|
+
segments,
|
|
1491
|
+
ctx,
|
|
1492
|
+
subElementAnimStates,
|
|
1493
|
+
inlineListSeed
|
|
1494
|
+
)
|
|
1456
1495
|
);
|
|
1457
1496
|
}
|
|
1458
1497
|
function joinRunsBySegment(runs) {
|
|
@@ -1467,13 +1506,12 @@ function joinRunsBySegment(runs) {
|
|
|
1467
1506
|
}
|
|
1468
1507
|
return out;
|
|
1469
1508
|
}
|
|
1470
|
-
function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAnimStates) {
|
|
1509
|
+
function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAnimStates, inlineListSeed) {
|
|
1471
1510
|
const element = ctx.element;
|
|
1472
1511
|
const runCtx = { ...ctx, paragraphRtl: para.rtl };
|
|
1473
1512
|
const runs = joinRunsBySegment(para.runs);
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1476
|
-
);
|
|
1513
|
+
const listParagraph = inlineListSeed?.paragraphs[paraIndex];
|
|
1514
|
+
const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map((run) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], runCtx));
|
|
1477
1515
|
const paraStyle = {
|
|
1478
1516
|
// `text-align`, BiDi `direction` / `unicode-bidi` and the kinsoku
|
|
1479
1517
|
// line-break rules, resolved by shared from this paragraph's own `a:pPr`.
|
|
@@ -1518,17 +1556,25 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
|
|
|
1518
1556
|
`-build-${pieceKey}`
|
|
1519
1557
|
)
|
|
1520
1558
|
);
|
|
1521
|
-
const needsWrapper = Object.keys(paraStyle).length > 0 || marker !== null;
|
|
1559
|
+
const needsWrapper = Boolean(listParagraph) || Object.keys(paraStyle).length > 0 || marker !== null;
|
|
1522
1560
|
if (!needsWrapper) {
|
|
1523
1561
|
return /* @__PURE__ */ jsxRuntime.jsxs(React7__default.default.Fragment, { children: [
|
|
1524
1562
|
wrappedContent,
|
|
1525
1563
|
paraIndex < paraCount - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
|
|
1526
1564
|
] }, `${element.id}-para-${paraIndex}`);
|
|
1527
1565
|
}
|
|
1528
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1566
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1567
|
+
"div",
|
|
1568
|
+
{
|
|
1569
|
+
style: paraStyle,
|
|
1570
|
+
"data-pptx-list-paragraph": listParagraph?.token,
|
|
1571
|
+
children: [
|
|
1572
|
+
marker,
|
|
1573
|
+
para.isEmpty && !listParagraph ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : wrappedContent
|
|
1574
|
+
]
|
|
1575
|
+
},
|
|
1576
|
+
`${element.id}-para-${paraIndex}`
|
|
1577
|
+
);
|
|
1532
1578
|
}
|
|
1533
1579
|
function renderBulletMarker(para, paraIndex, elementId) {
|
|
1534
1580
|
const picture = para.bulletPicture;
|
|
@@ -1569,13 +1615,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1569
1615
|
);
|
|
1570
1616
|
}
|
|
1571
1617
|
function getDuotoneColors(element) {
|
|
1572
|
-
if (!
|
|
1618
|
+
if (!chunkLBMPJYAR_js.isImageLikeElement(element)) {
|
|
1573
1619
|
return void 0;
|
|
1574
1620
|
}
|
|
1575
1621
|
return element.imageEffects?.duotone;
|
|
1576
1622
|
}
|
|
1577
1623
|
function buildLineShadowCss(element) {
|
|
1578
|
-
if (!
|
|
1624
|
+
if (!chunkLBMPJYAR_js.hasShapeProperties(element)) {
|
|
1579
1625
|
return void 0;
|
|
1580
1626
|
}
|
|
1581
1627
|
const ss = element.shapeStyle;
|
|
@@ -1586,13 +1632,13 @@ function buildLineShadowCss(element) {
|
|
|
1586
1632
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1587
1633
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1588
1634
|
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
|
-
|
|
1635
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkLBMPJYAR_js.colorWithOpacity(
|
|
1636
|
+
chunkLBMPJYAR_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1591
1637
|
opacity
|
|
1592
1638
|
)}`;
|
|
1593
1639
|
}
|
|
1594
1640
|
function buildLineGlowFilter(element) {
|
|
1595
|
-
if (!
|
|
1641
|
+
if (!chunkLBMPJYAR_js.hasShapeProperties(element)) {
|
|
1596
1642
|
return void 0;
|
|
1597
1643
|
}
|
|
1598
1644
|
const ss = element.shapeStyle;
|
|
@@ -1601,22 +1647,22 @@ function buildLineGlowFilter(element) {
|
|
|
1601
1647
|
}
|
|
1602
1648
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1603
1649
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1604
|
-
const glowCol =
|
|
1650
|
+
const glowCol = chunkLBMPJYAR_js.colorWithOpacity(chunkLBMPJYAR_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1605
1651
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1606
1652
|
}
|
|
1607
1653
|
function getDagDuotoneFilterId(elementId) {
|
|
1608
1654
|
return `dag-duotone-${elementId}`;
|
|
1609
1655
|
}
|
|
1610
1656
|
function hasDagDuotoneEffect(element) {
|
|
1611
|
-
if (!
|
|
1657
|
+
if (!chunkLBMPJYAR_js.hasShapeProperties(element)) {
|
|
1612
1658
|
return false;
|
|
1613
1659
|
}
|
|
1614
1660
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1615
1661
|
}
|
|
1616
1662
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1617
1663
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1618
|
-
const c1 =
|
|
1619
|
-
const c2 =
|
|
1664
|
+
const c1 = chunkLBMPJYAR_js.hexToRgbUnit(color1);
|
|
1665
|
+
const c2 = chunkLBMPJYAR_js.hexToRgbUnit(color2);
|
|
1620
1666
|
const grayscaleMatrix = [
|
|
1621
1667
|
0.2126,
|
|
1622
1668
|
0.7152,
|
|
@@ -1660,7 +1706,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1660
1706
|
|
|
1661
1707
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1662
1708
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1663
|
-
return
|
|
1709
|
+
return chunkLBMPJYAR_js.build3DExtrusionData(
|
|
1664
1710
|
shape3d,
|
|
1665
1711
|
scene3d,
|
|
1666
1712
|
fillColor,
|
|
@@ -1669,7 +1715,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1669
1715
|
);
|
|
1670
1716
|
}
|
|
1671
1717
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1672
|
-
|
|
1718
|
+
chunkLBMPJYAR_js.apply3dEffects(
|
|
1673
1719
|
base,
|
|
1674
1720
|
scene3d,
|
|
1675
1721
|
shape3d,
|
|
@@ -1684,11 +1730,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1684
1730
|
return (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
|
|
1685
1731
|
}
|
|
1686
1732
|
function rendersWedgeCalloutVector(element) {
|
|
1687
|
-
return element.type === "shape" &&
|
|
1733
|
+
return element.type === "shape" && chunkLBMPJYAR_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1688
1734
|
}
|
|
1689
1735
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1690
1736
|
if (element.type === "group") {
|
|
1691
|
-
const fx2 =
|
|
1737
|
+
const fx2 = chunkLBMPJYAR_js.getComputedEffectStyle(element);
|
|
1692
1738
|
const groupStyle = {};
|
|
1693
1739
|
if (fx2.filter) {
|
|
1694
1740
|
groupStyle.filter = fx2.filter;
|
|
@@ -1698,13 +1744,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1698
1744
|
}
|
|
1699
1745
|
return groupStyle;
|
|
1700
1746
|
}
|
|
1701
|
-
if (!
|
|
1747
|
+
if (!chunkLBMPJYAR_js.hasShapeProperties(element)) {
|
|
1702
1748
|
return {};
|
|
1703
1749
|
}
|
|
1704
1750
|
const ss = element.shapeStyle;
|
|
1705
|
-
const fill = animatesFill ? void 0 :
|
|
1706
|
-
const fx =
|
|
1707
|
-
const stroke =
|
|
1751
|
+
const fill = animatesFill ? void 0 : chunkLBMPJYAR_js.getComputedFillStyle(element, parentGroupFill);
|
|
1752
|
+
const fx = chunkLBMPJYAR_js.getComputedEffectStyle(element);
|
|
1753
|
+
const stroke = chunkLBMPJYAR_js.getComputedStrokeStyle(element);
|
|
1708
1754
|
const base = {
|
|
1709
1755
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1710
1756
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1743,7 +1789,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1743
1789
|
};
|
|
1744
1790
|
Object.assign(
|
|
1745
1791
|
base,
|
|
1746
|
-
|
|
1792
|
+
chunkLBMPJYAR_js.getAnimationColorBaseStyle(element, {
|
|
1747
1793
|
animatesFill,
|
|
1748
1794
|
animatesStroke,
|
|
1749
1795
|
parentGroupFill
|
|
@@ -1765,7 +1811,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1765
1811
|
},
|
|
1766
1812
|
element.id
|
|
1767
1813
|
);
|
|
1768
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1814
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkLBMPJYAR_js.isStrokeOnlyPresetElement(element)) {
|
|
1769
1815
|
base.backgroundColor = "transparent";
|
|
1770
1816
|
base.backgroundImage = void 0;
|
|
1771
1817
|
base.borderWidth = void 0;
|
|
@@ -1779,7 +1825,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1779
1825
|
if (rendersWedgeCalloutVector(element)) {
|
|
1780
1826
|
return base;
|
|
1781
1827
|
}
|
|
1782
|
-
const geometry =
|
|
1828
|
+
const geometry = chunkLBMPJYAR_js.resolveShapeGeometry(element);
|
|
1783
1829
|
switch (geometry.kind) {
|
|
1784
1830
|
case "bare":
|
|
1785
1831
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1803,7 +1849,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1803
1849
|
}
|
|
1804
1850
|
}
|
|
1805
1851
|
function getConnectorPathGeometry2(element) {
|
|
1806
|
-
return
|
|
1852
|
+
return chunkLBMPJYAR_js.getConnectorPathGeometry(element);
|
|
1807
1853
|
}
|
|
1808
1854
|
var ARROW_SIZE_SCALE = {
|
|
1809
1855
|
sm: 0.6,
|
|
@@ -1872,11 +1918,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1872
1918
|
strokePaint,
|
|
1873
1919
|
strokeWidth,
|
|
1874
1920
|
dashArray,
|
|
1875
|
-
lineCap:
|
|
1921
|
+
lineCap: chunkLBMPJYAR_js.svgLineCap(shapeStyle?.lineCap),
|
|
1876
1922
|
lineJoin,
|
|
1877
1923
|
miterLimit,
|
|
1878
|
-
offsets:
|
|
1879
|
-
widths:
|
|
1924
|
+
offsets: chunkLBMPJYAR_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1925
|
+
widths: chunkLBMPJYAR_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1880
1926
|
};
|
|
1881
1927
|
}
|
|
1882
1928
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -1899,12 +1945,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1899
1945
|
}
|
|
1900
1946
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1901
1947
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1902
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1948
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkLBMPJYAR_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
1903
1949
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
1904
|
-
const gradientPaint = gradient ?
|
|
1950
|
+
const gradientPaint = gradient ? chunkLBMPJYAR_js.svgGradientFillRef(gradient) : void 0;
|
|
1905
1951
|
const nodes = [];
|
|
1906
1952
|
if (subpaths && needsPerSubpath) {
|
|
1907
|
-
const paints =
|
|
1953
|
+
const paints = chunkLBMPJYAR_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
1908
1954
|
paints.forEach((paint, idx) => {
|
|
1909
1955
|
if (paint.fill !== "none") {
|
|
1910
1956
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -1933,7 +1979,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
1933
1979
|
"path",
|
|
1934
1980
|
{
|
|
1935
1981
|
d: pathData,
|
|
1936
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
1982
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkLBMPJYAR_js.colorWithOpacity(fillColor, fillOpacity),
|
|
1937
1983
|
stroke: "none",
|
|
1938
1984
|
vectorEffect: "non-scaling-stroke"
|
|
1939
1985
|
},
|
|
@@ -1959,14 +2005,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
1959
2005
|
);
|
|
1960
2006
|
}
|
|
1961
2007
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
1962
|
-
if (!
|
|
2008
|
+
if (!chunkLBMPJYAR_js.hasShapeProperties(element)) {
|
|
1963
2009
|
return null;
|
|
1964
2010
|
}
|
|
1965
2011
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
1966
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
1967
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
1968
|
-
const dashType =
|
|
1969
|
-
const dashArray =
|
|
2012
|
+
const fillPaint = animatesFill ? "inherit" : chunkLBMPJYAR_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2013
|
+
const strokePaint = animatesStroke ? "inherit" : chunkLBMPJYAR_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2014
|
+
const dashType = chunkLBMPJYAR_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2015
|
+
const dashArray = chunkLBMPJYAR_js.getSvgStrokeDasharray(
|
|
1970
2016
|
dashType,
|
|
1971
2017
|
Math.max(strokeWidth, 1),
|
|
1972
2018
|
element.shapeStyle?.customDashSegments
|
|
@@ -2047,13 +2093,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2047
2093
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2048
2094
|
// without this the shape fell back to the parser's representative solid
|
|
2049
2095
|
// and lost every fade (issue #132).
|
|
2050
|
-
|
|
2096
|
+
chunkLBMPJYAR_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2051
2097
|
);
|
|
2052
2098
|
}
|
|
2053
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2099
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkLBMPJYAR_js.buildStrokeOutline(element)) {
|
|
2054
2100
|
const width = Math.max(element.width, 1);
|
|
2055
2101
|
const height = Math.max(element.height, 1);
|
|
2056
|
-
const geometry =
|
|
2102
|
+
const geometry = chunkLBMPJYAR_js.getPresetShapeVectorGeometry(
|
|
2057
2103
|
element.shapeType || "rect",
|
|
2058
2104
|
width,
|
|
2059
2105
|
height,
|
|
@@ -2081,18 +2127,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2081
2127
|
);
|
|
2082
2128
|
}
|
|
2083
2129
|
}
|
|
2084
|
-
if (element.type === "shape" &&
|
|
2130
|
+
if (element.type === "shape" && chunkLBMPJYAR_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2085
2131
|
const width = Math.max(element.width, 1);
|
|
2086
2132
|
const height = Math.max(element.height, 1);
|
|
2087
|
-
const geometry =
|
|
2133
|
+
const geometry = chunkLBMPJYAR_js.getPresetShapeVectorGeometry(
|
|
2088
2134
|
element.shapeType,
|
|
2089
2135
|
width,
|
|
2090
2136
|
height,
|
|
2091
2137
|
element.shapeAdjustments
|
|
2092
2138
|
);
|
|
2093
2139
|
if (geometry) {
|
|
2094
|
-
const gradient =
|
|
2095
|
-
const gradientPaint = gradient ?
|
|
2140
|
+
const gradient = chunkLBMPJYAR_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2141
|
+
const gradientPaint = gradient ? chunkLBMPJYAR_js.svgGradientFillRef(gradient) : void 0;
|
|
2096
2142
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2097
2143
|
"svg",
|
|
2098
2144
|
{
|
|
@@ -2125,18 +2171,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2125
2171
|
);
|
|
2126
2172
|
}
|
|
2127
2173
|
}
|
|
2128
|
-
if (
|
|
2174
|
+
if (chunkLBMPJYAR_js.isCalloutShape(normalizedType)) {
|
|
2129
2175
|
const width = Math.max(element.width, 1);
|
|
2130
2176
|
const height = Math.max(element.height, 1);
|
|
2131
|
-
const geometry =
|
|
2177
|
+
const geometry = chunkLBMPJYAR_js.getCalloutLeaderLineGeometry(
|
|
2132
2178
|
normalizedType,
|
|
2133
2179
|
width,
|
|
2134
2180
|
height,
|
|
2135
2181
|
element.shapeAdjustments
|
|
2136
2182
|
);
|
|
2137
2183
|
if (geometry && geometry.points.length >= 2) {
|
|
2138
|
-
const leaderPath =
|
|
2139
|
-
const bounds =
|
|
2184
|
+
const leaderPath = chunkLBMPJYAR_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2185
|
+
const bounds = chunkLBMPJYAR_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2140
2186
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2141
2187
|
const offsetLeft = bounds.minX;
|
|
2142
2188
|
const offsetTop = bounds.minY;
|
|
@@ -2199,10 +2245,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2199
2245
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2200
2246
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2201
2247
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2202
|
-
const connectorLineCap =
|
|
2248
|
+
const connectorLineCap = chunkLBMPJYAR_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2203
2249
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2204
|
-
const offsets =
|
|
2205
|
-
const widths =
|
|
2250
|
+
const offsets = chunkLBMPJYAR_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2251
|
+
const widths = chunkLBMPJYAR_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2206
2252
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2207
2253
|
"svg",
|
|
2208
2254
|
{
|
|
@@ -2269,15 +2315,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2269
2315
|
}
|
|
2270
2316
|
const rawStops = stops.map((gs) => {
|
|
2271
2317
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2272
|
-
const color =
|
|
2273
|
-
const opacity =
|
|
2318
|
+
const color = chunkLBMPJYAR_js.parseDrawingColor(gs) ?? "#888888";
|
|
2319
|
+
const opacity = chunkLBMPJYAR_js.parseDrawingColorOpacity(gs);
|
|
2274
2320
|
return { position: pos, color, opacity };
|
|
2275
2321
|
}).sort((a, b) => a.position - b.position);
|
|
2276
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2322
|
+
const stopStrings = rawStops.map((s) => `${chunkLBMPJYAR_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2277
2323
|
const lin = gradFill["a:lin"];
|
|
2278
2324
|
if (lin) {
|
|
2279
2325
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2280
|
-
const angleDeg = Math.round(
|
|
2326
|
+
const angleDeg = Math.round(chunkLBMPJYAR_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2281
2327
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2282
2328
|
}
|
|
2283
2329
|
const path = gradFill["a:path"];
|
|
@@ -2291,7 +2337,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2291
2337
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2292
2338
|
} : void 0;
|
|
2293
2339
|
if (pathType === "rect") {
|
|
2294
|
-
return
|
|
2340
|
+
return chunkLBMPJYAR_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2295
2341
|
}
|
|
2296
2342
|
let cx = 50;
|
|
2297
2343
|
let cy = 50;
|
|
@@ -2313,8 +2359,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2313
2359
|
if (!pattFill) {
|
|
2314
2360
|
return void 0;
|
|
2315
2361
|
}
|
|
2316
|
-
const fgColor =
|
|
2317
|
-
const bgColor =
|
|
2362
|
+
const fgColor = chunkLBMPJYAR_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2363
|
+
const bgColor = chunkLBMPJYAR_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2318
2364
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2319
2365
|
switch (preset) {
|
|
2320
2366
|
case "ltHorz":
|
|
@@ -2425,11 +2471,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2425
2471
|
const prstDash = ln["a:prstDash"];
|
|
2426
2472
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2427
2473
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2428
|
-
const color =
|
|
2474
|
+
const color = chunkLBMPJYAR_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2429
2475
|
if (color) {
|
|
2430
|
-
const opacity =
|
|
2476
|
+
const opacity = chunkLBMPJYAR_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2431
2477
|
const key = `${edge.prefix}`;
|
|
2432
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2478
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkLBMPJYAR_js.colorWithOpacity(color, opacity)}`;
|
|
2433
2479
|
}
|
|
2434
2480
|
}
|
|
2435
2481
|
return borderStyle;
|
|
@@ -2442,7 +2488,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2442
2488
|
const textShadowParts = [];
|
|
2443
2489
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2444
2490
|
if (outerShdw) {
|
|
2445
|
-
const shdwColor =
|
|
2491
|
+
const shdwColor = chunkLBMPJYAR_js.parseDrawingColor(outerShdw);
|
|
2446
2492
|
if (shdwColor) {
|
|
2447
2493
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2448
2494
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2460,7 +2506,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2460
2506
|
}
|
|
2461
2507
|
const glow = effectLst["a:glow"];
|
|
2462
2508
|
if (glow) {
|
|
2463
|
-
const glowColor =
|
|
2509
|
+
const glowColor = chunkLBMPJYAR_js.parseDrawingColor(glow);
|
|
2464
2510
|
if (glowColor) {
|
|
2465
2511
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2466
2512
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2482,11 +2528,11 @@ function extractCellText(cellXml) {
|
|
|
2482
2528
|
const textParts = [];
|
|
2483
2529
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2484
2530
|
runs.forEach((run) => {
|
|
2485
|
-
textParts.push(
|
|
2531
|
+
textParts.push(chunkLBMPJYAR_js.xmlText(run["a:t"]) ?? "");
|
|
2486
2532
|
});
|
|
2487
2533
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2488
2534
|
fields.forEach((field) => {
|
|
2489
|
-
textParts.push(
|
|
2535
|
+
textParts.push(chunkLBMPJYAR_js.xmlText(field["a:t"]) ?? "");
|
|
2490
2536
|
});
|
|
2491
2537
|
paragraphTexts.push(textParts.join(""));
|
|
2492
2538
|
});
|
|
@@ -2530,10 +2576,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2530
2576
|
if (runProps?.["@_u"] !== void 0) {
|
|
2531
2577
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2532
2578
|
}
|
|
2533
|
-
const runColor =
|
|
2579
|
+
const runColor = chunkLBMPJYAR_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkLBMPJYAR_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2534
2580
|
if (runColor) {
|
|
2535
|
-
const opacity =
|
|
2536
|
-
cellStyle.color =
|
|
2581
|
+
const opacity = chunkLBMPJYAR_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2582
|
+
cellStyle.color = chunkLBMPJYAR_js.colorWithOpacity(runColor, opacity);
|
|
2537
2583
|
}
|
|
2538
2584
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2539
2585
|
if (fontFamily) {
|
|
@@ -2543,15 +2589,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2543
2589
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2544
2590
|
}
|
|
2545
2591
|
const cellProperties = cellXml["a:tcPr"];
|
|
2546
|
-
const cellFill =
|
|
2592
|
+
const cellFill = chunkLBMPJYAR_js.parseDrawingColor(
|
|
2547
2593
|
cellProperties?.["a:solidFill"],
|
|
2548
2594
|
schemeColorOverrides
|
|
2549
2595
|
);
|
|
2550
2596
|
if (cellFill) {
|
|
2551
|
-
const opacity =
|
|
2597
|
+
const opacity = chunkLBMPJYAR_js.parseDrawingColorOpacity(
|
|
2552
2598
|
cellProperties?.["a:solidFill"]
|
|
2553
2599
|
);
|
|
2554
|
-
cellStyle.backgroundColor =
|
|
2600
|
+
cellStyle.backgroundColor = chunkLBMPJYAR_js.colorWithOpacity(cellFill, opacity);
|
|
2555
2601
|
} else {
|
|
2556
2602
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2557
2603
|
if (gradCss) {
|
|
@@ -2566,16 +2612,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2566
2612
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2567
2613
|
Object.assign(cellStyle, edgeBorders);
|
|
2568
2614
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2569
|
-
const borderColor =
|
|
2615
|
+
const borderColor = chunkLBMPJYAR_js.parseDrawingColor(
|
|
2570
2616
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2571
2617
|
schemeColorOverrides
|
|
2572
|
-
) ||
|
|
2618
|
+
) || chunkLBMPJYAR_js.parseDrawingColor(
|
|
2573
2619
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2574
2620
|
schemeColorOverrides
|
|
2575
|
-
) ||
|
|
2621
|
+
) || chunkLBMPJYAR_js.parseDrawingColor(
|
|
2576
2622
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2577
2623
|
schemeColorOverrides
|
|
2578
|
-
) ||
|
|
2624
|
+
) || chunkLBMPJYAR_js.parseDrawingColor(
|
|
2579
2625
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2580
2626
|
schemeColorOverrides
|
|
2581
2627
|
);
|
|
@@ -2647,7 +2693,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2647
2693
|
if (element.type !== "table") {
|
|
2648
2694
|
return void 0;
|
|
2649
2695
|
}
|
|
2650
|
-
return
|
|
2696
|
+
return chunkLBMPJYAR_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2651
2697
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2652
2698
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2653
2699
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2727,7 +2773,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2727
2773
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2728
2774
|
"span",
|
|
2729
2775
|
{
|
|
2730
|
-
style: { position: "relative", ...
|
|
2776
|
+
style: { position: "relative", ...chunkLBMPJYAR_js.cellRunStyle(run) },
|
|
2731
2777
|
children: run.text
|
|
2732
2778
|
},
|
|
2733
2779
|
`r-${index}`
|
|
@@ -2735,7 +2781,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2735
2781
|
});
|
|
2736
2782
|
}
|
|
2737
2783
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2738
|
-
return
|
|
2784
|
+
return chunkLBMPJYAR_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2739
2785
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2740
2786
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2741
2787
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2868,7 +2914,7 @@ function TableResizeOverlay({
|
|
|
2868
2914
|
const containerRef = React7.useRef(null);
|
|
2869
2915
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2870
2916
|
const dragRef = React7.useRef(null);
|
|
2871
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2917
|
+
const colBoundaries = React7.useMemo(() => chunkLBMPJYAR_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2872
2918
|
const measureRows = React7.useCallback(() => {
|
|
2873
2919
|
const container = containerRef.current;
|
|
2874
2920
|
if (!container) {
|
|
@@ -2913,13 +2959,13 @@ function TableResizeOverlay({
|
|
|
2913
2959
|
return;
|
|
2914
2960
|
}
|
|
2915
2961
|
const rect = containerRef.current.getBoundingClientRect();
|
|
2916
|
-
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
2962
|
+
if (e.clientX !== drag.startPos && drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
2917
2963
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
2918
|
-
onResizeColumns(
|
|
2919
|
-
} else if (drag.type === "row" && onResizeRow) {
|
|
2964
|
+
onResizeColumns(chunkLBMPJYAR_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
2965
|
+
} else if (e.clientY !== drag.startPos && drag.type === "row" && onResizeRow) {
|
|
2920
2966
|
const deltaY = e.clientY - drag.startPos;
|
|
2921
|
-
const newHeight =
|
|
2922
|
-
drag.initialRowHeight ??
|
|
2967
|
+
const newHeight = chunkLBMPJYAR_js.computeResizedRowHeight(
|
|
2968
|
+
drag.initialRowHeight ?? chunkLBMPJYAR_js.DEFAULT_ROW_HEIGHT,
|
|
2923
2969
|
deltaY
|
|
2924
2970
|
);
|
|
2925
2971
|
onResizeRow(drag.index, newHeight);
|
|
@@ -2957,7 +3003,7 @@ function TableResizeOverlay({
|
|
|
2957
3003
|
e.stopPropagation();
|
|
2958
3004
|
const table = containerRef.current?.querySelector("table");
|
|
2959
3005
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
2960
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3006
|
+
const actualHeight = tr?.offsetHeight ?? chunkLBMPJYAR_js.DEFAULT_ROW_HEIGHT;
|
|
2961
3007
|
document.body.style.cursor = "row-resize";
|
|
2962
3008
|
document.body.style.userSelect = "none";
|
|
2963
3009
|
dragRef.current = {
|
|
@@ -2997,14 +3043,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
2997
3043
|
const rowCount = tableData.rows.length;
|
|
2998
3044
|
const columnCount = tableData.columnWidths.length;
|
|
2999
3045
|
const selectedCell = options?.selectedCell || null;
|
|
3000
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3046
|
+
const isEditable = Boolean(options?.editable) && chunkLBMPJYAR_js.canDrillDown(element);
|
|
3001
3047
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3002
3048
|
const sharedCtx = {
|
|
3003
3049
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3004
3050
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3005
3051
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3006
3052
|
};
|
|
3007
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3053
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkLBMPJYAR_js.tableCellCss(
|
|
3008
3054
|
tableData,
|
|
3009
3055
|
cell,
|
|
3010
3056
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3017,7 +3063,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3017
3063
|
}
|
|
3018
3064
|
const first = selectedCell.selectedCells[0];
|
|
3019
3065
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3020
|
-
return
|
|
3066
|
+
return chunkLBMPJYAR_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3021
3067
|
})();
|
|
3022
3068
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3023
3069
|
TableResizeOverlay,
|
|
@@ -3038,9 +3084,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3038
3084
|
{
|
|
3039
3085
|
className: "w-full h-full border-collapse table-fixed",
|
|
3040
3086
|
style: {
|
|
3041
|
-
fontFamily:
|
|
3087
|
+
fontFamily: chunkLBMPJYAR_js.DEFAULT_FONT_FAMILY,
|
|
3042
3088
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3043
|
-
...
|
|
3089
|
+
...chunkLBMPJYAR_js.tableContainerCss(tableData)
|
|
3044
3090
|
},
|
|
3045
3091
|
children: [
|
|
3046
3092
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3059,7 +3105,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3059
3105
|
return null;
|
|
3060
3106
|
}
|
|
3061
3107
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3062
|
-
const isInMultiSelection =
|
|
3108
|
+
const isInMultiSelection = chunkLBMPJYAR_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3063
3109
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3064
3110
|
const diag = getCellDiagonalBorders2(
|
|
3065
3111
|
cell.style,
|
|
@@ -3088,7 +3134,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3088
3134
|
}
|
|
3089
3135
|
event.stopPropagation();
|
|
3090
3136
|
if (event.shiftKey && selectedCell) {
|
|
3091
|
-
const rect =
|
|
3137
|
+
const rect = chunkLBMPJYAR_js.computeSelectionRect(
|
|
3092
3138
|
selectedCell.rowIndex,
|
|
3093
3139
|
selectedCell.columnIndex,
|
|
3094
3140
|
rowIndex,
|
|
@@ -3098,7 +3144,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3098
3144
|
options?.onSelectCell?.({
|
|
3099
3145
|
rowIndex: selectedCell.rowIndex,
|
|
3100
3146
|
columnIndex: selectedCell.columnIndex,
|
|
3101
|
-
selectedCells:
|
|
3147
|
+
selectedCells: chunkLBMPJYAR_js.rectToCells(rect)
|
|
3102
3148
|
});
|
|
3103
3149
|
} else {
|
|
3104
3150
|
options?.onSelectCell?.({
|
|
@@ -3162,7 +3208,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3162
3208
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.table.title"] });
|
|
3163
3209
|
}
|
|
3164
3210
|
const selectedCell = options?.selectedCell || null;
|
|
3165
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3211
|
+
const isEditable = Boolean(options?.editable) && chunkLBMPJYAR_js.canDrillDown(element);
|
|
3166
3212
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3167
3213
|
const tableEl = element;
|
|
3168
3214
|
const xmlSelectionRect = (() => {
|
|
@@ -3174,7 +3220,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3174
3220
|
}
|
|
3175
3221
|
const first = selectedCell.selectedCells[0];
|
|
3176
3222
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3177
|
-
return
|
|
3223
|
+
return chunkLBMPJYAR_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3178
3224
|
})();
|
|
3179
3225
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3180
3226
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3196,9 +3242,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3196
3242
|
{
|
|
3197
3243
|
className: "w-full h-full border-collapse table-fixed",
|
|
3198
3244
|
style: {
|
|
3199
|
-
fontFamily:
|
|
3245
|
+
fontFamily: chunkLBMPJYAR_js.DEFAULT_FONT_FAMILY,
|
|
3200
3246
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3201
|
-
...
|
|
3247
|
+
...chunkLBMPJYAR_js.tableContainerCss(tableEl.tableData)
|
|
3202
3248
|
},
|
|
3203
3249
|
children: [
|
|
3204
3250
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3255,7 +3301,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3255
3301
|
color: textStyle.color,
|
|
3256
3302
|
...bandStyle,
|
|
3257
3303
|
...xmlCellStyle,
|
|
3258
|
-
...tdCellOverride ?
|
|
3304
|
+
...tdCellOverride ? chunkLBMPJYAR_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3259
3305
|
...diag ? { position: "relative" } : void 0
|
|
3260
3306
|
};
|
|
3261
3307
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3265,7 +3311,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3265
3311
|
"border px-1 py-0.5 align-top",
|
|
3266
3312
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3267
3313
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3268
|
-
|
|
3314
|
+
chunkLBMPJYAR_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3269
3315
|
),
|
|
3270
3316
|
colSpan,
|
|
3271
3317
|
rowSpan: rSpan,
|
|
@@ -3276,7 +3322,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3276
3322
|
}
|
|
3277
3323
|
event.stopPropagation();
|
|
3278
3324
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3279
|
-
const rect =
|
|
3325
|
+
const rect = chunkLBMPJYAR_js.computeSelectionRect(
|
|
3280
3326
|
selectedCell.rowIndex,
|
|
3281
3327
|
selectedCell.columnIndex,
|
|
3282
3328
|
rowIndex,
|
|
@@ -3286,7 +3332,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3286
3332
|
options?.onSelectCell?.({
|
|
3287
3333
|
rowIndex: selectedCell.rowIndex,
|
|
3288
3334
|
columnIndex: selectedCell.columnIndex,
|
|
3289
|
-
selectedCells:
|
|
3335
|
+
selectedCells: chunkLBMPJYAR_js.rectToCells(rect)
|
|
3290
3336
|
});
|
|
3291
3337
|
} else {
|
|
3292
3338
|
options?.onSelectCell?.({
|
|
@@ -3345,23 +3391,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3345
3391
|
);
|
|
3346
3392
|
}
|
|
3347
3393
|
function partAttrs(part) {
|
|
3348
|
-
return part ?
|
|
3394
|
+
return part ? chunkLBMPJYAR_js.chartPartToAttrs(part) : void 0;
|
|
3349
3395
|
}
|
|
3350
3396
|
function resolveReactPalette(chartData) {
|
|
3351
3397
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3352
3398
|
return chartData.colorPalette;
|
|
3353
3399
|
}
|
|
3354
|
-
return [...
|
|
3400
|
+
return [...chunkLBMPJYAR_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3355
3401
|
}
|
|
3356
3402
|
function buildReactChartViewModel(element) {
|
|
3357
3403
|
if (element.type !== "chart" || !element.chartData) {
|
|
3358
|
-
return
|
|
3404
|
+
return chunkLBMPJYAR_js.buildChartViewModel(element);
|
|
3359
3405
|
}
|
|
3360
3406
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3361
3407
|
...element,
|
|
3362
3408
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3363
3409
|
};
|
|
3364
|
-
return
|
|
3410
|
+
return chunkLBMPJYAR_js.buildChartViewModel(themedElement);
|
|
3365
3411
|
}
|
|
3366
3412
|
function renderPrimitive(prim, key) {
|
|
3367
3413
|
switch (prim.kind) {
|
|
@@ -3512,7 +3558,7 @@ function renderText(t, key) {
|
|
|
3512
3558
|
);
|
|
3513
3559
|
}
|
|
3514
3560
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3515
|
-
const legendItems =
|
|
3561
|
+
const legendItems = chunkLBMPJYAR_js.computeChartLegendLayout(vm);
|
|
3516
3562
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3517
3563
|
"svg",
|
|
3518
3564
|
{
|
|
@@ -3656,11 +3702,11 @@ function renderChartElement(element) {
|
|
|
3656
3702
|
if (!chartData || chartData.series.length === 0) {
|
|
3657
3703
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.chart.heading"] });
|
|
3658
3704
|
}
|
|
3659
|
-
const kind =
|
|
3705
|
+
const kind = chunkLBMPJYAR_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3660
3706
|
return renderChartViewModel(
|
|
3661
3707
|
element.id,
|
|
3662
3708
|
buildReactChartViewModel(element),
|
|
3663
|
-
|
|
3709
|
+
chunkLBMPJYAR_js.chartPreserveAspectRatio(kind)
|
|
3664
3710
|
);
|
|
3665
3711
|
}
|
|
3666
3712
|
|
|
@@ -3680,14 +3726,14 @@ function buildNotesPdf(pages) {
|
|
|
3680
3726
|
notes: page.notes,
|
|
3681
3727
|
slideNumber: page.slideNumber
|
|
3682
3728
|
}));
|
|
3683
|
-
const bytes =
|
|
3729
|
+
const bytes = chunkLBMPJYAR_js.buildNotesPdfBytes(images, meta);
|
|
3684
3730
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3685
3731
|
return URL.createObjectURL(blob);
|
|
3686
3732
|
}
|
|
3687
3733
|
|
|
3688
3734
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3689
3735
|
function buildPdfFromTiledImageData(pages) {
|
|
3690
|
-
const bytes =
|
|
3736
|
+
const bytes = chunkLBMPJYAR_js.buildTiledSlidesPdfBytes(pages);
|
|
3691
3737
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3692
3738
|
return URL.createObjectURL(blob);
|
|
3693
3739
|
}
|
|
@@ -3696,7 +3742,7 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3696
3742
|
var activePreview = null;
|
|
3697
3743
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3698
3744
|
stopPreviewAnimation();
|
|
3699
|
-
const descriptor =
|
|
3745
|
+
const descriptor = chunkLBMPJYAR_js.buildPreviewAnimation(preset, options);
|
|
3700
3746
|
if (!descriptor) {
|
|
3701
3747
|
return;
|
|
3702
3748
|
}
|
|
@@ -3709,7 +3755,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3709
3755
|
return;
|
|
3710
3756
|
}
|
|
3711
3757
|
const stage = domEl.offsetParent;
|
|
3712
|
-
const descriptor =
|
|
3758
|
+
const descriptor = chunkLBMPJYAR_js.buildMotionPathPreview({
|
|
3713
3759
|
path,
|
|
3714
3760
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3715
3761
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|