pptx-react-viewer 4.26.0 → 4.29.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 +82 -0
- package/README.md +3 -0
- package/dist/{AiChatPanel-TIJ3MRTR.mjs → AiChatPanel-6EIOUV7J.mjs} +3 -7
- package/dist/AiChatPanel-6EIOUV7J.mjs.br +0 -0
- package/dist/AiChatPanel-6EIOUV7J.mjs.gz +0 -0
- package/dist/{AiChatPanel-PGZDMW4M.js → AiChatPanel-AK6X4NJD.js} +27 -31
- package/dist/AiChatPanel-AK6X4NJD.js.br +0 -0
- package/dist/AiChatPanel-AK6X4NJD.js.gz +0 -0
- package/dist/{Model3DScene-SJGIK2TB.mjs → Model3DScene-EZDCI7TT.mjs} +2 -2
- package/dist/Model3DScene-EZDCI7TT.mjs.br +0 -0
- package/dist/Model3DScene-EZDCI7TT.mjs.gz +0 -0
- package/dist/{Model3DScene-LQBTZGVN.js → Model3DScene-KYIYYLMY.js} +3 -3
- package/dist/Model3DScene-KYIYYLMY.js.br +0 -0
- package/dist/Model3DScene-KYIYYLMY.js.gz +0 -0
- package/dist/{chunk-QJNZZBVF.mjs → chunk-6YOFWVII.mjs} +149 -167
- package/dist/chunk-6YOFWVII.mjs.br +0 -0
- package/dist/chunk-6YOFWVII.mjs.gz +0 -0
- package/dist/{chunk-ZW2WNQN7.js → chunk-7JMO6R6B.js} +1215 -1190
- package/dist/chunk-7JMO6R6B.js.br +0 -0
- package/dist/chunk-7JMO6R6B.js.gz +0 -0
- package/dist/{chunk-VEVEP7VF.js → chunk-CTL42ZRR.js} +533 -272
- package/dist/chunk-CTL42ZRR.js.br +0 -0
- package/dist/chunk-CTL42ZRR.js.gz +0 -0
- package/dist/{chunk-4VNS5WPM.js → chunk-DFFCFNK2.js} +2 -5
- package/dist/chunk-DFFCFNK2.js.br +0 -0
- package/dist/chunk-DFFCFNK2.js.gz +0 -0
- package/dist/{chunk-K564H64A.mjs → chunk-EW45F35P.mjs} +125 -176
- package/dist/chunk-EW45F35P.mjs.br +0 -0
- package/dist/chunk-EW45F35P.mjs.gz +0 -0
- package/dist/{chunk-XGB3TDIC.mjs → chunk-GDQSMJQZ.mjs} +2 -5
- package/dist/chunk-GDQSMJQZ.mjs.br +0 -0
- package/dist/chunk-GDQSMJQZ.mjs.gz +0 -0
- package/dist/{chunk-PW3YOZFA.js → chunk-K3EGXT6W.js} +921 -933
- package/dist/chunk-K3EGXT6W.js.br +0 -0
- package/dist/chunk-K3EGXT6W.js.gz +0 -0
- package/dist/{chunk-USJXG5TE.mjs → chunk-VI575UU6.mjs} +87 -105
- package/dist/chunk-VI575UU6.mjs.br +0 -0
- package/dist/chunk-VI575UU6.mjs.gz +0 -0
- package/dist/i18n.d.ts +1 -46
- package/dist/i18n.js +5 -5
- package/dist/i18n.js.br +2 -2
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +2 -2
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +28 -3703
- package/dist/index.js +96 -97
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -7
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +16 -3848
- package/dist/internals.js +114 -115
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -5
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/{chunk-NJYF5KTY.mjs → three.module-2R4ADL7W.mjs} +2 -0
- package/dist/three.module-2R4ADL7W.mjs.br +0 -0
- package/dist/three.module-2R4ADL7W.mjs.gz +0 -0
- package/dist/{chunk-QS3GAPPA.js → three.module-LS32MK23.js} +2 -0
- package/dist/three.module-LS32MK23.js.br +0 -0
- package/dist/three.module-LS32MK23.js.gz +0 -0
- package/dist/viewer/index.d.ts +29 -2633
- package/dist/viewer/index.js +35 -37
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -7
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-GAHCEZSS.mjs → y-webrtc-6DZI5KUK.mjs} +1 -1
- package/dist/y-webrtc-6DZI5KUK.mjs.br +0 -0
- package/dist/y-webrtc-6DZI5KUK.mjs.gz +0 -0
- package/dist/{y-webrtc-F2H7BRUK.js → y-webrtc-OTRGEYOH.js} +5 -5
- package/dist/y-webrtc-OTRGEYOH.js.br +0 -0
- package/dist/y-webrtc-OTRGEYOH.js.gz +0 -0
- package/dist/{y-websocket-FBMB63F4.js → y-websocket-AWBYMAHL.js} +1 -1
- package/dist/y-websocket-AWBYMAHL.js.br +0 -0
- package/dist/y-websocket-AWBYMAHL.js.gz +0 -0
- package/dist/{y-websocket-MAGDFVLN.mjs → y-websocket-VAKUVRQT.mjs} +1 -1
- package/dist/y-websocket-VAKUVRQT.mjs.br +0 -0
- package/dist/y-websocket-VAKUVRQT.mjs.gz +0 -0
- package/package.json +4 -4
- package/dist/AiChatPanel-PGZDMW4M.js.br +0 -0
- package/dist/AiChatPanel-PGZDMW4M.js.gz +0 -0
- package/dist/AiChatPanel-TIJ3MRTR.mjs.br +0 -0
- package/dist/AiChatPanel-TIJ3MRTR.mjs.gz +0 -0
- package/dist/GLTFLoader-O7FNKCHG.mjs +0 -2649
- package/dist/GLTFLoader-O7FNKCHG.mjs.br +0 -0
- package/dist/GLTFLoader-O7FNKCHG.mjs.gz +0 -0
- package/dist/GLTFLoader-UM56GMCK.js +0 -2651
- package/dist/GLTFLoader-UM56GMCK.js.br +0 -0
- package/dist/GLTFLoader-UM56GMCK.js.gz +0 -0
- package/dist/Model3DScene-LQBTZGVN.js.br +0 -0
- package/dist/Model3DScene-LQBTZGVN.js.gz +0 -0
- package/dist/Model3DScene-SJGIK2TB.mjs.br +0 -0
- package/dist/Model3DScene-SJGIK2TB.mjs.gz +0 -0
- package/dist/OrbitControls-EXEHIXFI.js +0 -922
- package/dist/OrbitControls-EXEHIXFI.js.br +0 -0
- package/dist/OrbitControls-EXEHIXFI.js.gz +0 -0
- package/dist/OrbitControls-PZQ4CBVS.mjs +0 -920
- package/dist/OrbitControls-PZQ4CBVS.mjs.br +0 -0
- package/dist/OrbitControls-PZQ4CBVS.mjs.gz +0 -0
- package/dist/UTIF-6SHLXCNF.js +0 -6402
- package/dist/UTIF-6SHLXCNF.js.br +0 -0
- package/dist/UTIF-6SHLXCNF.js.gz +0 -0
- package/dist/UTIF-CNNXS5Z5.mjs +0 -6400
- package/dist/UTIF-CNNXS5Z5.mjs.br +0 -0
- package/dist/UTIF-CNNXS5Z5.mjs.gz +0 -0
- package/dist/chunk-4VNS5WPM.js.br +0 -0
- package/dist/chunk-4VNS5WPM.js.gz +0 -0
- package/dist/chunk-6HMJTCFO.js +0 -4247
- package/dist/chunk-6HMJTCFO.js.br +0 -0
- package/dist/chunk-6HMJTCFO.js.gz +0 -0
- package/dist/chunk-DKMPRUXL.mjs +0 -22197
- package/dist/chunk-DKMPRUXL.mjs.br +0 -0
- package/dist/chunk-DKMPRUXL.mjs.gz +0 -0
- package/dist/chunk-K564H64A.mjs.br +0 -0
- package/dist/chunk-K564H64A.mjs.gz +0 -0
- package/dist/chunk-LCWNHXHZ.mjs +0 -312894
- package/dist/chunk-LCWNHXHZ.mjs.br +0 -0
- package/dist/chunk-LCWNHXHZ.mjs.gz +0 -0
- package/dist/chunk-NJYF5KTY.mjs.br +0 -0
- package/dist/chunk-NJYF5KTY.mjs.gz +0 -0
- package/dist/chunk-NWZKMLGC.js +0 -22241
- package/dist/chunk-NWZKMLGC.js.br +0 -0
- package/dist/chunk-NWZKMLGC.js.gz +0 -0
- package/dist/chunk-PW3YOZFA.js.br +0 -0
- package/dist/chunk-PW3YOZFA.js.gz +0 -0
- package/dist/chunk-QJNZZBVF.mjs.br +0 -0
- package/dist/chunk-QJNZZBVF.mjs.gz +0 -0
- package/dist/chunk-QS3GAPPA.js.br +0 -0
- package/dist/chunk-QS3GAPPA.js.gz +0 -0
- package/dist/chunk-UHW3R465.js +0 -314151
- package/dist/chunk-UHW3R465.js.br +0 -0
- package/dist/chunk-UHW3R465.js.gz +0 -0
- package/dist/chunk-USJXG5TE.mjs.br +0 -0
- package/dist/chunk-USJXG5TE.mjs.gz +0 -0
- package/dist/chunk-VEVEP7VF.js.br +0 -0
- package/dist/chunk-VEVEP7VF.js.gz +0 -0
- package/dist/chunk-XGB3TDIC.mjs.br +0 -0
- package/dist/chunk-XGB3TDIC.mjs.gz +0 -0
- package/dist/chunk-XLPQM7OJ.mjs +0 -4243
- package/dist/chunk-XLPQM7OJ.mjs.br +0 -0
- package/dist/chunk-XLPQM7OJ.mjs.gz +0 -0
- package/dist/chunk-ZW2WNQN7.js.br +0 -0
- package/dist/chunk-ZW2WNQN7.js.gz +0 -0
- package/dist/smartart-layouts-5T2QZGLG.js +0 -2494
- package/dist/smartart-layouts-5T2QZGLG.js.br +0 -0
- package/dist/smartart-layouts-5T2QZGLG.js.gz +0 -0
- package/dist/smartart-layouts-UCAFYVFW.mjs +0 -2487
- package/dist/smartart-layouts-UCAFYVFW.mjs.br +0 -0
- package/dist/smartart-layouts-UCAFYVFW.mjs.gz +0 -0
- package/dist/three.module-BLHG4FHZ.js +0 -1783
- package/dist/three.module-BLHG4FHZ.js.br +0 -0
- package/dist/three.module-BLHG4FHZ.js.gz +0 -0
- package/dist/three.module-ZSSMKKHW.mjs +0 -2
- package/dist/three.module-ZSSMKKHW.mjs.br +0 -0
- package/dist/three.module-ZSSMKKHW.mjs.gz +0 -0
- package/dist/y-webrtc-F2H7BRUK.js.br +0 -0
- package/dist/y-webrtc-F2H7BRUK.js.gz +0 -0
- package/dist/y-webrtc-GAHCEZSS.mjs.br +0 -0
- package/dist/y-webrtc-GAHCEZSS.mjs.gz +0 -0
- package/dist/y-websocket-FBMB63F4.js.br +0 -0
- package/dist/y-websocket-FBMB63F4.js.gz +0 -0
- package/dist/y-websocket-MAGDFVLN.mjs.br +0 -0
- package/dist/y-websocket-MAGDFVLN.mjs.gz +0 -0
|
@@ -1,32 +1,52 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDFFCFNK2_js = require('./chunk-DFFCFNK2.js');
|
|
4
|
+
var pptx = require('ooxml-ui/pptx');
|
|
5
|
+
var pptx_star = require('ooxml-core/pptx');
|
|
5
6
|
var clsx = require('clsx');
|
|
6
7
|
var tailwindMerge = require('tailwind-merge');
|
|
7
8
|
var React8 = require('react');
|
|
8
9
|
var lu = require('react-icons/lu');
|
|
9
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
+
var i18n = require('ooxml-ui/pptx/i18n');
|
|
10
12
|
var reactI18next = require('react-i18next');
|
|
11
13
|
|
|
12
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
15
|
|
|
16
|
+
function _interopNamespace(e) {
|
|
17
|
+
if (e && e.__esModule) return e;
|
|
18
|
+
var n = Object.create(null);
|
|
19
|
+
if (e) {
|
|
20
|
+
Object.keys(e).forEach(function (k) {
|
|
21
|
+
if (k !== 'default') {
|
|
22
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return e[k]; }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
n.default = e;
|
|
31
|
+
return Object.freeze(n);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var pptx_star__namespace = /*#__PURE__*/_interopNamespace(pptx_star);
|
|
14
35
|
var React8__default = /*#__PURE__*/_interopDefault(React8);
|
|
15
36
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return chunkUHW3R465_js.getAnimationInitialStyle(preset, nativeAnimation);
|
|
37
|
+
function getAnimationInitialStyle(preset, nativeAnimation) {
|
|
38
|
+
return pptx.getAnimationInitialStyle(preset, nativeAnimation);
|
|
19
39
|
}
|
|
40
|
+
|
|
41
|
+
// ../core/dist/index.mjs
|
|
42
|
+
var dist_exports = {};
|
|
43
|
+
chunkDFFCFNK2_js.__reExport(dist_exports, pptx_star__namespace);
|
|
20
44
|
function cn(...inputs) {
|
|
21
45
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
22
46
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function cloneHistorySnapshot2(snapshot) {
|
|
26
|
-
return chunkUHW3R465_js.cloneHistorySnapshot(snapshot);
|
|
47
|
+
function cloneHistorySnapshot(snapshot) {
|
|
48
|
+
return pptx.cloneHistorySnapshot(snapshot);
|
|
27
49
|
}
|
|
28
|
-
|
|
29
|
-
// src/viewer/constants/scalar.ts
|
|
30
50
|
var DEFAULT_CANVAS_WIDTH = 1280;
|
|
31
51
|
var DEFAULT_CANVAS_HEIGHT = 720;
|
|
32
52
|
var MIN_ELEMENT_SIZE = 12;
|
|
@@ -35,7 +55,7 @@ var DEFAULT_BODY_INSET_TB_PX = 45720 / 9525;
|
|
|
35
55
|
var DEFAULT_TEXT_COLOR = "#111827";
|
|
36
56
|
var DEFAULT_FILL_COLOR = "#3b82f6";
|
|
37
57
|
var DEFAULT_STROKE_COLOR = "#1f2937";
|
|
38
|
-
var
|
|
58
|
+
var DEFAULT_FONT_FAMILY = '"Segoe UI", "Helvetica Neue", Arial, sans-serif';
|
|
39
59
|
var DEFAULT_TEXT_FONT_SIZE = 24;
|
|
40
60
|
var HYPERLINK_COLOR = "#0563C1";
|
|
41
61
|
var DEFAULT_TABLE_ROWS = 3;
|
|
@@ -45,8 +65,6 @@ var GRID_SIZE = 8;
|
|
|
45
65
|
var SLIDE_NAV_THUMBNAIL_WIDTH = 156;
|
|
46
66
|
var UNGROUPED_SECTION_ID = "__ungrouped__";
|
|
47
67
|
var DEFAULT_SECTION_GROUP_ID = "default";
|
|
48
|
-
|
|
49
|
-
// src/viewer/constants/toolbar.ts
|
|
50
68
|
var TOOLBAR_SECTIONS = [
|
|
51
69
|
{ id: "file", labelKey: "pptx.ribbon.tab.file" },
|
|
52
70
|
{ id: "home", labelKey: "pptx.ribbon.tab.home" },
|
|
@@ -61,9 +79,7 @@ var TOOLBAR_SECTIONS = [
|
|
|
61
79
|
{ id: "view", labelKey: "pptx.ribbon.tab.view" },
|
|
62
80
|
{ id: "help", labelKey: "pptx.ribbon.tab.help" }
|
|
63
81
|
];
|
|
64
|
-
var SHORTCUT_REFERENCE_ITEMS =
|
|
65
|
-
|
|
66
|
-
// src/viewer/constants/transitions-animations.ts
|
|
82
|
+
var SHORTCUT_REFERENCE_ITEMS = pptx.VIEWER_SHORTCUT_REFERENCE;
|
|
67
83
|
var ANIMATION_PRESET_OPTIONS = [
|
|
68
84
|
{ value: "fadeIn", label: "Fade In", i18nKey: "pptx.animation.preset.fadeIn" },
|
|
69
85
|
{ value: "flyIn", label: "Fly In", i18nKey: "pptx.animation.preset.flyIn" },
|
|
@@ -89,7 +105,7 @@ var GLYPH_COMPONENTS = {
|
|
|
89
105
|
plus: lu.LuPlus,
|
|
90
106
|
triangle: lu.LuTriangle
|
|
91
107
|
};
|
|
92
|
-
var SHAPE_PRESETS =
|
|
108
|
+
var SHAPE_PRESETS = pptx.SHAPE_PRESET_DEFS.map(
|
|
93
109
|
(def) => ({
|
|
94
110
|
type: def.type,
|
|
95
111
|
label: def.label,
|
|
@@ -99,8 +115,6 @@ var SHAPE_PRESETS = chunkUHW3R465_js.SHAPE_PRESET_DEFS.map(
|
|
|
99
115
|
})
|
|
100
116
|
})
|
|
101
117
|
);
|
|
102
|
-
|
|
103
|
-
// src/viewer/constants/connectors-strokes.ts
|
|
104
118
|
var CONNECTOR_ARROW_OPTIONS = [
|
|
105
119
|
{ value: "none", label: "None", i18nKey: "pptx.arrowhead.none" },
|
|
106
120
|
{ value: "triangle", label: "Triangle", i18nKey: "pptx.arrowhead.triangle" },
|
|
@@ -114,7 +128,7 @@ var ARROW_SIZE_OPTIONS = [
|
|
|
114
128
|
{ value: "med", label: "Medium", i18nKey: "pptx.connectorOptions.sizeMedium" },
|
|
115
129
|
{ value: "lg", label: "Large", i18nKey: "pptx.connectorOptions.sizeLarge" }
|
|
116
130
|
];
|
|
117
|
-
var
|
|
131
|
+
var STROKE_DASH_OPTIONS = pptx.STROKE_DASH_OPTIONS;
|
|
118
132
|
|
|
119
133
|
// src/viewer/utils/shape-types.tsx
|
|
120
134
|
function getShapeType(shapeType) {
|
|
@@ -217,33 +231,29 @@ function getShapeType(shapeType) {
|
|
|
217
231
|
}
|
|
218
232
|
return "rect";
|
|
219
233
|
}
|
|
220
|
-
|
|
221
|
-
// src/viewer/utils/element.ts
|
|
222
234
|
function isConnectorOrLineElement(element) {
|
|
223
235
|
if (element.type === "connector") {
|
|
224
236
|
return true;
|
|
225
237
|
}
|
|
226
|
-
if (!
|
|
238
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
227
239
|
return false;
|
|
228
240
|
}
|
|
229
241
|
const st = getShapeType(element.shapeType);
|
|
230
242
|
return st === "connector" || st === "line" || element.shapeType === "line";
|
|
231
243
|
}
|
|
232
|
-
|
|
233
|
-
// src/viewer/utils/image-style.ts
|
|
234
244
|
function getImageMaskStyle(element) {
|
|
235
|
-
if (!
|
|
245
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
236
246
|
return void 0;
|
|
237
247
|
}
|
|
238
|
-
const geometry =
|
|
248
|
+
const geometry = pptx.resolveShapeGeometry(element);
|
|
239
249
|
if (geometry.kind === "borderRadius") {
|
|
240
250
|
return { borderRadius: geometry.radius };
|
|
241
251
|
}
|
|
242
252
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
243
253
|
}
|
|
244
254
|
function getImageRenderStyle(element) {
|
|
245
|
-
const fit =
|
|
246
|
-
const counterTransform =
|
|
255
|
+
const fit = pptx.getImageFitStyle(element);
|
|
256
|
+
const counterTransform = pptx.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
247
257
|
return {
|
|
248
258
|
// A translated/scaled crop, or a rotWithShape=false counter-transform,
|
|
249
259
|
// must be masked by the stationary wrapper, not by the moving/counter-
|
|
@@ -258,11 +268,11 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
258
268
|
return {
|
|
259
269
|
overflow: "hidden",
|
|
260
270
|
borderRadius: mask?.borderRadius,
|
|
261
|
-
clipPath: mask?.clipPath ??
|
|
271
|
+
clipPath: mask?.clipPath ?? getCropShapeClipPath(element)
|
|
262
272
|
};
|
|
263
273
|
}
|
|
264
274
|
function getImageSurfaceStyle(element) {
|
|
265
|
-
const fill =
|
|
275
|
+
const fill = (0, dist_exports.hasShapeProperties)(element) ? pptx.getComputedFillStyle(element) : void 0;
|
|
266
276
|
return {
|
|
267
277
|
position: "absolute",
|
|
268
278
|
inset: 0,
|
|
@@ -274,14 +284,14 @@ function getImageSurfaceStyle(element) {
|
|
|
274
284
|
backgroundPosition: fill?.backgroundPosition
|
|
275
285
|
};
|
|
276
286
|
}
|
|
277
|
-
function
|
|
278
|
-
if (!
|
|
287
|
+
function getCropShapeClipPath(element) {
|
|
288
|
+
if (!(0, dist_exports.isImageLikeElement)(element)) {
|
|
279
289
|
return void 0;
|
|
280
290
|
}
|
|
281
|
-
return
|
|
291
|
+
return pptx.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
282
292
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
293
|
+
function getImageTilingStyle(element, nativeSize) {
|
|
294
|
+
return pptx.getImageTilingStyle(element, nativeSize);
|
|
285
295
|
}
|
|
286
296
|
|
|
287
297
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -319,8 +329,6 @@ function ensureArrayValue(value) {
|
|
|
319
329
|
}
|
|
320
330
|
return Array.isArray(value) ? value : [value];
|
|
321
331
|
}
|
|
322
|
-
|
|
323
|
-
// src/viewer/utils/media-persistent-audio.tsx
|
|
324
332
|
function buildTrimFragment(element) {
|
|
325
333
|
const start = element.trimStartMs;
|
|
326
334
|
if (start === void 0 || start <= 0) {
|
|
@@ -413,7 +421,7 @@ function VideoWithMetadata({
|
|
|
413
421
|
{
|
|
414
422
|
ref: mediaRef,
|
|
415
423
|
className: "w-full h-full pointer-events-auto",
|
|
416
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
424
|
+
style: isFullScreen ? { objectFit: "cover" } : pptx.getImageFitStyle(element),
|
|
417
425
|
controls: showTransport,
|
|
418
426
|
preload: "metadata",
|
|
419
427
|
playsInline: true,
|
|
@@ -470,7 +478,7 @@ function PresentationMediaController({
|
|
|
470
478
|
const [isMediaPlaying, setIsMediaPlaying] = React8.useState(false);
|
|
471
479
|
const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
|
|
472
480
|
const hideWhenNotPlaying = isPresentationMode && element.hideWhenNotPlaying === true;
|
|
473
|
-
const { volume: playbackVolume, playbackRate } =
|
|
481
|
+
const { volume: playbackVolume, playbackRate } = pptx.mediaPlaybackAttributes({
|
|
474
482
|
loop: element.loop,
|
|
475
483
|
volume: element.volume,
|
|
476
484
|
playbackSpeed: element.playbackSpeed
|
|
@@ -518,7 +526,7 @@ function PresentationMediaController({
|
|
|
518
526
|
if (!el || !isPresentationMode) {
|
|
519
527
|
return;
|
|
520
528
|
}
|
|
521
|
-
return
|
|
529
|
+
return pptx.scheduleMediaTrimAndFade(el, {
|
|
522
530
|
trimStartMs: element.trimStartMs,
|
|
523
531
|
trimEndMs: element.trimEndMs,
|
|
524
532
|
fadeInDuration: element.fadeInDuration,
|
|
@@ -539,7 +547,7 @@ function PresentationMediaController({
|
|
|
539
547
|
}
|
|
540
548
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
541
549
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
542
|
-
if (
|
|
550
|
+
if (pptx.registerCrossSlideAudio(element, dataUrl)) {
|
|
543
551
|
return;
|
|
544
552
|
}
|
|
545
553
|
}
|
|
@@ -571,7 +579,7 @@ function PresentationMediaController({
|
|
|
571
579
|
}, []);
|
|
572
580
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full h-full", style: wrapperStyle, children: [
|
|
573
581
|
children({ mediaRef, onPlay: noopOnPlay, isMediaPlaying }),
|
|
574
|
-
|
|
582
|
+
pptx.shouldShowMediaFullscreenStopButton({
|
|
575
583
|
fullScreen: isFullScreen,
|
|
576
584
|
presenting: isPresentationMode,
|
|
577
585
|
playing: isMediaPlaying
|
|
@@ -588,7 +596,7 @@ function PresentationMediaController({
|
|
|
588
596
|
] });
|
|
589
597
|
}
|
|
590
598
|
function label(key) {
|
|
591
|
-
return key === void 0 ? void 0 :
|
|
599
|
+
return key === void 0 ? void 0 : i18n.translationsEn[key];
|
|
592
600
|
}
|
|
593
601
|
function FallbackIcon({
|
|
594
602
|
paths,
|
|
@@ -624,17 +632,17 @@ function Badge({
|
|
|
624
632
|
"div",
|
|
625
633
|
{
|
|
626
634
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
627
|
-
...{ [
|
|
635
|
+
...{ [pptx.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
628
636
|
children: [
|
|
629
637
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
630
638
|
FallbackIcon,
|
|
631
639
|
{
|
|
632
|
-
paths:
|
|
640
|
+
paths: pptx.mediaFallbackIcon(visual, element.mediaType),
|
|
633
641
|
size: isMissing ? 32 : 48,
|
|
634
642
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
635
643
|
}
|
|
636
644
|
),
|
|
637
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
645
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(pptx.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
638
646
|
]
|
|
639
647
|
}
|
|
640
648
|
);
|
|
@@ -651,17 +659,17 @@ function Placeholder({
|
|
|
651
659
|
"div",
|
|
652
660
|
{
|
|
653
661
|
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"}`,
|
|
654
|
-
...{ [
|
|
662
|
+
...{ [pptx.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
655
663
|
children: [
|
|
656
664
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
657
665
|
FallbackIcon,
|
|
658
666
|
{
|
|
659
|
-
paths:
|
|
667
|
+
paths: pptx.mediaFallbackIcon(visual, element.mediaType),
|
|
660
668
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
661
669
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
662
670
|
}
|
|
663
671
|
),
|
|
664
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
672
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(pptx.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
665
673
|
]
|
|
666
674
|
}
|
|
667
675
|
);
|
|
@@ -671,7 +679,7 @@ function renderMediaFallback({
|
|
|
671
679
|
posterUrl,
|
|
672
680
|
surface
|
|
673
681
|
}) {
|
|
674
|
-
const visual =
|
|
682
|
+
const visual = pptx.mediaFallbackVisual(surface, {
|
|
675
683
|
hasPoster: Boolean(posterUrl),
|
|
676
684
|
missing: element.mediaMissing === true
|
|
677
685
|
});
|
|
@@ -681,9 +689,9 @@ function renderMediaFallback({
|
|
|
681
689
|
"img",
|
|
682
690
|
{
|
|
683
691
|
src: posterUrl,
|
|
684
|
-
alt: visual.dimPoster ?
|
|
692
|
+
alt: visual.dimPoster ? i18n.translationsEn["pptx.media.posterAlt"] : i18n.translationsEn["pptx.media.videoPosterAlt"],
|
|
685
693
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
686
|
-
style:
|
|
694
|
+
style: pptx.getImageFitStyle(element)
|
|
687
695
|
}
|
|
688
696
|
),
|
|
689
697
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -693,7 +701,7 @@ function renderMediaFallback({
|
|
|
693
701
|
}
|
|
694
702
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
695
703
|
if (element.type !== "media") {
|
|
696
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
704
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: i18n.translationsEn["pptx.media.title"] });
|
|
697
705
|
}
|
|
698
706
|
const mediaType = element.mediaType;
|
|
699
707
|
const mediaPath = element.mediaPath;
|
|
@@ -701,7 +709,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
701
709
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
702
710
|
const trimFragment = buildTrimFragment(element);
|
|
703
711
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
704
|
-
const shouldLoop =
|
|
712
|
+
const shouldLoop = pptx.mediaPlaybackAttributes(element).loop;
|
|
705
713
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
706
714
|
const isFullScreen = options?.fullScreen === true;
|
|
707
715
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -714,17 +722,17 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
714
722
|
return renderMediaFallback({ element, posterUrl, surface });
|
|
715
723
|
}
|
|
716
724
|
if (mediaType === "video") {
|
|
717
|
-
const onlineVideo =
|
|
725
|
+
const onlineVideo = pptx.getOnlineVideoEmbed(element);
|
|
718
726
|
if (onlineVideo) {
|
|
719
727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
720
728
|
"iframe",
|
|
721
729
|
{
|
|
722
730
|
src: onlineVideo.embedUrl,
|
|
723
|
-
title:
|
|
731
|
+
title: i18n.translationsEn["pptx.media.onlineVideoTitle"],
|
|
724
732
|
className: "w-full h-full border-0 pointer-events-auto",
|
|
725
|
-
allow:
|
|
733
|
+
allow: pptx.ONLINE_VIDEO_IFRAME_ALLOW,
|
|
726
734
|
allowFullScreen: true,
|
|
727
|
-
sandbox:
|
|
735
|
+
sandbox: pptx.ONLINE_VIDEO_IFRAME_SANDBOX
|
|
728
736
|
}
|
|
729
737
|
);
|
|
730
738
|
}
|
|
@@ -793,32 +801,28 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
793
801
|
if (surface.presenting || surface.preview) {
|
|
794
802
|
return null;
|
|
795
803
|
}
|
|
796
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
804
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: i18n.translationsEn["pptx.media.title"] });
|
|
797
805
|
}
|
|
798
|
-
|
|
799
|
-
// src/viewer/utils/text-utils.tsx
|
|
800
806
|
function getTextStyleForElement(element, fallbackColor) {
|
|
801
|
-
return
|
|
807
|
+
return pptx.buildTextBlockStyle(element, { fallbackColor });
|
|
802
808
|
}
|
|
803
|
-
|
|
804
|
-
// src/viewer/utils/text-layout.tsx
|
|
805
809
|
function getTextLayoutStyle(element) {
|
|
806
|
-
if (!
|
|
810
|
+
if (!(0, dist_exports.hasTextProperties)(element)) {
|
|
807
811
|
return {};
|
|
808
812
|
}
|
|
809
|
-
const writingMode =
|
|
810
|
-
const textOrientation =
|
|
811
|
-
const verticalDirection =
|
|
813
|
+
const writingMode = pptx.toCssWritingMode(element.textStyle?.textDirection);
|
|
814
|
+
const textOrientation = pptx.toCssTextOrientation(element.textStyle?.textDirection);
|
|
815
|
+
const verticalDirection = pptx.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
812
816
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
813
817
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
814
|
-
const hasParagraphIndents =
|
|
818
|
+
const hasParagraphIndents = (0, dist_exports.hasTextProperties)(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
815
819
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
816
820
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
817
821
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
818
822
|
const textIndent = !hasParagraphIndents && typeof paragraphIndent === "number" && paragraphIndent !== 0 ? paragraphIndent : void 0;
|
|
819
823
|
const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
|
|
820
824
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
821
|
-
const bodyLayoutStyle =
|
|
825
|
+
const bodyLayoutStyle = pptx.buildTextBodyLayoutStyle(element);
|
|
822
826
|
return {
|
|
823
827
|
...bodyLayoutStyle,
|
|
824
828
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
@@ -845,10 +849,8 @@ function getTextLayoutStyle(element) {
|
|
|
845
849
|
} : {}
|
|
846
850
|
};
|
|
847
851
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
851
|
-
return chunkUHW3R465_js.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
852
|
+
function buildTextBody3DSceneStyle(textStyle, elementSize) {
|
|
853
|
+
return pptx.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
852
854
|
}
|
|
853
855
|
|
|
854
856
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1033,13 +1035,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1033
1035
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1034
1036
|
return renderedSegments;
|
|
1035
1037
|
}
|
|
1036
|
-
const paraKey = `${elementId}${
|
|
1038
|
+
const paraKey = `${elementId}${pptx.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1037
1039
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1038
1040
|
if (paraState) {
|
|
1039
1041
|
const style = buildAnimStyle(paraState);
|
|
1040
1042
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1041
1043
|
}
|
|
1042
|
-
const spec =
|
|
1044
|
+
const spec = pptx.buildTextBuildSpec(
|
|
1043
1045
|
elementId,
|
|
1044
1046
|
paraIndex,
|
|
1045
1047
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1057,7 +1059,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1057
1059
|
"span",
|
|
1058
1060
|
{
|
|
1059
1061
|
"data-anim-id": span.animId,
|
|
1060
|
-
style:
|
|
1062
|
+
style: pptx.textBuildSpanStyle(span),
|
|
1061
1063
|
children: content
|
|
1062
1064
|
},
|
|
1063
1065
|
span.animId
|
|
@@ -1068,17 +1070,17 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1068
1070
|
if (!isUnderlineWords || !text) {
|
|
1069
1071
|
return inner(text, keyPrefix, metric);
|
|
1070
1072
|
}
|
|
1071
|
-
const pieces =
|
|
1073
|
+
const pieces = pptx.splitWordsForUnderline(text);
|
|
1072
1074
|
if (pieces.length === 0) {
|
|
1073
1075
|
return inner(text, keyPrefix, metric);
|
|
1074
1076
|
}
|
|
1075
1077
|
const gapMetric = metric ? {
|
|
1076
1078
|
...metric,
|
|
1077
|
-
nestedStyle: metric.nestedStyle ?
|
|
1079
|
+
nestedStyle: metric.nestedStyle ? pptx.stripUnderlineDecoration(metric.nestedStyle) : void 0
|
|
1078
1080
|
} : void 0;
|
|
1079
1081
|
return pieces.map((piece, i) => {
|
|
1080
1082
|
const key = `${keyPrefix}-u${i}`;
|
|
1081
|
-
const following =
|
|
1083
|
+
const following = pptx.followingText(pieces, i, metric?.following);
|
|
1082
1084
|
if (!piece.underline) {
|
|
1083
1085
|
return /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: inner(piece.text, key, gapMetric && { ...gapMetric, following }) }, key);
|
|
1084
1086
|
}
|
|
@@ -1108,7 +1110,7 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1108
1110
|
);
|
|
1109
1111
|
}
|
|
1110
1112
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1111
|
-
const [lineLayout] =
|
|
1113
|
+
const [lineLayout] = pptx.buildRunTabLines(
|
|
1112
1114
|
line,
|
|
1113
1115
|
ctx,
|
|
1114
1116
|
nestedStyle,
|
|
@@ -1124,7 +1126,7 @@ function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underl
|
|
|
1124
1126
|
}) });
|
|
1125
1127
|
}
|
|
1126
1128
|
function renderEastAsianPieces(text, metric, keyPrefix, inner, baseStyle, following) {
|
|
1127
|
-
const parts =
|
|
1129
|
+
const parts = pptx.splitEastAsianBreaks(text, metric.eastAsian, metric.font, following);
|
|
1128
1130
|
if (parts.length === 1 && !parts[0].style) {
|
|
1129
1131
|
return inner(parts[0].text, keyPrefix);
|
|
1130
1132
|
}
|
|
@@ -1137,7 +1139,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1137
1139
|
if (!metric || !text) {
|
|
1138
1140
|
return inner(text, keyPrefix);
|
|
1139
1141
|
}
|
|
1140
|
-
const pieces =
|
|
1142
|
+
const pieces = pptx.splitRunForMetrics(text, metric.font);
|
|
1141
1143
|
if (pieces.length <= 1) {
|
|
1142
1144
|
return renderEastAsianPieces(text, metric, keyPrefix, inner, void 0, metric.following);
|
|
1143
1145
|
}
|
|
@@ -1145,7 +1147,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1145
1147
|
const key = `${keyPrefix}-w${i}`;
|
|
1146
1148
|
const style = {
|
|
1147
1149
|
...metric.nestedStyle,
|
|
1148
|
-
letterSpacing:
|
|
1150
|
+
letterSpacing: pptx.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1149
1151
|
};
|
|
1150
1152
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style, children: renderEastAsianPieces(
|
|
1151
1153
|
piece.text,
|
|
@@ -1153,7 +1155,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1153
1155
|
key,
|
|
1154
1156
|
inner,
|
|
1155
1157
|
style,
|
|
1156
|
-
|
|
1158
|
+
pptx.followingText(pieces, i, metric.following)
|
|
1157
1159
|
) }, key);
|
|
1158
1160
|
});
|
|
1159
1161
|
}
|
|
@@ -1161,7 +1163,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1161
1163
|
if (!needsScriptFonts || !text) {
|
|
1162
1164
|
return text;
|
|
1163
1165
|
}
|
|
1164
|
-
const pieces =
|
|
1166
|
+
const pieces = pptx.splitRunByScriptFont(
|
|
1165
1167
|
text,
|
|
1166
1168
|
scriptFonts,
|
|
1167
1169
|
baseFontFamily,
|
|
@@ -1236,15 +1238,15 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1236
1238
|
color: "inherit",
|
|
1237
1239
|
borderRadius: 2
|
|
1238
1240
|
},
|
|
1239
|
-
children: renderLeaf(chunk.text, chunkKey,
|
|
1241
|
+
children: renderLeaf(chunk.text, chunkKey, pptx.followingText(chunks, ci, metric?.following))
|
|
1240
1242
|
},
|
|
1241
1243
|
chunkKey
|
|
1242
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: renderLeaf(chunk.text, chunkKey,
|
|
1244
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: renderLeaf(chunk.text, chunkKey, pptx.followingText(chunks, ci, metric?.following)) }, chunkKey);
|
|
1243
1245
|
});
|
|
1244
1246
|
}
|
|
1245
1247
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber, fontSize) {
|
|
1246
|
-
const mathml =
|
|
1247
|
-
const safeMathml = mathml ?
|
|
1248
|
+
const mathml = pptx.convertOmmlToMathMl(equationXml);
|
|
1249
|
+
const safeMathml = mathml ? pptx.sanitizeMathMl(mathml) : "";
|
|
1248
1250
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1249
1251
|
"span",
|
|
1250
1252
|
{
|
|
@@ -1254,7 +1256,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1254
1256
|
},
|
|
1255
1257
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1256
1258
|
}
|
|
1257
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1259
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: i18n.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1258
1260
|
if (equationNumber) {
|
|
1259
1261
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1260
1262
|
"span",
|
|
@@ -1384,7 +1386,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1384
1386
|
const segmentStyle = segment?.style ?? {};
|
|
1385
1387
|
const textValue = run.text;
|
|
1386
1388
|
const lines = textValue.split("\n");
|
|
1387
|
-
const resolvedSegmentColor =
|
|
1389
|
+
const resolvedSegmentColor = pptx.normalizeHexColor(
|
|
1388
1390
|
segmentStyle.color || element.textStyle?.color,
|
|
1389
1391
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1390
1392
|
);
|
|
@@ -1392,35 +1394,36 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1392
1394
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1393
1395
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1394
1396
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1395
|
-
const baseFontSize =
|
|
1397
|
+
const baseFontSize = pptx.scaleFontSizeForAutoFit(
|
|
1396
1398
|
rawFontSize,
|
|
1397
|
-
|
|
1399
|
+
pptx.resolveAutoFitFontScale(element.textStyle)
|
|
1398
1400
|
);
|
|
1399
1401
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1400
|
-
const fontKerning =
|
|
1402
|
+
const fontKerning = pptx.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1401
1403
|
const scriptFallbackWins = Boolean(
|
|
1402
1404
|
segmentStyle.scriptFallbackFont && segmentStyle.fontFamilyIsCascadeDefault
|
|
1403
1405
|
);
|
|
1404
1406
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1405
|
-
const baseFontFamily = scriptFallbackWins ?
|
|
1407
|
+
const baseFontFamily = scriptFallbackWins ? (0, dist_exports.getSubstituteFontFamily)(segmentStyle.scriptFallbackFont) : rawFontFamily ? (0, dist_exports.getSubstituteFontFamily)(
|
|
1406
1408
|
rawFontFamily,
|
|
1407
|
-
|
|
1408
|
-
) :
|
|
1409
|
-
const scriptFonts =
|
|
1410
|
-
const needsScriptFonts =
|
|
1411
|
-
const authoredLetterSpacing =
|
|
1409
|
+
(0, dist_exports.parsePanoseString)(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1410
|
+
) : DEFAULT_FONT_FAMILY;
|
|
1411
|
+
const scriptFonts = pptx.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1412
|
+
const needsScriptFonts = pptx.hasDistinctScriptFonts(scriptFonts);
|
|
1413
|
+
const authoredLetterSpacing = pptx.authoredLetterSpacingPx(segmentStyle);
|
|
1412
1414
|
const metricFont = {
|
|
1413
1415
|
fontFamily: baseFontFamily,
|
|
1414
1416
|
fontSizePx: baseFontSize * baselineFontScale,
|
|
1415
1417
|
bold: Boolean(segmentStyle.bold),
|
|
1416
1418
|
italic: Boolean(segmentStyle.italic)
|
|
1417
1419
|
};
|
|
1418
|
-
const nestedStyle =
|
|
1420
|
+
const nestedStyle = pptx.nestedTextDecorationStyle(run.style);
|
|
1419
1421
|
const metricContext = {
|
|
1420
1422
|
font: metricFont,
|
|
1421
1423
|
authoredPx: authoredLetterSpacing,
|
|
1422
1424
|
nestedStyle,
|
|
1423
|
-
|
|
1425
|
+
// Resolved per run, so a Korean run keeps its Hangul words whole.
|
|
1426
|
+
eastAsian: pptx.eastAsianBreaksForRun(ctx.eastAsianBreaks, segmentStyle.language),
|
|
1424
1427
|
following: ctx.eastAsianFollowing
|
|
1425
1428
|
};
|
|
1426
1429
|
const spanStyle = { ...run.style };
|
|
@@ -1429,11 +1432,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1429
1432
|
spanStyle.fontFamily = baseFontFamily;
|
|
1430
1433
|
spanStyle.verticalAlign = baselineShift;
|
|
1431
1434
|
spanStyle.fontKerning = fontKerning;
|
|
1432
|
-
spanStyle.letterSpacing =
|
|
1435
|
+
spanStyle.letterSpacing = pptx.pieceLetterSpacing(
|
|
1433
1436
|
authoredLetterSpacing,
|
|
1434
|
-
|
|
1437
|
+
pptx.resolveMetricTrackingPx(textValue, metricFont)
|
|
1435
1438
|
);
|
|
1436
|
-
const hollow =
|
|
1439
|
+
const hollow = pptx.hollowTextFillStyle(segmentStyle, {
|
|
1437
1440
|
color: resolvedSegmentColor,
|
|
1438
1441
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1439
1442
|
});
|
|
@@ -1445,10 +1448,10 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1445
1448
|
spanStyle.direction = runRtl ? "rtl" : "ltr";
|
|
1446
1449
|
spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
|
|
1447
1450
|
}
|
|
1448
|
-
const isUnderlineWords =
|
|
1451
|
+
const isUnderlineWords = pptx.splitsUnderlineIntoWords(segmentStyle);
|
|
1449
1452
|
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1450
1453
|
if (isUnderlineWords) {
|
|
1451
|
-
const stripped =
|
|
1454
|
+
const stripped = pptx.stripUnderlineDecoration(spanStyle);
|
|
1452
1455
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
1453
1456
|
delete spanStyle.textDecorationStyle;
|
|
1454
1457
|
delete spanStyle.textDecorationThickness;
|
|
@@ -1464,7 +1467,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1464
1467
|
scriptFonts,
|
|
1465
1468
|
baseFontFamily,
|
|
1466
1469
|
findHighlights,
|
|
1467
|
-
|
|
1470
|
+
pptx.buildTabContext(
|
|
1468
1471
|
element.textStyle?.tabStops,
|
|
1469
1472
|
element.textStyle?.defaultTabSize,
|
|
1470
1473
|
baseFontSize,
|
|
@@ -1497,14 +1500,14 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1497
1500
|
const segment = sourceRun ? segments[seed.segmentIndex] : { text: seed.text, style: seed.style };
|
|
1498
1501
|
const resolvedSegment = {
|
|
1499
1502
|
...segment,
|
|
1500
|
-
style:
|
|
1503
|
+
style: pptx.withInlineListDecorationDefaults(segment.style, context.element.textStyle)
|
|
1501
1504
|
};
|
|
1502
|
-
const decorationCss =
|
|
1505
|
+
const decorationCss = pptx.segmentStyleToCss(
|
|
1503
1506
|
resolvedSegment,
|
|
1504
|
-
|
|
1507
|
+
pptx.resolveAutoFitFontScale(context.element.textStyle)
|
|
1505
1508
|
);
|
|
1506
|
-
|
|
1507
|
-
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...
|
|
1509
|
+
pptx.applyUnderlineVariant(decorationCss, resolvedSegment);
|
|
1510
|
+
const run = sourceRun ? { ...sourceRun, style: { ...sourceRun.style, ...pptx.nestedTextDecorationStyle(decorationCss) } } : {
|
|
1508
1511
|
text: seed.text,
|
|
1509
1512
|
style: decorationCss,
|
|
1510
1513
|
segmentIndex: seed.segmentIndex
|
|
@@ -1519,7 +1522,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1519
1522
|
});
|
|
1520
1523
|
}
|
|
1521
1524
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1522
|
-
if (!
|
|
1525
|
+
if (!(0, dist_exports.hasTextProperties)(element)) {
|
|
1523
1526
|
return emptyFallback || null;
|
|
1524
1527
|
}
|
|
1525
1528
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1529,7 +1532,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1529
1532
|
}
|
|
1530
1533
|
return element.text || emptyFallback || "";
|
|
1531
1534
|
}
|
|
1532
|
-
const paragraphs =
|
|
1535
|
+
const paragraphs = pptx.buildParagraphs(element, fieldContext, segmentOverrides, {
|
|
1533
1536
|
preserveTrailingEmpty: inlineListSeed ? true : void 0,
|
|
1534
1537
|
eastAsianRunPieces: false
|
|
1535
1538
|
});
|
|
@@ -1576,7 +1579,7 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
|
|
|
1576
1579
|
const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map(
|
|
1577
1580
|
(run, i) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], {
|
|
1578
1581
|
...runCtx,
|
|
1579
|
-
eastAsianFollowing: para.eastAsianBreaks ?
|
|
1582
|
+
eastAsianFollowing: para.eastAsianBreaks ? pptx.followingText(runs, i) : void 0
|
|
1580
1583
|
})
|
|
1581
1584
|
);
|
|
1582
1585
|
const paraStyle = {
|
|
@@ -1682,13 +1685,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1682
1685
|
);
|
|
1683
1686
|
}
|
|
1684
1687
|
function getDuotoneColors(element) {
|
|
1685
|
-
if (!
|
|
1688
|
+
if (!(0, dist_exports.isImageLikeElement)(element)) {
|
|
1686
1689
|
return void 0;
|
|
1687
1690
|
}
|
|
1688
1691
|
return element.imageEffects?.duotone;
|
|
1689
1692
|
}
|
|
1690
1693
|
function buildLineShadowCss(element) {
|
|
1691
|
-
if (!
|
|
1694
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
1692
1695
|
return void 0;
|
|
1693
1696
|
}
|
|
1694
1697
|
const ss = element.shapeStyle;
|
|
@@ -1699,13 +1702,13 @@ function buildLineShadowCss(element) {
|
|
|
1699
1702
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1700
1703
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1701
1704
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1702
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1703
|
-
|
|
1705
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${pptx.colorWithOpacity(
|
|
1706
|
+
pptx.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1704
1707
|
opacity
|
|
1705
1708
|
)}`;
|
|
1706
1709
|
}
|
|
1707
1710
|
function buildLineGlowFilter(element) {
|
|
1708
|
-
if (!
|
|
1711
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
1709
1712
|
return void 0;
|
|
1710
1713
|
}
|
|
1711
1714
|
const ss = element.shapeStyle;
|
|
@@ -1714,22 +1717,22 @@ function buildLineGlowFilter(element) {
|
|
|
1714
1717
|
}
|
|
1715
1718
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1716
1719
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1717
|
-
const glowCol =
|
|
1720
|
+
const glowCol = pptx.colorWithOpacity(pptx.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1718
1721
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1719
1722
|
}
|
|
1720
1723
|
function getDagDuotoneFilterId(elementId) {
|
|
1721
1724
|
return `dag-duotone-${elementId}`;
|
|
1722
1725
|
}
|
|
1723
1726
|
function hasDagDuotoneEffect(element) {
|
|
1724
|
-
if (!
|
|
1727
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
1725
1728
|
return false;
|
|
1726
1729
|
}
|
|
1727
1730
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1728
1731
|
}
|
|
1729
1732
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1730
1733
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1731
|
-
const c1 =
|
|
1732
|
-
const c2 =
|
|
1734
|
+
const c1 = pptx.hexToRgbUnit(color1);
|
|
1735
|
+
const c2 = pptx.hexToRgbUnit(color2);
|
|
1733
1736
|
const grayscaleMatrix = [
|
|
1734
1737
|
0.2126,
|
|
1735
1738
|
0.7152,
|
|
@@ -1770,10 +1773,8 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1770
1773
|
}
|
|
1771
1774
|
);
|
|
1772
1775
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1776
|
-
return chunkUHW3R465_js.build3DExtrusionData(
|
|
1776
|
+
function build3DExtrusionData(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1777
|
+
return pptx.build3DExtrusionData(
|
|
1777
1778
|
shape3d,
|
|
1778
1779
|
scene3d,
|
|
1779
1780
|
fillColor,
|
|
@@ -1781,8 +1782,8 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1781
1782
|
elementHeight
|
|
1782
1783
|
);
|
|
1783
1784
|
}
|
|
1784
|
-
function
|
|
1785
|
-
|
|
1785
|
+
function apply3dEffects(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1786
|
+
pptx.apply3dEffects(
|
|
1786
1787
|
base,
|
|
1787
1788
|
scene3d,
|
|
1788
1789
|
shape3d,
|
|
@@ -1797,11 +1798,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1797
1798
|
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;
|
|
1798
1799
|
}
|
|
1799
1800
|
function rendersWedgeCalloutVector(element) {
|
|
1800
|
-
return element.type === "shape" &&
|
|
1801
|
+
return element.type === "shape" && pptx.isWedgeCalloutPresetShape(element.shapeType);
|
|
1801
1802
|
}
|
|
1802
1803
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1803
1804
|
if (element.type === "group") {
|
|
1804
|
-
const fx2 =
|
|
1805
|
+
const fx2 = pptx.getComputedEffectStyle(element);
|
|
1805
1806
|
const groupStyle = {};
|
|
1806
1807
|
if (fx2.filter) {
|
|
1807
1808
|
groupStyle.filter = fx2.filter;
|
|
@@ -1811,13 +1812,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1811
1812
|
}
|
|
1812
1813
|
return groupStyle;
|
|
1813
1814
|
}
|
|
1814
|
-
if (!
|
|
1815
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
1815
1816
|
return {};
|
|
1816
1817
|
}
|
|
1817
1818
|
const ss = element.shapeStyle;
|
|
1818
|
-
const fill = animatesFill ? void 0 :
|
|
1819
|
-
const fx =
|
|
1820
|
-
const stroke =
|
|
1819
|
+
const fill = animatesFill ? void 0 : pptx.getComputedFillStyle(element, parentGroupFill);
|
|
1820
|
+
const fx = pptx.getComputedEffectStyle(element);
|
|
1821
|
+
const stroke = pptx.getComputedStrokeStyle(element);
|
|
1821
1822
|
const base = {
|
|
1822
1823
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1823
1824
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1856,7 +1857,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1856
1857
|
};
|
|
1857
1858
|
Object.assign(
|
|
1858
1859
|
base,
|
|
1859
|
-
|
|
1860
|
+
pptx.getAnimationColorBaseStyle(element, {
|
|
1860
1861
|
animatesFill,
|
|
1861
1862
|
animatesStroke,
|
|
1862
1863
|
parentGroupFill
|
|
@@ -1867,7 +1868,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1867
1868
|
base.borderColor = void 0;
|
|
1868
1869
|
base.borderStyle = void 0;
|
|
1869
1870
|
}
|
|
1870
|
-
|
|
1871
|
+
apply3dEffects(
|
|
1871
1872
|
base,
|
|
1872
1873
|
ss?.scene3d,
|
|
1873
1874
|
ss?.shape3d,
|
|
@@ -1878,7 +1879,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1878
1879
|
},
|
|
1879
1880
|
element.id
|
|
1880
1881
|
);
|
|
1881
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1882
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || pptx.isStrokeOnlyPresetElement(element)) {
|
|
1882
1883
|
base.backgroundColor = "transparent";
|
|
1883
1884
|
base.backgroundImage = void 0;
|
|
1884
1885
|
base.borderWidth = void 0;
|
|
@@ -1892,7 +1893,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1892
1893
|
if (rendersWedgeCalloutVector(element)) {
|
|
1893
1894
|
return base;
|
|
1894
1895
|
}
|
|
1895
|
-
const geometry =
|
|
1896
|
+
const geometry = pptx.resolveShapeGeometry(element);
|
|
1896
1897
|
switch (geometry.kind) {
|
|
1897
1898
|
case "bare":
|
|
1898
1899
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1915,8 +1916,8 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1915
1916
|
return base;
|
|
1916
1917
|
}
|
|
1917
1918
|
}
|
|
1918
|
-
function
|
|
1919
|
-
return
|
|
1919
|
+
function getConnectorPathGeometry(element) {
|
|
1920
|
+
return (0, dist_exports.getConnectorPathGeometry)(element);
|
|
1920
1921
|
}
|
|
1921
1922
|
var ARROW_SIZE_SCALE = {
|
|
1922
1923
|
sm: 0.6,
|
|
@@ -1985,11 +1986,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1985
1986
|
strokePaint,
|
|
1986
1987
|
strokeWidth,
|
|
1987
1988
|
dashArray,
|
|
1988
|
-
lineCap:
|
|
1989
|
+
lineCap: pptx.svgLineCap(shapeStyle?.lineCap),
|
|
1989
1990
|
lineJoin,
|
|
1990
1991
|
miterLimit,
|
|
1991
|
-
offsets:
|
|
1992
|
-
widths:
|
|
1992
|
+
offsets: pptx.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1993
|
+
widths: pptx.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1993
1994
|
};
|
|
1994
1995
|
}
|
|
1995
1996
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2012,12 +2013,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
2012
2013
|
}
|
|
2013
2014
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2014
2015
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2015
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2016
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? (0, dist_exports.customGeometryPathsToSvgSubpaths)(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2016
2017
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2017
|
-
const gradientPaint = gradient ?
|
|
2018
|
+
const gradientPaint = gradient ? pptx.svgGradientFillRef(gradient) : void 0;
|
|
2018
2019
|
const nodes = [];
|
|
2019
2020
|
if (subpaths && needsPerSubpath) {
|
|
2020
|
-
const paints =
|
|
2021
|
+
const paints = pptx.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2021
2022
|
paints.forEach((paint, idx) => {
|
|
2022
2023
|
if (paint.fill !== "none") {
|
|
2023
2024
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2046,7 +2047,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2046
2047
|
"path",
|
|
2047
2048
|
{
|
|
2048
2049
|
d: pathData,
|
|
2049
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2050
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? pptx.colorWithOpacity(fillColor, fillOpacity),
|
|
2050
2051
|
stroke: "none",
|
|
2051
2052
|
vectorEffect: "non-scaling-stroke"
|
|
2052
2053
|
},
|
|
@@ -2072,14 +2073,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2072
2073
|
);
|
|
2073
2074
|
}
|
|
2074
2075
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2075
|
-
if (!
|
|
2076
|
+
if (!(0, dist_exports.hasShapeProperties)(element)) {
|
|
2076
2077
|
return null;
|
|
2077
2078
|
}
|
|
2078
2079
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2079
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2080
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2081
|
-
const dashType =
|
|
2082
|
-
const dashArray =
|
|
2080
|
+
const fillPaint = animatesFill ? "inherit" : pptx.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2081
|
+
const strokePaint = animatesStroke ? "inherit" : pptx.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2082
|
+
const dashType = pptx.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2083
|
+
const dashArray = pptx.getSvgStrokeDasharray(
|
|
2083
2084
|
dashType,
|
|
2084
2085
|
Math.max(strokeWidth, 1),
|
|
2085
2086
|
element.shapeStyle?.customDashSegments
|
|
@@ -2160,13 +2161,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2160
2161
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2161
2162
|
// without this the shape fell back to the parser's representative solid
|
|
2162
2163
|
// and lost every fade (issue #132).
|
|
2163
|
-
|
|
2164
|
+
pptx.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2164
2165
|
);
|
|
2165
2166
|
}
|
|
2166
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2167
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !pptx.buildStrokeOutline(element)) {
|
|
2167
2168
|
const width = Math.max(element.width, 1);
|
|
2168
2169
|
const height = Math.max(element.height, 1);
|
|
2169
|
-
const geometry =
|
|
2170
|
+
const geometry = pptx.getPresetShapeVectorGeometry(
|
|
2170
2171
|
element.shapeType || "rect",
|
|
2171
2172
|
width,
|
|
2172
2173
|
height,
|
|
@@ -2194,18 +2195,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2194
2195
|
);
|
|
2195
2196
|
}
|
|
2196
2197
|
}
|
|
2197
|
-
if (element.type === "shape" &&
|
|
2198
|
+
if (element.type === "shape" && pptx.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2198
2199
|
const width = Math.max(element.width, 1);
|
|
2199
2200
|
const height = Math.max(element.height, 1);
|
|
2200
|
-
const geometry =
|
|
2201
|
+
const geometry = pptx.getPresetShapeVectorGeometry(
|
|
2201
2202
|
element.shapeType,
|
|
2202
2203
|
width,
|
|
2203
2204
|
height,
|
|
2204
2205
|
element.shapeAdjustments
|
|
2205
2206
|
);
|
|
2206
2207
|
if (geometry) {
|
|
2207
|
-
const gradient =
|
|
2208
|
-
const gradientPaint = gradient ?
|
|
2208
|
+
const gradient = pptx.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2209
|
+
const gradientPaint = gradient ? pptx.svgGradientFillRef(gradient) : void 0;
|
|
2209
2210
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2210
2211
|
"svg",
|
|
2211
2212
|
{
|
|
@@ -2238,18 +2239,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2238
2239
|
);
|
|
2239
2240
|
}
|
|
2240
2241
|
}
|
|
2241
|
-
if (
|
|
2242
|
+
if ((0, dist_exports.isCalloutShape)(normalizedType)) {
|
|
2242
2243
|
const width = Math.max(element.width, 1);
|
|
2243
2244
|
const height = Math.max(element.height, 1);
|
|
2244
|
-
const geometry =
|
|
2245
|
+
const geometry = (0, dist_exports.getCalloutLeaderLineGeometry)(
|
|
2245
2246
|
normalizedType,
|
|
2246
2247
|
width,
|
|
2247
2248
|
height,
|
|
2248
2249
|
element.shapeAdjustments
|
|
2249
2250
|
);
|
|
2250
2251
|
if (geometry && geometry.points.length >= 2) {
|
|
2251
|
-
const leaderPath =
|
|
2252
|
-
const bounds =
|
|
2252
|
+
const leaderPath = (0, dist_exports.buildCalloutLeaderLineSvgPath)(geometry);
|
|
2253
|
+
const bounds = (0, dist_exports.getCalloutViewBoxBounds)(width, height, geometry);
|
|
2253
2254
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2254
2255
|
const offsetLeft = bounds.minX;
|
|
2255
2256
|
const offsetTop = bounds.minY;
|
|
@@ -2301,7 +2302,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2301
2302
|
if (element.type === "connector" || getShapeType(element.shapeType) === "connector" || element.shapeType === "line") {
|
|
2302
2303
|
const viewWidth = Math.max(element.width, 1);
|
|
2303
2304
|
const viewHeight = Math.max(element.height, 1);
|
|
2304
|
-
const { pathData } =
|
|
2305
|
+
const { pathData } = getConnectorPathGeometry(element);
|
|
2305
2306
|
const markerSeed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
2306
2307
|
const startMarkerId = `${markerSeed}-start-arrow`;
|
|
2307
2308
|
const endMarkerId = `${markerSeed}-end-arrow`;
|
|
@@ -2312,10 +2313,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2312
2313
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2313
2314
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2314
2315
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2315
|
-
const connectorLineCap =
|
|
2316
|
+
const connectorLineCap = pptx.svgLineCap(element.shapeStyle?.lineCap);
|
|
2316
2317
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2317
|
-
const offsets =
|
|
2318
|
-
const widths =
|
|
2318
|
+
const offsets = pptx.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2319
|
+
const widths = pptx.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2319
2320
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2320
2321
|
"svg",
|
|
2321
2322
|
{
|
|
@@ -2382,15 +2383,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2382
2383
|
}
|
|
2383
2384
|
const rawStops = stops.map((gs) => {
|
|
2384
2385
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2385
|
-
const color =
|
|
2386
|
-
const opacity =
|
|
2386
|
+
const color = pptx.parseDrawingColor(gs) ?? "#888888";
|
|
2387
|
+
const opacity = pptx.parseDrawingColorOpacity(gs);
|
|
2387
2388
|
return { position: pos, color, opacity };
|
|
2388
2389
|
}).sort((a, b) => a.position - b.position);
|
|
2389
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2390
|
+
const stopStrings = rawStops.map((s) => `${pptx.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2390
2391
|
const lin = gradFill["a:lin"];
|
|
2391
2392
|
if (lin) {
|
|
2392
2393
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2393
|
-
const angleDeg = Math.round(
|
|
2394
|
+
const angleDeg = Math.round((0, dist_exports.ooxmlGradientAngleToCssDegrees)(angRaw / 6e4));
|
|
2394
2395
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2395
2396
|
}
|
|
2396
2397
|
const path = gradFill["a:path"];
|
|
@@ -2404,7 +2405,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2404
2405
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2405
2406
|
} : void 0;
|
|
2406
2407
|
if (pathType === "rect") {
|
|
2407
|
-
return
|
|
2408
|
+
return pptx.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2408
2409
|
}
|
|
2409
2410
|
let cx = 50;
|
|
2410
2411
|
let cy = 50;
|
|
@@ -2426,8 +2427,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2426
2427
|
if (!pattFill) {
|
|
2427
2428
|
return void 0;
|
|
2428
2429
|
}
|
|
2429
|
-
const fgColor =
|
|
2430
|
-
const bgColor =
|
|
2430
|
+
const fgColor = pptx.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2431
|
+
const bgColor = pptx.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2431
2432
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2432
2433
|
switch (preset) {
|
|
2433
2434
|
case "ltHorz":
|
|
@@ -2538,11 +2539,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2538
2539
|
const prstDash = ln["a:prstDash"];
|
|
2539
2540
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2540
2541
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2541
|
-
const color =
|
|
2542
|
+
const color = pptx.parseDrawingColor(ln["a:solidFill"]);
|
|
2542
2543
|
if (color) {
|
|
2543
|
-
const opacity =
|
|
2544
|
+
const opacity = pptx.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2544
2545
|
const key = `${edge.prefix}`;
|
|
2545
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2546
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${pptx.colorWithOpacity(color, opacity)}`;
|
|
2546
2547
|
}
|
|
2547
2548
|
}
|
|
2548
2549
|
return borderStyle;
|
|
@@ -2555,7 +2556,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2555
2556
|
const textShadowParts = [];
|
|
2556
2557
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2557
2558
|
if (outerShdw) {
|
|
2558
|
-
const shdwColor =
|
|
2559
|
+
const shdwColor = pptx.parseDrawingColor(outerShdw);
|
|
2559
2560
|
if (shdwColor) {
|
|
2560
2561
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2561
2562
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2573,7 +2574,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2573
2574
|
}
|
|
2574
2575
|
const glow = effectLst["a:glow"];
|
|
2575
2576
|
if (glow) {
|
|
2576
|
-
const glowColor =
|
|
2577
|
+
const glowColor = pptx.parseDrawingColor(glow);
|
|
2577
2578
|
if (glowColor) {
|
|
2578
2579
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2579
2580
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2595,11 +2596,11 @@ function extractCellText(cellXml) {
|
|
|
2595
2596
|
const textParts = [];
|
|
2596
2597
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2597
2598
|
runs.forEach((run) => {
|
|
2598
|
-
textParts.push(
|
|
2599
|
+
textParts.push((0, dist_exports.xmlText)(run["a:t"]) ?? "");
|
|
2599
2600
|
});
|
|
2600
2601
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2601
2602
|
fields.forEach((field) => {
|
|
2602
|
-
textParts.push(
|
|
2603
|
+
textParts.push((0, dist_exports.xmlText)(field["a:t"]) ?? "");
|
|
2603
2604
|
});
|
|
2604
2605
|
paragraphTexts.push(textParts.join(""));
|
|
2605
2606
|
});
|
|
@@ -2643,10 +2644,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2643
2644
|
if (runProps?.["@_u"] !== void 0) {
|
|
2644
2645
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2645
2646
|
}
|
|
2646
|
-
const runColor =
|
|
2647
|
+
const runColor = pptx.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || pptx.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2647
2648
|
if (runColor) {
|
|
2648
|
-
const opacity =
|
|
2649
|
-
cellStyle.color =
|
|
2649
|
+
const opacity = pptx.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2650
|
+
cellStyle.color = pptx.colorWithOpacity(runColor, opacity);
|
|
2650
2651
|
}
|
|
2651
2652
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2652
2653
|
if (fontFamily) {
|
|
@@ -2656,15 +2657,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2656
2657
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2657
2658
|
}
|
|
2658
2659
|
const cellProperties = cellXml["a:tcPr"];
|
|
2659
|
-
const cellFill =
|
|
2660
|
+
const cellFill = pptx.parseDrawingColor(
|
|
2660
2661
|
cellProperties?.["a:solidFill"],
|
|
2661
2662
|
schemeColorOverrides
|
|
2662
2663
|
);
|
|
2663
2664
|
if (cellFill) {
|
|
2664
|
-
const opacity =
|
|
2665
|
+
const opacity = pptx.parseDrawingColorOpacity(
|
|
2665
2666
|
cellProperties?.["a:solidFill"]
|
|
2666
2667
|
);
|
|
2667
|
-
cellStyle.backgroundColor =
|
|
2668
|
+
cellStyle.backgroundColor = pptx.colorWithOpacity(cellFill, opacity);
|
|
2668
2669
|
} else {
|
|
2669
2670
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2670
2671
|
if (gradCss) {
|
|
@@ -2679,16 +2680,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2679
2680
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2680
2681
|
Object.assign(cellStyle, edgeBorders);
|
|
2681
2682
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2682
|
-
const borderColor =
|
|
2683
|
+
const borderColor = pptx.parseDrawingColor(
|
|
2683
2684
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2684
2685
|
schemeColorOverrides
|
|
2685
|
-
) ||
|
|
2686
|
+
) || pptx.parseDrawingColor(
|
|
2686
2687
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2687
2688
|
schemeColorOverrides
|
|
2688
|
-
) ||
|
|
2689
|
+
) || pptx.parseDrawingColor(
|
|
2689
2690
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2690
2691
|
schemeColorOverrides
|
|
2691
|
-
) ||
|
|
2692
|
+
) || pptx.parseDrawingColor(
|
|
2692
2693
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2693
2694
|
schemeColorOverrides
|
|
2694
2695
|
);
|
|
@@ -2697,22 +2698,22 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2697
2698
|
}
|
|
2698
2699
|
}
|
|
2699
2700
|
if (cellProperties) {
|
|
2700
|
-
const
|
|
2701
|
-
const
|
|
2702
|
-
const
|
|
2703
|
-
const
|
|
2704
|
-
const
|
|
2705
|
-
if (
|
|
2706
|
-
cellStyle.paddingLeft =
|
|
2701
|
+
const margin = (key) => Number.parseInt(String(cellProperties[key] ?? ""), 10) / EMU_PER_PX;
|
|
2702
|
+
const marL = margin("@_marL");
|
|
2703
|
+
const marR = margin("@_marR");
|
|
2704
|
+
const marT = margin("@_marT");
|
|
2705
|
+
const marB = margin("@_marB");
|
|
2706
|
+
if (marL >= 0) {
|
|
2707
|
+
cellStyle.paddingLeft = marL;
|
|
2707
2708
|
}
|
|
2708
|
-
if (
|
|
2709
|
-
cellStyle.paddingRight =
|
|
2709
|
+
if (marR >= 0) {
|
|
2710
|
+
cellStyle.paddingRight = marR;
|
|
2710
2711
|
}
|
|
2711
|
-
if (
|
|
2712
|
-
cellStyle.paddingTop =
|
|
2712
|
+
if (marT >= 0) {
|
|
2713
|
+
cellStyle.paddingTop = marT;
|
|
2713
2714
|
}
|
|
2714
|
-
if (
|
|
2715
|
-
cellStyle.paddingBottom =
|
|
2715
|
+
if (marB >= 0) {
|
|
2716
|
+
cellStyle.paddingBottom = marB;
|
|
2716
2717
|
}
|
|
2717
2718
|
}
|
|
2718
2719
|
if (cellProperties?.["@_anchor"]) {
|
|
@@ -2754,13 +2755,11 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2754
2755
|
}
|
|
2755
2756
|
return cellStyle;
|
|
2756
2757
|
}
|
|
2757
|
-
|
|
2758
|
-
// src/viewer/utils/table-band-style.tsx
|
|
2759
|
-
function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
|
|
2758
|
+
function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
|
|
2760
2759
|
if (element.type !== "table") {
|
|
2761
2760
|
return void 0;
|
|
2762
2761
|
}
|
|
2763
|
-
return
|
|
2762
|
+
return pptx.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2764
2763
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2765
2764
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2766
2765
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2840,15 +2839,15 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2840
2839
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2841
2840
|
"span",
|
|
2842
2841
|
{
|
|
2843
|
-
style: { position: "relative", ...
|
|
2842
|
+
style: { position: "relative", ...pptx.cellRunStyle(run) },
|
|
2844
2843
|
children: run.text
|
|
2845
2844
|
},
|
|
2846
2845
|
`r-${index}`
|
|
2847
2846
|
);
|
|
2848
2847
|
});
|
|
2849
2848
|
}
|
|
2850
|
-
function
|
|
2851
|
-
return
|
|
2849
|
+
function getCellDiagonalBorders(style, tableData, pos, styleCtx) {
|
|
2850
|
+
return pptx.getCellDiagonalBorders(style, tableData, pos, {
|
|
2852
2851
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2853
2852
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2854
2853
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2981,7 +2980,7 @@ function TableResizeOverlay({
|
|
|
2981
2980
|
const containerRef = React8.useRef(null);
|
|
2982
2981
|
const [rowBounds, setRowBounds] = React8.useState([]);
|
|
2983
2982
|
const dragRef = React8.useRef(null);
|
|
2984
|
-
const colBoundaries = React8.useMemo(() =>
|
|
2983
|
+
const colBoundaries = React8.useMemo(() => pptx.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2985
2984
|
const measureRows = React8.useCallback(() => {
|
|
2986
2985
|
const container = containerRef.current;
|
|
2987
2986
|
if (!container) {
|
|
@@ -3028,11 +3027,11 @@ function TableResizeOverlay({
|
|
|
3028
3027
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3029
3028
|
if (e.clientX !== drag.startPos && drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3030
3029
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3031
|
-
onResizeColumns(
|
|
3030
|
+
onResizeColumns(pptx.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3032
3031
|
} else if (e.clientY !== drag.startPos && drag.type === "row" && onResizeRow) {
|
|
3033
3032
|
const deltaY = e.clientY - drag.startPos;
|
|
3034
|
-
const newHeight =
|
|
3035
|
-
drag.initialRowHeight ??
|
|
3033
|
+
const newHeight = pptx.computeResizedRowHeight(
|
|
3034
|
+
drag.initialRowHeight ?? pptx.DEFAULT_ROW_HEIGHT,
|
|
3036
3035
|
deltaY
|
|
3037
3036
|
);
|
|
3038
3037
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3070,7 +3069,7 @@ function TableResizeOverlay({
|
|
|
3070
3069
|
e.stopPropagation();
|
|
3071
3070
|
const table = containerRef.current?.querySelector("table");
|
|
3072
3071
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3073
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3072
|
+
const actualHeight = tr?.offsetHeight ?? pptx.DEFAULT_ROW_HEIGHT;
|
|
3074
3073
|
document.body.style.cursor = "row-resize";
|
|
3075
3074
|
document.body.style.userSelect = "none";
|
|
3076
3075
|
dragRef.current = {
|
|
@@ -3110,14 +3109,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3110
3109
|
const rowCount = tableData.rows.length;
|
|
3111
3110
|
const columnCount = tableData.columnWidths.length;
|
|
3112
3111
|
const selectedCell = options?.selectedCell || null;
|
|
3113
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3112
|
+
const isEditable = Boolean(options?.editable) && pptx.canDrillDown(element);
|
|
3114
3113
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3115
3114
|
const sharedCtx = {
|
|
3116
3115
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3117
3116
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3118
3117
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3119
3118
|
};
|
|
3120
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3119
|
+
const cellCss = (cell, rowIndex, cellIndex) => pptx.tableCellCss(
|
|
3121
3120
|
tableData,
|
|
3122
3121
|
cell,
|
|
3123
3122
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3130,7 +3129,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3130
3129
|
}
|
|
3131
3130
|
const first = selectedCell.selectedCells[0];
|
|
3132
3131
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3133
|
-
return
|
|
3132
|
+
return pptx.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3134
3133
|
})();
|
|
3135
3134
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3136
3135
|
TableResizeOverlay,
|
|
@@ -3151,9 +3150,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3151
3150
|
{
|
|
3152
3151
|
className: "w-full h-full border-collapse table-fixed",
|
|
3153
3152
|
style: {
|
|
3154
|
-
fontFamily:
|
|
3153
|
+
fontFamily: pptx.DEFAULT_FONT_FAMILY,
|
|
3155
3154
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3156
|
-
...
|
|
3155
|
+
...pptx.tableContainerCss(tableData)
|
|
3157
3156
|
},
|
|
3158
3157
|
children: [
|
|
3159
3158
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3172,9 +3171,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3172
3171
|
return null;
|
|
3173
3172
|
}
|
|
3174
3173
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3175
|
-
const isInMultiSelection =
|
|
3174
|
+
const isInMultiSelection = pptx.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3176
3175
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3177
|
-
const diag =
|
|
3176
|
+
const diag = getCellDiagonalBorders(
|
|
3178
3177
|
cell.style,
|
|
3179
3178
|
tableData,
|
|
3180
3179
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3203,7 +3202,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3203
3202
|
}
|
|
3204
3203
|
event.stopPropagation();
|
|
3205
3204
|
if (event.shiftKey && selectedCell) {
|
|
3206
|
-
const rect =
|
|
3205
|
+
const rect = pptx.computeSelectionRect(
|
|
3207
3206
|
selectedCell.rowIndex,
|
|
3208
3207
|
selectedCell.columnIndex,
|
|
3209
3208
|
rowIndex,
|
|
@@ -3213,7 +3212,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3213
3212
|
options?.onSelectCell?.({
|
|
3214
3213
|
rowIndex: selectedCell.rowIndex,
|
|
3215
3214
|
columnIndex: selectedCell.columnIndex,
|
|
3216
|
-
selectedCells:
|
|
3215
|
+
selectedCells: pptx.rectToCells(rect)
|
|
3217
3216
|
});
|
|
3218
3217
|
} else {
|
|
3219
3218
|
options?.onSelectCell?.({
|
|
@@ -3274,10 +3273,10 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3274
3273
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3275
3274
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3276
3275
|
}
|
|
3277
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3276
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: i18n.translationsEn["pptx.table.title"] });
|
|
3278
3277
|
}
|
|
3279
3278
|
const selectedCell = options?.selectedCell || null;
|
|
3280
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3279
|
+
const isEditable = Boolean(options?.editable) && pptx.canDrillDown(element);
|
|
3281
3280
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3282
3281
|
const tableEl = element;
|
|
3283
3282
|
const xmlSelectionRect = (() => {
|
|
@@ -3289,7 +3288,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3289
3288
|
}
|
|
3290
3289
|
const first = selectedCell.selectedCells[0];
|
|
3291
3290
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3292
|
-
return
|
|
3291
|
+
return pptx.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3293
3292
|
})();
|
|
3294
3293
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3295
3294
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3311,9 +3310,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3311
3310
|
{
|
|
3312
3311
|
className: "w-full h-full border-collapse table-fixed",
|
|
3313
3312
|
style: {
|
|
3314
|
-
fontFamily:
|
|
3313
|
+
fontFamily: pptx.DEFAULT_FONT_FAMILY,
|
|
3315
3314
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3316
|
-
...
|
|
3315
|
+
...pptx.tableContainerCss(tableEl.tableData)
|
|
3317
3316
|
},
|
|
3318
3317
|
children: [
|
|
3319
3318
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3341,7 +3340,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3341
3340
|
const colSpan = Number.isFinite(gridSpanRaw) && gridSpanRaw > 1 ? gridSpanRaw : void 0;
|
|
3342
3341
|
const rowSpanRaw = Number.parseInt(String(cell["@_rowSpan"] || ""), 10);
|
|
3343
3342
|
const rSpan = Number.isFinite(rowSpanRaw) && rowSpanRaw > 1 ? rowSpanRaw : void 0;
|
|
3344
|
-
const bandStyle =
|
|
3343
|
+
const bandStyle = getTableCellBandStyle(
|
|
3345
3344
|
element,
|
|
3346
3345
|
rowIndex,
|
|
3347
3346
|
cellIndex,
|
|
@@ -3351,7 +3350,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3351
3350
|
);
|
|
3352
3351
|
const xmlCellStyle = extractTableCellStyle(cell, textStyle, schemeOverrides);
|
|
3353
3352
|
const tdCellOverride = tableEl.tableData?.rows[rowIndex]?.cells[cellIndex]?.style;
|
|
3354
|
-
const diag =
|
|
3353
|
+
const diag = getCellDiagonalBorders(
|
|
3355
3354
|
tdCellOverride,
|
|
3356
3355
|
tableEl.tableData,
|
|
3357
3356
|
{
|
|
@@ -3368,9 +3367,12 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3368
3367
|
// is the only source when neither the table style band nor
|
|
3369
3368
|
// an explicit run/cell colour applies.
|
|
3370
3369
|
color: textStyle.color,
|
|
3370
|
+
// PowerPoint's line spacing and default margins, as
|
|
3371
|
+
// `tableCellCss` gives the structured-model path.
|
|
3372
|
+
...pptx.TABLE_CELL_TEXT_DEFAULTS,
|
|
3371
3373
|
...bandStyle,
|
|
3372
3374
|
...xmlCellStyle,
|
|
3373
|
-
...tdCellOverride ?
|
|
3375
|
+
...tdCellOverride ? pptx.cellStyleToCss(tdCellOverride) : void 0,
|
|
3374
3376
|
...diag ? { position: "relative" } : void 0
|
|
3375
3377
|
};
|
|
3376
3378
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3382,7 +3384,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3382
3384
|
// with none, as PowerPoint does. Editing keeps a faint grid.
|
|
3383
3385
|
isEditable && hasCellSelectionHandler ? "border border-blue-200/70 cursor-cell" : null,
|
|
3384
3386
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3385
|
-
|
|
3387
|
+
pptx.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3386
3388
|
),
|
|
3387
3389
|
colSpan,
|
|
3388
3390
|
rowSpan: rSpan,
|
|
@@ -3393,7 +3395,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3393
3395
|
}
|
|
3394
3396
|
event.stopPropagation();
|
|
3395
3397
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3396
|
-
const rect =
|
|
3398
|
+
const rect = pptx.computeSelectionRect(
|
|
3397
3399
|
selectedCell.rowIndex,
|
|
3398
3400
|
selectedCell.columnIndex,
|
|
3399
3401
|
rowIndex,
|
|
@@ -3403,7 +3405,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3403
3405
|
options?.onSelectCell?.({
|
|
3404
3406
|
rowIndex: selectedCell.rowIndex,
|
|
3405
3407
|
columnIndex: selectedCell.columnIndex,
|
|
3406
|
-
selectedCells:
|
|
3408
|
+
selectedCells: pptx.rectToCells(rect)
|
|
3407
3409
|
});
|
|
3408
3410
|
} else {
|
|
3409
3411
|
options?.onSelectCell?.({
|
|
@@ -3465,23 +3467,23 @@ function renderGradientStops(stops) {
|
|
|
3465
3467
|
return stops.map((stop, i) => /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: stop.offset, stopColor: stop.color, stopOpacity: stop.opacity }, i));
|
|
3466
3468
|
}
|
|
3467
3469
|
function partAttrs(part) {
|
|
3468
|
-
return part ?
|
|
3470
|
+
return part ? pptx.chartPartToAttrs(part) : void 0;
|
|
3469
3471
|
}
|
|
3470
3472
|
function resolveReactPalette(chartData) {
|
|
3471
3473
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3472
3474
|
return chartData.colorPalette;
|
|
3473
3475
|
}
|
|
3474
|
-
return [...
|
|
3476
|
+
return [...pptx.getChartStylePalette(chartData.style?.styleId)];
|
|
3475
3477
|
}
|
|
3476
3478
|
function buildReactChartViewModel(element) {
|
|
3477
3479
|
if (element.type !== "chart" || !element.chartData) {
|
|
3478
|
-
return
|
|
3480
|
+
return pptx.buildChartViewModel(element);
|
|
3479
3481
|
}
|
|
3480
3482
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3481
3483
|
...element,
|
|
3482
3484
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3483
3485
|
};
|
|
3484
|
-
return
|
|
3486
|
+
return pptx.buildChartViewModel(themedElement);
|
|
3485
3487
|
}
|
|
3486
3488
|
function renderPrimitive(prim, key) {
|
|
3487
3489
|
switch (prim.kind) {
|
|
@@ -3528,6 +3530,7 @@ function renderPrimitive(prim, key) {
|
|
|
3528
3530
|
points: p.points,
|
|
3529
3531
|
stroke: p.stroke,
|
|
3530
3532
|
strokeWidth: p.strokeWidth,
|
|
3533
|
+
strokeDasharray: p.dashArray,
|
|
3531
3534
|
fill: p.fill,
|
|
3532
3535
|
opacity: p.opacity ?? 1,
|
|
3533
3536
|
...partAttrs(p.part),
|
|
@@ -3545,6 +3548,8 @@ function renderPrimitive(prim, key) {
|
|
|
3545
3548
|
cy: c.cy,
|
|
3546
3549
|
r: c.r,
|
|
3547
3550
|
fill: c.fill,
|
|
3551
|
+
stroke: c.stroke,
|
|
3552
|
+
strokeWidth: c.strokeWidth,
|
|
3548
3553
|
opacity: c.opacity ?? 1,
|
|
3549
3554
|
...partAttrs(c.part),
|
|
3550
3555
|
children: c.title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: c.title }) : null
|
|
@@ -3633,7 +3638,7 @@ function renderText(t, key) {
|
|
|
3633
3638
|
);
|
|
3634
3639
|
}
|
|
3635
3640
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3636
|
-
const legendItems =
|
|
3641
|
+
const legendItems = pptx.computeChartLegendLayout(vm);
|
|
3637
3642
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3638
3643
|
"svg",
|
|
3639
3644
|
{
|
|
@@ -3641,7 +3646,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3641
3646
|
viewBox: `0 0 ${vm.svgWidth} ${vm.svgHeight}`,
|
|
3642
3647
|
preserveAspectRatio,
|
|
3643
3648
|
children: [
|
|
3644
|
-
vm.defs && vm.defs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: vm.defs.map(
|
|
3649
|
+
vm.defs && vm.defs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: vm.defs.map(pptx.resolveChartSvgDef).map(
|
|
3645
3650
|
(def, i) => def.kind === "linearGradient" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3646
3651
|
"linearGradient",
|
|
3647
3652
|
{
|
|
@@ -3668,6 +3673,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3668
3673
|
{
|
|
3669
3674
|
id: def.id,
|
|
3670
3675
|
patternUnits: def.patternUnits,
|
|
3676
|
+
patternContentUnits: def.patternContentUnits,
|
|
3671
3677
|
x: def.x,
|
|
3672
3678
|
y: def.y,
|
|
3673
3679
|
width: def.width,
|
|
@@ -3796,21 +3802,19 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3796
3802
|
}
|
|
3797
3803
|
function renderChartElement(element) {
|
|
3798
3804
|
if (element.type !== "chart") {
|
|
3799
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3805
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: i18n.translationsEn["pptx.chart.heading"] });
|
|
3800
3806
|
}
|
|
3801
3807
|
const chartData = element.chartData;
|
|
3802
3808
|
if (!chartData || chartData.series.length === 0) {
|
|
3803
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3809
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: i18n.translationsEn["pptx.chart.heading"] });
|
|
3804
3810
|
}
|
|
3805
|
-
const kind =
|
|
3811
|
+
const kind = pptx.resolveChartKind(chartData.chartType ?? "bar");
|
|
3806
3812
|
return renderChartViewModel(
|
|
3807
3813
|
element.id,
|
|
3808
3814
|
buildReactChartViewModel(element),
|
|
3809
|
-
|
|
3815
|
+
pptx.chartPreserveAspectRatio(kind)
|
|
3810
3816
|
);
|
|
3811
3817
|
}
|
|
3812
|
-
|
|
3813
|
-
// src/viewer/utils/pdf-builder-notes-builder.ts
|
|
3814
3818
|
function buildNotesPdf(pages) {
|
|
3815
3819
|
const images = pages.map((page) => {
|
|
3816
3820
|
const dataUrl = page.canvas.toDataURL("image/jpeg", 0.92);
|
|
@@ -3826,26 +3830,22 @@ function buildNotesPdf(pages) {
|
|
|
3826
3830
|
notes: page.notes,
|
|
3827
3831
|
slideNumber: page.slideNumber
|
|
3828
3832
|
}));
|
|
3829
|
-
const bytes =
|
|
3833
|
+
const bytes = pptx.buildNotesPdfBytes(images, meta);
|
|
3830
3834
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3831
3835
|
return URL.createObjectURL(blob);
|
|
3832
3836
|
}
|
|
3833
|
-
|
|
3834
|
-
// src/viewer/utils/pdf-builder-slides.ts
|
|
3835
3837
|
function buildPdfFromTiledImageData(pages) {
|
|
3836
|
-
const bytes =
|
|
3838
|
+
const bytes = pptx.buildTiledSlidesPdfBytes(pages);
|
|
3837
3839
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3838
3840
|
return URL.createObjectURL(blob);
|
|
3839
3841
|
}
|
|
3840
|
-
|
|
3841
|
-
// src/viewer/utils/animation-preview.ts
|
|
3842
3842
|
var activePreview = null;
|
|
3843
3843
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3844
3844
|
stopPreviewAnimation();
|
|
3845
3845
|
const domEl = document.querySelector(`[data-element-id="${elementId}"]`);
|
|
3846
|
-
const descriptor =
|
|
3846
|
+
const descriptor = pptx.buildPreviewAnimation(preset, {
|
|
3847
3847
|
...options,
|
|
3848
|
-
geometry: domEl ?
|
|
3848
|
+
geometry: domEl ? pptx.measurePreviewGeometry(domEl) : void 0
|
|
3849
3849
|
});
|
|
3850
3850
|
if (!descriptor) {
|
|
3851
3851
|
return;
|
|
@@ -3859,7 +3859,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3859
3859
|
return;
|
|
3860
3860
|
}
|
|
3861
3861
|
const stage = domEl.offsetParent;
|
|
3862
|
-
const descriptor =
|
|
3862
|
+
const descriptor = pptx.buildMotionPathPreview({
|
|
3863
3863
|
path,
|
|
3864
3864
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3865
3865
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|
|
@@ -3918,13 +3918,273 @@ function stopPreviewAnimation() {
|
|
|
3918
3918
|
activePreview = null;
|
|
3919
3919
|
}
|
|
3920
3920
|
|
|
3921
|
+
Object.defineProperty(exports, "ACTION_BUTTON_PRESETS", {
|
|
3922
|
+
enumerable: true,
|
|
3923
|
+
get: function () { return pptx.ACTION_BUTTON_PRESETS; }
|
|
3924
|
+
});
|
|
3925
|
+
Object.defineProperty(exports, "DEFAULT_COLOR_CHANGE_TOLERANCE", {
|
|
3926
|
+
enumerable: true,
|
|
3927
|
+
get: function () { return pptx.DEFAULT_COLOR_CHANGE_TOLERANCE; }
|
|
3928
|
+
});
|
|
3929
|
+
Object.defineProperty(exports, "INK_REPLAY_KEYFRAMES", {
|
|
3930
|
+
enumerable: true,
|
|
3931
|
+
get: function () { return pptx.INK_REPLAY_KEYFRAMES; }
|
|
3932
|
+
});
|
|
3933
|
+
Object.defineProperty(exports, "MAX_ZOOM_SCALE", {
|
|
3934
|
+
enumerable: true,
|
|
3935
|
+
get: function () { return pptx.MAX_ZOOM_SCALE; }
|
|
3936
|
+
});
|
|
3937
|
+
Object.defineProperty(exports, "MIN_ZOOM_SCALE", {
|
|
3938
|
+
enumerable: true,
|
|
3939
|
+
get: function () { return pptx.MIN_ZOOM_SCALE; }
|
|
3940
|
+
});
|
|
3941
|
+
Object.defineProperty(exports, "SHAPE_QUICK_STYLES", {
|
|
3942
|
+
enumerable: true,
|
|
3943
|
+
get: function () { return pptx.SHAPE_QUICK_STYLES; }
|
|
3944
|
+
});
|
|
3945
|
+
Object.defineProperty(exports, "SLIDE_TRANSITION_OPTIONS", {
|
|
3946
|
+
enumerable: true,
|
|
3947
|
+
get: function () { return pptx.SLIDE_TRANSITION_OPTIONS; }
|
|
3948
|
+
});
|
|
3949
|
+
Object.defineProperty(exports, "TABLE_STYLE_PRESETS", {
|
|
3950
|
+
enumerable: true,
|
|
3951
|
+
get: function () { return pptx.TABLE_STYLE_PRESETS; }
|
|
3952
|
+
});
|
|
3953
|
+
Object.defineProperty(exports, "applyColorChange", {
|
|
3954
|
+
enumerable: true,
|
|
3955
|
+
get: function () { return pptx.applyColorChange; }
|
|
3956
|
+
});
|
|
3957
|
+
Object.defineProperty(exports, "applyFormatToElement", {
|
|
3958
|
+
enumerable: true,
|
|
3959
|
+
get: function () { return pptx.applyFormatToElement; }
|
|
3960
|
+
});
|
|
3961
|
+
Object.defineProperty(exports, "applyReroutedConnectors", {
|
|
3962
|
+
enumerable: true,
|
|
3963
|
+
get: function () { return pptx.applyReroutedConnectors; }
|
|
3964
|
+
});
|
|
3965
|
+
Object.defineProperty(exports, "buildCacheKey", {
|
|
3966
|
+
enumerable: true,
|
|
3967
|
+
get: function () { return pptx.buildCacheKey; }
|
|
3968
|
+
});
|
|
3969
|
+
Object.defineProperty(exports, "buildContentPartStrokes", {
|
|
3970
|
+
enumerable: true,
|
|
3971
|
+
get: function () { return pptx.buildContentPartStrokes; }
|
|
3972
|
+
});
|
|
3973
|
+
Object.defineProperty(exports, "buildCssGradientFromShapeStyle", {
|
|
3974
|
+
enumerable: true,
|
|
3975
|
+
get: function () { return pptx.buildCssGradientFromShapeStyle; }
|
|
3976
|
+
});
|
|
3977
|
+
Object.defineProperty(exports, "buildInkGroupStrokes", {
|
|
3978
|
+
enumerable: true,
|
|
3979
|
+
get: function () { return pptx.buildInkGroupStrokes; }
|
|
3980
|
+
});
|
|
3981
|
+
Object.defineProperty(exports, "buildSaveSlides", {
|
|
3982
|
+
enumerable: true,
|
|
3983
|
+
get: function () { return pptx.buildSaveSlides; }
|
|
3984
|
+
});
|
|
3985
|
+
Object.defineProperty(exports, "canvasToJpegData", {
|
|
3986
|
+
enumerable: true,
|
|
3987
|
+
get: function () { return pptx.canvasToJpegData; }
|
|
3988
|
+
});
|
|
3989
|
+
Object.defineProperty(exports, "clampCropValue", {
|
|
3990
|
+
enumerable: true,
|
|
3991
|
+
get: function () { return pptx.clampCropValue; }
|
|
3992
|
+
});
|
|
3993
|
+
Object.defineProperty(exports, "cloneSlide", {
|
|
3994
|
+
enumerable: true,
|
|
3995
|
+
get: function () { return pptx.cloneSlide; }
|
|
3996
|
+
});
|
|
3997
|
+
Object.defineProperty(exports, "cloneTemplateElementsBySlideId", {
|
|
3998
|
+
enumerable: true,
|
|
3999
|
+
get: function () { return pptx.cloneTemplateElementsBySlideId; }
|
|
4000
|
+
});
|
|
4001
|
+
Object.defineProperty(exports, "colorWithOpacity", {
|
|
4002
|
+
enumerable: true,
|
|
4003
|
+
get: function () { return pptx.colorWithOpacity; }
|
|
4004
|
+
});
|
|
4005
|
+
Object.defineProperty(exports, "comparePresentation", {
|
|
4006
|
+
enumerable: true,
|
|
4007
|
+
get: function () { return pptx.comparePresentation; }
|
|
4008
|
+
});
|
|
4009
|
+
Object.defineProperty(exports, "computeHandoutLayout", {
|
|
4010
|
+
enumerable: true,
|
|
4011
|
+
get: function () { return pptx.computeHandoutLayout; }
|
|
4012
|
+
});
|
|
4013
|
+
Object.defineProperty(exports, "computeSnapToShape", {
|
|
4014
|
+
enumerable: true,
|
|
4015
|
+
get: function () { return pptx.computeSnapToShape; }
|
|
4016
|
+
});
|
|
4017
|
+
Object.defineProperty(exports, "copyFormatFromElement", {
|
|
4018
|
+
enumerable: true,
|
|
4019
|
+
get: function () { return pptx.copyFormatFromElement; }
|
|
4020
|
+
});
|
|
4021
|
+
Object.defineProperty(exports, "formatCommentTimestamp", {
|
|
4022
|
+
enumerable: true,
|
|
4023
|
+
get: function () { return pptx.formatCommentTimestamp; }
|
|
4024
|
+
});
|
|
4025
|
+
Object.defineProperty(exports, "generateNoteLineCount", {
|
|
4026
|
+
enumerable: true,
|
|
4027
|
+
get: function () { return pptx.generateNoteLineCount; }
|
|
4028
|
+
});
|
|
4029
|
+
Object.defineProperty(exports, "getAriaLabel", {
|
|
4030
|
+
enumerable: true,
|
|
4031
|
+
get: function () { return pptx.getAriaLabel; }
|
|
4032
|
+
});
|
|
4033
|
+
Object.defineProperty(exports, "getAriaRole", {
|
|
4034
|
+
enumerable: true,
|
|
4035
|
+
get: function () { return pptx.getAriaRole; }
|
|
4036
|
+
});
|
|
4037
|
+
Object.defineProperty(exports, "getAriaRoleDescription", {
|
|
4038
|
+
enumerable: true,
|
|
4039
|
+
get: function () { return pptx.getAriaRoleDescription; }
|
|
4040
|
+
});
|
|
4041
|
+
Object.defineProperty(exports, "getCachedResult", {
|
|
4042
|
+
enumerable: true,
|
|
4043
|
+
get: function () { return pptx.getCachedResult; }
|
|
4044
|
+
});
|
|
4045
|
+
Object.defineProperty(exports, "getCompoundLineOffsets", {
|
|
4046
|
+
enumerable: true,
|
|
4047
|
+
get: function () { return pptx.getCompoundLineOffsets; }
|
|
4048
|
+
});
|
|
4049
|
+
Object.defineProperty(exports, "getCompoundLineWidths", {
|
|
4050
|
+
enumerable: true,
|
|
4051
|
+
get: function () { return pptx.getCompoundLineWidths; }
|
|
4052
|
+
});
|
|
4053
|
+
Object.defineProperty(exports, "getContentPartReplayStyles", {
|
|
4054
|
+
enumerable: true,
|
|
4055
|
+
get: function () { return pptx.getContentPartReplayStyles; }
|
|
4056
|
+
});
|
|
4057
|
+
Object.defineProperty(exports, "getElementLabel", {
|
|
4058
|
+
enumerable: true,
|
|
4059
|
+
get: function () { return pptx.getElementLabel; }
|
|
4060
|
+
});
|
|
4061
|
+
Object.defineProperty(exports, "getElementTransform", {
|
|
4062
|
+
enumerable: true,
|
|
4063
|
+
get: function () { return pptx.getElementTransform; }
|
|
4064
|
+
});
|
|
4065
|
+
Object.defineProperty(exports, "getElementTransformWithoutRotation", {
|
|
4066
|
+
enumerable: true,
|
|
4067
|
+
get: function () { return pptx.getElementTransformWithoutRotation; }
|
|
4068
|
+
});
|
|
4069
|
+
Object.defineProperty(exports, "getImageEffectsFilter", {
|
|
4070
|
+
enumerable: true,
|
|
4071
|
+
get: function () { return pptx.getImageEffectsFilter; }
|
|
4072
|
+
});
|
|
4073
|
+
Object.defineProperty(exports, "getImageEffectsOpacity", {
|
|
4074
|
+
enumerable: true,
|
|
4075
|
+
get: function () { return pptx.getImageEffectsOpacity; }
|
|
4076
|
+
});
|
|
4077
|
+
Object.defineProperty(exports, "getInkReplayStyles", {
|
|
4078
|
+
enumerable: true,
|
|
4079
|
+
get: function () { return pptx.getInkReplayStyles; }
|
|
4080
|
+
});
|
|
4081
|
+
Object.defineProperty(exports, "getPatternSvg", {
|
|
4082
|
+
enumerable: true,
|
|
4083
|
+
get: function () { return pptx.getPatternSvg; }
|
|
4084
|
+
});
|
|
4085
|
+
Object.defineProperty(exports, "getPrintableArea", {
|
|
4086
|
+
enumerable: true,
|
|
4087
|
+
get: function () { return pptx.getPrintableArea; }
|
|
4088
|
+
});
|
|
4089
|
+
Object.defineProperty(exports, "getShapeAdjustmentHandleDescriptors", {
|
|
4090
|
+
enumerable: true,
|
|
4091
|
+
get: function () { return pptx.getShapeAdjustmentHandleDescriptors; }
|
|
4092
|
+
});
|
|
4093
|
+
Object.defineProperty(exports, "getSvgStrokeDasharray", {
|
|
4094
|
+
enumerable: true,
|
|
4095
|
+
get: function () { return pptx.getSvgStrokeDasharray; }
|
|
4096
|
+
});
|
|
4097
|
+
Object.defineProperty(exports, "getTextCompensationTransform", {
|
|
4098
|
+
enumerable: true,
|
|
4099
|
+
get: function () { return pptx.getTextCompensationTransform; }
|
|
4100
|
+
});
|
|
4101
|
+
Object.defineProperty(exports, "hasCopyableFormat", {
|
|
4102
|
+
enumerable: true,
|
|
4103
|
+
get: function () { return pptx.hasCopyableFormat; }
|
|
4104
|
+
});
|
|
4105
|
+
Object.defineProperty(exports, "isEditableTextElement", {
|
|
4106
|
+
enumerable: true,
|
|
4107
|
+
get: function () { return pptx.isEditableTextElement; }
|
|
4108
|
+
});
|
|
4109
|
+
Object.defineProperty(exports, "isImageTiled", {
|
|
4110
|
+
enumerable: true,
|
|
4111
|
+
get: function () { return pptx.isImageTiled; }
|
|
4112
|
+
});
|
|
4113
|
+
Object.defineProperty(exports, "isPpactionUrl", {
|
|
4114
|
+
enumerable: true,
|
|
4115
|
+
get: function () { return pptx.isPpactionUrl; }
|
|
4116
|
+
});
|
|
4117
|
+
Object.defineProperty(exports, "isTemplateElementId", {
|
|
4118
|
+
enumerable: true,
|
|
4119
|
+
get: function () { return pptx.isTemplateElementId; }
|
|
4120
|
+
});
|
|
4121
|
+
Object.defineProperty(exports, "isUrlSafe", {
|
|
4122
|
+
enumerable: true,
|
|
4123
|
+
get: function () { return pptx.isUrlSafe; }
|
|
4124
|
+
});
|
|
4125
|
+
Object.defineProperty(exports, "makeCloneId", {
|
|
4126
|
+
enumerable: true,
|
|
4127
|
+
get: function () { return pptx.makeCloneId; }
|
|
4128
|
+
});
|
|
4129
|
+
Object.defineProperty(exports, "mergeCells", {
|
|
4130
|
+
enumerable: true,
|
|
4131
|
+
get: function () { return pptx.mergeCells; }
|
|
4132
|
+
});
|
|
4133
|
+
Object.defineProperty(exports, "normalizeHexColor", {
|
|
4134
|
+
enumerable: true,
|
|
4135
|
+
get: function () { return pptx.normalizeHexColor; }
|
|
4136
|
+
});
|
|
4137
|
+
Object.defineProperty(exports, "normalizeStrokeDashType", {
|
|
4138
|
+
enumerable: true,
|
|
4139
|
+
get: function () { return pptx.normalizeStrokeDashType; }
|
|
4140
|
+
});
|
|
4141
|
+
Object.defineProperty(exports, "openNativeEyeDropper", {
|
|
4142
|
+
enumerable: true,
|
|
4143
|
+
get: function () { return pptx.openNativeEyeDropper; }
|
|
4144
|
+
});
|
|
4145
|
+
Object.defineProperty(exports, "parsePpactionUrl", {
|
|
4146
|
+
enumerable: true,
|
|
4147
|
+
get: function () { return pptx.parsePpactionUrl; }
|
|
4148
|
+
});
|
|
4149
|
+
Object.defineProperty(exports, "partitionTemplateElements", {
|
|
4150
|
+
enumerable: true,
|
|
4151
|
+
get: function () { return pptx.partitionTemplateElements; }
|
|
4152
|
+
});
|
|
4153
|
+
Object.defineProperty(exports, "rerouteConnectorsForMovedElements", {
|
|
4154
|
+
enumerable: true,
|
|
4155
|
+
get: function () { return pptx.rerouteConnectorsForMovedElements; }
|
|
4156
|
+
});
|
|
4157
|
+
Object.defineProperty(exports, "safeOpenUrl", {
|
|
4158
|
+
enumerable: true,
|
|
4159
|
+
get: function () { return pptx.safeOpenUrl; }
|
|
4160
|
+
});
|
|
4161
|
+
Object.defineProperty(exports, "sanitizeGradientStops", {
|
|
4162
|
+
enumerable: true,
|
|
4163
|
+
get: function () { return pptx.sanitizeGradientStops; }
|
|
4164
|
+
});
|
|
4165
|
+
Object.defineProperty(exports, "setCachedResult", {
|
|
4166
|
+
enumerable: true,
|
|
4167
|
+
get: function () { return pptx.setCachedResult; }
|
|
4168
|
+
});
|
|
4169
|
+
Object.defineProperty(exports, "splitCell", {
|
|
4170
|
+
enumerable: true,
|
|
4171
|
+
get: function () { return pptx.splitCell; }
|
|
4172
|
+
});
|
|
4173
|
+
Object.defineProperty(exports, "stopAllPersistentAudio", {
|
|
4174
|
+
enumerable: true,
|
|
4175
|
+
get: function () { return pptx.stopAllPersistentAudio; }
|
|
4176
|
+
});
|
|
4177
|
+
Object.defineProperty(exports, "substituteFieldText", {
|
|
4178
|
+
enumerable: true,
|
|
4179
|
+
get: function () { return pptx.substituteFieldText; }
|
|
4180
|
+
});
|
|
3921
4181
|
exports.ANIMATION_PRESET_OPTIONS = ANIMATION_PRESET_OPTIONS;
|
|
3922
4182
|
exports.ARROW_SIZE_OPTIONS = ARROW_SIZE_OPTIONS;
|
|
3923
4183
|
exports.CONNECTOR_ARROW_OPTIONS = CONNECTOR_ARROW_OPTIONS;
|
|
3924
4184
|
exports.DEFAULT_CANVAS_HEIGHT = DEFAULT_CANVAS_HEIGHT;
|
|
3925
4185
|
exports.DEFAULT_CANVAS_WIDTH = DEFAULT_CANVAS_WIDTH;
|
|
3926
4186
|
exports.DEFAULT_FILL_COLOR = DEFAULT_FILL_COLOR;
|
|
3927
|
-
exports.DEFAULT_FONT_FAMILY =
|
|
4187
|
+
exports.DEFAULT_FONT_FAMILY = DEFAULT_FONT_FAMILY;
|
|
3928
4188
|
exports.DEFAULT_SECTION_GROUP_ID = DEFAULT_SECTION_GROUP_ID;
|
|
3929
4189
|
exports.DEFAULT_STROKE_COLOR = DEFAULT_STROKE_COLOR;
|
|
3930
4190
|
exports.DEFAULT_TABLE_COLUMNS = DEFAULT_TABLE_COLUMNS;
|
|
@@ -3937,27 +4197,28 @@ exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE;
|
|
|
3937
4197
|
exports.SHAPE_PRESETS = SHAPE_PRESETS;
|
|
3938
4198
|
exports.SHORTCUT_REFERENCE_ITEMS = SHORTCUT_REFERENCE_ITEMS;
|
|
3939
4199
|
exports.SLIDE_NAV_THUMBNAIL_WIDTH = SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
3940
|
-
exports.STROKE_DASH_OPTIONS =
|
|
4200
|
+
exports.STROKE_DASH_OPTIONS = STROKE_DASH_OPTIONS;
|
|
3941
4201
|
exports.TOOLBAR_SECTIONS = TOOLBAR_SECTIONS;
|
|
3942
4202
|
exports.UNGROUPED_SECTION_ID = UNGROUPED_SECTION_ID;
|
|
3943
4203
|
exports.ZOOM_TO_SELECTION_PADDING = ZOOM_TO_SELECTION_PADDING;
|
|
3944
|
-
exports.build3DExtrusionData =
|
|
4204
|
+
exports.build3DExtrusionData = build3DExtrusionData;
|
|
3945
4205
|
exports.buildLineGlowFilter = buildLineGlowFilter;
|
|
3946
4206
|
exports.buildLineShadowCss = buildLineShadowCss;
|
|
3947
4207
|
exports.buildNotesPdf = buildNotesPdf;
|
|
3948
4208
|
exports.buildPdfFromTiledImageData = buildPdfFromTiledImageData;
|
|
3949
4209
|
exports.buildReactChartViewModel = buildReactChartViewModel;
|
|
3950
|
-
exports.buildTextBody3DSceneStyle =
|
|
3951
|
-
exports.cloneHistorySnapshot =
|
|
4210
|
+
exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle;
|
|
4211
|
+
exports.cloneHistorySnapshot = cloneHistorySnapshot;
|
|
3952
4212
|
exports.cn = cn;
|
|
3953
|
-
exports.
|
|
3954
|
-
exports.
|
|
3955
|
-
exports.
|
|
4213
|
+
exports.dist_exports = dist_exports;
|
|
4214
|
+
exports.getAnimationInitialStyle = getAnimationInitialStyle;
|
|
4215
|
+
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
4216
|
+
exports.getCropShapeClipPath = getCropShapeClipPath;
|
|
3956
4217
|
exports.getDuotoneColors = getDuotoneColors;
|
|
3957
4218
|
exports.getImageRenderStyle = getImageRenderStyle;
|
|
3958
4219
|
exports.getImageSurfaceMaskStyle = getImageSurfaceMaskStyle;
|
|
3959
4220
|
exports.getImageSurfaceStyle = getImageSurfaceStyle;
|
|
3960
|
-
exports.getImageTilingStyle =
|
|
4221
|
+
exports.getImageTilingStyle = getImageTilingStyle;
|
|
3961
4222
|
exports.getShapeVisualStyle = getShapeVisualStyle;
|
|
3962
4223
|
exports.getTextLayoutStyle = getTextLayoutStyle;
|
|
3963
4224
|
exports.getTextStyleForElement = getTextStyleForElement;
|