pptx-react-viewer 2.16.6 → 2.16.7
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-NQFSMKIJ.mjs → AiChatPanel-2YYL6AKX.mjs} +3 -9
- package/dist/AiChatPanel-2YYL6AKX.mjs.br +0 -0
- package/dist/AiChatPanel-2YYL6AKX.mjs.gz +0 -0
- package/dist/{AiChatPanel-T6UN6LME.js → AiChatPanel-XSXMU2Q5.js} +23 -29
- package/dist/AiChatPanel-XSXMU2Q5.js.br +0 -0
- package/dist/AiChatPanel-XSXMU2Q5.js.gz +0 -0
- package/dist/{Model3DScene-SIST7CIH.js → Model3DScene-36UJZLCO.js} +2 -2
- package/dist/Model3DScene-36UJZLCO.js.br +0 -0
- package/dist/Model3DScene-36UJZLCO.js.gz +0 -0
- package/dist/{Model3DScene-4D4GSRIB.mjs → Model3DScene-NVFP3JBJ.mjs} +1 -1
- package/dist/Model3DScene-NVFP3JBJ.mjs.br +0 -0
- package/dist/Model3DScene-NVFP3JBJ.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-ZT7L27U4.mjs → SurfaceChart3DScene-BMFEDBLF.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-ZT7L27U4.mjs.br → SurfaceChart3DScene-BMFEDBLF.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-BMFEDBLF.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-GRM24VBC.js → SurfaceChart3DScene-W6I255VU.js} +2 -2
- package/dist/SurfaceChart3DScene-W6I255VU.js.br +0 -0
- package/dist/SurfaceChart3DScene-W6I255VU.js.gz +0 -0
- package/dist/{chunk-DYGKE2LY.js → chunk-77TMRPDU.js} +2128 -1541
- package/dist/chunk-77TMRPDU.js.br +0 -0
- package/dist/chunk-77TMRPDU.js.gz +0 -0
- package/dist/{chunk-PUBYHZYJ.mjs → chunk-D5TAZ5NL.mjs} +1132 -6
- package/dist/chunk-D5TAZ5NL.mjs.br +0 -0
- package/dist/chunk-D5TAZ5NL.mjs.gz +0 -0
- package/dist/{chunk-YZHBUMVU.mjs → chunk-J56KVWI5.mjs} +1114 -527
- package/dist/chunk-J56KVWI5.mjs.br +0 -0
- package/dist/chunk-J56KVWI5.mjs.gz +0 -0
- package/dist/{chunk-6F76GHPE.mjs → chunk-J5V7UCD2.mjs} +15 -1410
- package/dist/chunk-J5V7UCD2.mjs.br +0 -0
- package/dist/chunk-J5V7UCD2.mjs.gz +0 -0
- package/dist/{chunk-YDYAOW6D.js → chunk-JSJZWA43.js} +9 -3
- package/dist/chunk-JSJZWA43.js.br +0 -0
- package/dist/chunk-JSJZWA43.js.gz +0 -0
- package/dist/{chunk-NI5GSVZU.mjs → chunk-KVNZGR3L.mjs} +6 -91
- package/dist/chunk-KVNZGR3L.mjs.br +0 -0
- package/dist/chunk-KVNZGR3L.mjs.gz +0 -0
- package/dist/{chunk-H36QL5T5.js → chunk-NFJLF7TX.js} +258 -1683
- package/dist/chunk-NFJLF7TX.js.br +0 -0
- package/dist/chunk-NFJLF7TX.js.gz +0 -0
- package/dist/{chunk-VDQD3ZOU.mjs → chunk-QNKJUUKD.mjs} +7 -2
- package/dist/chunk-QNKJUUKD.mjs.br +0 -0
- package/dist/chunk-QNKJUUKD.mjs.gz +0 -0
- package/dist/{chunk-GUDJDY4J.js → chunk-S7HPAJRX.js} +342 -427
- package/dist/chunk-S7HPAJRX.js.br +0 -0
- package/dist/chunk-S7HPAJRX.js.gz +0 -0
- package/dist/{chunk-RZYOOWZN.js → chunk-USAJMMF2.js} +1165 -13
- package/dist/chunk-USAJMMF2.js.br +0 -0
- package/dist/chunk-USAJMMF2.js.gz +0 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +39 -39
- 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 +27 -7
- package/dist/internals.d.ts.map +1 -1
- 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/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{useViewerBuildingBlocks-DpzU8NZ_.d.ts → useViewerBuildingBlocks-Xddn6SFj.d.ts} +13 -1
- package/dist/useViewerBuildingBlocks-Xddn6SFj.d.ts.map +1 -0
- package/dist/viewer/index.js +26 -26
- 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-NQFSMKIJ.mjs.br +0 -0
- package/dist/AiChatPanel-NQFSMKIJ.mjs.gz +0 -0
- package/dist/AiChatPanel-T6UN6LME.js.br +0 -0
- package/dist/AiChatPanel-T6UN6LME.js.gz +0 -0
- package/dist/Model3DScene-4D4GSRIB.mjs.br +0 -0
- package/dist/Model3DScene-4D4GSRIB.mjs.gz +0 -0
- package/dist/Model3DScene-SIST7CIH.js.br +0 -0
- package/dist/Model3DScene-SIST7CIH.js.gz +0 -0
- package/dist/SurfaceChart3DScene-GRM24VBC.js.br +0 -0
- package/dist/SurfaceChart3DScene-GRM24VBC.js.gz +0 -0
- package/dist/SurfaceChart3DScene-ZT7L27U4.mjs.gz +0 -0
- package/dist/chunk-6F76GHPE.mjs.br +0 -0
- package/dist/chunk-6F76GHPE.mjs.gz +0 -0
- package/dist/chunk-DYGKE2LY.js.br +0 -0
- package/dist/chunk-DYGKE2LY.js.gz +0 -0
- package/dist/chunk-GUDJDY4J.js.br +0 -0
- package/dist/chunk-GUDJDY4J.js.gz +0 -0
- package/dist/chunk-H36QL5T5.js.br +0 -0
- package/dist/chunk-H36QL5T5.js.gz +0 -0
- package/dist/chunk-NI5GSVZU.mjs.br +0 -0
- package/dist/chunk-NI5GSVZU.mjs.gz +0 -0
- package/dist/chunk-PUBYHZYJ.mjs.br +0 -0
- package/dist/chunk-PUBYHZYJ.mjs.gz +0 -0
- package/dist/chunk-RZYOOWZN.js.br +0 -0
- package/dist/chunk-RZYOOWZN.js.gz +0 -0
- package/dist/chunk-VDQD3ZOU.mjs.br +0 -0
- package/dist/chunk-VDQD3ZOU.mjs.gz +0 -0
- package/dist/chunk-YDYAOW6D.js.br +0 -0
- package/dist/chunk-YDYAOW6D.js.gz +0 -0
- package/dist/chunk-YZHBUMVU.mjs.br +0 -0
- package/dist/chunk-YZHBUMVU.mjs.gz +0 -0
- package/dist/useViewerBuildingBlocks-DpzU8NZ_.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDVZF4ARG_js = require('./chunk-DVZF4ARG.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkUSAJMMF2_js = require('./chunk-USAJMMF2.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 chunkUSAJMMF2_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 chunkUSAJMMF2_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 = chunkUSAJMMF2_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 = chunkUSAJMMF2_js.SHAPE_PRESET_DEFS.map(
|
|
111
111
|
(def) => ({
|
|
112
112
|
type: def.type,
|
|
113
113
|
label: def.label,
|
|
@@ -266,39 +266,16 @@ function isConnectorOrLineElement(element) {
|
|
|
266
266
|
if (element.type === "connector") {
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
|
-
if (!
|
|
269
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
272
|
const st = getShapeType(element.shapeType);
|
|
273
273
|
return st === "connector" || st === "line" || element.shapeType === "line";
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
// src/viewer/utils/template-editing.ts
|
|
277
|
-
function partitionTemplateElements(slides) {
|
|
278
|
-
const templateElementsBySlideId = {};
|
|
279
|
-
const nextSlides = slides.map((slide) => {
|
|
280
|
-
const template = slide.elements.filter((el) => chunkRZYOOWZN_js.isTemplateElement(el));
|
|
281
|
-
if (template.length === 0) {
|
|
282
|
-
return slide;
|
|
283
|
-
}
|
|
284
|
-
templateElementsBySlideId[slide.id] = template;
|
|
285
|
-
return { ...slide, elements: slide.elements.filter((el) => !chunkRZYOOWZN_js.isTemplateElement(el)) };
|
|
286
|
-
});
|
|
287
|
-
return { slides: nextSlides, templateElementsBySlideId };
|
|
288
|
-
}
|
|
289
|
-
function buildSaveSlides(slides, templateElementsBySlideId) {
|
|
290
|
-
return slides.map((slide) => {
|
|
291
|
-
const template = templateElementsBySlideId[slide.id];
|
|
292
|
-
if (!template || template.length === 0) {
|
|
293
|
-
return slide;
|
|
294
|
-
}
|
|
295
|
-
return { ...slide, elements: [...template, ...slide.elements] };
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
|
|
299
276
|
// src/viewer/utils/image-style.ts
|
|
300
277
|
function getImageMaskStyle(element) {
|
|
301
|
-
if (!
|
|
278
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
302
279
|
return void 0;
|
|
303
280
|
}
|
|
304
281
|
const shapeType = element.shapeType;
|
|
@@ -307,7 +284,7 @@ function getImageMaskStyle(element) {
|
|
|
307
284
|
}
|
|
308
285
|
const normalized = shapeType.toLowerCase();
|
|
309
286
|
if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
|
|
310
|
-
const radiusPx =
|
|
287
|
+
const radiusPx = chunkUSAJMMF2_js.getRoundRectRadiusPx2(element);
|
|
311
288
|
if (radiusPx <= 0.01) {
|
|
312
289
|
return void 0;
|
|
313
290
|
}
|
|
@@ -319,7 +296,7 @@ function getImageMaskStyle(element) {
|
|
|
319
296
|
if (normalized === "can" || normalized === "cylinder") {
|
|
320
297
|
return { borderRadius: "48% / 12%" };
|
|
321
298
|
}
|
|
322
|
-
const clipPath =
|
|
299
|
+
const clipPath = chunkUSAJMMF2_js.getResolvedShapeClipPath(element);
|
|
323
300
|
if (!clipPath) {
|
|
324
301
|
return void 0;
|
|
325
302
|
}
|
|
@@ -328,7 +305,7 @@ function getImageMaskStyle(element) {
|
|
|
328
305
|
function getImageRenderStyle(element) {
|
|
329
306
|
return {
|
|
330
307
|
...getImageMaskStyle(element) || {},
|
|
331
|
-
...
|
|
308
|
+
...chunkUSAJMMF2_js.getImageFitStyle(element)
|
|
332
309
|
};
|
|
333
310
|
}
|
|
334
311
|
var CROP_SHAPE_CLIP_PATHS = {
|
|
@@ -341,7 +318,7 @@ var CROP_SHAPE_CLIP_PATHS = {
|
|
|
341
318
|
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
342
319
|
};
|
|
343
320
|
function getCropShapeClipPath(element) {
|
|
344
|
-
if (!
|
|
321
|
+
if (!chunkUSAJMMF2_js.isImageLikeElement(element)) {
|
|
345
322
|
return void 0;
|
|
346
323
|
}
|
|
347
324
|
const shape = element.cropShape;
|
|
@@ -351,7 +328,7 @@ function getCropShapeClipPath(element) {
|
|
|
351
328
|
return CROP_SHAPE_CLIP_PATHS[shape];
|
|
352
329
|
}
|
|
353
330
|
function isImageTiled(element) {
|
|
354
|
-
if (!
|
|
331
|
+
if (!chunkUSAJMMF2_js.isImageLikeElement(element)) {
|
|
355
332
|
return false;
|
|
356
333
|
}
|
|
357
334
|
return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
|
|
@@ -409,7 +386,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
|
|
|
409
386
|
};
|
|
410
387
|
}
|
|
411
388
|
function getImageTilingStyle(element) {
|
|
412
|
-
if (!
|
|
389
|
+
if (!chunkUSAJMMF2_js.isImageLikeElement(element) || !isImageTiled(element)) {
|
|
413
390
|
return void 0;
|
|
414
391
|
}
|
|
415
392
|
const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
|
|
@@ -629,9 +606,9 @@ function registerMediaElement(elementId, el) {
|
|
|
629
606
|
};
|
|
630
607
|
}
|
|
631
608
|
function executeMediaCommand(command, frameRoot) {
|
|
632
|
-
return
|
|
609
|
+
return chunkUSAJMMF2_js.runMediaCommand(
|
|
633
610
|
command,
|
|
634
|
-
(targetId) => registry.get(targetId) ??
|
|
611
|
+
(targetId) => registry.get(targetId) ?? chunkUSAJMMF2_js.findMediaElementByElementId(targetId, frameRoot?.())
|
|
635
612
|
);
|
|
636
613
|
}
|
|
637
614
|
function PresentationMediaController({
|
|
@@ -675,7 +652,7 @@ function PresentationMediaController({
|
|
|
675
652
|
loop: shouldLoop,
|
|
676
653
|
volume: playbackVolume,
|
|
677
654
|
playbackRate
|
|
678
|
-
} =
|
|
655
|
+
} = chunkUSAJMMF2_js.mediaPlaybackAttributes({
|
|
679
656
|
loop: element.loop,
|
|
680
657
|
volume: element.volume,
|
|
681
658
|
playbackSpeed: element.playbackSpeed
|
|
@@ -811,7 +788,7 @@ function PresentationMediaController({
|
|
|
811
788
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
812
789
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
813
790
|
if (dataUrl) {
|
|
814
|
-
|
|
791
|
+
chunkUSAJMMF2_js.registerPersistentAudio(
|
|
815
792
|
element.id,
|
|
816
793
|
dataUrl,
|
|
817
794
|
element.mediaMimeType,
|
|
@@ -909,17 +886,17 @@ function Badge({
|
|
|
909
886
|
"div",
|
|
910
887
|
{
|
|
911
888
|
className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
|
|
912
|
-
...{ [
|
|
889
|
+
...{ [chunkUSAJMMF2_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
|
|
913
890
|
children: [
|
|
914
891
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
915
892
|
FallbackIcon,
|
|
916
893
|
{
|
|
917
|
-
paths:
|
|
894
|
+
paths: chunkUSAJMMF2_js.mediaFallbackIcon(visual, element.mediaType),
|
|
918
895
|
size: isMissing ? 32 : 48,
|
|
919
896
|
className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
|
|
920
897
|
}
|
|
921
898
|
),
|
|
922
|
-
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(
|
|
899
|
+
isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkUSAJMMF2_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
923
900
|
]
|
|
924
901
|
}
|
|
925
902
|
);
|
|
@@ -936,17 +913,17 @@ function Placeholder({
|
|
|
936
913
|
"div",
|
|
937
914
|
{
|
|
938
915
|
className: `w-full h-full flex flex-col items-center justify-center gap-1 pointer-events-none rounded ${isMissing ? "bg-black/30 border border-dashed border-white/20" : element.mediaType === "audio" ? "bg-black/10" : "bg-black/20"}`,
|
|
939
|
-
...{ [
|
|
916
|
+
...{ [chunkUSAJMMF2_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
|
|
940
917
|
children: [
|
|
941
918
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
942
919
|
FallbackIcon,
|
|
943
920
|
{
|
|
944
|
-
paths:
|
|
921
|
+
paths: chunkUSAJMMF2_js.mediaFallbackIcon(visual, element.mediaType),
|
|
945
922
|
size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
|
|
946
923
|
className: isMissing ? "text-white/50" : "text-white/70"
|
|
947
924
|
}
|
|
948
925
|
),
|
|
949
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(
|
|
926
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkUSAJMMF2_js.mediaFallbackLabelKey(visual, element.mediaType)) })
|
|
950
927
|
]
|
|
951
928
|
}
|
|
952
929
|
);
|
|
@@ -956,7 +933,7 @@ function renderMediaFallback({
|
|
|
956
933
|
posterUrl,
|
|
957
934
|
surface
|
|
958
935
|
}) {
|
|
959
|
-
const visual =
|
|
936
|
+
const visual = chunkUSAJMMF2_js.mediaFallbackVisual(surface, {
|
|
960
937
|
hasPoster: Boolean(posterUrl),
|
|
961
938
|
missing: element.mediaMissing === true
|
|
962
939
|
});
|
|
@@ -985,7 +962,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
985
962
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
986
963
|
const trimFragment = buildTrimFragment(element);
|
|
987
964
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
988
|
-
const shouldLoop =
|
|
965
|
+
const shouldLoop = chunkUSAJMMF2_js.mediaPlaybackAttributes(element).loop;
|
|
989
966
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
990
967
|
const isFullScreen = options?.fullScreen === true;
|
|
991
968
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -1068,7 +1045,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1068
1045
|
|
|
1069
1046
|
// src/viewer/utils/text-utils.tsx
|
|
1070
1047
|
function getTextStyleForElement(element, fallbackColor) {
|
|
1071
|
-
return
|
|
1048
|
+
return chunkUSAJMMF2_js.buildTextBlockStyle(element, { fallbackColor });
|
|
1072
1049
|
}
|
|
1073
1050
|
|
|
1074
1051
|
// src/viewer/utils/text-layout.tsx
|
|
@@ -1093,13 +1070,13 @@ function computeTabSize(tabStops, defaultTabSize) {
|
|
|
1093
1070
|
return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
|
|
1094
1071
|
}
|
|
1095
1072
|
function getTextLayoutStyle(element) {
|
|
1096
|
-
if (!
|
|
1073
|
+
if (!chunkUSAJMMF2_js.hasTextProperties(element)) {
|
|
1097
1074
|
return {};
|
|
1098
1075
|
}
|
|
1099
1076
|
const verticalAlign = element.textStyle?.vAlign || "top";
|
|
1100
|
-
const writingMode =
|
|
1101
|
-
const textOrientation =
|
|
1102
|
-
const verticalDirection =
|
|
1077
|
+
const writingMode = chunkUSAJMMF2_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
1078
|
+
const textOrientation = chunkUSAJMMF2_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
1079
|
+
const verticalDirection = chunkUSAJMMF2_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
1103
1080
|
const parsedColumnCount = Number(element.textStyle?.columnCount);
|
|
1104
1081
|
const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
|
|
1105
1082
|
const hasColumns = columnCount > 1;
|
|
@@ -1107,7 +1084,7 @@ function getTextLayoutStyle(element) {
|
|
|
1107
1084
|
const tabStops = element.textStyle?.tabStops;
|
|
1108
1085
|
const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
|
|
1109
1086
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
1110
|
-
const hasParagraphIndents =
|
|
1087
|
+
const hasParagraphIndents = chunkUSAJMMF2_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
1111
1088
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
1112
1089
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
1113
1090
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -1116,7 +1093,7 @@ function getTextLayoutStyle(element) {
|
|
|
1116
1093
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
1117
1094
|
const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
|
|
1118
1095
|
const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
|
|
1119
|
-
const kinsokuStyles =
|
|
1096
|
+
const kinsokuStyles = chunkUSAJMMF2_js.getKinsokuLineBreakStyles(element.textStyle);
|
|
1120
1097
|
if (hasColumns) {
|
|
1121
1098
|
return {
|
|
1122
1099
|
display: "block",
|
|
@@ -1163,10 +1140,10 @@ function getTextLayoutStyle(element) {
|
|
|
1163
1140
|
|
|
1164
1141
|
// src/viewer/utils/text-effects.tsx
|
|
1165
1142
|
function buildTextFillCss2(style) {
|
|
1166
|
-
return
|
|
1143
|
+
return chunkUSAJMMF2_js.buildTextFillCss(style);
|
|
1167
1144
|
}
|
|
1168
1145
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
1169
|
-
return
|
|
1146
|
+
return chunkUSAJMMF2_js.buildTextBody3DSceneStyle(textStyle);
|
|
1170
1147
|
}
|
|
1171
1148
|
|
|
1172
1149
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1351,13 +1328,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1351
1328
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1352
1329
|
return renderedSegments;
|
|
1353
1330
|
}
|
|
1354
|
-
const paraKey = `${elementId}${
|
|
1331
|
+
const paraKey = `${elementId}${chunkUSAJMMF2_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1355
1332
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1356
1333
|
if (paraState) {
|
|
1357
1334
|
const style = buildAnimStyle(paraState);
|
|
1358
1335
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1359
1336
|
}
|
|
1360
|
-
const spec =
|
|
1337
|
+
const spec = chunkUSAJMMF2_js.buildTextBuildSpec(
|
|
1361
1338
|
elementId,
|
|
1362
1339
|
paraIndex,
|
|
1363
1340
|
paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
|
|
@@ -1375,7 +1352,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1375
1352
|
"span",
|
|
1376
1353
|
{
|
|
1377
1354
|
"data-anim-id": span.animId,
|
|
1378
|
-
style:
|
|
1355
|
+
style: chunkUSAJMMF2_js.textBuildSpanStyle(span),
|
|
1379
1356
|
children: content
|
|
1380
1357
|
},
|
|
1381
1358
|
span.animId
|
|
@@ -1519,10 +1496,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1519
1496
|
if (!needsScriptFonts || !text) {
|
|
1520
1497
|
return text;
|
|
1521
1498
|
}
|
|
1522
|
-
const runs =
|
|
1499
|
+
const runs = chunkUSAJMMF2_js.segmentByScript(text);
|
|
1523
1500
|
if (runs.length <= 1) {
|
|
1524
1501
|
if (runs.length === 1) {
|
|
1525
|
-
const font =
|
|
1502
|
+
const font = chunkUSAJMMF2_js.resolveFontForScript(runs[0].script, scriptFonts);
|
|
1526
1503
|
if (font && font !== baseFontFamily) {
|
|
1527
1504
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
|
|
1528
1505
|
}
|
|
@@ -1530,7 +1507,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1530
1507
|
return text;
|
|
1531
1508
|
}
|
|
1532
1509
|
return runs.map((run, i) => {
|
|
1533
|
-
const font =
|
|
1510
|
+
const font = chunkUSAJMMF2_js.resolveFontForScript(run.script, scriptFonts);
|
|
1534
1511
|
if (!font || font === baseFontFamily) {
|
|
1535
1512
|
return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
|
|
1536
1513
|
}
|
|
@@ -1541,14 +1518,14 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1541
1518
|
if (!metric || !text) {
|
|
1542
1519
|
return inner(text, keyPrefix);
|
|
1543
1520
|
}
|
|
1544
|
-
const pieces =
|
|
1521
|
+
const pieces = chunkUSAJMMF2_js.splitRunForMetrics(text, metric.font);
|
|
1545
1522
|
if (pieces.length <= 1) {
|
|
1546
1523
|
return inner(text, keyPrefix);
|
|
1547
1524
|
}
|
|
1548
1525
|
return pieces.map((piece, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1549
1526
|
"span",
|
|
1550
1527
|
{
|
|
1551
|
-
style: { letterSpacing:
|
|
1528
|
+
style: { letterSpacing: chunkUSAJMMF2_js.pieceLetterSpacing(metric.authoredPx, piece.tracking) },
|
|
1552
1529
|
children: inner(piece.text, `${keyPrefix}-w${i}`)
|
|
1553
1530
|
},
|
|
1554
1531
|
`${keyPrefix}-w${i}`
|
|
@@ -1619,8 +1596,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1619
1596
|
});
|
|
1620
1597
|
}
|
|
1621
1598
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1622
|
-
const mathml =
|
|
1623
|
-
const safeMathml = mathml ?
|
|
1599
|
+
const mathml = chunkUSAJMMF2_js.convertOmmlToMathMl(equationXml);
|
|
1600
|
+
const safeMathml = mathml ? chunkUSAJMMF2_js.sanitizeMathMl(mathml) : "";
|
|
1624
1601
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1625
1602
|
"span",
|
|
1626
1603
|
{
|
|
@@ -1670,7 +1647,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1670
1647
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
|
|
1671
1648
|
}
|
|
1672
1649
|
function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
|
|
1673
|
-
const picture =
|
|
1650
|
+
const picture = chunkUSAJMMF2_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
|
|
1674
1651
|
sizePx: baseFontSize,
|
|
1675
1652
|
fallbackMarker: "\u2022",
|
|
1676
1653
|
accessibleLabel: "Bullet"
|
|
@@ -1721,7 +1698,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1721
1698
|
}
|
|
1722
1699
|
const segmentStyle = segment.style || {};
|
|
1723
1700
|
const rawText = bulletInfo && typeof bulletHangPx === "number" ? (segment.text || "").trimEnd() : segment.text || "";
|
|
1724
|
-
const textValue =
|
|
1701
|
+
const textValue = chunkUSAJMMF2_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
|
|
1725
1702
|
const lines = textValue.split("\n");
|
|
1726
1703
|
const textDecorationTokens = [];
|
|
1727
1704
|
if (segmentStyle.underline || segmentStyle.hyperlink) {
|
|
@@ -1731,8 +1708,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1731
1708
|
textDecorationTokens.push("line-through");
|
|
1732
1709
|
}
|
|
1733
1710
|
const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
|
|
1734
|
-
const resolvedSegmentColor = segmentStyle.hyperlink ?
|
|
1735
|
-
const underlineDecoration =
|
|
1711
|
+
const resolvedSegmentColor = segmentStyle.hyperlink ? chunkUSAJMMF2_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkUSAJMMF2_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
|
|
1712
|
+
const underlineDecoration = chunkUSAJMMF2_js.resolveUnderlineDecorationStyle(
|
|
1736
1713
|
Boolean(isDoubleStrike),
|
|
1737
1714
|
segmentStyle.underlineStyle
|
|
1738
1715
|
);
|
|
@@ -1742,17 +1719,17 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1742
1719
|
const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
|
|
1743
1720
|
const textFillStyles = buildTextFillCss2(segmentStyle);
|
|
1744
1721
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1745
|
-
const autoFitScale =
|
|
1722
|
+
const autoFitScale = chunkUSAJMMF2_js.resolveAutoFitFontScale(element.textStyle);
|
|
1746
1723
|
const baseFontSize = rawFontSize * autoFitScale;
|
|
1747
1724
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1748
1725
|
const baseFontSizePt = baseFontSize * (72 / 96);
|
|
1749
1726
|
const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
|
|
1750
1727
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1751
|
-
const baseFontFamily = rawFontFamily ?
|
|
1728
|
+
const baseFontFamily = rawFontFamily ? chunkUSAJMMF2_js.getSubstituteFontFamily(
|
|
1752
1729
|
rawFontFamily,
|
|
1753
|
-
|
|
1730
|
+
chunkUSAJMMF2_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1754
1731
|
) : DEFAULT_FONT_FAMILY2;
|
|
1755
|
-
const scriptFont = (name, panose) => name ?
|
|
1732
|
+
const scriptFont = (name, panose) => name ? chunkUSAJMMF2_js.getSubstituteFontFamily(name, chunkUSAJMMF2_js.parsePanoseString(panose)) : baseFontFamily;
|
|
1756
1733
|
const scriptFonts = {
|
|
1757
1734
|
latin: baseFontFamily,
|
|
1758
1735
|
eastAsia: scriptFont(
|
|
@@ -1768,7 +1745,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1768
1745
|
segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
|
|
1769
1746
|
)
|
|
1770
1747
|
};
|
|
1771
|
-
const needsScriptFonts =
|
|
1748
|
+
const needsScriptFonts = chunkUSAJMMF2_js.hasDistinctScriptFonts(scriptFonts);
|
|
1772
1749
|
const metricFont = {
|
|
1773
1750
|
fontFamily: baseFontFamily,
|
|
1774
1751
|
fontSizePx: baseFontSize * baselineFontScale,
|
|
@@ -1776,9 +1753,9 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1776
1753
|
italic: Boolean(segmentStyle.italic)
|
|
1777
1754
|
};
|
|
1778
1755
|
const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing };
|
|
1779
|
-
const letterSpacing =
|
|
1756
|
+
const letterSpacing = chunkUSAJMMF2_js.pieceLetterSpacing(
|
|
1780
1757
|
authoredLetterSpacing,
|
|
1781
|
-
|
|
1758
|
+
chunkUSAJMMF2_js.resolveMetricTrackingPx(textValue, metricFont)
|
|
1782
1759
|
);
|
|
1783
1760
|
const spanStyle = {
|
|
1784
1761
|
color: resolvedSegmentColor,
|
|
@@ -1797,15 +1774,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1797
1774
|
fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
|
|
1798
1775
|
letterSpacing,
|
|
1799
1776
|
fontKerning,
|
|
1800
|
-
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ?
|
|
1777
|
+
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkUSAJMMF2_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
|
|
1801
1778
|
...textFillStyles,
|
|
1802
|
-
textDecorationColor: segmentStyle.underlineColor ?
|
|
1803
|
-
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${
|
|
1779
|
+
textDecorationColor: segmentStyle.underlineColor ? chunkUSAJMMF2_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
|
|
1780
|
+
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkUSAJMMF2_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
|
|
1804
1781
|
paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
|
|
1805
|
-
textShadow:
|
|
1806
|
-
filter:
|
|
1807
|
-
opacity:
|
|
1808
|
-
WebkitBoxReflect:
|
|
1782
|
+
textShadow: chunkUSAJMMF2_js.buildTextShadowCss(segmentStyle),
|
|
1783
|
+
filter: chunkUSAJMMF2_js.buildTextRunFilterChain(segmentStyle),
|
|
1784
|
+
opacity: chunkUSAJMMF2_js.getTextAlphaOpacity(segmentStyle),
|
|
1785
|
+
WebkitBoxReflect: chunkUSAJMMF2_js.buildTextReflectionCss(segmentStyle)
|
|
1809
1786
|
};
|
|
1810
1787
|
const runRtl = segmentStyle.rtl;
|
|
1811
1788
|
if (runRtl !== void 0 && runRtl !== paragraphRtl) {
|
|
@@ -1825,7 +1802,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1825
1802
|
spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
|
|
1826
1803
|
}
|
|
1827
1804
|
if (bulletInfo.color) {
|
|
1828
|
-
spanStyle.color =
|
|
1805
|
+
spanStyle.color = chunkUSAJMMF2_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
|
|
1829
1806
|
}
|
|
1830
1807
|
if (typeof bulletHangPx === "number" && bulletHangPx > 0) {
|
|
1831
1808
|
spanStyle.display = "inline-block";
|
|
@@ -1871,7 +1848,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1871
1848
|
textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
|
|
1872
1849
|
};
|
|
1873
1850
|
if (segment.rubyStyle?.color) {
|
|
1874
|
-
rubyStyle.color =
|
|
1851
|
+
rubyStyle.color = chunkUSAJMMF2_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
|
|
1875
1852
|
}
|
|
1876
1853
|
innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
|
|
1877
1854
|
baseContent,
|
|
@@ -1923,31 +1900,6 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1923
1900
|
}
|
|
1924
1901
|
return spanNode;
|
|
1925
1902
|
}
|
|
1926
|
-
|
|
1927
|
-
// src/viewer/utils/text-paragraph-spacing.ts
|
|
1928
|
-
var PT_TO_PX = 96 / 72;
|
|
1929
|
-
function resolveParagraphSpacing(input) {
|
|
1930
|
-
const { paraProps, bodyStyle, isFirst, isLast, spaceFirstLast } = input;
|
|
1931
|
-
const result = {};
|
|
1932
|
-
const before = paraProps?.paragraphSpacingBefore ?? bodyStyle?.paragraphSpacingBefore;
|
|
1933
|
-
if (typeof before === "number" && before > 0 && (!isFirst || spaceFirstLast)) {
|
|
1934
|
-
result.marginTop = before;
|
|
1935
|
-
}
|
|
1936
|
-
const after = paraProps?.paragraphSpacingAfter ?? bodyStyle?.paragraphSpacingAfter;
|
|
1937
|
-
if (typeof after === "number" && after > 0 && (!isLast || spaceFirstLast)) {
|
|
1938
|
-
result.marginBottom = after;
|
|
1939
|
-
}
|
|
1940
|
-
const hasOwnLine = paraProps?.lineSpacing !== void 0 || paraProps?.lineSpacingExactPt !== void 0;
|
|
1941
|
-
const lineSrc = hasOwnLine ? paraProps : bodyStyle;
|
|
1942
|
-
const exactPt = lineSrc?.lineSpacingExactPt;
|
|
1943
|
-
const multiplier = lineSrc?.lineSpacing;
|
|
1944
|
-
if (typeof exactPt === "number" && exactPt > 0) {
|
|
1945
|
-
result.lineHeight = `${exactPt * PT_TO_PX}px`;
|
|
1946
|
-
} else if (typeof multiplier === "number" && multiplier > 0) {
|
|
1947
|
-
result.lineHeight = chunkRZYOOWZN_js.proportionalLineHeight(multiplier);
|
|
1948
|
-
}
|
|
1949
|
-
return result;
|
|
1950
|
-
}
|
|
1951
1903
|
function groupSegmentsIntoParagraphs(segments) {
|
|
1952
1904
|
const paragraphs = [];
|
|
1953
1905
|
let current = [];
|
|
@@ -1966,7 +1918,7 @@ function groupSegmentsIntoParagraphs(segments) {
|
|
|
1966
1918
|
return paragraphs;
|
|
1967
1919
|
}
|
|
1968
1920
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
1969
|
-
if (!
|
|
1921
|
+
if (!chunkUSAJMMF2_js.hasTextProperties(element)) {
|
|
1970
1922
|
return emptyFallback || null;
|
|
1971
1923
|
}
|
|
1972
1924
|
const effectiveSegments = segmentOverrides ?? element.textSegments;
|
|
@@ -1987,10 +1939,10 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1987
1939
|
return element.text || emptyFallback || "";
|
|
1988
1940
|
}
|
|
1989
1941
|
const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
|
|
1990
|
-
const paragraphIndents =
|
|
1991
|
-
const elementRtl =
|
|
1992
|
-
const elementAlign =
|
|
1993
|
-
const bodyStyle =
|
|
1942
|
+
const paragraphIndents = chunkUSAJMMF2_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
|
|
1943
|
+
const elementRtl = chunkUSAJMMF2_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
|
|
1944
|
+
const elementAlign = chunkUSAJMMF2_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
|
|
1945
|
+
const bodyStyle = chunkUSAJMMF2_js.hasTextProperties(element) ? element.textStyle : void 0;
|
|
1994
1946
|
const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
|
|
1995
1947
|
return paragraphs.map(({ entries: paraSegments, terminator }, paraIndex) => {
|
|
1996
1948
|
const paraIndent = paragraphIndents?.[paraIndex];
|
|
@@ -2005,39 +1957,39 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2005
1957
|
return Boolean(segment.text) && segment.text.trim().length > 0;
|
|
2006
1958
|
});
|
|
2007
1959
|
const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
|
|
2008
|
-
const paraRtl =
|
|
1960
|
+
const paraRtl = chunkUSAJMMF2_js.resolveParagraphRtl(paraSegments, elementRtl);
|
|
2009
1961
|
const isRtlParagraph = paraRtl === true;
|
|
2010
|
-
const paraAlign =
|
|
2011
|
-
const cssTextAlign =
|
|
1962
|
+
const paraAlign = chunkUSAJMMF2_js.resolveParagraphAlign(paraSegments, elementAlign);
|
|
1963
|
+
const cssTextAlign = chunkUSAJMMF2_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
|
|
2012
1964
|
const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
|
|
2013
1965
|
const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
|
|
2014
1966
|
const paraTextIndent = rawTextIndent;
|
|
2015
|
-
const paraKinsokuStyle =
|
|
1967
|
+
const paraKinsokuStyle = chunkUSAJMMF2_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
|
|
2016
1968
|
const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
|
|
2017
1969
|
const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties ?? (paraSegments.length === 0 ? terminator?.paragraphProperties : void 0);
|
|
2018
|
-
const spacing = resolveParagraphSpacing({
|
|
1970
|
+
const spacing = chunkUSAJMMF2_js.resolveParagraphSpacing({
|
|
2019
1971
|
paraProps,
|
|
2020
1972
|
bodyStyle,
|
|
2021
1973
|
isFirst: paraIndex === 0,
|
|
2022
1974
|
isLast: paraIndex === paragraphs.length - 1,
|
|
2023
1975
|
spaceFirstLast
|
|
2024
1976
|
});
|
|
2025
|
-
const strutFontSize =
|
|
1977
|
+
const strutFontSize = chunkUSAJMMF2_js.resolveParagraphStrutFontSize(
|
|
2026
1978
|
paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
|
|
2027
1979
|
bodyStyle?.fontSize
|
|
2028
1980
|
);
|
|
2029
|
-
const hasParaSpacing = spacing.
|
|
1981
|
+
const hasParaSpacing = spacing.spaceBeforePx !== void 0 || spacing.spaceAfterPx !== void 0 || spacing.lineHeight !== void 0;
|
|
2030
1982
|
const paraStyle = {
|
|
2031
1983
|
...paraKinsokuStyle
|
|
2032
1984
|
};
|
|
2033
1985
|
if (strutFontSize !== void 0) {
|
|
2034
1986
|
paraStyle.fontSize = strutFontSize;
|
|
2035
1987
|
}
|
|
2036
|
-
if (spacing.
|
|
2037
|
-
paraStyle.marginTop = spacing.
|
|
1988
|
+
if (spacing.spaceBeforePx !== void 0) {
|
|
1989
|
+
paraStyle.marginTop = spacing.spaceBeforePx;
|
|
2038
1990
|
}
|
|
2039
|
-
if (spacing.
|
|
2040
|
-
paraStyle.marginBottom = spacing.
|
|
1991
|
+
if (spacing.spaceAfterPx !== void 0) {
|
|
1992
|
+
paraStyle.marginBottom = spacing.spaceAfterPx;
|
|
2041
1993
|
}
|
|
2042
1994
|
if (spacing.lineHeight !== void 0) {
|
|
2043
1995
|
paraStyle.lineHeight = spacing.lineHeight;
|
|
@@ -2126,13 +2078,13 @@ function hexToRgbUnit(hex) {
|
|
|
2126
2078
|
};
|
|
2127
2079
|
}
|
|
2128
2080
|
function getDuotoneColors(element) {
|
|
2129
|
-
if (!
|
|
2081
|
+
if (!chunkUSAJMMF2_js.isImageLikeElement(element)) {
|
|
2130
2082
|
return void 0;
|
|
2131
2083
|
}
|
|
2132
2084
|
return element.imageEffects?.duotone;
|
|
2133
2085
|
}
|
|
2134
2086
|
function buildLineShadowCss(element) {
|
|
2135
|
-
if (!
|
|
2087
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
2136
2088
|
return void 0;
|
|
2137
2089
|
}
|
|
2138
2090
|
const ss = element.shapeStyle;
|
|
@@ -2143,13 +2095,13 @@ function buildLineShadowCss(element) {
|
|
|
2143
2095
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
2144
2096
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
2145
2097
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
2146
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
2147
|
-
|
|
2098
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkUSAJMMF2_js.colorWithOpacity(
|
|
2099
|
+
chunkUSAJMMF2_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
2148
2100
|
opacity
|
|
2149
2101
|
)}`;
|
|
2150
2102
|
}
|
|
2151
2103
|
function buildLineGlowFilter(element) {
|
|
2152
|
-
if (!
|
|
2104
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
2153
2105
|
return void 0;
|
|
2154
2106
|
}
|
|
2155
2107
|
const ss = element.shapeStyle;
|
|
@@ -2158,7 +2110,7 @@ function buildLineGlowFilter(element) {
|
|
|
2158
2110
|
}
|
|
2159
2111
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
2160
2112
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
2161
|
-
const glowCol =
|
|
2113
|
+
const glowCol = chunkUSAJMMF2_js.colorWithOpacity(chunkUSAJMMF2_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
2162
2114
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
2163
2115
|
}
|
|
2164
2116
|
function mapDagBlendModeToCss(blend) {
|
|
@@ -2182,7 +2134,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
2182
2134
|
return `dag-duotone-${elementId}`;
|
|
2183
2135
|
}
|
|
2184
2136
|
function hasDagDuotoneEffect(element) {
|
|
2185
|
-
if (!
|
|
2137
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
2186
2138
|
return false;
|
|
2187
2139
|
}
|
|
2188
2140
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -2245,7 +2197,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
2245
2197
|
|
|
2246
2198
|
// src/viewer/utils/shape-visual-3d.ts
|
|
2247
2199
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
2248
|
-
return
|
|
2200
|
+
return chunkUSAJMMF2_js.build3DExtrusionData(
|
|
2249
2201
|
shape3d,
|
|
2250
2202
|
scene3d,
|
|
2251
2203
|
fillColor,
|
|
@@ -2254,7 +2206,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
2254
2206
|
);
|
|
2255
2207
|
}
|
|
2256
2208
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
2257
|
-
|
|
2209
|
+
chunkUSAJMMF2_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
2258
2210
|
}
|
|
2259
2211
|
|
|
2260
2212
|
// src/viewer/utils/shape-visual-style.ts
|
|
@@ -2262,43 +2214,43 @@ function getGradientTilingCss(style) {
|
|
|
2262
2214
|
if (!style || style.fillMode !== "gradient") {
|
|
2263
2215
|
return void 0;
|
|
2264
2216
|
}
|
|
2265
|
-
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" &&
|
|
2217
|
+
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunkUSAJMMF2_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
|
|
2266
2218
|
if (isStructuredLinear) {
|
|
2267
|
-
const flip =
|
|
2219
|
+
const flip = chunkUSAJMMF2_js.getGradientTileFlipCss(style.fillGradientFlip);
|
|
2268
2220
|
if (flip) {
|
|
2269
2221
|
return flip;
|
|
2270
2222
|
}
|
|
2271
2223
|
}
|
|
2272
|
-
return
|
|
2224
|
+
return chunkUSAJMMF2_js.getGradientTileRectCss(style.fillGradientTileRect);
|
|
2273
2225
|
}
|
|
2274
2226
|
function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2275
|
-
if (!
|
|
2227
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
2276
2228
|
return {};
|
|
2277
2229
|
}
|
|
2278
2230
|
const normalizedShapeType = getShapeType(element.shapeType);
|
|
2279
|
-
const clipPath =
|
|
2231
|
+
const clipPath = chunkUSAJMMF2_js.isIdentityRectClip(element) ? void 0 : chunkUSAJMMF2_js.getResolvedShapeClipPath(element);
|
|
2280
2232
|
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;
|
|
2281
|
-
const rendersStrokeOnlyPreset =
|
|
2233
|
+
const rendersStrokeOnlyPreset = chunkUSAJMMF2_js.isStrokeOnlyPresetElement(element);
|
|
2282
2234
|
const fillOpacity = element.shapeStyle?.fillOpacity;
|
|
2283
2235
|
const strokeOpacity = element.shapeStyle?.strokeOpacity;
|
|
2284
|
-
const strokeDash =
|
|
2285
|
-
const fillGradient =
|
|
2236
|
+
const strokeDash = chunkUSAJMMF2_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2237
|
+
const fillGradient = chunkUSAJMMF2_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
|
|
2286
2238
|
rotation: element.rotation,
|
|
2287
2239
|
width: element.width,
|
|
2288
2240
|
height: element.height
|
|
2289
2241
|
}) || element.shapeStyle?.fillGradient;
|
|
2290
|
-
const shadowCss =
|
|
2291
|
-
const innerShadowCss =
|
|
2292
|
-
const resolvedFillColor =
|
|
2293
|
-
const resolvedStrokeColor =
|
|
2242
|
+
const shadowCss = chunkUSAJMMF2_js.buildShadowCssFromShapeStyle(element.shapeStyle);
|
|
2243
|
+
const innerShadowCss = chunkUSAJMMF2_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
|
|
2244
|
+
const resolvedFillColor = chunkUSAJMMF2_js.colorWithOpacity(fillColor, fillOpacity);
|
|
2245
|
+
const resolvedStrokeColor = chunkUSAJMMF2_js.colorWithOpacity(strokeColor, strokeOpacity);
|
|
2294
2246
|
const ss = element.shapeStyle;
|
|
2295
2247
|
const gradientTiling = getGradientTilingCss(ss);
|
|
2296
|
-
const paintsGradientOutline =
|
|
2248
|
+
const paintsGradientOutline = chunkUSAJMMF2_js.suppressesCssBorder(element);
|
|
2297
2249
|
const hasFillOverlayColor = Boolean(
|
|
2298
2250
|
ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
|
|
2299
2251
|
);
|
|
2300
2252
|
const combinedShadowParts = [];
|
|
2301
|
-
const multiLayerShadow =
|
|
2253
|
+
const multiLayerShadow = chunkUSAJMMF2_js.buildMultiLayerShadowCss(element.shapeStyle);
|
|
2302
2254
|
if (multiLayerShadow) {
|
|
2303
2255
|
combinedShadowParts.push(multiLayerShadow);
|
|
2304
2256
|
} else if (shadowCss) {
|
|
@@ -2307,7 +2259,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2307
2259
|
if (innerShadowCss) {
|
|
2308
2260
|
combinedShadowParts.push(innerShadowCss);
|
|
2309
2261
|
}
|
|
2310
|
-
const glowBoxShadow =
|
|
2262
|
+
const glowBoxShadow = chunkUSAJMMF2_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
|
|
2311
2263
|
if (glowBoxShadow) {
|
|
2312
2264
|
combinedShadowParts.push(glowBoxShadow);
|
|
2313
2265
|
}
|
|
@@ -2315,7 +2267,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2315
2267
|
if (lineShadow) {
|
|
2316
2268
|
combinedShadowParts.push(lineShadow);
|
|
2317
2269
|
}
|
|
2318
|
-
const compoundLineShadow =
|
|
2270
|
+
const compoundLineShadow = chunkUSAJMMF2_js.getCompoundLineBoxShadow(
|
|
2319
2271
|
element.shapeStyle?.compoundLine,
|
|
2320
2272
|
strokeWidth,
|
|
2321
2273
|
resolvedStrokeColor
|
|
@@ -2328,11 +2280,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2328
2280
|
if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
|
|
2329
2281
|
const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
|
|
2330
2282
|
const glowRad = Math.round(Math.max(0, ss.glowRadius));
|
|
2331
|
-
const glowCol =
|
|
2283
|
+
const glowCol = chunkUSAJMMF2_js.colorWithOpacity(chunkUSAJMMF2_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
|
|
2332
2284
|
filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
|
|
2333
2285
|
}
|
|
2334
2286
|
if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
|
|
2335
|
-
filterParts.push(`url(#${
|
|
2287
|
+
filterParts.push(`url(#${chunkUSAJMMF2_js.getSoftEdgeFilterId(element.id)})`);
|
|
2336
2288
|
}
|
|
2337
2289
|
if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
|
|
2338
2290
|
filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
|
|
@@ -2341,13 +2293,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2341
2293
|
if (lineGlowCss) {
|
|
2342
2294
|
filterParts.push(lineGlowCss);
|
|
2343
2295
|
}
|
|
2344
|
-
const dagFilter =
|
|
2296
|
+
const dagFilter = chunkUSAJMMF2_js.getEffectDagFilter(ss, element.id);
|
|
2345
2297
|
if (dagFilter) {
|
|
2346
2298
|
filterParts.push(dagFilter);
|
|
2347
2299
|
}
|
|
2348
2300
|
const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
|
|
2349
2301
|
const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
|
|
2350
|
-
const patternFill =
|
|
2302
|
+
const patternFill = chunkUSAJMMF2_js.buildPatternFillCss(element.shapeStyle);
|
|
2351
2303
|
const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
|
|
2352
2304
|
const imageFillMode = ss?.fillImageMode || "stretch";
|
|
2353
2305
|
let reflectCss;
|
|
@@ -2359,7 +2311,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2359
2311
|
const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
|
|
2360
2312
|
const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
|
|
2361
2313
|
const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
|
|
2362
|
-
reflectCss =
|
|
2314
|
+
reflectCss = chunkUSAJMMF2_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
|
|
2363
2315
|
}
|
|
2364
2316
|
}
|
|
2365
2317
|
const base = {
|
|
@@ -2405,9 +2357,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2405
2357
|
// path following the shape's geometry, because a CSS border can only take
|
|
2406
2358
|
// one colour. Keeping the border too would draw the parser's averaged
|
|
2407
2359
|
// solid underneath the gradient.
|
|
2408
|
-
borderWidth: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2360
|
+
borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunkUSAJMMF2_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
|
|
2409
2361
|
borderColor: strokeWidth > 0 && !paintsGradientOutline ? resolvedStrokeColor : void 0,
|
|
2410
|
-
borderStyle: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2362
|
+
borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunkUSAJMMF2_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
|
|
2411
2363
|
strokeLinejoin: lineJoinCss,
|
|
2412
2364
|
strokeMiterlimit: miterLimitCss,
|
|
2413
2365
|
strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
|
|
@@ -2467,7 +2419,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2467
2419
|
borderWidth: 0,
|
|
2468
2420
|
borderTopWidth: Math.max(strokeWidth, 2),
|
|
2469
2421
|
borderTopColor: resolvedStrokeColor,
|
|
2470
|
-
borderTopStyle:
|
|
2422
|
+
borderTopStyle: chunkUSAJMMF2_js.getCssBorderDashStyle(strokeDash)
|
|
2471
2423
|
};
|
|
2472
2424
|
}
|
|
2473
2425
|
if (normalizedShapeType === "cylinder") {
|
|
@@ -2481,13 +2433,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2481
2433
|
function getConnectorAdjustment(element, key, fallback) {
|
|
2482
2434
|
const direct = element.shapeAdjustments?.[key];
|
|
2483
2435
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
2484
|
-
return
|
|
2436
|
+
return chunkUSAJMMF2_js.clampUnitInterval(direct / 1e5);
|
|
2485
2437
|
}
|
|
2486
2438
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
2487
2439
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
2488
|
-
return
|
|
2440
|
+
return chunkUSAJMMF2_js.clampUnitInterval(fallbackKey / 1e5);
|
|
2489
2441
|
}
|
|
2490
|
-
return
|
|
2442
|
+
return chunkUSAJMMF2_js.clampUnitInterval(fallback);
|
|
2491
2443
|
}
|
|
2492
2444
|
function getConnectorPathGeometry(element) {
|
|
2493
2445
|
const width = Math.max(element.width, 0);
|
|
@@ -2620,7 +2572,7 @@ function toHexByte(value) {
|
|
|
2620
2572
|
return clamped.toString(16).padStart(2, "0");
|
|
2621
2573
|
}
|
|
2622
2574
|
function shiftHex(hex, factor, towardsWhite) {
|
|
2623
|
-
const channels =
|
|
2575
|
+
const channels = chunkUSAJMMF2_js.hexToRgbChannels(hex);
|
|
2624
2576
|
if (!channels) {
|
|
2625
2577
|
return hex;
|
|
2626
2578
|
}
|
|
@@ -2646,7 +2598,7 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
|
|
|
2646
2598
|
const fillOff = subpath.fillMode === "none" || !hasFill;
|
|
2647
2599
|
return {
|
|
2648
2600
|
d: subpath.d,
|
|
2649
|
-
fill: fillOff ? "none" :
|
|
2601
|
+
fill: fillOff ? "none" : chunkUSAJMMF2_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
|
|
2650
2602
|
stroked: subpath.stroke !== false
|
|
2651
2603
|
};
|
|
2652
2604
|
});
|
|
@@ -2662,11 +2614,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
2662
2614
|
strokePaint,
|
|
2663
2615
|
strokeWidth,
|
|
2664
2616
|
dashArray,
|
|
2665
|
-
lineCap:
|
|
2617
|
+
lineCap: chunkUSAJMMF2_js.svgLineCap(shapeStyle?.lineCap),
|
|
2666
2618
|
lineJoin,
|
|
2667
2619
|
miterLimit,
|
|
2668
|
-
offsets:
|
|
2669
|
-
widths:
|
|
2620
|
+
offsets: chunkUSAJMMF2_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
2621
|
+
widths: chunkUSAJMMF2_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
2670
2622
|
};
|
|
2671
2623
|
}
|
|
2672
2624
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2714,9 +2666,9 @@ function gradientDefs(gradient) {
|
|
|
2714
2666
|
}
|
|
2715
2667
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2716
2668
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2717
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2669
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkUSAJMMF2_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2718
2670
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2719
|
-
const gradientPaint = gradient ?
|
|
2671
|
+
const gradientPaint = gradient ? chunkUSAJMMF2_js.svgGradientFillRef(gradient) : void 0;
|
|
2720
2672
|
const nodes = [];
|
|
2721
2673
|
if (subpaths && needsPerSubpath) {
|
|
2722
2674
|
const paints = buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
@@ -2748,7 +2700,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2748
2700
|
"path",
|
|
2749
2701
|
{
|
|
2750
2702
|
d: pathData,
|
|
2751
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2703
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkUSAJMMF2_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2752
2704
|
stroke: "none",
|
|
2753
2705
|
vectorEffect: "non-scaling-stroke"
|
|
2754
2706
|
},
|
|
@@ -2774,14 +2726,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2774
2726
|
);
|
|
2775
2727
|
}
|
|
2776
2728
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2777
|
-
if (!
|
|
2729
|
+
if (!chunkUSAJMMF2_js.hasShapeProperties(element)) {
|
|
2778
2730
|
return null;
|
|
2779
2731
|
}
|
|
2780
2732
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2781
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2782
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2783
|
-
const dashType =
|
|
2784
|
-
const dashArray =
|
|
2733
|
+
const fillPaint = animatesFill ? "inherit" : chunkUSAJMMF2_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2734
|
+
const strokePaint = animatesStroke ? "inherit" : chunkUSAJMMF2_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2735
|
+
const dashType = chunkUSAJMMF2_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2736
|
+
const dashArray = chunkUSAJMMF2_js.getSvgStrokeDasharray(
|
|
2785
2737
|
dashType,
|
|
2786
2738
|
Math.max(strokeWidth, 1),
|
|
2787
2739
|
element.shapeStyle?.customDashSegments
|
|
@@ -2862,21 +2814,21 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2862
2814
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2863
2815
|
// without this the shape fell back to the parser's representative solid
|
|
2864
2816
|
// and lost every fade (issue #132).
|
|
2865
|
-
|
|
2817
|
+
chunkUSAJMMF2_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2866
2818
|
);
|
|
2867
2819
|
}
|
|
2868
|
-
if (
|
|
2820
|
+
if (chunkUSAJMMF2_js.isCalloutShape(normalizedType)) {
|
|
2869
2821
|
const width = Math.max(element.width, 1);
|
|
2870
2822
|
const height = Math.max(element.height, 1);
|
|
2871
|
-
const geometry =
|
|
2823
|
+
const geometry = chunkUSAJMMF2_js.getCalloutLeaderLineGeometry(
|
|
2872
2824
|
normalizedType,
|
|
2873
2825
|
width,
|
|
2874
2826
|
height,
|
|
2875
2827
|
element.shapeAdjustments
|
|
2876
2828
|
);
|
|
2877
2829
|
if (geometry && geometry.points.length >= 2) {
|
|
2878
|
-
const leaderPath =
|
|
2879
|
-
const bounds =
|
|
2830
|
+
const leaderPath = chunkUSAJMMF2_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2831
|
+
const bounds = chunkUSAJMMF2_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2880
2832
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2881
2833
|
const offsetLeft = bounds.minX;
|
|
2882
2834
|
const offsetTop = bounds.minY;
|
|
@@ -2939,10 +2891,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2939
2891
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2940
2892
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2941
2893
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2942
|
-
const connectorLineCap =
|
|
2894
|
+
const connectorLineCap = chunkUSAJMMF2_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2943
2895
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2944
|
-
const offsets =
|
|
2945
|
-
const widths =
|
|
2896
|
+
const offsets = chunkUSAJMMF2_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2897
|
+
const widths = chunkUSAJMMF2_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2946
2898
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2947
2899
|
"svg",
|
|
2948
2900
|
{
|
|
@@ -3009,15 +2961,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
3009
2961
|
}
|
|
3010
2962
|
const parsed = stops.map((gs) => {
|
|
3011
2963
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
3012
|
-
const color =
|
|
3013
|
-
const opacity =
|
|
3014
|
-
return { pos, color:
|
|
2964
|
+
const color = chunkUSAJMMF2_js.parseDrawingColor(gs) ?? "#888888";
|
|
2965
|
+
const opacity = chunkUSAJMMF2_js.parseDrawingColorOpacity(gs);
|
|
2966
|
+
return { pos, color: chunkUSAJMMF2_js.colorWithOpacity(color, opacity) };
|
|
3015
2967
|
}).sort((a, b) => a.pos - b.pos);
|
|
3016
2968
|
const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
|
|
3017
2969
|
const lin = gradFill["a:lin"];
|
|
3018
2970
|
if (lin) {
|
|
3019
2971
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
3020
|
-
const angleDeg = Math.round(
|
|
2972
|
+
const angleDeg = Math.round(chunkUSAJMMF2_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
3021
2973
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
3022
2974
|
}
|
|
3023
2975
|
const path = gradFill["a:path"];
|
|
@@ -3052,8 +3004,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
3052
3004
|
if (!pattFill) {
|
|
3053
3005
|
return void 0;
|
|
3054
3006
|
}
|
|
3055
|
-
const fgColor =
|
|
3056
|
-
const bgColor =
|
|
3007
|
+
const fgColor = chunkUSAJMMF2_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
3008
|
+
const bgColor = chunkUSAJMMF2_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
3057
3009
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
3058
3010
|
switch (preset) {
|
|
3059
3011
|
case "ltHorz":
|
|
@@ -3164,11 +3116,11 @@ function parseCellBorders(cellProperties) {
|
|
|
3164
3116
|
const prstDash = ln["a:prstDash"];
|
|
3165
3117
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
3166
3118
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
3167
|
-
const color =
|
|
3119
|
+
const color = chunkUSAJMMF2_js.parseDrawingColor(ln["a:solidFill"]);
|
|
3168
3120
|
if (color) {
|
|
3169
|
-
const opacity =
|
|
3121
|
+
const opacity = chunkUSAJMMF2_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
3170
3122
|
const key = `${edge.prefix}`;
|
|
3171
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
3123
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkUSAJMMF2_js.colorWithOpacity(color, opacity)}`;
|
|
3172
3124
|
}
|
|
3173
3125
|
}
|
|
3174
3126
|
return borderStyle;
|
|
@@ -3181,7 +3133,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3181
3133
|
const textShadowParts = [];
|
|
3182
3134
|
const outerShdw = effectLst["a:outerShdw"];
|
|
3183
3135
|
if (outerShdw) {
|
|
3184
|
-
const shdwColor =
|
|
3136
|
+
const shdwColor = chunkUSAJMMF2_js.parseDrawingColor(outerShdw);
|
|
3185
3137
|
if (shdwColor) {
|
|
3186
3138
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
3187
3139
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -3199,7 +3151,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3199
3151
|
}
|
|
3200
3152
|
const glow = effectLst["a:glow"];
|
|
3201
3153
|
if (glow) {
|
|
3202
|
-
const glowColor =
|
|
3154
|
+
const glowColor = chunkUSAJMMF2_js.parseDrawingColor(glow);
|
|
3203
3155
|
if (glowColor) {
|
|
3204
3156
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
3205
3157
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -3278,10 +3230,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3278
3230
|
if (runProps?.["@_u"] !== void 0) {
|
|
3279
3231
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
3280
3232
|
}
|
|
3281
|
-
const runColor =
|
|
3233
|
+
const runColor = chunkUSAJMMF2_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkUSAJMMF2_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
3282
3234
|
if (runColor) {
|
|
3283
|
-
const opacity =
|
|
3284
|
-
cellStyle.color =
|
|
3235
|
+
const opacity = chunkUSAJMMF2_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
3236
|
+
cellStyle.color = chunkUSAJMMF2_js.colorWithOpacity(runColor, opacity);
|
|
3285
3237
|
}
|
|
3286
3238
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
3287
3239
|
if (fontFamily) {
|
|
@@ -3291,15 +3243,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3291
3243
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
3292
3244
|
}
|
|
3293
3245
|
const cellProperties = cellXml["a:tcPr"];
|
|
3294
|
-
const cellFill =
|
|
3246
|
+
const cellFill = chunkUSAJMMF2_js.parseDrawingColor(
|
|
3295
3247
|
cellProperties?.["a:solidFill"],
|
|
3296
3248
|
schemeColorOverrides
|
|
3297
3249
|
);
|
|
3298
3250
|
if (cellFill) {
|
|
3299
|
-
const opacity =
|
|
3251
|
+
const opacity = chunkUSAJMMF2_js.parseDrawingColorOpacity(
|
|
3300
3252
|
cellProperties?.["a:solidFill"]
|
|
3301
3253
|
);
|
|
3302
|
-
cellStyle.backgroundColor =
|
|
3254
|
+
cellStyle.backgroundColor = chunkUSAJMMF2_js.colorWithOpacity(cellFill, opacity);
|
|
3303
3255
|
} else {
|
|
3304
3256
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
3305
3257
|
if (gradCss) {
|
|
@@ -3314,16 +3266,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3314
3266
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
3315
3267
|
Object.assign(cellStyle, edgeBorders);
|
|
3316
3268
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
3317
|
-
const borderColor =
|
|
3269
|
+
const borderColor = chunkUSAJMMF2_js.parseDrawingColor(
|
|
3318
3270
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
3319
3271
|
schemeColorOverrides
|
|
3320
|
-
) ||
|
|
3272
|
+
) || chunkUSAJMMF2_js.parseDrawingColor(
|
|
3321
3273
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
3322
3274
|
schemeColorOverrides
|
|
3323
|
-
) ||
|
|
3275
|
+
) || chunkUSAJMMF2_js.parseDrawingColor(
|
|
3324
3276
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
3325
3277
|
schemeColorOverrides
|
|
3326
|
-
) ||
|
|
3278
|
+
) || chunkUSAJMMF2_js.parseDrawingColor(
|
|
3327
3279
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
3328
3280
|
schemeColorOverrides
|
|
3329
3281
|
);
|
|
@@ -3391,194 +3343,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3391
3343
|
}
|
|
3392
3344
|
|
|
3393
3345
|
// src/viewer/utils/table-band-style.tsx
|
|
3394
|
-
function
|
|
3395
|
-
if (!fill) {
|
|
3396
|
-
return void 0;
|
|
3397
|
-
}
|
|
3398
|
-
const key = fill.schemeColor;
|
|
3399
|
-
const base = colorScheme ? colorScheme[key] : void 0;
|
|
3400
|
-
if (!base) {
|
|
3401
|
-
return void 0;
|
|
3402
|
-
}
|
|
3403
|
-
let color = base;
|
|
3404
|
-
if (fill.tint !== void 0 && fill.tint > 0) {
|
|
3405
|
-
color = chunkRZYOOWZN_js.tintColor2(color, fill.tint / 1e5);
|
|
3406
|
-
}
|
|
3407
|
-
if (fill.shade !== void 0 && fill.shade > 0) {
|
|
3408
|
-
color = chunkRZYOOWZN_js.shadeColor2(color, 1 - fill.shade / 1e5);
|
|
3409
|
-
}
|
|
3410
|
-
return color;
|
|
3411
|
-
}
|
|
3412
|
-
function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
3413
|
-
if (!text) {
|
|
3414
|
-
return false;
|
|
3415
|
-
}
|
|
3416
|
-
let applied = false;
|
|
3417
|
-
if (text.bold) {
|
|
3418
|
-
style.fontWeight = 700;
|
|
3419
|
-
applied = true;
|
|
3420
|
-
}
|
|
3421
|
-
if (text.italic) {
|
|
3422
|
-
style.fontStyle = "italic";
|
|
3423
|
-
applied = true;
|
|
3424
|
-
}
|
|
3425
|
-
if (text.underline) {
|
|
3426
|
-
style.textDecorationLine = "underline";
|
|
3427
|
-
applied = true;
|
|
3428
|
-
}
|
|
3429
|
-
if (text.fontFace) {
|
|
3430
|
-
style.fontFamily = text.fontFace;
|
|
3431
|
-
applied = true;
|
|
3432
|
-
} else {
|
|
3433
|
-
const refFont = chunkRZYOOWZN_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
|
|
3434
|
-
if (refFont) {
|
|
3435
|
-
style.fontFamily = refFont;
|
|
3436
|
-
applied = true;
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
if (text.fontSchemeColor && colorScheme) {
|
|
3440
|
-
const base = colorScheme[text.fontSchemeColor];
|
|
3441
|
-
if (base) {
|
|
3442
|
-
let color = base;
|
|
3443
|
-
if (text.fontTint !== void 0 && text.fontTint > 0) {
|
|
3444
|
-
color = chunkRZYOOWZN_js.tintColor2(color, text.fontTint / 1e5);
|
|
3445
|
-
}
|
|
3446
|
-
if (text.fontShade !== void 0 && text.fontShade > 0) {
|
|
3447
|
-
color = chunkRZYOOWZN_js.shadeColor2(color, 1 - text.fontShade / 1e5);
|
|
3448
|
-
}
|
|
3449
|
-
style.color = color;
|
|
3450
|
-
applied = true;
|
|
3451
|
-
}
|
|
3452
|
-
}
|
|
3453
|
-
return applied;
|
|
3454
|
-
}
|
|
3455
|
-
function resolveTableStyleEntry(tableStyleId, tableStyleMap) {
|
|
3456
|
-
if (!tableStyleId || !tableStyleMap) {
|
|
3457
|
-
return void 0;
|
|
3458
|
-
}
|
|
3459
|
-
const direct = tableStyleMap[tableStyleId];
|
|
3460
|
-
if (direct) {
|
|
3461
|
-
return direct;
|
|
3462
|
-
}
|
|
3463
|
-
const normalised = tableStyleId.trim().toUpperCase();
|
|
3464
|
-
const withBraces = normalised.startsWith("{") ? normalised : `{${normalised}}`;
|
|
3465
|
-
return tableStyleMap[withBraces];
|
|
3466
|
-
}
|
|
3467
|
-
function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
|
|
3346
|
+
function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
|
|
3468
3347
|
if (element.type !== "table") {
|
|
3469
3348
|
return void 0;
|
|
3470
3349
|
}
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
const colorScheme = styleCtx?.theme?.colorScheme;
|
|
3477
|
-
const fontScheme = styleCtx?.theme?.fontScheme;
|
|
3478
|
-
const resolveFill = (fill, fallback) => resolveTableStyleFillColor(fill, colorScheme) ?? fallback;
|
|
3479
|
-
const style = {};
|
|
3480
|
-
let applied = false;
|
|
3481
|
-
if (styleEntry?.wholeTblFill) {
|
|
3482
|
-
const wholeBg = resolveFill(styleEntry.wholeTblFill, "");
|
|
3483
|
-
if (wholeBg) {
|
|
3484
|
-
style.backgroundColor = wholeBg;
|
|
3485
|
-
applied = true;
|
|
3486
|
-
}
|
|
3487
|
-
}
|
|
3488
|
-
if (applyTableStyleText(styleEntry?.wholeTblText, colorScheme, style, fontScheme)) {
|
|
3489
|
-
applied = true;
|
|
3490
|
-
}
|
|
3491
|
-
const bandStartRow = td.firstRowHeader ? 1 : 0;
|
|
3492
|
-
const bandEndRow = td.lastRow ? rowCount - 1 : rowCount;
|
|
3493
|
-
if (td.bandedRows && rowIndex >= bandStartRow && rowIndex < bandEndRow) {
|
|
3494
|
-
const bandIndex = rowIndex - bandStartRow;
|
|
3495
|
-
const rowCycle = Math.max(td.bandRowCycle ?? 1, 1);
|
|
3496
|
-
const bandGroup = Math.floor(bandIndex / rowCycle) % 2;
|
|
3497
|
-
if (bandGroup === 0) {
|
|
3498
|
-
const band1Bg = resolveFill(styleEntry?.band1HFill, "rgba(217, 226, 243, 0.5)");
|
|
3499
|
-
style.backgroundColor = band1Bg;
|
|
3500
|
-
applied = true;
|
|
3501
|
-
} else if (styleEntry?.band2HFill) {
|
|
3502
|
-
const band2Bg = resolveFill(styleEntry.band2HFill, "");
|
|
3503
|
-
if (band2Bg) {
|
|
3504
|
-
style.backgroundColor = band2Bg;
|
|
3505
|
-
applied = true;
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3508
|
-
}
|
|
3509
|
-
if (td.bandedColumns) {
|
|
3510
|
-
const isFirstCol = td.firstCol;
|
|
3511
|
-
const isLastCol = td.lastCol;
|
|
3512
|
-
const colBandIndex = isFirstCol && cellIndex > 0 ? cellIndex - 1 : cellIndex;
|
|
3513
|
-
const skipCol = isFirstCol && cellIndex === 0 || isLastCol && cellIndex === columnCount - 1;
|
|
3514
|
-
if (!skipCol) {
|
|
3515
|
-
const colCycle = Math.max(td.bandColCycle ?? 1, 1);
|
|
3516
|
-
const colBandGroup = Math.floor(colBandIndex / colCycle) % 2;
|
|
3517
|
-
if (colBandGroup === 0) {
|
|
3518
|
-
if (!style.backgroundColor || !td.bandedRows) {
|
|
3519
|
-
const band1Bg = resolveFill(styleEntry?.band1VFill, "rgba(217, 226, 243, 0.35)");
|
|
3520
|
-
style.backgroundColor = band1Bg;
|
|
3521
|
-
applied = true;
|
|
3522
|
-
}
|
|
3523
|
-
} else if (styleEntry?.band2VFill) {
|
|
3524
|
-
if (!style.backgroundColor || !td.bandedRows) {
|
|
3525
|
-
const band2Bg = resolveFill(styleEntry.band2VFill, "");
|
|
3526
|
-
if (band2Bg) {
|
|
3527
|
-
style.backgroundColor = band2Bg;
|
|
3528
|
-
applied = true;
|
|
3529
|
-
}
|
|
3530
|
-
}
|
|
3531
|
-
}
|
|
3532
|
-
}
|
|
3533
|
-
}
|
|
3534
|
-
if (td.firstRowHeader && rowIndex === 0) {
|
|
3535
|
-
style.fontWeight = 700;
|
|
3536
|
-
if (styleEntry?.firstRowFill?.noFill) {
|
|
3537
|
-
style.backgroundColor = "transparent";
|
|
3538
|
-
} else {
|
|
3539
|
-
style.backgroundColor = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.85)");
|
|
3540
|
-
style.color = "#ffffff";
|
|
3541
|
-
}
|
|
3542
|
-
applyTableStyleText(styleEntry?.firstRowText, colorScheme, style, fontScheme);
|
|
3543
|
-
applied = true;
|
|
3544
|
-
}
|
|
3545
|
-
if (td.lastRow && rowIndex === rowCount - 1) {
|
|
3546
|
-
style.fontWeight = 700;
|
|
3547
|
-
if (styleEntry?.lastRowFill) {
|
|
3548
|
-
const lastRowBg = resolveFill(styleEntry.lastRowFill, "");
|
|
3549
|
-
if (lastRowBg) {
|
|
3550
|
-
style.backgroundColor = lastRowBg;
|
|
3551
|
-
}
|
|
3552
|
-
}
|
|
3553
|
-
style.borderTopWidth = 2;
|
|
3554
|
-
style.borderTopColor = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.7)");
|
|
3555
|
-
style.borderTopStyle = "solid";
|
|
3556
|
-
applyTableStyleText(styleEntry?.lastRowText, colorScheme, style, fontScheme);
|
|
3557
|
-
applied = true;
|
|
3558
|
-
}
|
|
3559
|
-
if (td.firstCol && cellIndex === 0) {
|
|
3560
|
-
style.fontWeight = 700;
|
|
3561
|
-
if (styleEntry?.firstColFill) {
|
|
3562
|
-
const firstColBg = resolveFill(styleEntry.firstColFill, "");
|
|
3563
|
-
if (firstColBg) {
|
|
3564
|
-
style.backgroundColor = firstColBg;
|
|
3565
|
-
}
|
|
3566
|
-
}
|
|
3567
|
-
applyTableStyleText(styleEntry?.firstColText, colorScheme, style, fontScheme);
|
|
3568
|
-
applied = true;
|
|
3569
|
-
}
|
|
3570
|
-
if (td.lastCol && cellIndex === columnCount - 1) {
|
|
3571
|
-
style.fontWeight = 700;
|
|
3572
|
-
if (styleEntry?.lastColFill) {
|
|
3573
|
-
const lastColBg = resolveFill(styleEntry.lastColFill, "");
|
|
3574
|
-
if (lastColBg) {
|
|
3575
|
-
style.backgroundColor = lastColBg;
|
|
3576
|
-
}
|
|
3577
|
-
}
|
|
3578
|
-
applyTableStyleText(styleEntry?.lastColText, colorScheme, style, fontScheme);
|
|
3579
|
-
applied = true;
|
|
3580
|
-
}
|
|
3581
|
-
return applied ? style : void 0;
|
|
3350
|
+
return chunkUSAJMMF2_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
|
|
3351
|
+
tableStyleMap: styleCtx?.tableStyleMap,
|
|
3352
|
+
colorScheme: styleCtx?.theme?.colorScheme,
|
|
3353
|
+
fontScheme: styleCtx?.theme?.fontScheme
|
|
3354
|
+
});
|
|
3582
3355
|
}
|
|
3583
3356
|
|
|
3584
3357
|
// src/viewer/utils/table-data-parse.tsx
|
|
@@ -3636,7 +3409,7 @@ function parseTableElementData(element, fallbackTextStyle) {
|
|
|
3636
3409
|
};
|
|
3637
3410
|
}
|
|
3638
3411
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
3639
|
-
return
|
|
3412
|
+
return chunkUSAJMMF2_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
3640
3413
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
3641
3414
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
3642
3415
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3759,144 +3532,6 @@ function TableCellInput({
|
|
|
3759
3532
|
}
|
|
3760
3533
|
);
|
|
3761
3534
|
}
|
|
3762
|
-
|
|
3763
|
-
// src/viewer/utils/table-render-helpers.ts
|
|
3764
|
-
function cellStyleToCss(style) {
|
|
3765
|
-
if (!style) {
|
|
3766
|
-
return {};
|
|
3767
|
-
}
|
|
3768
|
-
const css = {};
|
|
3769
|
-
if (style.fontSize) {
|
|
3770
|
-
css.fontSize = style.fontSize;
|
|
3771
|
-
}
|
|
3772
|
-
if (style.bold) {
|
|
3773
|
-
css.fontWeight = "bold";
|
|
3774
|
-
}
|
|
3775
|
-
if (style.italic) {
|
|
3776
|
-
css.fontStyle = "italic";
|
|
3777
|
-
}
|
|
3778
|
-
if (style.underline) {
|
|
3779
|
-
css.textDecorationLine = "underline";
|
|
3780
|
-
}
|
|
3781
|
-
if (style.color) {
|
|
3782
|
-
css.color = style.color;
|
|
3783
|
-
}
|
|
3784
|
-
if (style.gradientFillCss) {
|
|
3785
|
-
css.background = style.gradientFillCss;
|
|
3786
|
-
} else if (style.fillMode === "pattern" && style.patternFillPreset) {
|
|
3787
|
-
const fg = chunkRZYOOWZN_js.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
3788
|
-
const bg = chunkRZYOOWZN_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
3789
|
-
const svgPattern = chunkRZYOOWZN_js.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
3790
|
-
if (svgPattern) {
|
|
3791
|
-
const encoded = encodeURIComponent(svgPattern);
|
|
3792
|
-
css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
|
|
3793
|
-
css.backgroundColor = bg;
|
|
3794
|
-
} else if (style.backgroundColor) {
|
|
3795
|
-
css.backgroundColor = style.backgroundColor;
|
|
3796
|
-
}
|
|
3797
|
-
} else if (style.backgroundColor) {
|
|
3798
|
-
css.backgroundColor = style.backgroundColor;
|
|
3799
|
-
}
|
|
3800
|
-
if (style.align) {
|
|
3801
|
-
css.textAlign = style.align;
|
|
3802
|
-
} else if (style.anchorCtr) {
|
|
3803
|
-
css.textAlign = "center";
|
|
3804
|
-
}
|
|
3805
|
-
if (style.vAlign) {
|
|
3806
|
-
css.verticalAlign = style.vAlign;
|
|
3807
|
-
}
|
|
3808
|
-
if (style.horzOverflow === "clip") {
|
|
3809
|
-
css.overflowX = "hidden";
|
|
3810
|
-
} else if (style.horzOverflow === "overflow") {
|
|
3811
|
-
css.overflowX = "visible";
|
|
3812
|
-
}
|
|
3813
|
-
if (style.textDirection) {
|
|
3814
|
-
switch (style.textDirection) {
|
|
3815
|
-
case "vert":
|
|
3816
|
-
case "eaVert":
|
|
3817
|
-
case "wordArtVert":
|
|
3818
|
-
case "wordArtVertRtl":
|
|
3819
|
-
css.writingMode = "vertical-rl";
|
|
3820
|
-
break;
|
|
3821
|
-
case "vert270":
|
|
3822
|
-
case "mongolianVert":
|
|
3823
|
-
css.writingMode = "vertical-lr";
|
|
3824
|
-
break;
|
|
3825
|
-
}
|
|
3826
|
-
if (style.textDirection === "wordArtVert") {
|
|
3827
|
-
css.textOrientation = "upright";
|
|
3828
|
-
} else if (css.writingMode) {
|
|
3829
|
-
css.textOrientation = "mixed";
|
|
3830
|
-
}
|
|
3831
|
-
if (style.textDirection === "wordArtVertRtl") {
|
|
3832
|
-
css.direction = "rtl";
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
const borderEdges = [
|
|
3836
|
-
{
|
|
3837
|
-
prefix: "borderTop",
|
|
3838
|
-
width: style.borderTopWidth,
|
|
3839
|
-
color: style.borderTopColor,
|
|
3840
|
-
dash: style.borderTopDash
|
|
3841
|
-
},
|
|
3842
|
-
{
|
|
3843
|
-
prefix: "borderBottom",
|
|
3844
|
-
width: style.borderBottomWidth,
|
|
3845
|
-
color: style.borderBottomColor,
|
|
3846
|
-
dash: style.borderBottomDash
|
|
3847
|
-
},
|
|
3848
|
-
{
|
|
3849
|
-
prefix: "borderLeft",
|
|
3850
|
-
width: style.borderLeftWidth,
|
|
3851
|
-
color: style.borderLeftColor,
|
|
3852
|
-
dash: style.borderLeftDash
|
|
3853
|
-
},
|
|
3854
|
-
{
|
|
3855
|
-
prefix: "borderRight",
|
|
3856
|
-
width: style.borderRightWidth,
|
|
3857
|
-
color: style.borderRightColor,
|
|
3858
|
-
dash: style.borderRightDash
|
|
3859
|
-
}
|
|
3860
|
-
];
|
|
3861
|
-
for (const edge of borderEdges) {
|
|
3862
|
-
if (edge.width || edge.color) {
|
|
3863
|
-
const w = edge.width ?? 1;
|
|
3864
|
-
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
3865
|
-
const s = chunkRZYOOWZN_js.ooxmlDashToCssBorderStyle(edge.dash);
|
|
3866
|
-
css[edge.prefix] = `${w}px ${s} ${c}`;
|
|
3867
|
-
}
|
|
3868
|
-
}
|
|
3869
|
-
if (style.marginLeft) {
|
|
3870
|
-
css.paddingLeft = style.marginLeft;
|
|
3871
|
-
}
|
|
3872
|
-
if (style.marginRight) {
|
|
3873
|
-
css.paddingRight = style.marginRight;
|
|
3874
|
-
}
|
|
3875
|
-
if (style.marginTop) {
|
|
3876
|
-
css.paddingTop = style.marginTop;
|
|
3877
|
-
}
|
|
3878
|
-
if (style.marginBottom) {
|
|
3879
|
-
css.paddingBottom = style.marginBottom;
|
|
3880
|
-
}
|
|
3881
|
-
const textShadowParts = [];
|
|
3882
|
-
if (style.textShadowColor) {
|
|
3883
|
-
const offX = style.textShadowOffsetX ?? 1;
|
|
3884
|
-
const offY = style.textShadowOffsetY ?? 1;
|
|
3885
|
-
const blur = style.textShadowBlur ?? 0;
|
|
3886
|
-
textShadowParts.push(`${offX}px ${offY}px ${blur}px ${style.textShadowColor}`);
|
|
3887
|
-
}
|
|
3888
|
-
if (style.textGlowColor) {
|
|
3889
|
-
const radius = style.textGlowRadius ?? 2;
|
|
3890
|
-
textShadowParts.push(`0px 0px ${radius}px ${style.textGlowColor}`);
|
|
3891
|
-
}
|
|
3892
|
-
if (textShadowParts.length > 0) {
|
|
3893
|
-
css.textShadow = textShadowParts.join(", ");
|
|
3894
|
-
}
|
|
3895
|
-
if (style.cell3D) {
|
|
3896
|
-
Object.assign(css, chunkRZYOOWZN_js.cell3DBevelCss(style.cell3D));
|
|
3897
|
-
}
|
|
3898
|
-
return css;
|
|
3899
|
-
}
|
|
3900
3535
|
function TableResizeOverlay({
|
|
3901
3536
|
children,
|
|
3902
3537
|
columnWidths,
|
|
@@ -3907,7 +3542,7 @@ function TableResizeOverlay({
|
|
|
3907
3542
|
const containerRef = React6.useRef(null);
|
|
3908
3543
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3909
3544
|
const dragRef = React6.useRef(null);
|
|
3910
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3545
|
+
const colBoundaries = React6.useMemo(() => chunkUSAJMMF2_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3911
3546
|
const measureRows = React6.useCallback(() => {
|
|
3912
3547
|
const container = containerRef.current;
|
|
3913
3548
|
if (!container) {
|
|
@@ -3954,11 +3589,11 @@ function TableResizeOverlay({
|
|
|
3954
3589
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3955
3590
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3956
3591
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3957
|
-
onResizeColumns(
|
|
3592
|
+
onResizeColumns(chunkUSAJMMF2_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3958
3593
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3959
3594
|
const deltaY = e.clientY - drag.startPos;
|
|
3960
|
-
const newHeight =
|
|
3961
|
-
drag.initialRowHeight ??
|
|
3595
|
+
const newHeight = chunkUSAJMMF2_js.computeResizedRowHeight(
|
|
3596
|
+
drag.initialRowHeight ?? chunkUSAJMMF2_js.DEFAULT_ROW_HEIGHT,
|
|
3962
3597
|
deltaY
|
|
3963
3598
|
);
|
|
3964
3599
|
onResizeRow(drag.index, newHeight);
|
|
@@ -3996,7 +3631,7 @@ function TableResizeOverlay({
|
|
|
3996
3631
|
e.stopPropagation();
|
|
3997
3632
|
const table = containerRef.current?.querySelector("table");
|
|
3998
3633
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
3999
|
-
const actualHeight = tr?.offsetHeight ??
|
|
3634
|
+
const actualHeight = tr?.offsetHeight ?? chunkUSAJMMF2_js.DEFAULT_ROW_HEIGHT;
|
|
4000
3635
|
document.body.style.cursor = "row-resize";
|
|
4001
3636
|
document.body.style.userSelect = "none";
|
|
4002
3637
|
dragRef.current = {
|
|
@@ -4044,7 +3679,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4044
3679
|
}
|
|
4045
3680
|
const first = selectedCell.selectedCells[0];
|
|
4046
3681
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4047
|
-
return
|
|
3682
|
+
return chunkUSAJMMF2_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
4048
3683
|
})();
|
|
4049
3684
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4050
3685
|
TableResizeOverlay,
|
|
@@ -4064,7 +3699,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4064
3699
|
"table",
|
|
4065
3700
|
{
|
|
4066
3701
|
className: "w-full h-full border-collapse table-fixed",
|
|
4067
|
-
style: { fontFamily:
|
|
3702
|
+
style: { fontFamily: chunkUSAJMMF2_js.DEFAULT_FONT_FAMILY },
|
|
4068
3703
|
children: [
|
|
4069
3704
|
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4070
3705
|
"col",
|
|
@@ -4082,7 +3717,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4082
3717
|
return null;
|
|
4083
3718
|
}
|
|
4084
3719
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
4085
|
-
const isInMultiSelection =
|
|
3720
|
+
const isInMultiSelection = chunkUSAJMMF2_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
4086
3721
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
4087
3722
|
const diag = getCellDiagonalBorders2(
|
|
4088
3723
|
cell.style,
|
|
@@ -4103,7 +3738,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4103
3738
|
rowSpan: cell.rowSpan && cell.rowSpan > 1 ? cell.rowSpan : void 0,
|
|
4104
3739
|
style: {
|
|
4105
3740
|
...textStyle,
|
|
4106
|
-
...cellStyleToCss(cell.style),
|
|
3741
|
+
...chunkUSAJMMF2_js.cellStyleToCss(cell.style),
|
|
4107
3742
|
...diag ? { position: "relative" } : void 0
|
|
4108
3743
|
},
|
|
4109
3744
|
onClick: (event) => {
|
|
@@ -4112,7 +3747,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4112
3747
|
}
|
|
4113
3748
|
event.stopPropagation();
|
|
4114
3749
|
if (event.shiftKey && selectedCell) {
|
|
4115
|
-
const rect =
|
|
3750
|
+
const rect = chunkUSAJMMF2_js.computeSelectionRect(
|
|
4116
3751
|
selectedCell.rowIndex,
|
|
4117
3752
|
selectedCell.columnIndex,
|
|
4118
3753
|
rowIndex,
|
|
@@ -4122,7 +3757,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4122
3757
|
options?.onSelectCell?.({
|
|
4123
3758
|
rowIndex: selectedCell.rowIndex,
|
|
4124
3759
|
columnIndex: selectedCell.columnIndex,
|
|
4125
|
-
selectedCells:
|
|
3760
|
+
selectedCells: chunkUSAJMMF2_js.rectToCells(rect)
|
|
4126
3761
|
});
|
|
4127
3762
|
} else {
|
|
4128
3763
|
options?.onSelectCell?.({
|
|
@@ -4150,7 +3785,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4150
3785
|
initialText: cell.text ?? "",
|
|
4151
3786
|
style: {
|
|
4152
3787
|
...textStyle,
|
|
4153
|
-
...cellStyleToCss(cell.style)
|
|
3788
|
+
...chunkUSAJMMF2_js.cellStyleToCss(cell.style)
|
|
4154
3789
|
},
|
|
4155
3790
|
onCommit: (text) => {
|
|
4156
3791
|
options?.onCommitCellEdit?.(rowIndex, cellIndex, text);
|
|
@@ -4201,7 +3836,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4201
3836
|
}
|
|
4202
3837
|
const first = selectedCell.selectedCells[0];
|
|
4203
3838
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4204
|
-
return
|
|
3839
|
+
return chunkUSAJMMF2_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
4205
3840
|
})();
|
|
4206
3841
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
4207
3842
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4222,7 +3857,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4222
3857
|
"table",
|
|
4223
3858
|
{
|
|
4224
3859
|
className: "w-full h-full border-collapse table-fixed",
|
|
4225
|
-
style: { fontFamily:
|
|
3860
|
+
style: { fontFamily: chunkUSAJMMF2_js.DEFAULT_FONT_FAMILY },
|
|
4226
3861
|
children: [
|
|
4227
3862
|
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4228
3863
|
"col",
|
|
@@ -4249,7 +3884,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4249
3884
|
const colSpan = Number.isFinite(gridSpanRaw) && gridSpanRaw > 1 ? gridSpanRaw : void 0;
|
|
4250
3885
|
const rowSpanRaw = Number.parseInt(String(cell["@_rowSpan"] || ""), 10);
|
|
4251
3886
|
const rSpan = Number.isFinite(rowSpanRaw) && rowSpanRaw > 1 ? rowSpanRaw : void 0;
|
|
4252
|
-
const bandStyle =
|
|
3887
|
+
const bandStyle = getTableCellBandStyle2(
|
|
4253
3888
|
element,
|
|
4254
3889
|
rowIndex,
|
|
4255
3890
|
cellIndex,
|
|
@@ -4273,7 +3908,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4273
3908
|
const mergedStyle = {
|
|
4274
3909
|
...bandStyle,
|
|
4275
3910
|
...xmlCellStyle,
|
|
4276
|
-
...tdCellOverride ? cellStyleToCss(tdCellOverride) : void 0,
|
|
3911
|
+
...tdCellOverride ? chunkUSAJMMF2_js.cellStyleToCss(tdCellOverride) : void 0,
|
|
4277
3912
|
...diag ? { position: "relative" } : void 0
|
|
4278
3913
|
};
|
|
4279
3914
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4283,7 +3918,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4283
3918
|
"border px-1 py-0.5 align-top",
|
|
4284
3919
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
4285
3920
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4286
|
-
|
|
3921
|
+
chunkUSAJMMF2_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4287
3922
|
),
|
|
4288
3923
|
colSpan,
|
|
4289
3924
|
rowSpan: rSpan,
|
|
@@ -4294,7 +3929,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4294
3929
|
}
|
|
4295
3930
|
event.stopPropagation();
|
|
4296
3931
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
4297
|
-
const rect =
|
|
3932
|
+
const rect = chunkUSAJMMF2_js.computeSelectionRect(
|
|
4298
3933
|
selectedCell.rowIndex,
|
|
4299
3934
|
selectedCell.columnIndex,
|
|
4300
3935
|
rowIndex,
|
|
@@ -4304,7 +3939,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4304
3939
|
options?.onSelectCell?.({
|
|
4305
3940
|
rowIndex: selectedCell.rowIndex,
|
|
4306
3941
|
columnIndex: selectedCell.columnIndex,
|
|
4307
|
-
selectedCells:
|
|
3942
|
+
selectedCells: chunkUSAJMMF2_js.rectToCells(rect)
|
|
4308
3943
|
});
|
|
4309
3944
|
} else {
|
|
4310
3945
|
options?.onSelectCell?.({
|
|
@@ -4361,24 +3996,24 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4361
3996
|
}
|
|
4362
3997
|
var LEGEND_ITEM_WIDTH = 80;
|
|
4363
3998
|
function partAttrs(part) {
|
|
4364
|
-
return part ?
|
|
3999
|
+
return part ? chunkUSAJMMF2_js.chartPartToAttrs(part) : void 0;
|
|
4365
4000
|
}
|
|
4366
4001
|
function resolveReactPalette(chartData) {
|
|
4367
4002
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
4368
4003
|
return chartData.colorPalette;
|
|
4369
4004
|
}
|
|
4370
|
-
return [...
|
|
4005
|
+
return [...chunkUSAJMMF2_js.getChartStylePalette(chartData.style?.styleId)];
|
|
4371
4006
|
}
|
|
4372
4007
|
function buildReactChartViewModel(element) {
|
|
4373
4008
|
if (element.type !== "chart" || !element.chartData) {
|
|
4374
|
-
return
|
|
4009
|
+
return chunkUSAJMMF2_js.buildChartViewModel(element);
|
|
4375
4010
|
}
|
|
4376
4011
|
const palette = resolveReactPalette(element.chartData);
|
|
4377
4012
|
const themedElement = {
|
|
4378
4013
|
...element,
|
|
4379
4014
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
4380
4015
|
};
|
|
4381
|
-
return
|
|
4016
|
+
return chunkUSAJMMF2_js.buildChartViewModel(themedElement);
|
|
4382
4017
|
}
|
|
4383
4018
|
function renderPrimitive(prim, key) {
|
|
4384
4019
|
switch (prim.kind) {
|
|
@@ -4767,7 +4402,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4767
4402
|
const unmatchedRows = [];
|
|
4768
4403
|
categories.forEach((cat, i) => {
|
|
4769
4404
|
const value = values[i] ?? 0;
|
|
4770
|
-
const code =
|
|
4405
|
+
const code = chunkUSAJMMF2_js.resolveRegionCode(cat);
|
|
4771
4406
|
if (code) {
|
|
4772
4407
|
regionValueMap.set(code, { value, label: cat });
|
|
4773
4408
|
} else {
|
|
@@ -4805,8 +4440,8 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4805
4440
|
let fill = "#e2e8f0";
|
|
4806
4441
|
let dataLabel = null;
|
|
4807
4442
|
if (entry) {
|
|
4808
|
-
const t =
|
|
4809
|
-
fill =
|
|
4443
|
+
const t = chunkUSAJMMF2_js.normalizeValue(entry.value, minVal, maxVal);
|
|
4444
|
+
fill = chunkUSAJMMF2_js.sequentialColorScale(t);
|
|
4810
4445
|
dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
4811
4446
|
"text",
|
|
4812
4447
|
{
|
|
@@ -4817,7 +4452,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4817
4452
|
fontWeight: 600,
|
|
4818
4453
|
fill: "#1e293b",
|
|
4819
4454
|
style: { pointerEvents: "none" },
|
|
4820
|
-
children:
|
|
4455
|
+
children: chunkUSAJMMF2_js.formatAxisValue(entry.value)
|
|
4821
4456
|
},
|
|
4822
4457
|
`${element.id}-map-dl-${region.code}`
|
|
4823
4458
|
);
|
|
@@ -4835,7 +4470,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4835
4470
|
opacity: 0.9,
|
|
4836
4471
|
children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
|
|
4837
4472
|
region.name,
|
|
4838
|
-
entry ? `: ${
|
|
4473
|
+
entry ? `: ${chunkUSAJMMF2_js.formatAxisValue(entry.value)}` : ""
|
|
4839
4474
|
] })
|
|
4840
4475
|
}
|
|
4841
4476
|
),
|
|
@@ -4873,7 +4508,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4873
4508
|
fontSize: 7,
|
|
4874
4509
|
fill: "#64748b",
|
|
4875
4510
|
textAnchor: "middle",
|
|
4876
|
-
children:
|
|
4511
|
+
children: chunkUSAJMMF2_js.formatAxisValue(minVal)
|
|
4877
4512
|
},
|
|
4878
4513
|
`${element.id}-map-legend-min`
|
|
4879
4514
|
),
|
|
@@ -4885,7 +4520,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4885
4520
|
fontSize: 7,
|
|
4886
4521
|
fill: "#64748b",
|
|
4887
4522
|
textAnchor: "middle",
|
|
4888
|
-
children:
|
|
4523
|
+
children: chunkUSAJMMF2_js.formatAxisValue(maxVal)
|
|
4889
4524
|
},
|
|
4890
4525
|
`${element.id}-map-legend-max`
|
|
4891
4526
|
)
|
|
@@ -4951,7 +4586,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4951
4586
|
y,
|
|
4952
4587
|
fontSize,
|
|
4953
4588
|
fill: "#475569",
|
|
4954
|
-
children:
|
|
4589
|
+
children: chunkUSAJMMF2_js.formatAxisValue(row.value)
|
|
4955
4590
|
},
|
|
4956
4591
|
`${element.id}-map-ft-val-${i}`
|
|
4957
4592
|
)
|
|
@@ -5022,7 +4657,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
|
|
|
5022
4657
|
|
|
5023
4658
|
// src/viewer/utils/chart-overlay-utils.ts
|
|
5024
4659
|
function sColor(series, idx) {
|
|
5025
|
-
return
|
|
4660
|
+
return chunkUSAJMMF2_js.seriesColor(series, idx);
|
|
5026
4661
|
}
|
|
5027
4662
|
function valToY(val, range, topY, bottomY) {
|
|
5028
4663
|
const usable = bottomY - topY;
|
|
@@ -5561,7 +5196,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5561
5196
|
width: 10,
|
|
5562
5197
|
height: 10,
|
|
5563
5198
|
rx: 2,
|
|
5564
|
-
fill:
|
|
5199
|
+
fill: chunkUSAJMMF2_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5565
5200
|
},
|
|
5566
5201
|
`${id}-leg-r-${i}`
|
|
5567
5202
|
)
|
|
@@ -5585,7 +5220,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5585
5220
|
width: 10,
|
|
5586
5221
|
height: 10,
|
|
5587
5222
|
rx: 2,
|
|
5588
|
-
fill:
|
|
5223
|
+
fill: chunkUSAJMMF2_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5589
5224
|
}
|
|
5590
5225
|
),
|
|
5591
5226
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
|
|
@@ -5598,9 +5233,9 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5598
5233
|
}
|
|
5599
5234
|
const lines = [];
|
|
5600
5235
|
if (range.logScale && range.logBase) {
|
|
5601
|
-
const ticks =
|
|
5236
|
+
const ticks = chunkUSAJMMF2_js.generateLogTicks(range);
|
|
5602
5237
|
ticks.forEach((tickVal, i) => {
|
|
5603
|
-
const y =
|
|
5238
|
+
const y = chunkUSAJMMF2_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5604
5239
|
lines.push(
|
|
5605
5240
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5606
5241
|
"line",
|
|
@@ -5621,7 +5256,7 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5621
5256
|
const steps = 4;
|
|
5622
5257
|
for (let i = 0; i <= steps; i++) {
|
|
5623
5258
|
const val = range.min + range.span * i / steps;
|
|
5624
|
-
const y =
|
|
5259
|
+
const y = chunkUSAJMMF2_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5625
5260
|
lines.push(
|
|
5626
5261
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5627
5262
|
"line",
|
|
@@ -5645,9 +5280,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5645
5280
|
const labels = [];
|
|
5646
5281
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5647
5282
|
if (range.logScale && range.logBase) {
|
|
5648
|
-
const ticks =
|
|
5283
|
+
const ticks = chunkUSAJMMF2_js.generateLogTicks(range);
|
|
5649
5284
|
ticks.forEach((tickVal, i) => {
|
|
5650
|
-
const y =
|
|
5285
|
+
const y = chunkUSAJMMF2_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5651
5286
|
labels.push(
|
|
5652
5287
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5653
5288
|
"text",
|
|
@@ -5657,7 +5292,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5657
5292
|
textAnchor: "end",
|
|
5658
5293
|
fontSize: 8,
|
|
5659
5294
|
fill: "#64748b",
|
|
5660
|
-
children: hasDisplayUnits ?
|
|
5295
|
+
children: hasDisplayUnits ? chunkUSAJMMF2_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkUSAJMMF2_js.formatAxisValue(tickVal)
|
|
5661
5296
|
},
|
|
5662
5297
|
`${id}-vaxis-log-${i}`
|
|
5663
5298
|
)
|
|
@@ -5667,7 +5302,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5667
5302
|
const steps = 4;
|
|
5668
5303
|
for (let i = 0; i <= steps; i++) {
|
|
5669
5304
|
const val = range.min + range.span * i / steps;
|
|
5670
|
-
const y =
|
|
5305
|
+
const y = chunkUSAJMMF2_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5671
5306
|
labels.push(
|
|
5672
5307
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5673
5308
|
"text",
|
|
@@ -5677,7 +5312,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5677
5312
|
textAnchor: "end",
|
|
5678
5313
|
fontSize: 8,
|
|
5679
5314
|
fill: "#64748b",
|
|
5680
|
-
children: hasDisplayUnits ?
|
|
5315
|
+
children: hasDisplayUnits ? chunkUSAJMMF2_js.formatAxisValueWithUnits(val, axisFormatting) : chunkUSAJMMF2_js.formatAxisValue(val)
|
|
5681
5316
|
},
|
|
5682
5317
|
`${id}-vaxis-${i}`
|
|
5683
5318
|
)
|
|
@@ -5685,7 +5320,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5685
5320
|
}
|
|
5686
5321
|
}
|
|
5687
5322
|
if (hasDisplayUnits) {
|
|
5688
|
-
const unitLabel =
|
|
5323
|
+
const unitLabel = chunkUSAJMMF2_js.getDisplayUnitLabel(
|
|
5689
5324
|
axisFormatting.displayUnits,
|
|
5690
5325
|
axisFormatting.displayUnitsLabel
|
|
5691
5326
|
);
|
|
@@ -5760,7 +5395,7 @@ function renderZeroLine(id, range, layout) {
|
|
|
5760
5395
|
if (range.min >= 0) {
|
|
5761
5396
|
return null;
|
|
5762
5397
|
}
|
|
5763
|
-
const y =
|
|
5398
|
+
const y = chunkUSAJMMF2_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
|
|
5764
5399
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5765
5400
|
"line",
|
|
5766
5401
|
{
|
|
@@ -5784,7 +5419,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5784
5419
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5785
5420
|
for (let i = 0; i <= steps; i++) {
|
|
5786
5421
|
const val = range.min + range.span * i / steps;
|
|
5787
|
-
const y =
|
|
5422
|
+
const y = chunkUSAJMMF2_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5788
5423
|
labels.push(
|
|
5789
5424
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5790
5425
|
"text",
|
|
@@ -5796,7 +5431,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5796
5431
|
fontFamily,
|
|
5797
5432
|
fontWeight,
|
|
5798
5433
|
fill: fontColor,
|
|
5799
|
-
children: hasDisplayUnits ?
|
|
5434
|
+
children: hasDisplayUnits ? chunkUSAJMMF2_js.formatAxisValueWithUnits(val, axisFormatting) : chunkUSAJMMF2_js.formatAxisValue(val)
|
|
5800
5435
|
},
|
|
5801
5436
|
`${id}-sec-vaxis-${i}`
|
|
5802
5437
|
)
|
|
@@ -5820,7 +5455,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5820
5455
|
);
|
|
5821
5456
|
}
|
|
5822
5457
|
if (hasDisplayUnits) {
|
|
5823
|
-
const unitLabel =
|
|
5458
|
+
const unitLabel = chunkUSAJMMF2_js.getDisplayUnitLabel(
|
|
5824
5459
|
axisFormatting.displayUnits,
|
|
5825
5460
|
axisFormatting.displayUnitsLabel
|
|
5826
5461
|
);
|
|
@@ -5851,7 +5486,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
|
|
|
5851
5486
|
const ticks = [];
|
|
5852
5487
|
for (let i = 0; i <= steps; i++) {
|
|
5853
5488
|
const val = range.min + range.span * i / steps;
|
|
5854
|
-
const y =
|
|
5489
|
+
const y = chunkUSAJMMF2_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5855
5490
|
ticks.push(
|
|
5856
5491
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5857
5492
|
"line",
|
|
@@ -5878,7 +5513,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
|
|
|
5878
5513
|
const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
|
|
5879
5514
|
for (let i = 0; i <= steps; i++) {
|
|
5880
5515
|
const val = range.min + range.span * i / steps;
|
|
5881
|
-
const y =
|
|
5516
|
+
const y = chunkUSAJMMF2_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5882
5517
|
lines.push(
|
|
5883
5518
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5884
5519
|
"line",
|
|
@@ -6040,7 +5675,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6040
5675
|
width: 8,
|
|
6041
5676
|
height: 8,
|
|
6042
5677
|
borderRadius: 2,
|
|
6043
|
-
backgroundColor:
|
|
5678
|
+
backgroundColor: chunkUSAJMMF2_js.seriesColor(
|
|
6044
5679
|
s,
|
|
6045
5680
|
si,
|
|
6046
5681
|
chartData.style?.styleId,
|
|
@@ -6078,10 +5713,10 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6078
5713
|
}
|
|
6079
5714
|
function renderStockChart(element, chartData, categoryLabels) {
|
|
6080
5715
|
const style = chartData.style;
|
|
6081
|
-
const areaFill =
|
|
5716
|
+
const areaFill = chunkUSAJMMF2_js.chartAreaFill(chartData);
|
|
6082
5717
|
const legendPos = style?.legendPosition || "b";
|
|
6083
|
-
const range =
|
|
6084
|
-
const layout =
|
|
5718
|
+
const range = chunkUSAJMMF2_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
5719
|
+
const layout = chunkUSAJMMF2_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6085
5720
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6086
5721
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
6087
5722
|
const candleWidth = barGroupWidth * 0.5;
|
|
@@ -6102,10 +5737,10 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6102
5737
|
const close = closeSeries.values[ci] ?? high;
|
|
6103
5738
|
const isUp = close >= open;
|
|
6104
5739
|
const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
|
|
6105
|
-
const highY =
|
|
6106
|
-
const lowY =
|
|
6107
|
-
const openY =
|
|
6108
|
-
const closeY =
|
|
5740
|
+
const highY = chunkUSAJMMF2_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
|
|
5741
|
+
const lowY = chunkUSAJMMF2_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
|
|
5742
|
+
const openY = chunkUSAJMMF2_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
|
|
5743
|
+
const closeY = chunkUSAJMMF2_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
|
|
6109
5744
|
elements.push(
|
|
6110
5745
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6111
5746
|
"line",
|
|
@@ -6148,7 +5783,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6148
5783
|
textAnchor: "middle",
|
|
6149
5784
|
fontSize: 7,
|
|
6150
5785
|
fill: "#334155",
|
|
6151
|
-
children:
|
|
5786
|
+
children: chunkUSAJMMF2_js.formatAxisValue(close)
|
|
6152
5787
|
},
|
|
6153
5788
|
`${element.id}-stock-dl-${ci}`
|
|
6154
5789
|
)
|
|
@@ -6190,7 +5825,7 @@ function FailedToLoad() {
|
|
|
6190
5825
|
var LazySurfaceChart3DScene = React6__default.default.lazy(
|
|
6191
5826
|
async () => {
|
|
6192
5827
|
try {
|
|
6193
|
-
return await import('./SurfaceChart3DScene-
|
|
5828
|
+
return await import('./SurfaceChart3DScene-W6I255VU.js');
|
|
6194
5829
|
} catch {
|
|
6195
5830
|
return { default: FailedToLoad };
|
|
6196
5831
|
}
|
|
@@ -6214,7 +5849,7 @@ var SurfaceChart3DErrorBoundary = class extends React6__default.default.Componen
|
|
|
6214
5849
|
function buildSurfaceData(chartData, categoryLabels) {
|
|
6215
5850
|
const rows = chartData.series.length;
|
|
6216
5851
|
const cols = Math.max(categoryLabels.length, 1);
|
|
6217
|
-
const range =
|
|
5852
|
+
const range = chunkUSAJMMF2_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6218
5853
|
const heightMap = new Float32Array(rows * cols);
|
|
6219
5854
|
const colorMap = new Float32Array(rows * cols * 3);
|
|
6220
5855
|
for (let r = 0; r < rows; r++) {
|
|
@@ -6333,10 +5968,10 @@ function darkenRgb(r, g, b, factor) {
|
|
|
6333
5968
|
}
|
|
6334
5969
|
function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
6335
5970
|
const style = chartData.style;
|
|
6336
|
-
const areaFill =
|
|
5971
|
+
const areaFill = chunkUSAJMMF2_js.chartAreaFill(chartData);
|
|
6337
5972
|
const legendPos = style?.legendPosition || "b";
|
|
6338
|
-
const layout =
|
|
6339
|
-
const range =
|
|
5973
|
+
const layout = chunkUSAJMMF2_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
5974
|
+
const range = chunkUSAJMMF2_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6340
5975
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6341
5976
|
const seriesCount = chartData.series.length;
|
|
6342
5977
|
const cols = catCount - 1;
|
|
@@ -6425,10 +6060,10 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6425
6060
|
}
|
|
6426
6061
|
function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
6427
6062
|
const style = chartData.style;
|
|
6428
|
-
const areaFill =
|
|
6063
|
+
const areaFill = chunkUSAJMMF2_js.chartAreaFill(chartData);
|
|
6429
6064
|
const legendPos = style?.legendPosition || "b";
|
|
6430
|
-
const layout =
|
|
6431
|
-
const range =
|
|
6065
|
+
const layout = chunkUSAJMMF2_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6066
|
+
const range = chunkUSAJMMF2_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6432
6067
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6433
6068
|
const seriesCount = chartData.series.length;
|
|
6434
6069
|
const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
|
|
@@ -6490,9 +6125,9 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6490
6125
|
}
|
|
6491
6126
|
function renderTreemapChart(element, chartData, categoryLabels) {
|
|
6492
6127
|
const style = chartData.style;
|
|
6493
|
-
const areaFill =
|
|
6128
|
+
const areaFill = chunkUSAJMMF2_js.chartAreaFill(chartData);
|
|
6494
6129
|
const legendPos = style?.legendPosition || "b";
|
|
6495
|
-
const layout =
|
|
6130
|
+
const layout = chunkUSAJMMF2_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6496
6131
|
const allValues = chartData.series.flatMap((s) => s.values);
|
|
6497
6132
|
const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
|
|
6498
6133
|
const rects = [];
|
|
@@ -6515,7 +6150,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6515
6150
|
y: curY,
|
|
6516
6151
|
width: Math.max(w - 1, 1),
|
|
6517
6152
|
height: Math.max(h - 1, 1),
|
|
6518
|
-
fill:
|
|
6153
|
+
fill: chunkUSAJMMF2_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
|
|
6519
6154
|
rx: 2,
|
|
6520
6155
|
opacity: 0.85
|
|
6521
6156
|
},
|
|
@@ -6566,11 +6201,11 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6566
6201
|
}
|
|
6567
6202
|
function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
6568
6203
|
const style = chartData.style;
|
|
6569
|
-
const areaFill =
|
|
6204
|
+
const areaFill = chunkUSAJMMF2_js.chartAreaFill(chartData);
|
|
6570
6205
|
const legendPos = style?.legendPosition || "b";
|
|
6571
6206
|
const values = chartData.series[0]?.values ?? [];
|
|
6572
|
-
const range =
|
|
6573
|
-
const layout =
|
|
6207
|
+
const range = chunkUSAJMMF2_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6208
|
+
const layout = chunkUSAJMMF2_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6574
6209
|
const catCount = Math.max(categoryLabels.length, values.length, 1);
|
|
6575
6210
|
const barWidth = layout.plotWidth / catCount * 0.6;
|
|
6576
6211
|
const gap = layout.plotWidth / catCount * 0.2;
|
|
@@ -6581,8 +6216,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6581
6216
|
const isLast = i === values.length - 1;
|
|
6582
6217
|
const startVal = isLast ? 0 : runningTotal;
|
|
6583
6218
|
const endVal = isLast ? runningTotal + val : runningTotal + val;
|
|
6584
|
-
const barStartY =
|
|
6585
|
-
const barEndY =
|
|
6219
|
+
const barStartY = chunkUSAJMMF2_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
|
|
6220
|
+
const barEndY = chunkUSAJMMF2_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
|
|
6586
6221
|
const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
|
|
6587
6222
|
const y = Math.min(barStartY, barEndY);
|
|
6588
6223
|
const h = Math.max(Math.abs(barEndY - barStartY), 1);
|
|
@@ -6611,7 +6246,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6611
6246
|
textAnchor: "middle",
|
|
6612
6247
|
fontSize: 7,
|
|
6613
6248
|
fill: "#334155",
|
|
6614
|
-
children:
|
|
6249
|
+
children: chunkUSAJMMF2_js.formatAxisValue(isLast ? endVal : val)
|
|
6615
6250
|
},
|
|
6616
6251
|
`${element.id}-wf-dl-${i}`
|
|
6617
6252
|
)
|
|
@@ -6658,20 +6293,20 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6658
6293
|
}
|
|
6659
6294
|
function renderComboChart(element, chartData, categoryLabels) {
|
|
6660
6295
|
const style = chartData.style;
|
|
6661
|
-
const areaFill =
|
|
6296
|
+
const areaFill = chunkUSAJMMF2_js.chartAreaFill(chartData);
|
|
6662
6297
|
const legendPos = style?.legendPosition || "b";
|
|
6663
|
-
const layoutOpts =
|
|
6298
|
+
const layoutOpts = chunkUSAJMMF2_js.computeLayoutOptions(
|
|
6664
6299
|
chartData.axes,
|
|
6665
6300
|
chartData.dataTable,
|
|
6666
6301
|
chartData.series.length
|
|
6667
6302
|
);
|
|
6668
|
-
const layout =
|
|
6669
|
-
const { primary, secondary } =
|
|
6303
|
+
const layout = chunkUSAJMMF2_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
|
|
6304
|
+
const { primary, secondary } = chunkUSAJMMF2_js.splitSeriesByAxis(chartData.series, chartData.axes);
|
|
6670
6305
|
const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
|
|
6671
6306
|
const secondarySeries = secondary.map((e) => e.series);
|
|
6672
|
-
const range =
|
|
6673
|
-
const secondaryRange = secondarySeries.length > 0 ?
|
|
6674
|
-
const secondaryAxisFmt =
|
|
6307
|
+
const range = chunkUSAJMMF2_js.computeValueRangeForChart(primarySeries, chartData.axes);
|
|
6308
|
+
const secondaryRange = secondarySeries.length > 0 ? chunkUSAJMMF2_js.computeValueRange(secondarySeries) : void 0;
|
|
6309
|
+
const secondaryAxisFmt = chunkUSAJMMF2_js.getSecondaryValueAxis(chartData.axes);
|
|
6675
6310
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6676
6311
|
const barSeriesCount = 1;
|
|
6677
6312
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
@@ -6687,8 +6322,8 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6687
6322
|
const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
|
|
6688
6323
|
barSeries.values.forEach((val, vi) => {
|
|
6689
6324
|
const x = layout.plotLeft + barGroupWidth * vi + barOffset;
|
|
6690
|
-
const zeroY =
|
|
6691
|
-
const valY =
|
|
6325
|
+
const zeroY = chunkUSAJMMF2_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
|
|
6326
|
+
const valY = chunkUSAJMMF2_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
|
|
6692
6327
|
const y = Math.min(zeroY, valY);
|
|
6693
6328
|
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
6694
6329
|
barElements.push(
|
|
@@ -6699,7 +6334,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6699
6334
|
y,
|
|
6700
6335
|
width: barWidth,
|
|
6701
6336
|
height: h,
|
|
6702
|
-
fill:
|
|
6337
|
+
fill: chunkUSAJMMF2_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
|
|
6703
6338
|
rx: 1
|
|
6704
6339
|
},
|
|
6705
6340
|
`${element.id}-combo-bar-${vi}`
|
|
@@ -6715,7 +6350,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6715
6350
|
textAnchor: "middle",
|
|
6716
6351
|
fontSize: 7,
|
|
6717
6352
|
fill: "#334155",
|
|
6718
|
-
children:
|
|
6353
|
+
children: chunkUSAJMMF2_js.formatAxisValue(val)
|
|
6719
6354
|
},
|
|
6720
6355
|
`${element.id}-combo-bar-dl-${vi}`
|
|
6721
6356
|
)
|
|
@@ -6732,10 +6367,10 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6732
6367
|
const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
|
|
6733
6368
|
const points = series.values.map((val, vi) => {
|
|
6734
6369
|
const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
|
|
6735
|
-
const y =
|
|
6370
|
+
const y = chunkUSAJMMF2_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
|
|
6736
6371
|
return { x, y, val };
|
|
6737
6372
|
});
|
|
6738
|
-
const c =
|
|
6373
|
+
const c = chunkUSAJMMF2_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
|
|
6739
6374
|
lineElements.push(
|
|
6740
6375
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6741
6376
|
"polyline",
|
|
@@ -6762,7 +6397,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6762
6397
|
textAnchor: "middle",
|
|
6763
6398
|
fontSize: 7,
|
|
6764
6399
|
fill: "#334155",
|
|
6765
|
-
children:
|
|
6400
|
+
children: chunkUSAJMMF2_js.formatAxisValue(p.val)
|
|
6766
6401
|
},
|
|
6767
6402
|
`${element.id}-combo-line-dl-${si}-${vi}`
|
|
6768
6403
|
)
|
|
@@ -6865,1036 +6500,6 @@ function renderChartElement(element) {
|
|
|
6865
6500
|
}
|
|
6866
6501
|
return renderDefaultBarChart(element);
|
|
6867
6502
|
}
|
|
6868
|
-
var PALETTES = {
|
|
6869
|
-
colorful1: ["#3b82f6", "#22c55e", "#f97316", "#eab308", "#a855f7", "#ec4899"],
|
|
6870
|
-
colorful2: ["#6366f1", "#14b8a6", "#f59e0b", "#ef4444", "#8b5cf6", "#06b6d4"],
|
|
6871
|
-
colorful3: ["#0ea5e9", "#84cc16", "#f43e5e", "#a855f7", "#f97316", "#10b981"],
|
|
6872
|
-
monochromatic1: ["#3b82f6", "#60a5fa", "#93c5fd", "#bfdbfe", "#2563eb", "#1d4ed8"],
|
|
6873
|
-
monochromatic2: ["#6366f1", "#818cf8", "#a5b4fc", "#c7d2fe", "#4f46e5", "#4338ca"]
|
|
6874
|
-
};
|
|
6875
|
-
var DEFAULT_PALETTE = PALETTES.colorful1;
|
|
6876
|
-
function colour(index, palette = DEFAULT_PALETTE) {
|
|
6877
|
-
return palette[index % palette.length];
|
|
6878
|
-
}
|
|
6879
|
-
function nodeOpacity(index, total, style) {
|
|
6880
|
-
const base = style === "intense" ? 1 : style === "moderate" ? 0.92 : 0.85;
|
|
6881
|
-
if (total <= 1) {
|
|
6882
|
-
return base;
|
|
6883
|
-
}
|
|
6884
|
-
return base - index / (total - 1) * 0.15;
|
|
6885
|
-
}
|
|
6886
|
-
function styleShadow(style) {
|
|
6887
|
-
if (style === "intense") {
|
|
6888
|
-
return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";
|
|
6889
|
-
}
|
|
6890
|
-
if (style === "moderate") {
|
|
6891
|
-
return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))";
|
|
6892
|
-
}
|
|
6893
|
-
return void 0;
|
|
6894
|
-
}
|
|
6895
|
-
function styleStroke(style) {
|
|
6896
|
-
if (style === "intense") {
|
|
6897
|
-
return 2;
|
|
6898
|
-
}
|
|
6899
|
-
if (style === "moderate") {
|
|
6900
|
-
return 1.5;
|
|
6901
|
-
}
|
|
6902
|
-
return 0;
|
|
6903
|
-
}
|
|
6904
|
-
function truncate(text, max) {
|
|
6905
|
-
if (text.length <= max) {
|
|
6906
|
-
return text;
|
|
6907
|
-
}
|
|
6908
|
-
return `${text.slice(0, max - 1)}\u2026`;
|
|
6909
|
-
}
|
|
6910
|
-
function resolvePalette(el) {
|
|
6911
|
-
if (el.type !== "smartArt" || !el.smartArtData) {
|
|
6912
|
-
return DEFAULT_PALETTE;
|
|
6913
|
-
}
|
|
6914
|
-
const ctFills = el.smartArtData.colorTransform?.fillColors;
|
|
6915
|
-
if (ctFills && ctFills.length > 0) {
|
|
6916
|
-
return ctFills;
|
|
6917
|
-
}
|
|
6918
|
-
return PALETTES[el.smartArtData.colorScheme ?? "colorful1"] ?? DEFAULT_PALETTE;
|
|
6919
|
-
}
|
|
6920
|
-
function resolveStyle(el) {
|
|
6921
|
-
if (el.type !== "smartArt" || !el.smartArtData) {
|
|
6922
|
-
return "flat";
|
|
6923
|
-
}
|
|
6924
|
-
return el.smartArtData.style ?? "flat";
|
|
6925
|
-
}
|
|
6926
|
-
function resolveSmartArtDataPalette(data) {
|
|
6927
|
-
const ctFills = data.colorTransform?.fillColors;
|
|
6928
|
-
if (ctFills && ctFills.length > 0) {
|
|
6929
|
-
return ctFills;
|
|
6930
|
-
}
|
|
6931
|
-
return PALETTES[data.colorScheme ?? "colorful1"] ?? DEFAULT_PALETTE;
|
|
6932
|
-
}
|
|
6933
|
-
function buildTree(nodes) {
|
|
6934
|
-
const map = /* @__PURE__ */ new Map();
|
|
6935
|
-
for (const n of nodes) {
|
|
6936
|
-
map.set(n.id, { node: n, children: [] });
|
|
6937
|
-
}
|
|
6938
|
-
const roots = [];
|
|
6939
|
-
for (const n of nodes) {
|
|
6940
|
-
const treeNode = map.get(n.id);
|
|
6941
|
-
if (n.parentId && map.has(n.parentId)) {
|
|
6942
|
-
map.get(n.parentId).children.push(treeNode);
|
|
6943
|
-
} else {
|
|
6944
|
-
roots.push(treeNode);
|
|
6945
|
-
}
|
|
6946
|
-
}
|
|
6947
|
-
return roots;
|
|
6948
|
-
}
|
|
6949
|
-
function treeWidth(t) {
|
|
6950
|
-
if (t.children.length === 0) {
|
|
6951
|
-
return 1;
|
|
6952
|
-
}
|
|
6953
|
-
return t.children.reduce((sum, c) => sum + treeWidth(c), 0);
|
|
6954
|
-
}
|
|
6955
|
-
function treeDepth(t) {
|
|
6956
|
-
if (t.children.length === 0) {
|
|
6957
|
-
return 1;
|
|
6958
|
-
}
|
|
6959
|
-
return 1 + Math.max(...t.children.map(treeDepth));
|
|
6960
|
-
}
|
|
6961
|
-
function layoutToCategory(layout) {
|
|
6962
|
-
if (!layout) {
|
|
6963
|
-
return "list";
|
|
6964
|
-
}
|
|
6965
|
-
const map = {
|
|
6966
|
-
basicBlockList: "list",
|
|
6967
|
-
alternatingHexagons: "list",
|
|
6968
|
-
basicChevronProcess: "process",
|
|
6969
|
-
basicCycle: "cycle",
|
|
6970
|
-
basicPie: "cycle",
|
|
6971
|
-
basicRadial: "radial",
|
|
6972
|
-
basicVenn: "venn",
|
|
6973
|
-
continuousBlockProcess: "process",
|
|
6974
|
-
convergingRadial: "radial",
|
|
6975
|
-
hierarchy: "hierarchy",
|
|
6976
|
-
horizontalBulletList: "list",
|
|
6977
|
-
linearVenn: "venn",
|
|
6978
|
-
segmentedProcess: "process",
|
|
6979
|
-
stackedList: "list",
|
|
6980
|
-
tableList: "list",
|
|
6981
|
-
trapezoidList: "list",
|
|
6982
|
-
upwardArrow: "process",
|
|
6983
|
-
basicFunnel: "funnel",
|
|
6984
|
-
basicTarget: "radial",
|
|
6985
|
-
interlockingGears: "radial",
|
|
6986
|
-
basicTimeline: "process",
|
|
6987
|
-
basicMatrix: "matrix",
|
|
6988
|
-
basicPyramid: "pyramid",
|
|
6989
|
-
invertedPyramid: "pyramid",
|
|
6990
|
-
bendingProcess: "process",
|
|
6991
|
-
stepDownProcess: "stepdown",
|
|
6992
|
-
alternatingFlow: "alternatingflow",
|
|
6993
|
-
descendingProcess: "descending",
|
|
6994
|
-
pictureAccentList: "pictureaccent",
|
|
6995
|
-
verticalBlockList: "verticalblock",
|
|
6996
|
-
groupedList: "grouped",
|
|
6997
|
-
pyramidList: "pyramidlist",
|
|
6998
|
-
horizontalPictureList: "horizontalpicture",
|
|
6999
|
-
accentProcess: "accentprocess",
|
|
7000
|
-
verticalChevronList: "verticalchevron"
|
|
7001
|
-
};
|
|
7002
|
-
return map[layout] ?? "list";
|
|
7003
|
-
}
|
|
7004
|
-
var LABEL_WIDTH_FRACTION = 0.82;
|
|
7005
|
-
function smartArtNodeGroupProps(nodeId, shadow, label2) {
|
|
7006
|
-
const props = {
|
|
7007
|
-
"data-smartart-node-id": nodeId,
|
|
7008
|
-
style: { filter: shadow, pointerEvents: "auto" }
|
|
7009
|
-
};
|
|
7010
|
-
if (label2) {
|
|
7011
|
-
props.role = "img";
|
|
7012
|
-
props["aria-label"] = label2;
|
|
7013
|
-
}
|
|
7014
|
-
return props;
|
|
7015
|
-
}
|
|
7016
|
-
function fitFontSize(text, maxWidth, maxHeight, baseSize) {
|
|
7017
|
-
const charWidthRatio = 0.6;
|
|
7018
|
-
const maxByWidth = maxWidth / (text.length * charWidthRatio);
|
|
7019
|
-
const maxByHeight = maxHeight * 0.5;
|
|
7020
|
-
return Math.max(6, Math.min(baseSize, maxByWidth, maxByHeight));
|
|
7021
|
-
}
|
|
7022
|
-
function chevronPoints(x, y, w, h) {
|
|
7023
|
-
const depth = Math.min(w * 0.2, h * 0.4);
|
|
7024
|
-
return [
|
|
7025
|
-
`${x},${y}`,
|
|
7026
|
-
`${x + w - depth},${y}`,
|
|
7027
|
-
`${x + w},${y + h / 2}`,
|
|
7028
|
-
`${x + w - depth},${y + h}`,
|
|
7029
|
-
`${x},${y + h}`,
|
|
7030
|
-
`${x + depth},${y + h / 2}`
|
|
7031
|
-
].join(" ");
|
|
7032
|
-
}
|
|
7033
|
-
function gearPath(cx, cy, outerR, innerR, teeth) {
|
|
7034
|
-
const segments = [];
|
|
7035
|
-
const step = Math.PI * 2 / (teeth * 2);
|
|
7036
|
-
for (let i = 0; i < teeth * 2; i++) {
|
|
7037
|
-
const angle = i * step - Math.PI / 2;
|
|
7038
|
-
const r = i % 2 === 0 ? outerR : innerR;
|
|
7039
|
-
const x = cx + r * Math.cos(angle);
|
|
7040
|
-
const y = cy + r * Math.sin(angle);
|
|
7041
|
-
segments.push(i === 0 ? `M${x},${y}` : `L${x},${y}`);
|
|
7042
|
-
}
|
|
7043
|
-
segments.push("Z");
|
|
7044
|
-
return segments.join(" ");
|
|
7045
|
-
}
|
|
7046
|
-
function SmartArtNodeText({
|
|
7047
|
-
text,
|
|
7048
|
-
x,
|
|
7049
|
-
y,
|
|
7050
|
-
fill,
|
|
7051
|
-
fontSize,
|
|
7052
|
-
fontWeight,
|
|
7053
|
-
fontStyle,
|
|
7054
|
-
className,
|
|
7055
|
-
anchor = "middle",
|
|
7056
|
-
maxWidth
|
|
7057
|
-
}) {
|
|
7058
|
-
const lines = maxWidth !== void 0 ? chunkRZYOOWZN_js.centeredSvgTextLines(text, fontSize, { maxWidth: maxWidth * LABEL_WIDTH_FRACTION }).map(
|
|
7059
|
-
(line) => line.text
|
|
7060
|
-
) : text.split("\n").filter((l) => l.length > 0);
|
|
7061
|
-
const lineHeight = fontSize * 1.2;
|
|
7062
|
-
let startY;
|
|
7063
|
-
let dominantBaseline;
|
|
7064
|
-
if (anchor === "bottom") {
|
|
7065
|
-
startY = lines.length > 0 ? y - (lines.length - 1) * lineHeight : y;
|
|
7066
|
-
dominantBaseline = "auto";
|
|
7067
|
-
} else if (anchor === "top") {
|
|
7068
|
-
startY = y;
|
|
7069
|
-
dominantBaseline = "hanging";
|
|
7070
|
-
} else {
|
|
7071
|
-
const totalHeight = lines.length * lineHeight;
|
|
7072
|
-
startY = lines.length > 0 ? y - totalHeight / 2 + lineHeight / 2 : y;
|
|
7073
|
-
dominantBaseline = "central";
|
|
7074
|
-
}
|
|
7075
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7076
|
-
"text",
|
|
7077
|
-
{
|
|
7078
|
-
x,
|
|
7079
|
-
textAnchor: "middle",
|
|
7080
|
-
dominantBaseline,
|
|
7081
|
-
fill,
|
|
7082
|
-
fontSize,
|
|
7083
|
-
fontWeight,
|
|
7084
|
-
fontStyle,
|
|
7085
|
-
className,
|
|
7086
|
-
children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("tspan", { x, y: startY + i * lineHeight, children: line }, i))
|
|
7087
|
-
}
|
|
7088
|
-
);
|
|
7089
|
-
}
|
|
7090
|
-
function wrapChrome(chrome, content, className, a11y) {
|
|
7091
|
-
const wrapperStyle = {};
|
|
7092
|
-
if (chrome?.backgroundColor) {
|
|
7093
|
-
wrapperStyle.backgroundColor = chrome.backgroundColor;
|
|
7094
|
-
}
|
|
7095
|
-
if (chrome?.outlineColor) {
|
|
7096
|
-
wrapperStyle.border = `${chrome.outlineWidth ?? 1}px solid ${chrome.outlineColor}`;
|
|
7097
|
-
}
|
|
7098
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7099
|
-
"div",
|
|
7100
|
-
{
|
|
7101
|
-
className: `w-full h-full ${className}`,
|
|
7102
|
-
style: wrapperStyle,
|
|
7103
|
-
role: a11y?.role,
|
|
7104
|
-
"aria-label": a11y?.label,
|
|
7105
|
-
children: content
|
|
7106
|
-
}
|
|
7107
|
-
);
|
|
7108
|
-
}
|
|
7109
|
-
function renderStepDownProcess(element, nodes, palette, style) {
|
|
7110
|
-
const w = element.width;
|
|
7111
|
-
const h = element.height;
|
|
7112
|
-
const pad = 8;
|
|
7113
|
-
const usableW = w - pad * 2;
|
|
7114
|
-
const usableH = h - pad * 2;
|
|
7115
|
-
const stepW = usableW / nodes.length;
|
|
7116
|
-
const stepH = usableH / nodes.length;
|
|
7117
|
-
const boxW = stepW * 0.85;
|
|
7118
|
-
const boxH = stepH * 0.6;
|
|
7119
|
-
const shadow = styleShadow(style);
|
|
7120
|
-
const sw = styleStroke(style);
|
|
7121
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7122
|
-
"svg",
|
|
7123
|
-
{
|
|
7124
|
-
className: "w-full h-full pointer-events-none",
|
|
7125
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7126
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7127
|
-
style: { filter: shadow },
|
|
7128
|
-
children: nodes.map((node, i) => {
|
|
7129
|
-
const x = pad + i * stepW;
|
|
7130
|
-
const y = pad + i * stepH;
|
|
7131
|
-
const fontSize = Math.max(7, Math.min(10, boxW * 0.1));
|
|
7132
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7133
|
-
i < nodes.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7134
|
-
"line",
|
|
7135
|
-
{
|
|
7136
|
-
x1: x + boxW,
|
|
7137
|
-
y1: y + boxH / 2,
|
|
7138
|
-
x2: x + stepW,
|
|
7139
|
-
y2: y + stepH + boxH / 2,
|
|
7140
|
-
stroke: "#94a3b8",
|
|
7141
|
-
strokeWidth: 1.5,
|
|
7142
|
-
opacity: 0.5
|
|
7143
|
-
}
|
|
7144
|
-
),
|
|
7145
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7146
|
-
"rect",
|
|
7147
|
-
{
|
|
7148
|
-
x,
|
|
7149
|
-
y,
|
|
7150
|
-
width: boxW,
|
|
7151
|
-
height: boxH,
|
|
7152
|
-
rx: 5,
|
|
7153
|
-
fill: colour(i, palette),
|
|
7154
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7155
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7156
|
-
strokeWidth: sw
|
|
7157
|
-
}
|
|
7158
|
-
),
|
|
7159
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7160
|
-
SmartArtNodeText,
|
|
7161
|
-
{
|
|
7162
|
-
x: x + boxW / 2,
|
|
7163
|
-
y: y + boxH / 2,
|
|
7164
|
-
text: truncate(node.text, 20),
|
|
7165
|
-
fill: "white",
|
|
7166
|
-
fontSize,
|
|
7167
|
-
className: "pointer-events-none"
|
|
7168
|
-
}
|
|
7169
|
-
)
|
|
7170
|
-
] }, `${element.id}-stepdown-${node.id}-${i}`);
|
|
7171
|
-
})
|
|
7172
|
-
}
|
|
7173
|
-
);
|
|
7174
|
-
}
|
|
7175
|
-
function renderAlternatingFlow(element, nodes, palette, style) {
|
|
7176
|
-
const w = element.width;
|
|
7177
|
-
const h = element.height;
|
|
7178
|
-
const pad = 8;
|
|
7179
|
-
const usableH = h - pad * 2;
|
|
7180
|
-
const rowH = usableH / nodes.length;
|
|
7181
|
-
const halfW = (w - pad * 2) / 2;
|
|
7182
|
-
const boxW = halfW * 0.8;
|
|
7183
|
-
const boxH = Math.min(rowH * 0.7, 40);
|
|
7184
|
-
const centerX = w / 2;
|
|
7185
|
-
const shadow = styleShadow(style);
|
|
7186
|
-
const sw = styleStroke(style);
|
|
7187
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7188
|
-
"svg",
|
|
7189
|
-
{
|
|
7190
|
-
className: "w-full h-full pointer-events-none",
|
|
7191
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7192
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7193
|
-
style: { filter: shadow },
|
|
7194
|
-
children: [
|
|
7195
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7196
|
-
"line",
|
|
7197
|
-
{
|
|
7198
|
-
x1: centerX,
|
|
7199
|
-
y1: pad,
|
|
7200
|
-
x2: centerX,
|
|
7201
|
-
y2: h - pad,
|
|
7202
|
-
stroke: "#94a3b8",
|
|
7203
|
-
strokeWidth: 2,
|
|
7204
|
-
opacity: 0.3
|
|
7205
|
-
}
|
|
7206
|
-
),
|
|
7207
|
-
nodes.map((node, i) => {
|
|
7208
|
-
const isLeft = i % 2 === 0;
|
|
7209
|
-
const y = pad + i * rowH + (rowH - boxH) / 2;
|
|
7210
|
-
const x = isLeft ? centerX - boxW - 12 : centerX + 12;
|
|
7211
|
-
const fontSize = Math.max(7, Math.min(10, boxW * 0.1));
|
|
7212
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7213
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7214
|
-
"line",
|
|
7215
|
-
{
|
|
7216
|
-
x1: isLeft ? x + boxW : x,
|
|
7217
|
-
y1: y + boxH / 2,
|
|
7218
|
-
x2: centerX,
|
|
7219
|
-
y2: y + boxH / 2,
|
|
7220
|
-
stroke: colour(i, palette),
|
|
7221
|
-
strokeWidth: 1.5,
|
|
7222
|
-
opacity: 0.5
|
|
7223
|
-
}
|
|
7224
|
-
),
|
|
7225
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: centerX, cy: y + boxH / 2, r: 3, fill: colour(i, palette), opacity: 0.8 }),
|
|
7226
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7227
|
-
"rect",
|
|
7228
|
-
{
|
|
7229
|
-
x,
|
|
7230
|
-
y,
|
|
7231
|
-
width: boxW,
|
|
7232
|
-
height: boxH,
|
|
7233
|
-
rx: 5,
|
|
7234
|
-
fill: colour(i, palette),
|
|
7235
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7236
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7237
|
-
strokeWidth: sw
|
|
7238
|
-
}
|
|
7239
|
-
),
|
|
7240
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7241
|
-
SmartArtNodeText,
|
|
7242
|
-
{
|
|
7243
|
-
x: x + boxW / 2,
|
|
7244
|
-
y: y + boxH / 2,
|
|
7245
|
-
text: truncate(node.text, 20),
|
|
7246
|
-
fill: "white",
|
|
7247
|
-
fontSize,
|
|
7248
|
-
className: "pointer-events-none"
|
|
7249
|
-
}
|
|
7250
|
-
)
|
|
7251
|
-
] }, `${element.id}-altflow-${node.id}-${i}`);
|
|
7252
|
-
})
|
|
7253
|
-
]
|
|
7254
|
-
}
|
|
7255
|
-
);
|
|
7256
|
-
}
|
|
7257
|
-
function renderDescendingProcess(element, nodes, palette, style) {
|
|
7258
|
-
const w = element.width;
|
|
7259
|
-
const h = element.height;
|
|
7260
|
-
const pad = 8;
|
|
7261
|
-
const gap = 4;
|
|
7262
|
-
const usableH = h - pad * 2;
|
|
7263
|
-
const maxW = w - pad * 2;
|
|
7264
|
-
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
7265
|
-
const shadow = styleShadow(style);
|
|
7266
|
-
const sw = styleStroke(style);
|
|
7267
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7268
|
-
"svg",
|
|
7269
|
-
{
|
|
7270
|
-
className: "w-full h-full pointer-events-none",
|
|
7271
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7272
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7273
|
-
style: { filter: shadow },
|
|
7274
|
-
children: nodes.map((node, i) => {
|
|
7275
|
-
const widthFraction = 1 - i / Math.max(nodes.length, 1) * 0.5;
|
|
7276
|
-
const bw = maxW * widthFraction;
|
|
7277
|
-
const x = (w - bw) / 2;
|
|
7278
|
-
const y = pad + i * (itemH + gap);
|
|
7279
|
-
const fontSize = Math.max(7, Math.min(11, itemH * 0.4));
|
|
7280
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7281
|
-
i < nodes.length - 1 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7282
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7283
|
-
"line",
|
|
7284
|
-
{
|
|
7285
|
-
x1: w / 2,
|
|
7286
|
-
y1: y + itemH,
|
|
7287
|
-
x2: w / 2,
|
|
7288
|
-
y2: y + itemH + gap,
|
|
7289
|
-
stroke: "#94a3b8",
|
|
7290
|
-
strokeWidth: 1.5,
|
|
7291
|
-
opacity: 0.5
|
|
7292
|
-
}
|
|
7293
|
-
),
|
|
7294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7295
|
-
"polygon",
|
|
7296
|
-
{
|
|
7297
|
-
points: `${w / 2 - 3},${y + itemH + gap - 4} ${w / 2},${y + itemH + gap} ${w / 2 + 3},${y + itemH + gap - 4}`,
|
|
7298
|
-
fill: "#94a3b8",
|
|
7299
|
-
opacity: 0.5
|
|
7300
|
-
}
|
|
7301
|
-
)
|
|
7302
|
-
] }),
|
|
7303
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7304
|
-
"rect",
|
|
7305
|
-
{
|
|
7306
|
-
x,
|
|
7307
|
-
y,
|
|
7308
|
-
width: bw,
|
|
7309
|
-
height: itemH,
|
|
7310
|
-
rx: 5,
|
|
7311
|
-
fill: colour(i, palette),
|
|
7312
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7313
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7314
|
-
strokeWidth: sw
|
|
7315
|
-
}
|
|
7316
|
-
),
|
|
7317
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7318
|
-
SmartArtNodeText,
|
|
7319
|
-
{
|
|
7320
|
-
x: w / 2,
|
|
7321
|
-
y: y + itemH / 2,
|
|
7322
|
-
text: truncate(node.text, 30),
|
|
7323
|
-
fill: "white",
|
|
7324
|
-
fontSize,
|
|
7325
|
-
className: "pointer-events-none"
|
|
7326
|
-
}
|
|
7327
|
-
)
|
|
7328
|
-
] }, `${element.id}-desc-${node.id}-${i}`);
|
|
7329
|
-
})
|
|
7330
|
-
}
|
|
7331
|
-
);
|
|
7332
|
-
}
|
|
7333
|
-
function renderPictureAccentList(element, nodes, palette, style) {
|
|
7334
|
-
const w = element.width;
|
|
7335
|
-
const h = element.height;
|
|
7336
|
-
const pad = 8;
|
|
7337
|
-
const gap = 6;
|
|
7338
|
-
const usableH = h - pad * 2;
|
|
7339
|
-
const usableW = w - pad * 2;
|
|
7340
|
-
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
7341
|
-
const circleR = Math.min(itemH * 0.38, 18);
|
|
7342
|
-
const textX = pad + circleR * 2 + 12;
|
|
7343
|
-
const textW = usableW - circleR * 2 - 16;
|
|
7344
|
-
const shadow = styleShadow(style);
|
|
7345
|
-
const sw = styleStroke(style);
|
|
7346
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7347
|
-
"svg",
|
|
7348
|
-
{
|
|
7349
|
-
className: "w-full h-full pointer-events-none",
|
|
7350
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7351
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7352
|
-
style: { filter: shadow },
|
|
7353
|
-
children: nodes.map((node, i) => {
|
|
7354
|
-
const y = pad + i * (itemH + gap);
|
|
7355
|
-
const cy = y + itemH / 2;
|
|
7356
|
-
const col = colour(i, palette);
|
|
7357
|
-
const fontSize = Math.max(7, Math.min(11, itemH * 0.35));
|
|
7358
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7359
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7360
|
-
"circle",
|
|
7361
|
-
{
|
|
7362
|
-
cx: pad + circleR,
|
|
7363
|
-
cy,
|
|
7364
|
-
r: circleR,
|
|
7365
|
-
fill: col,
|
|
7366
|
-
opacity: nodeOpacity(i, nodes.length, style)
|
|
7367
|
-
}
|
|
7368
|
-
),
|
|
7369
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7370
|
-
"text",
|
|
7371
|
-
{
|
|
7372
|
-
x: pad + circleR,
|
|
7373
|
-
y: cy,
|
|
7374
|
-
textAnchor: "middle",
|
|
7375
|
-
dominantBaseline: "central",
|
|
7376
|
-
fill: "white",
|
|
7377
|
-
fontSize: Math.max(7, circleR * 0.7),
|
|
7378
|
-
fontWeight: "bold",
|
|
7379
|
-
className: "pointer-events-none",
|
|
7380
|
-
children: i + 1
|
|
7381
|
-
}
|
|
7382
|
-
),
|
|
7383
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7384
|
-
"rect",
|
|
7385
|
-
{
|
|
7386
|
-
x: textX,
|
|
7387
|
-
y: y + 2,
|
|
7388
|
-
width: textW,
|
|
7389
|
-
height: itemH - 4,
|
|
7390
|
-
rx: 4,
|
|
7391
|
-
fill: col,
|
|
7392
|
-
opacity: 0.12,
|
|
7393
|
-
stroke: col,
|
|
7394
|
-
strokeWidth: sw > 0 ? sw : 1,
|
|
7395
|
-
strokeOpacity: 0.3
|
|
7396
|
-
}
|
|
7397
|
-
),
|
|
7398
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7399
|
-
"text",
|
|
7400
|
-
{
|
|
7401
|
-
x: textX + 8,
|
|
7402
|
-
y: cy,
|
|
7403
|
-
textAnchor: "start",
|
|
7404
|
-
dominantBaseline: "central",
|
|
7405
|
-
fill: col,
|
|
7406
|
-
fontSize,
|
|
7407
|
-
className: "pointer-events-none",
|
|
7408
|
-
children: truncate(node.text, 40)
|
|
7409
|
-
}
|
|
7410
|
-
)
|
|
7411
|
-
] }, `${element.id}-picacc-${node.id}-${i}`);
|
|
7412
|
-
})
|
|
7413
|
-
}
|
|
7414
|
-
);
|
|
7415
|
-
}
|
|
7416
|
-
function renderVerticalBlockList(element, nodes, palette, style) {
|
|
7417
|
-
const w = element.width;
|
|
7418
|
-
const h = element.height;
|
|
7419
|
-
const pad = 8;
|
|
7420
|
-
const gap = 4;
|
|
7421
|
-
const usableH = h - pad * 2;
|
|
7422
|
-
const usableW = w - pad * 2;
|
|
7423
|
-
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
7424
|
-
const headerW = usableW * 0.22;
|
|
7425
|
-
const bodyW = usableW - headerW - 4;
|
|
7426
|
-
const shadow = styleShadow(style);
|
|
7427
|
-
const sw = styleStroke(style);
|
|
7428
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7429
|
-
"svg",
|
|
7430
|
-
{
|
|
7431
|
-
className: "w-full h-full pointer-events-none",
|
|
7432
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7433
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7434
|
-
style: { filter: shadow },
|
|
7435
|
-
children: nodes.map((node, i) => {
|
|
7436
|
-
const y = pad + i * (itemH + gap);
|
|
7437
|
-
const col = colour(i, palette);
|
|
7438
|
-
const fontSize = Math.max(7, Math.min(11, itemH * 0.35));
|
|
7439
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7440
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7441
|
-
"rect",
|
|
7442
|
-
{
|
|
7443
|
-
x: pad,
|
|
7444
|
-
y,
|
|
7445
|
-
width: headerW,
|
|
7446
|
-
height: itemH,
|
|
7447
|
-
rx: 3,
|
|
7448
|
-
fill: col,
|
|
7449
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7450
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7451
|
-
strokeWidth: sw
|
|
7452
|
-
}
|
|
7453
|
-
),
|
|
7454
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7455
|
-
"text",
|
|
7456
|
-
{
|
|
7457
|
-
x: pad + headerW / 2,
|
|
7458
|
-
y: y + itemH / 2,
|
|
7459
|
-
textAnchor: "middle",
|
|
7460
|
-
dominantBaseline: "central",
|
|
7461
|
-
fill: "white",
|
|
7462
|
-
fontSize: Math.max(8, itemH * 0.4),
|
|
7463
|
-
fontWeight: "bold",
|
|
7464
|
-
className: "pointer-events-none",
|
|
7465
|
-
children: i + 1
|
|
7466
|
-
}
|
|
7467
|
-
),
|
|
7468
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7469
|
-
"rect",
|
|
7470
|
-
{
|
|
7471
|
-
x: pad + headerW + 4,
|
|
7472
|
-
y,
|
|
7473
|
-
width: bodyW,
|
|
7474
|
-
height: itemH,
|
|
7475
|
-
rx: 3,
|
|
7476
|
-
fill: col,
|
|
7477
|
-
opacity: 0.1,
|
|
7478
|
-
stroke: col,
|
|
7479
|
-
strokeWidth: 1,
|
|
7480
|
-
strokeOpacity: 0.3
|
|
7481
|
-
}
|
|
7482
|
-
),
|
|
7483
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7484
|
-
"text",
|
|
7485
|
-
{
|
|
7486
|
-
x: pad + headerW + 12,
|
|
7487
|
-
y: y + itemH / 2,
|
|
7488
|
-
textAnchor: "start",
|
|
7489
|
-
dominantBaseline: "central",
|
|
7490
|
-
fill: col,
|
|
7491
|
-
fontSize,
|
|
7492
|
-
className: "pointer-events-none",
|
|
7493
|
-
children: truncate(node.text, 40)
|
|
7494
|
-
}
|
|
7495
|
-
)
|
|
7496
|
-
] }, `${element.id}-vblk-${node.id}-${i}`);
|
|
7497
|
-
})
|
|
7498
|
-
}
|
|
7499
|
-
);
|
|
7500
|
-
}
|
|
7501
|
-
function renderGroupedList(element, nodes, palette, style) {
|
|
7502
|
-
const w = element.width;
|
|
7503
|
-
const h = element.height;
|
|
7504
|
-
const pad = 8;
|
|
7505
|
-
const gap = 8;
|
|
7506
|
-
const shadow = styleShadow(style);
|
|
7507
|
-
const sw = styleStroke(style);
|
|
7508
|
-
const groupSize = nodes.length <= 4 ? 2 : 3;
|
|
7509
|
-
const groups = [];
|
|
7510
|
-
for (let i = 0; i < nodes.length; i += groupSize) {
|
|
7511
|
-
groups.push(nodes.slice(i, i + groupSize));
|
|
7512
|
-
}
|
|
7513
|
-
const usableW = w - pad * 2;
|
|
7514
|
-
const groupW = (usableW - gap * (groups.length - 1)) / groups.length;
|
|
7515
|
-
const usableH = h - pad * 2;
|
|
7516
|
-
const headerH = usableH * 0.18;
|
|
7517
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7518
|
-
"svg",
|
|
7519
|
-
{
|
|
7520
|
-
className: "w-full h-full pointer-events-none",
|
|
7521
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7522
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7523
|
-
style: { filter: shadow },
|
|
7524
|
-
children: groups.map((group, gi) => {
|
|
7525
|
-
const gx = pad + gi * (groupW + gap);
|
|
7526
|
-
const col = colour(gi, palette);
|
|
7527
|
-
const subItemGap = 3;
|
|
7528
|
-
const subItemH = (usableH - headerH - 4 - subItemGap * (group.length - 1)) / group.length;
|
|
7529
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7530
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7531
|
-
"rect",
|
|
7532
|
-
{
|
|
7533
|
-
x: gx,
|
|
7534
|
-
y: pad,
|
|
7535
|
-
width: groupW,
|
|
7536
|
-
height: headerH,
|
|
7537
|
-
rx: 4,
|
|
7538
|
-
fill: col,
|
|
7539
|
-
opacity: nodeOpacity(gi, groups.length, style),
|
|
7540
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7541
|
-
strokeWidth: sw
|
|
7542
|
-
}
|
|
7543
|
-
),
|
|
7544
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7545
|
-
"text",
|
|
7546
|
-
{
|
|
7547
|
-
x: gx + groupW / 2,
|
|
7548
|
-
y: pad + headerH / 2,
|
|
7549
|
-
textAnchor: "middle",
|
|
7550
|
-
dominantBaseline: "central",
|
|
7551
|
-
fill: "white",
|
|
7552
|
-
fontSize: Math.max(7, Math.min(10, groupW * 0.08)),
|
|
7553
|
-
fontWeight: "bold",
|
|
7554
|
-
className: "pointer-events-none",
|
|
7555
|
-
children: `Group ${gi + 1}`
|
|
7556
|
-
}
|
|
7557
|
-
),
|
|
7558
|
-
group.map((node, si) => {
|
|
7559
|
-
const sy = pad + headerH + 4 + si * (subItemH + subItemGap);
|
|
7560
|
-
const fontSize = Math.max(7, Math.min(10, subItemH * 0.35));
|
|
7561
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7562
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7563
|
-
"rect",
|
|
7564
|
-
{
|
|
7565
|
-
x: gx + 4,
|
|
7566
|
-
y: sy,
|
|
7567
|
-
width: groupW - 8,
|
|
7568
|
-
height: subItemH,
|
|
7569
|
-
rx: 3,
|
|
7570
|
-
fill: col,
|
|
7571
|
-
opacity: 0.15,
|
|
7572
|
-
stroke: col,
|
|
7573
|
-
strokeWidth: 1,
|
|
7574
|
-
strokeOpacity: 0.3
|
|
7575
|
-
}
|
|
7576
|
-
),
|
|
7577
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7578
|
-
SmartArtNodeText,
|
|
7579
|
-
{
|
|
7580
|
-
x: gx + groupW / 2,
|
|
7581
|
-
y: sy + subItemH / 2,
|
|
7582
|
-
text: truncate(node.text, 20),
|
|
7583
|
-
fill: col,
|
|
7584
|
-
fontSize,
|
|
7585
|
-
className: "pointer-events-none"
|
|
7586
|
-
}
|
|
7587
|
-
)
|
|
7588
|
-
] }, `${element.id}-grp-${gi}-item-${node.id}-${si}`);
|
|
7589
|
-
})
|
|
7590
|
-
] }, `${element.id}-grp-${gi}`);
|
|
7591
|
-
})
|
|
7592
|
-
}
|
|
7593
|
-
);
|
|
7594
|
-
}
|
|
7595
|
-
function renderPyramidList(element, nodes, palette, style) {
|
|
7596
|
-
const w = element.width;
|
|
7597
|
-
const h = element.height;
|
|
7598
|
-
const pad = 8;
|
|
7599
|
-
const gap = 4;
|
|
7600
|
-
const usableH = h - pad * 2;
|
|
7601
|
-
const pyramidW = w * 0.35;
|
|
7602
|
-
const labelStartX = pyramidW + pad + 16;
|
|
7603
|
-
const labelW = w - labelStartX - pad;
|
|
7604
|
-
const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
7605
|
-
const shadow = styleShadow(style);
|
|
7606
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7607
|
-
"svg",
|
|
7608
|
-
{
|
|
7609
|
-
className: "w-full h-full pointer-events-none",
|
|
7610
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7611
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7612
|
-
style: { filter: shadow },
|
|
7613
|
-
children: nodes.map((node, i) => {
|
|
7614
|
-
const y = pad + i * (bandH + gap);
|
|
7615
|
-
const col = colour(i, palette);
|
|
7616
|
-
const topFrac = 0.3 + i / Math.max(nodes.length - 1, 1) * 0.7;
|
|
7617
|
-
const segW = pyramidW * topFrac;
|
|
7618
|
-
const segX = pad + (pyramidW - segW) / 2;
|
|
7619
|
-
const fontSize = Math.max(7, Math.min(11, bandH * 0.35));
|
|
7620
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7621
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7622
|
-
"rect",
|
|
7623
|
-
{
|
|
7624
|
-
x: segX,
|
|
7625
|
-
y,
|
|
7626
|
-
width: segW,
|
|
7627
|
-
height: bandH,
|
|
7628
|
-
rx: 2,
|
|
7629
|
-
fill: col,
|
|
7630
|
-
opacity: nodeOpacity(i, nodes.length, style)
|
|
7631
|
-
}
|
|
7632
|
-
),
|
|
7633
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7634
|
-
"line",
|
|
7635
|
-
{
|
|
7636
|
-
x1: segX + segW,
|
|
7637
|
-
y1: y + bandH / 2,
|
|
7638
|
-
x2: labelStartX - 4,
|
|
7639
|
-
y2: y + bandH / 2,
|
|
7640
|
-
stroke: col,
|
|
7641
|
-
strokeWidth: 1,
|
|
7642
|
-
opacity: 0.5,
|
|
7643
|
-
strokeDasharray: "3,2"
|
|
7644
|
-
}
|
|
7645
|
-
),
|
|
7646
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7647
|
-
"rect",
|
|
7648
|
-
{
|
|
7649
|
-
x: labelStartX,
|
|
7650
|
-
y: y + 2,
|
|
7651
|
-
width: labelW,
|
|
7652
|
-
height: bandH - 4,
|
|
7653
|
-
rx: 3,
|
|
7654
|
-
fill: col,
|
|
7655
|
-
opacity: 0.1,
|
|
7656
|
-
stroke: col,
|
|
7657
|
-
strokeWidth: 1,
|
|
7658
|
-
strokeOpacity: 0.25
|
|
7659
|
-
}
|
|
7660
|
-
),
|
|
7661
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7662
|
-
"text",
|
|
7663
|
-
{
|
|
7664
|
-
x: labelStartX + 8,
|
|
7665
|
-
y: y + bandH / 2,
|
|
7666
|
-
textAnchor: "start",
|
|
7667
|
-
dominantBaseline: "central",
|
|
7668
|
-
fill: col,
|
|
7669
|
-
fontSize,
|
|
7670
|
-
className: "pointer-events-none",
|
|
7671
|
-
children: truncate(node.text, 30)
|
|
7672
|
-
}
|
|
7673
|
-
)
|
|
7674
|
-
] }, `${element.id}-pyrlist-${node.id}-${i}`);
|
|
7675
|
-
})
|
|
7676
|
-
}
|
|
7677
|
-
);
|
|
7678
|
-
}
|
|
7679
|
-
function renderHorizontalPictureList(element, nodes, palette, style) {
|
|
7680
|
-
const w = element.width;
|
|
7681
|
-
const h = element.height;
|
|
7682
|
-
const pad = 8;
|
|
7683
|
-
const gap = 8;
|
|
7684
|
-
const usableW = w - pad * 2;
|
|
7685
|
-
const colW = (usableW - gap * (nodes.length - 1)) / nodes.length;
|
|
7686
|
-
const usableH = h - pad * 2;
|
|
7687
|
-
const circleR = Math.min(colW * 0.38, usableH * 0.28);
|
|
7688
|
-
const shadow = styleShadow(style);
|
|
7689
|
-
const sw = styleStroke(style);
|
|
7690
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7691
|
-
"svg",
|
|
7692
|
-
{
|
|
7693
|
-
className: "w-full h-full pointer-events-none",
|
|
7694
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7695
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7696
|
-
style: { filter: shadow },
|
|
7697
|
-
children: nodes.map((node, i) => {
|
|
7698
|
-
const cx = pad + i * (colW + gap) + colW / 2;
|
|
7699
|
-
const cy = pad + circleR + 4;
|
|
7700
|
-
const col = colour(i, palette);
|
|
7701
|
-
const labelY = cy + circleR + 10;
|
|
7702
|
-
const fontSize = Math.max(7, Math.min(10, colW * 0.1));
|
|
7703
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7704
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7705
|
-
"circle",
|
|
7706
|
-
{
|
|
7707
|
-
cx,
|
|
7708
|
-
cy,
|
|
7709
|
-
r: circleR,
|
|
7710
|
-
fill: col,
|
|
7711
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7712
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7713
|
-
strokeWidth: sw
|
|
7714
|
-
}
|
|
7715
|
-
),
|
|
7716
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7717
|
-
"text",
|
|
7718
|
-
{
|
|
7719
|
-
x: cx,
|
|
7720
|
-
y: cy,
|
|
7721
|
-
textAnchor: "middle",
|
|
7722
|
-
dominantBaseline: "central",
|
|
7723
|
-
fill: "white",
|
|
7724
|
-
fontSize: Math.max(8, circleR * 0.5),
|
|
7725
|
-
fontWeight: "bold",
|
|
7726
|
-
className: "pointer-events-none",
|
|
7727
|
-
children: i + 1
|
|
7728
|
-
}
|
|
7729
|
-
),
|
|
7730
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7731
|
-
"text",
|
|
7732
|
-
{
|
|
7733
|
-
x: cx,
|
|
7734
|
-
y: labelY,
|
|
7735
|
-
textAnchor: "middle",
|
|
7736
|
-
dominantBaseline: "hanging",
|
|
7737
|
-
fill: col,
|
|
7738
|
-
fontSize,
|
|
7739
|
-
className: "pointer-events-none",
|
|
7740
|
-
children: truncate(node.text, 15)
|
|
7741
|
-
}
|
|
7742
|
-
)
|
|
7743
|
-
] }, `${element.id}-hpic-${node.id}-${i}`);
|
|
7744
|
-
})
|
|
7745
|
-
}
|
|
7746
|
-
);
|
|
7747
|
-
}
|
|
7748
|
-
function renderAccentProcess(element, nodes, palette, style) {
|
|
7749
|
-
const w = element.width;
|
|
7750
|
-
const h = element.height;
|
|
7751
|
-
const pad = 8;
|
|
7752
|
-
const arrowGap = 16;
|
|
7753
|
-
const usableW = w - pad * 2;
|
|
7754
|
-
const nodeW = (usableW - arrowGap * (nodes.length - 1)) / nodes.length;
|
|
7755
|
-
const nodeH = h * 0.45;
|
|
7756
|
-
const yMid = h / 2;
|
|
7757
|
-
const circleR = Math.min(nodeW, nodeH) * 0.55;
|
|
7758
|
-
const shadow = styleShadow(style);
|
|
7759
|
-
const sw = styleStroke(style);
|
|
7760
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7761
|
-
"svg",
|
|
7762
|
-
{
|
|
7763
|
-
className: "w-full h-full pointer-events-none",
|
|
7764
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7765
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7766
|
-
style: { filter: shadow },
|
|
7767
|
-
children: nodes.map((node, i) => {
|
|
7768
|
-
const x = pad + i * (nodeW + arrowGap);
|
|
7769
|
-
const cx = x + nodeW / 2;
|
|
7770
|
-
const col = colour(i, palette);
|
|
7771
|
-
const fontSize = Math.max(7, Math.min(11, nodeW * 0.1));
|
|
7772
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7773
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx, cy: yMid, r: circleR, fill: col, opacity: 0.15 }),
|
|
7774
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7775
|
-
"rect",
|
|
7776
|
-
{
|
|
7777
|
-
x,
|
|
7778
|
-
y: yMid - nodeH / 2,
|
|
7779
|
-
width: nodeW,
|
|
7780
|
-
height: nodeH,
|
|
7781
|
-
rx: 5,
|
|
7782
|
-
fill: col,
|
|
7783
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7784
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7785
|
-
strokeWidth: sw
|
|
7786
|
-
}
|
|
7787
|
-
),
|
|
7788
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7789
|
-
SmartArtNodeText,
|
|
7790
|
-
{
|
|
7791
|
-
x: cx,
|
|
7792
|
-
y: yMid,
|
|
7793
|
-
text: truncate(node.text, 20),
|
|
7794
|
-
fill: "white",
|
|
7795
|
-
fontSize,
|
|
7796
|
-
className: "pointer-events-none"
|
|
7797
|
-
}
|
|
7798
|
-
),
|
|
7799
|
-
i < nodes.length - 1 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7800
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7801
|
-
"line",
|
|
7802
|
-
{
|
|
7803
|
-
x1: x + nodeW + 2,
|
|
7804
|
-
y1: yMid,
|
|
7805
|
-
x2: x + nodeW + arrowGap - 2,
|
|
7806
|
-
y2: yMid,
|
|
7807
|
-
stroke: "#94a3b8",
|
|
7808
|
-
strokeWidth: 1.5,
|
|
7809
|
-
opacity: 0.5
|
|
7810
|
-
}
|
|
7811
|
-
),
|
|
7812
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7813
|
-
"polygon",
|
|
7814
|
-
{
|
|
7815
|
-
points: `${x + nodeW + arrowGap - 6},${yMid - 3} ${x + nodeW + arrowGap - 2},${yMid} ${x + nodeW + arrowGap - 6},${yMid + 3}`,
|
|
7816
|
-
fill: "#94a3b8",
|
|
7817
|
-
opacity: 0.5
|
|
7818
|
-
}
|
|
7819
|
-
)
|
|
7820
|
-
] })
|
|
7821
|
-
] }, `${element.id}-accproc-${node.id}-${i}`);
|
|
7822
|
-
})
|
|
7823
|
-
}
|
|
7824
|
-
);
|
|
7825
|
-
}
|
|
7826
|
-
function renderVerticalChevronList(element, nodes, palette, style) {
|
|
7827
|
-
const w = element.width;
|
|
7828
|
-
const h = element.height;
|
|
7829
|
-
const pad = 8;
|
|
7830
|
-
const gap = 2;
|
|
7831
|
-
const usableW = w - pad * 2;
|
|
7832
|
-
const usableH = h - pad * 2;
|
|
7833
|
-
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
7834
|
-
const chevDepth = Math.min(12, itemH * 0.3);
|
|
7835
|
-
const shadow = styleShadow(style);
|
|
7836
|
-
const sw = styleStroke(style);
|
|
7837
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7838
|
-
"svg",
|
|
7839
|
-
{
|
|
7840
|
-
className: "w-full h-full pointer-events-none",
|
|
7841
|
-
viewBox: `0 0 ${w} ${h}`,
|
|
7842
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7843
|
-
style: { filter: shadow },
|
|
7844
|
-
children: nodes.map((node, i) => {
|
|
7845
|
-
const x = pad;
|
|
7846
|
-
const y = pad + i * (itemH + gap);
|
|
7847
|
-
const col = colour(i, palette);
|
|
7848
|
-
const fontSize = Math.max(7, Math.min(11, itemH * 0.4));
|
|
7849
|
-
const isFirst = i === 0;
|
|
7850
|
-
const isLast = i === nodes.length - 1;
|
|
7851
|
-
const points = isFirst ? [
|
|
7852
|
-
`${x},${y}`,
|
|
7853
|
-
`${x + usableW},${y}`,
|
|
7854
|
-
`${x + usableW},${y + itemH - chevDepth}`,
|
|
7855
|
-
`${x + usableW / 2},${y + itemH}`,
|
|
7856
|
-
`${x},${y + itemH - chevDepth}`
|
|
7857
|
-
].join(" ") : isLast ? [
|
|
7858
|
-
`${x},${y + chevDepth}`,
|
|
7859
|
-
`${x + usableW / 2},${y}`,
|
|
7860
|
-
`${x + usableW},${y + chevDepth}`,
|
|
7861
|
-
`${x + usableW},${y + itemH}`,
|
|
7862
|
-
`${x},${y + itemH}`
|
|
7863
|
-
].join(" ") : [
|
|
7864
|
-
`${x},${y + chevDepth}`,
|
|
7865
|
-
`${x + usableW / 2},${y}`,
|
|
7866
|
-
`${x + usableW},${y + chevDepth}`,
|
|
7867
|
-
`${x + usableW},${y + itemH - chevDepth}`,
|
|
7868
|
-
`${x + usableW / 2},${y + itemH}`,
|
|
7869
|
-
`${x},${y + itemH - chevDepth}`
|
|
7870
|
-
].join(" ");
|
|
7871
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7872
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7873
|
-
"polygon",
|
|
7874
|
-
{
|
|
7875
|
-
points,
|
|
7876
|
-
fill: col,
|
|
7877
|
-
opacity: nodeOpacity(i, nodes.length, style),
|
|
7878
|
-
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
7879
|
-
strokeWidth: sw
|
|
7880
|
-
}
|
|
7881
|
-
),
|
|
7882
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7883
|
-
SmartArtNodeText,
|
|
7884
|
-
{
|
|
7885
|
-
x: x + usableW / 2,
|
|
7886
|
-
y: y + itemH / 2,
|
|
7887
|
-
text: truncate(node.text, 30),
|
|
7888
|
-
fill: "white",
|
|
7889
|
-
fontSize,
|
|
7890
|
-
className: "pointer-events-none"
|
|
7891
|
-
}
|
|
7892
|
-
)
|
|
7893
|
-
] }, `${element.id}-vchev-${node.id}-${i}`);
|
|
7894
|
-
})
|
|
7895
|
-
}
|
|
7896
|
-
);
|
|
7897
|
-
}
|
|
7898
6503
|
|
|
7899
6504
|
// src/viewer/utils/pdf-builder-notes-builder.ts
|
|
7900
6505
|
function buildNotesPdf(pages) {
|
|
@@ -7912,14 +6517,14 @@ function buildNotesPdf(pages) {
|
|
|
7912
6517
|
notes: page.notes,
|
|
7913
6518
|
slideNumber: page.slideNumber
|
|
7914
6519
|
}));
|
|
7915
|
-
const bytes =
|
|
6520
|
+
const bytes = chunkUSAJMMF2_js.buildNotesPdfBytes(images, meta);
|
|
7916
6521
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7917
6522
|
return URL.createObjectURL(blob);
|
|
7918
6523
|
}
|
|
7919
6524
|
|
|
7920
6525
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
7921
6526
|
function buildPdfFromImageData(images) {
|
|
7922
|
-
const bytes =
|
|
6527
|
+
const bytes = chunkUSAJMMF2_js.buildSlidesPdfBytes(images);
|
|
7923
6528
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7924
6529
|
return URL.createObjectURL(blob);
|
|
7925
6530
|
}
|
|
@@ -7928,7 +6533,7 @@ function buildPdfFromImageData(images) {
|
|
|
7928
6533
|
var activePreview = null;
|
|
7929
6534
|
function startPreviewAnimation(elementId, preset, options) {
|
|
7930
6535
|
stopPreviewAnimation();
|
|
7931
|
-
const descriptor =
|
|
6536
|
+
const descriptor = chunkUSAJMMF2_js.buildPreviewAnimation(preset, options);
|
|
7932
6537
|
if (!descriptor) {
|
|
7933
6538
|
return;
|
|
7934
6539
|
}
|
|
@@ -7941,7 +6546,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
7941
6546
|
return;
|
|
7942
6547
|
}
|
|
7943
6548
|
const stage = domEl.offsetParent;
|
|
7944
|
-
const descriptor =
|
|
6549
|
+
const descriptor = chunkUSAJMMF2_js.buildMotionPathPreview({
|
|
7945
6550
|
path,
|
|
7946
6551
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
7947
6552
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|
|
@@ -8020,7 +6625,6 @@ exports.SHAPE_PRESETS = SHAPE_PRESETS;
|
|
|
8020
6625
|
exports.SHORTCUT_REFERENCE_ITEMS = SHORTCUT_REFERENCE_ITEMS;
|
|
8021
6626
|
exports.SLIDE_NAV_THUMBNAIL_WIDTH = SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
8022
6627
|
exports.STROKE_DASH_OPTIONS = STROKE_DASH_OPTIONS;
|
|
8023
|
-
exports.SmartArtNodeText = SmartArtNodeText;
|
|
8024
6628
|
exports.THEME_COLOR_SWATCHES = THEME_COLOR_SWATCHES;
|
|
8025
6629
|
exports.TOOLBAR_SECTIONS = TOOLBAR_SECTIONS;
|
|
8026
6630
|
exports.UNGROUPED_SECTION_ID = UNGROUPED_SECTION_ID;
|
|
@@ -8031,16 +6635,10 @@ exports.buildLineShadowCss = buildLineShadowCss;
|
|
|
8031
6635
|
exports.buildNotesPdf = buildNotesPdf;
|
|
8032
6636
|
exports.buildPdfFromImageData = buildPdfFromImageData;
|
|
8033
6637
|
exports.buildReactChartViewModel = buildReactChartViewModel;
|
|
8034
|
-
exports.buildSaveSlides = buildSaveSlides;
|
|
8035
6638
|
exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle2;
|
|
8036
|
-
exports.buildTree = buildTree;
|
|
8037
|
-
exports.chevronPoints = chevronPoints;
|
|
8038
6639
|
exports.cloneHistorySnapshot = cloneHistorySnapshot2;
|
|
8039
6640
|
exports.cn = cn;
|
|
8040
|
-
exports.colour = colour;
|
|
8041
6641
|
exports.executeMediaCommand = executeMediaCommand;
|
|
8042
|
-
exports.fitFontSize = fitFontSize;
|
|
8043
|
-
exports.gearPath = gearPath;
|
|
8044
6642
|
exports.getAnimationInitialStyle = getAnimationInitialStyle2;
|
|
8045
6643
|
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
8046
6644
|
exports.getCropShapeClipPath = getCropShapeClipPath;
|
|
@@ -8054,37 +6652,14 @@ exports.getTextWarpStyle = getTextWarpStyle;
|
|
|
8054
6652
|
exports.hasDagDuotoneEffect = hasDagDuotoneEffect;
|
|
8055
6653
|
exports.isConnectorOrLineElement = isConnectorOrLineElement;
|
|
8056
6654
|
exports.isImageTiled = isImageTiled;
|
|
8057
|
-
exports.layoutToCategory = layoutToCategory;
|
|
8058
|
-
exports.nodeOpacity = nodeOpacity;
|
|
8059
|
-
exports.partitionTemplateElements = partitionTemplateElements;
|
|
8060
|
-
exports.renderAccentProcess = renderAccentProcess;
|
|
8061
|
-
exports.renderAlternatingFlow = renderAlternatingFlow;
|
|
8062
6655
|
exports.renderChartElement = renderChartElement;
|
|
8063
6656
|
exports.renderConnectorMarker = renderConnectorMarker;
|
|
8064
6657
|
exports.renderDagDuotoneSvgFilter = renderDagDuotoneSvgFilter;
|
|
8065
|
-
exports.renderDescendingProcess = renderDescendingProcess;
|
|
8066
|
-
exports.renderGroupedList = renderGroupedList;
|
|
8067
|
-
exports.renderHorizontalPictureList = renderHorizontalPictureList;
|
|
8068
6658
|
exports.renderMediaElement = renderMediaElement;
|
|
8069
|
-
exports.renderPictureAccentList = renderPictureAccentList;
|
|
8070
|
-
exports.renderPyramidList = renderPyramidList;
|
|
8071
|
-
exports.renderStepDownProcess = renderStepDownProcess;
|
|
8072
6659
|
exports.renderTableElement = renderTableElement;
|
|
8073
6660
|
exports.renderTextSegments = renderTextSegments;
|
|
8074
6661
|
exports.renderVectorShape = renderVectorShape;
|
|
8075
|
-
exports.renderVerticalBlockList = renderVerticalBlockList;
|
|
8076
|
-
exports.renderVerticalChevronList = renderVerticalChevronList;
|
|
8077
|
-
exports.resolvePalette = resolvePalette;
|
|
8078
|
-
exports.resolveSmartArtDataPalette = resolveSmartArtDataPalette;
|
|
8079
|
-
exports.resolveStyle = resolveStyle;
|
|
8080
6662
|
exports.shouldRenderFallbackLabel = shouldRenderFallbackLabel;
|
|
8081
|
-
exports.smartArtNodeGroupProps = smartArtNodeGroupProps;
|
|
8082
6663
|
exports.startMotionPathPreview = startMotionPathPreview;
|
|
8083
6664
|
exports.startPreviewAnimation = startPreviewAnimation;
|
|
8084
6665
|
exports.stopPreviewAnimation = stopPreviewAnimation;
|
|
8085
|
-
exports.styleShadow = styleShadow;
|
|
8086
|
-
exports.styleStroke = styleStroke;
|
|
8087
|
-
exports.treeDepth = treeDepth;
|
|
8088
|
-
exports.treeWidth = treeWidth;
|
|
8089
|
-
exports.truncate = truncate;
|
|
8090
|
-
exports.wrapChrome = wrapChrome;
|