pptx-react-viewer 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/dist/{AiChatPanel-TKBVSYD2.js → AiChatPanel-3Q4STA5E.js} +29 -28
- package/dist/AiChatPanel-3Q4STA5E.js.br +0 -0
- package/dist/AiChatPanel-3Q4STA5E.js.gz +0 -0
- package/dist/{AiChatPanel-C3E7NLX3.mjs → AiChatPanel-NQZBZIRM.mjs} +9 -8
- package/dist/AiChatPanel-NQZBZIRM.mjs.br +0 -0
- package/dist/AiChatPanel-NQZBZIRM.mjs.gz +0 -0
- package/dist/{Area3DChartScene-7YCFWEGX.mjs → Area3DChartScene-7PARQDOZ.mjs} +1 -1
- package/dist/Area3DChartScene-7PARQDOZ.mjs.br +3 -0
- package/dist/Area3DChartScene-7PARQDOZ.mjs.gz +0 -0
- package/dist/{Area3DChartScene-3A3CXKN3.js → Area3DChartScene-THLG74CM.js} +2 -2
- package/dist/Area3DChartScene-THLG74CM.js.br +0 -0
- package/dist/Area3DChartScene-THLG74CM.js.gz +0 -0
- package/dist/{Bar3DChartScene-BDUENAWJ.js → Bar3DChartScene-OLZ2V56I.js} +2 -2
- package/dist/Bar3DChartScene-OLZ2V56I.js.br +2 -0
- package/dist/Bar3DChartScene-OLZ2V56I.js.gz +0 -0
- package/dist/{Bar3DChartScene-7CNSJ35X.mjs → Bar3DChartScene-QUU6RUXM.mjs} +1 -1
- package/dist/Bar3DChartScene-QUU6RUXM.mjs.br +0 -0
- package/dist/Bar3DChartScene-QUU6RUXM.mjs.gz +0 -0
- package/dist/{Line3DChartScene-R352CZ5U.js → Line3DChartScene-2VZS52IB.js} +2 -2
- package/dist/Line3DChartScene-2VZS52IB.js.br +0 -0
- package/dist/Line3DChartScene-2VZS52IB.js.gz +0 -0
- package/dist/{Line3DChartScene-SMTHK6MD.mjs → Line3DChartScene-D77ORA4K.mjs} +1 -1
- package/dist/Line3DChartScene-D77ORA4K.mjs.br +3 -0
- package/dist/Line3DChartScene-D77ORA4K.mjs.gz +0 -0
- package/dist/{Model3DScene-Y4SGFQYW.js → Model3DScene-3WCALTXO.js} +2 -2
- package/dist/Model3DScene-3WCALTXO.js.br +0 -0
- package/dist/Model3DScene-3WCALTXO.js.gz +0 -0
- package/dist/{Model3DScene-AUVJXXPV.mjs → Model3DScene-ZEGWNILH.mjs} +1 -1
- package/dist/Model3DScene-ZEGWNILH.mjs.br +0 -0
- package/dist/Model3DScene-ZEGWNILH.mjs.gz +0 -0
- package/dist/{PieChart3DScene-TK2VT4RS.js → PieChart3DScene-7C3ACGKN.js} +2 -2
- package/dist/PieChart3DScene-7C3ACGKN.js.br +0 -0
- package/dist/PieChart3DScene-7C3ACGKN.js.gz +0 -0
- package/dist/{PieChart3DScene-UD7GRH55.mjs → PieChart3DScene-DGD4PZVV.mjs} +1 -1
- package/dist/PieChart3DScene-DGD4PZVV.mjs.br +0 -0
- package/dist/PieChart3DScene-DGD4PZVV.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-TXY6UZSW.mjs → SurfaceChart3DScene-QGH3OLJV.mjs} +1 -1
- package/dist/SurfaceChart3DScene-QGH3OLJV.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-QGH3OLJV.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-ERFXZW2O.js → SurfaceChart3DScene-SJPQGGGE.js} +2 -2
- package/dist/SurfaceChart3DScene-SJPQGGGE.js.br +0 -0
- package/dist/SurfaceChart3DScene-SJPQGGGE.js.gz +0 -0
- package/dist/{chunk-RRAL4Y7V.js → chunk-7E6SM42A.js} +2604 -2024
- package/dist/chunk-7E6SM42A.js.br +0 -0
- package/dist/chunk-7E6SM42A.js.gz +0 -0
- package/dist/{chunk-G7UBIKAG.mjs → chunk-B7WAGQW4.mjs} +5383 -873
- package/dist/chunk-B7WAGQW4.mjs.br +0 -0
- package/dist/chunk-B7WAGQW4.mjs.gz +0 -0
- package/dist/{chunk-RX6FE24O.mjs → chunk-C4WTQIC6.mjs} +302 -61
- package/dist/chunk-C4WTQIC6.mjs.br +0 -0
- package/dist/chunk-C4WTQIC6.mjs.gz +0 -0
- package/dist/{chunk-Q52HT4EZ.js → chunk-KY6JQJXK.js} +307 -63
- package/dist/chunk-KY6JQJXK.js.br +0 -0
- package/dist/chunk-KY6JQJXK.js.gz +0 -0
- package/dist/{chunk-PPNXPEEZ.mjs → chunk-L5MRKDRM.mjs} +1514 -934
- package/dist/chunk-L5MRKDRM.mjs.br +0 -0
- package/dist/chunk-L5MRKDRM.mjs.gz +0 -0
- package/dist/{chunk-UHR7EYFM.mjs → chunk-MSUUPLQ7.mjs} +718 -435
- package/dist/chunk-MSUUPLQ7.mjs.br +0 -0
- package/dist/chunk-MSUUPLQ7.mjs.gz +0 -0
- package/dist/{chunk-FJDZ7AEE.js → chunk-PCW2KT7Z.js} +5446 -879
- package/dist/chunk-PCW2KT7Z.js.br +0 -0
- package/dist/chunk-PCW2KT7Z.js.gz +0 -0
- package/dist/{chunk-FMEEIS6L.mjs → chunk-SFMATKNJ.mjs} +13 -114
- package/dist/chunk-SFMATKNJ.mjs.br +0 -0
- package/dist/chunk-SFMATKNJ.mjs.gz +0 -0
- package/dist/{chunk-ARQGUUYU.js → chunk-TJNG5VEK.js} +1114 -826
- package/dist/chunk-TJNG5VEK.js.br +0 -0
- package/dist/chunk-TJNG5VEK.js.gz +0 -0
- package/dist/{chunk-ALO4ZOHQ.js → chunk-UNIJUD5C.js} +45 -1
- package/dist/chunk-UNIJUD5C.js.br +0 -0
- package/dist/chunk-UNIJUD5C.js.gz +0 -0
- package/dist/{chunk-B6UIVRFA.js → chunk-XBTHWXNO.js} +177 -279
- package/dist/chunk-XBTHWXNO.js.br +0 -0
- package/dist/chunk-XBTHWXNO.js.gz +0 -0
- package/dist/{chunk-RHSA5BW5.mjs → chunk-XWUMM2TX.mjs} +45 -1
- package/dist/chunk-XWUMM2TX.mjs.br +0 -0
- package/dist/chunk-XWUMM2TX.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 +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-C3E7NLX3.mjs.br +0 -0
- package/dist/AiChatPanel-C3E7NLX3.mjs.gz +0 -0
- package/dist/AiChatPanel-TKBVSYD2.js.br +0 -0
- package/dist/AiChatPanel-TKBVSYD2.js.gz +0 -0
- package/dist/Area3DChartScene-3A3CXKN3.js.br +0 -0
- package/dist/Area3DChartScene-3A3CXKN3.js.gz +0 -0
- package/dist/Area3DChartScene-7YCFWEGX.mjs.br +0 -3
- package/dist/Area3DChartScene-7YCFWEGX.mjs.gz +0 -0
- package/dist/Bar3DChartScene-7CNSJ35X.mjs.br +0 -0
- package/dist/Bar3DChartScene-7CNSJ35X.mjs.gz +0 -0
- package/dist/Bar3DChartScene-BDUENAWJ.js.br +0 -0
- package/dist/Bar3DChartScene-BDUENAWJ.js.gz +0 -0
- package/dist/Line3DChartScene-R352CZ5U.js.br +0 -0
- package/dist/Line3DChartScene-R352CZ5U.js.gz +0 -0
- package/dist/Line3DChartScene-SMTHK6MD.mjs.br +0 -3
- package/dist/Line3DChartScene-SMTHK6MD.mjs.gz +0 -0
- package/dist/Model3DScene-AUVJXXPV.mjs.br +0 -0
- package/dist/Model3DScene-AUVJXXPV.mjs.gz +0 -0
- package/dist/Model3DScene-Y4SGFQYW.js.br +0 -0
- package/dist/Model3DScene-Y4SGFQYW.js.gz +0 -0
- package/dist/PieChart3DScene-TK2VT4RS.js.br +0 -0
- package/dist/PieChart3DScene-TK2VT4RS.js.gz +0 -0
- package/dist/PieChart3DScene-UD7GRH55.mjs.br +0 -0
- package/dist/PieChart3DScene-UD7GRH55.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-ERFXZW2O.js.br +0 -0
- package/dist/SurfaceChart3DScene-ERFXZW2O.js.gz +0 -0
- package/dist/SurfaceChart3DScene-TXY6UZSW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-TXY6UZSW.mjs.gz +0 -0
- package/dist/chunk-ALO4ZOHQ.js.br +0 -0
- package/dist/chunk-ALO4ZOHQ.js.gz +0 -0
- package/dist/chunk-ARQGUUYU.js.br +0 -0
- package/dist/chunk-ARQGUUYU.js.gz +0 -0
- package/dist/chunk-B6UIVRFA.js.br +0 -0
- package/dist/chunk-B6UIVRFA.js.gz +0 -0
- package/dist/chunk-FJDZ7AEE.js.br +0 -0
- package/dist/chunk-FJDZ7AEE.js.gz +0 -0
- package/dist/chunk-FMEEIS6L.mjs.br +0 -0
- package/dist/chunk-FMEEIS6L.mjs.gz +0 -0
- package/dist/chunk-G7UBIKAG.mjs.br +0 -0
- package/dist/chunk-G7UBIKAG.mjs.gz +0 -0
- package/dist/chunk-PPNXPEEZ.mjs.br +0 -0
- package/dist/chunk-PPNXPEEZ.mjs.gz +0 -0
- package/dist/chunk-Q52HT4EZ.js.br +0 -0
- package/dist/chunk-Q52HT4EZ.js.gz +0 -0
- package/dist/chunk-RHSA5BW5.mjs.br +0 -0
- package/dist/chunk-RHSA5BW5.mjs.gz +0 -0
- package/dist/chunk-RRAL4Y7V.js.br +0 -0
- package/dist/chunk-RRAL4Y7V.js.gz +0 -0
- package/dist/chunk-RX6FE24O.mjs.br +0 -0
- package/dist/chunk-RX6FE24O.mjs.gz +0 -0
- package/dist/chunk-UHR7EYFM.mjs.br +0 -0
- package/dist/chunk-UHR7EYFM.mjs.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 chunkPCW2KT7Z_js = require('./chunk-PCW2KT7Z.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 chunkPCW2KT7Z_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 chunkPCW2KT7Z_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 = chunkPCW2KT7Z_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 = chunkPCW2KT7Z_js.SHAPE_PRESET_DEFS.map(
|
|
109
109
|
(def) => ({
|
|
110
110
|
type: def.type,
|
|
111
111
|
label: def.label,
|
|
@@ -130,32 +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
|
|
134
|
-
{ value: "solid", label: "Solid", i18nKey: "pptx.stroke.dashSolid" },
|
|
135
|
-
{ value: "dot", label: "Dot", i18nKey: "pptx.stroke.dashDot" },
|
|
136
|
-
{ value: "dash", label: "Dash", i18nKey: "pptx.stroke.dashDash" },
|
|
137
|
-
{ value: "dashDot", label: "Dash Dot", i18nKey: "pptx.stroke.dashDashDot" },
|
|
138
|
-
{ value: "lgDash", label: "Long Dash", i18nKey: "pptx.connectorOptions.dashLongDash" },
|
|
139
|
-
{ value: "lgDashDot", label: "Long Dash Dot", i18nKey: "pptx.connectorOptions.dashLongDashDot" },
|
|
140
|
-
{
|
|
141
|
-
value: "lgDashDotDot",
|
|
142
|
-
label: "Long Dash Dot Dot",
|
|
143
|
-
i18nKey: "pptx.connectorOptions.dashLongDashDotDot"
|
|
144
|
-
},
|
|
145
|
-
{ value: "sysDot", label: "System Dot", i18nKey: "pptx.stroke.dashSysDot" },
|
|
146
|
-
{ value: "sysDash", label: "System Dash", i18nKey: "pptx.stroke.dashSysDash" },
|
|
147
|
-
{
|
|
148
|
-
value: "sysDashDot",
|
|
149
|
-
label: "System Dash Dot",
|
|
150
|
-
i18nKey: "pptx.connectorOptions.dashSysDashDot"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
value: "sysDashDotDot",
|
|
154
|
-
label: "System Dash Dot Dot",
|
|
155
|
-
i18nKey: "pptx.connectorOptions.dashSysDashDotDot"
|
|
156
|
-
},
|
|
157
|
-
{ value: "custom", label: "Custom", i18nKey: "pptx.documentProperties.tabs.custom" }
|
|
158
|
-
];
|
|
133
|
+
var STROKE_DASH_OPTIONS2 = chunkPCW2KT7Z_js.STROKE_DASH_OPTIONS;
|
|
159
134
|
|
|
160
135
|
// src/viewer/utils/shape-types.tsx
|
|
161
136
|
function getShapeType(shapeType) {
|
|
@@ -264,7 +239,7 @@ function isConnectorOrLineElement(element) {
|
|
|
264
239
|
if (element.type === "connector") {
|
|
265
240
|
return true;
|
|
266
241
|
}
|
|
267
|
-
if (!
|
|
242
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
268
243
|
return false;
|
|
269
244
|
}
|
|
270
245
|
const st = getShapeType(element.shapeType);
|
|
@@ -273,17 +248,17 @@ function isConnectorOrLineElement(element) {
|
|
|
273
248
|
|
|
274
249
|
// src/viewer/utils/image-style.ts
|
|
275
250
|
function getImageMaskStyle(element) {
|
|
276
|
-
if (!
|
|
251
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
277
252
|
return void 0;
|
|
278
253
|
}
|
|
279
|
-
const geometry =
|
|
254
|
+
const geometry = chunkPCW2KT7Z_js.resolveShapeGeometry(element);
|
|
280
255
|
if (geometry.kind === "borderRadius") {
|
|
281
256
|
return { borderRadius: geometry.radius };
|
|
282
257
|
}
|
|
283
258
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
284
259
|
}
|
|
285
260
|
function getImageRenderStyle(element) {
|
|
286
|
-
const fit =
|
|
261
|
+
const fit = chunkPCW2KT7Z_js.getImageFitStyle(element);
|
|
287
262
|
return {
|
|
288
263
|
// A translated/scaled crop must be masked by its stationary wrapper, not
|
|
289
264
|
// by the moving bitmap itself.
|
|
@@ -296,11 +271,11 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
296
271
|
return {
|
|
297
272
|
overflow: "hidden",
|
|
298
273
|
borderRadius: mask?.borderRadius,
|
|
299
|
-
clipPath: mask?.clipPath ??
|
|
274
|
+
clipPath: mask?.clipPath ?? getCropShapeClipPath2(element)
|
|
300
275
|
};
|
|
301
276
|
}
|
|
302
277
|
function getImageSurfaceStyle(element) {
|
|
303
|
-
const fill =
|
|
278
|
+
const fill = chunkPCW2KT7Z_js.hasShapeProperties(element) ? chunkPCW2KT7Z_js.getComputedFillStyle(element) : void 0;
|
|
304
279
|
return {
|
|
305
280
|
position: "absolute",
|
|
306
281
|
inset: 0,
|
|
@@ -312,27 +287,14 @@ function getImageSurfaceStyle(element) {
|
|
|
312
287
|
backgroundPosition: fill?.backgroundPosition
|
|
313
288
|
};
|
|
314
289
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
roundedRect: "inset(0 round 12%)",
|
|
318
|
-
triangle: "polygon(50% 0%, 0% 100%, 100% 100%)",
|
|
319
|
-
diamond: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",
|
|
320
|
-
pentagon: "polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",
|
|
321
|
-
hexagon: "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)",
|
|
322
|
-
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
323
|
-
};
|
|
324
|
-
function getCropShapeClipPath(element) {
|
|
325
|
-
if (!chunkFJDZ7AEE_js.isImageLikeElement(element)) {
|
|
326
|
-
return void 0;
|
|
327
|
-
}
|
|
328
|
-
const shape = element.cropShape;
|
|
329
|
-
if (!shape || shape === "none") {
|
|
290
|
+
function getCropShapeClipPath2(element) {
|
|
291
|
+
if (!chunkPCW2KT7Z_js.isImageLikeElement(element)) {
|
|
330
292
|
return void 0;
|
|
331
293
|
}
|
|
332
|
-
return
|
|
294
|
+
return chunkPCW2KT7Z_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
333
295
|
}
|
|
334
296
|
function getImageTilingStyle2(element) {
|
|
335
|
-
return
|
|
297
|
+
return chunkPCW2KT7Z_js.getImageTilingStyle(element);
|
|
336
298
|
}
|
|
337
299
|
|
|
338
300
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -474,7 +436,7 @@ function VideoWithMetadata({
|
|
|
474
436
|
{
|
|
475
437
|
ref: mediaRef,
|
|
476
438
|
className: "w-full h-full pointer-events-auto",
|
|
477
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
439
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkPCW2KT7Z_js.getImageFitStyle(element),
|
|
478
440
|
controls: showTransport,
|
|
479
441
|
preload: "metadata",
|
|
480
442
|
playsInline: true,
|
|
@@ -517,27 +479,6 @@ function AudioWithMetadata({
|
|
|
517
479
|
}
|
|
518
480
|
) });
|
|
519
481
|
}
|
|
520
|
-
|
|
521
|
-
// src/viewer/utils/media-element-registry.ts
|
|
522
|
-
var registry = /* @__PURE__ */ new Map();
|
|
523
|
-
function registerMediaElement(elementId, el) {
|
|
524
|
-
if (!elementId) {
|
|
525
|
-
return () => {
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
registry.set(elementId, el);
|
|
529
|
-
return () => {
|
|
530
|
-
if (registry.get(elementId) === el) {
|
|
531
|
-
registry.delete(elementId);
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
function executeMediaCommand(command, frameRoot) {
|
|
536
|
-
return chunkFJDZ7AEE_js.runMediaCommand(
|
|
537
|
-
command,
|
|
538
|
-
(targetId) => registry.get(targetId) ?? chunkFJDZ7AEE_js.findMediaElementByElementId(targetId, frameRoot?.())
|
|
539
|
-
);
|
|
540
|
-
}
|
|
541
482
|
function PresentationMediaController({
|
|
542
483
|
element,
|
|
543
484
|
isPresentationMode,
|
|
@@ -568,18 +509,7 @@ function PresentationMediaController({
|
|
|
568
509
|
}
|
|
569
510
|
};
|
|
570
511
|
}, []);
|
|
571
|
-
|
|
572
|
-
const el = mediaRef.current;
|
|
573
|
-
if (!el) {
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
return registerMediaElement(element.id, el);
|
|
577
|
-
}, [element.id]);
|
|
578
|
-
const {
|
|
579
|
-
loop: shouldLoop,
|
|
580
|
-
volume: playbackVolume,
|
|
581
|
-
playbackRate
|
|
582
|
-
} = chunkFJDZ7AEE_js.mediaPlaybackAttributes({
|
|
512
|
+
const { volume: playbackVolume, playbackRate } = chunkPCW2KT7Z_js.mediaPlaybackAttributes({
|
|
583
513
|
loop: element.loop,
|
|
584
514
|
volume: element.volume,
|
|
585
515
|
playbackSpeed: element.playbackSpeed
|
|
@@ -714,15 +644,7 @@ function PresentationMediaController({
|
|
|
714
644
|
}
|
|
715
645
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
716
646
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
717
|
-
if (dataUrl) {
|
|
718
|
-
chunkFJDZ7AEE_js.registerPersistentAudio(
|
|
719
|
-
element.id,
|
|
720
|
-
dataUrl,
|
|
721
|
-
element.mediaMimeType,
|
|
722
|
-
shouldLoop,
|
|
723
|
-
playbackVolume,
|
|
724
|
-
trimStartSec
|
|
725
|
-
);
|
|
647
|
+
if (chunkPCW2KT7Z_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
726
648
|
return;
|
|
727
649
|
}
|
|
728
650
|
}
|
|
@@ -738,19 +660,7 @@ function PresentationMediaController({
|
|
|
738
660
|
});
|
|
739
661
|
}, 100);
|
|
740
662
|
return () => window.clearTimeout(timer);
|
|
741
|
-
}, [
|
|
742
|
-
isPresentationMode,
|
|
743
|
-
shouldAutoPlay,
|
|
744
|
-
element.playAcrossSlides,
|
|
745
|
-
element.mediaType,
|
|
746
|
-
element.mediaData,
|
|
747
|
-
element.mediaMimeType,
|
|
748
|
-
element.id,
|
|
749
|
-
resolvedDataUrl,
|
|
750
|
-
shouldLoop,
|
|
751
|
-
playbackVolume,
|
|
752
|
-
trimStartSec
|
|
753
|
-
]);
|
|
663
|
+
}, [isPresentationMode, shouldAutoPlay, element, resolvedDataUrl, trimStartSec]);
|
|
754
664
|
const wrapperStyle = hideWhenNotPlaying ? {
|
|
755
665
|
opacity: isMediaPlaying ? 1 : 0,
|
|
756
666
|
transition: "opacity 0.3s ease",
|
|
@@ -777,7 +687,7 @@ function PresentationMediaController({
|
|
|
777
687
|
] });
|
|
778
688
|
}
|
|
779
689
|
function label(key) {
|
|
780
|
-
return key === void 0 ? void 0 :
|
|
690
|
+
return key === void 0 ? void 0 : chunkUNIJUD5C_js.translationsEn[key];
|
|
781
691
|
}
|
|
782
692
|
function FallbackIcon({
|
|
783
693
|
paths,
|
|
@@ -813,17 +723,17 @@ function Badge({
|
|
|
813
723
|
"div",
|
|
814
724
|
{
|
|
815
725
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
816
|
-
...{ [
|
|
726
|
+
...{ [chunkPCW2KT7Z_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
817
727
|
children: [
|
|
818
728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
819
729
|
FallbackIcon,
|
|
820
730
|
{
|
|
821
|
-
paths:
|
|
731
|
+
paths: chunkPCW2KT7Z_js.mediaFallbackIcon(visual, element.mediaType),
|
|
822
732
|
size: isMissing ? 32 : 48,
|
|
823
733
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
824
734
|
}
|
|
825
735
|
),
|
|
826
|
-
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(chunkPCW2KT7Z_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
827
737
|
]
|
|
828
738
|
}
|
|
829
739
|
);
|
|
@@ -840,17 +750,17 @@ function Placeholder({
|
|
|
840
750
|
"div",
|
|
841
751
|
{
|
|
842
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"}`,
|
|
843
|
-
...{ [
|
|
753
|
+
...{ [chunkPCW2KT7Z_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
844
754
|
children: [
|
|
845
755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
846
756
|
FallbackIcon,
|
|
847
757
|
{
|
|
848
|
-
paths:
|
|
758
|
+
paths: chunkPCW2KT7Z_js.mediaFallbackIcon(visual, element.mediaType),
|
|
849
759
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
850
760
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
851
761
|
}
|
|
852
762
|
),
|
|
853
|
-
/* @__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(chunkPCW2KT7Z_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
854
764
|
]
|
|
855
765
|
}
|
|
856
766
|
);
|
|
@@ -860,7 +770,7 @@ function renderMediaFallback({
|
|
|
860
770
|
posterUrl,
|
|
861
771
|
surface
|
|
862
772
|
}) {
|
|
863
|
-
const visual =
|
|
773
|
+
const visual = chunkPCW2KT7Z_js.mediaFallbackVisual(surface, {
|
|
864
774
|
hasPoster: Boolean(posterUrl),
|
|
865
775
|
missing: element.mediaMissing === true
|
|
866
776
|
});
|
|
@@ -870,9 +780,9 @@ function renderMediaFallback({
|
|
|
870
780
|
"img",
|
|
871
781
|
{
|
|
872
782
|
src: posterUrl,
|
|
873
|
-
alt: visual.dimPoster ?
|
|
783
|
+
alt: visual.dimPoster ? chunkUNIJUD5C_js.translationsEn["pptx.media.posterAlt"] : chunkUNIJUD5C_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
874
784
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
875
|
-
style:
|
|
785
|
+
style: chunkPCW2KT7Z_js.getImageFitStyle(element)
|
|
876
786
|
}
|
|
877
787
|
),
|
|
878
788
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -882,7 +792,7 @@ function renderMediaFallback({
|
|
|
882
792
|
}
|
|
883
793
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
884
794
|
if (element.type !== "media") {
|
|
885
|
-
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"] });
|
|
886
796
|
}
|
|
887
797
|
const mediaType = element.mediaType;
|
|
888
798
|
const mediaPath = element.mediaPath;
|
|
@@ -890,7 +800,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
890
800
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
891
801
|
const trimFragment = buildTrimFragment(element);
|
|
892
802
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
893
|
-
const shouldLoop =
|
|
803
|
+
const shouldLoop = chunkPCW2KT7Z_js.mediaPlaybackAttributes(element).loop;
|
|
894
804
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
895
805
|
const isFullScreen = options?.fullScreen === true;
|
|
896
806
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -968,25 +878,25 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
968
878
|
if (surface.presenting || surface.preview) {
|
|
969
879
|
return null;
|
|
970
880
|
}
|
|
971
|
-
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"] });
|
|
972
882
|
}
|
|
973
883
|
|
|
974
884
|
// src/viewer/utils/text-utils.tsx
|
|
975
885
|
function getTextStyleForElement(element, fallbackColor) {
|
|
976
|
-
return
|
|
886
|
+
return chunkPCW2KT7Z_js.buildTextBlockStyle(element, { fallbackColor });
|
|
977
887
|
}
|
|
978
888
|
|
|
979
889
|
// src/viewer/utils/text-layout.tsx
|
|
980
890
|
function getTextLayoutStyle(element) {
|
|
981
|
-
if (!
|
|
891
|
+
if (!chunkPCW2KT7Z_js.hasTextProperties(element)) {
|
|
982
892
|
return {};
|
|
983
893
|
}
|
|
984
|
-
const writingMode =
|
|
985
|
-
const textOrientation =
|
|
986
|
-
const verticalDirection =
|
|
894
|
+
const writingMode = chunkPCW2KT7Z_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
895
|
+
const textOrientation = chunkPCW2KT7Z_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
896
|
+
const verticalDirection = chunkPCW2KT7Z_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
987
897
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
988
898
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
989
|
-
const hasParagraphIndents =
|
|
899
|
+
const hasParagraphIndents = chunkPCW2KT7Z_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
990
900
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
991
901
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
992
902
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -995,7 +905,7 @@ function getTextLayoutStyle(element) {
|
|
|
995
905
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
996
906
|
return {
|
|
997
907
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
998
|
-
...
|
|
908
|
+
...chunkPCW2KT7Z_js.buildTextBodyLayoutStyle(element),
|
|
999
909
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
1000
910
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
1001
911
|
paddingTop: bodyTop,
|
|
@@ -1023,7 +933,7 @@ function getTextLayoutStyle(element) {
|
|
|
1023
933
|
|
|
1024
934
|
// src/viewer/utils/text-effects.tsx
|
|
1025
935
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
1026
|
-
return
|
|
936
|
+
return chunkPCW2KT7Z_js.buildTextBody3DSceneStyle(textStyle);
|
|
1027
937
|
}
|
|
1028
938
|
|
|
1029
939
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1208,13 +1118,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1208
1118
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1209
1119
|
return renderedSegments;
|
|
1210
1120
|
}
|
|
1211
|
-
const paraKey = `${elementId}${
|
|
1121
|
+
const paraKey = `${elementId}${chunkPCW2KT7Z_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1212
1122
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1213
1123
|
if (paraState) {
|
|
1214
1124
|
const style = buildAnimStyle(paraState);
|
|
1215
1125
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1216
1126
|
}
|
|
1217
|
-
const spec =
|
|
1127
|
+
const spec = chunkPCW2KT7Z_js.buildTextBuildSpec(
|
|
1218
1128
|
elementId,
|
|
1219
1129
|
paraIndex,
|
|
1220
1130
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1232,7 +1142,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1232
1142
|
"span",
|
|
1233
1143
|
{
|
|
1234
1144
|
"data-anim-id": span.animId,
|
|
1235
|
-
style:
|
|
1145
|
+
style: chunkPCW2KT7Z_js.textBuildSpanStyle(span),
|
|
1236
1146
|
children: content
|
|
1237
1147
|
},
|
|
1238
1148
|
span.animId
|
|
@@ -1240,7 +1150,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1240
1150
|
});
|
|
1241
1151
|
}
|
|
1242
1152
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle) {
|
|
1243
|
-
const [lineLayout] =
|
|
1153
|
+
const [lineLayout] = chunkPCW2KT7Z_js.buildRunTabLines(line, ctx, nestedStyle);
|
|
1244
1154
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", whiteSpace: "nowrap" }, children: lineLayout.pieces.map((piece, i) => {
|
|
1245
1155
|
const key = `${keyPrefix}-tab-${i}`;
|
|
1246
1156
|
return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
|
|
@@ -1253,7 +1163,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1253
1163
|
if (!needsScriptFonts || !text) {
|
|
1254
1164
|
return text;
|
|
1255
1165
|
}
|
|
1256
|
-
const pieces =
|
|
1166
|
+
const pieces = chunkPCW2KT7Z_js.splitRunByScriptFont(
|
|
1257
1167
|
text,
|
|
1258
1168
|
scriptFonts,
|
|
1259
1169
|
baseFontFamily,
|
|
@@ -1270,7 +1180,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1270
1180
|
if (!metric || !text) {
|
|
1271
1181
|
return inner(text, keyPrefix);
|
|
1272
1182
|
}
|
|
1273
|
-
const pieces =
|
|
1183
|
+
const pieces = chunkPCW2KT7Z_js.splitRunForMetrics(text, metric.font);
|
|
1274
1184
|
if (pieces.length <= 1) {
|
|
1275
1185
|
return inner(text, keyPrefix);
|
|
1276
1186
|
}
|
|
@@ -1279,7 +1189,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1279
1189
|
{
|
|
1280
1190
|
style: {
|
|
1281
1191
|
...metric.nestedStyle,
|
|
1282
|
-
letterSpacing:
|
|
1192
|
+
letterSpacing: chunkPCW2KT7Z_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1283
1193
|
},
|
|
1284
1194
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1285
1195
|
},
|
|
@@ -1366,8 +1276,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1366
1276
|
});
|
|
1367
1277
|
}
|
|
1368
1278
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1369
|
-
const mathml =
|
|
1370
|
-
const safeMathml = mathml ?
|
|
1279
|
+
const mathml = chunkPCW2KT7Z_js.convertOmmlToMathMl(equationXml);
|
|
1280
|
+
const safeMathml = mathml ? chunkPCW2KT7Z_js.sanitizeMathMl(mathml) : "";
|
|
1371
1281
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1372
1282
|
"span",
|
|
1373
1283
|
{
|
|
@@ -1377,7 +1287,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1377
1287
|
},
|
|
1378
1288
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1379
1289
|
}
|
|
1380
|
-
) : /* @__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"] });
|
|
1381
1291
|
if (equationNumber) {
|
|
1382
1292
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1383
1293
|
"span",
|
|
@@ -1495,7 +1405,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1495
1405
|
const segmentStyle = segment?.style ?? {};
|
|
1496
1406
|
const textValue = run.text;
|
|
1497
1407
|
const lines = textValue.split("\n");
|
|
1498
|
-
const resolvedSegmentColor =
|
|
1408
|
+
const resolvedSegmentColor = chunkPCW2KT7Z_js.normalizeHexColor(
|
|
1499
1409
|
segmentStyle.color || element.textStyle?.color,
|
|
1500
1410
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1501
1411
|
);
|
|
@@ -1503,16 +1413,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1503
1413
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1504
1414
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1505
1415
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1506
|
-
const baseFontSize = rawFontSize *
|
|
1416
|
+
const baseFontSize = rawFontSize * chunkPCW2KT7Z_js.resolveAutoFitFontScale(element.textStyle);
|
|
1507
1417
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1508
|
-
const fontKerning =
|
|
1418
|
+
const fontKerning = chunkPCW2KT7Z_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1509
1419
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1510
|
-
const baseFontFamily = rawFontFamily ?
|
|
1420
|
+
const baseFontFamily = rawFontFamily ? chunkPCW2KT7Z_js.getSubstituteFontFamily(
|
|
1511
1421
|
rawFontFamily,
|
|
1512
|
-
|
|
1422
|
+
chunkPCW2KT7Z_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1513
1423
|
) : DEFAULT_FONT_FAMILY2;
|
|
1514
|
-
const scriptFonts =
|
|
1515
|
-
const needsScriptFonts =
|
|
1424
|
+
const scriptFonts = chunkPCW2KT7Z_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1425
|
+
const needsScriptFonts = chunkPCW2KT7Z_js.hasDistinctScriptFonts(scriptFonts);
|
|
1516
1426
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1517
1427
|
const metricFont = {
|
|
1518
1428
|
fontFamily: baseFontFamily,
|
|
@@ -1520,7 +1430,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1520
1430
|
bold: Boolean(segmentStyle.bold),
|
|
1521
1431
|
italic: Boolean(segmentStyle.italic)
|
|
1522
1432
|
};
|
|
1523
|
-
const nestedStyle =
|
|
1433
|
+
const nestedStyle = chunkPCW2KT7Z_js.nestedTextDecorationStyle(run.style);
|
|
1524
1434
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1525
1435
|
const spanStyle = { ...run.style };
|
|
1526
1436
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1528,11 +1438,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1528
1438
|
spanStyle.fontFamily = baseFontFamily;
|
|
1529
1439
|
spanStyle.verticalAlign = baselineShift;
|
|
1530
1440
|
spanStyle.fontKerning = fontKerning;
|
|
1531
|
-
spanStyle.letterSpacing =
|
|
1441
|
+
spanStyle.letterSpacing = chunkPCW2KT7Z_js.pieceLetterSpacing(
|
|
1532
1442
|
authoredLetterSpacing,
|
|
1533
|
-
|
|
1443
|
+
chunkPCW2KT7Z_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1534
1444
|
);
|
|
1535
|
-
const hollow =
|
|
1445
|
+
const hollow = chunkPCW2KT7Z_js.hollowTextFillStyle(segmentStyle, {
|
|
1536
1446
|
color: resolvedSegmentColor,
|
|
1537
1447
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1538
1448
|
});
|
|
@@ -1553,7 +1463,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1553
1463
|
scriptFonts,
|
|
1554
1464
|
baseFontFamily,
|
|
1555
1465
|
findHighlights,
|
|
1556
|
-
|
|
1466
|
+
chunkPCW2KT7Z_js.buildTabContext(
|
|
1557
1467
|
element.textStyle?.tabStops,
|
|
1558
1468
|
element.textStyle?.defaultTabSize,
|
|
1559
1469
|
baseFontSize,
|
|
@@ -1578,18 +1488,18 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1578
1488
|
/* @__PURE__ */ jsxRuntime.jsx("rp", { children: ")" })
|
|
1579
1489
|
] });
|
|
1580
1490
|
}
|
|
1581
|
-
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
1582
|
-
if (!
|
|
1491
|
+
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt) {
|
|
1492
|
+
if (!chunkPCW2KT7Z_js.hasTextProperties(element)) {
|
|
1583
1493
|
return emptyFallback || null;
|
|
1584
1494
|
}
|
|
1585
1495
|
const segments = segmentOverrides ?? element.textSegments;
|
|
1586
1496
|
if (!segments || segments.length === 0) {
|
|
1587
|
-
if (
|
|
1588
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style:
|
|
1497
|
+
if (placeholderPrompt) {
|
|
1498
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: placeholderPrompt.style, children: placeholderPrompt.text });
|
|
1589
1499
|
}
|
|
1590
1500
|
return element.text || emptyFallback || "";
|
|
1591
1501
|
}
|
|
1592
|
-
const paragraphs =
|
|
1502
|
+
const paragraphs = chunkPCW2KT7Z_js.buildParagraphs(element, fieldContext, segmentOverrides);
|
|
1593
1503
|
const ctx = {
|
|
1594
1504
|
element,
|
|
1595
1505
|
fallbackColor,
|
|
@@ -1710,25 +1620,14 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1710
1620
|
`${elementId}-para-${paraIndex}-bullet`
|
|
1711
1621
|
);
|
|
1712
1622
|
}
|
|
1713
|
-
function hexToRgbUnit(hex) {
|
|
1714
|
-
const clean = hex.replace("#", "");
|
|
1715
|
-
const r = parseInt(clean.substring(0, 2), 16) / 255;
|
|
1716
|
-
const g = parseInt(clean.substring(2, 4), 16) / 255;
|
|
1717
|
-
const b = parseInt(clean.substring(4, 6), 16) / 255;
|
|
1718
|
-
return {
|
|
1719
|
-
r: Number.isFinite(r) ? r : 0,
|
|
1720
|
-
g: Number.isFinite(g) ? g : 0,
|
|
1721
|
-
b: Number.isFinite(b) ? b : 0
|
|
1722
|
-
};
|
|
1723
|
-
}
|
|
1724
1623
|
function getDuotoneColors(element) {
|
|
1725
|
-
if (!
|
|
1624
|
+
if (!chunkPCW2KT7Z_js.isImageLikeElement(element)) {
|
|
1726
1625
|
return void 0;
|
|
1727
1626
|
}
|
|
1728
1627
|
return element.imageEffects?.duotone;
|
|
1729
1628
|
}
|
|
1730
1629
|
function buildLineShadowCss(element) {
|
|
1731
|
-
if (!
|
|
1630
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
1732
1631
|
return void 0;
|
|
1733
1632
|
}
|
|
1734
1633
|
const ss = element.shapeStyle;
|
|
@@ -1739,13 +1638,13 @@ function buildLineShadowCss(element) {
|
|
|
1739
1638
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1740
1639
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1741
1640
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1742
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1743
|
-
|
|
1641
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkPCW2KT7Z_js.colorWithOpacity(
|
|
1642
|
+
chunkPCW2KT7Z_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1744
1643
|
opacity
|
|
1745
1644
|
)}`;
|
|
1746
1645
|
}
|
|
1747
1646
|
function buildLineGlowFilter(element) {
|
|
1748
|
-
if (!
|
|
1647
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
1749
1648
|
return void 0;
|
|
1750
1649
|
}
|
|
1751
1650
|
const ss = element.shapeStyle;
|
|
@@ -1754,22 +1653,22 @@ function buildLineGlowFilter(element) {
|
|
|
1754
1653
|
}
|
|
1755
1654
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1756
1655
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1757
|
-
const glowCol =
|
|
1656
|
+
const glowCol = chunkPCW2KT7Z_js.colorWithOpacity(chunkPCW2KT7Z_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1758
1657
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1759
1658
|
}
|
|
1760
1659
|
function getDagDuotoneFilterId(elementId) {
|
|
1761
1660
|
return `dag-duotone-${elementId}`;
|
|
1762
1661
|
}
|
|
1763
1662
|
function hasDagDuotoneEffect(element) {
|
|
1764
|
-
if (!
|
|
1663
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
1765
1664
|
return false;
|
|
1766
1665
|
}
|
|
1767
1666
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1768
1667
|
}
|
|
1769
1668
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1770
1669
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1771
|
-
const c1 = hexToRgbUnit(color1);
|
|
1772
|
-
const c2 = hexToRgbUnit(color2);
|
|
1670
|
+
const c1 = chunkPCW2KT7Z_js.hexToRgbUnit(color1);
|
|
1671
|
+
const c2 = chunkPCW2KT7Z_js.hexToRgbUnit(color2);
|
|
1773
1672
|
const grayscaleMatrix = [
|
|
1774
1673
|
0.2126,
|
|
1775
1674
|
0.7152,
|
|
@@ -1813,7 +1712,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1813
1712
|
|
|
1814
1713
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1815
1714
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1816
|
-
return
|
|
1715
|
+
return chunkPCW2KT7Z_js.build3DExtrusionData(
|
|
1817
1716
|
shape3d,
|
|
1818
1717
|
scene3d,
|
|
1819
1718
|
fillColor,
|
|
@@ -1822,7 +1721,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1822
1721
|
);
|
|
1823
1722
|
}
|
|
1824
1723
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
1825
|
-
|
|
1724
|
+
chunkPCW2KT7Z_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
1826
1725
|
}
|
|
1827
1726
|
|
|
1828
1727
|
// src/viewer/utils/shape-visual-style.ts
|
|
@@ -1830,16 +1729,16 @@ function rendersCustomVectorPath(element) {
|
|
|
1830
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;
|
|
1831
1730
|
}
|
|
1832
1731
|
function rendersWedgeCalloutVector(element) {
|
|
1833
|
-
return element.type === "shape" &&
|
|
1732
|
+
return element.type === "shape" && chunkPCW2KT7Z_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1834
1733
|
}
|
|
1835
1734
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1836
|
-
if (!
|
|
1735
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
1837
1736
|
return {};
|
|
1838
1737
|
}
|
|
1839
1738
|
const ss = element.shapeStyle;
|
|
1840
|
-
const fill = animatesFill ? void 0 :
|
|
1841
|
-
const fx =
|
|
1842
|
-
const stroke =
|
|
1739
|
+
const fill = animatesFill ? void 0 : chunkPCW2KT7Z_js.getComputedFillStyle(element, parentGroupFill);
|
|
1740
|
+
const fx = chunkPCW2KT7Z_js.getComputedEffectStyle(element);
|
|
1741
|
+
const stroke = chunkPCW2KT7Z_js.getComputedStrokeStyle(element);
|
|
1843
1742
|
const base = {
|
|
1844
1743
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1845
1744
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1878,7 +1777,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1878
1777
|
};
|
|
1879
1778
|
Object.assign(
|
|
1880
1779
|
base,
|
|
1881
|
-
|
|
1780
|
+
chunkPCW2KT7Z_js.getAnimationColorBaseStyle(element, {
|
|
1882
1781
|
animatesFill,
|
|
1883
1782
|
animatesStroke,
|
|
1884
1783
|
parentGroupFill
|
|
@@ -1890,7 +1789,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1890
1789
|
base.borderStyle = void 0;
|
|
1891
1790
|
}
|
|
1892
1791
|
apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor);
|
|
1893
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1792
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkPCW2KT7Z_js.isStrokeOnlyPresetElement(element)) {
|
|
1894
1793
|
base.backgroundColor = "transparent";
|
|
1895
1794
|
base.backgroundImage = void 0;
|
|
1896
1795
|
base.borderWidth = void 0;
|
|
@@ -1904,7 +1803,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1904
1803
|
if (rendersWedgeCalloutVector(element)) {
|
|
1905
1804
|
return base;
|
|
1906
1805
|
}
|
|
1907
|
-
const geometry =
|
|
1806
|
+
const geometry = chunkPCW2KT7Z_js.resolveShapeGeometry(element);
|
|
1908
1807
|
switch (geometry.kind) {
|
|
1909
1808
|
case "bare":
|
|
1910
1809
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1930,13 +1829,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1930
1829
|
function getConnectorAdjustment(element, key, fallback) {
|
|
1931
1830
|
const direct = element.shapeAdjustments?.[key];
|
|
1932
1831
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1933
|
-
return
|
|
1832
|
+
return chunkPCW2KT7Z_js.clampUnitInterval(direct / 1e5);
|
|
1934
1833
|
}
|
|
1935
1834
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1936
1835
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1937
|
-
return
|
|
1836
|
+
return chunkPCW2KT7Z_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1938
1837
|
}
|
|
1939
|
-
return
|
|
1838
|
+
return chunkPCW2KT7Z_js.clampUnitInterval(fallback);
|
|
1940
1839
|
}
|
|
1941
1840
|
function getConnectorPathGeometry(element) {
|
|
1942
1841
|
const width = Math.max(element.width, 0);
|
|
@@ -2073,11 +1972,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
2073
1972
|
strokePaint,
|
|
2074
1973
|
strokeWidth,
|
|
2075
1974
|
dashArray,
|
|
2076
|
-
lineCap:
|
|
1975
|
+
lineCap: chunkPCW2KT7Z_js.svgLineCap(shapeStyle?.lineCap),
|
|
2077
1976
|
lineJoin,
|
|
2078
1977
|
miterLimit,
|
|
2079
|
-
offsets:
|
|
2080
|
-
widths:
|
|
1978
|
+
offsets: chunkPCW2KT7Z_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1979
|
+
widths: chunkPCW2KT7Z_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
2081
1980
|
};
|
|
2082
1981
|
}
|
|
2083
1982
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2125,12 +2024,12 @@ function gradientDefs(gradient) {
|
|
|
2125
2024
|
}
|
|
2126
2025
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2127
2026
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2128
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2027
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkPCW2KT7Z_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2129
2028
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2130
|
-
const gradientPaint = gradient ?
|
|
2029
|
+
const gradientPaint = gradient ? chunkPCW2KT7Z_js.svgGradientFillRef(gradient) : void 0;
|
|
2131
2030
|
const nodes = [];
|
|
2132
2031
|
if (subpaths && needsPerSubpath) {
|
|
2133
|
-
const paints =
|
|
2032
|
+
const paints = chunkPCW2KT7Z_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2134
2033
|
paints.forEach((paint, idx) => {
|
|
2135
2034
|
if (paint.fill !== "none") {
|
|
2136
2035
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2159,7 +2058,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2159
2058
|
"path",
|
|
2160
2059
|
{
|
|
2161
2060
|
d: pathData,
|
|
2162
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2061
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkPCW2KT7Z_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2163
2062
|
stroke: "none",
|
|
2164
2063
|
vectorEffect: "non-scaling-stroke"
|
|
2165
2064
|
},
|
|
@@ -2202,14 +2101,14 @@ function renderGradientDefs(gradient) {
|
|
|
2202
2101
|
) });
|
|
2203
2102
|
}
|
|
2204
2103
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2205
|
-
if (!
|
|
2104
|
+
if (!chunkPCW2KT7Z_js.hasShapeProperties(element)) {
|
|
2206
2105
|
return null;
|
|
2207
2106
|
}
|
|
2208
2107
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2209
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2210
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2211
|
-
const dashType =
|
|
2212
|
-
const dashArray =
|
|
2108
|
+
const fillPaint = animatesFill ? "inherit" : chunkPCW2KT7Z_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2109
|
+
const strokePaint = animatesStroke ? "inherit" : chunkPCW2KT7Z_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2110
|
+
const dashType = chunkPCW2KT7Z_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2111
|
+
const dashArray = chunkPCW2KT7Z_js.getSvgStrokeDasharray(
|
|
2213
2112
|
dashType,
|
|
2214
2113
|
Math.max(strokeWidth, 1),
|
|
2215
2114
|
element.shapeStyle?.customDashSegments
|
|
@@ -2290,13 +2189,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2290
2189
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2291
2190
|
// without this the shape fell back to the parser's representative solid
|
|
2292
2191
|
// and lost every fade (issue #132).
|
|
2293
|
-
|
|
2192
|
+
chunkPCW2KT7Z_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2294
2193
|
);
|
|
2295
2194
|
}
|
|
2296
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2195
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkPCW2KT7Z_js.buildStrokeOutline(element)) {
|
|
2297
2196
|
const width = Math.max(element.width, 1);
|
|
2298
2197
|
const height = Math.max(element.height, 1);
|
|
2299
|
-
const geometry =
|
|
2198
|
+
const geometry = chunkPCW2KT7Z_js.getPresetShapeVectorGeometry(
|
|
2300
2199
|
element.shapeType || "rect",
|
|
2301
2200
|
width,
|
|
2302
2201
|
height,
|
|
@@ -2324,18 +2223,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2324
2223
|
);
|
|
2325
2224
|
}
|
|
2326
2225
|
}
|
|
2327
|
-
if (element.type === "shape" &&
|
|
2226
|
+
if (element.type === "shape" && chunkPCW2KT7Z_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2328
2227
|
const width = Math.max(element.width, 1);
|
|
2329
2228
|
const height = Math.max(element.height, 1);
|
|
2330
|
-
const geometry =
|
|
2229
|
+
const geometry = chunkPCW2KT7Z_js.getPresetShapeVectorGeometry(
|
|
2331
2230
|
element.shapeType,
|
|
2332
2231
|
width,
|
|
2333
2232
|
height,
|
|
2334
2233
|
element.shapeAdjustments
|
|
2335
2234
|
);
|
|
2336
2235
|
if (geometry) {
|
|
2337
|
-
const gradient =
|
|
2338
|
-
const gradientPaint = gradient ?
|
|
2236
|
+
const gradient = chunkPCW2KT7Z_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2237
|
+
const gradientPaint = gradient ? chunkPCW2KT7Z_js.svgGradientFillRef(gradient) : void 0;
|
|
2339
2238
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2340
2239
|
"svg",
|
|
2341
2240
|
{
|
|
@@ -2368,18 +2267,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2368
2267
|
);
|
|
2369
2268
|
}
|
|
2370
2269
|
}
|
|
2371
|
-
if (
|
|
2270
|
+
if (chunkPCW2KT7Z_js.isCalloutShape(normalizedType)) {
|
|
2372
2271
|
const width = Math.max(element.width, 1);
|
|
2373
2272
|
const height = Math.max(element.height, 1);
|
|
2374
|
-
const geometry =
|
|
2273
|
+
const geometry = chunkPCW2KT7Z_js.getCalloutLeaderLineGeometry(
|
|
2375
2274
|
normalizedType,
|
|
2376
2275
|
width,
|
|
2377
2276
|
height,
|
|
2378
2277
|
element.shapeAdjustments
|
|
2379
2278
|
);
|
|
2380
2279
|
if (geometry && geometry.points.length >= 2) {
|
|
2381
|
-
const leaderPath =
|
|
2382
|
-
const bounds =
|
|
2280
|
+
const leaderPath = chunkPCW2KT7Z_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2281
|
+
const bounds = chunkPCW2KT7Z_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2383
2282
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2384
2283
|
const offsetLeft = bounds.minX;
|
|
2385
2284
|
const offsetTop = bounds.minY;
|
|
@@ -2442,10 +2341,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2442
2341
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2443
2342
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2444
2343
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2445
|
-
const connectorLineCap =
|
|
2344
|
+
const connectorLineCap = chunkPCW2KT7Z_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2446
2345
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2447
|
-
const offsets =
|
|
2448
|
-
const widths =
|
|
2346
|
+
const offsets = chunkPCW2KT7Z_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2347
|
+
const widths = chunkPCW2KT7Z_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2449
2348
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2450
2349
|
"svg",
|
|
2451
2350
|
{
|
|
@@ -2512,15 +2411,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2512
2411
|
}
|
|
2513
2412
|
const rawStops = stops.map((gs) => {
|
|
2514
2413
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2515
|
-
const color =
|
|
2516
|
-
const opacity =
|
|
2414
|
+
const color = chunkPCW2KT7Z_js.parseDrawingColor(gs) ?? "#888888";
|
|
2415
|
+
const opacity = chunkPCW2KT7Z_js.parseDrawingColorOpacity(gs);
|
|
2517
2416
|
return { position: pos, color, opacity };
|
|
2518
2417
|
}).sort((a, b) => a.position - b.position);
|
|
2519
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2418
|
+
const stopStrings = rawStops.map((s) => `${chunkPCW2KT7Z_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2520
2419
|
const lin = gradFill["a:lin"];
|
|
2521
2420
|
if (lin) {
|
|
2522
2421
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2523
|
-
const angleDeg = Math.round(
|
|
2422
|
+
const angleDeg = Math.round(chunkPCW2KT7Z_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2524
2423
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2525
2424
|
}
|
|
2526
2425
|
const path = gradFill["a:path"];
|
|
@@ -2534,7 +2433,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2534
2433
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2535
2434
|
} : void 0;
|
|
2536
2435
|
if (pathType === "rect") {
|
|
2537
|
-
return
|
|
2436
|
+
return chunkPCW2KT7Z_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2538
2437
|
}
|
|
2539
2438
|
let cx = 50;
|
|
2540
2439
|
let cy = 50;
|
|
@@ -2556,8 +2455,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2556
2455
|
if (!pattFill) {
|
|
2557
2456
|
return void 0;
|
|
2558
2457
|
}
|
|
2559
|
-
const fgColor =
|
|
2560
|
-
const bgColor =
|
|
2458
|
+
const fgColor = chunkPCW2KT7Z_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2459
|
+
const bgColor = chunkPCW2KT7Z_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2561
2460
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2562
2461
|
switch (preset) {
|
|
2563
2462
|
case "ltHorz":
|
|
@@ -2668,11 +2567,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2668
2567
|
const prstDash = ln["a:prstDash"];
|
|
2669
2568
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2670
2569
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2671
|
-
const color =
|
|
2570
|
+
const color = chunkPCW2KT7Z_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2672
2571
|
if (color) {
|
|
2673
|
-
const opacity =
|
|
2572
|
+
const opacity = chunkPCW2KT7Z_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2674
2573
|
const key = `${edge.prefix}`;
|
|
2675
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2574
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkPCW2KT7Z_js.colorWithOpacity(color, opacity)}`;
|
|
2676
2575
|
}
|
|
2677
2576
|
}
|
|
2678
2577
|
return borderStyle;
|
|
@@ -2685,7 +2584,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2685
2584
|
const textShadowParts = [];
|
|
2686
2585
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2687
2586
|
if (outerShdw) {
|
|
2688
|
-
const shdwColor =
|
|
2587
|
+
const shdwColor = chunkPCW2KT7Z_js.parseDrawingColor(outerShdw);
|
|
2689
2588
|
if (shdwColor) {
|
|
2690
2589
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2691
2590
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2703,7 +2602,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2703
2602
|
}
|
|
2704
2603
|
const glow = effectLst["a:glow"];
|
|
2705
2604
|
if (glow) {
|
|
2706
|
-
const glowColor =
|
|
2605
|
+
const glowColor = chunkPCW2KT7Z_js.parseDrawingColor(glow);
|
|
2707
2606
|
if (glowColor) {
|
|
2708
2607
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2709
2608
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2783,10 +2682,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2783
2682
|
if (runProps?.["@_u"] !== void 0) {
|
|
2784
2683
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2785
2684
|
}
|
|
2786
|
-
const runColor =
|
|
2685
|
+
const runColor = chunkPCW2KT7Z_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkPCW2KT7Z_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2787
2686
|
if (runColor) {
|
|
2788
|
-
const opacity =
|
|
2789
|
-
cellStyle.color =
|
|
2687
|
+
const opacity = chunkPCW2KT7Z_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2688
|
+
cellStyle.color = chunkPCW2KT7Z_js.colorWithOpacity(runColor, opacity);
|
|
2790
2689
|
}
|
|
2791
2690
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2792
2691
|
if (fontFamily) {
|
|
@@ -2796,15 +2695,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2796
2695
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2797
2696
|
}
|
|
2798
2697
|
const cellProperties = cellXml["a:tcPr"];
|
|
2799
|
-
const cellFill =
|
|
2698
|
+
const cellFill = chunkPCW2KT7Z_js.parseDrawingColor(
|
|
2800
2699
|
cellProperties?.["a:solidFill"],
|
|
2801
2700
|
schemeColorOverrides
|
|
2802
2701
|
);
|
|
2803
2702
|
if (cellFill) {
|
|
2804
|
-
const opacity =
|
|
2703
|
+
const opacity = chunkPCW2KT7Z_js.parseDrawingColorOpacity(
|
|
2805
2704
|
cellProperties?.["a:solidFill"]
|
|
2806
2705
|
);
|
|
2807
|
-
cellStyle.backgroundColor =
|
|
2706
|
+
cellStyle.backgroundColor = chunkPCW2KT7Z_js.colorWithOpacity(cellFill, opacity);
|
|
2808
2707
|
} else {
|
|
2809
2708
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2810
2709
|
if (gradCss) {
|
|
@@ -2819,16 +2718,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2819
2718
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2820
2719
|
Object.assign(cellStyle, edgeBorders);
|
|
2821
2720
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2822
|
-
const borderColor =
|
|
2721
|
+
const borderColor = chunkPCW2KT7Z_js.parseDrawingColor(
|
|
2823
2722
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2824
2723
|
schemeColorOverrides
|
|
2825
|
-
) ||
|
|
2724
|
+
) || chunkPCW2KT7Z_js.parseDrawingColor(
|
|
2826
2725
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2827
2726
|
schemeColorOverrides
|
|
2828
|
-
) ||
|
|
2727
|
+
) || chunkPCW2KT7Z_js.parseDrawingColor(
|
|
2829
2728
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2830
2729
|
schemeColorOverrides
|
|
2831
|
-
) ||
|
|
2730
|
+
) || chunkPCW2KT7Z_js.parseDrawingColor(
|
|
2832
2731
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2833
2732
|
schemeColorOverrides
|
|
2834
2733
|
);
|
|
@@ -2900,7 +2799,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2900
2799
|
if (element.type !== "table") {
|
|
2901
2800
|
return void 0;
|
|
2902
2801
|
}
|
|
2903
|
-
return
|
|
2802
|
+
return chunkPCW2KT7Z_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2904
2803
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2905
2804
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2906
2805
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2976,7 +2875,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2976
2875
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2977
2876
|
"span",
|
|
2978
2877
|
{
|
|
2979
|
-
style: { position: "relative", ...
|
|
2878
|
+
style: { position: "relative", ...chunkPCW2KT7Z_js.cellRunStyle(run) },
|
|
2980
2879
|
children: run.text
|
|
2981
2880
|
},
|
|
2982
2881
|
`r-${index}`
|
|
@@ -2984,7 +2883,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2984
2883
|
});
|
|
2985
2884
|
}
|
|
2986
2885
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2987
|
-
return
|
|
2886
|
+
return chunkPCW2KT7Z_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2988
2887
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2989
2888
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2990
2889
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3117,7 +3016,7 @@ function TableResizeOverlay({
|
|
|
3117
3016
|
const containerRef = React6.useRef(null);
|
|
3118
3017
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3119
3018
|
const dragRef = React6.useRef(null);
|
|
3120
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3019
|
+
const colBoundaries = React6.useMemo(() => chunkPCW2KT7Z_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3121
3020
|
const measureRows = React6.useCallback(() => {
|
|
3122
3021
|
const container = containerRef.current;
|
|
3123
3022
|
if (!container) {
|
|
@@ -3164,11 +3063,11 @@ function TableResizeOverlay({
|
|
|
3164
3063
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3165
3064
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3166
3065
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3167
|
-
onResizeColumns(
|
|
3066
|
+
onResizeColumns(chunkPCW2KT7Z_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3168
3067
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3169
3068
|
const deltaY = e.clientY - drag.startPos;
|
|
3170
|
-
const newHeight =
|
|
3171
|
-
drag.initialRowHeight ??
|
|
3069
|
+
const newHeight = chunkPCW2KT7Z_js.computeResizedRowHeight(
|
|
3070
|
+
drag.initialRowHeight ?? chunkPCW2KT7Z_js.DEFAULT_ROW_HEIGHT,
|
|
3172
3071
|
deltaY
|
|
3173
3072
|
);
|
|
3174
3073
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3206,7 +3105,7 @@ function TableResizeOverlay({
|
|
|
3206
3105
|
e.stopPropagation();
|
|
3207
3106
|
const table = containerRef.current?.querySelector("table");
|
|
3208
3107
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3209
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3108
|
+
const actualHeight = tr?.offsetHeight ?? chunkPCW2KT7Z_js.DEFAULT_ROW_HEIGHT;
|
|
3210
3109
|
document.body.style.cursor = "row-resize";
|
|
3211
3110
|
document.body.style.userSelect = "none";
|
|
3212
3111
|
dragRef.current = {
|
|
@@ -3253,7 +3152,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3253
3152
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3254
3153
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3255
3154
|
};
|
|
3256
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3155
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkPCW2KT7Z_js.tableCellCss(
|
|
3257
3156
|
tableData,
|
|
3258
3157
|
cell,
|
|
3259
3158
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3266,7 +3165,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3266
3165
|
}
|
|
3267
3166
|
const first = selectedCell.selectedCells[0];
|
|
3268
3167
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3269
|
-
return
|
|
3168
|
+
return chunkPCW2KT7Z_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3270
3169
|
})();
|
|
3271
3170
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3272
3171
|
TableResizeOverlay,
|
|
@@ -3287,9 +3186,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3287
3186
|
{
|
|
3288
3187
|
className: "w-full h-full border-collapse table-fixed",
|
|
3289
3188
|
style: {
|
|
3290
|
-
fontFamily:
|
|
3189
|
+
fontFamily: chunkPCW2KT7Z_js.DEFAULT_FONT_FAMILY,
|
|
3291
3190
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3292
|
-
...
|
|
3191
|
+
...chunkPCW2KT7Z_js.tableContainerCss(tableData)
|
|
3293
3192
|
},
|
|
3294
3193
|
children: [
|
|
3295
3194
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3308,7 +3207,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3308
3207
|
return null;
|
|
3309
3208
|
}
|
|
3310
3209
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3311
|
-
const isInMultiSelection =
|
|
3210
|
+
const isInMultiSelection = chunkPCW2KT7Z_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3312
3211
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3313
3212
|
const diag = getCellDiagonalBorders2(
|
|
3314
3213
|
cell.style,
|
|
@@ -3337,7 +3236,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3337
3236
|
}
|
|
3338
3237
|
event.stopPropagation();
|
|
3339
3238
|
if (event.shiftKey && selectedCell) {
|
|
3340
|
-
const rect =
|
|
3239
|
+
const rect = chunkPCW2KT7Z_js.computeSelectionRect(
|
|
3341
3240
|
selectedCell.rowIndex,
|
|
3342
3241
|
selectedCell.columnIndex,
|
|
3343
3242
|
rowIndex,
|
|
@@ -3347,7 +3246,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3347
3246
|
options?.onSelectCell?.({
|
|
3348
3247
|
rowIndex: selectedCell.rowIndex,
|
|
3349
3248
|
columnIndex: selectedCell.columnIndex,
|
|
3350
|
-
selectedCells:
|
|
3249
|
+
selectedCells: chunkPCW2KT7Z_js.rectToCells(rect)
|
|
3351
3250
|
});
|
|
3352
3251
|
} else {
|
|
3353
3252
|
options?.onSelectCell?.({
|
|
@@ -3408,7 +3307,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3408
3307
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3409
3308
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3410
3309
|
}
|
|
3411
|
-
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"] });
|
|
3412
3311
|
}
|
|
3413
3312
|
const selectedCell = options?.selectedCell || null;
|
|
3414
3313
|
const isEditable = Boolean(options?.editable);
|
|
@@ -3423,7 +3322,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3423
3322
|
}
|
|
3424
3323
|
const first = selectedCell.selectedCells[0];
|
|
3425
3324
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3426
|
-
return
|
|
3325
|
+
return chunkPCW2KT7Z_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3427
3326
|
})();
|
|
3428
3327
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3429
3328
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3445,9 +3344,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3445
3344
|
{
|
|
3446
3345
|
className: "w-full h-full border-collapse table-fixed",
|
|
3447
3346
|
style: {
|
|
3448
|
-
fontFamily:
|
|
3347
|
+
fontFamily: chunkPCW2KT7Z_js.DEFAULT_FONT_FAMILY,
|
|
3449
3348
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3450
|
-
...
|
|
3349
|
+
...chunkPCW2KT7Z_js.tableContainerCss(tableEl.tableData)
|
|
3451
3350
|
},
|
|
3452
3351
|
children: [
|
|
3453
3352
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3504,7 +3403,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3504
3403
|
color: textStyle.color,
|
|
3505
3404
|
...bandStyle,
|
|
3506
3405
|
...xmlCellStyle,
|
|
3507
|
-
...tdCellOverride ?
|
|
3406
|
+
...tdCellOverride ? chunkPCW2KT7Z_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3508
3407
|
...diag ? { position: "relative" } : void 0
|
|
3509
3408
|
};
|
|
3510
3409
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3514,7 +3413,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3514
3413
|
"border px-1 py-0.5 align-top",
|
|
3515
3414
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3516
3415
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3517
|
-
|
|
3416
|
+
chunkPCW2KT7Z_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3518
3417
|
),
|
|
3519
3418
|
colSpan,
|
|
3520
3419
|
rowSpan: rSpan,
|
|
@@ -3525,7 +3424,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3525
3424
|
}
|
|
3526
3425
|
event.stopPropagation();
|
|
3527
3426
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3528
|
-
const rect =
|
|
3427
|
+
const rect = chunkPCW2KT7Z_js.computeSelectionRect(
|
|
3529
3428
|
selectedCell.rowIndex,
|
|
3530
3429
|
selectedCell.columnIndex,
|
|
3531
3430
|
rowIndex,
|
|
@@ -3535,7 +3434,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3535
3434
|
options?.onSelectCell?.({
|
|
3536
3435
|
rowIndex: selectedCell.rowIndex,
|
|
3537
3436
|
columnIndex: selectedCell.columnIndex,
|
|
3538
|
-
selectedCells:
|
|
3437
|
+
selectedCells: chunkPCW2KT7Z_js.rectToCells(rect)
|
|
3539
3438
|
});
|
|
3540
3439
|
} else {
|
|
3541
3440
|
options?.onSelectCell?.({
|
|
@@ -3594,23 +3493,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3594
3493
|
);
|
|
3595
3494
|
}
|
|
3596
3495
|
function partAttrs(part) {
|
|
3597
|
-
return part ?
|
|
3496
|
+
return part ? chunkPCW2KT7Z_js.chartPartToAttrs(part) : void 0;
|
|
3598
3497
|
}
|
|
3599
3498
|
function resolveReactPalette(chartData) {
|
|
3600
3499
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3601
3500
|
return chartData.colorPalette;
|
|
3602
3501
|
}
|
|
3603
|
-
return [...
|
|
3502
|
+
return [...chunkPCW2KT7Z_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3604
3503
|
}
|
|
3605
3504
|
function buildReactChartViewModel(element) {
|
|
3606
3505
|
if (element.type !== "chart" || !element.chartData) {
|
|
3607
|
-
return
|
|
3506
|
+
return chunkPCW2KT7Z_js.buildChartViewModel(element);
|
|
3608
3507
|
}
|
|
3609
3508
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3610
3509
|
...element,
|
|
3611
3510
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3612
3511
|
};
|
|
3613
|
-
return
|
|
3512
|
+
return chunkPCW2KT7Z_js.buildChartViewModel(themedElement);
|
|
3614
3513
|
}
|
|
3615
3514
|
function renderPrimitive(prim, key) {
|
|
3616
3515
|
switch (prim.kind) {
|
|
@@ -3759,7 +3658,7 @@ function renderText(t, key) {
|
|
|
3759
3658
|
);
|
|
3760
3659
|
}
|
|
3761
3660
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3762
|
-
const legendItems =
|
|
3661
|
+
const legendItems = chunkPCW2KT7Z_js.computeChartLegendLayout(vm);
|
|
3763
3662
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3764
3663
|
"svg",
|
|
3765
3664
|
{
|
|
@@ -3852,17 +3751,17 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3852
3751
|
}
|
|
3853
3752
|
function renderChartElement(element) {
|
|
3854
3753
|
if (element.type !== "chart") {
|
|
3855
|
-
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"] });
|
|
3856
3755
|
}
|
|
3857
3756
|
const chartData = element.chartData;
|
|
3858
3757
|
if (!chartData || chartData.series.length === 0) {
|
|
3859
|
-
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"] });
|
|
3860
3759
|
}
|
|
3861
|
-
const kind =
|
|
3760
|
+
const kind = chunkPCW2KT7Z_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3862
3761
|
return renderChartViewModel(
|
|
3863
3762
|
element.id,
|
|
3864
3763
|
buildReactChartViewModel(element),
|
|
3865
|
-
|
|
3764
|
+
chunkPCW2KT7Z_js.chartPreserveAspectRatio(kind)
|
|
3866
3765
|
);
|
|
3867
3766
|
}
|
|
3868
3767
|
|
|
@@ -3882,14 +3781,14 @@ function buildNotesPdf(pages) {
|
|
|
3882
3781
|
notes: page.notes,
|
|
3883
3782
|
slideNumber: page.slideNumber
|
|
3884
3783
|
}));
|
|
3885
|
-
const bytes =
|
|
3784
|
+
const bytes = chunkPCW2KT7Z_js.buildNotesPdfBytes(images, meta);
|
|
3886
3785
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3887
3786
|
return URL.createObjectURL(blob);
|
|
3888
3787
|
}
|
|
3889
3788
|
|
|
3890
3789
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3891
3790
|
function buildPdfFromImageData(images) {
|
|
3892
|
-
const bytes =
|
|
3791
|
+
const bytes = chunkPCW2KT7Z_js.buildSlidesPdfBytes(images);
|
|
3893
3792
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3894
3793
|
return URL.createObjectURL(blob);
|
|
3895
3794
|
}
|
|
@@ -3898,7 +3797,7 @@ function buildPdfFromImageData(images) {
|
|
|
3898
3797
|
var activePreview = null;
|
|
3899
3798
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3900
3799
|
stopPreviewAnimation();
|
|
3901
|
-
const descriptor =
|
|
3800
|
+
const descriptor = chunkPCW2KT7Z_js.buildPreviewAnimation(preset, options);
|
|
3902
3801
|
if (!descriptor) {
|
|
3903
3802
|
return;
|
|
3904
3803
|
}
|
|
@@ -3911,7 +3810,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3911
3810
|
return;
|
|
3912
3811
|
}
|
|
3913
3812
|
const stage = domEl.offsetParent;
|
|
3914
|
-
const descriptor =
|
|
3813
|
+
const descriptor = chunkPCW2KT7Z_js.buildMotionPathPreview({
|
|
3915
3814
|
path,
|
|
3916
3815
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3917
3816
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|
|
@@ -3989,7 +3888,7 @@ exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE;
|
|
|
3989
3888
|
exports.SHAPE_PRESETS = SHAPE_PRESETS;
|
|
3990
3889
|
exports.SHORTCUT_REFERENCE_ITEMS = SHORTCUT_REFERENCE_ITEMS;
|
|
3991
3890
|
exports.SLIDE_NAV_THUMBNAIL_WIDTH = SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
3992
|
-
exports.STROKE_DASH_OPTIONS =
|
|
3891
|
+
exports.STROKE_DASH_OPTIONS = STROKE_DASH_OPTIONS2;
|
|
3993
3892
|
exports.THEME_COLOR_SWATCHES = THEME_COLOR_SWATCHES;
|
|
3994
3893
|
exports.TOOLBAR_SECTIONS = TOOLBAR_SECTIONS;
|
|
3995
3894
|
exports.UNGROUPED_SECTION_ID = UNGROUPED_SECTION_ID;
|
|
@@ -4003,10 +3902,9 @@ exports.buildReactChartViewModel = buildReactChartViewModel;
|
|
|
4003
3902
|
exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle2;
|
|
4004
3903
|
exports.cloneHistorySnapshot = cloneHistorySnapshot2;
|
|
4005
3904
|
exports.cn = cn;
|
|
4006
|
-
exports.executeMediaCommand = executeMediaCommand;
|
|
4007
3905
|
exports.getAnimationInitialStyle = getAnimationInitialStyle2;
|
|
4008
3906
|
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
4009
|
-
exports.getCropShapeClipPath =
|
|
3907
|
+
exports.getCropShapeClipPath = getCropShapeClipPath2;
|
|
4010
3908
|
exports.getDuotoneColors = getDuotoneColors;
|
|
4011
3909
|
exports.getImageRenderStyle = getImageRenderStyle;
|
|
4012
3910
|
exports.getImageSurfaceMaskStyle = getImageSurfaceMaskStyle;
|