pptx-react-viewer 1.25.1 → 1.25.3
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 +4 -0
- package/dist/{Model3DScene-AWSM6CYB.js → Model3DScene-F2GUSTZI.js} +3 -3
- package/dist/Model3DScene-F2GUSTZI.js.br +0 -0
- package/dist/Model3DScene-F2GUSTZI.js.gz +0 -0
- package/dist/{Model3DScene-2QZ7CADN.mjs → Model3DScene-IQLE5JLL.mjs} +2 -2
- package/dist/Model3DScene-IQLE5JLL.mjs.br +0 -0
- package/dist/Model3DScene-IQLE5JLL.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-PJ36HRGC.js → SurfaceChart3DScene-4OMD7LWR.js} +3 -3
- package/dist/SurfaceChart3DScene-4OMD7LWR.js.br +0 -0
- package/dist/SurfaceChart3DScene-4OMD7LWR.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-IW4WGZHH.mjs → SurfaceChart3DScene-JG26PJ7O.mjs} +2 -2
- package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.gz +0 -0
- package/dist/{chunk-CYZLRYJV.js → chunk-2V6BD4JQ.js} +130 -39
- package/dist/chunk-2V6BD4JQ.js.br +0 -0
- package/dist/chunk-2V6BD4JQ.js.gz +0 -0
- package/dist/{chunk-ASN2DZSP.js → chunk-5G3SPYQE.js} +812 -810
- package/dist/chunk-5G3SPYQE.js.br +0 -0
- package/dist/chunk-5G3SPYQE.js.gz +0 -0
- package/dist/{chunk-M7JHZV3P.mjs → chunk-DAI4KM5W.mjs} +130 -39
- package/dist/chunk-DAI4KM5W.mjs.br +0 -0
- package/dist/chunk-DAI4KM5W.mjs.gz +0 -0
- package/dist/{chunk-PMGLZ7N4.mjs → chunk-DVM75RMN.mjs} +63 -6
- package/dist/chunk-DVM75RMN.mjs.br +0 -0
- package/dist/chunk-DVM75RMN.mjs.gz +0 -0
- package/dist/{chunk-RVKPHAK5.mjs → chunk-GNXWU7UG.mjs} +10 -8
- package/dist/chunk-GNXWU7UG.mjs.br +0 -0
- package/dist/chunk-GNXWU7UG.mjs.gz +0 -0
- package/dist/{chunk-QTIJWFJX.mjs → chunk-NYBERTS7.mjs} +12 -4
- package/dist/chunk-NYBERTS7.mjs.br +0 -0
- package/dist/chunk-NYBERTS7.mjs.gz +0 -0
- package/dist/{chunk-NIWO2WYI.js → chunk-UXVFNGJH.js} +96 -39
- package/dist/chunk-UXVFNGJH.js.br +0 -0
- package/dist/chunk-UXVFNGJH.js.gz +0 -0
- package/dist/{chunk-NT5FIWWU.js → chunk-ZUJHFLOR.js} +472 -464
- package/dist/chunk-ZUJHFLOR.js.br +0 -0
- package/dist/chunk-ZUJHFLOR.js.gz +0 -0
- package/dist/{dist-RHAXXX2R.mjs → dist-E3IHM3OU.mjs} +1 -1
- package/dist/dist-E3IHM3OU.mjs.br +0 -0
- package/dist/dist-E3IHM3OU.mjs.gz +0 -0
- package/dist/{dist-AFRACFHO.js → dist-ZA77P2O5.js} +562 -562
- package/dist/dist-ZA77P2O5.js.br +0 -0
- package/dist/dist-ZA77P2O5.js.gz +0 -0
- package/dist/hooks-unstable.js +78 -78
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/index.js +33 -33
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-2QZ7CADN.mjs.br +0 -0
- package/dist/Model3DScene-2QZ7CADN.mjs.gz +0 -0
- package/dist/Model3DScene-AWSM6CYB.js.br +0 -0
- package/dist/Model3DScene-AWSM6CYB.js.gz +0 -0
- package/dist/SurfaceChart3DScene-IW4WGZHH.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IW4WGZHH.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-PJ36HRGC.js.br +0 -0
- package/dist/SurfaceChart3DScene-PJ36HRGC.js.gz +0 -0
- package/dist/chunk-ASN2DZSP.js.br +0 -0
- package/dist/chunk-ASN2DZSP.js.gz +0 -0
- package/dist/chunk-CYZLRYJV.js.br +0 -0
- package/dist/chunk-CYZLRYJV.js.gz +0 -0
- package/dist/chunk-M7JHZV3P.mjs.br +0 -0
- package/dist/chunk-M7JHZV3P.mjs.gz +0 -0
- package/dist/chunk-NIWO2WYI.js.br +0 -0
- package/dist/chunk-NIWO2WYI.js.gz +0 -0
- package/dist/chunk-NT5FIWWU.js.br +0 -0
- package/dist/chunk-NT5FIWWU.js.gz +0 -0
- package/dist/chunk-PMGLZ7N4.mjs.br +0 -0
- package/dist/chunk-PMGLZ7N4.mjs.gz +0 -0
- package/dist/chunk-QTIJWFJX.mjs.br +0 -0
- package/dist/chunk-QTIJWFJX.mjs.gz +0 -0
- package/dist/chunk-RVKPHAK5.mjs.br +0 -0
- package/dist/chunk-RVKPHAK5.mjs.gz +0 -0
- package/dist/dist-AFRACFHO.js.br +0 -0
- package/dist/dist-AFRACFHO.js.gz +0 -0
- package/dist/dist-RHAXXX2R.mjs.br +0 -0
- package/dist/dist-RHAXXX2R.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2V6BD4JQ_js = require('./chunk-2V6BD4JQ.js');
|
|
4
4
|
var DOMPurify = require('dompurify');
|
|
5
5
|
|
|
6
6
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -307,7 +307,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
307
307
|
guides.push({
|
|
308
308
|
id: g.id,
|
|
309
309
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
310
|
-
position:
|
|
310
|
+
position: chunk2V6BD4JQ_js.guideEmuToPx(g.positionEmu)
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
}
|
|
@@ -316,7 +316,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
316
316
|
guides.push({
|
|
317
317
|
id: g.id,
|
|
318
318
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
319
|
-
position:
|
|
319
|
+
position: chunk2V6BD4JQ_js.guideEmuToPx(g.positionEmu)
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -329,31 +329,88 @@ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
|
|
|
329
329
|
return void 0;
|
|
330
330
|
}
|
|
331
331
|
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
332
|
-
return
|
|
332
|
+
return chunk2V6BD4JQ_js.getShapeClipPath(shapeType);
|
|
333
333
|
}
|
|
334
334
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
335
|
-
const adjusted =
|
|
335
|
+
const adjusted = chunk2V6BD4JQ_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
|
|
336
336
|
if (adjusted !== void 0) {
|
|
337
337
|
return adjusted;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
const fromPreset =
|
|
340
|
+
const fromPreset = chunk2V6BD4JQ_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
|
|
341
341
|
if (fromPreset !== void 0) {
|
|
342
342
|
return fromPreset;
|
|
343
343
|
}
|
|
344
|
-
const cloud =
|
|
344
|
+
const cloud = chunk2V6BD4JQ_js.getCloudPathForRendering(shapeType, width, height);
|
|
345
345
|
if (cloud !== void 0) {
|
|
346
346
|
return cloud;
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return chunk2V6BD4JQ_js.getShapeClipPath(shapeType);
|
|
349
|
+
}
|
|
350
|
+
function buildCustomGeometryClipPath(pathData, pathWidth, pathHeight, elemWidth, elemHeight) {
|
|
351
|
+
if (!pathData || !Number.isFinite(pathWidth) || !Number.isFinite(pathHeight) || pathWidth <= 0 || pathHeight <= 0 || !Number.isFinite(elemWidth) || !Number.isFinite(elemHeight) || elemWidth <= 0 || elemHeight <= 0) {
|
|
352
|
+
return void 0;
|
|
353
|
+
}
|
|
354
|
+
const sx = elemWidth / pathWidth;
|
|
355
|
+
const sy = elemHeight / pathHeight;
|
|
356
|
+
const round = (n) => {
|
|
357
|
+
const r = Math.round(n * 100) / 100;
|
|
358
|
+
return Object.is(r, -0) ? "0" : String(r);
|
|
359
|
+
};
|
|
360
|
+
const tokens = pathData.match(/[MLCQZAHVmlcqzahv][^MLCQZAHVmlcqzahv]*/g) ?? [];
|
|
361
|
+
const out = [];
|
|
362
|
+
for (const token of tokens) {
|
|
363
|
+
const cmd = token[0];
|
|
364
|
+
const upper = cmd.toUpperCase();
|
|
365
|
+
if (upper === "Z") {
|
|
366
|
+
out.push("Z");
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
const nums = (token.slice(1).match(/-?[\d.]+(?:e-?\d+)?/gi) ?? []).map(Number);
|
|
370
|
+
if (upper === "A") {
|
|
371
|
+
const parts = [];
|
|
372
|
+
for (let i = 0; i + 6 < nums.length; i += 7) {
|
|
373
|
+
parts.push(
|
|
374
|
+
round(nums[i] * sx),
|
|
375
|
+
round(nums[i + 1] * sy),
|
|
376
|
+
String(nums[i + 2]),
|
|
377
|
+
String(nums[i + 3]),
|
|
378
|
+
String(nums[i + 4]),
|
|
379
|
+
round(nums[i + 5] * sx),
|
|
380
|
+
round(nums[i + 6] * sy)
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
out.push(`A ${parts.join(" ")}`);
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
const scaled = nums.map((n, i) => round(n * (i % 2 === 0 ? sx : sy)));
|
|
387
|
+
out.push(`${upper} ${scaled.join(" ")}`);
|
|
388
|
+
}
|
|
389
|
+
if (out.length === 0) {
|
|
390
|
+
return void 0;
|
|
391
|
+
}
|
|
392
|
+
return `path('${out.join(" ")}')`;
|
|
349
393
|
}
|
|
350
394
|
function getResolvedShapeClipPath(element, width, height) {
|
|
395
|
+
const w = typeof width === "number" ? width : element.width;
|
|
396
|
+
const h = typeof height === "number" ? height : element.height;
|
|
397
|
+
const custom = element;
|
|
398
|
+
if (custom.pathData && custom.pathWidth && custom.pathHeight) {
|
|
399
|
+
const customClip = buildCustomGeometryClipPath(
|
|
400
|
+
custom.pathData,
|
|
401
|
+
custom.pathWidth,
|
|
402
|
+
custom.pathHeight,
|
|
403
|
+
w,
|
|
404
|
+
h
|
|
405
|
+
);
|
|
406
|
+
if (customClip) {
|
|
407
|
+
return customClip;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
351
410
|
const shapeType = element.shapeType;
|
|
352
411
|
if (!shapeType) {
|
|
353
412
|
return void 0;
|
|
354
413
|
}
|
|
355
|
-
const w = typeof width === "number" ? width : element.width;
|
|
356
|
-
const h = typeof height === "number" ? height : element.height;
|
|
357
414
|
const adjustments = element.shapeAdjustments;
|
|
358
415
|
return getResolvedShapeClipPathFor(shapeType, w, h, adjustments);
|
|
359
416
|
}
|
|
@@ -990,15 +1047,15 @@ function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments) {
|
|
|
990
1047
|
}
|
|
991
1048
|
function getElementTransform(element) {
|
|
992
1049
|
const transforms = [];
|
|
1050
|
+
if (element.rotation) {
|
|
1051
|
+
transforms.push(`rotate(${element.rotation}deg)`);
|
|
1052
|
+
}
|
|
993
1053
|
if (element.flipHorizontal) {
|
|
994
1054
|
transforms.push("scaleX(-1)");
|
|
995
1055
|
}
|
|
996
1056
|
if (element.flipVertical) {
|
|
997
1057
|
transforms.push("scaleY(-1)");
|
|
998
1058
|
}
|
|
999
|
-
if (element.rotation) {
|
|
1000
|
-
transforms.push(`rotate(${element.rotation}deg)`);
|
|
1001
|
-
}
|
|
1002
1059
|
if (element.skewX) {
|
|
1003
1060
|
transforms.push(`skewX(${element.skewX}deg)`);
|
|
1004
1061
|
}
|
|
@@ -1060,7 +1117,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
1060
1117
|
phclr: "#4472C4"
|
|
1061
1118
|
};
|
|
1062
1119
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
1063
|
-
return
|
|
1120
|
+
return chunk2V6BD4JQ_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
1064
1121
|
}
|
|
1065
1122
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
1066
1123
|
if (!colorNode) {
|
|
@@ -1112,7 +1169,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1112
1169
|
const h = hueRaw / 6e4;
|
|
1113
1170
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1114
1171
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1115
|
-
const rgb =
|
|
1172
|
+
const rgb = chunk2V6BD4JQ_js.hslToRgb(h, s, l);
|
|
1116
1173
|
const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1117
1174
|
const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
|
|
1118
1175
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1122,7 +1179,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1122
1179
|
const preset = String(
|
|
1123
1180
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1124
1181
|
).toLowerCase();
|
|
1125
|
-
const mapped =
|
|
1182
|
+
const mapped = chunk2V6BD4JQ_js.PRESET_COLOR_MAP[preset];
|
|
1126
1183
|
if (!mapped) {
|
|
1127
1184
|
return void 0;
|
|
1128
1185
|
}
|
|
@@ -1477,7 +1534,7 @@ function hexToRgbUnit2(hex) {
|
|
|
1477
1534
|
};
|
|
1478
1535
|
}
|
|
1479
1536
|
function getEffects(element) {
|
|
1480
|
-
if (!
|
|
1537
|
+
if (!chunk2V6BD4JQ_js.isImageLikeElement(element)) {
|
|
1481
1538
|
return void 0;
|
|
1482
1539
|
}
|
|
1483
1540
|
return element.imageEffects;
|
|
@@ -1666,7 +1723,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
|
|
|
1666
1723
|
const c2 = hexToRgbUnit2(color2);
|
|
1667
1724
|
return `<feColorMatrix type="matrix" values="${GRAYSCALE_LUMINANCE_MATRIX}"/><feComponentTransfer><feFuncR type="linear" slope="${c2.r - c1.r}" intercept="${c1.r}"/><feFuncG type="linear" slope="${c2.g - c1.g}" intercept="${c1.g}"/><feFuncB type="linear" slope="${c2.b - c1.b}" intercept="${c1.b}"/></feComponentTransfer>`;
|
|
1668
1725
|
}
|
|
1669
|
-
function getDuotoneImageFilter(element, elementId =
|
|
1726
|
+
function getDuotoneImageFilter(element, elementId = chunk2V6BD4JQ_js.isImageLikeElement(element) ? element.id : "") {
|
|
1670
1727
|
const effects = getEffects(element);
|
|
1671
1728
|
if (!effects?.duotone) {
|
|
1672
1729
|
return void 0;
|
|
@@ -1768,7 +1825,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
1768
1825
|
}
|
|
1769
1826
|
return parts.length > 0 ? parts.join("") : void 0;
|
|
1770
1827
|
}
|
|
1771
|
-
function getImageAlphaFilter(element, elementId =
|
|
1828
|
+
function getImageAlphaFilter(element, elementId = chunk2V6BD4JQ_js.isImageLikeElement(element) ? element.id : "") {
|
|
1772
1829
|
const effects = getEffects(element);
|
|
1773
1830
|
if (!effects || !hasAdvancedImageAlphaEffects(element)) {
|
|
1774
1831
|
return void 0;
|
|
@@ -1858,7 +1915,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
|
|
|
1858
1915
|
return void 0;
|
|
1859
1916
|
}
|
|
1860
1917
|
}
|
|
1861
|
-
function getArtisticImageFilter(element, elementId =
|
|
1918
|
+
function getArtisticImageFilter(element, elementId = chunk2V6BD4JQ_js.isImageLikeElement(element) ? element.id : "") {
|
|
1862
1919
|
const effects = getEffects(element);
|
|
1863
1920
|
if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
1864
1921
|
return void 0;
|
|
@@ -2817,7 +2874,7 @@ function convertChildren(node) {
|
|
|
2817
2874
|
if (key.startsWith("@_")) {
|
|
2818
2875
|
continue;
|
|
2819
2876
|
}
|
|
2820
|
-
const tag =
|
|
2877
|
+
const tag = chunk2V6BD4JQ_js.stripXmlOrderSuffix(key);
|
|
2821
2878
|
if (tag === "m:oMathPara") {
|
|
2822
2879
|
continue;
|
|
2823
2880
|
}
|
|
@@ -2889,7 +2946,7 @@ function findOmathRoots(node) {
|
|
|
2889
2946
|
}
|
|
2890
2947
|
}
|
|
2891
2948
|
const contentTags = /* @__PURE__ */ new Set(["m:r", "m:f", "m:rad", "m:sSup", "m:sSub", "m:box"]);
|
|
2892
|
-
if (Object.keys(node).some((key) => contentTags.has(
|
|
2949
|
+
if (Object.keys(node).some((key) => contentTags.has(chunk2V6BD4JQ_js.stripXmlOrderSuffix(key)))) {
|
|
2893
2950
|
return [node];
|
|
2894
2951
|
}
|
|
2895
2952
|
return [];
|
|
@@ -3099,7 +3156,7 @@ function mergeSiblings(nodes) {
|
|
|
3099
3156
|
}
|
|
3100
3157
|
const ordered = {};
|
|
3101
3158
|
for (const [position, [key, value]] of entries.entries()) {
|
|
3102
|
-
ordered[(counts.get(key) ?? 0) > 1 ?
|
|
3159
|
+
ordered[(counts.get(key) ?? 0) > 1 ? chunk2V6BD4JQ_js.orderedXmlKey(key, position) : key] = value;
|
|
3103
3160
|
}
|
|
3104
3161
|
return ordered;
|
|
3105
3162
|
}
|
|
@@ -3503,7 +3560,7 @@ function ommlChildrenToLatex(node) {
|
|
|
3503
3560
|
if (key.startsWith("@_")) {
|
|
3504
3561
|
continue;
|
|
3505
3562
|
}
|
|
3506
|
-
const tag =
|
|
3563
|
+
const tag = chunk2V6BD4JQ_js.stripXmlOrderSuffix(key);
|
|
3507
3564
|
const items = ensureArr(node[key]);
|
|
3508
3565
|
for (const item of items) {
|
|
3509
3566
|
const result = ommlElementToLatex(tag, item);
|
|
@@ -12112,7 +12169,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
12112
12169
|
}
|
|
12113
12170
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
12114
12171
|
const scale = zoom || 1;
|
|
12115
|
-
const minSize = opts.minSize ??
|
|
12172
|
+
const minSize = opts.minSize ?? chunk2V6BD4JQ_js.MIN_ELEMENT_SIZE;
|
|
12116
12173
|
const rotation = rotationOf(box);
|
|
12117
12174
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
12118
12175
|
const dx = local.x;
|
|
@@ -12139,7 +12196,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
12139
12196
|
}
|
|
12140
12197
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
12141
12198
|
}
|
|
12142
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
12199
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunk2V6BD4JQ_js.MIN_ELEMENT_SIZE) {
|
|
12143
12200
|
if (handle === null || gridSpacingPx <= 0) {
|
|
12144
12201
|
return box;
|
|
12145
12202
|
}
|
|
@@ -12169,7 +12226,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkCYZLRYJV_js.MI
|
|
|
12169
12226
|
}
|
|
12170
12227
|
return { x, y, width, height };
|
|
12171
12228
|
}
|
|
12172
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
12229
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunk2V6BD4JQ_js.MIN_ELEMENT_SIZE) {
|
|
12173
12230
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
12174
12231
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
12175
12232
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -13724,7 +13781,7 @@ var THEME_COLOR_LABELS = {
|
|
|
13724
13781
|
};
|
|
13725
13782
|
function buildThemeColorGrid(colorScheme) {
|
|
13726
13783
|
return THEME_COLOR_TINT_ROWS.map(
|
|
13727
|
-
(row) =>
|
|
13784
|
+
(row) => chunk2V6BD4JQ_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
13728
13785
|
hex: row.transform(colorScheme[key]),
|
|
13729
13786
|
schemeKey: key,
|
|
13730
13787
|
rowLabel: row.label,
|
|
@@ -14200,7 +14257,7 @@ function svgLineCap(lineCap) {
|
|
|
14200
14257
|
}
|
|
14201
14258
|
function copyFormatFromElement(element) {
|
|
14202
14259
|
const result = {};
|
|
14203
|
-
if (
|
|
14260
|
+
if (chunk2V6BD4JQ_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
14204
14261
|
const s = element.shapeStyle;
|
|
14205
14262
|
result.shapeStyle = {
|
|
14206
14263
|
fillColor: s.fillColor,
|
|
@@ -14229,7 +14286,7 @@ function copyFormatFromElement(element) {
|
|
|
14229
14286
|
softEdgeRadius: s.softEdgeRadius
|
|
14230
14287
|
};
|
|
14231
14288
|
}
|
|
14232
|
-
if (
|
|
14289
|
+
if (chunk2V6BD4JQ_js.hasTextProperties(element) && element.textStyle) {
|
|
14233
14290
|
const t = element.textStyle;
|
|
14234
14291
|
result.textStyle = {
|
|
14235
14292
|
fontFamily: t.fontFamily,
|
|
@@ -14260,7 +14317,7 @@ function definedEntries(obj) {
|
|
|
14260
14317
|
}
|
|
14261
14318
|
function applyFormatToElement(element, format) {
|
|
14262
14319
|
let updated = { ...element };
|
|
14263
|
-
if (format.shapeStyle &&
|
|
14320
|
+
if (format.shapeStyle && chunk2V6BD4JQ_js.hasShapeProperties(updated)) {
|
|
14264
14321
|
updated = {
|
|
14265
14322
|
...updated,
|
|
14266
14323
|
shapeStyle: {
|
|
@@ -14269,7 +14326,7 @@ function applyFormatToElement(element, format) {
|
|
|
14269
14326
|
}
|
|
14270
14327
|
};
|
|
14271
14328
|
}
|
|
14272
|
-
if (format.textStyle &&
|
|
14329
|
+
if (format.textStyle && chunk2V6BD4JQ_js.hasTextProperties(updated)) {
|
|
14273
14330
|
updated = {
|
|
14274
14331
|
...updated,
|
|
14275
14332
|
textStyle: {
|
|
@@ -14284,7 +14341,7 @@ function hasCopyableFormat(element) {
|
|
|
14284
14341
|
if (!element) {
|
|
14285
14342
|
return false;
|
|
14286
14343
|
}
|
|
14287
|
-
return
|
|
14344
|
+
return chunk2V6BD4JQ_js.hasShapeProperties(element) || chunk2V6BD4JQ_js.hasTextProperties(element);
|
|
14288
14345
|
}
|
|
14289
14346
|
function copySegmentMetadata(from, to) {
|
|
14290
14347
|
if (from.equationXml !== void 0) {
|
|
@@ -14421,7 +14478,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
14421
14478
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
14422
14479
|
}
|
|
14423
14480
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
14424
|
-
if (!
|
|
14481
|
+
if (!chunk2V6BD4JQ_js.hasShapeProperties(element)) {
|
|
14425
14482
|
return null;
|
|
14426
14483
|
}
|
|
14427
14484
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -15413,7 +15470,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
|
|
|
15413
15470
|
var POSITION_THRESHOLD = 2;
|
|
15414
15471
|
var SIZE_THRESHOLD = 2;
|
|
15415
15472
|
function getElementText(element) {
|
|
15416
|
-
if (!
|
|
15473
|
+
if (!chunk2V6BD4JQ_js.hasTextProperties(element)) {
|
|
15417
15474
|
return "";
|
|
15418
15475
|
}
|
|
15419
15476
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -18987,7 +19044,7 @@ function getAriaRole(element) {
|
|
|
18987
19044
|
case "model3d":
|
|
18988
19045
|
return "img";
|
|
18989
19046
|
case "shape": {
|
|
18990
|
-
if (
|
|
19047
|
+
if (chunk2V6BD4JQ_js.hasTextProperties(element) && element.text) {
|
|
18991
19048
|
return "group";
|
|
18992
19049
|
}
|
|
18993
19050
|
return "img";
|
|
@@ -19000,7 +19057,7 @@ function getAriaLabel(element) {
|
|
|
19000
19057
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
19001
19058
|
return element.altText.trim();
|
|
19002
19059
|
}
|
|
19003
|
-
if (
|
|
19060
|
+
if (chunk2V6BD4JQ_js.hasTextProperties(element) && element.text) {
|
|
19004
19061
|
const text = element.text.trim();
|
|
19005
19062
|
if (text) {
|
|
19006
19063
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -19407,7 +19464,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
19407
19464
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
19408
19465
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
19409
19466
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
19410
|
-
return
|
|
19467
|
+
return chunk2V6BD4JQ_js.createChartElement(
|
|
19411
19468
|
chartType,
|
|
19412
19469
|
{
|
|
19413
19470
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -20427,7 +20484,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
|
|
|
20427
20484
|
};
|
|
20428
20485
|
}
|
|
20429
20486
|
function collectFontsFromElement(element, fonts) {
|
|
20430
|
-
if (
|
|
20487
|
+
if (chunk2V6BD4JQ_js.hasTextProperties(element)) {
|
|
20431
20488
|
if (element.textStyle?.fontFamily) {
|
|
20432
20489
|
fonts.add(element.textStyle.fontFamily);
|
|
20433
20490
|
}
|
|
Binary file
|
|
Binary file
|