pptx-react-viewer 3.19.2 → 3.20.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 +35 -0
- package/dist/{AiChatPanel-ZH52BQBE.mjs → AiChatPanel-7AU4A3A7.mjs} +4 -4
- package/dist/AiChatPanel-7AU4A3A7.mjs.br +0 -0
- package/dist/AiChatPanel-7AU4A3A7.mjs.gz +0 -0
- package/dist/{AiChatPanel-KILEXOPT.js → AiChatPanel-FIUTFT55.js} +25 -25
- package/dist/AiChatPanel-FIUTFT55.js.br +0 -0
- package/dist/AiChatPanel-FIUTFT55.js.gz +0 -0
- package/dist/{Area3DChartScene-UHN7ZOZT.mjs → Area3DChartScene-SPRHDMNQ.mjs} +1 -1
- package/dist/{Area3DChartScene-UHN7ZOZT.mjs.br → Area3DChartScene-SPRHDMNQ.mjs.br} +0 -0
- package/dist/Area3DChartScene-SPRHDMNQ.mjs.gz +0 -0
- package/dist/{Area3DChartScene-HS7EBQLQ.js → Area3DChartScene-ZGVLTYDW.js} +2 -2
- package/dist/Area3DChartScene-ZGVLTYDW.js.br +0 -0
- package/dist/Area3DChartScene-ZGVLTYDW.js.gz +0 -0
- package/dist/{Bar3DChartScene-TFGSYASD.mjs → Bar3DChartScene-FJCRJCZV.mjs} +1 -1
- package/dist/{Bar3DChartScene-TFGSYASD.mjs.br → Bar3DChartScene-FJCRJCZV.mjs.br} +0 -0
- package/dist/Bar3DChartScene-FJCRJCZV.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-E57TRVUU.js → Bar3DChartScene-GVIX7ENI.js} +2 -2
- package/dist/Bar3DChartScene-GVIX7ENI.js.br +0 -0
- package/dist/Bar3DChartScene-GVIX7ENI.js.gz +0 -0
- package/dist/{Line3DChartScene-NM7YYLZD.js → Line3DChartScene-6C3WDA42.js} +2 -2
- package/dist/Line3DChartScene-6C3WDA42.js.br +0 -0
- package/dist/Line3DChartScene-6C3WDA42.js.gz +0 -0
- package/dist/{Line3DChartScene-RES5D7W7.mjs → Line3DChartScene-KP4RMVAQ.mjs} +1 -1
- package/dist/{Line3DChartScene-RES5D7W7.mjs.br → Line3DChartScene-KP4RMVAQ.mjs.br} +0 -0
- package/dist/Line3DChartScene-KP4RMVAQ.mjs.gz +0 -0
- package/dist/{Model3DScene-6CWFGE7M.mjs → Model3DScene-SH6ZLOXE.mjs} +1 -1
- package/dist/Model3DScene-SH6ZLOXE.mjs.br +0 -0
- package/dist/Model3DScene-SH6ZLOXE.mjs.gz +0 -0
- package/dist/{Model3DScene-SL3QF63O.js → Model3DScene-SXZYGMN6.js} +2 -2
- package/dist/Model3DScene-SXZYGMN6.js.br +0 -0
- package/dist/Model3DScene-SXZYGMN6.js.gz +0 -0
- package/dist/{PieChart3DScene-QYJUOYMB.mjs → PieChart3DScene-F4IE7565.mjs} +1 -1
- package/dist/{PieChart3DScene-QYJUOYMB.mjs.br → PieChart3DScene-F4IE7565.mjs.br} +0 -0
- package/dist/PieChart3DScene-F4IE7565.mjs.gz +0 -0
- package/dist/{PieChart3DScene-WIVYOQUQ.js → PieChart3DScene-V2Q73UEQ.js} +2 -2
- package/dist/PieChart3DScene-V2Q73UEQ.js.br +0 -0
- package/dist/PieChart3DScene-V2Q73UEQ.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-Y2LF73QQ.mjs → SurfaceChart3DScene-AXLDY5BB.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-Y2LF73QQ.mjs.br → SurfaceChart3DScene-AXLDY5BB.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-AXLDY5BB.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-QCUYYQBZ.js → SurfaceChart3DScene-XUGVYHD2.js} +2 -2
- package/dist/SurfaceChart3DScene-XUGVYHD2.js.br +0 -0
- package/dist/SurfaceChart3DScene-XUGVYHD2.js.gz +0 -0
- package/dist/{chunk-RPPLJQ6R.js → chunk-2BQKGTIF.js} +1571 -1366
- package/dist/chunk-2BQKGTIF.js.br +0 -0
- package/dist/chunk-2BQKGTIF.js.gz +0 -0
- package/dist/{chunk-7XJ7I6TJ.mjs → chunk-F65J67TW.mjs} +7 -3
- package/dist/chunk-F65J67TW.mjs.br +0 -0
- package/dist/chunk-F65J67TW.mjs.gz +0 -0
- package/dist/{chunk-ATKAU2J4.mjs → chunk-GV6LVDBE.mjs} +562 -357
- package/dist/chunk-GV6LVDBE.mjs.br +0 -0
- package/dist/chunk-GV6LVDBE.mjs.gz +0 -0
- package/dist/{chunk-ZUIM5737.js → chunk-HN5QJSVB.js} +514 -172
- package/dist/chunk-HN5QJSVB.js.br +0 -0
- package/dist/chunk-HN5QJSVB.js.gz +0 -0
- package/dist/{chunk-M5BAPEQL.mjs → chunk-JIP6BCRV.mjs} +9 -9
- package/dist/chunk-JIP6BCRV.mjs.br +0 -0
- package/dist/chunk-JIP6BCRV.mjs.gz +0 -0
- package/dist/{chunk-F7VYECOL.js → chunk-K7TAGREH.js} +5 -5
- package/dist/chunk-K7TAGREH.js.br +0 -0
- package/dist/chunk-K7TAGREH.js.gz +0 -0
- package/dist/{chunk-BRJN3ZMG.js → chunk-M24DEOP6.js} +15 -0
- package/dist/chunk-M24DEOP6.js.br +0 -0
- package/dist/chunk-M24DEOP6.js.gz +0 -0
- package/dist/{chunk-2LK3OHAN.js → chunk-ML4MTTPV.js} +796 -796
- package/dist/chunk-ML4MTTPV.js.br +0 -0
- package/dist/chunk-ML4MTTPV.js.gz +0 -0
- package/dist/{chunk-GULL4H2I.mjs → chunk-MWNB4BX5.mjs} +511 -173
- package/dist/chunk-MWNB4BX5.mjs.br +0 -0
- package/dist/chunk-MWNB4BX5.mjs.gz +0 -0
- package/dist/{chunk-NEMPFYZ5.mjs → chunk-OKIHMWGI.mjs} +1 -1
- package/dist/chunk-OKIHMWGI.mjs.br +0 -0
- package/dist/chunk-OKIHMWGI.mjs.gz +0 -0
- package/dist/{chunk-MQUTXOET.mjs → chunk-R664EPDC.mjs} +15 -0
- package/dist/chunk-R664EPDC.mjs.br +0 -0
- package/dist/chunk-R664EPDC.mjs.gz +0 -0
- package/dist/{chunk-YH4ODPSH.js → chunk-U46O2NL5.js} +187 -183
- package/dist/chunk-U46O2NL5.js.br +0 -0
- package/dist/chunk-U46O2NL5.js.gz +0 -0
- package/dist/i18n/de.cjs +15 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +15 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +15 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +15 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +15 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +15 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +15 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +15 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +48 -48
- 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 +4 -4
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +37 -0
- package/dist/internals.js +105 -105
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +37 -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-KILEXOPT.js.br +0 -0
- package/dist/AiChatPanel-KILEXOPT.js.gz +0 -0
- package/dist/AiChatPanel-ZH52BQBE.mjs.br +0 -0
- package/dist/AiChatPanel-ZH52BQBE.mjs.gz +0 -0
- package/dist/Area3DChartScene-HS7EBQLQ.js.br +0 -0
- package/dist/Area3DChartScene-HS7EBQLQ.js.gz +0 -0
- package/dist/Area3DChartScene-UHN7ZOZT.mjs.gz +0 -0
- package/dist/Bar3DChartScene-E57TRVUU.js.br +0 -0
- package/dist/Bar3DChartScene-E57TRVUU.js.gz +0 -0
- package/dist/Bar3DChartScene-TFGSYASD.mjs.gz +0 -0
- package/dist/Line3DChartScene-NM7YYLZD.js.br +0 -0
- package/dist/Line3DChartScene-NM7YYLZD.js.gz +0 -0
- package/dist/Line3DChartScene-RES5D7W7.mjs.gz +0 -0
- package/dist/Model3DScene-6CWFGE7M.mjs.br +0 -0
- package/dist/Model3DScene-6CWFGE7M.mjs.gz +0 -0
- package/dist/Model3DScene-SL3QF63O.js.br +0 -0
- package/dist/Model3DScene-SL3QF63O.js.gz +0 -0
- package/dist/PieChart3DScene-QYJUOYMB.mjs.gz +0 -0
- package/dist/PieChart3DScene-WIVYOQUQ.js.br +0 -0
- package/dist/PieChart3DScene-WIVYOQUQ.js.gz +0 -0
- package/dist/SurfaceChart3DScene-QCUYYQBZ.js.br +0 -0
- package/dist/SurfaceChart3DScene-QCUYYQBZ.js.gz +0 -0
- package/dist/SurfaceChart3DScene-Y2LF73QQ.mjs.gz +0 -0
- package/dist/chunk-2LK3OHAN.js.br +0 -0
- package/dist/chunk-2LK3OHAN.js.gz +0 -0
- package/dist/chunk-7XJ7I6TJ.mjs.br +0 -0
- package/dist/chunk-7XJ7I6TJ.mjs.gz +0 -0
- package/dist/chunk-ATKAU2J4.mjs.br +0 -0
- package/dist/chunk-ATKAU2J4.mjs.gz +0 -0
- package/dist/chunk-BRJN3ZMG.js.br +0 -0
- package/dist/chunk-BRJN3ZMG.js.gz +0 -0
- package/dist/chunk-F7VYECOL.js.br +0 -0
- package/dist/chunk-F7VYECOL.js.gz +0 -0
- package/dist/chunk-GULL4H2I.mjs.br +0 -0
- package/dist/chunk-GULL4H2I.mjs.gz +0 -0
- package/dist/chunk-M5BAPEQL.mjs.br +0 -0
- package/dist/chunk-M5BAPEQL.mjs.gz +0 -0
- package/dist/chunk-MQUTXOET.mjs.br +0 -0
- package/dist/chunk-MQUTXOET.mjs.gz +0 -0
- package/dist/chunk-NEMPFYZ5.mjs.br +0 -0
- package/dist/chunk-NEMPFYZ5.mjs.gz +0 -0
- package/dist/chunk-RPPLJQ6R.js.br +0 -0
- package/dist/chunk-RPPLJQ6R.js.gz +0 -0
- package/dist/chunk-YH4ODPSH.js.br +0 -0
- package/dist/chunk-YH4ODPSH.js.gz +0 -0
- package/dist/chunk-ZUIM5737.js.br +0 -0
- package/dist/chunk-ZUIM5737.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkHN5QJSVB_js = require('./chunk-HN5QJSVB.js');
|
|
4
|
+
var chunkM24DEOP6_js = require('./chunk-M24DEOP6.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React7 = require('react');
|
|
@@ -15,7 +15,7 @@ var React7__default = /*#__PURE__*/_interopDefault(React7);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkHN5QJSVB_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 chunkHN5QJSVB_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 = chunkHN5QJSVB_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 = chunkHN5QJSVB_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 = chunkHN5QJSVB_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 (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
227
227
|
return false;
|
|
228
228
|
}
|
|
229
229
|
const st = getShapeType(element.shapeType);
|
|
@@ -232,18 +232,18 @@ function isConnectorOrLineElement(element) {
|
|
|
232
232
|
|
|
233
233
|
// src/viewer/utils/image-style.ts
|
|
234
234
|
function getImageMaskStyle(element) {
|
|
235
|
-
if (!
|
|
235
|
+
if (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkHN5QJSVB_js.resolveShapeGeometry(element);
|
|
239
239
|
if (geometry.kind === "borderRadius") {
|
|
240
240
|
return { borderRadius: geometry.radius };
|
|
241
241
|
}
|
|
242
242
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
243
243
|
}
|
|
244
244
|
function getImageRenderStyle(element) {
|
|
245
|
-
const fit =
|
|
246
|
-
const counterTransform =
|
|
245
|
+
const fit = chunkHN5QJSVB_js.getImageFitStyle(element);
|
|
246
|
+
const counterTransform = chunkHN5QJSVB_js.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
247
247
|
return {
|
|
248
248
|
// A translated/scaled crop, or a rotWithShape=false counter-transform,
|
|
249
249
|
// must be masked by the stationary wrapper, not by the moving/counter-
|
|
@@ -262,7 +262,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
function getImageSurfaceStyle(element) {
|
|
265
|
-
const fill =
|
|
265
|
+
const fill = chunkHN5QJSVB_js.hasShapeProperties(element) ? chunkHN5QJSVB_js.getComputedFillStyle(element) : void 0;
|
|
266
266
|
return {
|
|
267
267
|
position: "absolute",
|
|
268
268
|
inset: 0,
|
|
@@ -275,13 +275,13 @@ function getImageSurfaceStyle(element) {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
function getCropShapeClipPath2(element) {
|
|
278
|
-
if (!
|
|
278
|
+
if (!chunkHN5QJSVB_js.isImageLikeElement(element)) {
|
|
279
279
|
return void 0;
|
|
280
280
|
}
|
|
281
|
-
return
|
|
281
|
+
return chunkHN5QJSVB_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
282
282
|
}
|
|
283
283
|
function getImageTilingStyle2(element) {
|
|
284
|
-
return
|
|
284
|
+
return chunkHN5QJSVB_js.getImageTilingStyle(element);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -413,7 +413,7 @@ function VideoWithMetadata({
|
|
|
413
413
|
{
|
|
414
414
|
ref: mediaRef,
|
|
415
415
|
className: "w-full h-full pointer-events-auto",
|
|
416
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
416
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkHN5QJSVB_js.getImageFitStyle(element),
|
|
417
417
|
controls: showTransport,
|
|
418
418
|
preload: "metadata",
|
|
419
419
|
playsInline: true,
|
|
@@ -470,7 +470,7 @@ function PresentationMediaController({
|
|
|
470
470
|
const [isMediaPlaying, setIsMediaPlaying] = React7.useState(false);
|
|
471
471
|
const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
|
|
472
472
|
const hideWhenNotPlaying = isPresentationMode && element.hideWhenNotPlaying === true;
|
|
473
|
-
const { volume: playbackVolume, playbackRate } =
|
|
473
|
+
const { volume: playbackVolume, playbackRate } = chunkHN5QJSVB_js.mediaPlaybackAttributes({
|
|
474
474
|
loop: element.loop,
|
|
475
475
|
volume: element.volume,
|
|
476
476
|
playbackSpeed: element.playbackSpeed
|
|
@@ -518,7 +518,7 @@ function PresentationMediaController({
|
|
|
518
518
|
if (!el || !isPresentationMode) {
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
|
-
return
|
|
521
|
+
return chunkHN5QJSVB_js.scheduleMediaTrimAndFade(el, {
|
|
522
522
|
trimStartMs: element.trimStartMs,
|
|
523
523
|
trimEndMs: element.trimEndMs,
|
|
524
524
|
fadeInDuration: element.fadeInDuration,
|
|
@@ -539,7 +539,7 @@ function PresentationMediaController({
|
|
|
539
539
|
}
|
|
540
540
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
541
541
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
542
|
-
if (
|
|
542
|
+
if (chunkHN5QJSVB_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
@@ -584,7 +584,7 @@ function PresentationMediaController({
|
|
|
584
584
|
] });
|
|
585
585
|
}
|
|
586
586
|
function label(key) {
|
|
587
|
-
return key === void 0 ? void 0 :
|
|
587
|
+
return key === void 0 ? void 0 : chunkM24DEOP6_js.translationsEn[key];
|
|
588
588
|
}
|
|
589
589
|
function FallbackIcon({
|
|
590
590
|
paths,
|
|
@@ -620,17 +620,17 @@ function Badge({
|
|
|
620
620
|
"div",
|
|
621
621
|
{
|
|
622
622
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
623
|
-
...{ [
|
|
623
|
+
...{ [chunkHN5QJSVB_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
624
624
|
children: [
|
|
625
625
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
626
626
|
FallbackIcon,
|
|
627
627
|
{
|
|
628
|
-
paths:
|
|
628
|
+
paths: chunkHN5QJSVB_js.mediaFallbackIcon(visual, element.mediaType),
|
|
629
629
|
size: isMissing ? 32 : 48,
|
|
630
630
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
631
631
|
}
|
|
632
632
|
),
|
|
633
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
633
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkHN5QJSVB_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
634
634
|
]
|
|
635
635
|
}
|
|
636
636
|
);
|
|
@@ -647,17 +647,17 @@ function Placeholder({
|
|
|
647
647
|
"div",
|
|
648
648
|
{
|
|
649
649
|
className: `w-full h-full flex flex-col items-center justify-center gap-1 pointer-events-none rounded ${isMissing ? "bg-black/30 border border-dashed border-white/20" : element.mediaType === "audio" ? "bg-black/10" : "bg-black/20"}`,
|
|
650
|
-
...{ [
|
|
650
|
+
...{ [chunkHN5QJSVB_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
651
651
|
children: [
|
|
652
652
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
653
653
|
FallbackIcon,
|
|
654
654
|
{
|
|
655
|
-
paths:
|
|
655
|
+
paths: chunkHN5QJSVB_js.mediaFallbackIcon(visual, element.mediaType),
|
|
656
656
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
657
657
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
658
658
|
}
|
|
659
659
|
),
|
|
660
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
660
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkHN5QJSVB_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
661
661
|
]
|
|
662
662
|
}
|
|
663
663
|
);
|
|
@@ -667,7 +667,7 @@ function renderMediaFallback({
|
|
|
667
667
|
posterUrl,
|
|
668
668
|
surface
|
|
669
669
|
}) {
|
|
670
|
-
const visual =
|
|
670
|
+
const visual = chunkHN5QJSVB_js.mediaFallbackVisual(surface, {
|
|
671
671
|
hasPoster: Boolean(posterUrl),
|
|
672
672
|
missing: element.mediaMissing === true
|
|
673
673
|
});
|
|
@@ -677,9 +677,9 @@ function renderMediaFallback({
|
|
|
677
677
|
"img",
|
|
678
678
|
{
|
|
679
679
|
src: posterUrl,
|
|
680
|
-
alt: visual.dimPoster ?
|
|
680
|
+
alt: visual.dimPoster ? chunkM24DEOP6_js.translationsEn["pptx.media.posterAlt"] : chunkM24DEOP6_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
681
681
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
682
|
-
style:
|
|
682
|
+
style: chunkHN5QJSVB_js.getImageFitStyle(element)
|
|
683
683
|
}
|
|
684
684
|
),
|
|
685
685
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -689,7 +689,7 @@ function renderMediaFallback({
|
|
|
689
689
|
}
|
|
690
690
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
691
691
|
if (element.type !== "media") {
|
|
692
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
692
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkM24DEOP6_js.translationsEn["pptx.media.title"] });
|
|
693
693
|
}
|
|
694
694
|
const mediaType = element.mediaType;
|
|
695
695
|
const mediaPath = element.mediaPath;
|
|
@@ -697,7 +697,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
697
697
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
698
698
|
const trimFragment = buildTrimFragment(element);
|
|
699
699
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
700
|
-
const shouldLoop =
|
|
700
|
+
const shouldLoop = chunkHN5QJSVB_js.mediaPlaybackAttributes(element).loop;
|
|
701
701
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
702
702
|
const isFullScreen = options?.fullScreen === true;
|
|
703
703
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -775,25 +775,25 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
775
775
|
if (surface.presenting || surface.preview) {
|
|
776
776
|
return null;
|
|
777
777
|
}
|
|
778
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
778
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkM24DEOP6_js.translationsEn["pptx.media.title"] });
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
// src/viewer/utils/text-utils.tsx
|
|
782
782
|
function getTextStyleForElement(element, fallbackColor) {
|
|
783
|
-
return
|
|
783
|
+
return chunkHN5QJSVB_js.buildTextBlockStyle(element, { fallbackColor });
|
|
784
784
|
}
|
|
785
785
|
|
|
786
786
|
// src/viewer/utils/text-layout.tsx
|
|
787
787
|
function getTextLayoutStyle(element) {
|
|
788
|
-
if (!
|
|
788
|
+
if (!chunkHN5QJSVB_js.hasTextProperties(element)) {
|
|
789
789
|
return {};
|
|
790
790
|
}
|
|
791
|
-
const writingMode =
|
|
792
|
-
const textOrientation =
|
|
793
|
-
const verticalDirection =
|
|
791
|
+
const writingMode = chunkHN5QJSVB_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
792
|
+
const textOrientation = chunkHN5QJSVB_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
793
|
+
const verticalDirection = chunkHN5QJSVB_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
794
794
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
795
795
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
796
|
-
const hasParagraphIndents =
|
|
796
|
+
const hasParagraphIndents = chunkHN5QJSVB_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
797
797
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
798
798
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
799
799
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -802,7 +802,7 @@ function getTextLayoutStyle(element) {
|
|
|
802
802
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
803
803
|
return {
|
|
804
804
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
805
|
-
...
|
|
805
|
+
...chunkHN5QJSVB_js.buildTextBodyLayoutStyle(element),
|
|
806
806
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
807
807
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
808
808
|
paddingTop: bodyTop,
|
|
@@ -830,7 +830,7 @@ function getTextLayoutStyle(element) {
|
|
|
830
830
|
|
|
831
831
|
// src/viewer/utils/text-effects.tsx
|
|
832
832
|
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
833
|
-
return
|
|
833
|
+
return chunkHN5QJSVB_js.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1015,13 +1015,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1015
1015
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1016
1016
|
return renderedSegments;
|
|
1017
1017
|
}
|
|
1018
|
-
const paraKey = `${elementId}${
|
|
1018
|
+
const paraKey = `${elementId}${chunkHN5QJSVB_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1019
1019
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1020
1020
|
if (paraState) {
|
|
1021
1021
|
const style = buildAnimStyle(paraState);
|
|
1022
1022
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1023
1023
|
}
|
|
1024
|
-
const spec =
|
|
1024
|
+
const spec = chunkHN5QJSVB_js.buildTextBuildSpec(
|
|
1025
1025
|
elementId,
|
|
1026
1026
|
paraIndex,
|
|
1027
1027
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1039,7 +1039,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1039
1039
|
"span",
|
|
1040
1040
|
{
|
|
1041
1041
|
"data-anim-id": span.animId,
|
|
1042
|
-
style:
|
|
1042
|
+
style: chunkHN5QJSVB_js.textBuildSpanStyle(span),
|
|
1043
1043
|
children: content
|
|
1044
1044
|
},
|
|
1045
1045
|
span.animId
|
|
@@ -1050,13 +1050,13 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1050
1050
|
if (!isUnderlineWords || !text) {
|
|
1051
1051
|
return inner(text, keyPrefix, metric);
|
|
1052
1052
|
}
|
|
1053
|
-
const pieces =
|
|
1053
|
+
const pieces = chunkHN5QJSVB_js.splitWordsForUnderline(text);
|
|
1054
1054
|
if (pieces.length === 0) {
|
|
1055
1055
|
return inner(text, keyPrefix, metric);
|
|
1056
1056
|
}
|
|
1057
1057
|
const gapMetric = metric ? {
|
|
1058
1058
|
...metric,
|
|
1059
|
-
nestedStyle: metric.nestedStyle ?
|
|
1059
|
+
nestedStyle: metric.nestedStyle ? chunkHN5QJSVB_js.stripUnderlineDecoration(metric.nestedStyle) : void 0
|
|
1060
1060
|
} : void 0;
|
|
1061
1061
|
return pieces.map((piece, i) => {
|
|
1062
1062
|
const key = `${keyPrefix}-u${i}`;
|
|
@@ -1089,7 +1089,7 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1089
1089
|
);
|
|
1090
1090
|
}
|
|
1091
1091
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1092
|
-
const [lineLayout] =
|
|
1092
|
+
const [lineLayout] = chunkHN5QJSVB_js.buildRunTabLines(
|
|
1093
1093
|
line,
|
|
1094
1094
|
ctx,
|
|
1095
1095
|
nestedStyle,
|
|
@@ -1108,7 +1108,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1108
1108
|
if (!needsScriptFonts || !text) {
|
|
1109
1109
|
return text;
|
|
1110
1110
|
}
|
|
1111
|
-
const pieces =
|
|
1111
|
+
const pieces = chunkHN5QJSVB_js.splitRunByScriptFont(
|
|
1112
1112
|
text,
|
|
1113
1113
|
scriptFonts,
|
|
1114
1114
|
baseFontFamily,
|
|
@@ -1125,7 +1125,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1125
1125
|
if (!metric || !text) {
|
|
1126
1126
|
return inner(text, keyPrefix);
|
|
1127
1127
|
}
|
|
1128
|
-
const pieces =
|
|
1128
|
+
const pieces = chunkHN5QJSVB_js.splitRunForMetrics(text, metric.font);
|
|
1129
1129
|
if (pieces.length <= 1) {
|
|
1130
1130
|
return inner(text, keyPrefix);
|
|
1131
1131
|
}
|
|
@@ -1134,7 +1134,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1134
1134
|
{
|
|
1135
1135
|
style: {
|
|
1136
1136
|
...metric.nestedStyle,
|
|
1137
|
-
letterSpacing:
|
|
1137
|
+
letterSpacing: chunkHN5QJSVB_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1138
1138
|
},
|
|
1139
1139
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1140
1140
|
},
|
|
@@ -1210,8 +1210,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1210
1210
|
});
|
|
1211
1211
|
}
|
|
1212
1212
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1213
|
-
const mathml =
|
|
1214
|
-
const safeMathml = mathml ?
|
|
1213
|
+
const mathml = chunkHN5QJSVB_js.convertOmmlToMathMl(equationXml);
|
|
1214
|
+
const safeMathml = mathml ? chunkHN5QJSVB_js.sanitizeMathMl(mathml) : "";
|
|
1215
1215
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1216
1216
|
"span",
|
|
1217
1217
|
{
|
|
@@ -1221,7 +1221,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1221
1221
|
},
|
|
1222
1222
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1223
1223
|
}
|
|
1224
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1224
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkM24DEOP6_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1225
1225
|
if (equationNumber) {
|
|
1226
1226
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1227
1227
|
"span",
|
|
@@ -1305,13 +1305,17 @@ function renderHyperlink(run, spanNode, key, ctx) {
|
|
|
1305
1305
|
spanNode,
|
|
1306
1306
|
requireCtrlClick && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-0 top-full z-[9999] mt-1 max-w-64 opacity-0 transition-opacity duration-150 group-hover/link:opacity-100", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col rounded border border-border bg-popover px-2.5 py-1.5 shadow-lg", children: [
|
|
1307
1307
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-foreground", children: displayUrl }),
|
|
1308
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 text-[10px] text-muted-foreground", children:
|
|
1308
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 text-[10px] text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(FollowLinkHint, {}) })
|
|
1309
1309
|
] }) })
|
|
1310
1310
|
]
|
|
1311
1311
|
},
|
|
1312
1312
|
`${key}-link`
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
|
+
function FollowLinkHint() {
|
|
1316
|
+
const { t } = reactI18next.useTranslation();
|
|
1317
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: t("pptx.linkTooltip.followLink") });
|
|
1318
|
+
}
|
|
1315
1319
|
function wrapWithTextReflection(run, key, spanNode, spanStyle, baseContent) {
|
|
1316
1320
|
if (!run.reflection) {
|
|
1317
1321
|
return spanNode;
|
|
@@ -1340,7 +1344,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1340
1344
|
const segmentStyle = segment?.style ?? {};
|
|
1341
1345
|
const textValue = run.text;
|
|
1342
1346
|
const lines = textValue.split("\n");
|
|
1343
|
-
const resolvedSegmentColor =
|
|
1347
|
+
const resolvedSegmentColor = chunkHN5QJSVB_js.normalizeHexColor(
|
|
1344
1348
|
segmentStyle.color || element.textStyle?.color,
|
|
1345
1349
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1346
1350
|
);
|
|
@@ -1348,16 +1352,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1348
1352
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1349
1353
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1350
1354
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1351
|
-
const baseFontSize = rawFontSize *
|
|
1355
|
+
const baseFontSize = rawFontSize * chunkHN5QJSVB_js.resolveAutoFitFontScale(element.textStyle);
|
|
1352
1356
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1353
|
-
const fontKerning =
|
|
1357
|
+
const fontKerning = chunkHN5QJSVB_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1354
1358
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1355
|
-
const baseFontFamily = rawFontFamily ?
|
|
1359
|
+
const baseFontFamily = rawFontFamily ? chunkHN5QJSVB_js.getSubstituteFontFamily(
|
|
1356
1360
|
rawFontFamily,
|
|
1357
|
-
|
|
1361
|
+
chunkHN5QJSVB_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1358
1362
|
) : DEFAULT_FONT_FAMILY2;
|
|
1359
|
-
const scriptFonts =
|
|
1360
|
-
const needsScriptFonts =
|
|
1363
|
+
const scriptFonts = chunkHN5QJSVB_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1364
|
+
const needsScriptFonts = chunkHN5QJSVB_js.hasDistinctScriptFonts(scriptFonts);
|
|
1361
1365
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1362
1366
|
const metricFont = {
|
|
1363
1367
|
fontFamily: baseFontFamily,
|
|
@@ -1365,7 +1369,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1365
1369
|
bold: Boolean(segmentStyle.bold),
|
|
1366
1370
|
italic: Boolean(segmentStyle.italic)
|
|
1367
1371
|
};
|
|
1368
|
-
const nestedStyle =
|
|
1372
|
+
const nestedStyle = chunkHN5QJSVB_js.nestedTextDecorationStyle(run.style);
|
|
1369
1373
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1370
1374
|
const spanStyle = { ...run.style };
|
|
1371
1375
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1373,11 +1377,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1373
1377
|
spanStyle.fontFamily = baseFontFamily;
|
|
1374
1378
|
spanStyle.verticalAlign = baselineShift;
|
|
1375
1379
|
spanStyle.fontKerning = fontKerning;
|
|
1376
|
-
spanStyle.letterSpacing =
|
|
1380
|
+
spanStyle.letterSpacing = chunkHN5QJSVB_js.pieceLetterSpacing(
|
|
1377
1381
|
authoredLetterSpacing,
|
|
1378
|
-
|
|
1382
|
+
chunkHN5QJSVB_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1379
1383
|
);
|
|
1380
|
-
const hollow =
|
|
1384
|
+
const hollow = chunkHN5QJSVB_js.hollowTextFillStyle(segmentStyle, {
|
|
1381
1385
|
color: resolvedSegmentColor,
|
|
1382
1386
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1383
1387
|
});
|
|
@@ -1392,7 +1396,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1392
1396
|
const isUnderlineWords = Boolean(segmentStyle.underline) && segmentStyle.underlineStyle === "words";
|
|
1393
1397
|
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1394
1398
|
if (isUnderlineWords) {
|
|
1395
|
-
const stripped =
|
|
1399
|
+
const stripped = chunkHN5QJSVB_js.stripUnderlineDecoration(spanStyle);
|
|
1396
1400
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
1397
1401
|
delete spanStyle.textDecorationStyle;
|
|
1398
1402
|
delete spanStyle.textDecorationThickness;
|
|
@@ -1408,7 +1412,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1408
1412
|
scriptFonts,
|
|
1409
1413
|
baseFontFamily,
|
|
1410
1414
|
findHighlights,
|
|
1411
|
-
|
|
1415
|
+
chunkHN5QJSVB_js.buildTabContext(
|
|
1412
1416
|
element.textStyle?.tabStops,
|
|
1413
1417
|
element.textStyle?.defaultTabSize,
|
|
1414
1418
|
baseFontSize,
|
|
@@ -1440,14 +1444,14 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1440
1444
|
const segment = sourceRun ? segments[seed.segmentIndex] : { text: seed.text, style: seed.style };
|
|
1441
1445
|
const resolvedSegment = {
|
|
1442
1446
|
...segment,
|
|
1443
|
-
style:
|
|
1447
|
+
style: chunkHN5QJSVB_js.withInlineListDecorationDefaults(segment.style, context.element.textStyle)
|
|
1444
1448
|
};
|
|
1445
|
-
const decorationCss =
|
|
1449
|
+
const decorationCss = chunkHN5QJSVB_js.segmentStyleToCss(
|
|
1446
1450
|
resolvedSegment,
|
|
1447
|
-
|
|
1451
|
+
chunkHN5QJSVB_js.resolveAutoFitFontScale(context.element.textStyle)
|
|
1448
1452
|
);
|
|
1449
|
-
|
|
1450
|
-
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...
|
|
1453
|
+
chunkHN5QJSVB_js.applyUnderlineVariant(decorationCss, resolvedSegment);
|
|
1454
|
+
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...chunkHN5QJSVB_js.nestedTextDecorationStyle(decorationCss) } } : {
|
|
1451
1455
|
text: seed.text,
|
|
1452
1456
|
style: decorationCss,
|
|
1453
1457
|
segmentIndex: seed.segmentIndex
|
|
@@ -1462,7 +1466,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1462
1466
|
});
|
|
1463
1467
|
}
|
|
1464
1468
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1465
|
-
if (!
|
|
1469
|
+
if (!chunkHN5QJSVB_js.hasTextProperties(element)) {
|
|
1466
1470
|
return emptyFallback || null;
|
|
1467
1471
|
}
|
|
1468
1472
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1472,7 +1476,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1472
1476
|
}
|
|
1473
1477
|
return element.text || emptyFallback || "";
|
|
1474
1478
|
}
|
|
1475
|
-
const paragraphs =
|
|
1479
|
+
const paragraphs = chunkHN5QJSVB_js.buildParagraphs(
|
|
1476
1480
|
element,
|
|
1477
1481
|
fieldContext,
|
|
1478
1482
|
segmentOverrides,
|
|
@@ -1618,13 +1622,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1618
1622
|
);
|
|
1619
1623
|
}
|
|
1620
1624
|
function getDuotoneColors(element) {
|
|
1621
|
-
if (!
|
|
1625
|
+
if (!chunkHN5QJSVB_js.isImageLikeElement(element)) {
|
|
1622
1626
|
return void 0;
|
|
1623
1627
|
}
|
|
1624
1628
|
return element.imageEffects?.duotone;
|
|
1625
1629
|
}
|
|
1626
1630
|
function buildLineShadowCss(element) {
|
|
1627
|
-
if (!
|
|
1631
|
+
if (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
1628
1632
|
return void 0;
|
|
1629
1633
|
}
|
|
1630
1634
|
const ss = element.shapeStyle;
|
|
@@ -1635,13 +1639,13 @@ function buildLineShadowCss(element) {
|
|
|
1635
1639
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1636
1640
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1637
1641
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1638
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1639
|
-
|
|
1642
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkHN5QJSVB_js.colorWithOpacity(
|
|
1643
|
+
chunkHN5QJSVB_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1640
1644
|
opacity
|
|
1641
1645
|
)}`;
|
|
1642
1646
|
}
|
|
1643
1647
|
function buildLineGlowFilter(element) {
|
|
1644
|
-
if (!
|
|
1648
|
+
if (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
1645
1649
|
return void 0;
|
|
1646
1650
|
}
|
|
1647
1651
|
const ss = element.shapeStyle;
|
|
@@ -1650,22 +1654,22 @@ function buildLineGlowFilter(element) {
|
|
|
1650
1654
|
}
|
|
1651
1655
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1652
1656
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1653
|
-
const glowCol =
|
|
1657
|
+
const glowCol = chunkHN5QJSVB_js.colorWithOpacity(chunkHN5QJSVB_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1654
1658
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1655
1659
|
}
|
|
1656
1660
|
function getDagDuotoneFilterId(elementId) {
|
|
1657
1661
|
return `dag-duotone-${elementId}`;
|
|
1658
1662
|
}
|
|
1659
1663
|
function hasDagDuotoneEffect(element) {
|
|
1660
|
-
if (!
|
|
1664
|
+
if (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
1661
1665
|
return false;
|
|
1662
1666
|
}
|
|
1663
1667
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1664
1668
|
}
|
|
1665
1669
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1666
1670
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1667
|
-
const c1 =
|
|
1668
|
-
const c2 =
|
|
1671
|
+
const c1 = chunkHN5QJSVB_js.hexToRgbUnit(color1);
|
|
1672
|
+
const c2 = chunkHN5QJSVB_js.hexToRgbUnit(color2);
|
|
1669
1673
|
const grayscaleMatrix = [
|
|
1670
1674
|
0.2126,
|
|
1671
1675
|
0.7152,
|
|
@@ -1709,7 +1713,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1709
1713
|
|
|
1710
1714
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1711
1715
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1712
|
-
return
|
|
1716
|
+
return chunkHN5QJSVB_js.build3DExtrusionData(
|
|
1713
1717
|
shape3d,
|
|
1714
1718
|
scene3d,
|
|
1715
1719
|
fillColor,
|
|
@@ -1718,7 +1722,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1718
1722
|
);
|
|
1719
1723
|
}
|
|
1720
1724
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1721
|
-
|
|
1725
|
+
chunkHN5QJSVB_js.apply3dEffects(
|
|
1722
1726
|
base,
|
|
1723
1727
|
scene3d,
|
|
1724
1728
|
shape3d,
|
|
@@ -1733,11 +1737,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1733
1737
|
return (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
|
|
1734
1738
|
}
|
|
1735
1739
|
function rendersWedgeCalloutVector(element) {
|
|
1736
|
-
return element.type === "shape" &&
|
|
1740
|
+
return element.type === "shape" && chunkHN5QJSVB_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1737
1741
|
}
|
|
1738
1742
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1739
1743
|
if (element.type === "group") {
|
|
1740
|
-
const fx2 =
|
|
1744
|
+
const fx2 = chunkHN5QJSVB_js.getComputedEffectStyle(element);
|
|
1741
1745
|
const groupStyle = {};
|
|
1742
1746
|
if (fx2.filter) {
|
|
1743
1747
|
groupStyle.filter = fx2.filter;
|
|
@@ -1747,13 +1751,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1747
1751
|
}
|
|
1748
1752
|
return groupStyle;
|
|
1749
1753
|
}
|
|
1750
|
-
if (!
|
|
1754
|
+
if (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
1751
1755
|
return {};
|
|
1752
1756
|
}
|
|
1753
1757
|
const ss = element.shapeStyle;
|
|
1754
|
-
const fill = animatesFill ? void 0 :
|
|
1755
|
-
const fx =
|
|
1756
|
-
const stroke =
|
|
1758
|
+
const fill = animatesFill ? void 0 : chunkHN5QJSVB_js.getComputedFillStyle(element, parentGroupFill);
|
|
1759
|
+
const fx = chunkHN5QJSVB_js.getComputedEffectStyle(element);
|
|
1760
|
+
const stroke = chunkHN5QJSVB_js.getComputedStrokeStyle(element);
|
|
1757
1761
|
const base = {
|
|
1758
1762
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1759
1763
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1792,7 +1796,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1792
1796
|
};
|
|
1793
1797
|
Object.assign(
|
|
1794
1798
|
base,
|
|
1795
|
-
|
|
1799
|
+
chunkHN5QJSVB_js.getAnimationColorBaseStyle(element, {
|
|
1796
1800
|
animatesFill,
|
|
1797
1801
|
animatesStroke,
|
|
1798
1802
|
parentGroupFill
|
|
@@ -1814,7 +1818,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1814
1818
|
},
|
|
1815
1819
|
element.id
|
|
1816
1820
|
);
|
|
1817
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1821
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkHN5QJSVB_js.isStrokeOnlyPresetElement(element)) {
|
|
1818
1822
|
base.backgroundColor = "transparent";
|
|
1819
1823
|
base.backgroundImage = void 0;
|
|
1820
1824
|
base.borderWidth = void 0;
|
|
@@ -1828,7 +1832,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1828
1832
|
if (rendersWedgeCalloutVector(element)) {
|
|
1829
1833
|
return base;
|
|
1830
1834
|
}
|
|
1831
|
-
const geometry =
|
|
1835
|
+
const geometry = chunkHN5QJSVB_js.resolveShapeGeometry(element);
|
|
1832
1836
|
switch (geometry.kind) {
|
|
1833
1837
|
case "bare":
|
|
1834
1838
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1852,7 +1856,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1852
1856
|
}
|
|
1853
1857
|
}
|
|
1854
1858
|
function getConnectorPathGeometry2(element) {
|
|
1855
|
-
return
|
|
1859
|
+
return chunkHN5QJSVB_js.getConnectorPathGeometry(element);
|
|
1856
1860
|
}
|
|
1857
1861
|
var ARROW_SIZE_SCALE = {
|
|
1858
1862
|
sm: 0.6,
|
|
@@ -1921,11 +1925,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1921
1925
|
strokePaint,
|
|
1922
1926
|
strokeWidth,
|
|
1923
1927
|
dashArray,
|
|
1924
|
-
lineCap:
|
|
1928
|
+
lineCap: chunkHN5QJSVB_js.svgLineCap(shapeStyle?.lineCap),
|
|
1925
1929
|
lineJoin,
|
|
1926
1930
|
miterLimit,
|
|
1927
|
-
offsets:
|
|
1928
|
-
widths:
|
|
1931
|
+
offsets: chunkHN5QJSVB_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1932
|
+
widths: chunkHN5QJSVB_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1929
1933
|
};
|
|
1930
1934
|
}
|
|
1931
1935
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -1948,12 +1952,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1948
1952
|
}
|
|
1949
1953
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1950
1954
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1951
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1955
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkHN5QJSVB_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
1952
1956
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
1953
|
-
const gradientPaint = gradient ?
|
|
1957
|
+
const gradientPaint = gradient ? chunkHN5QJSVB_js.svgGradientFillRef(gradient) : void 0;
|
|
1954
1958
|
const nodes = [];
|
|
1955
1959
|
if (subpaths && needsPerSubpath) {
|
|
1956
|
-
const paints =
|
|
1960
|
+
const paints = chunkHN5QJSVB_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
1957
1961
|
paints.forEach((paint, idx) => {
|
|
1958
1962
|
if (paint.fill !== "none") {
|
|
1959
1963
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -1982,7 +1986,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
1982
1986
|
"path",
|
|
1983
1987
|
{
|
|
1984
1988
|
d: pathData,
|
|
1985
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
1989
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkHN5QJSVB_js.colorWithOpacity(fillColor, fillOpacity),
|
|
1986
1990
|
stroke: "none",
|
|
1987
1991
|
vectorEffect: "non-scaling-stroke"
|
|
1988
1992
|
},
|
|
@@ -2008,14 +2012,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2008
2012
|
);
|
|
2009
2013
|
}
|
|
2010
2014
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2011
|
-
if (!
|
|
2015
|
+
if (!chunkHN5QJSVB_js.hasShapeProperties(element)) {
|
|
2012
2016
|
return null;
|
|
2013
2017
|
}
|
|
2014
2018
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2015
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2016
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2017
|
-
const dashType =
|
|
2018
|
-
const dashArray =
|
|
2019
|
+
const fillPaint = animatesFill ? "inherit" : chunkHN5QJSVB_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2020
|
+
const strokePaint = animatesStroke ? "inherit" : chunkHN5QJSVB_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2021
|
+
const dashType = chunkHN5QJSVB_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2022
|
+
const dashArray = chunkHN5QJSVB_js.getSvgStrokeDasharray(
|
|
2019
2023
|
dashType,
|
|
2020
2024
|
Math.max(strokeWidth, 1),
|
|
2021
2025
|
element.shapeStyle?.customDashSegments
|
|
@@ -2096,13 +2100,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2096
2100
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2097
2101
|
// without this the shape fell back to the parser's representative solid
|
|
2098
2102
|
// and lost every fade (issue #132).
|
|
2099
|
-
|
|
2103
|
+
chunkHN5QJSVB_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2100
2104
|
);
|
|
2101
2105
|
}
|
|
2102
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2106
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkHN5QJSVB_js.buildStrokeOutline(element)) {
|
|
2103
2107
|
const width = Math.max(element.width, 1);
|
|
2104
2108
|
const height = Math.max(element.height, 1);
|
|
2105
|
-
const geometry =
|
|
2109
|
+
const geometry = chunkHN5QJSVB_js.getPresetShapeVectorGeometry(
|
|
2106
2110
|
element.shapeType || "rect",
|
|
2107
2111
|
width,
|
|
2108
2112
|
height,
|
|
@@ -2130,18 +2134,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2130
2134
|
);
|
|
2131
2135
|
}
|
|
2132
2136
|
}
|
|
2133
|
-
if (element.type === "shape" &&
|
|
2137
|
+
if (element.type === "shape" && chunkHN5QJSVB_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2134
2138
|
const width = Math.max(element.width, 1);
|
|
2135
2139
|
const height = Math.max(element.height, 1);
|
|
2136
|
-
const geometry =
|
|
2140
|
+
const geometry = chunkHN5QJSVB_js.getPresetShapeVectorGeometry(
|
|
2137
2141
|
element.shapeType,
|
|
2138
2142
|
width,
|
|
2139
2143
|
height,
|
|
2140
2144
|
element.shapeAdjustments
|
|
2141
2145
|
);
|
|
2142
2146
|
if (geometry) {
|
|
2143
|
-
const gradient =
|
|
2144
|
-
const gradientPaint = gradient ?
|
|
2147
|
+
const gradient = chunkHN5QJSVB_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2148
|
+
const gradientPaint = gradient ? chunkHN5QJSVB_js.svgGradientFillRef(gradient) : void 0;
|
|
2145
2149
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2146
2150
|
"svg",
|
|
2147
2151
|
{
|
|
@@ -2174,18 +2178,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2174
2178
|
);
|
|
2175
2179
|
}
|
|
2176
2180
|
}
|
|
2177
|
-
if (
|
|
2181
|
+
if (chunkHN5QJSVB_js.isCalloutShape(normalizedType)) {
|
|
2178
2182
|
const width = Math.max(element.width, 1);
|
|
2179
2183
|
const height = Math.max(element.height, 1);
|
|
2180
|
-
const geometry =
|
|
2184
|
+
const geometry = chunkHN5QJSVB_js.getCalloutLeaderLineGeometry(
|
|
2181
2185
|
normalizedType,
|
|
2182
2186
|
width,
|
|
2183
2187
|
height,
|
|
2184
2188
|
element.shapeAdjustments
|
|
2185
2189
|
);
|
|
2186
2190
|
if (geometry && geometry.points.length >= 2) {
|
|
2187
|
-
const leaderPath =
|
|
2188
|
-
const bounds =
|
|
2191
|
+
const leaderPath = chunkHN5QJSVB_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2192
|
+
const bounds = chunkHN5QJSVB_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2189
2193
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2190
2194
|
const offsetLeft = bounds.minX;
|
|
2191
2195
|
const offsetTop = bounds.minY;
|
|
@@ -2248,10 +2252,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2248
2252
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2249
2253
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2250
2254
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2251
|
-
const connectorLineCap =
|
|
2255
|
+
const connectorLineCap = chunkHN5QJSVB_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2252
2256
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2253
|
-
const offsets =
|
|
2254
|
-
const widths =
|
|
2257
|
+
const offsets = chunkHN5QJSVB_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2258
|
+
const widths = chunkHN5QJSVB_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2255
2259
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2256
2260
|
"svg",
|
|
2257
2261
|
{
|
|
@@ -2318,15 +2322,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2318
2322
|
}
|
|
2319
2323
|
const rawStops = stops.map((gs) => {
|
|
2320
2324
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2321
|
-
const color =
|
|
2322
|
-
const opacity =
|
|
2325
|
+
const color = chunkHN5QJSVB_js.parseDrawingColor(gs) ?? "#888888";
|
|
2326
|
+
const opacity = chunkHN5QJSVB_js.parseDrawingColorOpacity(gs);
|
|
2323
2327
|
return { position: pos, color, opacity };
|
|
2324
2328
|
}).sort((a, b) => a.position - b.position);
|
|
2325
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2329
|
+
const stopStrings = rawStops.map((s) => `${chunkHN5QJSVB_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2326
2330
|
const lin = gradFill["a:lin"];
|
|
2327
2331
|
if (lin) {
|
|
2328
2332
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2329
|
-
const angleDeg = Math.round(
|
|
2333
|
+
const angleDeg = Math.round(chunkHN5QJSVB_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2330
2334
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2331
2335
|
}
|
|
2332
2336
|
const path = gradFill["a:path"];
|
|
@@ -2340,7 +2344,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2340
2344
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2341
2345
|
} : void 0;
|
|
2342
2346
|
if (pathType === "rect") {
|
|
2343
|
-
return
|
|
2347
|
+
return chunkHN5QJSVB_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2344
2348
|
}
|
|
2345
2349
|
let cx = 50;
|
|
2346
2350
|
let cy = 50;
|
|
@@ -2362,8 +2366,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2362
2366
|
if (!pattFill) {
|
|
2363
2367
|
return void 0;
|
|
2364
2368
|
}
|
|
2365
|
-
const fgColor =
|
|
2366
|
-
const bgColor =
|
|
2369
|
+
const fgColor = chunkHN5QJSVB_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2370
|
+
const bgColor = chunkHN5QJSVB_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2367
2371
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2368
2372
|
switch (preset) {
|
|
2369
2373
|
case "ltHorz":
|
|
@@ -2474,11 +2478,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2474
2478
|
const prstDash = ln["a:prstDash"];
|
|
2475
2479
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2476
2480
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2477
|
-
const color =
|
|
2481
|
+
const color = chunkHN5QJSVB_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2478
2482
|
if (color) {
|
|
2479
|
-
const opacity =
|
|
2483
|
+
const opacity = chunkHN5QJSVB_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2480
2484
|
const key = `${edge.prefix}`;
|
|
2481
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2485
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkHN5QJSVB_js.colorWithOpacity(color, opacity)}`;
|
|
2482
2486
|
}
|
|
2483
2487
|
}
|
|
2484
2488
|
return borderStyle;
|
|
@@ -2491,7 +2495,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2491
2495
|
const textShadowParts = [];
|
|
2492
2496
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2493
2497
|
if (outerShdw) {
|
|
2494
|
-
const shdwColor =
|
|
2498
|
+
const shdwColor = chunkHN5QJSVB_js.parseDrawingColor(outerShdw);
|
|
2495
2499
|
if (shdwColor) {
|
|
2496
2500
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2497
2501
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2509,7 +2513,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2509
2513
|
}
|
|
2510
2514
|
const glow = effectLst["a:glow"];
|
|
2511
2515
|
if (glow) {
|
|
2512
|
-
const glowColor =
|
|
2516
|
+
const glowColor = chunkHN5QJSVB_js.parseDrawingColor(glow);
|
|
2513
2517
|
if (glowColor) {
|
|
2514
2518
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2515
2519
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2531,11 +2535,11 @@ function extractCellText(cellXml) {
|
|
|
2531
2535
|
const textParts = [];
|
|
2532
2536
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2533
2537
|
runs.forEach((run) => {
|
|
2534
|
-
textParts.push(
|
|
2538
|
+
textParts.push(chunkHN5QJSVB_js.xmlText(run["a:t"]) ?? "");
|
|
2535
2539
|
});
|
|
2536
2540
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2537
2541
|
fields.forEach((field) => {
|
|
2538
|
-
textParts.push(
|
|
2542
|
+
textParts.push(chunkHN5QJSVB_js.xmlText(field["a:t"]) ?? "");
|
|
2539
2543
|
});
|
|
2540
2544
|
paragraphTexts.push(textParts.join(""));
|
|
2541
2545
|
});
|
|
@@ -2579,10 +2583,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2579
2583
|
if (runProps?.["@_u"] !== void 0) {
|
|
2580
2584
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2581
2585
|
}
|
|
2582
|
-
const runColor =
|
|
2586
|
+
const runColor = chunkHN5QJSVB_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkHN5QJSVB_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2583
2587
|
if (runColor) {
|
|
2584
|
-
const opacity =
|
|
2585
|
-
cellStyle.color =
|
|
2588
|
+
const opacity = chunkHN5QJSVB_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2589
|
+
cellStyle.color = chunkHN5QJSVB_js.colorWithOpacity(runColor, opacity);
|
|
2586
2590
|
}
|
|
2587
2591
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2588
2592
|
if (fontFamily) {
|
|
@@ -2592,15 +2596,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2592
2596
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2593
2597
|
}
|
|
2594
2598
|
const cellProperties = cellXml["a:tcPr"];
|
|
2595
|
-
const cellFill =
|
|
2599
|
+
const cellFill = chunkHN5QJSVB_js.parseDrawingColor(
|
|
2596
2600
|
cellProperties?.["a:solidFill"],
|
|
2597
2601
|
schemeColorOverrides
|
|
2598
2602
|
);
|
|
2599
2603
|
if (cellFill) {
|
|
2600
|
-
const opacity =
|
|
2604
|
+
const opacity = chunkHN5QJSVB_js.parseDrawingColorOpacity(
|
|
2601
2605
|
cellProperties?.["a:solidFill"]
|
|
2602
2606
|
);
|
|
2603
|
-
cellStyle.backgroundColor =
|
|
2607
|
+
cellStyle.backgroundColor = chunkHN5QJSVB_js.colorWithOpacity(cellFill, opacity);
|
|
2604
2608
|
} else {
|
|
2605
2609
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2606
2610
|
if (gradCss) {
|
|
@@ -2615,16 +2619,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2615
2619
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2616
2620
|
Object.assign(cellStyle, edgeBorders);
|
|
2617
2621
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2618
|
-
const borderColor =
|
|
2622
|
+
const borderColor = chunkHN5QJSVB_js.parseDrawingColor(
|
|
2619
2623
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2620
2624
|
schemeColorOverrides
|
|
2621
|
-
) ||
|
|
2625
|
+
) || chunkHN5QJSVB_js.parseDrawingColor(
|
|
2622
2626
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2623
2627
|
schemeColorOverrides
|
|
2624
|
-
) ||
|
|
2628
|
+
) || chunkHN5QJSVB_js.parseDrawingColor(
|
|
2625
2629
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2626
2630
|
schemeColorOverrides
|
|
2627
|
-
) ||
|
|
2631
|
+
) || chunkHN5QJSVB_js.parseDrawingColor(
|
|
2628
2632
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2629
2633
|
schemeColorOverrides
|
|
2630
2634
|
);
|
|
@@ -2696,7 +2700,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2696
2700
|
if (element.type !== "table") {
|
|
2697
2701
|
return void 0;
|
|
2698
2702
|
}
|
|
2699
|
-
return
|
|
2703
|
+
return chunkHN5QJSVB_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2700
2704
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2701
2705
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2702
2706
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2776,7 +2780,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2776
2780
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2777
2781
|
"span",
|
|
2778
2782
|
{
|
|
2779
|
-
style: { position: "relative", ...
|
|
2783
|
+
style: { position: "relative", ...chunkHN5QJSVB_js.cellRunStyle(run) },
|
|
2780
2784
|
children: run.text
|
|
2781
2785
|
},
|
|
2782
2786
|
`r-${index}`
|
|
@@ -2784,7 +2788,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2784
2788
|
});
|
|
2785
2789
|
}
|
|
2786
2790
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2787
|
-
return
|
|
2791
|
+
return chunkHN5QJSVB_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2788
2792
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2789
2793
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2790
2794
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2917,7 +2921,7 @@ function TableResizeOverlay({
|
|
|
2917
2921
|
const containerRef = React7.useRef(null);
|
|
2918
2922
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2919
2923
|
const dragRef = React7.useRef(null);
|
|
2920
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2924
|
+
const colBoundaries = React7.useMemo(() => chunkHN5QJSVB_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2921
2925
|
const measureRows = React7.useCallback(() => {
|
|
2922
2926
|
const container = containerRef.current;
|
|
2923
2927
|
if (!container) {
|
|
@@ -2964,11 +2968,11 @@ function TableResizeOverlay({
|
|
|
2964
2968
|
const rect = containerRef.current.getBoundingClientRect();
|
|
2965
2969
|
if (e.clientX !== drag.startPos && drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
2966
2970
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
2967
|
-
onResizeColumns(
|
|
2971
|
+
onResizeColumns(chunkHN5QJSVB_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
2968
2972
|
} else if (e.clientY !== drag.startPos && drag.type === "row" && onResizeRow) {
|
|
2969
2973
|
const deltaY = e.clientY - drag.startPos;
|
|
2970
|
-
const newHeight =
|
|
2971
|
-
drag.initialRowHeight ??
|
|
2974
|
+
const newHeight = chunkHN5QJSVB_js.computeResizedRowHeight(
|
|
2975
|
+
drag.initialRowHeight ?? chunkHN5QJSVB_js.DEFAULT_ROW_HEIGHT,
|
|
2972
2976
|
deltaY
|
|
2973
2977
|
);
|
|
2974
2978
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3006,7 +3010,7 @@ function TableResizeOverlay({
|
|
|
3006
3010
|
e.stopPropagation();
|
|
3007
3011
|
const table = containerRef.current?.querySelector("table");
|
|
3008
3012
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3009
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3013
|
+
const actualHeight = tr?.offsetHeight ?? chunkHN5QJSVB_js.DEFAULT_ROW_HEIGHT;
|
|
3010
3014
|
document.body.style.cursor = "row-resize";
|
|
3011
3015
|
document.body.style.userSelect = "none";
|
|
3012
3016
|
dragRef.current = {
|
|
@@ -3046,14 +3050,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3046
3050
|
const rowCount = tableData.rows.length;
|
|
3047
3051
|
const columnCount = tableData.columnWidths.length;
|
|
3048
3052
|
const selectedCell = options?.selectedCell || null;
|
|
3049
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3053
|
+
const isEditable = Boolean(options?.editable) && chunkHN5QJSVB_js.canDrillDown(element);
|
|
3050
3054
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3051
3055
|
const sharedCtx = {
|
|
3052
3056
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3053
3057
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3054
3058
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3055
3059
|
};
|
|
3056
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3060
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkHN5QJSVB_js.tableCellCss(
|
|
3057
3061
|
tableData,
|
|
3058
3062
|
cell,
|
|
3059
3063
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3066,7 +3070,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3066
3070
|
}
|
|
3067
3071
|
const first = selectedCell.selectedCells[0];
|
|
3068
3072
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3069
|
-
return
|
|
3073
|
+
return chunkHN5QJSVB_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3070
3074
|
})();
|
|
3071
3075
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3072
3076
|
TableResizeOverlay,
|
|
@@ -3087,9 +3091,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3087
3091
|
{
|
|
3088
3092
|
className: "w-full h-full border-collapse table-fixed",
|
|
3089
3093
|
style: {
|
|
3090
|
-
fontFamily:
|
|
3094
|
+
fontFamily: chunkHN5QJSVB_js.DEFAULT_FONT_FAMILY,
|
|
3091
3095
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3092
|
-
...
|
|
3096
|
+
...chunkHN5QJSVB_js.tableContainerCss(tableData)
|
|
3093
3097
|
},
|
|
3094
3098
|
children: [
|
|
3095
3099
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3108,7 +3112,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3108
3112
|
return null;
|
|
3109
3113
|
}
|
|
3110
3114
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3111
|
-
const isInMultiSelection =
|
|
3115
|
+
const isInMultiSelection = chunkHN5QJSVB_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3112
3116
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3113
3117
|
const diag = getCellDiagonalBorders2(
|
|
3114
3118
|
cell.style,
|
|
@@ -3137,7 +3141,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3137
3141
|
}
|
|
3138
3142
|
event.stopPropagation();
|
|
3139
3143
|
if (event.shiftKey && selectedCell) {
|
|
3140
|
-
const rect =
|
|
3144
|
+
const rect = chunkHN5QJSVB_js.computeSelectionRect(
|
|
3141
3145
|
selectedCell.rowIndex,
|
|
3142
3146
|
selectedCell.columnIndex,
|
|
3143
3147
|
rowIndex,
|
|
@@ -3147,7 +3151,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3147
3151
|
options?.onSelectCell?.({
|
|
3148
3152
|
rowIndex: selectedCell.rowIndex,
|
|
3149
3153
|
columnIndex: selectedCell.columnIndex,
|
|
3150
|
-
selectedCells:
|
|
3154
|
+
selectedCells: chunkHN5QJSVB_js.rectToCells(rect)
|
|
3151
3155
|
});
|
|
3152
3156
|
} else {
|
|
3153
3157
|
options?.onSelectCell?.({
|
|
@@ -3208,10 +3212,10 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3208
3212
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3209
3213
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3210
3214
|
}
|
|
3211
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3215
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkM24DEOP6_js.translationsEn["pptx.table.title"] });
|
|
3212
3216
|
}
|
|
3213
3217
|
const selectedCell = options?.selectedCell || null;
|
|
3214
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3218
|
+
const isEditable = Boolean(options?.editable) && chunkHN5QJSVB_js.canDrillDown(element);
|
|
3215
3219
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3216
3220
|
const tableEl = element;
|
|
3217
3221
|
const xmlSelectionRect = (() => {
|
|
@@ -3223,7 +3227,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3223
3227
|
}
|
|
3224
3228
|
const first = selectedCell.selectedCells[0];
|
|
3225
3229
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3226
|
-
return
|
|
3230
|
+
return chunkHN5QJSVB_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3227
3231
|
})();
|
|
3228
3232
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3229
3233
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3245,9 +3249,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3245
3249
|
{
|
|
3246
3250
|
className: "w-full h-full border-collapse table-fixed",
|
|
3247
3251
|
style: {
|
|
3248
|
-
fontFamily:
|
|
3252
|
+
fontFamily: chunkHN5QJSVB_js.DEFAULT_FONT_FAMILY,
|
|
3249
3253
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3250
|
-
...
|
|
3254
|
+
...chunkHN5QJSVB_js.tableContainerCss(tableEl.tableData)
|
|
3251
3255
|
},
|
|
3252
3256
|
children: [
|
|
3253
3257
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3304,7 +3308,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3304
3308
|
color: textStyle.color,
|
|
3305
3309
|
...bandStyle,
|
|
3306
3310
|
...xmlCellStyle,
|
|
3307
|
-
...tdCellOverride ?
|
|
3311
|
+
...tdCellOverride ? chunkHN5QJSVB_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3308
3312
|
...diag ? { position: "relative" } : void 0
|
|
3309
3313
|
};
|
|
3310
3314
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3314,7 +3318,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3314
3318
|
"border px-1 py-0.5 align-top",
|
|
3315
3319
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3316
3320
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3317
|
-
|
|
3321
|
+
chunkHN5QJSVB_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3318
3322
|
),
|
|
3319
3323
|
colSpan,
|
|
3320
3324
|
rowSpan: rSpan,
|
|
@@ -3325,7 +3329,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3325
3329
|
}
|
|
3326
3330
|
event.stopPropagation();
|
|
3327
3331
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3328
|
-
const rect =
|
|
3332
|
+
const rect = chunkHN5QJSVB_js.computeSelectionRect(
|
|
3329
3333
|
selectedCell.rowIndex,
|
|
3330
3334
|
selectedCell.columnIndex,
|
|
3331
3335
|
rowIndex,
|
|
@@ -3335,7 +3339,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3335
3339
|
options?.onSelectCell?.({
|
|
3336
3340
|
rowIndex: selectedCell.rowIndex,
|
|
3337
3341
|
columnIndex: selectedCell.columnIndex,
|
|
3338
|
-
selectedCells:
|
|
3342
|
+
selectedCells: chunkHN5QJSVB_js.rectToCells(rect)
|
|
3339
3343
|
});
|
|
3340
3344
|
} else {
|
|
3341
3345
|
options?.onSelectCell?.({
|
|
@@ -3394,23 +3398,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3394
3398
|
);
|
|
3395
3399
|
}
|
|
3396
3400
|
function partAttrs(part) {
|
|
3397
|
-
return part ?
|
|
3401
|
+
return part ? chunkHN5QJSVB_js.chartPartToAttrs(part) : void 0;
|
|
3398
3402
|
}
|
|
3399
3403
|
function resolveReactPalette(chartData) {
|
|
3400
3404
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3401
3405
|
return chartData.colorPalette;
|
|
3402
3406
|
}
|
|
3403
|
-
return [...
|
|
3407
|
+
return [...chunkHN5QJSVB_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3404
3408
|
}
|
|
3405
3409
|
function buildReactChartViewModel(element) {
|
|
3406
3410
|
if (element.type !== "chart" || !element.chartData) {
|
|
3407
|
-
return
|
|
3411
|
+
return chunkHN5QJSVB_js.buildChartViewModel(element);
|
|
3408
3412
|
}
|
|
3409
3413
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3410
3414
|
...element,
|
|
3411
3415
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3412
3416
|
};
|
|
3413
|
-
return
|
|
3417
|
+
return chunkHN5QJSVB_js.buildChartViewModel(themedElement);
|
|
3414
3418
|
}
|
|
3415
3419
|
function renderPrimitive(prim, key) {
|
|
3416
3420
|
switch (prim.kind) {
|
|
@@ -3561,7 +3565,7 @@ function renderText(t, key) {
|
|
|
3561
3565
|
);
|
|
3562
3566
|
}
|
|
3563
3567
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3564
|
-
const legendItems =
|
|
3568
|
+
const legendItems = chunkHN5QJSVB_js.computeChartLegendLayout(vm);
|
|
3565
3569
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3566
3570
|
"svg",
|
|
3567
3571
|
{
|
|
@@ -3701,17 +3705,17 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3701
3705
|
}
|
|
3702
3706
|
function renderChartElement(element) {
|
|
3703
3707
|
if (element.type !== "chart") {
|
|
3704
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3708
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkM24DEOP6_js.translationsEn["pptx.chart.heading"] });
|
|
3705
3709
|
}
|
|
3706
3710
|
const chartData = element.chartData;
|
|
3707
3711
|
if (!chartData || chartData.series.length === 0) {
|
|
3708
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3712
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkM24DEOP6_js.translationsEn["pptx.chart.heading"] });
|
|
3709
3713
|
}
|
|
3710
|
-
const kind =
|
|
3714
|
+
const kind = chunkHN5QJSVB_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3711
3715
|
return renderChartViewModel(
|
|
3712
3716
|
element.id,
|
|
3713
3717
|
buildReactChartViewModel(element),
|
|
3714
|
-
|
|
3718
|
+
chunkHN5QJSVB_js.chartPreserveAspectRatio(kind)
|
|
3715
3719
|
);
|
|
3716
3720
|
}
|
|
3717
3721
|
|
|
@@ -3731,14 +3735,14 @@ function buildNotesPdf(pages) {
|
|
|
3731
3735
|
notes: page.notes,
|
|
3732
3736
|
slideNumber: page.slideNumber
|
|
3733
3737
|
}));
|
|
3734
|
-
const bytes =
|
|
3738
|
+
const bytes = chunkHN5QJSVB_js.buildNotesPdfBytes(images, meta);
|
|
3735
3739
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3736
3740
|
return URL.createObjectURL(blob);
|
|
3737
3741
|
}
|
|
3738
3742
|
|
|
3739
3743
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3740
3744
|
function buildPdfFromTiledImageData(pages) {
|
|
3741
|
-
const bytes =
|
|
3745
|
+
const bytes = chunkHN5QJSVB_js.buildTiledSlidesPdfBytes(pages);
|
|
3742
3746
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3743
3747
|
return URL.createObjectURL(blob);
|
|
3744
3748
|
}
|
|
@@ -3747,7 +3751,7 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3747
3751
|
var activePreview = null;
|
|
3748
3752
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3749
3753
|
stopPreviewAnimation();
|
|
3750
|
-
const descriptor =
|
|
3754
|
+
const descriptor = chunkHN5QJSVB_js.buildPreviewAnimation(preset, options);
|
|
3751
3755
|
if (!descriptor) {
|
|
3752
3756
|
return;
|
|
3753
3757
|
}
|
|
@@ -3760,7 +3764,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3760
3764
|
return;
|
|
3761
3765
|
}
|
|
3762
3766
|
const stage = domEl.offsetParent;
|
|
3763
|
-
const descriptor =
|
|
3767
|
+
const descriptor = chunkHN5QJSVB_js.buildMotionPathPreview({
|
|
3764
3768
|
path,
|
|
3765
3769
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3766
3770
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|