pptx-react-viewer 2.12.1 → 2.13.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 +2 -0
- package/dist/{AiChatPanel-CGGUPVQX.mjs → AiChatPanel-4YS6DEIT.mjs} +3 -3
- package/dist/AiChatPanel-4YS6DEIT.mjs.br +0 -0
- package/dist/AiChatPanel-4YS6DEIT.mjs.gz +0 -0
- package/dist/{AiChatPanel-UEFYTUJN.js → AiChatPanel-DEI3EQFM.js} +22 -22
- package/dist/AiChatPanel-DEI3EQFM.js.br +0 -0
- package/dist/AiChatPanel-DEI3EQFM.js.gz +0 -0
- package/dist/{Model3DScene-TU4NTHRM.mjs → Model3DScene-JSNQCKCJ.mjs} +1 -1
- package/dist/Model3DScene-JSNQCKCJ.mjs.br +0 -0
- package/dist/Model3DScene-JSNQCKCJ.mjs.gz +0 -0
- package/dist/{Model3DScene-QYXJNALP.js → Model3DScene-X4W7GZVY.js} +2 -2
- package/dist/Model3DScene-X4W7GZVY.js.br +0 -0
- package/dist/Model3DScene-X4W7GZVY.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs → SurfaceChart3DScene-3MSU74YH.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs.br → SurfaceChart3DScene-3MSU74YH.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-3MSU74YH.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-4VCO3DRP.js → SurfaceChart3DScene-IZLUWT27.js} +2 -2
- package/dist/SurfaceChart3DScene-IZLUWT27.js.br +0 -0
- package/dist/SurfaceChart3DScene-IZLUWT27.js.gz +0 -0
- package/dist/{chunk-CABQXGPI.mjs → chunk-4TD7EINA.mjs} +770 -358
- package/dist/chunk-4TD7EINA.mjs.br +0 -0
- package/dist/chunk-4TD7EINA.mjs.gz +0 -0
- package/dist/{chunk-4GYNTY2G.mjs → chunk-6KRNQ2KF.mjs} +2 -2
- package/dist/chunk-6KRNQ2KF.mjs.br +0 -0
- package/dist/chunk-6KRNQ2KF.mjs.gz +0 -0
- package/dist/{chunk-TDUDH7S4.js → chunk-EFSQW6S5.js} +771 -357
- package/dist/chunk-EFSQW6S5.js.br +0 -0
- package/dist/chunk-EFSQW6S5.js.gz +0 -0
- package/dist/{chunk-UIWY4XJT.js → chunk-G2LZT5SV.js} +3 -3
- package/dist/chunk-G2LZT5SV.js.br +0 -0
- package/dist/chunk-G2LZT5SV.js.gz +0 -0
- package/dist/{chunk-YIPR3GKG.mjs → chunk-HRLF4REI.mjs} +34 -15
- package/dist/chunk-HRLF4REI.mjs.br +0 -0
- package/dist/chunk-HRLF4REI.mjs.gz +0 -0
- package/dist/{chunk-LE6YA5WB.js → chunk-IDW5UPXW.js} +264 -245
- package/dist/chunk-IDW5UPXW.js.br +0 -0
- package/dist/chunk-IDW5UPXW.js.gz +0 -0
- package/dist/{chunk-NUDH7TI2.js → chunk-RWIQHVZQ.js} +326 -326
- package/dist/chunk-RWIQHVZQ.js.br +0 -0
- package/dist/chunk-RWIQHVZQ.js.gz +0 -0
- package/dist/{chunk-GBKIWNW6.js → chunk-SHZ3GWOD.js} +1045 -1042
- package/dist/chunk-SHZ3GWOD.js.br +0 -0
- package/dist/chunk-SHZ3GWOD.js.gz +0 -0
- package/dist/{chunk-N3NKU7SC.mjs → chunk-WEU5EMKK.mjs} +1 -1
- package/dist/chunk-WEU5EMKK.mjs.br +0 -0
- package/dist/chunk-WEU5EMKK.mjs.gz +0 -0
- package/dist/{chunk-4SGXEGVL.mjs → chunk-YA7VFYTW.mjs} +17 -14
- package/dist/chunk-YA7VFYTW.mjs.br +0 -0
- package/dist/chunk-YA7VFYTW.mjs.gz +0 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +18 -0
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +18 -0
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-CGGUPVQX.mjs.br +0 -0
- package/dist/AiChatPanel-CGGUPVQX.mjs.gz +0 -0
- package/dist/AiChatPanel-UEFYTUJN.js.br +0 -0
- package/dist/AiChatPanel-UEFYTUJN.js.gz +0 -0
- package/dist/Model3DScene-QYXJNALP.js.br +0 -0
- package/dist/Model3DScene-QYXJNALP.js.gz +0 -0
- package/dist/Model3DScene-TU4NTHRM.mjs.br +0 -0
- package/dist/Model3DScene-TU4NTHRM.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-4VCO3DRP.js.br +0 -0
- package/dist/SurfaceChart3DScene-4VCO3DRP.js.gz +0 -0
- package/dist/SurfaceChart3DScene-VTJBKUQY.mjs.gz +0 -0
- package/dist/chunk-4GYNTY2G.mjs.br +0 -0
- package/dist/chunk-4GYNTY2G.mjs.gz +0 -0
- package/dist/chunk-4SGXEGVL.mjs.br +0 -0
- package/dist/chunk-4SGXEGVL.mjs.gz +0 -0
- package/dist/chunk-CABQXGPI.mjs.br +0 -0
- package/dist/chunk-CABQXGPI.mjs.gz +0 -0
- package/dist/chunk-GBKIWNW6.js.br +0 -0
- package/dist/chunk-GBKIWNW6.js.gz +0 -0
- package/dist/chunk-LE6YA5WB.js.br +0 -0
- package/dist/chunk-LE6YA5WB.js.gz +0 -0
- package/dist/chunk-N3NKU7SC.mjs.br +0 -0
- package/dist/chunk-N3NKU7SC.mjs.gz +0 -0
- package/dist/chunk-NUDH7TI2.js.br +0 -0
- package/dist/chunk-NUDH7TI2.js.gz +0 -0
- package/dist/chunk-TDUDH7S4.js.br +0 -0
- package/dist/chunk-TDUDH7S4.js.gz +0 -0
- package/dist/chunk-UIWY4XJT.js.br +0 -0
- package/dist/chunk-UIWY4XJT.js.gz +0 -0
- package/dist/chunk-YIPR3GKG.mjs.br +0 -0
- package/dist/chunk-YIPR3GKG.mjs.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkBXAK3JFM_js = require('./chunk-BXAK3JFM.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkEFSQW6S5_js = require('./chunk-EFSQW6S5.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React6 = require('react');
|
|
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkEFSQW6S5_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 chunkEFSQW6S5_js.cloneHistorySnapshot(snapshot);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/viewer/constants/scalar.ts
|
|
@@ -63,7 +63,7 @@ var TOOLBAR_SECTIONS = [
|
|
|
63
63
|
{ id: "view", labelKey: "pptx.ribbon.tab.view" },
|
|
64
64
|
{ id: "help", labelKey: "pptx.ribbon.tab.help" }
|
|
65
65
|
];
|
|
66
|
-
var SHORTCUT_REFERENCE_ITEMS =
|
|
66
|
+
var SHORTCUT_REFERENCE_ITEMS = chunkEFSQW6S5_js.VIEWER_SHORTCUT_REFERENCE;
|
|
67
67
|
|
|
68
68
|
// src/viewer/constants/theme.ts
|
|
69
69
|
var THEME_COLOR_SWATCHES = [
|
|
@@ -107,7 +107,7 @@ var GLYPH_COMPONENTS = {
|
|
|
107
107
|
plus: lu.LuPlus,
|
|
108
108
|
triangle: lu.LuTriangle
|
|
109
109
|
};
|
|
110
|
-
var SHAPE_PRESETS =
|
|
110
|
+
var SHAPE_PRESETS = chunkEFSQW6S5_js.SHAPE_PRESET_DEFS.map(
|
|
111
111
|
(def) => ({
|
|
112
112
|
type: def.type,
|
|
113
113
|
label: def.label,
|
|
@@ -266,7 +266,7 @@ function isConnectorOrLineElement(element) {
|
|
|
266
266
|
if (element.type === "connector") {
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
|
-
if (!
|
|
269
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
272
|
const st = getShapeType(element.shapeType);
|
|
@@ -277,12 +277,12 @@ function isConnectorOrLineElement(element) {
|
|
|
277
277
|
function partitionTemplateElements(slides) {
|
|
278
278
|
const templateElementsBySlideId = {};
|
|
279
279
|
const nextSlides = slides.map((slide) => {
|
|
280
|
-
const template = slide.elements.filter((el) =>
|
|
280
|
+
const template = slide.elements.filter((el) => chunkEFSQW6S5_js.isTemplateElement(el));
|
|
281
281
|
if (template.length === 0) {
|
|
282
282
|
return slide;
|
|
283
283
|
}
|
|
284
284
|
templateElementsBySlideId[slide.id] = template;
|
|
285
|
-
return { ...slide, elements: slide.elements.filter((el) => !
|
|
285
|
+
return { ...slide, elements: slide.elements.filter((el) => !chunkEFSQW6S5_js.isTemplateElement(el)) };
|
|
286
286
|
});
|
|
287
287
|
return { slides: nextSlides, templateElementsBySlideId };
|
|
288
288
|
}
|
|
@@ -298,7 +298,7 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
|
|
|
298
298
|
|
|
299
299
|
// src/viewer/utils/image-style.ts
|
|
300
300
|
function getImageMaskStyle(element) {
|
|
301
|
-
if (!
|
|
301
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
302
302
|
return void 0;
|
|
303
303
|
}
|
|
304
304
|
const shapeType = element.shapeType;
|
|
@@ -307,7 +307,7 @@ function getImageMaskStyle(element) {
|
|
|
307
307
|
}
|
|
308
308
|
const normalized = shapeType.toLowerCase();
|
|
309
309
|
if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
|
|
310
|
-
const radiusPx =
|
|
310
|
+
const radiusPx = chunkEFSQW6S5_js.getRoundRectRadiusPx(element);
|
|
311
311
|
if (radiusPx <= 0.01) {
|
|
312
312
|
return void 0;
|
|
313
313
|
}
|
|
@@ -319,7 +319,7 @@ function getImageMaskStyle(element) {
|
|
|
319
319
|
if (normalized === "can" || normalized === "cylinder") {
|
|
320
320
|
return { borderRadius: "48% / 12%" };
|
|
321
321
|
}
|
|
322
|
-
const clipPath =
|
|
322
|
+
const clipPath = chunkEFSQW6S5_js.getResolvedShapeClipPath(element);
|
|
323
323
|
if (!clipPath) {
|
|
324
324
|
return void 0;
|
|
325
325
|
}
|
|
@@ -328,7 +328,7 @@ function getImageMaskStyle(element) {
|
|
|
328
328
|
function getImageRenderStyle(element) {
|
|
329
329
|
return {
|
|
330
330
|
...getImageMaskStyle(element) || {},
|
|
331
|
-
...
|
|
331
|
+
...chunkEFSQW6S5_js.getImageFitStyle(element)
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
var CROP_SHAPE_CLIP_PATHS = {
|
|
@@ -341,7 +341,7 @@ var CROP_SHAPE_CLIP_PATHS = {
|
|
|
341
341
|
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
342
342
|
};
|
|
343
343
|
function getCropShapeClipPath(element) {
|
|
344
|
-
if (!
|
|
344
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element)) {
|
|
345
345
|
return void 0;
|
|
346
346
|
}
|
|
347
347
|
const shape = element.cropShape;
|
|
@@ -351,7 +351,7 @@ function getCropShapeClipPath(element) {
|
|
|
351
351
|
return CROP_SHAPE_CLIP_PATHS[shape];
|
|
352
352
|
}
|
|
353
353
|
function isImageTiled(element) {
|
|
354
|
-
if (!
|
|
354
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element)) {
|
|
355
355
|
return false;
|
|
356
356
|
}
|
|
357
357
|
return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
|
|
@@ -409,7 +409,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
function getImageTilingStyle(element) {
|
|
412
|
-
if (!
|
|
412
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element) || !isImageTiled(element)) {
|
|
413
413
|
return void 0;
|
|
414
414
|
}
|
|
415
415
|
const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
|
|
@@ -690,9 +690,9 @@ function registerMediaElement(elementId, el) {
|
|
|
690
690
|
};
|
|
691
691
|
}
|
|
692
692
|
function executeMediaCommand(command, frameRoot) {
|
|
693
|
-
return
|
|
693
|
+
return chunkEFSQW6S5_js.runMediaCommand(
|
|
694
694
|
command,
|
|
695
|
-
(targetId) => registry.get(targetId) ??
|
|
695
|
+
(targetId) => registry.get(targetId) ?? chunkEFSQW6S5_js.findMediaElementByElementId(targetId, frameRoot?.())
|
|
696
696
|
);
|
|
697
697
|
}
|
|
698
698
|
function PresentationMediaController({
|
|
@@ -731,7 +731,7 @@ function PresentationMediaController({
|
|
|
731
731
|
}
|
|
732
732
|
return registerMediaElement(element.id, el);
|
|
733
733
|
}, [element.id]);
|
|
734
|
-
const { volume: playbackVolume, playbackRate } =
|
|
734
|
+
const { volume: playbackVolume, playbackRate } = chunkEFSQW6S5_js.mediaPlaybackAttributes({
|
|
735
735
|
loop: element.loop,
|
|
736
736
|
volume: element.volume,
|
|
737
737
|
playbackSpeed: element.playbackSpeed
|
|
@@ -938,7 +938,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
938
938
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
939
939
|
const trimFragment = buildTrimFragment(element);
|
|
940
940
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
941
|
-
const shouldLoop =
|
|
941
|
+
const shouldLoop = chunkEFSQW6S5_js.mediaPlaybackAttributes(element).loop;
|
|
942
942
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
943
943
|
const isFullScreen = options?.fullScreen === true;
|
|
944
944
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -1113,7 +1113,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1113
1113
|
|
|
1114
1114
|
// src/viewer/utils/text-utils.tsx
|
|
1115
1115
|
function getTextStyleForElement(element, fallbackColor) {
|
|
1116
|
-
return
|
|
1116
|
+
return chunkEFSQW6S5_js.buildTextBlockStyle(element, { fallbackColor });
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
1119
|
// src/viewer/utils/text-layout.tsx
|
|
@@ -1138,13 +1138,13 @@ function computeTabSize(tabStops, defaultTabSize) {
|
|
|
1138
1138
|
return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
|
|
1139
1139
|
}
|
|
1140
1140
|
function getTextLayoutStyle(element) {
|
|
1141
|
-
if (!
|
|
1141
|
+
if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
|
|
1142
1142
|
return {};
|
|
1143
1143
|
}
|
|
1144
1144
|
const verticalAlign = element.textStyle?.vAlign || "top";
|
|
1145
|
-
const writingMode =
|
|
1146
|
-
const textOrientation =
|
|
1147
|
-
const verticalDirection =
|
|
1145
|
+
const writingMode = chunkEFSQW6S5_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
1146
|
+
const textOrientation = chunkEFSQW6S5_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
1147
|
+
const verticalDirection = chunkEFSQW6S5_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
1148
1148
|
const parsedColumnCount = Number(element.textStyle?.columnCount);
|
|
1149
1149
|
const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
|
|
1150
1150
|
const hasColumns = columnCount > 1;
|
|
@@ -1152,7 +1152,7 @@ function getTextLayoutStyle(element) {
|
|
|
1152
1152
|
const tabStops = element.textStyle?.tabStops;
|
|
1153
1153
|
const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
|
|
1154
1154
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
1155
|
-
const hasParagraphIndents =
|
|
1155
|
+
const hasParagraphIndents = chunkEFSQW6S5_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
1156
1156
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
1157
1157
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
1158
1158
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -1161,7 +1161,7 @@ function getTextLayoutStyle(element) {
|
|
|
1161
1161
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
1162
1162
|
const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
|
|
1163
1163
|
const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
|
|
1164
|
-
const kinsokuStyles =
|
|
1164
|
+
const kinsokuStyles = chunkEFSQW6S5_js.getKinsokuLineBreakStyles(element.textStyle);
|
|
1165
1165
|
if (hasColumns) {
|
|
1166
1166
|
return {
|
|
1167
1167
|
display: "block",
|
|
@@ -1208,10 +1208,10 @@ function getTextLayoutStyle(element) {
|
|
|
1208
1208
|
|
|
1209
1209
|
// src/viewer/utils/text-effects.tsx
|
|
1210
1210
|
function buildTextFillCss2(style) {
|
|
1211
|
-
return
|
|
1211
|
+
return chunkEFSQW6S5_js.buildTextFillCss(style);
|
|
1212
1212
|
}
|
|
1213
1213
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
1214
|
-
return
|
|
1214
|
+
return chunkEFSQW6S5_js.buildTextBody3DSceneStyle(textStyle);
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
1217
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1396,13 +1396,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1396
1396
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1397
1397
|
return renderedSegments;
|
|
1398
1398
|
}
|
|
1399
|
-
const paraKey = `${elementId}${
|
|
1399
|
+
const paraKey = `${elementId}${chunkEFSQW6S5_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1400
1400
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1401
1401
|
if (paraState) {
|
|
1402
1402
|
const style = buildAnimStyle(paraState);
|
|
1403
1403
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1404
1404
|
}
|
|
1405
|
-
const spec =
|
|
1405
|
+
const spec = chunkEFSQW6S5_js.buildTextBuildSpec(
|
|
1406
1406
|
elementId,
|
|
1407
1407
|
paraIndex,
|
|
1408
1408
|
paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
|
|
@@ -1420,7 +1420,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1420
1420
|
"span",
|
|
1421
1421
|
{
|
|
1422
1422
|
"data-anim-id": span.animId,
|
|
1423
|
-
style:
|
|
1423
|
+
style: chunkEFSQW6S5_js.textBuildSpanStyle(span),
|
|
1424
1424
|
children: content
|
|
1425
1425
|
},
|
|
1426
1426
|
span.animId
|
|
@@ -1564,10 +1564,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1564
1564
|
if (!needsScriptFonts || !text) {
|
|
1565
1565
|
return text;
|
|
1566
1566
|
}
|
|
1567
|
-
const runs =
|
|
1567
|
+
const runs = chunkEFSQW6S5_js.segmentByScript(text);
|
|
1568
1568
|
if (runs.length <= 1) {
|
|
1569
1569
|
if (runs.length === 1) {
|
|
1570
|
-
const font =
|
|
1570
|
+
const font = chunkEFSQW6S5_js.resolveFontForScript(runs[0].script, scriptFonts);
|
|
1571
1571
|
if (font && font !== baseFontFamily) {
|
|
1572
1572
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
|
|
1573
1573
|
}
|
|
@@ -1575,7 +1575,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1575
1575
|
return text;
|
|
1576
1576
|
}
|
|
1577
1577
|
return runs.map((run, i) => {
|
|
1578
|
-
const font =
|
|
1578
|
+
const font = chunkEFSQW6S5_js.resolveFontForScript(run.script, scriptFonts);
|
|
1579
1579
|
if (!font || font === baseFontFamily) {
|
|
1580
1580
|
return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
|
|
1581
1581
|
}
|
|
@@ -1647,8 +1647,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1647
1647
|
);
|
|
1648
1648
|
}
|
|
1649
1649
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1650
|
-
const mathml =
|
|
1651
|
-
const safeMathml = mathml ?
|
|
1650
|
+
const mathml = chunkEFSQW6S5_js.convertOmmlToMathMl(equationXml);
|
|
1651
|
+
const safeMathml = mathml ? chunkEFSQW6S5_js.sanitizeMathMl(mathml) : "";
|
|
1652
1652
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1653
1653
|
"span",
|
|
1654
1654
|
{
|
|
@@ -1698,7 +1698,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1698
1698
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
|
|
1699
1699
|
}
|
|
1700
1700
|
function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
|
|
1701
|
-
const picture =
|
|
1701
|
+
const picture = chunkEFSQW6S5_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
|
|
1702
1702
|
sizePx: baseFontSize,
|
|
1703
1703
|
fallbackMarker: "\u2022",
|
|
1704
1704
|
accessibleLabel: "Bullet"
|
|
@@ -1749,7 +1749,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1749
1749
|
}
|
|
1750
1750
|
const segmentStyle = segment.style || {};
|
|
1751
1751
|
const rawText = bulletInfo && typeof bulletHangPx === "number" ? (segment.text || "").trimEnd() : segment.text || "";
|
|
1752
|
-
const textValue =
|
|
1752
|
+
const textValue = chunkEFSQW6S5_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
|
|
1753
1753
|
const lines = textValue.split("\n");
|
|
1754
1754
|
const textDecorationTokens = [];
|
|
1755
1755
|
if (segmentStyle.underline || segmentStyle.hyperlink) {
|
|
@@ -1759,8 +1759,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1759
1759
|
textDecorationTokens.push("line-through");
|
|
1760
1760
|
}
|
|
1761
1761
|
const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
|
|
1762
|
-
const resolvedSegmentColor = segmentStyle.hyperlink ?
|
|
1763
|
-
const underlineDecoration =
|
|
1762
|
+
const resolvedSegmentColor = segmentStyle.hyperlink ? chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
|
|
1763
|
+
const underlineDecoration = chunkEFSQW6S5_js.resolveUnderlineDecorationStyle(
|
|
1764
1764
|
Boolean(isDoubleStrike),
|
|
1765
1765
|
segmentStyle.underlineStyle
|
|
1766
1766
|
);
|
|
@@ -1770,20 +1770,33 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1770
1770
|
const letterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? `${segmentStyle.characterSpacing / 100 * (96 / 72)}px` : void 0;
|
|
1771
1771
|
const textFillStyles = buildTextFillCss2(segmentStyle);
|
|
1772
1772
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1773
|
-
const autoFitScale =
|
|
1773
|
+
const autoFitScale = chunkEFSQW6S5_js.resolveAutoFitFontScale(element.textStyle);
|
|
1774
1774
|
const baseFontSize = rawFontSize * autoFitScale;
|
|
1775
1775
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1776
1776
|
const baseFontSizePt = baseFontSize * (72 / 96);
|
|
1777
1777
|
const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
|
|
1778
1778
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1779
|
-
const baseFontFamily = rawFontFamily ?
|
|
1779
|
+
const baseFontFamily = rawFontFamily ? chunkEFSQW6S5_js.getSubstituteFontFamily(
|
|
1780
|
+
rawFontFamily,
|
|
1781
|
+
chunkEFSQW6S5_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1782
|
+
) : DEFAULT_FONT_FAMILY;
|
|
1783
|
+
const scriptFont = (name, panose) => name ? chunkEFSQW6S5_js.getSubstituteFontFamily(name, chunkEFSQW6S5_js.parsePanoseString(panose)) : baseFontFamily;
|
|
1780
1784
|
const scriptFonts = {
|
|
1781
1785
|
latin: baseFontFamily,
|
|
1782
|
-
eastAsia:
|
|
1783
|
-
|
|
1784
|
-
|
|
1786
|
+
eastAsia: scriptFont(
|
|
1787
|
+
segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont,
|
|
1788
|
+
segmentStyle.eastAsiaFontPanose ?? element.textStyle?.eastAsiaFontPanose
|
|
1789
|
+
),
|
|
1790
|
+
complexScript: scriptFont(
|
|
1791
|
+
segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont,
|
|
1792
|
+
segmentStyle.complexScriptFontPanose ?? element.textStyle?.complexScriptFontPanose
|
|
1793
|
+
),
|
|
1794
|
+
symbol: scriptFont(
|
|
1795
|
+
segmentStyle.symbolFont || element.textStyle?.symbolFont,
|
|
1796
|
+
segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
|
|
1797
|
+
)
|
|
1785
1798
|
};
|
|
1786
|
-
const needsScriptFonts =
|
|
1799
|
+
const needsScriptFonts = chunkEFSQW6S5_js.hasDistinctScriptFonts(scriptFonts);
|
|
1787
1800
|
const spanStyle = {
|
|
1788
1801
|
color: resolvedSegmentColor,
|
|
1789
1802
|
fontSize: baseFontSize * baselineFontScale,
|
|
@@ -1801,15 +1814,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1801
1814
|
fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
|
|
1802
1815
|
letterSpacing,
|
|
1803
1816
|
fontKerning,
|
|
1804
|
-
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ?
|
|
1817
|
+
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
|
|
1805
1818
|
...textFillStyles,
|
|
1806
|
-
textDecorationColor: segmentStyle.underlineColor ?
|
|
1807
|
-
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${
|
|
1819
|
+
textDecorationColor: segmentStyle.underlineColor ? chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
|
|
1820
|
+
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
|
|
1808
1821
|
paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
|
|
1809
|
-
textShadow:
|
|
1810
|
-
filter:
|
|
1811
|
-
opacity:
|
|
1812
|
-
WebkitBoxReflect:
|
|
1822
|
+
textShadow: chunkEFSQW6S5_js.buildTextShadowCss(segmentStyle),
|
|
1823
|
+
filter: chunkEFSQW6S5_js.buildTextRunFilterChain(segmentStyle),
|
|
1824
|
+
opacity: chunkEFSQW6S5_js.getTextAlphaOpacity(segmentStyle),
|
|
1825
|
+
WebkitBoxReflect: chunkEFSQW6S5_js.buildTextReflectionCss(segmentStyle)
|
|
1813
1826
|
};
|
|
1814
1827
|
const runRtl = segmentStyle.rtl;
|
|
1815
1828
|
if (runRtl !== void 0 && runRtl !== paragraphRtl) {
|
|
@@ -1829,7 +1842,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1829
1842
|
spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
|
|
1830
1843
|
}
|
|
1831
1844
|
if (bulletInfo.color) {
|
|
1832
|
-
spanStyle.color =
|
|
1845
|
+
spanStyle.color = chunkEFSQW6S5_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
|
|
1833
1846
|
}
|
|
1834
1847
|
if (typeof bulletHangPx === "number" && bulletHangPx > 0) {
|
|
1835
1848
|
spanStyle.display = "inline-block";
|
|
@@ -1874,7 +1887,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1874
1887
|
textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
|
|
1875
1888
|
};
|
|
1876
1889
|
if (segment.rubyStyle?.color) {
|
|
1877
|
-
rubyStyle.color =
|
|
1890
|
+
rubyStyle.color = chunkEFSQW6S5_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
|
|
1878
1891
|
}
|
|
1879
1892
|
innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
|
|
1880
1893
|
baseContent,
|
|
@@ -1969,7 +1982,7 @@ function groupSegmentsIntoParagraphs(segments) {
|
|
|
1969
1982
|
return paragraphs;
|
|
1970
1983
|
}
|
|
1971
1984
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
1972
|
-
if (!
|
|
1985
|
+
if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
|
|
1973
1986
|
return emptyFallback || null;
|
|
1974
1987
|
}
|
|
1975
1988
|
const effectiveSegments = segmentOverrides ?? element.textSegments;
|
|
@@ -1990,10 +2003,10 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1990
2003
|
return element.text || emptyFallback || "";
|
|
1991
2004
|
}
|
|
1992
2005
|
const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
|
|
1993
|
-
const paragraphIndents =
|
|
1994
|
-
const elementRtl =
|
|
1995
|
-
const elementAlign =
|
|
1996
|
-
const bodyStyle =
|
|
2006
|
+
const paragraphIndents = chunkEFSQW6S5_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
|
|
2007
|
+
const elementRtl = chunkEFSQW6S5_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
|
|
2008
|
+
const elementAlign = chunkEFSQW6S5_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
|
|
2009
|
+
const bodyStyle = chunkEFSQW6S5_js.hasTextProperties(element) ? element.textStyle : void 0;
|
|
1997
2010
|
const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
|
|
1998
2011
|
return paragraphs.map(({ entries: paraSegments, terminator }, paraIndex) => {
|
|
1999
2012
|
const paraIndent = paragraphIndents?.[paraIndex];
|
|
@@ -2008,14 +2021,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2008
2021
|
return Boolean(segment.text) && segment.text.trim().length > 0;
|
|
2009
2022
|
});
|
|
2010
2023
|
const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
|
|
2011
|
-
const paraRtl =
|
|
2024
|
+
const paraRtl = chunkEFSQW6S5_js.resolveParagraphRtl(paraSegments, elementRtl);
|
|
2012
2025
|
const isRtlParagraph = paraRtl === true;
|
|
2013
|
-
const paraAlign =
|
|
2014
|
-
const cssTextAlign =
|
|
2026
|
+
const paraAlign = chunkEFSQW6S5_js.resolveParagraphAlign(paraSegments, elementAlign);
|
|
2027
|
+
const cssTextAlign = chunkEFSQW6S5_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
|
|
2015
2028
|
const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
|
|
2016
2029
|
const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
|
|
2017
2030
|
const paraTextIndent = rawTextIndent;
|
|
2018
|
-
const paraKinsokuStyle =
|
|
2031
|
+
const paraKinsokuStyle = chunkEFSQW6S5_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
|
|
2019
2032
|
const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
|
|
2020
2033
|
const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties ?? (paraSegments.length === 0 ? terminator?.paragraphProperties : void 0);
|
|
2021
2034
|
const spacing = resolveParagraphSpacing({
|
|
@@ -2025,7 +2038,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2025
2038
|
isLast: paraIndex === paragraphs.length - 1,
|
|
2026
2039
|
spaceFirstLast
|
|
2027
2040
|
});
|
|
2028
|
-
const strutFontSize =
|
|
2041
|
+
const strutFontSize = chunkEFSQW6S5_js.resolveParagraphStrutFontSize(
|
|
2029
2042
|
paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
|
|
2030
2043
|
bodyStyle?.fontSize
|
|
2031
2044
|
);
|
|
@@ -2129,13 +2142,13 @@ function hexToRgbUnit(hex) {
|
|
|
2129
2142
|
};
|
|
2130
2143
|
}
|
|
2131
2144
|
function getDuotoneColors(element) {
|
|
2132
|
-
if (!
|
|
2145
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element)) {
|
|
2133
2146
|
return void 0;
|
|
2134
2147
|
}
|
|
2135
2148
|
return element.imageEffects?.duotone;
|
|
2136
2149
|
}
|
|
2137
2150
|
function buildLineShadowCss(element) {
|
|
2138
|
-
if (!
|
|
2151
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2139
2152
|
return void 0;
|
|
2140
2153
|
}
|
|
2141
2154
|
const ss = element.shapeStyle;
|
|
@@ -2146,13 +2159,13 @@ function buildLineShadowCss(element) {
|
|
|
2146
2159
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
2147
2160
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
2148
2161
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
2149
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
2150
|
-
|
|
2162
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkEFSQW6S5_js.colorWithOpacity(
|
|
2163
|
+
chunkEFSQW6S5_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
2151
2164
|
opacity
|
|
2152
2165
|
)}`;
|
|
2153
2166
|
}
|
|
2154
2167
|
function buildLineGlowFilter(element) {
|
|
2155
|
-
if (!
|
|
2168
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2156
2169
|
return void 0;
|
|
2157
2170
|
}
|
|
2158
2171
|
const ss = element.shapeStyle;
|
|
@@ -2161,7 +2174,7 @@ function buildLineGlowFilter(element) {
|
|
|
2161
2174
|
}
|
|
2162
2175
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
2163
2176
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
2164
|
-
const glowCol =
|
|
2177
|
+
const glowCol = chunkEFSQW6S5_js.colorWithOpacity(chunkEFSQW6S5_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
2165
2178
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
2166
2179
|
}
|
|
2167
2180
|
function mapDagBlendModeToCss(blend) {
|
|
@@ -2185,7 +2198,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
2185
2198
|
return `dag-duotone-${elementId}`;
|
|
2186
2199
|
}
|
|
2187
2200
|
function hasDagDuotoneEffect(element) {
|
|
2188
|
-
if (!
|
|
2201
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2189
2202
|
return false;
|
|
2190
2203
|
}
|
|
2191
2204
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -2248,7 +2261,7 @@ function getRoundRectRadiusPx2(element) {
|
|
|
2248
2261
|
|
|
2249
2262
|
// src/viewer/utils/shape-visual-3d.ts
|
|
2250
2263
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
2251
|
-
return
|
|
2264
|
+
return chunkEFSQW6S5_js.build3DExtrusionData(
|
|
2252
2265
|
shape3d,
|
|
2253
2266
|
scene3d,
|
|
2254
2267
|
fillColor,
|
|
@@ -2257,7 +2270,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
2257
2270
|
);
|
|
2258
2271
|
}
|
|
2259
2272
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
2260
|
-
|
|
2273
|
+
chunkEFSQW6S5_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
2261
2274
|
}
|
|
2262
2275
|
|
|
2263
2276
|
// src/viewer/utils/vector-subpath-paint.ts
|
|
@@ -2266,7 +2279,7 @@ function toHexByte(value) {
|
|
|
2266
2279
|
return clamped.toString(16).padStart(2, "0");
|
|
2267
2280
|
}
|
|
2268
2281
|
function shiftHex(hex, factor, towardsWhite) {
|
|
2269
|
-
const channels =
|
|
2282
|
+
const channels = chunkEFSQW6S5_js.hexToRgbChannels(hex);
|
|
2270
2283
|
if (!channels) {
|
|
2271
2284
|
return hex;
|
|
2272
2285
|
}
|
|
@@ -2292,13 +2305,13 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
|
|
|
2292
2305
|
const fillOff = subpath.fillMode === "none" || !hasFill;
|
|
2293
2306
|
return {
|
|
2294
2307
|
d: subpath.d,
|
|
2295
|
-
fill: fillOff ? "none" :
|
|
2308
|
+
fill: fillOff ? "none" : chunkEFSQW6S5_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
|
|
2296
2309
|
stroked: subpath.stroke !== false
|
|
2297
2310
|
};
|
|
2298
2311
|
});
|
|
2299
2312
|
}
|
|
2300
2313
|
function getStrokeOnlyPresetPaths(element) {
|
|
2301
|
-
if (element.type !== "shape" || !
|
|
2314
|
+
if (element.type !== "shape" || !chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2302
2315
|
return void 0;
|
|
2303
2316
|
}
|
|
2304
2317
|
const shapeType = element.shapeType;
|
|
@@ -2308,7 +2321,7 @@ function getStrokeOnlyPresetPaths(element) {
|
|
|
2308
2321
|
if (element.pathData) {
|
|
2309
2322
|
return void 0;
|
|
2310
2323
|
}
|
|
2311
|
-
const result =
|
|
2324
|
+
const result = chunkEFSQW6S5_js.evaluatePresetShape(
|
|
2312
2325
|
shapeType,
|
|
2313
2326
|
Math.max(element.width, 1),
|
|
2314
2327
|
Math.max(element.height, 1),
|
|
@@ -2326,43 +2339,43 @@ function getGradientTilingCss(style) {
|
|
|
2326
2339
|
if (!style || style.fillMode !== "gradient") {
|
|
2327
2340
|
return void 0;
|
|
2328
2341
|
}
|
|
2329
|
-
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" &&
|
|
2342
|
+
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunkEFSQW6S5_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
|
|
2330
2343
|
if (isStructuredLinear) {
|
|
2331
|
-
const flip =
|
|
2344
|
+
const flip = chunkEFSQW6S5_js.getGradientTileFlipCss(style.fillGradientFlip);
|
|
2332
2345
|
if (flip) {
|
|
2333
2346
|
return flip;
|
|
2334
2347
|
}
|
|
2335
2348
|
}
|
|
2336
|
-
return
|
|
2349
|
+
return chunkEFSQW6S5_js.getGradientTileRectCss(style.fillGradientTileRect);
|
|
2337
2350
|
}
|
|
2338
2351
|
function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2339
|
-
if (!
|
|
2352
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2340
2353
|
return {};
|
|
2341
2354
|
}
|
|
2342
2355
|
const normalizedShapeType = getShapeType(element.shapeType);
|
|
2343
|
-
const clipPath =
|
|
2356
|
+
const clipPath = chunkEFSQW6S5_js.getResolvedShapeClipPath(element);
|
|
2344
2357
|
const rendersCustomVectorPath = (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;
|
|
2345
2358
|
const rendersStrokeOnlyPreset = Boolean(getStrokeOnlyPresetPaths(element));
|
|
2346
2359
|
const fillOpacity = element.shapeStyle?.fillOpacity;
|
|
2347
2360
|
const strokeOpacity = element.shapeStyle?.strokeOpacity;
|
|
2348
|
-
const strokeDash =
|
|
2349
|
-
const fillGradient =
|
|
2361
|
+
const strokeDash = chunkEFSQW6S5_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2362
|
+
const fillGradient = chunkEFSQW6S5_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
|
|
2350
2363
|
rotation: element.rotation,
|
|
2351
2364
|
width: element.width,
|
|
2352
2365
|
height: element.height
|
|
2353
2366
|
}) || element.shapeStyle?.fillGradient;
|
|
2354
|
-
const shadowCss =
|
|
2355
|
-
const innerShadowCss =
|
|
2356
|
-
const resolvedFillColor =
|
|
2357
|
-
const resolvedStrokeColor =
|
|
2367
|
+
const shadowCss = chunkEFSQW6S5_js.buildShadowCssFromShapeStyle(element.shapeStyle);
|
|
2368
|
+
const innerShadowCss = chunkEFSQW6S5_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
|
|
2369
|
+
const resolvedFillColor = chunkEFSQW6S5_js.colorWithOpacity(fillColor, fillOpacity);
|
|
2370
|
+
const resolvedStrokeColor = chunkEFSQW6S5_js.colorWithOpacity(strokeColor, strokeOpacity);
|
|
2358
2371
|
const ss = element.shapeStyle;
|
|
2359
2372
|
const gradientTiling = getGradientTilingCss(ss);
|
|
2360
|
-
const paintsGradientOutline =
|
|
2373
|
+
const paintsGradientOutline = chunkEFSQW6S5_js.suppressesCssBorder(element);
|
|
2361
2374
|
const hasFillOverlayColor = Boolean(
|
|
2362
2375
|
ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
|
|
2363
2376
|
);
|
|
2364
2377
|
const combinedShadowParts = [];
|
|
2365
|
-
const multiLayerShadow =
|
|
2378
|
+
const multiLayerShadow = chunkEFSQW6S5_js.buildMultiLayerShadowCss(element.shapeStyle);
|
|
2366
2379
|
if (multiLayerShadow) {
|
|
2367
2380
|
combinedShadowParts.push(multiLayerShadow);
|
|
2368
2381
|
} else if (shadowCss) {
|
|
@@ -2371,7 +2384,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2371
2384
|
if (innerShadowCss) {
|
|
2372
2385
|
combinedShadowParts.push(innerShadowCss);
|
|
2373
2386
|
}
|
|
2374
|
-
const glowBoxShadow =
|
|
2387
|
+
const glowBoxShadow = chunkEFSQW6S5_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
|
|
2375
2388
|
if (glowBoxShadow) {
|
|
2376
2389
|
combinedShadowParts.push(glowBoxShadow);
|
|
2377
2390
|
}
|
|
@@ -2379,7 +2392,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2379
2392
|
if (lineShadow) {
|
|
2380
2393
|
combinedShadowParts.push(lineShadow);
|
|
2381
2394
|
}
|
|
2382
|
-
const compoundLineShadow =
|
|
2395
|
+
const compoundLineShadow = chunkEFSQW6S5_js.getCompoundLineBoxShadow(
|
|
2383
2396
|
element.shapeStyle?.compoundLine,
|
|
2384
2397
|
strokeWidth,
|
|
2385
2398
|
resolvedStrokeColor
|
|
@@ -2392,11 +2405,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2392
2405
|
if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
|
|
2393
2406
|
const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
|
|
2394
2407
|
const glowRad = Math.round(Math.max(0, ss.glowRadius));
|
|
2395
|
-
const glowCol =
|
|
2408
|
+
const glowCol = chunkEFSQW6S5_js.colorWithOpacity(chunkEFSQW6S5_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
|
|
2396
2409
|
filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
|
|
2397
2410
|
}
|
|
2398
2411
|
if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
|
|
2399
|
-
filterParts.push(`url(#${
|
|
2412
|
+
filterParts.push(`url(#${chunkEFSQW6S5_js.getSoftEdgeFilterId(element.id)})`);
|
|
2400
2413
|
}
|
|
2401
2414
|
if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
|
|
2402
2415
|
filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
|
|
@@ -2405,13 +2418,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2405
2418
|
if (lineGlowCss) {
|
|
2406
2419
|
filterParts.push(lineGlowCss);
|
|
2407
2420
|
}
|
|
2408
|
-
const dagFilter =
|
|
2421
|
+
const dagFilter = chunkEFSQW6S5_js.getEffectDagFilter(ss, element.id);
|
|
2409
2422
|
if (dagFilter) {
|
|
2410
2423
|
filterParts.push(dagFilter);
|
|
2411
2424
|
}
|
|
2412
2425
|
const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
|
|
2413
2426
|
const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
|
|
2414
|
-
const patternFill =
|
|
2427
|
+
const patternFill = chunkEFSQW6S5_js.buildPatternFillCss(element.shapeStyle);
|
|
2415
2428
|
const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
|
|
2416
2429
|
const imageFillMode = ss?.fillImageMode || "stretch";
|
|
2417
2430
|
let reflectCss;
|
|
@@ -2423,7 +2436,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2423
2436
|
const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
|
|
2424
2437
|
const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
|
|
2425
2438
|
const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
|
|
2426
|
-
reflectCss =
|
|
2439
|
+
reflectCss = chunkEFSQW6S5_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
|
|
2427
2440
|
}
|
|
2428
2441
|
}
|
|
2429
2442
|
const base = {
|
|
@@ -2469,9 +2482,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2469
2482
|
// path following the shape's geometry, because a CSS border can only take
|
|
2470
2483
|
// one colour. Keeping the border too would draw the parser's averaged
|
|
2471
2484
|
// solid underneath the gradient.
|
|
2472
|
-
borderWidth: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2485
|
+
borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunkEFSQW6S5_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
|
|
2473
2486
|
borderColor: strokeWidth > 0 && !paintsGradientOutline ? resolvedStrokeColor : void 0,
|
|
2474
|
-
borderStyle: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2487
|
+
borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunkEFSQW6S5_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
|
|
2475
2488
|
strokeLinejoin: lineJoinCss,
|
|
2476
2489
|
strokeMiterlimit: miterLimitCss,
|
|
2477
2490
|
strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
|
|
@@ -2527,7 +2540,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2527
2540
|
borderWidth: 0,
|
|
2528
2541
|
borderTopWidth: Math.max(strokeWidth, 2),
|
|
2529
2542
|
borderTopColor: resolvedStrokeColor,
|
|
2530
|
-
borderTopStyle:
|
|
2543
|
+
borderTopStyle: chunkEFSQW6S5_js.getCssBorderDashStyle(strokeDash)
|
|
2531
2544
|
};
|
|
2532
2545
|
}
|
|
2533
2546
|
if (normalizedShapeType === "cylinder") {
|
|
@@ -2541,17 +2554,17 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2541
2554
|
function getConnectorAdjustment(element, key, fallback) {
|
|
2542
2555
|
const direct = element.shapeAdjustments?.[key];
|
|
2543
2556
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
2544
|
-
return
|
|
2557
|
+
return chunkEFSQW6S5_js.clampUnitInterval(direct / 1e5);
|
|
2545
2558
|
}
|
|
2546
2559
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
2547
2560
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
2548
|
-
return
|
|
2561
|
+
return chunkEFSQW6S5_js.clampUnitInterval(fallbackKey / 1e5);
|
|
2549
2562
|
}
|
|
2550
|
-
return
|
|
2563
|
+
return chunkEFSQW6S5_js.clampUnitInterval(fallback);
|
|
2551
2564
|
}
|
|
2552
2565
|
function getConnectorPathGeometry(element) {
|
|
2553
|
-
const width = Math.max(element.width,
|
|
2554
|
-
const height = Math.max(element.height,
|
|
2566
|
+
const width = Math.max(element.width, 0);
|
|
2567
|
+
const height = Math.max(element.height, 0);
|
|
2555
2568
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2556
2569
|
const mapX = (value) => value;
|
|
2557
2570
|
const mapY = (value) => value;
|
|
@@ -2684,11 +2697,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
2684
2697
|
strokePaint,
|
|
2685
2698
|
strokeWidth,
|
|
2686
2699
|
dashArray,
|
|
2687
|
-
lineCap:
|
|
2700
|
+
lineCap: chunkEFSQW6S5_js.svgLineCap(shapeStyle?.lineCap),
|
|
2688
2701
|
lineJoin,
|
|
2689
2702
|
miterLimit,
|
|
2690
|
-
offsets:
|
|
2691
|
-
widths:
|
|
2703
|
+
offsets: chunkEFSQW6S5_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
2704
|
+
widths: chunkEFSQW6S5_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
2692
2705
|
};
|
|
2693
2706
|
}
|
|
2694
2707
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2736,9 +2749,9 @@ function gradientDefs(gradient) {
|
|
|
2736
2749
|
}
|
|
2737
2750
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2738
2751
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2739
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2752
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkEFSQW6S5_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2740
2753
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2741
|
-
const gradientPaint = gradient ?
|
|
2754
|
+
const gradientPaint = gradient ? chunkEFSQW6S5_js.svgGradientFillRef(gradient) : void 0;
|
|
2742
2755
|
const nodes = [];
|
|
2743
2756
|
if (subpaths && needsPerSubpath) {
|
|
2744
2757
|
const paints = buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
@@ -2770,7 +2783,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2770
2783
|
"path",
|
|
2771
2784
|
{
|
|
2772
2785
|
d: pathData,
|
|
2773
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2786
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkEFSQW6S5_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2774
2787
|
stroke: "none",
|
|
2775
2788
|
vectorEffect: "non-scaling-stroke"
|
|
2776
2789
|
},
|
|
@@ -2815,14 +2828,14 @@ function renderStrokeOnlyPreset(presetPaths, width, height, shapeStyle, strokePa
|
|
|
2815
2828
|
);
|
|
2816
2829
|
}
|
|
2817
2830
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2818
|
-
if (!
|
|
2831
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2819
2832
|
return null;
|
|
2820
2833
|
}
|
|
2821
2834
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2822
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2823
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2824
|
-
const dashType =
|
|
2825
|
-
const dashArray =
|
|
2835
|
+
const fillPaint = animatesFill ? "inherit" : chunkEFSQW6S5_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2836
|
+
const strokePaint = animatesStroke ? "inherit" : chunkEFSQW6S5_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2837
|
+
const dashType = chunkEFSQW6S5_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2838
|
+
const dashArray = chunkEFSQW6S5_js.getSvgStrokeDasharray(
|
|
2826
2839
|
dashType,
|
|
2827
2840
|
Math.max(strokeWidth, 1),
|
|
2828
2841
|
element.shapeStyle?.customDashSegments
|
|
@@ -2903,21 +2916,21 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2903
2916
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2904
2917
|
// without this the shape fell back to the parser's representative solid
|
|
2905
2918
|
// and lost every fade (issue #132).
|
|
2906
|
-
|
|
2919
|
+
chunkEFSQW6S5_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2907
2920
|
);
|
|
2908
2921
|
}
|
|
2909
|
-
if (
|
|
2922
|
+
if (chunkEFSQW6S5_js.isCalloutShape(normalizedType)) {
|
|
2910
2923
|
const width = Math.max(element.width, 1);
|
|
2911
2924
|
const height = Math.max(element.height, 1);
|
|
2912
|
-
const geometry =
|
|
2925
|
+
const geometry = chunkEFSQW6S5_js.getCalloutLeaderLineGeometry(
|
|
2913
2926
|
normalizedType,
|
|
2914
2927
|
width,
|
|
2915
2928
|
height,
|
|
2916
2929
|
element.shapeAdjustments
|
|
2917
2930
|
);
|
|
2918
2931
|
if (geometry && geometry.points.length >= 2) {
|
|
2919
|
-
const leaderPath =
|
|
2920
|
-
const bounds =
|
|
2932
|
+
const leaderPath = chunkEFSQW6S5_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2933
|
+
const bounds = chunkEFSQW6S5_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2921
2934
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2922
2935
|
const offsetLeft = bounds.minX;
|
|
2923
2936
|
const offsetTop = bounds.minY;
|
|
@@ -2980,10 +2993,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2980
2993
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2981
2994
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2982
2995
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2983
|
-
const connectorLineCap =
|
|
2996
|
+
const connectorLineCap = chunkEFSQW6S5_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2984
2997
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2985
|
-
const offsets =
|
|
2986
|
-
const widths =
|
|
2998
|
+
const offsets = chunkEFSQW6S5_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2999
|
+
const widths = chunkEFSQW6S5_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2987
3000
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2988
3001
|
"svg",
|
|
2989
3002
|
{
|
|
@@ -3062,15 +3075,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
3062
3075
|
}
|
|
3063
3076
|
const parsed = stops.map((gs) => {
|
|
3064
3077
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
3065
|
-
const color =
|
|
3066
|
-
const opacity =
|
|
3067
|
-
return { pos, color:
|
|
3078
|
+
const color = chunkEFSQW6S5_js.parseDrawingColor(gs) ?? "#888888";
|
|
3079
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(gs);
|
|
3080
|
+
return { pos, color: chunkEFSQW6S5_js.colorWithOpacity(color, opacity) };
|
|
3068
3081
|
}).sort((a, b) => a.pos - b.pos);
|
|
3069
3082
|
const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
|
|
3070
3083
|
const lin = gradFill["a:lin"];
|
|
3071
3084
|
if (lin) {
|
|
3072
3085
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
3073
|
-
const angleDeg = Math.round(
|
|
3086
|
+
const angleDeg = Math.round(chunkEFSQW6S5_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
3074
3087
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
3075
3088
|
}
|
|
3076
3089
|
const path = gradFill["a:path"];
|
|
@@ -3105,8 +3118,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
3105
3118
|
if (!pattFill) {
|
|
3106
3119
|
return void 0;
|
|
3107
3120
|
}
|
|
3108
|
-
const fgColor =
|
|
3109
|
-
const bgColor =
|
|
3121
|
+
const fgColor = chunkEFSQW6S5_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
3122
|
+
const bgColor = chunkEFSQW6S5_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
3110
3123
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
3111
3124
|
switch (preset) {
|
|
3112
3125
|
case "ltHorz":
|
|
@@ -3217,11 +3230,11 @@ function parseCellBorders(cellProperties) {
|
|
|
3217
3230
|
const prstDash = ln["a:prstDash"];
|
|
3218
3231
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
3219
3232
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
3220
|
-
const color =
|
|
3233
|
+
const color = chunkEFSQW6S5_js.parseDrawingColor(ln["a:solidFill"]);
|
|
3221
3234
|
if (color) {
|
|
3222
|
-
const opacity =
|
|
3235
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
3223
3236
|
const key = `${edge.prefix}`;
|
|
3224
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
3237
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkEFSQW6S5_js.colorWithOpacity(color, opacity)}`;
|
|
3225
3238
|
}
|
|
3226
3239
|
}
|
|
3227
3240
|
return borderStyle;
|
|
@@ -3234,7 +3247,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3234
3247
|
const textShadowParts = [];
|
|
3235
3248
|
const outerShdw = effectLst["a:outerShdw"];
|
|
3236
3249
|
if (outerShdw) {
|
|
3237
|
-
const shdwColor =
|
|
3250
|
+
const shdwColor = chunkEFSQW6S5_js.parseDrawingColor(outerShdw);
|
|
3238
3251
|
if (shdwColor) {
|
|
3239
3252
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
3240
3253
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -3252,7 +3265,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3252
3265
|
}
|
|
3253
3266
|
const glow = effectLst["a:glow"];
|
|
3254
3267
|
if (glow) {
|
|
3255
|
-
const glowColor =
|
|
3268
|
+
const glowColor = chunkEFSQW6S5_js.parseDrawingColor(glow);
|
|
3256
3269
|
if (glowColor) {
|
|
3257
3270
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
3258
3271
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -3331,10 +3344,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3331
3344
|
if (runProps?.["@_u"] !== void 0) {
|
|
3332
3345
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
3333
3346
|
}
|
|
3334
|
-
const runColor =
|
|
3347
|
+
const runColor = chunkEFSQW6S5_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkEFSQW6S5_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
3335
3348
|
if (runColor) {
|
|
3336
|
-
const opacity =
|
|
3337
|
-
cellStyle.color =
|
|
3349
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
3350
|
+
cellStyle.color = chunkEFSQW6S5_js.colorWithOpacity(runColor, opacity);
|
|
3338
3351
|
}
|
|
3339
3352
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
3340
3353
|
if (fontFamily) {
|
|
@@ -3344,15 +3357,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3344
3357
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
3345
3358
|
}
|
|
3346
3359
|
const cellProperties = cellXml["a:tcPr"];
|
|
3347
|
-
const cellFill =
|
|
3360
|
+
const cellFill = chunkEFSQW6S5_js.parseDrawingColor(
|
|
3348
3361
|
cellProperties?.["a:solidFill"],
|
|
3349
3362
|
schemeColorOverrides
|
|
3350
3363
|
);
|
|
3351
3364
|
if (cellFill) {
|
|
3352
|
-
const opacity =
|
|
3365
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(
|
|
3353
3366
|
cellProperties?.["a:solidFill"]
|
|
3354
3367
|
);
|
|
3355
|
-
cellStyle.backgroundColor =
|
|
3368
|
+
cellStyle.backgroundColor = chunkEFSQW6S5_js.colorWithOpacity(cellFill, opacity);
|
|
3356
3369
|
} else {
|
|
3357
3370
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
3358
3371
|
if (gradCss) {
|
|
@@ -3367,16 +3380,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3367
3380
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
3368
3381
|
Object.assign(cellStyle, edgeBorders);
|
|
3369
3382
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
3370
|
-
const borderColor =
|
|
3383
|
+
const borderColor = chunkEFSQW6S5_js.parseDrawingColor(
|
|
3371
3384
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
3372
3385
|
schemeColorOverrides
|
|
3373
|
-
) ||
|
|
3386
|
+
) || chunkEFSQW6S5_js.parseDrawingColor(
|
|
3374
3387
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
3375
3388
|
schemeColorOverrides
|
|
3376
|
-
) ||
|
|
3389
|
+
) || chunkEFSQW6S5_js.parseDrawingColor(
|
|
3377
3390
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
3378
3391
|
schemeColorOverrides
|
|
3379
|
-
) ||
|
|
3392
|
+
) || chunkEFSQW6S5_js.parseDrawingColor(
|
|
3380
3393
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
3381
3394
|
schemeColorOverrides
|
|
3382
3395
|
);
|
|
@@ -3455,10 +3468,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
|
|
|
3455
3468
|
}
|
|
3456
3469
|
let color = base;
|
|
3457
3470
|
if (fill.tint !== void 0 && fill.tint > 0) {
|
|
3458
|
-
color =
|
|
3471
|
+
color = chunkEFSQW6S5_js.tintColor2(color, fill.tint / 1e5);
|
|
3459
3472
|
}
|
|
3460
3473
|
if (fill.shade !== void 0 && fill.shade > 0) {
|
|
3461
|
-
color =
|
|
3474
|
+
color = chunkEFSQW6S5_js.shadeColor2(color, 1 - fill.shade / 1e5);
|
|
3462
3475
|
}
|
|
3463
3476
|
return color;
|
|
3464
3477
|
}
|
|
@@ -3483,7 +3496,7 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
|
3483
3496
|
style.fontFamily = text.fontFace;
|
|
3484
3497
|
applied = true;
|
|
3485
3498
|
} else {
|
|
3486
|
-
const refFont =
|
|
3499
|
+
const refFont = chunkEFSQW6S5_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
|
|
3487
3500
|
if (refFont) {
|
|
3488
3501
|
style.fontFamily = refFont;
|
|
3489
3502
|
applied = true;
|
|
@@ -3494,10 +3507,10 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
|
3494
3507
|
if (base) {
|
|
3495
3508
|
let color = base;
|
|
3496
3509
|
if (text.fontTint !== void 0 && text.fontTint > 0) {
|
|
3497
|
-
color =
|
|
3510
|
+
color = chunkEFSQW6S5_js.tintColor2(color, text.fontTint / 1e5);
|
|
3498
3511
|
}
|
|
3499
3512
|
if (text.fontShade !== void 0 && text.fontShade > 0) {
|
|
3500
|
-
color =
|
|
3513
|
+
color = chunkEFSQW6S5_js.shadeColor2(color, 1 - text.fontShade / 1e5);
|
|
3501
3514
|
}
|
|
3502
3515
|
style.color = color;
|
|
3503
3516
|
applied = true;
|
|
@@ -3686,7 +3699,7 @@ function parseTableElementData(element, fallbackTextStyle) {
|
|
|
3686
3699
|
};
|
|
3687
3700
|
}
|
|
3688
3701
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
3689
|
-
return
|
|
3702
|
+
return chunkEFSQW6S5_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
3690
3703
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
3691
3704
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
3692
3705
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3834,9 +3847,9 @@ function cellStyleToCss(style) {
|
|
|
3834
3847
|
if (style.gradientFillCss) {
|
|
3835
3848
|
css.background = style.gradientFillCss;
|
|
3836
3849
|
} else if (style.fillMode === "pattern" && style.patternFillPreset) {
|
|
3837
|
-
const fg =
|
|
3838
|
-
const bg =
|
|
3839
|
-
const svgPattern =
|
|
3850
|
+
const fg = chunkEFSQW6S5_js.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
3851
|
+
const bg = chunkEFSQW6S5_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
3852
|
+
const svgPattern = chunkEFSQW6S5_js.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
3840
3853
|
if (svgPattern) {
|
|
3841
3854
|
const encoded = encodeURIComponent(svgPattern);
|
|
3842
3855
|
css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
|
|
@@ -3912,7 +3925,7 @@ function cellStyleToCss(style) {
|
|
|
3912
3925
|
if (edge.width || edge.color) {
|
|
3913
3926
|
const w = edge.width ?? 1;
|
|
3914
3927
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
3915
|
-
const s =
|
|
3928
|
+
const s = chunkEFSQW6S5_js.ooxmlDashToCssBorderStyle(edge.dash);
|
|
3916
3929
|
css[edge.prefix] = `${w}px ${s} ${c}`;
|
|
3917
3930
|
}
|
|
3918
3931
|
}
|
|
@@ -3943,7 +3956,7 @@ function cellStyleToCss(style) {
|
|
|
3943
3956
|
css.textShadow = textShadowParts.join(", ");
|
|
3944
3957
|
}
|
|
3945
3958
|
if (style.cell3D) {
|
|
3946
|
-
Object.assign(css,
|
|
3959
|
+
Object.assign(css, chunkEFSQW6S5_js.cell3DBevelCss(style.cell3D));
|
|
3947
3960
|
}
|
|
3948
3961
|
return css;
|
|
3949
3962
|
}
|
|
@@ -3957,7 +3970,7 @@ function TableResizeOverlay({
|
|
|
3957
3970
|
const containerRef = React6.useRef(null);
|
|
3958
3971
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3959
3972
|
const dragRef = React6.useRef(null);
|
|
3960
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3973
|
+
const colBoundaries = React6.useMemo(() => chunkEFSQW6S5_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3961
3974
|
const measureRows = React6.useCallback(() => {
|
|
3962
3975
|
const container = containerRef.current;
|
|
3963
3976
|
if (!container) {
|
|
@@ -4004,11 +4017,11 @@ function TableResizeOverlay({
|
|
|
4004
4017
|
const rect = containerRef.current.getBoundingClientRect();
|
|
4005
4018
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
4006
4019
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
4007
|
-
onResizeColumns(
|
|
4020
|
+
onResizeColumns(chunkEFSQW6S5_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
4008
4021
|
} else if (drag.type === "row" && onResizeRow) {
|
|
4009
4022
|
const deltaY = e.clientY - drag.startPos;
|
|
4010
|
-
const newHeight =
|
|
4011
|
-
drag.initialRowHeight ??
|
|
4023
|
+
const newHeight = chunkEFSQW6S5_js.computeResizedRowHeight(
|
|
4024
|
+
drag.initialRowHeight ?? chunkEFSQW6S5_js.DEFAULT_ROW_HEIGHT,
|
|
4012
4025
|
deltaY
|
|
4013
4026
|
);
|
|
4014
4027
|
onResizeRow(drag.index, newHeight);
|
|
@@ -4046,7 +4059,7 @@ function TableResizeOverlay({
|
|
|
4046
4059
|
e.stopPropagation();
|
|
4047
4060
|
const table = containerRef.current?.querySelector("table");
|
|
4048
4061
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
4049
|
-
const actualHeight = tr?.offsetHeight ??
|
|
4062
|
+
const actualHeight = tr?.offsetHeight ?? chunkEFSQW6S5_js.DEFAULT_ROW_HEIGHT;
|
|
4050
4063
|
document.body.style.cursor = "row-resize";
|
|
4051
4064
|
document.body.style.userSelect = "none";
|
|
4052
4065
|
dragRef.current = {
|
|
@@ -4094,7 +4107,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4094
4107
|
}
|
|
4095
4108
|
const first = selectedCell.selectedCells[0];
|
|
4096
4109
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4097
|
-
return
|
|
4110
|
+
return chunkEFSQW6S5_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
4098
4111
|
})();
|
|
4099
4112
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4100
4113
|
TableResizeOverlay,
|
|
@@ -4127,7 +4140,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4127
4140
|
return null;
|
|
4128
4141
|
}
|
|
4129
4142
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
4130
|
-
const isInMultiSelection =
|
|
4143
|
+
const isInMultiSelection = chunkEFSQW6S5_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
4131
4144
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
4132
4145
|
const diag = getCellDiagonalBorders2(
|
|
4133
4146
|
cell.style,
|
|
@@ -4157,7 +4170,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4157
4170
|
}
|
|
4158
4171
|
event.stopPropagation();
|
|
4159
4172
|
if (event.shiftKey && selectedCell) {
|
|
4160
|
-
const rect =
|
|
4173
|
+
const rect = chunkEFSQW6S5_js.computeSelectionRect(
|
|
4161
4174
|
selectedCell.rowIndex,
|
|
4162
4175
|
selectedCell.columnIndex,
|
|
4163
4176
|
rowIndex,
|
|
@@ -4167,7 +4180,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4167
4180
|
options?.onSelectCell?.({
|
|
4168
4181
|
rowIndex: selectedCell.rowIndex,
|
|
4169
4182
|
columnIndex: selectedCell.columnIndex,
|
|
4170
|
-
selectedCells:
|
|
4183
|
+
selectedCells: chunkEFSQW6S5_js.rectToCells(rect)
|
|
4171
4184
|
});
|
|
4172
4185
|
} else {
|
|
4173
4186
|
options?.onSelectCell?.({
|
|
@@ -4244,7 +4257,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4244
4257
|
}
|
|
4245
4258
|
const first = selectedCell.selectedCells[0];
|
|
4246
4259
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4247
|
-
return
|
|
4260
|
+
return chunkEFSQW6S5_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
4248
4261
|
})();
|
|
4249
4262
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
4250
4263
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4321,7 +4334,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4321
4334
|
"border px-1 py-0.5 align-top",
|
|
4322
4335
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
4323
4336
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4324
|
-
|
|
4337
|
+
chunkEFSQW6S5_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4325
4338
|
),
|
|
4326
4339
|
colSpan,
|
|
4327
4340
|
rowSpan: rSpan,
|
|
@@ -4332,7 +4345,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4332
4345
|
}
|
|
4333
4346
|
event.stopPropagation();
|
|
4334
4347
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
4335
|
-
const rect =
|
|
4348
|
+
const rect = chunkEFSQW6S5_js.computeSelectionRect(
|
|
4336
4349
|
selectedCell.rowIndex,
|
|
4337
4350
|
selectedCell.columnIndex,
|
|
4338
4351
|
rowIndex,
|
|
@@ -4342,7 +4355,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4342
4355
|
options?.onSelectCell?.({
|
|
4343
4356
|
rowIndex: selectedCell.rowIndex,
|
|
4344
4357
|
columnIndex: selectedCell.columnIndex,
|
|
4345
|
-
selectedCells:
|
|
4358
|
+
selectedCells: chunkEFSQW6S5_js.rectToCells(rect)
|
|
4346
4359
|
});
|
|
4347
4360
|
} else {
|
|
4348
4361
|
options?.onSelectCell?.({
|
|
@@ -4397,24 +4410,24 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4397
4410
|
}
|
|
4398
4411
|
var LEGEND_ITEM_WIDTH = 80;
|
|
4399
4412
|
function partAttrs(part) {
|
|
4400
|
-
return part ?
|
|
4413
|
+
return part ? chunkEFSQW6S5_js.chartPartToAttrs(part) : void 0;
|
|
4401
4414
|
}
|
|
4402
4415
|
function resolveReactPalette(chartData) {
|
|
4403
4416
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
4404
4417
|
return chartData.colorPalette;
|
|
4405
4418
|
}
|
|
4406
|
-
return [...
|
|
4419
|
+
return [...chunkEFSQW6S5_js.getChartStylePalette(chartData.style?.styleId)];
|
|
4407
4420
|
}
|
|
4408
4421
|
function buildReactChartViewModel(element) {
|
|
4409
4422
|
if (element.type !== "chart" || !element.chartData) {
|
|
4410
|
-
return
|
|
4423
|
+
return chunkEFSQW6S5_js.buildChartViewModel(element);
|
|
4411
4424
|
}
|
|
4412
4425
|
const palette = resolveReactPalette(element.chartData);
|
|
4413
4426
|
const themedElement = {
|
|
4414
4427
|
...element,
|
|
4415
4428
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
4416
4429
|
};
|
|
4417
|
-
return
|
|
4430
|
+
return chunkEFSQW6S5_js.buildChartViewModel(themedElement);
|
|
4418
4431
|
}
|
|
4419
4432
|
function renderPrimitive(prim, key) {
|
|
4420
4433
|
switch (prim.kind) {
|
|
@@ -4563,7 +4576,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
4563
4576
|
viewBox: `0 0 ${vm.svgWidth} ${vm.svgHeight}`,
|
|
4564
4577
|
preserveAspectRatio,
|
|
4565
4578
|
children: [
|
|
4566
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: vm.svgWidth, height: vm.svgHeight, fill:
|
|
4579
|
+
vm.areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: vm.svgWidth, height: vm.svgHeight, fill: vm.areaFill }),
|
|
4567
4580
|
vm.title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4568
4581
|
"text",
|
|
4569
4582
|
{
|
|
@@ -4803,7 +4816,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4803
4816
|
const unmatchedRows = [];
|
|
4804
4817
|
categories.forEach((cat, i) => {
|
|
4805
4818
|
const value = values[i] ?? 0;
|
|
4806
|
-
const code =
|
|
4819
|
+
const code = chunkEFSQW6S5_js.resolveRegionCode(cat);
|
|
4807
4820
|
if (code) {
|
|
4808
4821
|
regionValueMap.set(code, { value, label: cat });
|
|
4809
4822
|
} else {
|
|
@@ -4841,8 +4854,8 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4841
4854
|
let fill = "#e2e8f0";
|
|
4842
4855
|
let dataLabel = null;
|
|
4843
4856
|
if (entry) {
|
|
4844
|
-
const t =
|
|
4845
|
-
fill =
|
|
4857
|
+
const t = chunkEFSQW6S5_js.normalizeValue(entry.value, minVal, maxVal);
|
|
4858
|
+
fill = chunkEFSQW6S5_js.sequentialColorScale(t);
|
|
4846
4859
|
dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
4847
4860
|
"text",
|
|
4848
4861
|
{
|
|
@@ -4853,7 +4866,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4853
4866
|
fontWeight: 600,
|
|
4854
4867
|
fill: "#1e293b",
|
|
4855
4868
|
style: { pointerEvents: "none" },
|
|
4856
|
-
children:
|
|
4869
|
+
children: chunkEFSQW6S5_js.formatAxisValue(entry.value)
|
|
4857
4870
|
},
|
|
4858
4871
|
`${element.id}-map-dl-${region.code}`
|
|
4859
4872
|
);
|
|
@@ -4871,7 +4884,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4871
4884
|
opacity: 0.9,
|
|
4872
4885
|
children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
|
|
4873
4886
|
region.name,
|
|
4874
|
-
entry ? `: ${
|
|
4887
|
+
entry ? `: ${chunkEFSQW6S5_js.formatAxisValue(entry.value)}` : ""
|
|
4875
4888
|
] })
|
|
4876
4889
|
}
|
|
4877
4890
|
),
|
|
@@ -4909,7 +4922,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4909
4922
|
fontSize: 7,
|
|
4910
4923
|
fill: "#64748b",
|
|
4911
4924
|
textAnchor: "middle",
|
|
4912
|
-
children:
|
|
4925
|
+
children: chunkEFSQW6S5_js.formatAxisValue(minVal)
|
|
4913
4926
|
},
|
|
4914
4927
|
`${element.id}-map-legend-min`
|
|
4915
4928
|
),
|
|
@@ -4921,7 +4934,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4921
4934
|
fontSize: 7,
|
|
4922
4935
|
fill: "#64748b",
|
|
4923
4936
|
textAnchor: "middle",
|
|
4924
|
-
children:
|
|
4937
|
+
children: chunkEFSQW6S5_js.formatAxisValue(maxVal)
|
|
4925
4938
|
},
|
|
4926
4939
|
`${element.id}-map-legend-max`
|
|
4927
4940
|
)
|
|
@@ -4987,7 +5000,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4987
5000
|
y,
|
|
4988
5001
|
fontSize,
|
|
4989
5002
|
fill: "#475569",
|
|
4990
|
-
children:
|
|
5003
|
+
children: chunkEFSQW6S5_js.formatAxisValue(row.value)
|
|
4991
5004
|
},
|
|
4992
5005
|
`${element.id}-map-ft-val-${i}`
|
|
4993
5006
|
)
|
|
@@ -5058,7 +5071,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
|
|
|
5058
5071
|
|
|
5059
5072
|
// src/viewer/utils/chart-overlay-utils.ts
|
|
5060
5073
|
function sColor(series, idx) {
|
|
5061
|
-
return
|
|
5074
|
+
return chunkEFSQW6S5_js.seriesColor(series, idx);
|
|
5062
5075
|
}
|
|
5063
5076
|
function valToY(val, range, topY, bottomY) {
|
|
5064
5077
|
const usable = bottomY - topY;
|
|
@@ -5597,7 +5610,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5597
5610
|
width: 10,
|
|
5598
5611
|
height: 10,
|
|
5599
5612
|
rx: 2,
|
|
5600
|
-
fill:
|
|
5613
|
+
fill: chunkEFSQW6S5_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5601
5614
|
},
|
|
5602
5615
|
`${id}-leg-r-${i}`
|
|
5603
5616
|
)
|
|
@@ -5621,7 +5634,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5621
5634
|
width: 10,
|
|
5622
5635
|
height: 10,
|
|
5623
5636
|
rx: 2,
|
|
5624
|
-
fill:
|
|
5637
|
+
fill: chunkEFSQW6S5_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5625
5638
|
}
|
|
5626
5639
|
),
|
|
5627
5640
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
|
|
@@ -5634,9 +5647,9 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5634
5647
|
}
|
|
5635
5648
|
const lines = [];
|
|
5636
5649
|
if (range.logScale && range.logBase) {
|
|
5637
|
-
const ticks =
|
|
5650
|
+
const ticks = chunkEFSQW6S5_js.generateLogTicks(range);
|
|
5638
5651
|
ticks.forEach((tickVal, i) => {
|
|
5639
|
-
const y =
|
|
5652
|
+
const y = chunkEFSQW6S5_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5640
5653
|
lines.push(
|
|
5641
5654
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5642
5655
|
"line",
|
|
@@ -5657,7 +5670,7 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5657
5670
|
const steps = 4;
|
|
5658
5671
|
for (let i = 0; i <= steps; i++) {
|
|
5659
5672
|
const val = range.min + range.span * i / steps;
|
|
5660
|
-
const y =
|
|
5673
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5661
5674
|
lines.push(
|
|
5662
5675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5663
5676
|
"line",
|
|
@@ -5681,9 +5694,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5681
5694
|
const labels = [];
|
|
5682
5695
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5683
5696
|
if (range.logScale && range.logBase) {
|
|
5684
|
-
const ticks =
|
|
5697
|
+
const ticks = chunkEFSQW6S5_js.generateLogTicks(range);
|
|
5685
5698
|
ticks.forEach((tickVal, i) => {
|
|
5686
|
-
const y =
|
|
5699
|
+
const y = chunkEFSQW6S5_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5687
5700
|
labels.push(
|
|
5688
5701
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5689
5702
|
"text",
|
|
@@ -5693,7 +5706,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5693
5706
|
textAnchor: "end",
|
|
5694
5707
|
fontSize: 8,
|
|
5695
5708
|
fill: "#64748b",
|
|
5696
|
-
children: hasDisplayUnits ?
|
|
5709
|
+
children: hasDisplayUnits ? chunkEFSQW6S5_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkEFSQW6S5_js.formatAxisValue(tickVal)
|
|
5697
5710
|
},
|
|
5698
5711
|
`${id}-vaxis-log-${i}`
|
|
5699
5712
|
)
|
|
@@ -5703,7 +5716,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5703
5716
|
const steps = 4;
|
|
5704
5717
|
for (let i = 0; i <= steps; i++) {
|
|
5705
5718
|
const val = range.min + range.span * i / steps;
|
|
5706
|
-
const y =
|
|
5719
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5707
5720
|
labels.push(
|
|
5708
5721
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5709
5722
|
"text",
|
|
@@ -5713,7 +5726,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5713
5726
|
textAnchor: "end",
|
|
5714
5727
|
fontSize: 8,
|
|
5715
5728
|
fill: "#64748b",
|
|
5716
|
-
children: hasDisplayUnits ?
|
|
5729
|
+
children: hasDisplayUnits ? chunkEFSQW6S5_js.formatAxisValueWithUnits(val, axisFormatting) : chunkEFSQW6S5_js.formatAxisValue(val)
|
|
5717
5730
|
},
|
|
5718
5731
|
`${id}-vaxis-${i}`
|
|
5719
5732
|
)
|
|
@@ -5721,7 +5734,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5721
5734
|
}
|
|
5722
5735
|
}
|
|
5723
5736
|
if (hasDisplayUnits) {
|
|
5724
|
-
const unitLabel =
|
|
5737
|
+
const unitLabel = chunkEFSQW6S5_js.getDisplayUnitLabel(
|
|
5725
5738
|
axisFormatting.displayUnits,
|
|
5726
5739
|
axisFormatting.displayUnitsLabel
|
|
5727
5740
|
);
|
|
@@ -5796,7 +5809,7 @@ function renderZeroLine(id, range, layout) {
|
|
|
5796
5809
|
if (range.min >= 0) {
|
|
5797
5810
|
return null;
|
|
5798
5811
|
}
|
|
5799
|
-
const y =
|
|
5812
|
+
const y = chunkEFSQW6S5_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
|
|
5800
5813
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5801
5814
|
"line",
|
|
5802
5815
|
{
|
|
@@ -5820,7 +5833,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5820
5833
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5821
5834
|
for (let i = 0; i <= steps; i++) {
|
|
5822
5835
|
const val = range.min + range.span * i / steps;
|
|
5823
|
-
const y =
|
|
5836
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5824
5837
|
labels.push(
|
|
5825
5838
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5826
5839
|
"text",
|
|
@@ -5832,7 +5845,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5832
5845
|
fontFamily,
|
|
5833
5846
|
fontWeight,
|
|
5834
5847
|
fill: fontColor,
|
|
5835
|
-
children: hasDisplayUnits ?
|
|
5848
|
+
children: hasDisplayUnits ? chunkEFSQW6S5_js.formatAxisValueWithUnits(val, axisFormatting) : chunkEFSQW6S5_js.formatAxisValue(val)
|
|
5836
5849
|
},
|
|
5837
5850
|
`${id}-sec-vaxis-${i}`
|
|
5838
5851
|
)
|
|
@@ -5856,7 +5869,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5856
5869
|
);
|
|
5857
5870
|
}
|
|
5858
5871
|
if (hasDisplayUnits) {
|
|
5859
|
-
const unitLabel =
|
|
5872
|
+
const unitLabel = chunkEFSQW6S5_js.getDisplayUnitLabel(
|
|
5860
5873
|
axisFormatting.displayUnits,
|
|
5861
5874
|
axisFormatting.displayUnitsLabel
|
|
5862
5875
|
);
|
|
@@ -5887,7 +5900,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
|
|
|
5887
5900
|
const ticks = [];
|
|
5888
5901
|
for (let i = 0; i <= steps; i++) {
|
|
5889
5902
|
const val = range.min + range.span * i / steps;
|
|
5890
|
-
const y =
|
|
5903
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5891
5904
|
ticks.push(
|
|
5892
5905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5893
5906
|
"line",
|
|
@@ -5914,7 +5927,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
|
|
|
5914
5927
|
const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
|
|
5915
5928
|
for (let i = 0; i <= steps; i++) {
|
|
5916
5929
|
const val = range.min + range.span * i / steps;
|
|
5917
|
-
const y =
|
|
5930
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5918
5931
|
lines.push(
|
|
5919
5932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5920
5933
|
"line",
|
|
@@ -6076,7 +6089,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6076
6089
|
width: 8,
|
|
6077
6090
|
height: 8,
|
|
6078
6091
|
borderRadius: 2,
|
|
6079
|
-
backgroundColor:
|
|
6092
|
+
backgroundColor: chunkEFSQW6S5_js.seriesColor(
|
|
6080
6093
|
s,
|
|
6081
6094
|
si,
|
|
6082
6095
|
chartData.style?.styleId,
|
|
@@ -6114,9 +6127,10 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6114
6127
|
}
|
|
6115
6128
|
function renderStockChart(element, chartData, categoryLabels) {
|
|
6116
6129
|
const style = chartData.style;
|
|
6130
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6117
6131
|
const legendPos = style?.legendPosition || "b";
|
|
6118
|
-
const range =
|
|
6119
|
-
const layout =
|
|
6132
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6133
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6120
6134
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6121
6135
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
6122
6136
|
const candleWidth = barGroupWidth * 0.5;
|
|
@@ -6137,10 +6151,10 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6137
6151
|
const close = closeSeries.values[ci] ?? high;
|
|
6138
6152
|
const isUp = close >= open;
|
|
6139
6153
|
const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
|
|
6140
|
-
const highY =
|
|
6141
|
-
const lowY =
|
|
6142
|
-
const openY =
|
|
6143
|
-
const closeY =
|
|
6154
|
+
const highY = chunkEFSQW6S5_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
|
|
6155
|
+
const lowY = chunkEFSQW6S5_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
|
|
6156
|
+
const openY = chunkEFSQW6S5_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
|
|
6157
|
+
const closeY = chunkEFSQW6S5_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
|
|
6144
6158
|
elements.push(
|
|
6145
6159
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6146
6160
|
"line",
|
|
@@ -6183,7 +6197,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6183
6197
|
textAnchor: "middle",
|
|
6184
6198
|
fontSize: 7,
|
|
6185
6199
|
fill: "#334155",
|
|
6186
|
-
children:
|
|
6200
|
+
children: chunkEFSQW6S5_js.formatAxisValue(close)
|
|
6187
6201
|
},
|
|
6188
6202
|
`${element.id}-stock-dl-${ci}`
|
|
6189
6203
|
)
|
|
@@ -6198,7 +6212,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6198
6212
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6199
6213
|
preserveAspectRatio: "none",
|
|
6200
6214
|
children: [
|
|
6201
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6215
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6202
6216
|
renderChrome(element.id, chartData, layout, range, categoryLabels, {
|
|
6203
6217
|
categoryAxisStyle: "bar"
|
|
6204
6218
|
}),
|
|
@@ -6225,7 +6239,7 @@ function FailedToLoad() {
|
|
|
6225
6239
|
var LazySurfaceChart3DScene = React6__default.default.lazy(
|
|
6226
6240
|
async () => {
|
|
6227
6241
|
try {
|
|
6228
|
-
return await import('./SurfaceChart3DScene-
|
|
6242
|
+
return await import('./SurfaceChart3DScene-IZLUWT27.js');
|
|
6229
6243
|
} catch {
|
|
6230
6244
|
return { default: FailedToLoad };
|
|
6231
6245
|
}
|
|
@@ -6249,7 +6263,7 @@ var SurfaceChart3DErrorBoundary = class extends React6__default.default.Componen
|
|
|
6249
6263
|
function buildSurfaceData(chartData, categoryLabels) {
|
|
6250
6264
|
const rows = chartData.series.length;
|
|
6251
6265
|
const cols = Math.max(categoryLabels.length, 1);
|
|
6252
|
-
const range =
|
|
6266
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6253
6267
|
const heightMap = new Float32Array(rows * cols);
|
|
6254
6268
|
const colorMap = new Float32Array(rows * cols * 3);
|
|
6255
6269
|
for (let r = 0; r < rows; r++) {
|
|
@@ -6368,9 +6382,10 @@ function darkenRgb(r, g, b, factor) {
|
|
|
6368
6382
|
}
|
|
6369
6383
|
function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
6370
6384
|
const style = chartData.style;
|
|
6385
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6371
6386
|
const legendPos = style?.legendPosition || "b";
|
|
6372
|
-
const layout =
|
|
6373
|
-
const range =
|
|
6387
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6388
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6374
6389
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6375
6390
|
const seriesCount = chartData.series.length;
|
|
6376
6391
|
const cols = catCount - 1;
|
|
@@ -6449,7 +6464,7 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6449
6464
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6450
6465
|
preserveAspectRatio: "xMidYMid meet",
|
|
6451
6466
|
children: [
|
|
6452
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6467
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6453
6468
|
renderTitle(element.id, style, chartData.title, layout.svgWidth),
|
|
6454
6469
|
renderLegend(element.id, style, chartData.series, layout),
|
|
6455
6470
|
polygons
|
|
@@ -6459,9 +6474,10 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6459
6474
|
}
|
|
6460
6475
|
function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
6461
6476
|
const style = chartData.style;
|
|
6477
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6462
6478
|
const legendPos = style?.legendPosition || "b";
|
|
6463
|
-
const layout =
|
|
6464
|
-
const range =
|
|
6479
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6480
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6465
6481
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6466
6482
|
const seriesCount = chartData.series.length;
|
|
6467
6483
|
const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
|
|
@@ -6495,7 +6511,7 @@ function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6495
6511
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6496
6512
|
preserveAspectRatio: "none",
|
|
6497
6513
|
children: [
|
|
6498
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6514
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6499
6515
|
renderChrome(element.id, chartData, layout, range, categoryLabels, {
|
|
6500
6516
|
categoryAxisStyle: "bar"
|
|
6501
6517
|
}),
|
|
@@ -6523,8 +6539,9 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6523
6539
|
}
|
|
6524
6540
|
function renderTreemapChart(element, chartData, categoryLabels) {
|
|
6525
6541
|
const style = chartData.style;
|
|
6542
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6526
6543
|
const legendPos = style?.legendPosition || "b";
|
|
6527
|
-
const layout =
|
|
6544
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6528
6545
|
const allValues = chartData.series.flatMap((s) => s.values);
|
|
6529
6546
|
const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
|
|
6530
6547
|
const rects = [];
|
|
@@ -6547,7 +6564,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6547
6564
|
y: curY,
|
|
6548
6565
|
width: Math.max(w - 1, 1),
|
|
6549
6566
|
height: Math.max(h - 1, 1),
|
|
6550
|
-
fill:
|
|
6567
|
+
fill: chunkEFSQW6S5_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
|
|
6551
6568
|
rx: 2,
|
|
6552
6569
|
opacity: 0.85
|
|
6553
6570
|
},
|
|
@@ -6588,7 +6605,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6588
6605
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6589
6606
|
preserveAspectRatio: "none",
|
|
6590
6607
|
children: [
|
|
6591
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6608
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6592
6609
|
renderTitle(element.id, style, chartData.title, layout.svgWidth),
|
|
6593
6610
|
renderLegend(element.id, style, chartData.series, layout),
|
|
6594
6611
|
rects
|
|
@@ -6598,10 +6615,11 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6598
6615
|
}
|
|
6599
6616
|
function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
6600
6617
|
const style = chartData.style;
|
|
6618
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6601
6619
|
const legendPos = style?.legendPosition || "b";
|
|
6602
6620
|
const values = chartData.series[0]?.values ?? [];
|
|
6603
|
-
const range =
|
|
6604
|
-
const layout =
|
|
6621
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6622
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6605
6623
|
const catCount = Math.max(categoryLabels.length, values.length, 1);
|
|
6606
6624
|
const barWidth = layout.plotWidth / catCount * 0.6;
|
|
6607
6625
|
const gap = layout.plotWidth / catCount * 0.2;
|
|
@@ -6612,8 +6630,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6612
6630
|
const isLast = i === values.length - 1;
|
|
6613
6631
|
const startVal = isLast ? 0 : runningTotal;
|
|
6614
6632
|
const endVal = isLast ? runningTotal + val : runningTotal + val;
|
|
6615
|
-
const barStartY =
|
|
6616
|
-
const barEndY =
|
|
6633
|
+
const barStartY = chunkEFSQW6S5_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
|
|
6634
|
+
const barEndY = chunkEFSQW6S5_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
|
|
6617
6635
|
const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
|
|
6618
6636
|
const y = Math.min(barStartY, barEndY);
|
|
6619
6637
|
const h = Math.max(Math.abs(barEndY - barStartY), 1);
|
|
@@ -6642,7 +6660,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6642
6660
|
textAnchor: "middle",
|
|
6643
6661
|
fontSize: 7,
|
|
6644
6662
|
fill: "#334155",
|
|
6645
|
-
children:
|
|
6663
|
+
children: chunkEFSQW6S5_js.formatAxisValue(isLast ? endVal : val)
|
|
6646
6664
|
},
|
|
6647
6665
|
`${element.id}-wf-dl-${i}`
|
|
6648
6666
|
)
|
|
@@ -6677,7 +6695,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6677
6695
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6678
6696
|
preserveAspectRatio: "none",
|
|
6679
6697
|
children: [
|
|
6680
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6698
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6681
6699
|
renderChrome(element.id, chartData, layout, range, categoryLabels, {
|
|
6682
6700
|
categoryAxisStyle: "bar"
|
|
6683
6701
|
}),
|
|
@@ -6689,19 +6707,20 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6689
6707
|
}
|
|
6690
6708
|
function renderComboChart(element, chartData, categoryLabels) {
|
|
6691
6709
|
const style = chartData.style;
|
|
6710
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6692
6711
|
const legendPos = style?.legendPosition || "b";
|
|
6693
|
-
const layoutOpts =
|
|
6712
|
+
const layoutOpts = chunkEFSQW6S5_js.computeLayoutOptions(
|
|
6694
6713
|
chartData.axes,
|
|
6695
6714
|
chartData.dataTable,
|
|
6696
6715
|
chartData.series.length
|
|
6697
6716
|
);
|
|
6698
|
-
const layout =
|
|
6699
|
-
const { primary, secondary } =
|
|
6717
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
|
|
6718
|
+
const { primary, secondary } = chunkEFSQW6S5_js.splitSeriesByAxis(chartData.series, chartData.axes);
|
|
6700
6719
|
const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
|
|
6701
6720
|
const secondarySeries = secondary.map((e) => e.series);
|
|
6702
|
-
const range =
|
|
6703
|
-
const secondaryRange = secondarySeries.length > 0 ?
|
|
6704
|
-
const secondaryAxisFmt =
|
|
6721
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(primarySeries, chartData.axes);
|
|
6722
|
+
const secondaryRange = secondarySeries.length > 0 ? chunkEFSQW6S5_js.computeValueRange(secondarySeries) : void 0;
|
|
6723
|
+
const secondaryAxisFmt = chunkEFSQW6S5_js.getSecondaryValueAxis(chartData.axes);
|
|
6705
6724
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6706
6725
|
const barSeriesCount = 1;
|
|
6707
6726
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
@@ -6717,8 +6736,8 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6717
6736
|
const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
|
|
6718
6737
|
barSeries.values.forEach((val, vi) => {
|
|
6719
6738
|
const x = layout.plotLeft + barGroupWidth * vi + barOffset;
|
|
6720
|
-
const zeroY =
|
|
6721
|
-
const valY =
|
|
6739
|
+
const zeroY = chunkEFSQW6S5_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
|
|
6740
|
+
const valY = chunkEFSQW6S5_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
|
|
6722
6741
|
const y = Math.min(zeroY, valY);
|
|
6723
6742
|
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
6724
6743
|
barElements.push(
|
|
@@ -6729,7 +6748,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6729
6748
|
y,
|
|
6730
6749
|
width: barWidth,
|
|
6731
6750
|
height: h,
|
|
6732
|
-
fill:
|
|
6751
|
+
fill: chunkEFSQW6S5_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
|
|
6733
6752
|
rx: 1
|
|
6734
6753
|
},
|
|
6735
6754
|
`${element.id}-combo-bar-${vi}`
|
|
@@ -6745,7 +6764,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6745
6764
|
textAnchor: "middle",
|
|
6746
6765
|
fontSize: 7,
|
|
6747
6766
|
fill: "#334155",
|
|
6748
|
-
children:
|
|
6767
|
+
children: chunkEFSQW6S5_js.formatAxisValue(val)
|
|
6749
6768
|
},
|
|
6750
6769
|
`${element.id}-combo-bar-dl-${vi}`
|
|
6751
6770
|
)
|
|
@@ -6762,10 +6781,10 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6762
6781
|
const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
|
|
6763
6782
|
const points = series.values.map((val, vi) => {
|
|
6764
6783
|
const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
|
|
6765
|
-
const y =
|
|
6784
|
+
const y = chunkEFSQW6S5_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
|
|
6766
6785
|
return { x, y, val };
|
|
6767
6786
|
});
|
|
6768
|
-
const c =
|
|
6787
|
+
const c = chunkEFSQW6S5_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
|
|
6769
6788
|
lineElements.push(
|
|
6770
6789
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6771
6790
|
"polyline",
|
|
@@ -6792,7 +6811,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6792
6811
|
textAnchor: "middle",
|
|
6793
6812
|
fontSize: 7,
|
|
6794
6813
|
fill: "#334155",
|
|
6795
|
-
children:
|
|
6814
|
+
children: chunkEFSQW6S5_js.formatAxisValue(p.val)
|
|
6796
6815
|
},
|
|
6797
6816
|
`${element.id}-combo-line-dl-${si}-${vi}`
|
|
6798
6817
|
)
|
|
@@ -6808,7 +6827,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6808
6827
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6809
6828
|
preserveAspectRatio: "none",
|
|
6810
6829
|
children: [
|
|
6811
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6830
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6812
6831
|
renderChrome(
|
|
6813
6832
|
element.id,
|
|
6814
6833
|
chartData,
|
|
@@ -7938,14 +7957,14 @@ function buildNotesPdf(pages) {
|
|
|
7938
7957
|
notes: page.notes,
|
|
7939
7958
|
slideNumber: page.slideNumber
|
|
7940
7959
|
}));
|
|
7941
|
-
const bytes =
|
|
7960
|
+
const bytes = chunkEFSQW6S5_js.buildNotesPdfBytes(images, meta);
|
|
7942
7961
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7943
7962
|
return URL.createObjectURL(blob);
|
|
7944
7963
|
}
|
|
7945
7964
|
|
|
7946
7965
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
7947
7966
|
function buildPdfFromImageData(images) {
|
|
7948
|
-
const bytes =
|
|
7967
|
+
const bytes = chunkEFSQW6S5_js.buildSlidesPdfBytes(images);
|
|
7949
7968
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7950
7969
|
return URL.createObjectURL(blob);
|
|
7951
7970
|
}
|
|
@@ -7954,7 +7973,7 @@ function buildPdfFromImageData(images) {
|
|
|
7954
7973
|
var activePreview = null;
|
|
7955
7974
|
function startPreviewAnimation(elementId, preset, options) {
|
|
7956
7975
|
stopPreviewAnimation();
|
|
7957
|
-
const descriptor =
|
|
7976
|
+
const descriptor = chunkEFSQW6S5_js.buildPreviewAnimation(preset, options);
|
|
7958
7977
|
if (!descriptor) {
|
|
7959
7978
|
return;
|
|
7960
7979
|
}
|
|
@@ -7967,7 +7986,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
7967
7986
|
return;
|
|
7968
7987
|
}
|
|
7969
7988
|
const stage = domEl.offsetParent;
|
|
7970
|
-
const descriptor =
|
|
7989
|
+
const descriptor = chunkEFSQW6S5_js.buildMotionPathPreview({
|
|
7971
7990
|
path,
|
|
7972
7991
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
7973
7992
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|