pptx-react-viewer 3.1.5 → 3.3.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 +35 -0
- package/dist/{AiChatPanel-ITCVRVKP.mjs → AiChatPanel-BNFDBP4S.mjs} +9 -8
- package/dist/AiChatPanel-BNFDBP4S.mjs.br +0 -0
- package/dist/AiChatPanel-BNFDBP4S.mjs.gz +0 -0
- package/dist/{AiChatPanel-TO5PHBGW.js → AiChatPanel-WNQCTQB5.js} +29 -28
- package/dist/AiChatPanel-WNQCTQB5.js.br +0 -0
- package/dist/AiChatPanel-WNQCTQB5.js.gz +0 -0
- package/dist/{Area3DChartScene-2UNQ3J3V.js → Area3DChartScene-FXBSLIGX.js} +2 -2
- package/dist/Area3DChartScene-FXBSLIGX.js.br +0 -0
- package/dist/Area3DChartScene-FXBSLIGX.js.gz +0 -0
- package/dist/{Area3DChartScene-7PHPDOTG.mjs → Area3DChartScene-SAQVRYOH.mjs} +1 -1
- package/dist/Area3DChartScene-SAQVRYOH.mjs.br +0 -0
- package/dist/Area3DChartScene-SAQVRYOH.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-MC5S3AGT.js → Bar3DChartScene-7HVUTP2E.js} +2 -2
- package/dist/Bar3DChartScene-7HVUTP2E.js.br +0 -0
- package/dist/Bar3DChartScene-7HVUTP2E.js.gz +0 -0
- package/dist/{Bar3DChartScene-BLPUHYRZ.mjs → Bar3DChartScene-LUA6E2K6.mjs} +1 -1
- package/dist/Bar3DChartScene-LUA6E2K6.mjs.br +3 -0
- package/dist/Bar3DChartScene-LUA6E2K6.mjs.gz +0 -0
- package/dist/{Line3DChartScene-L5B4YFG3.mjs → Line3DChartScene-IW4JGH57.mjs} +1 -1
- package/dist/Line3DChartScene-IW4JGH57.mjs.br +0 -0
- package/dist/Line3DChartScene-IW4JGH57.mjs.gz +0 -0
- package/dist/{Line3DChartScene-JVVZRIDD.js → Line3DChartScene-OVPULUTF.js} +2 -2
- package/dist/Line3DChartScene-OVPULUTF.js.br +0 -0
- package/dist/Line3DChartScene-OVPULUTF.js.gz +0 -0
- package/dist/{Model3DScene-LRDNQNKJ.js → Model3DScene-5KP6BVCV.js} +2 -2
- package/dist/Model3DScene-5KP6BVCV.js.br +0 -0
- package/dist/Model3DScene-5KP6BVCV.js.gz +0 -0
- package/dist/{Model3DScene-6TNWS5LV.mjs → Model3DScene-BERTZYCJ.mjs} +1 -1
- package/dist/Model3DScene-BERTZYCJ.mjs.br +0 -0
- package/dist/Model3DScene-BERTZYCJ.mjs.gz +0 -0
- package/dist/{PieChart3DScene-PZWZCXHX.js → PieChart3DScene-3R2ETTGA.js} +2 -2
- package/dist/PieChart3DScene-3R2ETTGA.js.br +0 -0
- package/dist/PieChart3DScene-3R2ETTGA.js.gz +0 -0
- package/dist/{PieChart3DScene-XXAIVP4I.mjs → PieChart3DScene-O6FFK5L7.mjs} +1 -1
- package/dist/PieChart3DScene-O6FFK5L7.mjs.br +0 -0
- package/dist/PieChart3DScene-O6FFK5L7.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-CRUGJSCY.mjs → SurfaceChart3DScene-OCR26R5D.mjs} +1 -1
- package/dist/SurfaceChart3DScene-OCR26R5D.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-OCR26R5D.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-UBQV3ZN2.js → SurfaceChart3DScene-TGFAOLHL.js} +2 -2
- package/dist/SurfaceChart3DScene-TGFAOLHL.js.br +0 -0
- package/dist/SurfaceChart3DScene-TGFAOLHL.js.gz +0 -0
- package/dist/{chunk-QOLYY7E3.mjs → chunk-2FTJAMFA.mjs} +300 -66
- package/dist/chunk-2FTJAMFA.mjs.br +0 -0
- package/dist/chunk-2FTJAMFA.mjs.gz +0 -0
- package/dist/{chunk-P3VXXUZM.mjs → chunk-3B5FRKYU.mjs} +137 -438
- package/dist/chunk-3B5FRKYU.mjs.br +0 -0
- package/dist/chunk-3B5FRKYU.mjs.gz +0 -0
- package/dist/{chunk-SWRY3SI5.js → chunk-3P7FYHJH.js} +47 -1
- package/dist/chunk-3P7FYHJH.js.br +0 -0
- package/dist/chunk-3P7FYHJH.js.gz +0 -0
- package/dist/{chunk-T2QG2HD5.js → chunk-44CQ67GQ.js} +173 -262
- package/dist/chunk-44CQ67GQ.js.br +0 -0
- package/dist/chunk-44CQ67GQ.js.gz +0 -0
- package/dist/{chunk-ARJE3V6V.mjs → chunk-AMRT3AE4.mjs} +47 -1
- package/dist/chunk-AMRT3AE4.mjs.br +0 -0
- package/dist/chunk-AMRT3AE4.mjs.gz +0 -0
- package/dist/{chunk-XIHK52SB.mjs → chunk-DM2IZCSD.mjs} +8499 -3404
- package/dist/chunk-DM2IZCSD.mjs.br +0 -0
- package/dist/chunk-DM2IZCSD.mjs.gz +0 -0
- package/dist/{chunk-LGVNUG3G.js → chunk-FSQCEAMG.js} +305 -68
- package/dist/chunk-FSQCEAMG.js.br +0 -0
- package/dist/chunk-FSQCEAMG.js.gz +0 -0
- package/dist/{chunk-LXYDXLKZ.js → chunk-GR6SJJIT.js} +463 -776
- package/dist/chunk-GR6SJJIT.js.br +0 -0
- package/dist/chunk-GR6SJJIT.js.gz +0 -0
- package/dist/{chunk-BPWSJLLG.mjs → chunk-ITN5NYYM.mjs} +10 -98
- package/dist/chunk-ITN5NYYM.mjs.br +0 -0
- package/dist/chunk-ITN5NYYM.mjs.gz +0 -0
- package/dist/{chunk-YDEEINER.js → chunk-K6R2JNCK.js} +8531 -3410
- package/dist/chunk-K6R2JNCK.js.br +0 -0
- package/dist/chunk-K6R2JNCK.js.gz +0 -0
- package/dist/{chunk-A2UAUSJM.mjs → chunk-QEEU4S4Z.mjs} +65 -378
- package/dist/chunk-QEEU4S4Z.mjs.br +0 -0
- package/dist/chunk-QEEU4S4Z.mjs.gz +0 -0
- package/dist/{chunk-ZPF4L6SD.js → chunk-QKSYKQEL.js} +1243 -1544
- package/dist/chunk-QKSYKQEL.js.br +0 -0
- package/dist/chunk-QKSYKQEL.js.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +170 -17
- 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 +170 -17
- 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/viewer/index.d.ts +170 -17
- 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-ITCVRVKP.mjs.br +0 -0
- package/dist/AiChatPanel-ITCVRVKP.mjs.gz +0 -0
- package/dist/AiChatPanel-TO5PHBGW.js.br +0 -0
- package/dist/AiChatPanel-TO5PHBGW.js.gz +0 -0
- package/dist/Area3DChartScene-2UNQ3J3V.js.br +0 -0
- package/dist/Area3DChartScene-2UNQ3J3V.js.gz +0 -0
- package/dist/Area3DChartScene-7PHPDOTG.mjs.br +0 -0
- package/dist/Area3DChartScene-7PHPDOTG.mjs.gz +0 -0
- package/dist/Bar3DChartScene-BLPUHYRZ.mjs.br +0 -0
- package/dist/Bar3DChartScene-BLPUHYRZ.mjs.gz +0 -0
- package/dist/Bar3DChartScene-MC5S3AGT.js.br +0 -0
- package/dist/Bar3DChartScene-MC5S3AGT.js.gz +0 -0
- package/dist/Line3DChartScene-JVVZRIDD.js.br +0 -0
- package/dist/Line3DChartScene-JVVZRIDD.js.gz +0 -0
- package/dist/Line3DChartScene-L5B4YFG3.mjs.br +0 -0
- package/dist/Line3DChartScene-L5B4YFG3.mjs.gz +0 -0
- package/dist/Model3DScene-6TNWS5LV.mjs.br +0 -0
- package/dist/Model3DScene-6TNWS5LV.mjs.gz +0 -0
- package/dist/Model3DScene-LRDNQNKJ.js.br +0 -0
- package/dist/Model3DScene-LRDNQNKJ.js.gz +0 -0
- package/dist/PieChart3DScene-PZWZCXHX.js.br +0 -0
- package/dist/PieChart3DScene-PZWZCXHX.js.gz +0 -0
- package/dist/PieChart3DScene-XXAIVP4I.mjs.br +0 -0
- package/dist/PieChart3DScene-XXAIVP4I.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-CRUGJSCY.mjs.br +0 -1
- package/dist/SurfaceChart3DScene-CRUGJSCY.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-UBQV3ZN2.js.br +0 -0
- package/dist/SurfaceChart3DScene-UBQV3ZN2.js.gz +0 -0
- package/dist/chunk-A2UAUSJM.mjs.br +0 -0
- package/dist/chunk-A2UAUSJM.mjs.gz +0 -0
- package/dist/chunk-ARJE3V6V.mjs.br +0 -0
- package/dist/chunk-ARJE3V6V.mjs.gz +0 -0
- package/dist/chunk-BPWSJLLG.mjs.br +0 -0
- package/dist/chunk-BPWSJLLG.mjs.gz +0 -0
- package/dist/chunk-LGVNUG3G.js.br +0 -0
- package/dist/chunk-LGVNUG3G.js.gz +0 -0
- package/dist/chunk-LXYDXLKZ.js.br +0 -0
- package/dist/chunk-LXYDXLKZ.js.gz +0 -0
- package/dist/chunk-P3VXXUZM.mjs.br +0 -0
- package/dist/chunk-P3VXXUZM.mjs.gz +0 -0
- package/dist/chunk-QOLYY7E3.mjs.br +0 -0
- package/dist/chunk-QOLYY7E3.mjs.gz +0 -0
- package/dist/chunk-SWRY3SI5.js.br +0 -0
- package/dist/chunk-SWRY3SI5.js.gz +0 -0
- package/dist/chunk-T2QG2HD5.js.br +0 -0
- package/dist/chunk-T2QG2HD5.js.gz +0 -0
- package/dist/chunk-XIHK52SB.mjs.br +0 -0
- package/dist/chunk-XIHK52SB.mjs.gz +0 -0
- package/dist/chunk-YDEEINER.js.br +0 -0
- package/dist/chunk-YDEEINER.js.gz +0 -0
- package/dist/chunk-ZPF4L6SD.js.br +0 -0
- package/dist/chunk-ZPF4L6SD.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkK6R2JNCK_js = require('./chunk-K6R2JNCK.js');
|
|
4
|
+
var chunk3P7FYHJH_js = require('./chunk-3P7FYHJH.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 chunkK6R2JNCK_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 chunkK6R2JNCK_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 = chunkK6R2JNCK_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 = chunkK6R2JNCK_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 = chunkK6R2JNCK_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 (!chunkK6R2JNCK_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 (!chunkK6R2JNCK_js.hasShapeProperties(element)) {
|
|
277
252
|
return void 0;
|
|
278
253
|
}
|
|
279
|
-
const geometry =
|
|
254
|
+
const geometry = chunkK6R2JNCK_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 = chunkK6R2JNCK_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.
|
|
@@ -300,7 +275,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
300
275
|
};
|
|
301
276
|
}
|
|
302
277
|
function getImageSurfaceStyle(element) {
|
|
303
|
-
const fill =
|
|
278
|
+
const fill = chunkK6R2JNCK_js.hasShapeProperties(element) ? chunkK6R2JNCK_js.getComputedFillStyle(element) : void 0;
|
|
304
279
|
return {
|
|
305
280
|
position: "absolute",
|
|
306
281
|
inset: 0,
|
|
@@ -322,7 +297,7 @@ var CROP_SHAPE_CLIP_PATHS = {
|
|
|
322
297
|
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
323
298
|
};
|
|
324
299
|
function getCropShapeClipPath(element) {
|
|
325
|
-
if (!
|
|
300
|
+
if (!chunkK6R2JNCK_js.isImageLikeElement(element)) {
|
|
326
301
|
return void 0;
|
|
327
302
|
}
|
|
328
303
|
const shape = element.cropShape;
|
|
@@ -332,7 +307,7 @@ function getCropShapeClipPath(element) {
|
|
|
332
307
|
return CROP_SHAPE_CLIP_PATHS[shape];
|
|
333
308
|
}
|
|
334
309
|
function getImageTilingStyle2(element) {
|
|
335
|
-
return
|
|
310
|
+
return chunkK6R2JNCK_js.getImageTilingStyle(element);
|
|
336
311
|
}
|
|
337
312
|
|
|
338
313
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -474,7 +449,7 @@ function VideoWithMetadata({
|
|
|
474
449
|
{
|
|
475
450
|
ref: mediaRef,
|
|
476
451
|
className: "w-full h-full pointer-events-auto",
|
|
477
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
452
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkK6R2JNCK_js.getImageFitStyle(element),
|
|
478
453
|
controls: showTransport,
|
|
479
454
|
preload: "metadata",
|
|
480
455
|
playsInline: true,
|
|
@@ -517,27 +492,6 @@ function AudioWithMetadata({
|
|
|
517
492
|
}
|
|
518
493
|
) });
|
|
519
494
|
}
|
|
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 chunkYDEEINER_js.runMediaCommand(
|
|
537
|
-
command,
|
|
538
|
-
(targetId) => registry.get(targetId) ?? chunkYDEEINER_js.findMediaElementByElementId(targetId, frameRoot?.())
|
|
539
|
-
);
|
|
540
|
-
}
|
|
541
495
|
function PresentationMediaController({
|
|
542
496
|
element,
|
|
543
497
|
isPresentationMode,
|
|
@@ -568,18 +522,7 @@ function PresentationMediaController({
|
|
|
568
522
|
}
|
|
569
523
|
};
|
|
570
524
|
}, []);
|
|
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
|
-
} = chunkYDEEINER_js.mediaPlaybackAttributes({
|
|
525
|
+
const { volume: playbackVolume, playbackRate } = chunkK6R2JNCK_js.mediaPlaybackAttributes({
|
|
583
526
|
loop: element.loop,
|
|
584
527
|
volume: element.volume,
|
|
585
528
|
playbackSpeed: element.playbackSpeed
|
|
@@ -714,15 +657,7 @@ function PresentationMediaController({
|
|
|
714
657
|
}
|
|
715
658
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
716
659
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
717
|
-
if (dataUrl) {
|
|
718
|
-
chunkYDEEINER_js.registerPersistentAudio(
|
|
719
|
-
element.id,
|
|
720
|
-
dataUrl,
|
|
721
|
-
element.mediaMimeType,
|
|
722
|
-
shouldLoop,
|
|
723
|
-
playbackVolume,
|
|
724
|
-
trimStartSec
|
|
725
|
-
);
|
|
660
|
+
if (chunkK6R2JNCK_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
726
661
|
return;
|
|
727
662
|
}
|
|
728
663
|
}
|
|
@@ -738,19 +673,7 @@ function PresentationMediaController({
|
|
|
738
673
|
});
|
|
739
674
|
}, 100);
|
|
740
675
|
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
|
-
]);
|
|
676
|
+
}, [isPresentationMode, shouldAutoPlay, element, resolvedDataUrl, trimStartSec]);
|
|
754
677
|
const wrapperStyle = hideWhenNotPlaying ? {
|
|
755
678
|
opacity: isMediaPlaying ? 1 : 0,
|
|
756
679
|
transition: "opacity 0.3s ease",
|
|
@@ -777,7 +700,7 @@ function PresentationMediaController({
|
|
|
777
700
|
] });
|
|
778
701
|
}
|
|
779
702
|
function label(key) {
|
|
780
|
-
return key === void 0 ? void 0 :
|
|
703
|
+
return key === void 0 ? void 0 : chunk3P7FYHJH_js.translationsEn[key];
|
|
781
704
|
}
|
|
782
705
|
function FallbackIcon({
|
|
783
706
|
paths,
|
|
@@ -813,17 +736,17 @@ function Badge({
|
|
|
813
736
|
"div",
|
|
814
737
|
{
|
|
815
738
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
816
|
-
...{ [
|
|
739
|
+
...{ [chunkK6R2JNCK_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
817
740
|
children: [
|
|
818
741
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
819
742
|
FallbackIcon,
|
|
820
743
|
{
|
|
821
|
-
paths:
|
|
744
|
+
paths: chunkK6R2JNCK_js.mediaFallbackIcon(visual, element.mediaType),
|
|
822
745
|
size: isMissing ? 32 : 48,
|
|
823
746
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
824
747
|
}
|
|
825
748
|
),
|
|
826
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
749
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkK6R2JNCK_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
827
750
|
]
|
|
828
751
|
}
|
|
829
752
|
);
|
|
@@ -840,17 +763,17 @@ function Placeholder({
|
|
|
840
763
|
"div",
|
|
841
764
|
{
|
|
842
765
|
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
|
-
...{ [
|
|
766
|
+
...{ [chunkK6R2JNCK_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
844
767
|
children: [
|
|
845
768
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
846
769
|
FallbackIcon,
|
|
847
770
|
{
|
|
848
|
-
paths:
|
|
771
|
+
paths: chunkK6R2JNCK_js.mediaFallbackIcon(visual, element.mediaType),
|
|
849
772
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
850
773
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
851
774
|
}
|
|
852
775
|
),
|
|
853
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
776
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkK6R2JNCK_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
854
777
|
]
|
|
855
778
|
}
|
|
856
779
|
);
|
|
@@ -860,7 +783,7 @@ function renderMediaFallback({
|
|
|
860
783
|
posterUrl,
|
|
861
784
|
surface
|
|
862
785
|
}) {
|
|
863
|
-
const visual =
|
|
786
|
+
const visual = chunkK6R2JNCK_js.mediaFallbackVisual(surface, {
|
|
864
787
|
hasPoster: Boolean(posterUrl),
|
|
865
788
|
missing: element.mediaMissing === true
|
|
866
789
|
});
|
|
@@ -870,9 +793,9 @@ function renderMediaFallback({
|
|
|
870
793
|
"img",
|
|
871
794
|
{
|
|
872
795
|
src: posterUrl,
|
|
873
|
-
alt: visual.dimPoster ?
|
|
796
|
+
alt: visual.dimPoster ? chunk3P7FYHJH_js.translationsEn["pptx.media.posterAlt"] : chunk3P7FYHJH_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
874
797
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
875
|
-
style:
|
|
798
|
+
style: chunkK6R2JNCK_js.getImageFitStyle(element)
|
|
876
799
|
}
|
|
877
800
|
),
|
|
878
801
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -882,7 +805,7 @@ function renderMediaFallback({
|
|
|
882
805
|
}
|
|
883
806
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
884
807
|
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:
|
|
808
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3P7FYHJH_js.translationsEn["pptx.media.title"] });
|
|
886
809
|
}
|
|
887
810
|
const mediaType = element.mediaType;
|
|
888
811
|
const mediaPath = element.mediaPath;
|
|
@@ -890,7 +813,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
890
813
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
891
814
|
const trimFragment = buildTrimFragment(element);
|
|
892
815
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
893
|
-
const shouldLoop =
|
|
816
|
+
const shouldLoop = chunkK6R2JNCK_js.mediaPlaybackAttributes(element).loop;
|
|
894
817
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
895
818
|
const isFullScreen = options?.fullScreen === true;
|
|
896
819
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -968,25 +891,25 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
968
891
|
if (surface.presenting || surface.preview) {
|
|
969
892
|
return null;
|
|
970
893
|
}
|
|
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:
|
|
894
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3P7FYHJH_js.translationsEn["pptx.media.title"] });
|
|
972
895
|
}
|
|
973
896
|
|
|
974
897
|
// src/viewer/utils/text-utils.tsx
|
|
975
898
|
function getTextStyleForElement(element, fallbackColor) {
|
|
976
|
-
return
|
|
899
|
+
return chunkK6R2JNCK_js.buildTextBlockStyle(element, { fallbackColor });
|
|
977
900
|
}
|
|
978
901
|
|
|
979
902
|
// src/viewer/utils/text-layout.tsx
|
|
980
903
|
function getTextLayoutStyle(element) {
|
|
981
|
-
if (!
|
|
904
|
+
if (!chunkK6R2JNCK_js.hasTextProperties(element)) {
|
|
982
905
|
return {};
|
|
983
906
|
}
|
|
984
|
-
const writingMode =
|
|
985
|
-
const textOrientation =
|
|
986
|
-
const verticalDirection =
|
|
907
|
+
const writingMode = chunkK6R2JNCK_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
908
|
+
const textOrientation = chunkK6R2JNCK_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
909
|
+
const verticalDirection = chunkK6R2JNCK_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
987
910
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
988
911
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
989
|
-
const hasParagraphIndents =
|
|
912
|
+
const hasParagraphIndents = chunkK6R2JNCK_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
990
913
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
991
914
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
992
915
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -995,7 +918,7 @@ function getTextLayoutStyle(element) {
|
|
|
995
918
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
996
919
|
return {
|
|
997
920
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
998
|
-
...
|
|
921
|
+
...chunkK6R2JNCK_js.buildTextBodyLayoutStyle(element),
|
|
999
922
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
1000
923
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
1001
924
|
paddingTop: bodyTop,
|
|
@@ -1023,7 +946,7 @@ function getTextLayoutStyle(element) {
|
|
|
1023
946
|
|
|
1024
947
|
// src/viewer/utils/text-effects.tsx
|
|
1025
948
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
1026
|
-
return
|
|
949
|
+
return chunkK6R2JNCK_js.buildTextBody3DSceneStyle(textStyle);
|
|
1027
950
|
}
|
|
1028
951
|
|
|
1029
952
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1208,13 +1131,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1208
1131
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1209
1132
|
return renderedSegments;
|
|
1210
1133
|
}
|
|
1211
|
-
const paraKey = `${elementId}${
|
|
1134
|
+
const paraKey = `${elementId}${chunkK6R2JNCK_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1212
1135
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1213
1136
|
if (paraState) {
|
|
1214
1137
|
const style = buildAnimStyle(paraState);
|
|
1215
1138
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1216
1139
|
}
|
|
1217
|
-
const spec =
|
|
1140
|
+
const spec = chunkK6R2JNCK_js.buildTextBuildSpec(
|
|
1218
1141
|
elementId,
|
|
1219
1142
|
paraIndex,
|
|
1220
1143
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1232,7 +1155,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1232
1155
|
"span",
|
|
1233
1156
|
{
|
|
1234
1157
|
"data-anim-id": span.animId,
|
|
1235
|
-
style:
|
|
1158
|
+
style: chunkK6R2JNCK_js.textBuildSpanStyle(span),
|
|
1236
1159
|
children: content
|
|
1237
1160
|
},
|
|
1238
1161
|
span.animId
|
|
@@ -1240,7 +1163,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1240
1163
|
});
|
|
1241
1164
|
}
|
|
1242
1165
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle) {
|
|
1243
|
-
const [lineLayout] =
|
|
1166
|
+
const [lineLayout] = chunkK6R2JNCK_js.buildRunTabLines(line, ctx, nestedStyle);
|
|
1244
1167
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", whiteSpace: "nowrap" }, children: lineLayout.pieces.map((piece, i) => {
|
|
1245
1168
|
const key = `${keyPrefix}-tab-${i}`;
|
|
1246
1169
|
return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
|
|
@@ -1253,7 +1176,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1253
1176
|
if (!needsScriptFonts || !text) {
|
|
1254
1177
|
return text;
|
|
1255
1178
|
}
|
|
1256
|
-
const pieces =
|
|
1179
|
+
const pieces = chunkK6R2JNCK_js.splitRunByScriptFont(
|
|
1257
1180
|
text,
|
|
1258
1181
|
scriptFonts,
|
|
1259
1182
|
baseFontFamily,
|
|
@@ -1270,7 +1193,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1270
1193
|
if (!metric || !text) {
|
|
1271
1194
|
return inner(text, keyPrefix);
|
|
1272
1195
|
}
|
|
1273
|
-
const pieces =
|
|
1196
|
+
const pieces = chunkK6R2JNCK_js.splitRunForMetrics(text, metric.font);
|
|
1274
1197
|
if (pieces.length <= 1) {
|
|
1275
1198
|
return inner(text, keyPrefix);
|
|
1276
1199
|
}
|
|
@@ -1279,7 +1202,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1279
1202
|
{
|
|
1280
1203
|
style: {
|
|
1281
1204
|
...metric.nestedStyle,
|
|
1282
|
-
letterSpacing:
|
|
1205
|
+
letterSpacing: chunkK6R2JNCK_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1283
1206
|
},
|
|
1284
1207
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1285
1208
|
},
|
|
@@ -1366,8 +1289,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1366
1289
|
});
|
|
1367
1290
|
}
|
|
1368
1291
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1369
|
-
const mathml =
|
|
1370
|
-
const safeMathml = mathml ?
|
|
1292
|
+
const mathml = chunkK6R2JNCK_js.convertOmmlToMathMl(equationXml);
|
|
1293
|
+
const safeMathml = mathml ? chunkK6R2JNCK_js.sanitizeMathMl(mathml) : "";
|
|
1371
1294
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1372
1295
|
"span",
|
|
1373
1296
|
{
|
|
@@ -1377,7 +1300,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1377
1300
|
},
|
|
1378
1301
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1379
1302
|
}
|
|
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:
|
|
1303
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunk3P7FYHJH_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1381
1304
|
if (equationNumber) {
|
|
1382
1305
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1383
1306
|
"span",
|
|
@@ -1495,7 +1418,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1495
1418
|
const segmentStyle = segment?.style ?? {};
|
|
1496
1419
|
const textValue = run.text;
|
|
1497
1420
|
const lines = textValue.split("\n");
|
|
1498
|
-
const resolvedSegmentColor =
|
|
1421
|
+
const resolvedSegmentColor = chunkK6R2JNCK_js.normalizeHexColor(
|
|
1499
1422
|
segmentStyle.color || element.textStyle?.color,
|
|
1500
1423
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1501
1424
|
);
|
|
@@ -1503,16 +1426,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1503
1426
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1504
1427
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1505
1428
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1506
|
-
const baseFontSize = rawFontSize *
|
|
1429
|
+
const baseFontSize = rawFontSize * chunkK6R2JNCK_js.resolveAutoFitFontScale(element.textStyle);
|
|
1507
1430
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1508
|
-
const fontKerning =
|
|
1431
|
+
const fontKerning = chunkK6R2JNCK_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1509
1432
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1510
|
-
const baseFontFamily = rawFontFamily ?
|
|
1433
|
+
const baseFontFamily = rawFontFamily ? chunkK6R2JNCK_js.getSubstituteFontFamily(
|
|
1511
1434
|
rawFontFamily,
|
|
1512
|
-
|
|
1435
|
+
chunkK6R2JNCK_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1513
1436
|
) : DEFAULT_FONT_FAMILY2;
|
|
1514
|
-
const scriptFonts =
|
|
1515
|
-
const needsScriptFonts =
|
|
1437
|
+
const scriptFonts = chunkK6R2JNCK_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1438
|
+
const needsScriptFonts = chunkK6R2JNCK_js.hasDistinctScriptFonts(scriptFonts);
|
|
1516
1439
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1517
1440
|
const metricFont = {
|
|
1518
1441
|
fontFamily: baseFontFamily,
|
|
@@ -1520,7 +1443,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1520
1443
|
bold: Boolean(segmentStyle.bold),
|
|
1521
1444
|
italic: Boolean(segmentStyle.italic)
|
|
1522
1445
|
};
|
|
1523
|
-
const nestedStyle =
|
|
1446
|
+
const nestedStyle = chunkK6R2JNCK_js.nestedTextDecorationStyle(run.style);
|
|
1524
1447
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1525
1448
|
const spanStyle = { ...run.style };
|
|
1526
1449
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1528,11 +1451,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1528
1451
|
spanStyle.fontFamily = baseFontFamily;
|
|
1529
1452
|
spanStyle.verticalAlign = baselineShift;
|
|
1530
1453
|
spanStyle.fontKerning = fontKerning;
|
|
1531
|
-
spanStyle.letterSpacing =
|
|
1454
|
+
spanStyle.letterSpacing = chunkK6R2JNCK_js.pieceLetterSpacing(
|
|
1532
1455
|
authoredLetterSpacing,
|
|
1533
|
-
|
|
1456
|
+
chunkK6R2JNCK_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1534
1457
|
);
|
|
1535
|
-
const hollow =
|
|
1458
|
+
const hollow = chunkK6R2JNCK_js.hollowTextFillStyle(segmentStyle, {
|
|
1536
1459
|
color: resolvedSegmentColor,
|
|
1537
1460
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1538
1461
|
});
|
|
@@ -1553,7 +1476,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1553
1476
|
scriptFonts,
|
|
1554
1477
|
baseFontFamily,
|
|
1555
1478
|
findHighlights,
|
|
1556
|
-
|
|
1479
|
+
chunkK6R2JNCK_js.buildTabContext(
|
|
1557
1480
|
element.textStyle?.tabStops,
|
|
1558
1481
|
element.textStyle?.defaultTabSize,
|
|
1559
1482
|
baseFontSize,
|
|
@@ -1578,18 +1501,18 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1578
1501
|
/* @__PURE__ */ jsxRuntime.jsx("rp", { children: ")" })
|
|
1579
1502
|
] });
|
|
1580
1503
|
}
|
|
1581
|
-
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
1582
|
-
if (!
|
|
1504
|
+
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt) {
|
|
1505
|
+
if (!chunkK6R2JNCK_js.hasTextProperties(element)) {
|
|
1583
1506
|
return emptyFallback || null;
|
|
1584
1507
|
}
|
|
1585
1508
|
const segments = segmentOverrides ?? element.textSegments;
|
|
1586
1509
|
if (!segments || segments.length === 0) {
|
|
1587
|
-
if (
|
|
1588
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style:
|
|
1510
|
+
if (placeholderPrompt) {
|
|
1511
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: placeholderPrompt.style, children: placeholderPrompt.text });
|
|
1589
1512
|
}
|
|
1590
1513
|
return element.text || emptyFallback || "";
|
|
1591
1514
|
}
|
|
1592
|
-
const paragraphs =
|
|
1515
|
+
const paragraphs = chunkK6R2JNCK_js.buildParagraphs(element, fieldContext, segmentOverrides);
|
|
1593
1516
|
const ctx = {
|
|
1594
1517
|
element,
|
|
1595
1518
|
fallbackColor,
|
|
@@ -1710,25 +1633,14 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1710
1633
|
`${elementId}-para-${paraIndex}-bullet`
|
|
1711
1634
|
);
|
|
1712
1635
|
}
|
|
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
1636
|
function getDuotoneColors(element) {
|
|
1725
|
-
if (!
|
|
1637
|
+
if (!chunkK6R2JNCK_js.isImageLikeElement(element)) {
|
|
1726
1638
|
return void 0;
|
|
1727
1639
|
}
|
|
1728
1640
|
return element.imageEffects?.duotone;
|
|
1729
1641
|
}
|
|
1730
1642
|
function buildLineShadowCss(element) {
|
|
1731
|
-
if (!
|
|
1643
|
+
if (!chunkK6R2JNCK_js.hasShapeProperties(element)) {
|
|
1732
1644
|
return void 0;
|
|
1733
1645
|
}
|
|
1734
1646
|
const ss = element.shapeStyle;
|
|
@@ -1739,13 +1651,13 @@ function buildLineShadowCss(element) {
|
|
|
1739
1651
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1740
1652
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1741
1653
|
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
|
-
|
|
1654
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkK6R2JNCK_js.colorWithOpacity(
|
|
1655
|
+
chunkK6R2JNCK_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1744
1656
|
opacity
|
|
1745
1657
|
)}`;
|
|
1746
1658
|
}
|
|
1747
1659
|
function buildLineGlowFilter(element) {
|
|
1748
|
-
if (!
|
|
1660
|
+
if (!chunkK6R2JNCK_js.hasShapeProperties(element)) {
|
|
1749
1661
|
return void 0;
|
|
1750
1662
|
}
|
|
1751
1663
|
const ss = element.shapeStyle;
|
|
@@ -1754,22 +1666,22 @@ function buildLineGlowFilter(element) {
|
|
|
1754
1666
|
}
|
|
1755
1667
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1756
1668
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1757
|
-
const glowCol =
|
|
1669
|
+
const glowCol = chunkK6R2JNCK_js.colorWithOpacity(chunkK6R2JNCK_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1758
1670
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1759
1671
|
}
|
|
1760
1672
|
function getDagDuotoneFilterId(elementId) {
|
|
1761
1673
|
return `dag-duotone-${elementId}`;
|
|
1762
1674
|
}
|
|
1763
1675
|
function hasDagDuotoneEffect(element) {
|
|
1764
|
-
if (!
|
|
1676
|
+
if (!chunkK6R2JNCK_js.hasShapeProperties(element)) {
|
|
1765
1677
|
return false;
|
|
1766
1678
|
}
|
|
1767
1679
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1768
1680
|
}
|
|
1769
1681
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1770
1682
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1771
|
-
const c1 = hexToRgbUnit(color1);
|
|
1772
|
-
const c2 = hexToRgbUnit(color2);
|
|
1683
|
+
const c1 = chunkK6R2JNCK_js.hexToRgbUnit(color1);
|
|
1684
|
+
const c2 = chunkK6R2JNCK_js.hexToRgbUnit(color2);
|
|
1773
1685
|
const grayscaleMatrix = [
|
|
1774
1686
|
0.2126,
|
|
1775
1687
|
0.7152,
|
|
@@ -1813,7 +1725,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1813
1725
|
|
|
1814
1726
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1815
1727
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1816
|
-
return
|
|
1728
|
+
return chunkK6R2JNCK_js.build3DExtrusionData(
|
|
1817
1729
|
shape3d,
|
|
1818
1730
|
scene3d,
|
|
1819
1731
|
fillColor,
|
|
@@ -1822,7 +1734,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1822
1734
|
);
|
|
1823
1735
|
}
|
|
1824
1736
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
1825
|
-
|
|
1737
|
+
chunkK6R2JNCK_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
1826
1738
|
}
|
|
1827
1739
|
|
|
1828
1740
|
// src/viewer/utils/shape-visual-style.ts
|
|
@@ -1830,16 +1742,16 @@ function rendersCustomVectorPath(element) {
|
|
|
1830
1742
|
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
1743
|
}
|
|
1832
1744
|
function rendersWedgeCalloutVector(element) {
|
|
1833
|
-
return element.type === "shape" &&
|
|
1745
|
+
return element.type === "shape" && chunkK6R2JNCK_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1834
1746
|
}
|
|
1835
1747
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1836
|
-
if (!
|
|
1748
|
+
if (!chunkK6R2JNCK_js.hasShapeProperties(element)) {
|
|
1837
1749
|
return {};
|
|
1838
1750
|
}
|
|
1839
1751
|
const ss = element.shapeStyle;
|
|
1840
|
-
const fill = animatesFill ? void 0 :
|
|
1841
|
-
const fx =
|
|
1842
|
-
const stroke =
|
|
1752
|
+
const fill = animatesFill ? void 0 : chunkK6R2JNCK_js.getComputedFillStyle(element, parentGroupFill);
|
|
1753
|
+
const fx = chunkK6R2JNCK_js.getComputedEffectStyle(element);
|
|
1754
|
+
const stroke = chunkK6R2JNCK_js.getComputedStrokeStyle(element);
|
|
1843
1755
|
const base = {
|
|
1844
1756
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1845
1757
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1878,7 +1790,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1878
1790
|
};
|
|
1879
1791
|
Object.assign(
|
|
1880
1792
|
base,
|
|
1881
|
-
|
|
1793
|
+
chunkK6R2JNCK_js.getAnimationColorBaseStyle(element, {
|
|
1882
1794
|
animatesFill,
|
|
1883
1795
|
animatesStroke,
|
|
1884
1796
|
parentGroupFill
|
|
@@ -1890,7 +1802,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1890
1802
|
base.borderStyle = void 0;
|
|
1891
1803
|
}
|
|
1892
1804
|
apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor);
|
|
1893
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1805
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkK6R2JNCK_js.isStrokeOnlyPresetElement(element)) {
|
|
1894
1806
|
base.backgroundColor = "transparent";
|
|
1895
1807
|
base.backgroundImage = void 0;
|
|
1896
1808
|
base.borderWidth = void 0;
|
|
@@ -1904,7 +1816,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1904
1816
|
if (rendersWedgeCalloutVector(element)) {
|
|
1905
1817
|
return base;
|
|
1906
1818
|
}
|
|
1907
|
-
const geometry =
|
|
1819
|
+
const geometry = chunkK6R2JNCK_js.resolveShapeGeometry(element);
|
|
1908
1820
|
switch (geometry.kind) {
|
|
1909
1821
|
case "bare":
|
|
1910
1822
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1930,13 +1842,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1930
1842
|
function getConnectorAdjustment(element, key, fallback) {
|
|
1931
1843
|
const direct = element.shapeAdjustments?.[key];
|
|
1932
1844
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1933
|
-
return
|
|
1845
|
+
return chunkK6R2JNCK_js.clampUnitInterval(direct / 1e5);
|
|
1934
1846
|
}
|
|
1935
1847
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1936
1848
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1937
|
-
return
|
|
1849
|
+
return chunkK6R2JNCK_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1938
1850
|
}
|
|
1939
|
-
return
|
|
1851
|
+
return chunkK6R2JNCK_js.clampUnitInterval(fallback);
|
|
1940
1852
|
}
|
|
1941
1853
|
function getConnectorPathGeometry(element) {
|
|
1942
1854
|
const width = Math.max(element.width, 0);
|
|
@@ -2073,11 +1985,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
2073
1985
|
strokePaint,
|
|
2074
1986
|
strokeWidth,
|
|
2075
1987
|
dashArray,
|
|
2076
|
-
lineCap:
|
|
1988
|
+
lineCap: chunkK6R2JNCK_js.svgLineCap(shapeStyle?.lineCap),
|
|
2077
1989
|
lineJoin,
|
|
2078
1990
|
miterLimit,
|
|
2079
|
-
offsets:
|
|
2080
|
-
widths:
|
|
1991
|
+
offsets: chunkK6R2JNCK_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1992
|
+
widths: chunkK6R2JNCK_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
2081
1993
|
};
|
|
2082
1994
|
}
|
|
2083
1995
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2125,12 +2037,12 @@ function gradientDefs(gradient) {
|
|
|
2125
2037
|
}
|
|
2126
2038
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2127
2039
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2128
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2040
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkK6R2JNCK_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2129
2041
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2130
|
-
const gradientPaint = gradient ?
|
|
2042
|
+
const gradientPaint = gradient ? chunkK6R2JNCK_js.svgGradientFillRef(gradient) : void 0;
|
|
2131
2043
|
const nodes = [];
|
|
2132
2044
|
if (subpaths && needsPerSubpath) {
|
|
2133
|
-
const paints =
|
|
2045
|
+
const paints = chunkK6R2JNCK_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2134
2046
|
paints.forEach((paint, idx) => {
|
|
2135
2047
|
if (paint.fill !== "none") {
|
|
2136
2048
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2159,7 +2071,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2159
2071
|
"path",
|
|
2160
2072
|
{
|
|
2161
2073
|
d: pathData,
|
|
2162
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2074
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkK6R2JNCK_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2163
2075
|
stroke: "none",
|
|
2164
2076
|
vectorEffect: "non-scaling-stroke"
|
|
2165
2077
|
},
|
|
@@ -2202,14 +2114,14 @@ function renderGradientDefs(gradient) {
|
|
|
2202
2114
|
) });
|
|
2203
2115
|
}
|
|
2204
2116
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2205
|
-
if (!
|
|
2117
|
+
if (!chunkK6R2JNCK_js.hasShapeProperties(element)) {
|
|
2206
2118
|
return null;
|
|
2207
2119
|
}
|
|
2208
2120
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2209
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2210
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2211
|
-
const dashType =
|
|
2212
|
-
const dashArray =
|
|
2121
|
+
const fillPaint = animatesFill ? "inherit" : chunkK6R2JNCK_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2122
|
+
const strokePaint = animatesStroke ? "inherit" : chunkK6R2JNCK_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2123
|
+
const dashType = chunkK6R2JNCK_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2124
|
+
const dashArray = chunkK6R2JNCK_js.getSvgStrokeDasharray(
|
|
2213
2125
|
dashType,
|
|
2214
2126
|
Math.max(strokeWidth, 1),
|
|
2215
2127
|
element.shapeStyle?.customDashSegments
|
|
@@ -2290,13 +2202,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2290
2202
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2291
2203
|
// without this the shape fell back to the parser's representative solid
|
|
2292
2204
|
// and lost every fade (issue #132).
|
|
2293
|
-
|
|
2205
|
+
chunkK6R2JNCK_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2294
2206
|
);
|
|
2295
2207
|
}
|
|
2296
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2208
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkK6R2JNCK_js.buildStrokeOutline(element)) {
|
|
2297
2209
|
const width = Math.max(element.width, 1);
|
|
2298
2210
|
const height = Math.max(element.height, 1);
|
|
2299
|
-
const geometry =
|
|
2211
|
+
const geometry = chunkK6R2JNCK_js.getPresetShapeVectorGeometry(
|
|
2300
2212
|
element.shapeType || "rect",
|
|
2301
2213
|
width,
|
|
2302
2214
|
height,
|
|
@@ -2324,18 +2236,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2324
2236
|
);
|
|
2325
2237
|
}
|
|
2326
2238
|
}
|
|
2327
|
-
if (element.type === "shape" &&
|
|
2239
|
+
if (element.type === "shape" && chunkK6R2JNCK_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2328
2240
|
const width = Math.max(element.width, 1);
|
|
2329
2241
|
const height = Math.max(element.height, 1);
|
|
2330
|
-
const geometry =
|
|
2242
|
+
const geometry = chunkK6R2JNCK_js.getPresetShapeVectorGeometry(
|
|
2331
2243
|
element.shapeType,
|
|
2332
2244
|
width,
|
|
2333
2245
|
height,
|
|
2334
2246
|
element.shapeAdjustments
|
|
2335
2247
|
);
|
|
2336
2248
|
if (geometry) {
|
|
2337
|
-
const gradient =
|
|
2338
|
-
const gradientPaint = gradient ?
|
|
2249
|
+
const gradient = chunkK6R2JNCK_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2250
|
+
const gradientPaint = gradient ? chunkK6R2JNCK_js.svgGradientFillRef(gradient) : void 0;
|
|
2339
2251
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2340
2252
|
"svg",
|
|
2341
2253
|
{
|
|
@@ -2368,18 +2280,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2368
2280
|
);
|
|
2369
2281
|
}
|
|
2370
2282
|
}
|
|
2371
|
-
if (
|
|
2283
|
+
if (chunkK6R2JNCK_js.isCalloutShape(normalizedType)) {
|
|
2372
2284
|
const width = Math.max(element.width, 1);
|
|
2373
2285
|
const height = Math.max(element.height, 1);
|
|
2374
|
-
const geometry =
|
|
2286
|
+
const geometry = chunkK6R2JNCK_js.getCalloutLeaderLineGeometry(
|
|
2375
2287
|
normalizedType,
|
|
2376
2288
|
width,
|
|
2377
2289
|
height,
|
|
2378
2290
|
element.shapeAdjustments
|
|
2379
2291
|
);
|
|
2380
2292
|
if (geometry && geometry.points.length >= 2) {
|
|
2381
|
-
const leaderPath =
|
|
2382
|
-
const bounds =
|
|
2293
|
+
const leaderPath = chunkK6R2JNCK_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2294
|
+
const bounds = chunkK6R2JNCK_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2383
2295
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2384
2296
|
const offsetLeft = bounds.minX;
|
|
2385
2297
|
const offsetTop = bounds.minY;
|
|
@@ -2442,10 +2354,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2442
2354
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2443
2355
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2444
2356
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2445
|
-
const connectorLineCap =
|
|
2357
|
+
const connectorLineCap = chunkK6R2JNCK_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2446
2358
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2447
|
-
const offsets =
|
|
2448
|
-
const widths =
|
|
2359
|
+
const offsets = chunkK6R2JNCK_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2360
|
+
const widths = chunkK6R2JNCK_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2449
2361
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2450
2362
|
"svg",
|
|
2451
2363
|
{
|
|
@@ -2512,15 +2424,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2512
2424
|
}
|
|
2513
2425
|
const rawStops = stops.map((gs) => {
|
|
2514
2426
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2515
|
-
const color =
|
|
2516
|
-
const opacity =
|
|
2427
|
+
const color = chunkK6R2JNCK_js.parseDrawingColor(gs) ?? "#888888";
|
|
2428
|
+
const opacity = chunkK6R2JNCK_js.parseDrawingColorOpacity(gs);
|
|
2517
2429
|
return { position: pos, color, opacity };
|
|
2518
2430
|
}).sort((a, b) => a.position - b.position);
|
|
2519
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2431
|
+
const stopStrings = rawStops.map((s) => `${chunkK6R2JNCK_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2520
2432
|
const lin = gradFill["a:lin"];
|
|
2521
2433
|
if (lin) {
|
|
2522
2434
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2523
|
-
const angleDeg = Math.round(
|
|
2435
|
+
const angleDeg = Math.round(chunkK6R2JNCK_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2524
2436
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2525
2437
|
}
|
|
2526
2438
|
const path = gradFill["a:path"];
|
|
@@ -2534,7 +2446,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2534
2446
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2535
2447
|
} : void 0;
|
|
2536
2448
|
if (pathType === "rect") {
|
|
2537
|
-
return
|
|
2449
|
+
return chunkK6R2JNCK_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2538
2450
|
}
|
|
2539
2451
|
let cx = 50;
|
|
2540
2452
|
let cy = 50;
|
|
@@ -2556,8 +2468,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2556
2468
|
if (!pattFill) {
|
|
2557
2469
|
return void 0;
|
|
2558
2470
|
}
|
|
2559
|
-
const fgColor =
|
|
2560
|
-
const bgColor =
|
|
2471
|
+
const fgColor = chunkK6R2JNCK_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2472
|
+
const bgColor = chunkK6R2JNCK_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2561
2473
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2562
2474
|
switch (preset) {
|
|
2563
2475
|
case "ltHorz":
|
|
@@ -2668,11 +2580,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2668
2580
|
const prstDash = ln["a:prstDash"];
|
|
2669
2581
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2670
2582
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2671
|
-
const color =
|
|
2583
|
+
const color = chunkK6R2JNCK_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2672
2584
|
if (color) {
|
|
2673
|
-
const opacity =
|
|
2585
|
+
const opacity = chunkK6R2JNCK_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2674
2586
|
const key = `${edge.prefix}`;
|
|
2675
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2587
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkK6R2JNCK_js.colorWithOpacity(color, opacity)}`;
|
|
2676
2588
|
}
|
|
2677
2589
|
}
|
|
2678
2590
|
return borderStyle;
|
|
@@ -2685,7 +2597,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2685
2597
|
const textShadowParts = [];
|
|
2686
2598
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2687
2599
|
if (outerShdw) {
|
|
2688
|
-
const shdwColor =
|
|
2600
|
+
const shdwColor = chunkK6R2JNCK_js.parseDrawingColor(outerShdw);
|
|
2689
2601
|
if (shdwColor) {
|
|
2690
2602
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2691
2603
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2703,7 +2615,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2703
2615
|
}
|
|
2704
2616
|
const glow = effectLst["a:glow"];
|
|
2705
2617
|
if (glow) {
|
|
2706
|
-
const glowColor =
|
|
2618
|
+
const glowColor = chunkK6R2JNCK_js.parseDrawingColor(glow);
|
|
2707
2619
|
if (glowColor) {
|
|
2708
2620
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2709
2621
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2783,10 +2695,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2783
2695
|
if (runProps?.["@_u"] !== void 0) {
|
|
2784
2696
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2785
2697
|
}
|
|
2786
|
-
const runColor =
|
|
2698
|
+
const runColor = chunkK6R2JNCK_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkK6R2JNCK_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2787
2699
|
if (runColor) {
|
|
2788
|
-
const opacity =
|
|
2789
|
-
cellStyle.color =
|
|
2700
|
+
const opacity = chunkK6R2JNCK_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2701
|
+
cellStyle.color = chunkK6R2JNCK_js.colorWithOpacity(runColor, opacity);
|
|
2790
2702
|
}
|
|
2791
2703
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2792
2704
|
if (fontFamily) {
|
|
@@ -2796,15 +2708,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2796
2708
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2797
2709
|
}
|
|
2798
2710
|
const cellProperties = cellXml["a:tcPr"];
|
|
2799
|
-
const cellFill =
|
|
2711
|
+
const cellFill = chunkK6R2JNCK_js.parseDrawingColor(
|
|
2800
2712
|
cellProperties?.["a:solidFill"],
|
|
2801
2713
|
schemeColorOverrides
|
|
2802
2714
|
);
|
|
2803
2715
|
if (cellFill) {
|
|
2804
|
-
const opacity =
|
|
2716
|
+
const opacity = chunkK6R2JNCK_js.parseDrawingColorOpacity(
|
|
2805
2717
|
cellProperties?.["a:solidFill"]
|
|
2806
2718
|
);
|
|
2807
|
-
cellStyle.backgroundColor =
|
|
2719
|
+
cellStyle.backgroundColor = chunkK6R2JNCK_js.colorWithOpacity(cellFill, opacity);
|
|
2808
2720
|
} else {
|
|
2809
2721
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2810
2722
|
if (gradCss) {
|
|
@@ -2819,16 +2731,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2819
2731
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2820
2732
|
Object.assign(cellStyle, edgeBorders);
|
|
2821
2733
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2822
|
-
const borderColor =
|
|
2734
|
+
const borderColor = chunkK6R2JNCK_js.parseDrawingColor(
|
|
2823
2735
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2824
2736
|
schemeColorOverrides
|
|
2825
|
-
) ||
|
|
2737
|
+
) || chunkK6R2JNCK_js.parseDrawingColor(
|
|
2826
2738
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2827
2739
|
schemeColorOverrides
|
|
2828
|
-
) ||
|
|
2740
|
+
) || chunkK6R2JNCK_js.parseDrawingColor(
|
|
2829
2741
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2830
2742
|
schemeColorOverrides
|
|
2831
|
-
) ||
|
|
2743
|
+
) || chunkK6R2JNCK_js.parseDrawingColor(
|
|
2832
2744
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2833
2745
|
schemeColorOverrides
|
|
2834
2746
|
);
|
|
@@ -2900,7 +2812,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2900
2812
|
if (element.type !== "table") {
|
|
2901
2813
|
return void 0;
|
|
2902
2814
|
}
|
|
2903
|
-
return
|
|
2815
|
+
return chunkK6R2JNCK_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2904
2816
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2905
2817
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2906
2818
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2976,7 +2888,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2976
2888
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2977
2889
|
"span",
|
|
2978
2890
|
{
|
|
2979
|
-
style: { position: "relative", ...
|
|
2891
|
+
style: { position: "relative", ...chunkK6R2JNCK_js.cellRunStyle(run) },
|
|
2980
2892
|
children: run.text
|
|
2981
2893
|
},
|
|
2982
2894
|
`r-${index}`
|
|
@@ -2984,7 +2896,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2984
2896
|
});
|
|
2985
2897
|
}
|
|
2986
2898
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2987
|
-
return
|
|
2899
|
+
return chunkK6R2JNCK_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2988
2900
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2989
2901
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2990
2902
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3117,7 +3029,7 @@ function TableResizeOverlay({
|
|
|
3117
3029
|
const containerRef = React6.useRef(null);
|
|
3118
3030
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3119
3031
|
const dragRef = React6.useRef(null);
|
|
3120
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3032
|
+
const colBoundaries = React6.useMemo(() => chunkK6R2JNCK_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3121
3033
|
const measureRows = React6.useCallback(() => {
|
|
3122
3034
|
const container = containerRef.current;
|
|
3123
3035
|
if (!container) {
|
|
@@ -3164,11 +3076,11 @@ function TableResizeOverlay({
|
|
|
3164
3076
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3165
3077
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3166
3078
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3167
|
-
onResizeColumns(
|
|
3079
|
+
onResizeColumns(chunkK6R2JNCK_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3168
3080
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3169
3081
|
const deltaY = e.clientY - drag.startPos;
|
|
3170
|
-
const newHeight =
|
|
3171
|
-
drag.initialRowHeight ??
|
|
3082
|
+
const newHeight = chunkK6R2JNCK_js.computeResizedRowHeight(
|
|
3083
|
+
drag.initialRowHeight ?? chunkK6R2JNCK_js.DEFAULT_ROW_HEIGHT,
|
|
3172
3084
|
deltaY
|
|
3173
3085
|
);
|
|
3174
3086
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3206,7 +3118,7 @@ function TableResizeOverlay({
|
|
|
3206
3118
|
e.stopPropagation();
|
|
3207
3119
|
const table = containerRef.current?.querySelector("table");
|
|
3208
3120
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3209
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3121
|
+
const actualHeight = tr?.offsetHeight ?? chunkK6R2JNCK_js.DEFAULT_ROW_HEIGHT;
|
|
3210
3122
|
document.body.style.cursor = "row-resize";
|
|
3211
3123
|
document.body.style.userSelect = "none";
|
|
3212
3124
|
dragRef.current = {
|
|
@@ -3253,7 +3165,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3253
3165
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3254
3166
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3255
3167
|
};
|
|
3256
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3168
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkK6R2JNCK_js.tableCellCss(
|
|
3257
3169
|
tableData,
|
|
3258
3170
|
cell,
|
|
3259
3171
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3266,7 +3178,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3266
3178
|
}
|
|
3267
3179
|
const first = selectedCell.selectedCells[0];
|
|
3268
3180
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3269
|
-
return
|
|
3181
|
+
return chunkK6R2JNCK_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3270
3182
|
})();
|
|
3271
3183
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3272
3184
|
TableResizeOverlay,
|
|
@@ -3287,9 +3199,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3287
3199
|
{
|
|
3288
3200
|
className: "w-full h-full border-collapse table-fixed",
|
|
3289
3201
|
style: {
|
|
3290
|
-
fontFamily:
|
|
3202
|
+
fontFamily: chunkK6R2JNCK_js.DEFAULT_FONT_FAMILY,
|
|
3291
3203
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3292
|
-
...
|
|
3204
|
+
...chunkK6R2JNCK_js.tableContainerCss(tableData)
|
|
3293
3205
|
},
|
|
3294
3206
|
children: [
|
|
3295
3207
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3308,7 +3220,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3308
3220
|
return null;
|
|
3309
3221
|
}
|
|
3310
3222
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3311
|
-
const isInMultiSelection =
|
|
3223
|
+
const isInMultiSelection = chunkK6R2JNCK_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3312
3224
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3313
3225
|
const diag = getCellDiagonalBorders2(
|
|
3314
3226
|
cell.style,
|
|
@@ -3337,7 +3249,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3337
3249
|
}
|
|
3338
3250
|
event.stopPropagation();
|
|
3339
3251
|
if (event.shiftKey && selectedCell) {
|
|
3340
|
-
const rect =
|
|
3252
|
+
const rect = chunkK6R2JNCK_js.computeSelectionRect(
|
|
3341
3253
|
selectedCell.rowIndex,
|
|
3342
3254
|
selectedCell.columnIndex,
|
|
3343
3255
|
rowIndex,
|
|
@@ -3347,7 +3259,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3347
3259
|
options?.onSelectCell?.({
|
|
3348
3260
|
rowIndex: selectedCell.rowIndex,
|
|
3349
3261
|
columnIndex: selectedCell.columnIndex,
|
|
3350
|
-
selectedCells:
|
|
3262
|
+
selectedCells: chunkK6R2JNCK_js.rectToCells(rect)
|
|
3351
3263
|
});
|
|
3352
3264
|
} else {
|
|
3353
3265
|
options?.onSelectCell?.({
|
|
@@ -3408,7 +3320,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3408
3320
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3409
3321
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3410
3322
|
}
|
|
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:
|
|
3323
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3P7FYHJH_js.translationsEn["pptx.table.title"] });
|
|
3412
3324
|
}
|
|
3413
3325
|
const selectedCell = options?.selectedCell || null;
|
|
3414
3326
|
const isEditable = Boolean(options?.editable);
|
|
@@ -3423,7 +3335,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3423
3335
|
}
|
|
3424
3336
|
const first = selectedCell.selectedCells[0];
|
|
3425
3337
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3426
|
-
return
|
|
3338
|
+
return chunkK6R2JNCK_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3427
3339
|
})();
|
|
3428
3340
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3429
3341
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3445,9 +3357,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3445
3357
|
{
|
|
3446
3358
|
className: "w-full h-full border-collapse table-fixed",
|
|
3447
3359
|
style: {
|
|
3448
|
-
fontFamily:
|
|
3360
|
+
fontFamily: chunkK6R2JNCK_js.DEFAULT_FONT_FAMILY,
|
|
3449
3361
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3450
|
-
...
|
|
3362
|
+
...chunkK6R2JNCK_js.tableContainerCss(tableEl.tableData)
|
|
3451
3363
|
},
|
|
3452
3364
|
children: [
|
|
3453
3365
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3504,7 +3416,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3504
3416
|
color: textStyle.color,
|
|
3505
3417
|
...bandStyle,
|
|
3506
3418
|
...xmlCellStyle,
|
|
3507
|
-
...tdCellOverride ?
|
|
3419
|
+
...tdCellOverride ? chunkK6R2JNCK_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3508
3420
|
...diag ? { position: "relative" } : void 0
|
|
3509
3421
|
};
|
|
3510
3422
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3514,7 +3426,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3514
3426
|
"border px-1 py-0.5 align-top",
|
|
3515
3427
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3516
3428
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3517
|
-
|
|
3429
|
+
chunkK6R2JNCK_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
3430
|
),
|
|
3519
3431
|
colSpan,
|
|
3520
3432
|
rowSpan: rSpan,
|
|
@@ -3525,7 +3437,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3525
3437
|
}
|
|
3526
3438
|
event.stopPropagation();
|
|
3527
3439
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3528
|
-
const rect =
|
|
3440
|
+
const rect = chunkK6R2JNCK_js.computeSelectionRect(
|
|
3529
3441
|
selectedCell.rowIndex,
|
|
3530
3442
|
selectedCell.columnIndex,
|
|
3531
3443
|
rowIndex,
|
|
@@ -3535,7 +3447,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3535
3447
|
options?.onSelectCell?.({
|
|
3536
3448
|
rowIndex: selectedCell.rowIndex,
|
|
3537
3449
|
columnIndex: selectedCell.columnIndex,
|
|
3538
|
-
selectedCells:
|
|
3450
|
+
selectedCells: chunkK6R2JNCK_js.rectToCells(rect)
|
|
3539
3451
|
});
|
|
3540
3452
|
} else {
|
|
3541
3453
|
options?.onSelectCell?.({
|
|
@@ -3594,23 +3506,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3594
3506
|
);
|
|
3595
3507
|
}
|
|
3596
3508
|
function partAttrs(part) {
|
|
3597
|
-
return part ?
|
|
3509
|
+
return part ? chunkK6R2JNCK_js.chartPartToAttrs(part) : void 0;
|
|
3598
3510
|
}
|
|
3599
3511
|
function resolveReactPalette(chartData) {
|
|
3600
3512
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3601
3513
|
return chartData.colorPalette;
|
|
3602
3514
|
}
|
|
3603
|
-
return [...
|
|
3515
|
+
return [...chunkK6R2JNCK_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3604
3516
|
}
|
|
3605
3517
|
function buildReactChartViewModel(element) {
|
|
3606
3518
|
if (element.type !== "chart" || !element.chartData) {
|
|
3607
|
-
return
|
|
3519
|
+
return chunkK6R2JNCK_js.buildChartViewModel(element);
|
|
3608
3520
|
}
|
|
3609
3521
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3610
3522
|
...element,
|
|
3611
3523
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3612
3524
|
};
|
|
3613
|
-
return
|
|
3525
|
+
return chunkK6R2JNCK_js.buildChartViewModel(themedElement);
|
|
3614
3526
|
}
|
|
3615
3527
|
function renderPrimitive(prim, key) {
|
|
3616
3528
|
switch (prim.kind) {
|
|
@@ -3759,7 +3671,7 @@ function renderText(t, key) {
|
|
|
3759
3671
|
);
|
|
3760
3672
|
}
|
|
3761
3673
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3762
|
-
const legendItems =
|
|
3674
|
+
const legendItems = chunkK6R2JNCK_js.computeChartLegendLayout(vm);
|
|
3763
3675
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3764
3676
|
"svg",
|
|
3765
3677
|
{
|
|
@@ -3852,17 +3764,17 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3852
3764
|
}
|
|
3853
3765
|
function renderChartElement(element) {
|
|
3854
3766
|
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:
|
|
3767
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3P7FYHJH_js.translationsEn["pptx.chart.heading"] });
|
|
3856
3768
|
}
|
|
3857
3769
|
const chartData = element.chartData;
|
|
3858
3770
|
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:
|
|
3771
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3P7FYHJH_js.translationsEn["pptx.chart.heading"] });
|
|
3860
3772
|
}
|
|
3861
|
-
const kind =
|
|
3773
|
+
const kind = chunkK6R2JNCK_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3862
3774
|
return renderChartViewModel(
|
|
3863
3775
|
element.id,
|
|
3864
3776
|
buildReactChartViewModel(element),
|
|
3865
|
-
|
|
3777
|
+
chunkK6R2JNCK_js.chartPreserveAspectRatio(kind)
|
|
3866
3778
|
);
|
|
3867
3779
|
}
|
|
3868
3780
|
|
|
@@ -3882,14 +3794,14 @@ function buildNotesPdf(pages) {
|
|
|
3882
3794
|
notes: page.notes,
|
|
3883
3795
|
slideNumber: page.slideNumber
|
|
3884
3796
|
}));
|
|
3885
|
-
const bytes =
|
|
3797
|
+
const bytes = chunkK6R2JNCK_js.buildNotesPdfBytes(images, meta);
|
|
3886
3798
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3887
3799
|
return URL.createObjectURL(blob);
|
|
3888
3800
|
}
|
|
3889
3801
|
|
|
3890
3802
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3891
3803
|
function buildPdfFromImageData(images) {
|
|
3892
|
-
const bytes =
|
|
3804
|
+
const bytes = chunkK6R2JNCK_js.buildSlidesPdfBytes(images);
|
|
3893
3805
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3894
3806
|
return URL.createObjectURL(blob);
|
|
3895
3807
|
}
|
|
@@ -3898,7 +3810,7 @@ function buildPdfFromImageData(images) {
|
|
|
3898
3810
|
var activePreview = null;
|
|
3899
3811
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3900
3812
|
stopPreviewAnimation();
|
|
3901
|
-
const descriptor =
|
|
3813
|
+
const descriptor = chunkK6R2JNCK_js.buildPreviewAnimation(preset, options);
|
|
3902
3814
|
if (!descriptor) {
|
|
3903
3815
|
return;
|
|
3904
3816
|
}
|
|
@@ -3911,7 +3823,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3911
3823
|
return;
|
|
3912
3824
|
}
|
|
3913
3825
|
const stage = domEl.offsetParent;
|
|
3914
|
-
const descriptor =
|
|
3826
|
+
const descriptor = chunkK6R2JNCK_js.buildMotionPathPreview({
|
|
3915
3827
|
path,
|
|
3916
3828
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3917
3829
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|
|
@@ -3989,7 +3901,7 @@ exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE;
|
|
|
3989
3901
|
exports.SHAPE_PRESETS = SHAPE_PRESETS;
|
|
3990
3902
|
exports.SHORTCUT_REFERENCE_ITEMS = SHORTCUT_REFERENCE_ITEMS;
|
|
3991
3903
|
exports.SLIDE_NAV_THUMBNAIL_WIDTH = SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
3992
|
-
exports.STROKE_DASH_OPTIONS =
|
|
3904
|
+
exports.STROKE_DASH_OPTIONS = STROKE_DASH_OPTIONS2;
|
|
3993
3905
|
exports.THEME_COLOR_SWATCHES = THEME_COLOR_SWATCHES;
|
|
3994
3906
|
exports.TOOLBAR_SECTIONS = TOOLBAR_SECTIONS;
|
|
3995
3907
|
exports.UNGROUPED_SECTION_ID = UNGROUPED_SECTION_ID;
|
|
@@ -4003,7 +3915,6 @@ exports.buildReactChartViewModel = buildReactChartViewModel;
|
|
|
4003
3915
|
exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle2;
|
|
4004
3916
|
exports.cloneHistorySnapshot = cloneHistorySnapshot2;
|
|
4005
3917
|
exports.cn = cn;
|
|
4006
|
-
exports.executeMediaCommand = executeMediaCommand;
|
|
4007
3918
|
exports.getAnimationInitialStyle = getAnimationInitialStyle2;
|
|
4008
3919
|
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
4009
3920
|
exports.getCropShapeClipPath = getCropShapeClipPath;
|