pptx-react-viewer 3.17.0 → 3.18.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 +36 -0
- package/README.md +33 -31
- package/dist/{AiChatPanel-4LKH44IE.mjs → AiChatPanel-DDZC6IRK.mjs} +4 -4
- package/dist/AiChatPanel-DDZC6IRK.mjs.br +0 -0
- package/dist/AiChatPanel-DDZC6IRK.mjs.gz +0 -0
- package/dist/{AiChatPanel-VWVGQ5DD.js → AiChatPanel-T2QSCUQR.js} +25 -25
- package/dist/AiChatPanel-T2QSCUQR.js.br +0 -0
- package/dist/AiChatPanel-T2QSCUQR.js.gz +0 -0
- package/dist/{Area3DChartScene-D7GSJGPQ.js → Area3DChartScene-WEU2MP3B.js} +2 -2
- package/dist/Area3DChartScene-WEU2MP3B.js.br +0 -0
- package/dist/Area3DChartScene-WEU2MP3B.js.gz +0 -0
- package/dist/{Area3DChartScene-X5SM67PZ.mjs → Area3DChartScene-WTKQDHC7.mjs} +1 -1
- package/dist/Area3DChartScene-WTKQDHC7.mjs.br +0 -0
- package/dist/Area3DChartScene-WTKQDHC7.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-M72WQW5Y.js → Bar3DChartScene-25G6TG53.js} +2 -2
- package/dist/Bar3DChartScene-25G6TG53.js.br +0 -0
- package/dist/Bar3DChartScene-25G6TG53.js.gz +0 -0
- package/dist/{Bar3DChartScene-HWIFFGI3.mjs → Bar3DChartScene-A5ICLHXS.mjs} +1 -1
- package/dist/{Bar3DChartScene-HWIFFGI3.mjs.br → Bar3DChartScene-A5ICLHXS.mjs.br} +0 -0
- package/dist/Bar3DChartScene-A5ICLHXS.mjs.gz +0 -0
- package/dist/{GLTFLoader-374ZNTXW.mjs → GLTFLoader-IWJFC4XI.mjs} +54 -16
- package/dist/GLTFLoader-IWJFC4XI.mjs.br +0 -0
- package/dist/GLTFLoader-IWJFC4XI.mjs.gz +0 -0
- package/dist/{GLTFLoader-Q7BHCGAW.js → GLTFLoader-KY7AYPMX.js} +178 -140
- package/dist/GLTFLoader-KY7AYPMX.js.br +0 -0
- package/dist/GLTFLoader-KY7AYPMX.js.gz +0 -0
- package/dist/{Line3DChartScene-7MPZWVF3.mjs → Line3DChartScene-ARCDLHXQ.mjs} +1 -1
- package/dist/Line3DChartScene-ARCDLHXQ.mjs.br +0 -0
- package/dist/Line3DChartScene-ARCDLHXQ.mjs.gz +0 -0
- package/dist/{Line3DChartScene-YOZEEQZ3.js → Line3DChartScene-WRZ52Z2Z.js} +2 -2
- package/dist/Line3DChartScene-WRZ52Z2Z.js.br +0 -0
- package/dist/Line3DChartScene-WRZ52Z2Z.js.gz +0 -0
- package/dist/{Model3DScene-5IJSNGDZ.js → Model3DScene-JGUG5NPX.js} +2 -2
- package/dist/Model3DScene-JGUG5NPX.js.br +0 -0
- package/dist/Model3DScene-JGUG5NPX.js.gz +0 -0
- package/dist/{Model3DScene-57LVY5QW.mjs → Model3DScene-PBKBL2YU.mjs} +1 -1
- package/dist/Model3DScene-PBKBL2YU.mjs.br +0 -0
- package/dist/Model3DScene-PBKBL2YU.mjs.gz +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs +3 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.br +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.gz +0 -0
- package/dist/OrbitControls-CGYUF3BY.js +12 -0
- package/dist/OrbitControls-CGYUF3BY.js.br +0 -0
- package/dist/OrbitControls-CGYUF3BY.js.gz +0 -0
- package/dist/{PieChart3DScene-UBI6X66Q.js → PieChart3DScene-S25DNSRS.js} +2 -2
- package/dist/PieChart3DScene-S25DNSRS.js.br +0 -0
- package/dist/PieChart3DScene-S25DNSRS.js.gz +0 -0
- package/dist/{PieChart3DScene-WD5B6NP3.mjs → PieChart3DScene-ZNKXS62H.mjs} +1 -1
- package/dist/{PieChart3DScene-WD5B6NP3.mjs.br → PieChart3DScene-ZNKXS62H.mjs.br} +0 -0
- package/dist/PieChart3DScene-ZNKXS62H.mjs.gz +0 -0
- package/dist/{SmartArt3DScene-ODKCGJBO.mjs → SmartArt3DScene-QZGIABOK.mjs} +2 -2
- package/dist/SmartArt3DScene-QZGIABOK.mjs.br +0 -0
- package/dist/SmartArt3DScene-QZGIABOK.mjs.gz +0 -0
- package/dist/{SmartArt3DScene-BK7QN3WT.js → SmartArt3DScene-T236GYUT.js} +33 -33
- package/dist/SmartArt3DScene-T236GYUT.js.br +0 -0
- package/dist/SmartArt3DScene-T236GYUT.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-JZGU6BBD.mjs → SurfaceChart3DScene-EBT7RPCX.mjs} +1 -1
- package/dist/SurfaceChart3DScene-EBT7RPCX.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-EBT7RPCX.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-JGNPYQ32.js → SurfaceChart3DScene-LXBC3HMV.js} +2 -2
- package/dist/SurfaceChart3DScene-LXBC3HMV.js.br +0 -0
- package/dist/SurfaceChart3DScene-LXBC3HMV.js.gz +0 -0
- package/dist/{chunk-KVXB22D3.js → chunk-2LTTSFLD.js} +5 -5
- package/dist/chunk-2LTTSFLD.js.br +0 -0
- package/dist/chunk-2LTTSFLD.js.gz +0 -0
- package/dist/{chunk-23PW4Y4R.mjs → chunk-2OCTGK4L.mjs} +6 -110
- package/dist/chunk-2OCTGK4L.mjs.br +0 -0
- package/dist/chunk-2OCTGK4L.mjs.gz +0 -0
- package/dist/{chunk-EDMJYVCS.mjs → chunk-3KKPRPVE.mjs} +128 -143
- package/dist/chunk-3KKPRPVE.mjs.br +0 -0
- package/dist/chunk-3KKPRPVE.mjs.gz +0 -0
- package/dist/{chunk-B4QYQLZU.js → chunk-3N6AC4HA.js} +1122 -693
- package/dist/chunk-3N6AC4HA.js.br +0 -0
- package/dist/chunk-3N6AC4HA.js.gz +0 -0
- package/dist/{chunk-7YOA4HNP.mjs → chunk-5S3A6HL3.mjs} +121 -42
- package/dist/chunk-5S3A6HL3.mjs.br +0 -0
- package/dist/chunk-5S3A6HL3.mjs.gz +0 -0
- package/dist/{chunk-72LYFUGL.js → chunk-6R2EUDJQ.js} +1412 -1427
- package/dist/chunk-6R2EUDJQ.js.br +0 -0
- package/dist/chunk-6R2EUDJQ.js.gz +0 -0
- package/dist/{chunk-XBMKFZVP.mjs → chunk-7TAWW5QQ.mjs} +1120 -694
- package/dist/chunk-7TAWW5QQ.mjs.br +0 -0
- package/dist/chunk-7TAWW5QQ.mjs.gz +0 -0
- package/dist/{chunk-3AJ54EAB.js → chunk-BRJN3ZMG.js} +11 -1
- package/dist/chunk-BRJN3ZMG.js.br +0 -0
- package/dist/{chunk-3AJ54EAB.js.gz → chunk-BRJN3ZMG.js.gz} +0 -0
- package/dist/{chunk-QTGCOL5H.mjs → chunk-GNRVDNCV.mjs} +1707 -435
- package/dist/chunk-GNRVDNCV.mjs.br +0 -0
- package/dist/chunk-GNRVDNCV.mjs.gz +0 -0
- package/dist/{chunk-6C2WYLZY.js → chunk-IXS7DALE.js} +45 -39
- package/dist/chunk-IXS7DALE.js.br +0 -0
- package/dist/chunk-IXS7DALE.js.gz +0 -0
- package/dist/{chunk-NJ3WCYYG.js → chunk-LJ46KXUV.js} +179 -283
- package/dist/chunk-LJ46KXUV.js.br +0 -0
- package/dist/chunk-LJ46KXUV.js.gz +0 -0
- package/dist/{chunk-HMX3MQR7.mjs → chunk-MQUTXOET.mjs} +11 -2
- package/dist/chunk-MQUTXOET.mjs.br +0 -0
- package/dist/{chunk-HMX3MQR7.mjs.gz → chunk-MQUTXOET.mjs.gz} +0 -0
- package/dist/{chunk-3CBDTD46.mjs → chunk-MV2GCDBR.mjs} +8 -2
- package/dist/chunk-MV2GCDBR.mjs.br +0 -0
- package/dist/chunk-MV2GCDBR.mjs.gz +0 -0
- package/dist/{chunk-4SPZ5IZN.js → chunk-V32F4I45.js} +1713 -439
- package/dist/chunk-V32F4I45.js.br +0 -0
- package/dist/chunk-V32F4I45.js.gz +0 -0
- package/dist/{chunk-3UGVURWU.js → chunk-WGBXO4LM.js} +576 -497
- package/dist/chunk-WGBXO4LM.js.br +0 -0
- package/dist/chunk-WGBXO4LM.js.gz +0 -0
- package/dist/{chunk-7YJBRPCT.mjs → chunk-WRO37U2O.mjs} +1 -1
- package/dist/chunk-WRO37U2O.mjs.br +0 -0
- package/dist/chunk-WRO37U2O.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +18 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/three.module-LGUV2LI6.mjs +2 -0
- package/dist/three.module-LGUV2LI6.mjs.br +0 -0
- package/dist/three.module-LGUV2LI6.mjs.gz +0 -0
- package/dist/{three.module-GNNNRIMK.js → three.module-YZ4M24WM.js} +454 -442
- package/dist/three.module-YZ4M24WM.js.br +0 -0
- package/dist/three.module-YZ4M24WM.js.gz +0 -0
- package/dist/{useViewerBuildingBlocks-DkUGmlkP.d.ts → useViewerBuildingBlocks-4Tj6P8Fm.d.ts} +3 -1
- package/dist/useViewerBuildingBlocks-4Tj6P8Fm.d.ts.map +1 -0
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-4LKH44IE.mjs.br +0 -0
- package/dist/AiChatPanel-4LKH44IE.mjs.gz +0 -0
- package/dist/AiChatPanel-VWVGQ5DD.js.br +0 -0
- package/dist/AiChatPanel-VWVGQ5DD.js.gz +0 -0
- package/dist/Area3DChartScene-D7GSJGPQ.js.br +0 -0
- package/dist/Area3DChartScene-D7GSJGPQ.js.gz +0 -0
- package/dist/Area3DChartScene-X5SM67PZ.mjs.br +0 -0
- package/dist/Area3DChartScene-X5SM67PZ.mjs.gz +0 -0
- package/dist/Bar3DChartScene-HWIFFGI3.mjs.gz +0 -0
- package/dist/Bar3DChartScene-M72WQW5Y.js.br +0 -0
- package/dist/Bar3DChartScene-M72WQW5Y.js.gz +0 -0
- package/dist/GLTFLoader-374ZNTXW.mjs.br +0 -0
- package/dist/GLTFLoader-374ZNTXW.mjs.gz +0 -0
- package/dist/GLTFLoader-Q7BHCGAW.js.br +0 -0
- package/dist/GLTFLoader-Q7BHCGAW.js.gz +0 -0
- package/dist/Line3DChartScene-7MPZWVF3.mjs.br +0 -0
- package/dist/Line3DChartScene-7MPZWVF3.mjs.gz +0 -0
- package/dist/Line3DChartScene-YOZEEQZ3.js.br +0 -0
- package/dist/Line3DChartScene-YOZEEQZ3.js.gz +0 -0
- package/dist/Model3DScene-57LVY5QW.mjs.br +0 -0
- package/dist/Model3DScene-57LVY5QW.mjs.gz +0 -0
- package/dist/Model3DScene-5IJSNGDZ.js.br +0 -0
- package/dist/Model3DScene-5IJSNGDZ.js.gz +0 -0
- package/dist/OrbitControls-SMYCPLXO.js +0 -12
- package/dist/OrbitControls-SMYCPLXO.js.br +0 -3
- package/dist/OrbitControls-SMYCPLXO.js.gz +0 -0
- package/dist/OrbitControls-ZTGHPI5G.mjs +0 -3
- package/dist/OrbitControls-ZTGHPI5G.mjs.br +0 -0
- package/dist/OrbitControls-ZTGHPI5G.mjs.gz +0 -0
- package/dist/PieChart3DScene-UBI6X66Q.js.br +0 -0
- package/dist/PieChart3DScene-UBI6X66Q.js.gz +0 -0
- package/dist/PieChart3DScene-WD5B6NP3.mjs.gz +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-JGNPYQ32.js.br +0 -0
- package/dist/SurfaceChart3DScene-JGNPYQ32.js.gz +0 -0
- package/dist/SurfaceChart3DScene-JZGU6BBD.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JZGU6BBD.mjs.gz +0 -0
- package/dist/chunk-23PW4Y4R.mjs.br +0 -0
- package/dist/chunk-23PW4Y4R.mjs.gz +0 -0
- package/dist/chunk-3AJ54EAB.js.br +0 -0
- package/dist/chunk-3CBDTD46.mjs.br +0 -0
- package/dist/chunk-3CBDTD46.mjs.gz +0 -0
- package/dist/chunk-3UGVURWU.js.br +0 -0
- package/dist/chunk-3UGVURWU.js.gz +0 -0
- package/dist/chunk-4SPZ5IZN.js.br +0 -0
- package/dist/chunk-4SPZ5IZN.js.gz +0 -0
- package/dist/chunk-6C2WYLZY.js.br +0 -0
- package/dist/chunk-6C2WYLZY.js.gz +0 -0
- package/dist/chunk-72LYFUGL.js.br +0 -0
- package/dist/chunk-72LYFUGL.js.gz +0 -0
- package/dist/chunk-7YJBRPCT.mjs.br +0 -0
- package/dist/chunk-7YJBRPCT.mjs.gz +0 -0
- package/dist/chunk-7YOA4HNP.mjs.br +0 -0
- package/dist/chunk-7YOA4HNP.mjs.gz +0 -0
- package/dist/chunk-B4QYQLZU.js.br +0 -0
- package/dist/chunk-B4QYQLZU.js.gz +0 -0
- package/dist/chunk-EDMJYVCS.mjs.br +0 -0
- package/dist/chunk-EDMJYVCS.mjs.gz +0 -0
- package/dist/chunk-HMX3MQR7.mjs.br +0 -0
- package/dist/chunk-KVXB22D3.js.br +0 -0
- package/dist/chunk-KVXB22D3.js.gz +0 -0
- package/dist/chunk-NJ3WCYYG.js.br +0 -0
- package/dist/chunk-NJ3WCYYG.js.gz +0 -0
- package/dist/chunk-QTGCOL5H.mjs.br +0 -0
- package/dist/chunk-QTGCOL5H.mjs.gz +0 -0
- package/dist/chunk-XBMKFZVP.mjs.br +0 -0
- package/dist/chunk-XBMKFZVP.mjs.gz +0 -0
- package/dist/three.module-AC7ESV4W.mjs +0 -2
- package/dist/three.module-AC7ESV4W.mjs.br +0 -0
- package/dist/three.module-AC7ESV4W.mjs.gz +0 -0
- package/dist/three.module-GNNNRIMK.js.br +0 -0
- package/dist/three.module-GNNNRIMK.js.gz +0 -0
- package/dist/useViewerBuildingBlocks-DkUGmlkP.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkV32F4I45_js = require('./chunk-V32F4I45.js');
|
|
4
|
+
var chunkBRJN3ZMG_js = require('./chunk-BRJN3ZMG.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React7 = require('react');
|
|
@@ -15,7 +15,7 @@ var React7__default = /*#__PURE__*/_interopDefault(React7);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkV32F4I45_js.getAnimationInitialStyle(preset, nativeAnimation);
|
|
19
19
|
}
|
|
20
20
|
function cn(...inputs) {
|
|
21
21
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -23,7 +23,7 @@ function cn(...inputs) {
|
|
|
23
23
|
|
|
24
24
|
// src/viewer/utils/clone.ts
|
|
25
25
|
function cloneHistorySnapshot2(snapshot) {
|
|
26
|
-
return
|
|
26
|
+
return chunkV32F4I45_js.cloneHistorySnapshot(snapshot);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/viewer/constants/scalar.ts
|
|
@@ -61,7 +61,7 @@ var TOOLBAR_SECTIONS = [
|
|
|
61
61
|
{ id: "view", labelKey: "pptx.ribbon.tab.view" },
|
|
62
62
|
{ id: "help", labelKey: "pptx.ribbon.tab.help" }
|
|
63
63
|
];
|
|
64
|
-
var SHORTCUT_REFERENCE_ITEMS =
|
|
64
|
+
var SHORTCUT_REFERENCE_ITEMS = chunkV32F4I45_js.VIEWER_SHORTCUT_REFERENCE;
|
|
65
65
|
|
|
66
66
|
// src/viewer/constants/transitions-animations.ts
|
|
67
67
|
var ANIMATION_PRESET_OPTIONS = [
|
|
@@ -89,7 +89,7 @@ var GLYPH_COMPONENTS = {
|
|
|
89
89
|
plus: lu.LuPlus,
|
|
90
90
|
triangle: lu.LuTriangle
|
|
91
91
|
};
|
|
92
|
-
var SHAPE_PRESETS =
|
|
92
|
+
var SHAPE_PRESETS = chunkV32F4I45_js.SHAPE_PRESET_DEFS.map(
|
|
93
93
|
(def) => ({
|
|
94
94
|
type: def.type,
|
|
95
95
|
label: def.label,
|
|
@@ -114,7 +114,7 @@ var ARROW_SIZE_OPTIONS = [
|
|
|
114
114
|
{ value: "med", label: "Medium", i18nKey: "pptx.connectorOptions.sizeMedium" },
|
|
115
115
|
{ value: "lg", label: "Large", i18nKey: "pptx.connectorOptions.sizeLarge" }
|
|
116
116
|
];
|
|
117
|
-
var STROKE_DASH_OPTIONS2 =
|
|
117
|
+
var STROKE_DASH_OPTIONS2 = chunkV32F4I45_js.STROKE_DASH_OPTIONS;
|
|
118
118
|
|
|
119
119
|
// src/viewer/utils/shape-types.tsx
|
|
120
120
|
function getShapeType(shapeType) {
|
|
@@ -223,7 +223,7 @@ function isConnectorOrLineElement(element) {
|
|
|
223
223
|
if (element.type === "connector") {
|
|
224
224
|
return true;
|
|
225
225
|
}
|
|
226
|
-
if (!
|
|
226
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
227
227
|
return false;
|
|
228
228
|
}
|
|
229
229
|
const st = getShapeType(element.shapeType);
|
|
@@ -232,17 +232,17 @@ function isConnectorOrLineElement(element) {
|
|
|
232
232
|
|
|
233
233
|
// src/viewer/utils/image-style.ts
|
|
234
234
|
function getImageMaskStyle(element) {
|
|
235
|
-
if (!
|
|
235
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
236
236
|
return void 0;
|
|
237
237
|
}
|
|
238
|
-
const geometry =
|
|
238
|
+
const geometry = chunkV32F4I45_js.resolveShapeGeometry(element);
|
|
239
239
|
if (geometry.kind === "borderRadius") {
|
|
240
240
|
return { borderRadius: geometry.radius };
|
|
241
241
|
}
|
|
242
242
|
return geometry.kind === "clipPath" ? { clipPath: geometry.clipPath } : void 0;
|
|
243
243
|
}
|
|
244
244
|
function getImageRenderStyle(element) {
|
|
245
|
-
const fit =
|
|
245
|
+
const fit = chunkV32F4I45_js.getImageFitStyle(element);
|
|
246
246
|
return {
|
|
247
247
|
// A translated/scaled crop must be masked by its stationary wrapper, not
|
|
248
248
|
// by the moving bitmap itself.
|
|
@@ -259,7 +259,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
function getImageSurfaceStyle(element) {
|
|
262
|
-
const fill =
|
|
262
|
+
const fill = chunkV32F4I45_js.hasShapeProperties(element) ? chunkV32F4I45_js.getComputedFillStyle(element) : void 0;
|
|
263
263
|
return {
|
|
264
264
|
position: "absolute",
|
|
265
265
|
inset: 0,
|
|
@@ -272,13 +272,13 @@ function getImageSurfaceStyle(element) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
function getCropShapeClipPath2(element) {
|
|
275
|
-
if (!
|
|
275
|
+
if (!chunkV32F4I45_js.isImageLikeElement(element)) {
|
|
276
276
|
return void 0;
|
|
277
277
|
}
|
|
278
|
-
return
|
|
278
|
+
return chunkV32F4I45_js.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
279
279
|
}
|
|
280
280
|
function getImageTilingStyle2(element) {
|
|
281
|
-
return
|
|
281
|
+
return chunkV32F4I45_js.getImageTilingStyle(element);
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// src/viewer/utils/geometry-image.ts
|
|
@@ -410,7 +410,7 @@ function VideoWithMetadata({
|
|
|
410
410
|
{
|
|
411
411
|
ref: mediaRef,
|
|
412
412
|
className: "w-full h-full pointer-events-auto",
|
|
413
|
-
style: isFullScreen ? { objectFit: "cover" } :
|
|
413
|
+
style: isFullScreen ? { objectFit: "cover" } : chunkV32F4I45_js.getImageFitStyle(element),
|
|
414
414
|
controls: showTransport,
|
|
415
415
|
preload: "metadata",
|
|
416
416
|
playsInline: true,
|
|
@@ -467,7 +467,7 @@ function PresentationMediaController({
|
|
|
467
467
|
const [isMediaPlaying, setIsMediaPlaying] = React7.useState(false);
|
|
468
468
|
const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
|
|
469
469
|
const hideWhenNotPlaying = isPresentationMode && element.hideWhenNotPlaying === true;
|
|
470
|
-
const { volume: playbackVolume, playbackRate } =
|
|
470
|
+
const { volume: playbackVolume, playbackRate } = chunkV32F4I45_js.mediaPlaybackAttributes({
|
|
471
471
|
loop: element.loop,
|
|
472
472
|
volume: element.volume,
|
|
473
473
|
playbackSpeed: element.playbackSpeed
|
|
@@ -515,7 +515,7 @@ function PresentationMediaController({
|
|
|
515
515
|
if (!el || !isPresentationMode) {
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
return
|
|
518
|
+
return chunkV32F4I45_js.scheduleMediaTrimAndFade(el, {
|
|
519
519
|
trimStartMs: element.trimStartMs,
|
|
520
520
|
trimEndMs: element.trimEndMs,
|
|
521
521
|
fadeInDuration: element.fadeInDuration,
|
|
@@ -536,7 +536,7 @@ function PresentationMediaController({
|
|
|
536
536
|
}
|
|
537
537
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
538
538
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
539
|
-
if (
|
|
539
|
+
if (chunkV32F4I45_js.registerCrossSlideAudio(element, dataUrl)) {
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
@@ -581,7 +581,7 @@ function PresentationMediaController({
|
|
|
581
581
|
] });
|
|
582
582
|
}
|
|
583
583
|
function label(key) {
|
|
584
|
-
return key === void 0 ? void 0 :
|
|
584
|
+
return key === void 0 ? void 0 : chunkBRJN3ZMG_js.translationsEn[key];
|
|
585
585
|
}
|
|
586
586
|
function FallbackIcon({
|
|
587
587
|
paths,
|
|
@@ -617,17 +617,17 @@ function Badge({
|
|
|
617
617
|
"div",
|
|
618
618
|
{
|
|
619
619
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
620
|
-
...{ [
|
|
620
|
+
...{ [chunkV32F4I45_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
621
621
|
children: [
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
623
|
FallbackIcon,
|
|
624
624
|
{
|
|
625
|
-
paths:
|
|
625
|
+
paths: chunkV32F4I45_js.mediaFallbackIcon(visual, element.mediaType),
|
|
626
626
|
size: isMissing ? 32 : 48,
|
|
627
627
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
628
628
|
}
|
|
629
629
|
),
|
|
630
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
630
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkV32F4I45_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
631
631
|
]
|
|
632
632
|
}
|
|
633
633
|
);
|
|
@@ -644,17 +644,17 @@ function Placeholder({
|
|
|
644
644
|
"div",
|
|
645
645
|
{
|
|
646
646
|
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"}`,
|
|
647
|
-
...{ [
|
|
647
|
+
...{ [chunkV32F4I45_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
648
648
|
children: [
|
|
649
649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
650
650
|
FallbackIcon,
|
|
651
651
|
{
|
|
652
|
-
paths:
|
|
652
|
+
paths: chunkV32F4I45_js.mediaFallbackIcon(visual, element.mediaType),
|
|
653
653
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
654
654
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
655
655
|
}
|
|
656
656
|
),
|
|
657
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
657
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkV32F4I45_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
658
658
|
]
|
|
659
659
|
}
|
|
660
660
|
);
|
|
@@ -664,7 +664,7 @@ function renderMediaFallback({
|
|
|
664
664
|
posterUrl,
|
|
665
665
|
surface
|
|
666
666
|
}) {
|
|
667
|
-
const visual =
|
|
667
|
+
const visual = chunkV32F4I45_js.mediaFallbackVisual(surface, {
|
|
668
668
|
hasPoster: Boolean(posterUrl),
|
|
669
669
|
missing: element.mediaMissing === true
|
|
670
670
|
});
|
|
@@ -674,9 +674,9 @@ function renderMediaFallback({
|
|
|
674
674
|
"img",
|
|
675
675
|
{
|
|
676
676
|
src: posterUrl,
|
|
677
|
-
alt: visual.dimPoster ?
|
|
677
|
+
alt: visual.dimPoster ? chunkBRJN3ZMG_js.translationsEn["pptx.media.posterAlt"] : chunkBRJN3ZMG_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
678
678
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
679
|
-
style:
|
|
679
|
+
style: chunkV32F4I45_js.getImageFitStyle(element)
|
|
680
680
|
}
|
|
681
681
|
),
|
|
682
682
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -686,7 +686,7 @@ function renderMediaFallback({
|
|
|
686
686
|
}
|
|
687
687
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
688
688
|
if (element.type !== "media") {
|
|
689
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
689
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.media.title"] });
|
|
690
690
|
}
|
|
691
691
|
const mediaType = element.mediaType;
|
|
692
692
|
const mediaPath = element.mediaPath;
|
|
@@ -694,7 +694,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
694
694
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
695
695
|
const trimFragment = buildTrimFragment(element);
|
|
696
696
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
697
|
-
const shouldLoop =
|
|
697
|
+
const shouldLoop = chunkV32F4I45_js.mediaPlaybackAttributes(element).loop;
|
|
698
698
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
699
699
|
const isFullScreen = options?.fullScreen === true;
|
|
700
700
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -772,25 +772,25 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
772
772
|
if (surface.presenting || surface.preview) {
|
|
773
773
|
return null;
|
|
774
774
|
}
|
|
775
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
775
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.media.title"] });
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
// src/viewer/utils/text-utils.tsx
|
|
779
779
|
function getTextStyleForElement(element, fallbackColor) {
|
|
780
|
-
return
|
|
780
|
+
return chunkV32F4I45_js.buildTextBlockStyle(element, { fallbackColor });
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
// src/viewer/utils/text-layout.tsx
|
|
784
784
|
function getTextLayoutStyle(element) {
|
|
785
|
-
if (!
|
|
785
|
+
if (!chunkV32F4I45_js.hasTextProperties(element)) {
|
|
786
786
|
return {};
|
|
787
787
|
}
|
|
788
|
-
const writingMode =
|
|
789
|
-
const textOrientation =
|
|
790
|
-
const verticalDirection =
|
|
788
|
+
const writingMode = chunkV32F4I45_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
789
|
+
const textOrientation = chunkV32F4I45_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
790
|
+
const verticalDirection = chunkV32F4I45_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
791
791
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
792
792
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
793
|
-
const hasParagraphIndents =
|
|
793
|
+
const hasParagraphIndents = chunkV32F4I45_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
794
794
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
795
795
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
796
796
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -799,7 +799,7 @@ function getTextLayoutStyle(element) {
|
|
|
799
799
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
800
800
|
return {
|
|
801
801
|
// Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
|
|
802
|
-
...
|
|
802
|
+
...chunkV32F4I45_js.buildTextBodyLayoutStyle(element),
|
|
803
803
|
// Body inset only. Paragraph spacing (spcBef/spcAft) is applied
|
|
804
804
|
// per-paragraph by the paragraph renderer, not collapsed here.
|
|
805
805
|
paddingTop: bodyTop,
|
|
@@ -827,7 +827,7 @@ function getTextLayoutStyle(element) {
|
|
|
827
827
|
|
|
828
828
|
// src/viewer/utils/text-effects.tsx
|
|
829
829
|
function buildTextBody3DSceneStyle2(textStyle, elementSize) {
|
|
830
|
-
return
|
|
830
|
+
return chunkV32F4I45_js.buildTextBody3DSceneStyle(textStyle, elementSize);
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1012,13 +1012,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1012
1012
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1013
1013
|
return renderedSegments;
|
|
1014
1014
|
}
|
|
1015
|
-
const paraKey = `${elementId}${
|
|
1015
|
+
const paraKey = `${elementId}${chunkV32F4I45_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1016
1016
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1017
1017
|
if (paraState) {
|
|
1018
1018
|
const style = buildAnimStyle(paraState);
|
|
1019
1019
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1020
1020
|
}
|
|
1021
|
-
const spec =
|
|
1021
|
+
const spec = chunkV32F4I45_js.buildTextBuildSpec(
|
|
1022
1022
|
elementId,
|
|
1023
1023
|
paraIndex,
|
|
1024
1024
|
paraRuns.map((run) => ({ text: run.text, style: run })),
|
|
@@ -1036,7 +1036,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1036
1036
|
"span",
|
|
1037
1037
|
{
|
|
1038
1038
|
"data-anim-id": span.animId,
|
|
1039
|
-
style:
|
|
1039
|
+
style: chunkV32F4I45_js.textBuildSpanStyle(span),
|
|
1040
1040
|
children: content
|
|
1041
1041
|
},
|
|
1042
1042
|
span.animId
|
|
@@ -1047,13 +1047,13 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1047
1047
|
if (!isUnderlineWords || !text) {
|
|
1048
1048
|
return inner(text, keyPrefix, metric);
|
|
1049
1049
|
}
|
|
1050
|
-
const pieces =
|
|
1050
|
+
const pieces = chunkV32F4I45_js.splitWordsForUnderline(text);
|
|
1051
1051
|
if (pieces.length === 0) {
|
|
1052
1052
|
return inner(text, keyPrefix, metric);
|
|
1053
1053
|
}
|
|
1054
1054
|
const gapMetric = metric ? {
|
|
1055
1055
|
...metric,
|
|
1056
|
-
nestedStyle: metric.nestedStyle ?
|
|
1056
|
+
nestedStyle: metric.nestedStyle ? chunkV32F4I45_js.stripUnderlineDecoration(metric.nestedStyle) : void 0
|
|
1057
1057
|
} : void 0;
|
|
1058
1058
|
return pieces.map((piece, i) => {
|
|
1059
1059
|
const key = `${keyPrefix}-u${i}`;
|
|
@@ -1086,7 +1086,7 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1086
1086
|
);
|
|
1087
1087
|
}
|
|
1088
1088
|
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1089
|
-
const [lineLayout] =
|
|
1089
|
+
const [lineLayout] = chunkV32F4I45_js.buildRunTabLines(
|
|
1090
1090
|
line,
|
|
1091
1091
|
ctx,
|
|
1092
1092
|
nestedStyle,
|
|
@@ -1105,7 +1105,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1105
1105
|
if (!needsScriptFonts || !text) {
|
|
1106
1106
|
return text;
|
|
1107
1107
|
}
|
|
1108
|
-
const pieces =
|
|
1108
|
+
const pieces = chunkV32F4I45_js.splitRunByScriptFont(
|
|
1109
1109
|
text,
|
|
1110
1110
|
scriptFonts,
|
|
1111
1111
|
baseFontFamily,
|
|
@@ -1122,7 +1122,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1122
1122
|
if (!metric || !text) {
|
|
1123
1123
|
return inner(text, keyPrefix);
|
|
1124
1124
|
}
|
|
1125
|
-
const pieces =
|
|
1125
|
+
const pieces = chunkV32F4I45_js.splitRunForMetrics(text, metric.font);
|
|
1126
1126
|
if (pieces.length <= 1) {
|
|
1127
1127
|
return inner(text, keyPrefix);
|
|
1128
1128
|
}
|
|
@@ -1131,7 +1131,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1131
1131
|
{
|
|
1132
1132
|
style: {
|
|
1133
1133
|
...metric.nestedStyle,
|
|
1134
|
-
letterSpacing:
|
|
1134
|
+
letterSpacing: chunkV32F4I45_js.pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1135
1135
|
},
|
|
1136
1136
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1137
1137
|
},
|
|
@@ -1207,8 +1207,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1207
1207
|
});
|
|
1208
1208
|
}
|
|
1209
1209
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1210
|
-
const mathml =
|
|
1211
|
-
const safeMathml = mathml ?
|
|
1210
|
+
const mathml = chunkV32F4I45_js.convertOmmlToMathMl(equationXml);
|
|
1211
|
+
const safeMathml = mathml ? chunkV32F4I45_js.sanitizeMathMl(mathml) : "";
|
|
1212
1212
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1213
1213
|
"span",
|
|
1214
1214
|
{
|
|
@@ -1218,7 +1218,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1218
1218
|
},
|
|
1219
1219
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1220
1220
|
}
|
|
1221
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1221
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkBRJN3ZMG_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1222
1222
|
if (equationNumber) {
|
|
1223
1223
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1224
1224
|
"span",
|
|
@@ -1337,7 +1337,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1337
1337
|
const segmentStyle = segment?.style ?? {};
|
|
1338
1338
|
const textValue = run.text;
|
|
1339
1339
|
const lines = textValue.split("\n");
|
|
1340
|
-
const resolvedSegmentColor =
|
|
1340
|
+
const resolvedSegmentColor = chunkV32F4I45_js.normalizeHexColor(
|
|
1341
1341
|
segmentStyle.color || element.textStyle?.color,
|
|
1342
1342
|
run.hyperlink ? HYPERLINK_COLOR : fallbackColor
|
|
1343
1343
|
);
|
|
@@ -1345,16 +1345,16 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1345
1345
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1346
1346
|
const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
|
|
1347
1347
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1348
|
-
const baseFontSize = rawFontSize *
|
|
1348
|
+
const baseFontSize = rawFontSize * chunkV32F4I45_js.resolveAutoFitFontScale(element.textStyle);
|
|
1349
1349
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1350
|
-
const fontKerning =
|
|
1350
|
+
const fontKerning = chunkV32F4I45_js.resolveFontKerning(segmentStyle.kerning, baseFontSize);
|
|
1351
1351
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1352
|
-
const baseFontFamily = rawFontFamily ?
|
|
1352
|
+
const baseFontFamily = rawFontFamily ? chunkV32F4I45_js.getSubstituteFontFamily(
|
|
1353
1353
|
rawFontFamily,
|
|
1354
|
-
|
|
1354
|
+
chunkV32F4I45_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1355
1355
|
) : DEFAULT_FONT_FAMILY2;
|
|
1356
|
-
const scriptFonts =
|
|
1357
|
-
const needsScriptFonts =
|
|
1356
|
+
const scriptFonts = chunkV32F4I45_js.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1357
|
+
const needsScriptFonts = chunkV32F4I45_js.hasDistinctScriptFonts(scriptFonts);
|
|
1358
1358
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1359
1359
|
const metricFont = {
|
|
1360
1360
|
fontFamily: baseFontFamily,
|
|
@@ -1362,7 +1362,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1362
1362
|
bold: Boolean(segmentStyle.bold),
|
|
1363
1363
|
italic: Boolean(segmentStyle.italic)
|
|
1364
1364
|
};
|
|
1365
|
-
const nestedStyle =
|
|
1365
|
+
const nestedStyle = chunkV32F4I45_js.nestedTextDecorationStyle(run.style);
|
|
1366
1366
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing, nestedStyle };
|
|
1367
1367
|
const spanStyle = { ...run.style };
|
|
1368
1368
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1370,11 +1370,11 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1370
1370
|
spanStyle.fontFamily = baseFontFamily;
|
|
1371
1371
|
spanStyle.verticalAlign = baselineShift;
|
|
1372
1372
|
spanStyle.fontKerning = fontKerning;
|
|
1373
|
-
spanStyle.letterSpacing =
|
|
1373
|
+
spanStyle.letterSpacing = chunkV32F4I45_js.pieceLetterSpacing(
|
|
1374
1374
|
authoredLetterSpacing,
|
|
1375
|
-
|
|
1375
|
+
chunkV32F4I45_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1376
1376
|
);
|
|
1377
|
-
const hollow =
|
|
1377
|
+
const hollow = chunkV32F4I45_js.hollowTextFillStyle(segmentStyle, {
|
|
1378
1378
|
color: resolvedSegmentColor,
|
|
1379
1379
|
textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
|
|
1380
1380
|
});
|
|
@@ -1389,7 +1389,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1389
1389
|
const isUnderlineWords = Boolean(segmentStyle.underline) && segmentStyle.underlineStyle === "words";
|
|
1390
1390
|
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1391
1391
|
if (isUnderlineWords) {
|
|
1392
|
-
const stripped =
|
|
1392
|
+
const stripped = chunkV32F4I45_js.stripUnderlineDecoration(spanStyle);
|
|
1393
1393
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
1394
1394
|
delete spanStyle.textDecorationStyle;
|
|
1395
1395
|
delete spanStyle.textDecorationThickness;
|
|
@@ -1405,7 +1405,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1405
1405
|
scriptFonts,
|
|
1406
1406
|
baseFontFamily,
|
|
1407
1407
|
findHighlights,
|
|
1408
|
-
|
|
1408
|
+
chunkV32F4I45_js.buildTabContext(
|
|
1409
1409
|
element.textStyle?.tabStops,
|
|
1410
1410
|
element.textStyle?.defaultTabSize,
|
|
1411
1411
|
baseFontSize,
|
|
@@ -1433,7 +1433,7 @@ function renderRubyOrText(run, baseContent) {
|
|
|
1433
1433
|
] });
|
|
1434
1434
|
}
|
|
1435
1435
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt) {
|
|
1436
|
-
if (!
|
|
1436
|
+
if (!chunkV32F4I45_js.hasTextProperties(element)) {
|
|
1437
1437
|
return emptyFallback || null;
|
|
1438
1438
|
}
|
|
1439
1439
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1443,7 +1443,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1443
1443
|
}
|
|
1444
1444
|
return element.text || emptyFallback || "";
|
|
1445
1445
|
}
|
|
1446
|
-
const paragraphs =
|
|
1446
|
+
const paragraphs = chunkV32F4I45_js.buildParagraphs(element, fieldContext, segmentOverrides);
|
|
1447
1447
|
const ctx = {
|
|
1448
1448
|
element,
|
|
1449
1449
|
fallbackColor,
|
|
@@ -1569,13 +1569,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1569
1569
|
);
|
|
1570
1570
|
}
|
|
1571
1571
|
function getDuotoneColors(element) {
|
|
1572
|
-
if (!
|
|
1572
|
+
if (!chunkV32F4I45_js.isImageLikeElement(element)) {
|
|
1573
1573
|
return void 0;
|
|
1574
1574
|
}
|
|
1575
1575
|
return element.imageEffects?.duotone;
|
|
1576
1576
|
}
|
|
1577
1577
|
function buildLineShadowCss(element) {
|
|
1578
|
-
if (!
|
|
1578
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
1579
1579
|
return void 0;
|
|
1580
1580
|
}
|
|
1581
1581
|
const ss = element.shapeStyle;
|
|
@@ -1586,13 +1586,13 @@ function buildLineShadowCss(element) {
|
|
|
1586
1586
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
1587
1587
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
1588
1588
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
1589
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
1590
|
-
|
|
1589
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkV32F4I45_js.colorWithOpacity(
|
|
1590
|
+
chunkV32F4I45_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
1591
1591
|
opacity
|
|
1592
1592
|
)}`;
|
|
1593
1593
|
}
|
|
1594
1594
|
function buildLineGlowFilter(element) {
|
|
1595
|
-
if (!
|
|
1595
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
1596
1596
|
return void 0;
|
|
1597
1597
|
}
|
|
1598
1598
|
const ss = element.shapeStyle;
|
|
@@ -1601,22 +1601,22 @@ function buildLineGlowFilter(element) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
1603
1603
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
1604
|
-
const glowCol =
|
|
1604
|
+
const glowCol = chunkV32F4I45_js.colorWithOpacity(chunkV32F4I45_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
1605
1605
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
1606
1606
|
}
|
|
1607
1607
|
function getDagDuotoneFilterId(elementId) {
|
|
1608
1608
|
return `dag-duotone-${elementId}`;
|
|
1609
1609
|
}
|
|
1610
1610
|
function hasDagDuotoneEffect(element) {
|
|
1611
|
-
if (!
|
|
1611
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
1612
1612
|
return false;
|
|
1613
1613
|
}
|
|
1614
1614
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
1615
1615
|
}
|
|
1616
1616
|
function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
1617
1617
|
const filterId = getDagDuotoneFilterId(elementId);
|
|
1618
|
-
const c1 =
|
|
1619
|
-
const c2 =
|
|
1618
|
+
const c1 = chunkV32F4I45_js.hexToRgbUnit(color1);
|
|
1619
|
+
const c2 = chunkV32F4I45_js.hexToRgbUnit(color2);
|
|
1620
1620
|
const grayscaleMatrix = [
|
|
1621
1621
|
0.2126,
|
|
1622
1622
|
0.7152,
|
|
@@ -1660,7 +1660,7 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
|
|
|
1660
1660
|
|
|
1661
1661
|
// src/viewer/utils/shape-visual-3d.ts
|
|
1662
1662
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
1663
|
-
return
|
|
1663
|
+
return chunkV32F4I45_js.build3DExtrusionData(
|
|
1664
1664
|
shape3d,
|
|
1665
1665
|
scene3d,
|
|
1666
1666
|
fillColor,
|
|
@@ -1669,7 +1669,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
1669
1669
|
);
|
|
1670
1670
|
}
|
|
1671
1671
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
|
|
1672
|
-
|
|
1672
|
+
chunkV32F4I45_js.apply3dEffects(
|
|
1673
1673
|
base,
|
|
1674
1674
|
scene3d,
|
|
1675
1675
|
shape3d,
|
|
@@ -1684,11 +1684,11 @@ function rendersCustomVectorPath(element) {
|
|
|
1684
1684
|
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;
|
|
1685
1685
|
}
|
|
1686
1686
|
function rendersWedgeCalloutVector(element) {
|
|
1687
|
-
return element.type === "shape" &&
|
|
1687
|
+
return element.type === "shape" && chunkV32F4I45_js.isWedgeCalloutPresetShape(element.shapeType);
|
|
1688
1688
|
}
|
|
1689
1689
|
function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
|
|
1690
1690
|
if (element.type === "group") {
|
|
1691
|
-
const fx2 =
|
|
1691
|
+
const fx2 = chunkV32F4I45_js.getComputedEffectStyle(element);
|
|
1692
1692
|
const groupStyle = {};
|
|
1693
1693
|
if (fx2.filter) {
|
|
1694
1694
|
groupStyle.filter = fx2.filter;
|
|
@@ -1698,13 +1698,13 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1698
1698
|
}
|
|
1699
1699
|
return groupStyle;
|
|
1700
1700
|
}
|
|
1701
|
-
if (!
|
|
1701
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
1702
1702
|
return {};
|
|
1703
1703
|
}
|
|
1704
1704
|
const ss = element.shapeStyle;
|
|
1705
|
-
const fill = animatesFill ? void 0 :
|
|
1706
|
-
const fx =
|
|
1707
|
-
const stroke =
|
|
1705
|
+
const fill = animatesFill ? void 0 : chunkV32F4I45_js.getComputedFillStyle(element, parentGroupFill);
|
|
1706
|
+
const fx = chunkV32F4I45_js.getComputedEffectStyle(element);
|
|
1707
|
+
const stroke = chunkV32F4I45_js.getComputedStrokeStyle(element);
|
|
1708
1708
|
const base = {
|
|
1709
1709
|
// A gradient fill REPLACES the solid fill, it does not sit on top of it;
|
|
1710
1710
|
// the whole precedence lives in shared's `getComputedFillStyle`.
|
|
@@ -1743,7 +1743,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1743
1743
|
};
|
|
1744
1744
|
Object.assign(
|
|
1745
1745
|
base,
|
|
1746
|
-
|
|
1746
|
+
chunkV32F4I45_js.getAnimationColorBaseStyle(element, {
|
|
1747
1747
|
animatesFill,
|
|
1748
1748
|
animatesStroke,
|
|
1749
1749
|
parentGroupFill
|
|
@@ -1765,7 +1765,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1765
1765
|
},
|
|
1766
1766
|
element.id
|
|
1767
1767
|
);
|
|
1768
|
-
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) ||
|
|
1768
|
+
if (rendersCustomVectorPath(element) || rendersWedgeCalloutVector(element) || chunkV32F4I45_js.isStrokeOnlyPresetElement(element)) {
|
|
1769
1769
|
base.backgroundColor = "transparent";
|
|
1770
1770
|
base.backgroundImage = void 0;
|
|
1771
1771
|
base.borderWidth = void 0;
|
|
@@ -1779,7 +1779,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1779
1779
|
if (rendersWedgeCalloutVector(element)) {
|
|
1780
1780
|
return base;
|
|
1781
1781
|
}
|
|
1782
|
-
const geometry =
|
|
1782
|
+
const geometry = chunkV32F4I45_js.resolveShapeGeometry(element);
|
|
1783
1783
|
switch (geometry.kind) {
|
|
1784
1784
|
case "bare":
|
|
1785
1785
|
return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
|
|
@@ -1802,112 +1802,8 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1802
1802
|
return base;
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
|
|
1807
|
-
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
1808
|
-
return chunk4SPZ5IZN_js.clampUnitInterval(direct / 1e5);
|
|
1809
|
-
}
|
|
1810
|
-
const fallbackKey = element.shapeAdjustments?.adj;
|
|
1811
|
-
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
1812
|
-
return chunk4SPZ5IZN_js.clampUnitInterval(fallbackKey / 1e5);
|
|
1813
|
-
}
|
|
1814
|
-
return chunk4SPZ5IZN_js.clampUnitInterval(fallback);
|
|
1815
|
-
}
|
|
1816
|
-
function getConnectorPathGeometry(element) {
|
|
1817
|
-
const width = Math.max(element.width, 0);
|
|
1818
|
-
const height = Math.max(element.height, 0);
|
|
1819
|
-
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
1820
|
-
const mapX = (value) => value;
|
|
1821
|
-
const mapY = (value) => value;
|
|
1822
|
-
const point = (x, y) => `${mapX(x)} ${mapY(y)}`;
|
|
1823
|
-
const startX = mapX(0);
|
|
1824
|
-
const startY = mapY(0);
|
|
1825
|
-
const endX = mapX(width);
|
|
1826
|
-
const endY = mapY(height);
|
|
1827
|
-
const horizontalDominant = width >= height;
|
|
1828
|
-
if (normalizedType.includes("bentconnector3")) {
|
|
1829
|
-
const adj1 = getConnectorAdjustment(element, "adj1", 0.32);
|
|
1830
|
-
const adj2 = getConnectorAdjustment(element, "adj2", 0.68);
|
|
1831
|
-
if (horizontalDominant) {
|
|
1832
|
-
const x1 = width * Math.min(adj1, adj2);
|
|
1833
|
-
const x2 = width * Math.max(adj1, adj2);
|
|
1834
|
-
const yMid = height * 0.5;
|
|
1835
|
-
return {
|
|
1836
|
-
startX,
|
|
1837
|
-
startY,
|
|
1838
|
-
endX,
|
|
1839
|
-
endY,
|
|
1840
|
-
pathData: `M ${point(0, 0)} L ${point(x1, 0)} L ${point(x1, yMid)} L ${point(x2, yMid)} L ${point(x2, height)} L ${point(width, height)}`
|
|
1841
|
-
};
|
|
1842
|
-
}
|
|
1843
|
-
const y1 = height * Math.min(adj1, adj2);
|
|
1844
|
-
const y2 = height * Math.max(adj1, adj2);
|
|
1845
|
-
const xMid = width * 0.5;
|
|
1846
|
-
return {
|
|
1847
|
-
startX,
|
|
1848
|
-
startY,
|
|
1849
|
-
endX,
|
|
1850
|
-
endY,
|
|
1851
|
-
pathData: `M ${point(0, 0)} L ${point(0, y1)} L ${point(xMid, y1)} L ${point(xMid, y2)} L ${point(width, y2)} L ${point(width, height)}`
|
|
1852
|
-
};
|
|
1853
|
-
}
|
|
1854
|
-
if (normalizedType.includes("bentconnector")) {
|
|
1855
|
-
const adj1 = getConnectorAdjustment(element, "adj1", 0.5);
|
|
1856
|
-
const adj2 = getConnectorAdjustment(element, "adj2", 0.5);
|
|
1857
|
-
if (horizontalDominant) {
|
|
1858
|
-
const bendX = width * adj1;
|
|
1859
|
-
return {
|
|
1860
|
-
startX,
|
|
1861
|
-
startY,
|
|
1862
|
-
endX,
|
|
1863
|
-
endY,
|
|
1864
|
-
pathData: `M ${point(0, 0)} L ${point(bendX, 0)} L ${point(bendX, height)} L ${point(width, height)}`
|
|
1865
|
-
};
|
|
1866
|
-
}
|
|
1867
|
-
const bendY = height * adj2;
|
|
1868
|
-
return {
|
|
1869
|
-
startX,
|
|
1870
|
-
startY,
|
|
1871
|
-
endX,
|
|
1872
|
-
endY,
|
|
1873
|
-
pathData: `M ${point(0, 0)} L ${point(0, bendY)} L ${point(width, bendY)} L ${point(width, height)}`
|
|
1874
|
-
};
|
|
1875
|
-
}
|
|
1876
|
-
if (normalizedType.includes("curvedconnector3")) {
|
|
1877
|
-
const adj1 = getConnectorAdjustment(element, "adj1", 0.22);
|
|
1878
|
-
const adj2 = getConnectorAdjustment(element, "adj2", 0.78);
|
|
1879
|
-
const control1X = width * adj1;
|
|
1880
|
-
const control2X = width * adj2;
|
|
1881
|
-
const control1Y = 0;
|
|
1882
|
-
const control2Y = height;
|
|
1883
|
-
return {
|
|
1884
|
-
startX,
|
|
1885
|
-
startY,
|
|
1886
|
-
endX,
|
|
1887
|
-
endY,
|
|
1888
|
-
pathData: `M ${point(0, 0)} C ${point(control1X, control1Y)} ${point(control2X, control2Y)} ${point(width, height)}`
|
|
1889
|
-
};
|
|
1890
|
-
}
|
|
1891
|
-
if (normalizedType.includes("curvedconnector")) {
|
|
1892
|
-
const adj1 = getConnectorAdjustment(element, "adj1", 0.5);
|
|
1893
|
-
const adj2 = getConnectorAdjustment(element, "adj2", horizontalDominant ? 0 : 1);
|
|
1894
|
-
const controlX = width * adj1;
|
|
1895
|
-
const controlY = height * adj2;
|
|
1896
|
-
return {
|
|
1897
|
-
startX,
|
|
1898
|
-
startY,
|
|
1899
|
-
endX,
|
|
1900
|
-
endY,
|
|
1901
|
-
pathData: `M ${point(0, 0)} Q ${point(controlX, controlY)} ${point(width, height)}`
|
|
1902
|
-
};
|
|
1903
|
-
}
|
|
1904
|
-
return {
|
|
1905
|
-
startX,
|
|
1906
|
-
startY,
|
|
1907
|
-
endX,
|
|
1908
|
-
endY,
|
|
1909
|
-
pathData: `M ${point(0, 0)} L ${point(width, height)}`
|
|
1910
|
-
};
|
|
1805
|
+
function getConnectorPathGeometry2(element) {
|
|
1806
|
+
return chunkV32F4I45_js.getConnectorPathGeometry(element);
|
|
1911
1807
|
}
|
|
1912
1808
|
var ARROW_SIZE_SCALE = {
|
|
1913
1809
|
sm: 0.6,
|
|
@@ -1976,11 +1872,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
1976
1872
|
strokePaint,
|
|
1977
1873
|
strokeWidth,
|
|
1978
1874
|
dashArray,
|
|
1979
|
-
lineCap:
|
|
1875
|
+
lineCap: chunkV32F4I45_js.svgLineCap(shapeStyle?.lineCap),
|
|
1980
1876
|
lineJoin,
|
|
1981
1877
|
miterLimit,
|
|
1982
|
-
offsets:
|
|
1983
|
-
widths:
|
|
1878
|
+
offsets: chunkV32F4I45_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
1879
|
+
widths: chunkV32F4I45_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
1984
1880
|
};
|
|
1985
1881
|
}
|
|
1986
1882
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2003,12 +1899,12 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
2003
1899
|
}
|
|
2004
1900
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2005
1901
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2006
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1902
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkV32F4I45_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2007
1903
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2008
|
-
const gradientPaint = gradient ?
|
|
1904
|
+
const gradientPaint = gradient ? chunkV32F4I45_js.svgGradientFillRef(gradient) : void 0;
|
|
2009
1905
|
const nodes = [];
|
|
2010
1906
|
if (subpaths && needsPerSubpath) {
|
|
2011
|
-
const paints =
|
|
1907
|
+
const paints = chunkV32F4I45_js.buildSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
2012
1908
|
paints.forEach((paint, idx) => {
|
|
2013
1909
|
if (paint.fill !== "none") {
|
|
2014
1910
|
const mode = subpaths[idx]?.fillMode;
|
|
@@ -2037,7 +1933,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2037
1933
|
"path",
|
|
2038
1934
|
{
|
|
2039
1935
|
d: pathData,
|
|
2040
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
1936
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkV32F4I45_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2041
1937
|
stroke: "none",
|
|
2042
1938
|
vectorEffect: "non-scaling-stroke"
|
|
2043
1939
|
},
|
|
@@ -2063,14 +1959,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2063
1959
|
);
|
|
2064
1960
|
}
|
|
2065
1961
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2066
|
-
if (!
|
|
1962
|
+
if (!chunkV32F4I45_js.hasShapeProperties(element)) {
|
|
2067
1963
|
return null;
|
|
2068
1964
|
}
|
|
2069
1965
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2070
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2071
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2072
|
-
const dashType =
|
|
2073
|
-
const dashArray =
|
|
1966
|
+
const fillPaint = animatesFill ? "inherit" : chunkV32F4I45_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
1967
|
+
const strokePaint = animatesStroke ? "inherit" : chunkV32F4I45_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
1968
|
+
const dashType = chunkV32F4I45_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
1969
|
+
const dashArray = chunkV32F4I45_js.getSvgStrokeDasharray(
|
|
2074
1970
|
dashType,
|
|
2075
1971
|
Math.max(strokeWidth, 1),
|
|
2076
1972
|
element.shapeStyle?.customDashSegments
|
|
@@ -2151,13 +2047,13 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2151
2047
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2152
2048
|
// without this the shape fell back to the parser's representative solid
|
|
2153
2049
|
// and lost every fade (issue #132).
|
|
2154
|
-
|
|
2050
|
+
chunkV32F4I45_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2155
2051
|
);
|
|
2156
2052
|
}
|
|
2157
|
-
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !
|
|
2053
|
+
if ((element.type === "image" || element.type === "picture") && strokeWidth > 0 && !chunkV32F4I45_js.buildStrokeOutline(element)) {
|
|
2158
2054
|
const width = Math.max(element.width, 1);
|
|
2159
2055
|
const height = Math.max(element.height, 1);
|
|
2160
|
-
const geometry =
|
|
2056
|
+
const geometry = chunkV32F4I45_js.getPresetShapeVectorGeometry(
|
|
2161
2057
|
element.shapeType || "rect",
|
|
2162
2058
|
width,
|
|
2163
2059
|
height,
|
|
@@ -2185,18 +2081,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2185
2081
|
);
|
|
2186
2082
|
}
|
|
2187
2083
|
}
|
|
2188
|
-
if (element.type === "shape" &&
|
|
2084
|
+
if (element.type === "shape" && chunkV32F4I45_js.isWedgeCalloutPresetShape(element.shapeType)) {
|
|
2189
2085
|
const width = Math.max(element.width, 1);
|
|
2190
2086
|
const height = Math.max(element.height, 1);
|
|
2191
|
-
const geometry =
|
|
2087
|
+
const geometry = chunkV32F4I45_js.getPresetShapeVectorGeometry(
|
|
2192
2088
|
element.shapeType,
|
|
2193
2089
|
width,
|
|
2194
2090
|
height,
|
|
2195
2091
|
element.shapeAdjustments
|
|
2196
2092
|
);
|
|
2197
2093
|
if (geometry) {
|
|
2198
|
-
const gradient =
|
|
2199
|
-
const gradientPaint = gradient ?
|
|
2094
|
+
const gradient = chunkV32F4I45_js.buildSvgGradientDef(element.shapeStyle, element.id);
|
|
2095
|
+
const gradientPaint = gradient ? chunkV32F4I45_js.svgGradientFillRef(gradient) : void 0;
|
|
2200
2096
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2201
2097
|
"svg",
|
|
2202
2098
|
{
|
|
@@ -2229,18 +2125,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2229
2125
|
);
|
|
2230
2126
|
}
|
|
2231
2127
|
}
|
|
2232
|
-
if (
|
|
2128
|
+
if (chunkV32F4I45_js.isCalloutShape(normalizedType)) {
|
|
2233
2129
|
const width = Math.max(element.width, 1);
|
|
2234
2130
|
const height = Math.max(element.height, 1);
|
|
2235
|
-
const geometry =
|
|
2131
|
+
const geometry = chunkV32F4I45_js.getCalloutLeaderLineGeometry(
|
|
2236
2132
|
normalizedType,
|
|
2237
2133
|
width,
|
|
2238
2134
|
height,
|
|
2239
2135
|
element.shapeAdjustments
|
|
2240
2136
|
);
|
|
2241
2137
|
if (geometry && geometry.points.length >= 2) {
|
|
2242
|
-
const leaderPath =
|
|
2243
|
-
const bounds =
|
|
2138
|
+
const leaderPath = chunkV32F4I45_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2139
|
+
const bounds = chunkV32F4I45_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2244
2140
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2245
2141
|
const offsetLeft = bounds.minX;
|
|
2246
2142
|
const offsetTop = bounds.minY;
|
|
@@ -2292,7 +2188,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2292
2188
|
if (element.type === "connector" || getShapeType(element.shapeType) === "connector" || element.shapeType === "line") {
|
|
2293
2189
|
const viewWidth = Math.max(element.width, 1);
|
|
2294
2190
|
const viewHeight = Math.max(element.height, 1);
|
|
2295
|
-
const { pathData } =
|
|
2191
|
+
const { pathData } = getConnectorPathGeometry2(element);
|
|
2296
2192
|
const markerSeed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
2297
2193
|
const startMarkerId = `${markerSeed}-start-arrow`;
|
|
2298
2194
|
const endMarkerId = `${markerSeed}-end-arrow`;
|
|
@@ -2303,10 +2199,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2303
2199
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2304
2200
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2305
2201
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2306
|
-
const connectorLineCap =
|
|
2202
|
+
const connectorLineCap = chunkV32F4I45_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2307
2203
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2308
|
-
const offsets =
|
|
2309
|
-
const widths =
|
|
2204
|
+
const offsets = chunkV32F4I45_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2205
|
+
const widths = chunkV32F4I45_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2310
2206
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2311
2207
|
"svg",
|
|
2312
2208
|
{
|
|
@@ -2373,15 +2269,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
2373
2269
|
}
|
|
2374
2270
|
const rawStops = stops.map((gs) => {
|
|
2375
2271
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
2376
|
-
const color =
|
|
2377
|
-
const opacity =
|
|
2272
|
+
const color = chunkV32F4I45_js.parseDrawingColor(gs) ?? "#888888";
|
|
2273
|
+
const opacity = chunkV32F4I45_js.parseDrawingColorOpacity(gs);
|
|
2378
2274
|
return { position: pos, color, opacity };
|
|
2379
2275
|
}).sort((a, b) => a.position - b.position);
|
|
2380
|
-
const stopStrings = rawStops.map((s) => `${
|
|
2276
|
+
const stopStrings = rawStops.map((s) => `${chunkV32F4I45_js.colorWithOpacity(s.color, s.opacity)} ${s.position.toFixed(1)}%`).join(", ");
|
|
2381
2277
|
const lin = gradFill["a:lin"];
|
|
2382
2278
|
if (lin) {
|
|
2383
2279
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2384
|
-
const angleDeg = Math.round(
|
|
2280
|
+
const angleDeg = Math.round(chunkV32F4I45_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2385
2281
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2386
2282
|
}
|
|
2387
2283
|
const path = gradFill["a:path"];
|
|
@@ -2395,7 +2291,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2395
2291
|
b: Number.parseInt(String(fillToRectXml["@_b"] || "0"), 10) / 1e5
|
|
2396
2292
|
} : void 0;
|
|
2397
2293
|
if (pathType === "rect") {
|
|
2398
|
-
return
|
|
2294
|
+
return chunkV32F4I45_js.buildRectPathGradient(rawStops, void 0, fillToRect);
|
|
2399
2295
|
}
|
|
2400
2296
|
let cx = 50;
|
|
2401
2297
|
let cy = 50;
|
|
@@ -2417,8 +2313,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
2417
2313
|
if (!pattFill) {
|
|
2418
2314
|
return void 0;
|
|
2419
2315
|
}
|
|
2420
|
-
const fgColor =
|
|
2421
|
-
const bgColor =
|
|
2316
|
+
const fgColor = chunkV32F4I45_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
2317
|
+
const bgColor = chunkV32F4I45_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
2422
2318
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
2423
2319
|
switch (preset) {
|
|
2424
2320
|
case "ltHorz":
|
|
@@ -2529,11 +2425,11 @@ function parseCellBorders(cellProperties) {
|
|
|
2529
2425
|
const prstDash = ln["a:prstDash"];
|
|
2530
2426
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
2531
2427
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
2532
|
-
const color =
|
|
2428
|
+
const color = chunkV32F4I45_js.parseDrawingColor(ln["a:solidFill"]);
|
|
2533
2429
|
if (color) {
|
|
2534
|
-
const opacity =
|
|
2430
|
+
const opacity = chunkV32F4I45_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
2535
2431
|
const key = `${edge.prefix}`;
|
|
2536
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
2432
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkV32F4I45_js.colorWithOpacity(color, opacity)}`;
|
|
2537
2433
|
}
|
|
2538
2434
|
}
|
|
2539
2435
|
return borderStyle;
|
|
@@ -2546,7 +2442,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2546
2442
|
const textShadowParts = [];
|
|
2547
2443
|
const outerShdw = effectLst["a:outerShdw"];
|
|
2548
2444
|
if (outerShdw) {
|
|
2549
|
-
const shdwColor =
|
|
2445
|
+
const shdwColor = chunkV32F4I45_js.parseDrawingColor(outerShdw);
|
|
2550
2446
|
if (shdwColor) {
|
|
2551
2447
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
2552
2448
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -2564,7 +2460,7 @@ function parseCellTextEffects(runProps) {
|
|
|
2564
2460
|
}
|
|
2565
2461
|
const glow = effectLst["a:glow"];
|
|
2566
2462
|
if (glow) {
|
|
2567
|
-
const glowColor =
|
|
2463
|
+
const glowColor = chunkV32F4I45_js.parseDrawingColor(glow);
|
|
2568
2464
|
if (glowColor) {
|
|
2569
2465
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
2570
2466
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -2586,11 +2482,11 @@ function extractCellText(cellXml) {
|
|
|
2586
2482
|
const textParts = [];
|
|
2587
2483
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2588
2484
|
runs.forEach((run) => {
|
|
2589
|
-
textParts.push(
|
|
2485
|
+
textParts.push(chunkV32F4I45_js.xmlText(run["a:t"]) ?? "");
|
|
2590
2486
|
});
|
|
2591
2487
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2592
2488
|
fields.forEach((field) => {
|
|
2593
|
-
textParts.push(
|
|
2489
|
+
textParts.push(chunkV32F4I45_js.xmlText(field["a:t"]) ?? "");
|
|
2594
2490
|
});
|
|
2595
2491
|
paragraphTexts.push(textParts.join(""));
|
|
2596
2492
|
});
|
|
@@ -2634,10 +2530,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2634
2530
|
if (runProps?.["@_u"] !== void 0) {
|
|
2635
2531
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
2636
2532
|
}
|
|
2637
|
-
const runColor =
|
|
2533
|
+
const runColor = chunkV32F4I45_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkV32F4I45_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
2638
2534
|
if (runColor) {
|
|
2639
|
-
const opacity =
|
|
2640
|
-
cellStyle.color =
|
|
2535
|
+
const opacity = chunkV32F4I45_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
2536
|
+
cellStyle.color = chunkV32F4I45_js.colorWithOpacity(runColor, opacity);
|
|
2641
2537
|
}
|
|
2642
2538
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
2643
2539
|
if (fontFamily) {
|
|
@@ -2647,15 +2543,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2647
2543
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
2648
2544
|
}
|
|
2649
2545
|
const cellProperties = cellXml["a:tcPr"];
|
|
2650
|
-
const cellFill =
|
|
2546
|
+
const cellFill = chunkV32F4I45_js.parseDrawingColor(
|
|
2651
2547
|
cellProperties?.["a:solidFill"],
|
|
2652
2548
|
schemeColorOverrides
|
|
2653
2549
|
);
|
|
2654
2550
|
if (cellFill) {
|
|
2655
|
-
const opacity =
|
|
2551
|
+
const opacity = chunkV32F4I45_js.parseDrawingColorOpacity(
|
|
2656
2552
|
cellProperties?.["a:solidFill"]
|
|
2657
2553
|
);
|
|
2658
|
-
cellStyle.backgroundColor =
|
|
2554
|
+
cellStyle.backgroundColor = chunkV32F4I45_js.colorWithOpacity(cellFill, opacity);
|
|
2659
2555
|
} else {
|
|
2660
2556
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
2661
2557
|
if (gradCss) {
|
|
@@ -2670,16 +2566,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
2670
2566
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
2671
2567
|
Object.assign(cellStyle, edgeBorders);
|
|
2672
2568
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
2673
|
-
const borderColor =
|
|
2569
|
+
const borderColor = chunkV32F4I45_js.parseDrawingColor(
|
|
2674
2570
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
2675
2571
|
schemeColorOverrides
|
|
2676
|
-
) ||
|
|
2572
|
+
) || chunkV32F4I45_js.parseDrawingColor(
|
|
2677
2573
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
2678
2574
|
schemeColorOverrides
|
|
2679
|
-
) ||
|
|
2575
|
+
) || chunkV32F4I45_js.parseDrawingColor(
|
|
2680
2576
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
2681
2577
|
schemeColorOverrides
|
|
2682
|
-
) ||
|
|
2578
|
+
) || chunkV32F4I45_js.parseDrawingColor(
|
|
2683
2579
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
2684
2580
|
schemeColorOverrides
|
|
2685
2581
|
);
|
|
@@ -2751,7 +2647,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
|
|
|
2751
2647
|
if (element.type !== "table") {
|
|
2752
2648
|
return void 0;
|
|
2753
2649
|
}
|
|
2754
|
-
return
|
|
2650
|
+
return chunkV32F4I45_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
2755
2651
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2756
2652
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2757
2653
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2831,7 +2727,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2831
2727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2832
2728
|
"span",
|
|
2833
2729
|
{
|
|
2834
|
-
style: { position: "relative", ...
|
|
2730
|
+
style: { position: "relative", ...chunkV32F4I45_js.cellRunStyle(run) },
|
|
2835
2731
|
children: run.text
|
|
2836
2732
|
},
|
|
2837
2733
|
`r-${index}`
|
|
@@ -2839,7 +2735,7 @@ function renderTableCellContent(cell, fallbackText) {
|
|
|
2839
2735
|
});
|
|
2840
2736
|
}
|
|
2841
2737
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
2842
|
-
return
|
|
2738
|
+
return chunkV32F4I45_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
2843
2739
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
2844
2740
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
2845
2741
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -2972,7 +2868,7 @@ function TableResizeOverlay({
|
|
|
2972
2868
|
const containerRef = React7.useRef(null);
|
|
2973
2869
|
const [rowBounds, setRowBounds] = React7.useState([]);
|
|
2974
2870
|
const dragRef = React7.useRef(null);
|
|
2975
|
-
const colBoundaries = React7.useMemo(() =>
|
|
2871
|
+
const colBoundaries = React7.useMemo(() => chunkV32F4I45_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
2976
2872
|
const measureRows = React7.useCallback(() => {
|
|
2977
2873
|
const container = containerRef.current;
|
|
2978
2874
|
if (!container) {
|
|
@@ -3019,11 +2915,11 @@ function TableResizeOverlay({
|
|
|
3019
2915
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3020
2916
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3021
2917
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3022
|
-
onResizeColumns(
|
|
2918
|
+
onResizeColumns(chunkV32F4I45_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3023
2919
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3024
2920
|
const deltaY = e.clientY - drag.startPos;
|
|
3025
|
-
const newHeight =
|
|
3026
|
-
drag.initialRowHeight ??
|
|
2921
|
+
const newHeight = chunkV32F4I45_js.computeResizedRowHeight(
|
|
2922
|
+
drag.initialRowHeight ?? chunkV32F4I45_js.DEFAULT_ROW_HEIGHT,
|
|
3027
2923
|
deltaY
|
|
3028
2924
|
);
|
|
3029
2925
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3061,7 +2957,7 @@ function TableResizeOverlay({
|
|
|
3061
2957
|
e.stopPropagation();
|
|
3062
2958
|
const table = containerRef.current?.querySelector("table");
|
|
3063
2959
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3064
|
-
const actualHeight = tr?.offsetHeight ??
|
|
2960
|
+
const actualHeight = tr?.offsetHeight ?? chunkV32F4I45_js.DEFAULT_ROW_HEIGHT;
|
|
3065
2961
|
document.body.style.cursor = "row-resize";
|
|
3066
2962
|
document.body.style.userSelect = "none";
|
|
3067
2963
|
dragRef.current = {
|
|
@@ -3101,14 +2997,14 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3101
2997
|
const rowCount = tableData.rows.length;
|
|
3102
2998
|
const columnCount = tableData.columnWidths.length;
|
|
3103
2999
|
const selectedCell = options?.selectedCell || null;
|
|
3104
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3000
|
+
const isEditable = Boolean(options?.editable) && chunkV32F4I45_js.canDrillDown(element);
|
|
3105
3001
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3106
3002
|
const sharedCtx = {
|
|
3107
3003
|
tableStyleMap: options?.styleCtx?.tableStyleMap,
|
|
3108
3004
|
colorScheme: options?.styleCtx?.theme?.colorScheme,
|
|
3109
3005
|
fontScheme: options?.styleCtx?.theme?.fontScheme
|
|
3110
3006
|
};
|
|
3111
|
-
const cellCss = (cell, rowIndex, cellIndex) =>
|
|
3007
|
+
const cellCss = (cell, rowIndex, cellIndex) => chunkV32F4I45_js.tableCellCss(
|
|
3112
3008
|
tableData,
|
|
3113
3009
|
cell,
|
|
3114
3010
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3121,7 +3017,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3121
3017
|
}
|
|
3122
3018
|
const first = selectedCell.selectedCells[0];
|
|
3123
3019
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3124
|
-
return
|
|
3020
|
+
return chunkV32F4I45_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
3125
3021
|
})();
|
|
3126
3022
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3127
3023
|
TableResizeOverlay,
|
|
@@ -3142,9 +3038,9 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3142
3038
|
{
|
|
3143
3039
|
className: "w-full h-full border-collapse table-fixed",
|
|
3144
3040
|
style: {
|
|
3145
|
-
fontFamily:
|
|
3041
|
+
fontFamily: chunkV32F4I45_js.DEFAULT_FONT_FAMILY,
|
|
3146
3042
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3147
|
-
...
|
|
3043
|
+
...chunkV32F4I45_js.tableContainerCss(tableData)
|
|
3148
3044
|
},
|
|
3149
3045
|
children: [
|
|
3150
3046
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3163,7 +3059,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3163
3059
|
return null;
|
|
3164
3060
|
}
|
|
3165
3061
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
3166
|
-
const isInMultiSelection =
|
|
3062
|
+
const isInMultiSelection = chunkV32F4I45_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
3167
3063
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
3168
3064
|
const diag = getCellDiagonalBorders2(
|
|
3169
3065
|
cell.style,
|
|
@@ -3192,7 +3088,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3192
3088
|
}
|
|
3193
3089
|
event.stopPropagation();
|
|
3194
3090
|
if (event.shiftKey && selectedCell) {
|
|
3195
|
-
const rect =
|
|
3091
|
+
const rect = chunkV32F4I45_js.computeSelectionRect(
|
|
3196
3092
|
selectedCell.rowIndex,
|
|
3197
3093
|
selectedCell.columnIndex,
|
|
3198
3094
|
rowIndex,
|
|
@@ -3202,7 +3098,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
3202
3098
|
options?.onSelectCell?.({
|
|
3203
3099
|
rowIndex: selectedCell.rowIndex,
|
|
3204
3100
|
columnIndex: selectedCell.columnIndex,
|
|
3205
|
-
selectedCells:
|
|
3101
|
+
selectedCells: chunkV32F4I45_js.rectToCells(rect)
|
|
3206
3102
|
});
|
|
3207
3103
|
} else {
|
|
3208
3104
|
options?.onSelectCell?.({
|
|
@@ -3263,10 +3159,10 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3263
3159
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3264
3160
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3265
3161
|
}
|
|
3266
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3162
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.table.title"] });
|
|
3267
3163
|
}
|
|
3268
3164
|
const selectedCell = options?.selectedCell || null;
|
|
3269
|
-
const isEditable = Boolean(options?.editable) &&
|
|
3165
|
+
const isEditable = Boolean(options?.editable) && chunkV32F4I45_js.canDrillDown(element);
|
|
3270
3166
|
const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
|
|
3271
3167
|
const tableEl = element;
|
|
3272
3168
|
const xmlSelectionRect = (() => {
|
|
@@ -3278,7 +3174,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3278
3174
|
}
|
|
3279
3175
|
const first = selectedCell.selectedCells[0];
|
|
3280
3176
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
3281
|
-
return
|
|
3177
|
+
return chunkV32F4I45_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
3282
3178
|
})();
|
|
3283
3179
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
3284
3180
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3300,9 +3196,9 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3300
3196
|
{
|
|
3301
3197
|
className: "w-full h-full border-collapse table-fixed",
|
|
3302
3198
|
style: {
|
|
3303
|
-
fontFamily:
|
|
3199
|
+
fontFamily: chunkV32F4I45_js.DEFAULT_FONT_FAMILY,
|
|
3304
3200
|
// `a:tblPr@rtl` mirrors the column order for RTL decks.
|
|
3305
|
-
...
|
|
3201
|
+
...chunkV32F4I45_js.tableContainerCss(tableEl.tableData)
|
|
3306
3202
|
},
|
|
3307
3203
|
children: [
|
|
3308
3204
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3359,7 +3255,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3359
3255
|
color: textStyle.color,
|
|
3360
3256
|
...bandStyle,
|
|
3361
3257
|
...xmlCellStyle,
|
|
3362
|
-
...tdCellOverride ?
|
|
3258
|
+
...tdCellOverride ? chunkV32F4I45_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
3363
3259
|
...diag ? { position: "relative" } : void 0
|
|
3364
3260
|
};
|
|
3365
3261
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3369,7 +3265,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3369
3265
|
"border px-1 py-0.5 align-top",
|
|
3370
3266
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
3371
3267
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
3372
|
-
|
|
3268
|
+
chunkV32F4I45_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
3373
3269
|
),
|
|
3374
3270
|
colSpan,
|
|
3375
3271
|
rowSpan: rSpan,
|
|
@@ -3380,7 +3276,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3380
3276
|
}
|
|
3381
3277
|
event.stopPropagation();
|
|
3382
3278
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
3383
|
-
const rect =
|
|
3279
|
+
const rect = chunkV32F4I45_js.computeSelectionRect(
|
|
3384
3280
|
selectedCell.rowIndex,
|
|
3385
3281
|
selectedCell.columnIndex,
|
|
3386
3282
|
rowIndex,
|
|
@@ -3390,7 +3286,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3390
3286
|
options?.onSelectCell?.({
|
|
3391
3287
|
rowIndex: selectedCell.rowIndex,
|
|
3392
3288
|
columnIndex: selectedCell.columnIndex,
|
|
3393
|
-
selectedCells:
|
|
3289
|
+
selectedCells: chunkV32F4I45_js.rectToCells(rect)
|
|
3394
3290
|
});
|
|
3395
3291
|
} else {
|
|
3396
3292
|
options?.onSelectCell?.({
|
|
@@ -3449,23 +3345,23 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3449
3345
|
);
|
|
3450
3346
|
}
|
|
3451
3347
|
function partAttrs(part) {
|
|
3452
|
-
return part ?
|
|
3348
|
+
return part ? chunkV32F4I45_js.chartPartToAttrs(part) : void 0;
|
|
3453
3349
|
}
|
|
3454
3350
|
function resolveReactPalette(chartData) {
|
|
3455
3351
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
3456
3352
|
return chartData.colorPalette;
|
|
3457
3353
|
}
|
|
3458
|
-
return [...
|
|
3354
|
+
return [...chunkV32F4I45_js.getChartStylePalette(chartData.style?.styleId)];
|
|
3459
3355
|
}
|
|
3460
3356
|
function buildReactChartViewModel(element) {
|
|
3461
3357
|
if (element.type !== "chart" || !element.chartData) {
|
|
3462
|
-
return
|
|
3358
|
+
return chunkV32F4I45_js.buildChartViewModel(element);
|
|
3463
3359
|
}
|
|
3464
3360
|
const palette = resolveReactPalette(element.chartData), themedElement = {
|
|
3465
3361
|
...element,
|
|
3466
3362
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
3467
3363
|
};
|
|
3468
|
-
return
|
|
3364
|
+
return chunkV32F4I45_js.buildChartViewModel(themedElement);
|
|
3469
3365
|
}
|
|
3470
3366
|
function renderPrimitive(prim, key) {
|
|
3471
3367
|
switch (prim.kind) {
|
|
@@ -3616,7 +3512,7 @@ function renderText(t, key) {
|
|
|
3616
3512
|
);
|
|
3617
3513
|
}
|
|
3618
3514
|
function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
3619
|
-
const legendItems =
|
|
3515
|
+
const legendItems = chunkV32F4I45_js.computeChartLegendLayout(vm);
|
|
3620
3516
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3621
3517
|
"svg",
|
|
3622
3518
|
{
|
|
@@ -3754,17 +3650,17 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3754
3650
|
}
|
|
3755
3651
|
function renderChartElement(element) {
|
|
3756
3652
|
if (element.type !== "chart") {
|
|
3757
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3653
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.chart.heading"] });
|
|
3758
3654
|
}
|
|
3759
3655
|
const chartData = element.chartData;
|
|
3760
3656
|
if (!chartData || chartData.series.length === 0) {
|
|
3761
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3657
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBRJN3ZMG_js.translationsEn["pptx.chart.heading"] });
|
|
3762
3658
|
}
|
|
3763
|
-
const kind =
|
|
3659
|
+
const kind = chunkV32F4I45_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3764
3660
|
return renderChartViewModel(
|
|
3765
3661
|
element.id,
|
|
3766
3662
|
buildReactChartViewModel(element),
|
|
3767
|
-
|
|
3663
|
+
chunkV32F4I45_js.chartPreserveAspectRatio(kind)
|
|
3768
3664
|
);
|
|
3769
3665
|
}
|
|
3770
3666
|
|
|
@@ -3784,14 +3680,14 @@ function buildNotesPdf(pages) {
|
|
|
3784
3680
|
notes: page.notes,
|
|
3785
3681
|
slideNumber: page.slideNumber
|
|
3786
3682
|
}));
|
|
3787
|
-
const bytes =
|
|
3683
|
+
const bytes = chunkV32F4I45_js.buildNotesPdfBytes(images, meta);
|
|
3788
3684
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3789
3685
|
return URL.createObjectURL(blob);
|
|
3790
3686
|
}
|
|
3791
3687
|
|
|
3792
3688
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
3793
3689
|
function buildPdfFromTiledImageData(pages) {
|
|
3794
|
-
const bytes =
|
|
3690
|
+
const bytes = chunkV32F4I45_js.buildTiledSlidesPdfBytes(pages);
|
|
3795
3691
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
3796
3692
|
return URL.createObjectURL(blob);
|
|
3797
3693
|
}
|
|
@@ -3800,7 +3696,7 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3800
3696
|
var activePreview = null;
|
|
3801
3697
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3802
3698
|
stopPreviewAnimation();
|
|
3803
|
-
const descriptor =
|
|
3699
|
+
const descriptor = chunkV32F4I45_js.buildPreviewAnimation(preset, options);
|
|
3804
3700
|
if (!descriptor) {
|
|
3805
3701
|
return;
|
|
3806
3702
|
}
|
|
@@ -3813,7 +3709,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
3813
3709
|
return;
|
|
3814
3710
|
}
|
|
3815
3711
|
const stage = domEl.offsetParent;
|
|
3816
|
-
const descriptor =
|
|
3712
|
+
const descriptor = chunkV32F4I45_js.buildMotionPathPreview({
|
|
3817
3713
|
path,
|
|
3818
3714
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
3819
3715
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|
|
@@ -3905,7 +3801,7 @@ exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle2;
|
|
|
3905
3801
|
exports.cloneHistorySnapshot = cloneHistorySnapshot2;
|
|
3906
3802
|
exports.cn = cn;
|
|
3907
3803
|
exports.getAnimationInitialStyle = getAnimationInitialStyle2;
|
|
3908
|
-
exports.getConnectorPathGeometry =
|
|
3804
|
+
exports.getConnectorPathGeometry = getConnectorPathGeometry2;
|
|
3909
3805
|
exports.getCropShapeClipPath = getCropShapeClipPath2;
|
|
3910
3806
|
exports.getDuotoneColors = getDuotoneColors;
|
|
3911
3807
|
exports.getImageRenderStyle = getImageRenderStyle;
|