pptx-react-viewer 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/{AiChatPanel-BNFDBP4S.mjs → AiChatPanel-AIM55U76.mjs} +4 -4
- package/dist/AiChatPanel-AIM55U76.mjs.br +0 -0
- package/dist/AiChatPanel-AIM55U76.mjs.gz +0 -0
- package/dist/{AiChatPanel-WNQCTQB5.js → AiChatPanel-Q2ZVO4RR.js} +25 -25
- package/dist/AiChatPanel-Q2ZVO4RR.js.br +0 -0
- package/dist/AiChatPanel-Q2ZVO4RR.js.gz +0 -0
- package/dist/{Area3DChartScene-SAQVRYOH.mjs → Area3DChartScene-DNLGOR5F.mjs} +1 -1
- package/dist/{Area3DChartScene-SAQVRYOH.mjs.br → Area3DChartScene-DNLGOR5F.mjs.br} +0 -0
- package/dist/Area3DChartScene-DNLGOR5F.mjs.gz +0 -0
- package/dist/{Area3DChartScene-FXBSLIGX.js → Area3DChartScene-W5HVINQ6.js} +2 -2
- package/dist/Area3DChartScene-W5HVINQ6.js.br +0 -0
- package/dist/Area3DChartScene-W5HVINQ6.js.gz +0 -0
- package/dist/{Bar3DChartScene-7HVUTP2E.js → Bar3DChartScene-SOO62TCP.js} +2 -2
- package/dist/Bar3DChartScene-SOO62TCP.js.br +0 -0
- package/dist/Bar3DChartScene-SOO62TCP.js.gz +0 -0
- package/dist/{Bar3DChartScene-LUA6E2K6.mjs → Bar3DChartScene-VYKQAY6X.mjs} +1 -1
- package/dist/Bar3DChartScene-VYKQAY6X.mjs.br +0 -0
- package/dist/Bar3DChartScene-VYKQAY6X.mjs.gz +0 -0
- package/dist/{Line3DChartScene-OVPULUTF.js → Line3DChartScene-BAP3YA3R.js} +2 -2
- package/dist/Line3DChartScene-BAP3YA3R.js.br +0 -0
- package/dist/Line3DChartScene-BAP3YA3R.js.gz +0 -0
- package/dist/{Line3DChartScene-IW4JGH57.mjs → Line3DChartScene-ZVELPNOD.mjs} +1 -1
- package/dist/{Line3DChartScene-IW4JGH57.mjs.br → Line3DChartScene-ZVELPNOD.mjs.br} +0 -0
- package/dist/Line3DChartScene-ZVELPNOD.mjs.gz +0 -0
- package/dist/{Model3DScene-5KP6BVCV.js → Model3DScene-BWNVCCAZ.js} +2 -2
- package/dist/Model3DScene-BWNVCCAZ.js.br +0 -0
- package/dist/Model3DScene-BWNVCCAZ.js.gz +0 -0
- package/dist/{Model3DScene-BERTZYCJ.mjs → Model3DScene-ZJWU5IUY.mjs} +1 -1
- package/dist/Model3DScene-ZJWU5IUY.mjs.br +0 -0
- package/dist/Model3DScene-ZJWU5IUY.mjs.gz +0 -0
- package/dist/{PieChart3DScene-3R2ETTGA.js → PieChart3DScene-2DJE4BM3.js} +2 -2
- package/dist/PieChart3DScene-2DJE4BM3.js.br +0 -0
- package/dist/PieChart3DScene-2DJE4BM3.js.gz +0 -0
- package/dist/{PieChart3DScene-O6FFK5L7.mjs → PieChart3DScene-NNLKJ6LN.mjs} +1 -1
- package/dist/PieChart3DScene-NNLKJ6LN.mjs.br +0 -0
- package/dist/PieChart3DScene-NNLKJ6LN.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-OCR26R5D.mjs → SurfaceChart3DScene-NWB4QAOI.mjs} +1 -1
- package/dist/SurfaceChart3DScene-NWB4QAOI.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-NWB4QAOI.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-TGFAOLHL.js → SurfaceChart3DScene-WRSCQKJV.js} +2 -2
- package/dist/SurfaceChart3DScene-WRSCQKJV.js.br +0 -0
- package/dist/SurfaceChart3DScene-WRSCQKJV.js.gz +0 -0
- package/dist/{chunk-ITN5NYYM.mjs → chunk-4YGGPPJZ.mjs} +6 -19
- package/dist/chunk-4YGGPPJZ.mjs.br +0 -0
- package/dist/chunk-4YGGPPJZ.mjs.gz +0 -0
- package/dist/{chunk-3B5FRKYU.mjs → chunk-EM3D67TB.mjs} +1430 -511
- package/dist/chunk-EM3D67TB.mjs.br +0 -0
- package/dist/chunk-EM3D67TB.mjs.gz +0 -0
- package/dist/{chunk-44CQ67GQ.js → chunk-GKRE7272.js} +172 -185
- package/dist/chunk-GKRE7272.js.br +0 -0
- package/dist/chunk-GKRE7272.js.gz +0 -0
- package/dist/{chunk-2FTJAMFA.mjs → chunk-IJLTDBXT.mjs} +13 -5
- package/dist/chunk-IJLTDBXT.mjs.br +0 -0
- package/dist/chunk-IJLTDBXT.mjs.gz +0 -0
- package/dist/{chunk-DM2IZCSD.mjs → chunk-PADP3NUM.mjs} +3056 -857
- package/dist/chunk-PADP3NUM.mjs.br +0 -0
- package/dist/chunk-PADP3NUM.mjs.gz +0 -0
- package/dist/{chunk-FSQCEAMG.js → chunk-PDVJNNWP.js} +17 -9
- package/dist/chunk-PDVJNNWP.js.br +0 -0
- package/dist/chunk-PDVJNNWP.js.gz +0 -0
- package/dist/{chunk-QEEU4S4Z.mjs → chunk-QEAU2XTI.mjs} +671 -114
- package/dist/chunk-QEAU2XTI.mjs.br +0 -0
- package/dist/chunk-QEAU2XTI.mjs.gz +0 -0
- package/dist/{chunk-K6R2JNCK.js → chunk-SEJEVNXW.js} +3088 -856
- package/dist/chunk-SEJEVNXW.js.br +0 -0
- package/dist/chunk-SEJEVNXW.js.gz +0 -0
- package/dist/{chunk-3P7FYHJH.js → chunk-UNIJUD5C.js} +44 -1
- package/dist/chunk-UNIJUD5C.js.br +0 -0
- package/dist/{chunk-3P7FYHJH.js.gz → chunk-UNIJUD5C.js.gz} +0 -0
- package/dist/{chunk-QKSYKQEL.js → chunk-WXQQ43IA.js} +2546 -1627
- package/dist/chunk-WXQQ43IA.js.br +0 -0
- package/dist/chunk-WXQQ43IA.js.gz +0 -0
- package/dist/{chunk-AMRT3AE4.mjs → chunk-XWUMM2TX.mjs} +44 -1
- package/dist/chunk-XWUMM2TX.mjs.br +0 -0
- package/dist/{chunk-AMRT3AE4.mjs.gz → chunk-XWUMM2TX.mjs.gz} +0 -0
- package/dist/{chunk-GR6SJJIT.js → chunk-Y2B5EZEV.js} +1080 -518
- package/dist/chunk-Y2B5EZEV.js.br +0 -0
- package/dist/chunk-Y2B5EZEV.js.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 +7 -0
- 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 +176 -5
- 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/{useViewerBuildingBlocks-X1L8BjsQ.d.ts → useViewerBuildingBlocks-f6oNGKMX.d.ts} +8 -1
- package/dist/useViewerBuildingBlocks-f6oNGKMX.d.ts.map +1 -0
- 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 +1 -1
- package/dist/AiChatPanel-BNFDBP4S.mjs.br +0 -0
- package/dist/AiChatPanel-BNFDBP4S.mjs.gz +0 -0
- package/dist/AiChatPanel-WNQCTQB5.js.br +0 -0
- package/dist/AiChatPanel-WNQCTQB5.js.gz +0 -0
- package/dist/Area3DChartScene-FXBSLIGX.js.br +0 -0
- package/dist/Area3DChartScene-FXBSLIGX.js.gz +0 -0
- package/dist/Area3DChartScene-SAQVRYOH.mjs.gz +0 -0
- package/dist/Bar3DChartScene-7HVUTP2E.js.br +0 -0
- package/dist/Bar3DChartScene-7HVUTP2E.js.gz +0 -0
- package/dist/Bar3DChartScene-LUA6E2K6.mjs.br +0 -3
- package/dist/Bar3DChartScene-LUA6E2K6.mjs.gz +0 -0
- package/dist/Line3DChartScene-IW4JGH57.mjs.gz +0 -0
- package/dist/Line3DChartScene-OVPULUTF.js.br +0 -0
- package/dist/Line3DChartScene-OVPULUTF.js.gz +0 -0
- package/dist/Model3DScene-5KP6BVCV.js.br +0 -0
- package/dist/Model3DScene-5KP6BVCV.js.gz +0 -0
- package/dist/Model3DScene-BERTZYCJ.mjs.br +0 -0
- package/dist/Model3DScene-BERTZYCJ.mjs.gz +0 -0
- package/dist/PieChart3DScene-3R2ETTGA.js.br +0 -0
- package/dist/PieChart3DScene-3R2ETTGA.js.gz +0 -0
- package/dist/PieChart3DScene-O6FFK5L7.mjs.br +0 -0
- package/dist/PieChart3DScene-O6FFK5L7.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-OCR26R5D.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-OCR26R5D.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-TGFAOLHL.js.br +0 -0
- package/dist/SurfaceChart3DScene-TGFAOLHL.js.gz +0 -0
- package/dist/chunk-2FTJAMFA.mjs.br +0 -0
- package/dist/chunk-2FTJAMFA.mjs.gz +0 -0
- package/dist/chunk-3B5FRKYU.mjs.br +0 -0
- package/dist/chunk-3B5FRKYU.mjs.gz +0 -0
- package/dist/chunk-3P7FYHJH.js.br +0 -0
- package/dist/chunk-44CQ67GQ.js.br +0 -0
- package/dist/chunk-44CQ67GQ.js.gz +0 -0
- package/dist/chunk-AMRT3AE4.mjs.br +0 -0
- package/dist/chunk-DM2IZCSD.mjs.br +0 -0
- package/dist/chunk-DM2IZCSD.mjs.gz +0 -0
- package/dist/chunk-FSQCEAMG.js.br +0 -0
- package/dist/chunk-FSQCEAMG.js.gz +0 -0
- package/dist/chunk-GR6SJJIT.js.br +0 -0
- package/dist/chunk-GR6SJJIT.js.gz +0 -0
- package/dist/chunk-ITN5NYYM.mjs.br +0 -0
- package/dist/chunk-ITN5NYYM.mjs.gz +0 -0
- package/dist/chunk-K6R2JNCK.js.br +0 -0
- package/dist/chunk-K6R2JNCK.js.gz +0 -0
- package/dist/chunk-QEEU4S4Z.mjs.br +0 -0
- package/dist/chunk-QEEU4S4Z.mjs.gz +0 -0
- package/dist/chunk-QKSYKQEL.js.br +0 -0
- package/dist/chunk-QKSYKQEL.js.gz +0 -0
- package/dist/useViewerBuildingBlocks-X1L8BjsQ.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkSEJEVNXW_js = require('./chunk-SEJEVNXW.js');
|
|
4
|
+
var chunkUNIJUD5C_js = require('./chunk-UNIJUD5C.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React6 = require('react');
|
|
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkSEJEVNXW_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 chunkSEJEVNXW_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 = chunkSEJEVNXW_js.VIEWER_SHORTCUT_REFERENCE;
|
|
65
65
|
|
|
66
66
|
// src/viewer/constants/theme.ts
|
|
67
67
|
var THEME_COLOR_SWATCHES = [
|
|
@@ -105,7 +105,7 @@ var GLYPH_COMPONENTS = {
|
|
|
105
105
|
plus: lu.LuPlus,
|
|
106
106
|
triangle: lu.LuTriangle
|
|
107
107
|
};
|
|
108
|
-
var SHAPE_PRESETS =
|
|
108
|
+
var SHAPE_PRESETS = chunkSEJEVNXW_js.SHAPE_PRESET_DEFS.map(
|
|
109
109
|
(def) => ({
|
|
110
110
|
type: def.type,
|
|
111
111
|
label: def.label,
|
|
@@ -130,7 +130,7 @@ var ARROW_SIZE_OPTIONS = [
|
|
|
130
130
|
{ value: "med", label: "Medium", i18nKey: "pptx.connectorOptions.sizeMedium" },
|
|
131
131
|
{ value: "lg", label: "Large", i18nKey: "pptx.connectorOptions.sizeLarge" }
|
|
132
132
|
];
|
|
133
|
-
var STROKE_DASH_OPTIONS2 =
|
|
133
|
+
var STROKE_DASH_OPTIONS2 = chunkSEJEVNXW_js.STROKE_DASH_OPTIONS;
|
|
134
134
|
|
|
135
135
|
// src/viewer/utils/shape-types.tsx
|
|
136
136
|
function getShapeType(shapeType) {
|
|
@@ -239,7 +239,7 @@ function isConnectorOrLineElement(element) {
|
|
|
239
239
|
if (element.type === "connector") {
|
|
240
240
|
return true;
|
|
241
241
|
}
|
|
242
|
-
if (!
|
|
242
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
243
243
|
return false;
|
|
244
244
|
}
|
|
245
245
|
const st = getShapeType(element.shapeType);
|
|
@@ -248,17 +248,17 @@ function isConnectorOrLineElement(element) {
|
|
|
248
248
|
|
|
249
249
|
// src/viewer/utils/image-style.ts
|
|
250
250
|
function getImageMaskStyle(element) {
|
|
251
|
-
if (!
|
|
251
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
252
252
|
return void 0;
|
|
253
253
|
}
|
|
254
|
-
const geometry =
|
|
254
|
+
const geometry = chunkSEJEVNXW_js.resolveShapeGeometry(element);
|
|
255
255
|
if (geometry.kind === "borderRadius") {
|
|
256
256
|
return { borderRadius: geometry.radius };
|
|
257
257
|
}
|
|
258
258
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
259
259
|
}
|
|
260
260
|
function getImageRenderStyle(element) {
|
|
261
|
-
const fit =
|
|
261
|
+
const fit = chunkSEJEVNXW_js.getImageFitStyle(element);
|
|
262
262
|
return {
|
|
263
263
|
// A translated/scaled crop must be masked by its stationary wrapper, not
|
|
264
264
|
// by the moving bitmap itself.
|
|
@@ -271,11 +271,11 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
271
271
|
return {
|
|
272
272
|
overflow: "hidden",
|
|
273
273
|
borderRadius: mask?.borderRadius,
|
|
274
|
-
clipPath: mask?.clipPath ??
|
|
274
|
+
clipPath: mask?.clipPath ?? getCropShapeClipPath2(element)
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
function getImageSurfaceStyle(element) {
|
|
278
|
-
const fill =
|
|
278
|
+
const fill = chunkSEJEVNXW_js.hasShapeProperties(element) ? chunkSEJEVNXW_js.getComputedFillStyle(element) : void 0;
|
|
279
279
|
return {
|
|
280
280
|
position: "absolute",
|
|
281
281
|
inset: 0,
|
|
@@ -287,27 +287,14 @@ function getImageSurfaceStyle(element) {
|
|
|
287
287
|
backgroundPosition: fill?.backgroundPosition
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
roundedRect: "inset(0 round 12%)",
|
|
293
|
-
triangle: "polygon(50% 0%, 0% 100%, 100% 100%)",
|
|
294
|
-
diamond: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",
|
|
295
|
-
pentagon: "polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",
|
|
296
|
-
hexagon: "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)",
|
|
297
|
-
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
298
|
-
};
|
|
299
|
-
function getCropShapeClipPath(element) {
|
|
300
|
-
if (!chunkK6R2JNCK_js.isImageLikeElement(element)) {
|
|
301
|
-
return void 0;
|
|
302
|
-
}
|
|
303
|
-
const shape = element.cropShape;
|
|
304
|
-
if (!shape || shape === "none") {
|
|
290
|
+
function getCropShapeClipPath2(element) {
|
|
291
|
+
if (!chunkSEJEVNXW_js.isImageLikeElement(element)) {
|
|
305
292
|
return void 0;
|
|
306
293
|
}
|
|
307
|
-
return
|
|
294
|
+
return chunkSEJEVNXW_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
308
295
|
}
|
|
309
296
|
function getImageTilingStyle2(element) {
|
|
310
|
-
return
|
|
297
|
+
return chunkSEJEVNXW_js.getImageTilingStyle(element);
|
|
311
298
|
}
|
|
312
299
|
|
|
313
300
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -449,7 +436,7 @@ function VideoWithMetadata({
|
|
|
449
436
|
{
|
|
450
437
|
ref: mediaRef,
|
|
451
438
|
className: "w-full h-full pointer-events-auto",
|
|
452
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
439
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkSEJEVNXW_js.getImageFitStyle(element),
|
|
453
440
|
controls: showTransport,
|
|
454
441
|
preload: "metadata",
|
|
455
442
|
playsInline: true,
|
|
@@ -522,7 +509,7 @@ function PresentationMediaController({
|
|
|
522
509
|
}
|
|
523
510
|
};
|
|
524
511
|
}, []);
|
|
525
|
-
const { volume: playbackVolume, playbackRate } =
|
|
512
|
+
const { volume: playbackVolume, playbackRate } = chunkSEJEVNXW_js.mediaPlaybackAttributes({
|
|
526
513
|
loop: element.loop,
|
|
527
514
|
volume: element.volume,
|
|
528
515
|
playbackSpeed: element.playbackSpeed
|
|
@@ -657,7 +644,7 @@ function PresentationMediaController({
|
|
|
657
644
|
}
|
|
658
645
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
659
646
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
660
|
-
if (
|
|
647
|
+
if (chunkSEJEVNXW_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
661
648
|
return;
|
|
662
649
|
}
|
|
663
650
|
}
|
|
@@ -700,7 +687,7 @@ function PresentationMediaController({
|
|
|
700
687
|
] });
|
|
701
688
|
}
|
|
702
689
|
function label(key) {
|
|
703
|
-
return key === void 0 ? void 0 :
|
|
690
|
+
return key === void 0 ? void 0 : chunkUNIJUD5C_js.translationsEn[key];
|
|
704
691
|
}
|
|
705
692
|
function FallbackIcon({
|
|
706
693
|
paths,
|
|
@@ -736,17 +723,17 @@ function Badge({
|
|
|
736
723
|
"div",
|
|
737
724
|
{
|
|
738
725
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
739
|
-
...{ [
|
|
726
|
+
...{ [chunkSEJEVNXW_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
740
727
|
children: [
|
|
741
728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
742
729
|
FallbackIcon,
|
|
743
730
|
{
|
|
744
|
-
paths:
|
|
731
|
+
paths: chunkSEJEVNXW_js.mediaFallbackIcon(visual, element.mediaType),
|
|
745
732
|
size: isMissing ? 32 : 48,
|
|
746
733
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
747
734
|
}
|
|
748
735
|
),
|
|
749
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
736
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkSEJEVNXW_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
750
737
|
]
|
|
751
738
|
}
|
|
752
739
|
);
|
|
@@ -763,17 +750,17 @@ function Placeholder({
|
|
|
763
750
|
"div",
|
|
764
751
|
{
|
|
765
752
|
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"}`,
|
|
766
|
-
...{ [
|
|
753
|
+
...{ [chunkSEJEVNXW_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
767
754
|
children: [
|
|
768
755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
769
756
|
FallbackIcon,
|
|
770
757
|
{
|
|
771
|
-
paths:
|
|
758
|
+
paths: chunkSEJEVNXW_js.mediaFallbackIcon(visual, element.mediaType),
|
|
772
759
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
773
760
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
774
761
|
}
|
|
775
762
|
),
|
|
776
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
763
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkSEJEVNXW_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
777
764
|
]
|
|
778
765
|
}
|
|
779
766
|
);
|
|
@@ -783,7 +770,7 @@ function renderMediaFallback({
|
|
|
783
770
|
posterUrl,
|
|
784
771
|
surface
|
|
785
772
|
}) {
|
|
786
|
-
const visual =
|
|
773
|
+
const visual = chunkSEJEVNXW_js.mediaFallbackVisual(surface, {
|
|
787
774
|
hasPoster: Boolean(posterUrl),
|
|
788
775
|
missing: element.mediaMissing === true
|
|
789
776
|
});
|
|
@@ -793,9 +780,9 @@ function renderMediaFallback({
|
|
|
793
780
|
"img",
|
|
794
781
|
{
|
|
795
782
|
src: posterUrl,
|
|
796
|
-
alt: visual.dimPoster ?
|
|
783
|
+
alt: visual.dimPoster ? chunkUNIJUD5C_js.translationsEn["pptx.media.posterAlt"] : chunkUNIJUD5C_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
797
784
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
798
|
-
style:
|
|
785
|
+
style: chunkSEJEVNXW_js.getImageFitStyle(element)
|
|
799
786
|
}
|
|
800
787
|
),
|
|
801
788
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -805,7 +792,7 @@ function renderMediaFallback({
|
|
|
805
792
|
}
|
|
806
793
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
807
794
|
if (element.type !== "media") {
|
|
808
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
795
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkUNIJUD5C_js.translationsEn["pptx.media.title"] });
|
|
809
796
|
}
|
|
810
797
|
const mediaType = element.mediaType;
|
|
811
798
|
const mediaPath = element.mediaPath;
|
|
@@ -813,7 +800,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
813
800
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
814
801
|
const trimFragment = buildTrimFragment(element);
|
|
815
802
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
816
|
-
const shouldLoop =
|
|
803
|
+
const shouldLoop = chunkSEJEVNXW_js.mediaPlaybackAttributes(element).loop;
|
|
817
804
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
818
805
|
const isFullScreen = options?.fullScreen === true;
|
|
819
806
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -891,25 +878,25 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
891
878
|
if (surface.presenting || surface.preview) {
|
|
892
879
|
return null;
|
|
893
880
|
}
|
|
894
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
881
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkUNIJUD5C_js.translationsEn["pptx.media.title"] });
|
|
895
882
|
}
|
|
896
883
|
|
|
897
884
|
// src/viewer/utils/text-utils.tsx
|
|
898
885
|
function getTextStyleForElement(element, fallbackColor) {
|
|
899
|
-
return
|
|
886
|
+
return chunkSEJEVNXW_js.buildTextBlockStyle(element, { fallbackColor });
|
|
900
887
|
}
|
|
901
888
|
|
|
902
889
|
// src/viewer/utils/text-layout.tsx
|
|
903
890
|
function getTextLayoutStyle(element) {
|
|
904
|
-
if (!
|
|
891
|
+
if (!chunkSEJEVNXW_js.hasTextProperties(element)) {
|
|
905
892
|
return {};
|
|
906
893
|
}
|
|
907
|
-
const writingMode =
|
|
908
|
-
const textOrientation =
|
|
909
|
-
const verticalDirection =
|
|
894
|
+
const writingMode = chunkSEJEVNXW_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
895
|
+
const textOrientation = chunkSEJEVNXW_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
896
|
+
const verticalDirection = chunkSEJEVNXW_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
910
897
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
911
898
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
912
|
-
const hasParagraphIndents =
|
|
899
|
+
const hasParagraphIndents = chunkSEJEVNXW_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
913
900
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
914
901
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
915
902
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -918,7 +905,7 @@ function getTextLayoutStyle(element) {
|
|
|
918
905
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
919
906
|
return {
|
|
920
907
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
921
|
-
...
|
|
908
|
+
...chunkSEJEVNXW_js.buildTextBodyLayoutStyle(element),
|
|
922
909
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
923
910
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
924
911
|
paddingTop: bodyTop,
|
|
@@ -946,7 +933,7 @@ function getTextLayoutStyle(element) {
|
|
|
946
933
|
|
|
947
934
|
// src/viewer/utils/text-effects.tsx
|
|
948
935
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
949
|
-
return
|
|
936
|
+
return chunkSEJEVNXW_js.buildTextBody3DSceneStyle(textStyle);
|
|
950
937
|
}
|
|
951
938
|
|
|
952
939
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1131,13 +1118,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1131
1118
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1132
1119
|
return renderedSegments;
|
|
1133
1120
|
}
|
|
1134
|
-
const paraKey = `${elementId}${
|
|
1121
|
+
const paraKey = `${elementId}${chunkSEJEVNXW_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1135
1122
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1136
1123
|
if (paraState) {
|
|
1137
1124
|
const style = buildAnimStyle(paraState);
|
|
1138
1125
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1139
1126
|
}
|
|
1140
|
-
const spec =
|
|
1127
|
+
const spec = chunkSEJEVNXW_js.buildTextBuildSpec(
|
|
1141
1128
|
elementId,
|
|
1142
1129
|
paraIndex,
|
|
1143
1130
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1155,7 +1142,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1155
1142
|
"span",
|
|
1156
1143
|
{
|
|
1157
1144
|
"data-anim-id": span.animId,
|
|
1158
|
-
style:
|
|
1145
|
+
style: chunkSEJEVNXW_js.textBuildSpanStyle(span),
|
|
1159
1146
|
children: content
|
|
1160
1147
|
},
|
|
1161
1148
|
span.animId
|
|
@@ -1163,7 +1150,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1163
1150
|
});
|
|
1164
1151
|
}
|
|
1165
1152
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle) {
|
|
1166
|
-
const [lineLayout] =
|
|
1153
|
+
const [lineLayout] = chunkSEJEVNXW_js.buildRunTabLines(line, ctx, nestedStyle);
|
|
1167
1154
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", whiteSpace: "nowrap" }, children: lineLayout.pieces.map((piece, i) => {
|
|
1168
1155
|
const key = `${keyPrefix}-tab-${i}`;
|
|
1169
1156
|
return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
|
|
@@ -1176,7 +1163,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1176
1163
|
if (!needsScriptFonts || !text) {
|
|
1177
1164
|
return text;
|
|
1178
1165
|
}
|
|
1179
|
-
const pieces =
|
|
1166
|
+
const pieces = chunkSEJEVNXW_js.splitRunByScriptFont(
|
|
1180
1167
|
text,
|
|
1181
1168
|
scriptFonts,
|
|
1182
1169
|
baseFontFamily,
|
|
@@ -1193,7 +1180,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1193
1180
|
if (!metric || !text) {
|
|
1194
1181
|
return inner(text, keyPrefix);
|
|
1195
1182
|
}
|
|
1196
|
-
const pieces =
|
|
1183
|
+
const pieces = chunkSEJEVNXW_js.splitRunForMetrics(text, metric.font);
|
|
1197
1184
|
if (pieces.length <= 1) {
|
|
1198
1185
|
return inner(text, keyPrefix);
|
|
1199
1186
|
}
|
|
@@ -1202,7 +1189,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1202
1189
|
{
|
|
1203
1190
|
style: {
|
|
1204
1191
|
...metric.nestedStyle,
|
|
1205
|
-
letterSpacing:
|
|
1192
|
+
letterSpacing: chunkSEJEVNXW_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1206
1193
|
},
|
|
1207
1194
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1208
1195
|
},
|
|
@@ -1289,8 +1276,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1289
1276
|
});
|
|
1290
1277
|
}
|
|
1291
1278
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1292
|
-
const mathml =
|
|
1293
|
-
const safeMathml = mathml ?
|
|
1279
|
+
const mathml = chunkSEJEVNXW_js.convertOmmlToMathMl(equationXml);
|
|
1280
|
+
const safeMathml = mathml ? chunkSEJEVNXW_js.sanitizeMathMl(mathml) : "";
|
|
1294
1281
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1295
1282
|
"span",
|
|
1296
1283
|
{
|
|
@@ -1300,7 +1287,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1300
1287
|
},
|
|
1301
1288
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1302
1289
|
}
|
|
1303
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1290
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkUNIJUD5C_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1304
1291
|
if (equationNumber) {
|
|
1305
1292
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1306
1293
|
"span",
|
|
@@ -1418,7 +1405,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1418
1405
|
const segmentStyle = segment?.style ?? {};
|
|
1419
1406
|
const textValue = run.text;
|
|
1420
1407
|
const lines = textValue.split("\n");
|
|
1421
|
-
const resolvedSegmentColor =
|
|
1408
|
+
const resolvedSegmentColor = chunkSEJEVNXW_js.normalizeHexColor(
|
|
1422
1409
|
segmentStyle.color || element.textStyle?.color,
|
|
1423
1410
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1424
1411
|
);
|
|
@@ -1426,16 +1413,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1426
1413
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1427
1414
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1428
1415
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1429
|
-
const baseFontSize = rawFontSize *
|
|
1416
|
+
const baseFontSize = rawFontSize * chunkSEJEVNXW_js.resolveAutoFitFontScale(element.textStyle);
|
|
1430
1417
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1431
|
-
const fontKerning =
|
|
1418
|
+
const fontKerning = chunkSEJEVNXW_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1432
1419
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1433
|
-
const baseFontFamily = rawFontFamily ?
|
|
1420
|
+
const baseFontFamily = rawFontFamily ? chunkSEJEVNXW_js.getSubstituteFontFamily(
|
|
1434
1421
|
rawFontFamily,
|
|
1435
|
-
|
|
1422
|
+
chunkSEJEVNXW_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1436
1423
|
) : DEFAULT_FONT_FAMILY2;
|
|
1437
|
-
const scriptFonts =
|
|
1438
|
-
const needsScriptFonts =
|
|
1424
|
+
const scriptFonts = chunkSEJEVNXW_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1425
|
+
const needsScriptFonts = chunkSEJEVNXW_js.hasDistinctScriptFonts(scriptFonts);
|
|
1439
1426
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1440
1427
|
const metricFont = {
|
|
1441
1428
|
fontFamily: baseFontFamily,
|
|
@@ -1443,7 +1430,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1443
1430
|
bold: Boolean(segmentStyle.bold),
|
|
1444
1431
|
italic: Boolean(segmentStyle.italic)
|
|
1445
1432
|
};
|
|
1446
|
-
const nestedStyle =
|
|
1433
|
+
const nestedStyle = chunkSEJEVNXW_js.nestedTextDecorationStyle(run.style);
|
|
1447
1434
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1448
1435
|
const spanStyle = { ...run.style };
|
|
1449
1436
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1451,11 +1438,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1451
1438
|
spanStyle.fontFamily = baseFontFamily;
|
|
1452
1439
|
spanStyle.verticalAlign = baselineShift;
|
|
1453
1440
|
spanStyle.fontKerning = fontKerning;
|
|
1454
|
-
spanStyle.letterSpacing =
|
|
1441
|
+
spanStyle.letterSpacing = chunkSEJEVNXW_js.pieceLetterSpacing(
|
|
1455
1442
|
authoredLetterSpacing,
|
|
1456
|
-
|
|
1443
|
+
chunkSEJEVNXW_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1457
1444
|
);
|
|
1458
|
-
const hollow =
|
|
1445
|
+
const hollow = chunkSEJEVNXW_js.hollowTextFillStyle(segmentStyle, {
|
|
1459
1446
|
color: resolvedSegmentColor,
|
|
1460
1447
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1461
1448
|
});
|
|
@@ -1476,7 +1463,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1476
1463
|
scriptFonts,
|
|
1477
1464
|
baseFontFamily,
|
|
1478
1465
|
findHighlights,
|
|
1479
|
-
|
|
1466
|
+
chunkSEJEVNXW_js.buildTabContext(
|
|
1480
1467
|
element.textStyle?.tabStops,
|
|
1481
1468
|
element.textStyle?.defaultTabSize,
|
|
1482
1469
|
baseFontSize,
|
|
@@ -1502,7 +1489,7 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1502
1489
|
] });
|
|
1503
1490
|
}
|
|
1504
1491
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt) {
|
|
1505
|
-
if (!
|
|
1492
|
+
if (!chunkSEJEVNXW_js.hasTextProperties(element)) {
|
|
1506
1493
|
return emptyFallback || null;
|
|
1507
1494
|
}
|
|
1508
1495
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1512,7 +1499,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1512
1499
|
}
|
|
1513
1500
|
return element.text || emptyFallback || "";
|
|
1514
1501
|
}
|
|
1515
|
-
const paragraphs =
|
|
1502
|
+
const paragraphs = chunkSEJEVNXW_js.buildParagraphs(element, fieldContext, segmentOverrides);
|
|
1516
1503
|
const ctx = {
|
|
1517
1504
|
element,
|
|
1518
1505
|
fallbackColor,
|
|
@@ -1634,13 +1621,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1634
1621
|
);
|
|
1635
1622
|
}
|
|
1636
1623
|
function getDuotoneColors(element) {
|
|
1637
|
-
if (!
|
|
1624
|
+
if (!chunkSEJEVNXW_js.isImageLikeElement(element)) {
|
|
1638
1625
|
return void 0;
|
|
1639
1626
|
}
|
|
1640
1627
|
return element.imageEffects?.duotone;
|
|
1641
1628
|
}
|
|
1642
1629
|
function buildLineShadowCss(element) {
|
|
1643
|
-
if (!
|
|
1630
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
1644
1631
|
return void 0;
|
|
1645
1632
|
}
|
|
1646
1633
|
const ss = element.shapeStyle;
|
|
@@ -1651,13 +1638,13 @@ function buildLineShadowCss(element) {
|
|
|
1651
1638
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1652
1639
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1653
1640
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1654
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1655
|
-
|
|
1641
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkSEJEVNXW_js.colorWithOpacity(
|
|
1642
|
+
chunkSEJEVNXW_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1656
1643
|
opacity
|
|
1657
1644
|
)}`;
|
|
1658
1645
|
}
|
|
1659
1646
|
function buildLineGlowFilter(element) {
|
|
1660
|
-
if (!
|
|
1647
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
1661
1648
|
return void 0;
|
|
1662
1649
|
}
|
|
1663
1650
|
const ss = element.shapeStyle;
|
|
@@ -1666,22 +1653,22 @@ function buildLineGlowFilter(element) {
|
|
|
1666
1653
|
}
|
|
1667
1654
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1668
1655
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1669
|
-
const glowCol =
|
|
1656
|
+
const glowCol = chunkSEJEVNXW_js.colorWithOpacity(chunkSEJEVNXW_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1670
1657
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1671
1658
|
}
|
|
1672
1659
|
function getDagDuotoneFilterId(elementId) {
|
|
1673
1660
|
return `dag-duotone-${elementId}`;
|
|
1674
1661
|
}
|
|
1675
1662
|
function hasDagDuotoneEffect(element) {
|
|
1676
|
-
if (!
|
|
1663
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
1677
1664
|
return false;
|
|
1678
1665
|
}
|
|
1679
1666
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1680
1667
|
}
|
|
1681
1668
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1682
1669
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1683
|
-
const c1 =
|
|
1684
|
-
const c2 =
|
|
1670
|
+
const c1 = chunkSEJEVNXW_js.hexToRgbUnit(color1);
|
|
1671
|
+
const c2 = chunkSEJEVNXW_js.hexToRgbUnit(color2);
|
|
1685
1672
|
const grayscaleMatrix = [
|
|
1686
1673
|
0.2126,
|
|
1687
1674
|
0.7152,
|
|
@@ -1725,7 +1712,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1725
1712
|
|
|
1726
1713
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1727
1714
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1728
|
-
return
|
|
1715
|
+
return chunkSEJEVNXW_js.build3DExtrusionData(
|
|
1729
1716
|
shape3d,
|
|
1730
1717
|
scene3d,
|
|
1731
1718
|
fillColor,
|
|
@@ -1734,7 +1721,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1734
1721
|
);
|
|
1735
1722
|
}
|
|
1736
1723
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
1737
|
-
|
|
1724
|
+
chunkSEJEVNXW_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
1738
1725
|
}
|
|
1739
1726
|
|
|
1740
1727
|
// src/viewer/utils/shape-visual-style.ts
|
|
@@ -1742,16 +1729,16 @@ function rendersCustomVectorPath(element) {
|
|
|
1742
1729
|
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;
|
|
1743
1730
|
}
|
|
1744
1731
|
function rendersWedgeCalloutVector(element) {
|
|
1745
|
-
return element.type === "shape" &&
|
|
1732
|
+
return element.type === "shape" && chunkSEJEVNXW_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1746
1733
|
}
|
|
1747
1734
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1748
|
-
if (!
|
|
1735
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
1749
1736
|
return {};
|
|
1750
1737
|
}
|
|
1751
1738
|
const ss = element.shapeStyle;
|
|
1752
|
-
const fill = animatesFill ? void 0 :
|
|
1753
|
-
const fx =
|
|
1754
|
-
const stroke =
|
|
1739
|
+
const fill = animatesFill ? void 0 : chunkSEJEVNXW_js.getComputedFillStyle(element, parentGroupFill);
|
|
1740
|
+
const fx = chunkSEJEVNXW_js.getComputedEffectStyle(element);
|
|
1741
|
+
const stroke = chunkSEJEVNXW_js.getComputedStrokeStyle(element);
|
|
1755
1742
|
const base = {
|
|
1756
1743
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1757
1744
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1790,7 +1777,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1790
1777
|
};
|
|
1791
1778
|
Object.assign(
|
|
1792
1779
|
base,
|
|
1793
|
-
|
|
1780
|
+
chunkSEJEVNXW_js.getAnimationColorBaseStyle(element, {
|
|
1794
1781
|
animatesFill,
|
|
1795
1782
|
animatesStroke,
|
|
1796
1783
|
parentGroupFill
|
|
@@ -1802,7 +1789,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1802
1789
|
base.borderStyle = void 0;
|
|
1803
1790
|
}
|
|
1804
1791
|
apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor);
|
|
1805
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1792
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkSEJEVNXW_js.isStrokeOnlyPresetElement(element)) {
|
|
1806
1793
|
base.backgroundColor = "transparent";
|
|
1807
1794
|
base.backgroundImage = void 0;
|
|
1808
1795
|
base.borderWidth = void 0;
|
|
@@ -1816,7 +1803,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1816
1803
|
if (rendersWedgeCalloutVector(element)) {
|
|
1817
1804
|
return base;
|
|
1818
1805
|
}
|
|
1819
|
-
const geometry =
|
|
1806
|
+
const geometry = chunkSEJEVNXW_js.resolveShapeGeometry(element);
|
|
1820
1807
|
switch (geometry.kind) {
|
|
1821
1808
|
case "bare":
|
|
1822
1809
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1842,13 +1829,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1842
1829
|
function getConnectorAdjustment(element, key, fallback) {
|
|
1843
1830
|
const direct = element.shapeAdjustments?.[key];
|
|
1844
1831
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1845
|
-
return
|
|
1832
|
+
return chunkSEJEVNXW_js.clampUnitInterval(direct / 1e5);
|
|
1846
1833
|
}
|
|
1847
1834
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1848
1835
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1849
|
-
return
|
|
1836
|
+
return chunkSEJEVNXW_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1850
1837
|
}
|
|
1851
|
-
return
|
|
1838
|
+
return chunkSEJEVNXW_js.clampUnitInterval(fallback);
|
|
1852
1839
|
}
|
|
1853
1840
|
function getConnectorPathGeometry(element) {
|
|
1854
1841
|
const width = Math.max(element.width, 0);
|
|
@@ -1985,11 +1972,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1985
1972
|
strokePaint,
|
|
1986
1973
|
strokeWidth,
|
|
1987
1974
|
dashArray,
|
|
1988
|
-
lineCap:
|
|
1975
|
+
lineCap: chunkSEJEVNXW_js.svgLineCap(shapeStyle?.lineCap),
|
|
1989
1976
|
lineJoin,
|
|
1990
1977
|
miterLimit,
|
|
1991
|
-
offsets:
|
|
1992
|
-
widths:
|
|
1978
|
+
offsets: chunkSEJEVNXW_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1979
|
+
widths: chunkSEJEVNXW_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1993
1980
|
};
|
|
1994
1981
|
}
|
|
1995
1982
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2037,12 +2024,12 @@ function gradientDefs(gradient) {
|
|
|
2037
2024
|
}
|
|
2038
2025
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2039
2026
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2040
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2027
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkSEJEVNXW_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2041
2028
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2042
|
-
const gradientPaint = gradient ?
|
|
2029
|
+
const gradientPaint = gradient ? chunkSEJEVNXW_js.svgGradientFillRef(gradient) : void 0;
|
|
2043
2030
|
const nodes = [];
|
|
2044
2031
|
if (subpaths && needsPerSubpath) {
|
|
2045
|
-
const paints =
|
|
2032
|
+
const paints = chunkSEJEVNXW_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2046
2033
|
paints.forEach((paint, idx) => {
|
|
2047
2034
|
if (paint.fill !== "none") {
|
|
2048
2035
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2071,7 +2058,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2071
2058
|
"path",
|
|
2072
2059
|
{
|
|
2073
2060
|
d: pathData,
|
|
2074
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2061
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkSEJEVNXW_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2075
2062
|
stroke: "none",
|
|
2076
2063
|
vectorEffect: "non-scaling-stroke"
|
|
2077
2064
|
},
|
|
@@ -2114,14 +2101,14 @@ function renderGradientDefs(gradient) {
|
|
|
2114
2101
|
) });
|
|
2115
2102
|
}
|
|
2116
2103
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2117
|
-
if (!
|
|
2104
|
+
if (!chunkSEJEVNXW_js.hasShapeProperties(element)) {
|
|
2118
2105
|
return null;
|
|
2119
2106
|
}
|
|
2120
2107
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2121
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2122
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2123
|
-
const dashType =
|
|
2124
|
-
const dashArray =
|
|
2108
|
+
const fillPaint = animatesFill ? "inherit" : chunkSEJEVNXW_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2109
|
+
const strokePaint = animatesStroke ? "inherit" : chunkSEJEVNXW_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2110
|
+
const dashType = chunkSEJEVNXW_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2111
|
+
const dashArray = chunkSEJEVNXW_js.getSvgStrokeDasharray(
|
|
2125
2112
|
dashType,
|
|
2126
2113
|
Math.max(strokeWidth, 1),
|
|
2127
2114
|
element.shapeStyle?.customDashSegments
|
|
@@ -2202,13 +2189,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2202
2189
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2203
2190
|
// without this the shape fell back to the parser's representative solid
|
|
2204
2191
|
// and lost every fade (issue #132).
|
|
2205
|
-
|
|
2192
|
+
chunkSEJEVNXW_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2206
2193
|
);
|
|
2207
2194
|
}
|
|
2208
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2195
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkSEJEVNXW_js.buildStrokeOutline(element)) {
|
|
2209
2196
|
const width = Math.max(element.width, 1);
|
|
2210
2197
|
const height = Math.max(element.height, 1);
|
|
2211
|
-
const geometry =
|
|
2198
|
+
const geometry = chunkSEJEVNXW_js.getPresetShapeVectorGeometry(
|
|
2212
2199
|
element.shapeType || "rect",
|
|
2213
2200
|
width,
|
|
2214
2201
|
height,
|
|
@@ -2236,18 +2223,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2236
2223
|
);
|
|
2237
2224
|
}
|
|
2238
2225
|
}
|
|
2239
|
-
if (element.type === "shape" &&
|
|
2226
|
+
if (element.type === "shape" && chunkSEJEVNXW_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2240
2227
|
const width = Math.max(element.width, 1);
|
|
2241
2228
|
const height = Math.max(element.height, 1);
|
|
2242
|
-
const geometry =
|
|
2229
|
+
const geometry = chunkSEJEVNXW_js.getPresetShapeVectorGeometry(
|
|
2243
2230
|
element.shapeType,
|
|
2244
2231
|
width,
|
|
2245
2232
|
height,
|
|
2246
2233
|
element.shapeAdjustments
|
|
2247
2234
|
);
|
|
2248
2235
|
if (geometry) {
|
|
2249
|
-
const gradient =
|
|
2250
|
-
const gradientPaint = gradient ?
|
|
2236
|
+
const gradient = chunkSEJEVNXW_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2237
|
+
const gradientPaint = gradient ? chunkSEJEVNXW_js.svgGradientFillRef(gradient) : void 0;
|
|
2251
2238
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2252
2239
|
"svg",
|
|
2253
2240
|
{
|
|
@@ -2280,18 +2267,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2280
2267
|
);
|
|
2281
2268
|
}
|
|
2282
2269
|
}
|
|
2283
|
-
if (
|
|
2270
|
+
if (chunkSEJEVNXW_js.isCalloutShape(normalizedType)) {
|
|
2284
2271
|
const width = Math.max(element.width, 1);
|
|
2285
2272
|
const height = Math.max(element.height, 1);
|
|
2286
|
-
const geometry =
|
|
2273
|
+
const geometry = chunkSEJEVNXW_js.getCalloutLeaderLineGeometry(
|
|
2287
2274
|
normalizedType,
|
|
2288
2275
|
width,
|
|
2289
2276
|
height,
|
|
2290
2277
|
element.shapeAdjustments
|
|
2291
2278
|
);
|
|
2292
2279
|
if (geometry && geometry.points.length >= 2) {
|
|
2293
|
-
const leaderPath =
|
|
2294
|
-
const bounds =
|
|
2280
|
+
const leaderPath = chunkSEJEVNXW_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2281
|
+
const bounds = chunkSEJEVNXW_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2295
2282
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2296
2283
|
const offsetLeft = bounds.minX;
|
|
2297
2284
|
const offsetTop = bounds.minY;
|
|
@@ -2354,10 +2341,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2354
2341
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2355
2342
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2356
2343
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2357
|
-
const connectorLineCap =
|
|
2344
|
+
const connectorLineCap = chunkSEJEVNXW_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2358
2345
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2359
|
-
const offsets =
|
|
2360
|
-
const widths =
|
|
2346
|
+
const offsets = chunkSEJEVNXW_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2347
|
+
const widths = chunkSEJEVNXW_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2361
2348
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2362
2349
|
"svg",
|
|
2363
2350
|
{
|
|
@@ -2424,15 +2411,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2424
2411
|
}
|
|
2425
2412
|
const rawStops = stops.map((gs) => {
|
|
2426
2413
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2427
|
-
const color =
|
|
2428
|
-
const opacity =
|
|
2414
|
+
const color = chunkSEJEVNXW_js.parseDrawingColor(gs) ?? "#888888";
|
|
2415
|
+
const opacity = chunkSEJEVNXW_js.parseDrawingColorOpacity(gs);
|
|
2429
2416
|
return { position: pos, color, opacity };
|
|
2430
2417
|
}).sort((a, b) => a.position - b.position);
|
|
2431
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2418
|
+
const stopStrings = rawStops.map((s) => `${chunkSEJEVNXW_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2432
2419
|
const lin = gradFill["a:lin"];
|
|
2433
2420
|
if (lin) {
|
|
2434
2421
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2435
|
-
const angleDeg = Math.round(
|
|
2422
|
+
const angleDeg = Math.round(chunkSEJEVNXW_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2436
2423
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2437
2424
|
}
|
|
2438
2425
|
const path = gradFill["a:path"];
|
|
@@ -2446,7 +2433,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2446
2433
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2447
2434
|
} : void 0;
|
|
2448
2435
|
if (pathType === "rect") {
|
|
2449
|
-
return
|
|
2436
|
+
return chunkSEJEVNXW_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2450
2437
|
}
|
|
2451
2438
|
let cx = 50;
|
|
2452
2439
|
let cy = 50;
|
|
@@ -2468,8 +2455,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2468
2455
|
if (!pattFill) {
|
|
2469
2456
|
return void 0;
|
|
2470
2457
|
}
|
|
2471
|
-
const fgColor =
|
|
2472
|
-
const bgColor =
|
|
2458
|
+
const fgColor = chunkSEJEVNXW_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2459
|
+
const bgColor = chunkSEJEVNXW_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2473
2460
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2474
2461
|
switch (preset) {
|
|
2475
2462
|
case "ltHorz":
|
|
@@ -2580,11 +2567,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2580
2567
|
const prstDash = ln["a:prstDash"];
|
|
2581
2568
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2582
2569
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2583
|
-
const color =
|
|
2570
|
+
const color = chunkSEJEVNXW_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2584
2571
|
if (color) {
|
|
2585
|
-
const opacity =
|
|
2572
|
+
const opacity = chunkSEJEVNXW_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2586
2573
|
const key = `${edge.prefix}`;
|
|
2587
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2574
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkSEJEVNXW_js.colorWithOpacity(color, opacity)}`;
|
|
2588
2575
|
}
|
|
2589
2576
|
}
|
|
2590
2577
|
return borderStyle;
|
|
@@ -2597,7 +2584,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2597
2584
|
const textShadowParts = [];
|
|
2598
2585
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2599
2586
|
if (outerShdw) {
|
|
2600
|
-
const shdwColor =
|
|
2587
|
+
const shdwColor = chunkSEJEVNXW_js.parseDrawingColor(outerShdw);
|
|
2601
2588
|
if (shdwColor) {
|
|
2602
2589
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2603
2590
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2615,7 +2602,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2615
2602
|
}
|
|
2616
2603
|
const glow = effectLst["a:glow"];
|
|
2617
2604
|
if (glow) {
|
|
2618
|
-
const glowColor =
|
|
2605
|
+
const glowColor = chunkSEJEVNXW_js.parseDrawingColor(glow);
|
|
2619
2606
|
if (glowColor) {
|
|
2620
2607
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2621
2608
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2695,10 +2682,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2695
2682
|
if (runProps?.["@_u"] !== void 0) {
|
|
2696
2683
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2697
2684
|
}
|
|
2698
|
-
const runColor =
|
|
2685
|
+
const runColor = chunkSEJEVNXW_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkSEJEVNXW_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2699
2686
|
if (runColor) {
|
|
2700
|
-
const opacity =
|
|
2701
|
-
cellStyle.color =
|
|
2687
|
+
const opacity = chunkSEJEVNXW_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2688
|
+
cellStyle.color = chunkSEJEVNXW_js.colorWithOpacity(runColor, opacity);
|
|
2702
2689
|
}
|
|
2703
2690
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2704
2691
|
if (fontFamily) {
|
|
@@ -2708,15 +2695,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2708
2695
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2709
2696
|
}
|
|
2710
2697
|
const cellProperties = cellXml["a:tcPr"];
|
|
2711
|
-
const cellFill =
|
|
2698
|
+
const cellFill = chunkSEJEVNXW_js.parseDrawingColor(
|
|
2712
2699
|
cellProperties?.["a:solidFill"],
|
|
2713
2700
|
schemeColorOverrides
|
|
2714
2701
|
);
|
|
2715
2702
|
if (cellFill) {
|
|
2716
|
-
const opacity =
|
|
2703
|
+
const opacity = chunkSEJEVNXW_js.parseDrawingColorOpacity(
|
|
2717
2704
|
cellProperties?.["a:solidFill"]
|
|
2718
2705
|
);
|
|
2719
|
-
cellStyle.backgroundColor =
|
|
2706
|
+
cellStyle.backgroundColor = chunkSEJEVNXW_js.colorWithOpacity(cellFill, opacity);
|
|
2720
2707
|
} else {
|
|
2721
2708
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2722
2709
|
if (gradCss) {
|
|
@@ -2731,16 +2718,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2731
2718
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2732
2719
|
Object.assign(cellStyle, edgeBorders);
|
|
2733
2720
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2734
|
-
const borderColor =
|
|
2721
|
+
const borderColor = chunkSEJEVNXW_js.parseDrawingColor(
|
|
2735
2722
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2736
2723
|
schemeColorOverrides
|
|
2737
|
-
) ||
|
|
2724
|
+
) || chunkSEJEVNXW_js.parseDrawingColor(
|
|
2738
2725
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2739
2726
|
schemeColorOverrides
|
|
2740
|
-
) ||
|
|
2727
|
+
) || chunkSEJEVNXW_js.parseDrawingColor(
|
|
2741
2728
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2742
2729
|
schemeColorOverrides
|
|
2743
|
-
) ||
|
|
2730
|
+
) || chunkSEJEVNXW_js.parseDrawingColor(
|
|
2744
2731
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2745
2732
|
schemeColorOverrides
|
|
2746
2733
|
);
|
|
@@ -2812,7 +2799,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2812
2799
|
if (element.type !== "table") {
|
|
2813
2800
|
return void 0;
|
|
2814
2801
|
}
|
|
2815
|
-
return
|
|
2802
|
+
return chunkSEJEVNXW_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2816
2803
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2817
2804
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2818
2805
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2888,7 +2875,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2888
2875
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2889
2876
|
"span",
|
|
2890
2877
|
{
|
|
2891
|
-
style: { position: "relative", ...
|
|
2878
|
+
style: { position: "relative", ...chunkSEJEVNXW_js.cellRunStyle(run) },
|
|
2892
2879
|
children: run.text
|
|
2893
2880
|
},
|
|
2894
2881
|
`r-${index}`
|
|
@@ -2896,7 +2883,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2896
2883
|
});
|
|
2897
2884
|
}
|
|
2898
2885
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2899
|
-
return
|
|
2886
|
+
return chunkSEJEVNXW_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2900
2887
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2901
2888
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2902
2889
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3029,7 +3016,7 @@ function TableResizeOverlay({
|
|
|
3029
3016
|
const containerRef = React6.useRef(null);
|
|
3030
3017
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3031
3018
|
const dragRef = React6.useRef(null);
|
|
3032
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3019
|
+
const colBoundaries = React6.useMemo(() => chunkSEJEVNXW_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3033
3020
|
const measureRows = React6.useCallback(() => {
|
|
3034
3021
|
const container = containerRef.current;
|
|
3035
3022
|
if (!container) {
|
|
@@ -3076,11 +3063,11 @@ function TableResizeOverlay({
|
|
|
3076
3063
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3077
3064
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3078
3065
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3079
|
-
onResizeColumns(
|
|
3066
|
+
onResizeColumns(chunkSEJEVNXW_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3080
3067
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3081
3068
|
const deltaY = e.clientY - drag.startPos;
|
|
3082
|
-
const newHeight =
|
|
3083
|
-
drag.initialRowHeight ??
|
|
3069
|
+
const newHeight = chunkSEJEVNXW_js.computeResizedRowHeight(
|
|
3070
|
+
drag.initialRowHeight ?? chunkSEJEVNXW_js.DEFAULT_ROW_HEIGHT,
|
|
3084
3071
|
deltaY
|
|
3085
3072
|
);
|
|
3086
3073
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3118,7 +3105,7 @@ function TableResizeOverlay({
|
|
|
3118
3105
|
e.stopPropagation();
|
|
3119
3106
|
const table = containerRef.current?.querySelector("table");
|
|
3120
3107
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3121
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3108
|
+
const actualHeight = tr?.offsetHeight ?? chunkSEJEVNXW_js.DEFAULT_ROW_HEIGHT;
|
|
3122
3109
|
document.body.style.cursor = "row-resize";
|
|
3123
3110
|
document.body.style.userSelect = "none";
|
|
3124
3111
|
dragRef.current = {
|
|
@@ -3165,7 +3152,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3165
3152
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3166
3153
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3167
3154
|
};
|
|
3168
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3155
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkSEJEVNXW_js.tableCellCss(
|
|
3169
3156
|
tableData,
|
|
3170
3157
|
cell,
|
|
3171
3158
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3178,7 +3165,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3178
3165
|
}
|
|
3179
3166
|
const first = selectedCell.selectedCells[0];
|
|
3180
3167
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3181
|
-
return
|
|
3168
|
+
return chunkSEJEVNXW_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3182
3169
|
})();
|
|
3183
3170
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3184
3171
|
TableResizeOverlay,
|
|
@@ -3199,9 +3186,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3199
3186
|
{
|
|
3200
3187
|
className: "w-full h-full border-collapse table-fixed",
|
|
3201
3188
|
style: {
|
|
3202
|
-
fontFamily:
|
|
3189
|
+
fontFamily: chunkSEJEVNXW_js.DEFAULT_FONT_FAMILY,
|
|
3203
3190
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3204
|
-
...
|
|
3191
|
+
...chunkSEJEVNXW_js.tableContainerCss(tableData)
|
|
3205
3192
|
},
|
|
3206
3193
|
children: [
|
|
3207
3194
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3220,7 +3207,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3220
3207
|
return null;
|
|
3221
3208
|
}
|
|
3222
3209
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3223
|
-
const isInMultiSelection =
|
|
3210
|
+
const isInMultiSelection = chunkSEJEVNXW_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3224
3211
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3225
3212
|
const diag = getCellDiagonalBorders2(
|
|
3226
3213
|
cell.style,
|
|
@@ -3249,7 +3236,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3249
3236
|
}
|
|
3250
3237
|
event.stopPropagation();
|
|
3251
3238
|
if (event.shiftKey && selectedCell) {
|
|
3252
|
-
const rect =
|
|
3239
|
+
const rect = chunkSEJEVNXW_js.computeSelectionRect(
|
|
3253
3240
|
selectedCell.rowIndex,
|
|
3254
3241
|
selectedCell.columnIndex,
|
|
3255
3242
|
rowIndex,
|
|
@@ -3259,7 +3246,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3259
3246
|
options?.onSelectCell?.({
|
|
3260
3247
|
rowIndex: selectedCell.rowIndex,
|
|
3261
3248
|
columnIndex: selectedCell.columnIndex,
|
|
3262
|
-
selectedCells:
|
|
3249
|
+
selectedCells: chunkSEJEVNXW_js.rectToCells(rect)
|
|
3263
3250
|
});
|
|
3264
3251
|
} else {
|
|
3265
3252
|
options?.onSelectCell?.({
|
|
@@ -3320,7 +3307,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3320
3307
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3321
3308
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3322
3309
|
}
|
|
3323
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3310
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkUNIJUD5C_js.translationsEn["pptx.table.title"] });
|
|
3324
3311
|
}
|
|
3325
3312
|
const selectedCell = options?.selectedCell || null;
|
|
3326
3313
|
const isEditable = Boolean(options?.editable);
|
|
@@ -3335,7 +3322,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3335
3322
|
}
|
|
3336
3323
|
const first = selectedCell.selectedCells[0];
|
|
3337
3324
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3338
|
-
return
|
|
3325
|
+
return chunkSEJEVNXW_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3339
3326
|
})();
|
|
3340
3327
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3341
3328
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3357,9 +3344,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3357
3344
|
{
|
|
3358
3345
|
className: "w-full h-full border-collapse table-fixed",
|
|
3359
3346
|
style: {
|
|
3360
|
-
fontFamily:
|
|
3347
|
+
fontFamily: chunkSEJEVNXW_js.DEFAULT_FONT_FAMILY,
|
|
3361
3348
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3362
|
-
...
|
|
3349
|
+
...chunkSEJEVNXW_js.tableContainerCss(tableEl.tableData)
|
|
3363
3350
|
},
|
|
3364
3351
|
children: [
|
|
3365
3352
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3416,7 +3403,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3416
3403
|
color: textStyle.color,
|
|
3417
3404
|
...bandStyle,
|
|
3418
3405
|
...xmlCellStyle,
|
|
3419
|
-
...tdCellOverride ?
|
|
3406
|
+
...tdCellOverride ? chunkSEJEVNXW_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3420
3407
|
...diag ? { position: "relative" } : void 0
|
|
3421
3408
|
};
|
|
3422
3409
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3426,7 +3413,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3426
3413
|
"border px-1 py-0.5 align-top",
|
|
3427
3414
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3428
3415
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3429
|
-
|
|
3416
|
+
chunkSEJEVNXW_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3430
3417
|
),
|
|
3431
3418
|
colSpan,
|
|
3432
3419
|
rowSpan: rSpan,
|
|
@@ -3437,7 +3424,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3437
3424
|
}
|
|
3438
3425
|
event.stopPropagation();
|
|
3439
3426
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3440
|
-
const rect =
|
|
3427
|
+
const rect = chunkSEJEVNXW_js.computeSelectionRect(
|
|
3441
3428
|
selectedCell.rowIndex,
|
|
3442
3429
|
selectedCell.columnIndex,
|
|
3443
3430
|
rowIndex,
|
|
@@ -3447,7 +3434,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3447
3434
|
options?.onSelectCell?.({
|
|
3448
3435
|
rowIndex: selectedCell.rowIndex,
|
|
3449
3436
|
columnIndex: selectedCell.columnIndex,
|
|
3450
|
-
selectedCells:
|
|
3437
|
+
selectedCells: chunkSEJEVNXW_js.rectToCells(rect)
|
|
3451
3438
|
});
|
|
3452
3439
|
} else {
|
|
3453
3440
|
options?.onSelectCell?.({
|
|
@@ -3506,23 +3493,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3506
3493
|
);
|
|
3507
3494
|
}
|
|
3508
3495
|
function partAttrs(part) {
|
|
3509
|
-
return part ?
|
|
3496
|
+
return part ? chunkSEJEVNXW_js.chartPartToAttrs(part) : void 0;
|
|
3510
3497
|
}
|
|
3511
3498
|
function resolveReactPalette(chartData) {
|
|
3512
3499
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3513
3500
|
return chartData.colorPalette;
|
|
3514
3501
|
}
|
|
3515
|
-
return [...
|
|
3502
|
+
return [...chunkSEJEVNXW_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3516
3503
|
}
|
|
3517
3504
|
function buildReactChartViewModel(element) {
|
|
3518
3505
|
if (element.type !== "chart" || !element.chartData) {
|
|
3519
|
-
return
|
|
3506
|
+
return chunkSEJEVNXW_js.buildChartViewModel(element);
|
|
3520
3507
|
}
|
|
3521
3508
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3522
3509
|
...element,
|
|
3523
3510
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3524
3511
|
};
|
|
3525
|
-
return
|
|
3512
|
+
return chunkSEJEVNXW_js.buildChartViewModel(themedElement);
|
|
3526
3513
|
}
|
|
3527
3514
|
function renderPrimitive(prim, key) {
|
|
3528
3515
|
switch (prim.kind) {
|
|
@@ -3671,7 +3658,7 @@ function renderText(t, key) {
|
|
|
3671
3658
|
);
|
|
3672
3659
|
}
|
|
3673
3660
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3674
|
-
const legendItems =
|
|
3661
|
+
const legendItems = chunkSEJEVNXW_js.computeChartLegendLayout(vm);
|
|
3675
3662
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3676
3663
|
"svg",
|
|
3677
3664
|
{
|
|
@@ -3764,17 +3751,17 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3764
3751
|
}
|
|
3765
3752
|
function renderChartElement(element) {
|
|
3766
3753
|
if (element.type !== "chart") {
|
|
3767
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3754
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkUNIJUD5C_js.translationsEn["pptx.chart.heading"] });
|
|
3768
3755
|
}
|
|
3769
3756
|
const chartData = element.chartData;
|
|
3770
3757
|
if (!chartData || chartData.series.length === 0) {
|
|
3771
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3758
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkUNIJUD5C_js.translationsEn["pptx.chart.heading"] });
|
|
3772
3759
|
}
|
|
3773
|
-
const kind =
|
|
3760
|
+
const kind = chunkSEJEVNXW_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3774
3761
|
return renderChartViewModel(
|
|
3775
3762
|
element.id,
|
|
3776
3763
|
buildReactChartViewModel(element),
|
|
3777
|
-
|
|
3764
|
+
chunkSEJEVNXW_js.chartPreserveAspectRatio(kind)
|
|
3778
3765
|
);
|
|
3779
3766
|
}
|
|
3780
3767
|
|
|
@@ -3794,14 +3781,14 @@ function buildNotesPdf(pages) {
|
|
|
3794
3781
|
notes: page.notes,
|
|
3795
3782
|
slideNumber: page.slideNumber
|
|
3796
3783
|
}));
|
|
3797
|
-
const bytes =
|
|
3784
|
+
const bytes = chunkSEJEVNXW_js.buildNotesPdfBytes(images, meta);
|
|
3798
3785
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3799
3786
|
return URL.createObjectURL(blob);
|
|
3800
3787
|
}
|
|
3801
3788
|
|
|
3802
3789
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3803
3790
|
function buildPdfFromImageData(images) {
|
|
3804
|
-
const bytes =
|
|
3791
|
+
const bytes = chunkSEJEVNXW_js.buildSlidesPdfBytes(images);
|
|
3805
3792
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3806
3793
|
return URL.createObjectURL(blob);
|
|
3807
3794
|
}
|
|
@@ -3810,7 +3797,7 @@ function buildPdfFromImageData(images) {
|
|
|
3810
3797
|
var activePreview = null;
|
|
3811
3798
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3812
3799
|
stopPreviewAnimation();
|
|
3813
|
-
const descriptor =
|
|
3800
|
+
const descriptor = chunkSEJEVNXW_js.buildPreviewAnimation(preset, options);
|
|
3814
3801
|
if (!descriptor) {
|
|
3815
3802
|
return;
|
|
3816
3803
|
}
|
|
@@ -3823,7 +3810,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3823
3810
|
return;
|
|
3824
3811
|
}
|
|
3825
3812
|
const stage = domEl.offsetParent;
|
|
3826
|
-
const descriptor =
|
|
3813
|
+
const descriptor = chunkSEJEVNXW_js.buildMotionPathPreview({
|
|
3827
3814
|
path,
|
|
3828
3815
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3829
3816
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|
|
@@ -3917,7 +3904,7 @@ exports.cloneHistorySnapshot = cloneHistorySnapshot2;
|
|
|
3917
3904
|
exports.cn = cn;
|
|
3918
3905
|
exports.getAnimationInitialStyle = getAnimationInitialStyle2;
|
|
3919
3906
|
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
3920
|
-
exports.getCropShapeClipPath =
|
|
3907
|
+
exports.getCropShapeClipPath = getCropShapeClipPath2;
|
|
3921
3908
|
exports.getDuotoneColors = getDuotoneColors;
|
|
3922
3909
|
exports.getImageRenderStyle = getImageRenderStyle;
|
|
3923
3910
|
exports.getImageSurfaceMaskStyle = getImageSurfaceMaskStyle;
|