pptx-react-viewer 1.23.0 → 1.24.1
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 +12 -0
- package/README.md +73 -21
- package/dist/{Model3DScene-4XNBDASE.mjs → Model3DScene-E7YIHJ2R.mjs} +2 -2
- package/dist/Model3DScene-E7YIHJ2R.mjs.br +0 -0
- package/dist/Model3DScene-E7YIHJ2R.mjs.gz +0 -0
- package/dist/{Model3DScene-AQS7KDM4.js → Model3DScene-RYR4SSOM.js} +3 -3
- package/dist/Model3DScene-RYR4SSOM.js.br +0 -0
- package/dist/Model3DScene-RYR4SSOM.js.gz +0 -0
- package/dist/{PowerPointViewer-DFTatVS4.d.ts → PowerPointViewer-CnADroqZ.d.ts} +2 -2
- package/dist/{PowerPointViewer-DFTatVS4.d.ts.map → PowerPointViewer-CnADroqZ.d.ts.map} +1 -1
- package/dist/{SurfaceChart3DScene-HA2SD6BY.js → SurfaceChart3DScene-PBSZVNAM.js} +3 -3
- package/dist/SurfaceChart3DScene-PBSZVNAM.js.br +0 -0
- package/dist/SurfaceChart3DScene-PBSZVNAM.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-K7ZDXDBL.mjs → SurfaceChart3DScene-ZM3J67VQ.mjs} +2 -2
- package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.gz +0 -0
- package/dist/{types-Da1M5VBY.d.ts → animation-timeline-CEJJLFqK.d.ts} +3 -3
- package/dist/animation-timeline-CEJJLFqK.d.ts.map +1 -0
- package/dist/{chunk-2DXNTVFV.js → chunk-275WERXZ.js} +71 -72
- package/dist/chunk-275WERXZ.js.br +0 -0
- package/dist/chunk-275WERXZ.js.gz +0 -0
- package/dist/{chunk-H5RREYCO.js → chunk-DPTDFK2L.js} +1306 -460
- package/dist/chunk-DPTDFK2L.js.br +0 -0
- package/dist/chunk-DPTDFK2L.js.gz +0 -0
- package/dist/{chunk-MS6S6YYR.js → chunk-KV3EOLP3.js} +50785 -50553
- package/dist/chunk-KV3EOLP3.js.br +0 -0
- package/dist/chunk-KV3EOLP3.js.gz +0 -0
- package/dist/{chunk-LS2AIX2H.js → chunk-KVTSERRP.js} +26715 -26748
- package/dist/chunk-KVTSERRP.js.br +0 -0
- package/dist/chunk-KVTSERRP.js.gz +0 -0
- package/dist/{chunk-AFWMAFWR.mjs → chunk-LDZQNYWL.mjs} +50784 -50554
- package/dist/chunk-LDZQNYWL.mjs.br +0 -0
- package/dist/chunk-LDZQNYWL.mjs.gz +0 -0
- package/dist/{chunk-I42XL2WU.mjs → chunk-MEVZNYJK.mjs} +42 -43
- package/dist/chunk-MEVZNYJK.mjs.br +0 -0
- package/dist/chunk-MEVZNYJK.mjs.gz +0 -0
- package/dist/{chunk-LFEVG3ED.mjs → chunk-UCFXE6YS.mjs} +855 -11
- package/dist/chunk-UCFXE6YS.mjs.br +0 -0
- package/dist/chunk-UCFXE6YS.mjs.gz +0 -0
- package/dist/{chunk-36NC56XG.mjs → chunk-UDM2SYE3.mjs} +26107 -26142
- package/dist/chunk-UDM2SYE3.mjs.br +0 -0
- package/dist/chunk-UDM2SYE3.mjs.gz +0 -0
- package/dist/{dist-5KQQ6GP2.mjs → dist-A3OATMOE.mjs} +1 -1
- package/dist/dist-A3OATMOE.mjs.br +0 -0
- package/dist/dist-A3OATMOE.mjs.gz +0 -0
- package/dist/{dist-CVSSAFDL.js → dist-XF3QJAEF.js} +568 -560
- package/dist/dist-XF3QJAEF.js.br +0 -0
- package/dist/dist-XF3QJAEF.js.gz +0 -0
- package/dist/hooks-unstable.d.ts +431 -39
- package/dist/hooks-unstable.d.ts.map +1 -1
- package/dist/hooks-unstable.js +80 -76
- 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-COgh2UTL.d.ts → index-waNAYwmr.d.ts} +12 -4
- package/dist/{index-COgh2UTL.d.ts.map → index-waNAYwmr.d.ts.map} +1 -1
- package/dist/index.d.ts +865 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -30
- 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/useViewerBuildingBlocks-ll3_ncCH.d.ts +378 -0
- package/dist/useViewerBuildingBlocks-ll3_ncCH.d.ts.map +1 -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-4XNBDASE.mjs.br +0 -0
- package/dist/Model3DScene-4XNBDASE.mjs.gz +0 -0
- package/dist/Model3DScene-AQS7KDM4.js.br +0 -0
- package/dist/Model3DScene-AQS7KDM4.js.gz +0 -0
- package/dist/SurfaceChart3DScene-HA2SD6BY.js.br +0 -0
- package/dist/SurfaceChart3DScene-HA2SD6BY.js.gz +0 -0
- package/dist/SurfaceChart3DScene-K7ZDXDBL.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-K7ZDXDBL.mjs.gz +0 -0
- package/dist/chunk-2DXNTVFV.js.br +0 -0
- package/dist/chunk-2DXNTVFV.js.gz +0 -0
- package/dist/chunk-36NC56XG.mjs.br +0 -0
- package/dist/chunk-36NC56XG.mjs.gz +0 -0
- package/dist/chunk-AFWMAFWR.mjs.br +0 -0
- package/dist/chunk-AFWMAFWR.mjs.gz +0 -0
- package/dist/chunk-H5RREYCO.js.br +0 -0
- package/dist/chunk-H5RREYCO.js.gz +0 -0
- package/dist/chunk-I42XL2WU.mjs.br +0 -0
- package/dist/chunk-I42XL2WU.mjs.gz +0 -0
- package/dist/chunk-LFEVG3ED.mjs.br +0 -0
- package/dist/chunk-LFEVG3ED.mjs.gz +0 -0
- package/dist/chunk-LS2AIX2H.js.br +0 -0
- package/dist/chunk-LS2AIX2H.js.gz +0 -0
- package/dist/chunk-MS6S6YYR.js.br +0 -0
- package/dist/chunk-MS6S6YYR.js.gz +0 -0
- package/dist/dist-5KQQ6GP2.mjs.br +0 -0
- package/dist/dist-5KQQ6GP2.mjs.gz +0 -0
- package/dist/dist-CVSSAFDL.js.br +0 -0
- package/dist/dist-CVSSAFDL.js.gz +0 -0
- package/dist/types-Da1M5VBY.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKV3EOLP3_js = require('./chunk-KV3EOLP3.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: chunkKV3EOLP3_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: chunkKV3EOLP3_js.guideEmuToPx(g.positionEmu)
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -329,23 +329,23 @@ 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 chunkKV3EOLP3_js.getShapeClipPath(shapeType);
|
|
333
333
|
}
|
|
334
334
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
335
|
-
const adjusted =
|
|
335
|
+
const adjusted = chunkKV3EOLP3_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 = chunkKV3EOLP3_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
|
|
341
341
|
if (fromPreset !== void 0) {
|
|
342
342
|
return fromPreset;
|
|
343
343
|
}
|
|
344
|
-
const cloud =
|
|
344
|
+
const cloud = chunkKV3EOLP3_js.getCloudPathForRendering(shapeType, width, height);
|
|
345
345
|
if (cloud !== void 0) {
|
|
346
346
|
return cloud;
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return chunkKV3EOLP3_js.getShapeClipPath(shapeType);
|
|
349
349
|
}
|
|
350
350
|
function getResolvedShapeClipPath(element, width, height) {
|
|
351
351
|
const shapeType = element.shapeType;
|
|
@@ -1060,7 +1060,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
1060
1060
|
phclr: "#4472C4"
|
|
1061
1061
|
};
|
|
1062
1062
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
1063
|
-
return
|
|
1063
|
+
return chunkKV3EOLP3_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
1064
1064
|
}
|
|
1065
1065
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
1066
1066
|
if (!colorNode) {
|
|
@@ -1112,7 +1112,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1112
1112
|
const h = hueRaw / 6e4;
|
|
1113
1113
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1114
1114
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1115
|
-
const rgb =
|
|
1115
|
+
const rgb = chunkKV3EOLP3_js.hslToRgb(h, s, l);
|
|
1116
1116
|
const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1117
1117
|
const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
|
|
1118
1118
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1122,7 +1122,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1122
1122
|
const preset = String(
|
|
1123
1123
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1124
1124
|
).toLowerCase();
|
|
1125
|
-
const mapped =
|
|
1125
|
+
const mapped = chunkKV3EOLP3_js.PRESET_COLOR_MAP[preset];
|
|
1126
1126
|
if (!mapped) {
|
|
1127
1127
|
return void 0;
|
|
1128
1128
|
}
|
|
@@ -1477,7 +1477,7 @@ function hexToRgbUnit2(hex) {
|
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
1479
|
function getEffects(element) {
|
|
1480
|
-
if (!
|
|
1480
|
+
if (!chunkKV3EOLP3_js.isImageLikeElement(element)) {
|
|
1481
1481
|
return void 0;
|
|
1482
1482
|
}
|
|
1483
1483
|
return element.imageEffects;
|
|
@@ -1666,7 +1666,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
|
|
|
1666
1666
|
const c2 = hexToRgbUnit2(color2);
|
|
1667
1667
|
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
1668
|
}
|
|
1669
|
-
function getDuotoneImageFilter(element, elementId =
|
|
1669
|
+
function getDuotoneImageFilter(element, elementId = chunkKV3EOLP3_js.isImageLikeElement(element) ? element.id : "") {
|
|
1670
1670
|
const effects = getEffects(element);
|
|
1671
1671
|
if (!effects?.duotone) {
|
|
1672
1672
|
return void 0;
|
|
@@ -1768,7 +1768,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
return parts.length > 0 ? parts.join("") : void 0;
|
|
1770
1770
|
}
|
|
1771
|
-
function getImageAlphaFilter(element, elementId =
|
|
1771
|
+
function getImageAlphaFilter(element, elementId = chunkKV3EOLP3_js.isImageLikeElement(element) ? element.id : "") {
|
|
1772
1772
|
const effects = getEffects(element);
|
|
1773
1773
|
if (!effects || !hasAdvancedImageAlphaEffects(element)) {
|
|
1774
1774
|
return void 0;
|
|
@@ -1858,7 +1858,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
|
|
|
1858
1858
|
return void 0;
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
-
function getArtisticImageFilter(element, elementId =
|
|
1861
|
+
function getArtisticImageFilter(element, elementId = chunkKV3EOLP3_js.isImageLikeElement(element) ? element.id : "") {
|
|
1862
1862
|
const effects = getEffects(element);
|
|
1863
1863
|
if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
1864
1864
|
return void 0;
|
|
@@ -2817,12 +2817,13 @@ function convertChildren(node) {
|
|
|
2817
2817
|
if (key.startsWith("@_")) {
|
|
2818
2818
|
continue;
|
|
2819
2819
|
}
|
|
2820
|
-
|
|
2820
|
+
const tag = chunkKV3EOLP3_js.stripXmlOrderSuffix(key);
|
|
2821
|
+
if (tag === "m:oMathPara") {
|
|
2821
2822
|
continue;
|
|
2822
2823
|
}
|
|
2823
2824
|
const items = ensureArray(node[key]);
|
|
2824
2825
|
for (const item of items) {
|
|
2825
|
-
const result = convertElement(
|
|
2826
|
+
const result = convertElement(tag, item);
|
|
2826
2827
|
if (result) {
|
|
2827
2828
|
parts.push(result);
|
|
2828
2829
|
}
|
|
@@ -2887,7 +2888,8 @@ function findOmathRoots(node) {
|
|
|
2887
2888
|
return ensureArray(paraNode["m:oMath"]);
|
|
2888
2889
|
}
|
|
2889
2890
|
}
|
|
2890
|
-
|
|
2891
|
+
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(chunkKV3EOLP3_js.stripXmlOrderSuffix(key)))) {
|
|
2891
2893
|
return [node];
|
|
2892
2894
|
}
|
|
2893
2895
|
return [];
|
|
@@ -3069,43 +3071,49 @@ function tokenize(latex) {
|
|
|
3069
3071
|
}
|
|
3070
3072
|
return tokens;
|
|
3071
3073
|
}
|
|
3072
|
-
function
|
|
3074
|
+
function isGroupedByTag(tags) {
|
|
3073
3075
|
const seen = /* @__PURE__ */ new Set();
|
|
3074
3076
|
let previous = "";
|
|
3075
|
-
for (const
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
continue;
|
|
3079
|
-
}
|
|
3080
|
-
if (key !== previous && seen.has(key)) {
|
|
3081
|
-
return false;
|
|
3082
|
-
}
|
|
3083
|
-
seen.add(key);
|
|
3084
|
-
previous = key;
|
|
3077
|
+
for (const tag of tags) {
|
|
3078
|
+
if (tag !== previous && seen.has(tag)) {
|
|
3079
|
+
return false;
|
|
3085
3080
|
}
|
|
3081
|
+
seen.add(tag);
|
|
3082
|
+
previous = tag;
|
|
3086
3083
|
}
|
|
3087
3084
|
return true;
|
|
3088
3085
|
}
|
|
3089
3086
|
function mergeSiblings(nodes) {
|
|
3090
|
-
|
|
3091
|
-
return { "m:box": nodes.map((node) => ({ "m:e": node })) };
|
|
3092
|
-
}
|
|
3093
|
-
const result = {};
|
|
3087
|
+
const entries = [];
|
|
3094
3088
|
for (const node of nodes) {
|
|
3095
3089
|
for (const key of Object.keys(node)) {
|
|
3096
|
-
if (node[key]
|
|
3097
|
-
|
|
3090
|
+
if (node[key] !== void 0) {
|
|
3091
|
+
entries.push([key, node[key]]);
|
|
3098
3092
|
}
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
if (!isGroupedByTag(entries.map(([key]) => key))) {
|
|
3096
|
+
const counts = /* @__PURE__ */ new Map();
|
|
3097
|
+
for (const [key] of entries) {
|
|
3098
|
+
counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
3099
|
+
}
|
|
3100
|
+
const ordered = {};
|
|
3101
|
+
for (const [position, [key, value]] of entries.entries()) {
|
|
3102
|
+
ordered[(counts.get(key) ?? 0) > 1 ? chunkKV3EOLP3_js.orderedXmlKey(key, position) : key] = value;
|
|
3103
|
+
}
|
|
3104
|
+
return ordered;
|
|
3105
|
+
}
|
|
3106
|
+
const result = {};
|
|
3107
|
+
for (const [key, value] of entries) {
|
|
3108
|
+
if (result[key]) {
|
|
3109
|
+
const existing = result[key];
|
|
3110
|
+
if (Array.isArray(existing)) {
|
|
3111
|
+
existing.push(value);
|
|
3106
3112
|
} else {
|
|
3107
|
-
result[key] =
|
|
3113
|
+
result[key] = [existing, value];
|
|
3108
3114
|
}
|
|
3115
|
+
} else {
|
|
3116
|
+
result[key] = value;
|
|
3109
3117
|
}
|
|
3110
3118
|
}
|
|
3111
3119
|
return result;
|
|
@@ -3282,18 +3290,7 @@ var LatexParser = class {
|
|
|
3282
3290
|
}
|
|
3283
3291
|
wrapE(nodes) {
|
|
3284
3292
|
if (nodes.length === 1) {
|
|
3285
|
-
return
|
|
3286
|
-
"m:r": nodes[0]["m:r"],
|
|
3287
|
-
"m:f": nodes[0]["m:f"],
|
|
3288
|
-
"m:rad": nodes[0]["m:rad"],
|
|
3289
|
-
"m:sSup": nodes[0]["m:sSup"],
|
|
3290
|
-
"m:sSub": nodes[0]["m:sSub"],
|
|
3291
|
-
"m:sSubSup": nodes[0]["m:sSubSup"],
|
|
3292
|
-
"m:nary": nodes[0]["m:nary"],
|
|
3293
|
-
"m:d": nodes[0]["m:d"],
|
|
3294
|
-
"m:func": nodes[0]["m:func"],
|
|
3295
|
-
"m:box": nodes[0]["m:box"]
|
|
3296
|
-
};
|
|
3293
|
+
return nodes[0];
|
|
3297
3294
|
}
|
|
3298
3295
|
return mergeSiblings(nodes);
|
|
3299
3296
|
}
|
|
@@ -3506,9 +3503,10 @@ function ommlChildrenToLatex(node) {
|
|
|
3506
3503
|
if (key.startsWith("@_")) {
|
|
3507
3504
|
continue;
|
|
3508
3505
|
}
|
|
3506
|
+
const tag = chunkKV3EOLP3_js.stripXmlOrderSuffix(key);
|
|
3509
3507
|
const items = ensureArr(node[key]);
|
|
3510
3508
|
for (const item of items) {
|
|
3511
|
-
const result = ommlElementToLatex(
|
|
3509
|
+
const result = ommlElementToLatex(tag, item);
|
|
3512
3510
|
if (result) {
|
|
3513
3511
|
parts.push(result);
|
|
3514
3512
|
}
|
|
@@ -12114,7 +12112,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
12114
12112
|
}
|
|
12115
12113
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
12116
12114
|
const scale = zoom || 1;
|
|
12117
|
-
const minSize = opts.minSize ??
|
|
12115
|
+
const minSize = opts.minSize ?? chunkKV3EOLP3_js.MIN_ELEMENT_SIZE;
|
|
12118
12116
|
const rotation = rotationOf(box);
|
|
12119
12117
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
12120
12118
|
const dx = local.x;
|
|
@@ -12141,7 +12139,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
12141
12139
|
}
|
|
12142
12140
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
12143
12141
|
}
|
|
12144
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
12142
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkKV3EOLP3_js.MIN_ELEMENT_SIZE) {
|
|
12145
12143
|
if (handle === null || gridSpacingPx <= 0) {
|
|
12146
12144
|
return box;
|
|
12147
12145
|
}
|
|
@@ -12171,7 +12169,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkMS6S6YYR_js.MI
|
|
|
12171
12169
|
}
|
|
12172
12170
|
return { x, y, width, height };
|
|
12173
12171
|
}
|
|
12174
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
12172
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunkKV3EOLP3_js.MIN_ELEMENT_SIZE) {
|
|
12175
12173
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
12176
12174
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
12177
12175
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -13726,7 +13724,7 @@ var THEME_COLOR_LABELS = {
|
|
|
13726
13724
|
};
|
|
13727
13725
|
function buildThemeColorGrid(colorScheme) {
|
|
13728
13726
|
return THEME_COLOR_TINT_ROWS.map(
|
|
13729
|
-
(row) =>
|
|
13727
|
+
(row) => chunkKV3EOLP3_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
13730
13728
|
hex: row.transform(colorScheme[key]),
|
|
13731
13729
|
schemeKey: key,
|
|
13732
13730
|
rowLabel: row.label,
|
|
@@ -14202,7 +14200,7 @@ function svgLineCap(lineCap) {
|
|
|
14202
14200
|
}
|
|
14203
14201
|
function copyFormatFromElement(element) {
|
|
14204
14202
|
const result = {};
|
|
14205
|
-
if (
|
|
14203
|
+
if (chunkKV3EOLP3_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
14206
14204
|
const s = element.shapeStyle;
|
|
14207
14205
|
result.shapeStyle = {
|
|
14208
14206
|
fillColor: s.fillColor,
|
|
@@ -14231,7 +14229,7 @@ function copyFormatFromElement(element) {
|
|
|
14231
14229
|
softEdgeRadius: s.softEdgeRadius
|
|
14232
14230
|
};
|
|
14233
14231
|
}
|
|
14234
|
-
if (
|
|
14232
|
+
if (chunkKV3EOLP3_js.hasTextProperties(element) && element.textStyle) {
|
|
14235
14233
|
const t = element.textStyle;
|
|
14236
14234
|
result.textStyle = {
|
|
14237
14235
|
fontFamily: t.fontFamily,
|
|
@@ -14262,7 +14260,7 @@ function definedEntries(obj) {
|
|
|
14262
14260
|
}
|
|
14263
14261
|
function applyFormatToElement(element, format) {
|
|
14264
14262
|
let updated = { ...element };
|
|
14265
|
-
if (format.shapeStyle &&
|
|
14263
|
+
if (format.shapeStyle && chunkKV3EOLP3_js.hasShapeProperties(updated)) {
|
|
14266
14264
|
updated = {
|
|
14267
14265
|
...updated,
|
|
14268
14266
|
shapeStyle: {
|
|
@@ -14271,7 +14269,7 @@ function applyFormatToElement(element, format) {
|
|
|
14271
14269
|
}
|
|
14272
14270
|
};
|
|
14273
14271
|
}
|
|
14274
|
-
if (format.textStyle &&
|
|
14272
|
+
if (format.textStyle && chunkKV3EOLP3_js.hasTextProperties(updated)) {
|
|
14275
14273
|
updated = {
|
|
14276
14274
|
...updated,
|
|
14277
14275
|
textStyle: {
|
|
@@ -14286,7 +14284,7 @@ function hasCopyableFormat(element) {
|
|
|
14286
14284
|
if (!element) {
|
|
14287
14285
|
return false;
|
|
14288
14286
|
}
|
|
14289
|
-
return
|
|
14287
|
+
return chunkKV3EOLP3_js.hasShapeProperties(element) || chunkKV3EOLP3_js.hasTextProperties(element);
|
|
14290
14288
|
}
|
|
14291
14289
|
function copySegmentMetadata(from, to) {
|
|
14292
14290
|
if (from.equationXml !== void 0) {
|
|
@@ -14423,7 +14421,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
14423
14421
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
14424
14422
|
}
|
|
14425
14423
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
14426
|
-
if (!
|
|
14424
|
+
if (!chunkKV3EOLP3_js.hasShapeProperties(element)) {
|
|
14427
14425
|
return null;
|
|
14428
14426
|
}
|
|
14429
14427
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -14824,7 +14822,8 @@ function decodeDelta(delta) {
|
|
|
14824
14822
|
} catch {
|
|
14825
14823
|
}
|
|
14826
14824
|
}
|
|
14827
|
-
|
|
14825
|
+
const isBreakMarker = op.insert === "\n" && (a.pb === "1" || a.lb === "1");
|
|
14826
|
+
if (!isBreakMarker && op.insert !== "\u200B") {
|
|
14828
14827
|
seg.text = op.insert;
|
|
14829
14828
|
}
|
|
14830
14829
|
segments.push(seg);
|
|
@@ -15414,7 +15413,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
|
|
|
15414
15413
|
var POSITION_THRESHOLD = 2;
|
|
15415
15414
|
var SIZE_THRESHOLD = 2;
|
|
15416
15415
|
function getElementText(element) {
|
|
15417
|
-
if (!
|
|
15416
|
+
if (!chunkKV3EOLP3_js.hasTextProperties(element)) {
|
|
15418
15417
|
return "";
|
|
15419
15418
|
}
|
|
15420
15419
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -18988,7 +18987,7 @@ function getAriaRole(element) {
|
|
|
18988
18987
|
case "model3d":
|
|
18989
18988
|
return "img";
|
|
18990
18989
|
case "shape": {
|
|
18991
|
-
if (
|
|
18990
|
+
if (chunkKV3EOLP3_js.hasTextProperties(element) && element.text) {
|
|
18992
18991
|
return "group";
|
|
18993
18992
|
}
|
|
18994
18993
|
return "img";
|
|
@@ -19001,7 +19000,7 @@ function getAriaLabel(element) {
|
|
|
19001
19000
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
19002
19001
|
return element.altText.trim();
|
|
19003
19002
|
}
|
|
19004
|
-
if (
|
|
19003
|
+
if (chunkKV3EOLP3_js.hasTextProperties(element) && element.text) {
|
|
19005
19004
|
const text = element.text.trim();
|
|
19006
19005
|
if (text) {
|
|
19007
19006
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -19408,7 +19407,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
19408
19407
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
19409
19408
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
19410
19409
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
19411
|
-
return
|
|
19410
|
+
return chunkKV3EOLP3_js.createChartElement(
|
|
19412
19411
|
chartType,
|
|
19413
19412
|
{
|
|
19414
19413
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -20428,7 +20427,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
|
|
|
20428
20427
|
};
|
|
20429
20428
|
}
|
|
20430
20429
|
function collectFontsFromElement(element, fonts) {
|
|
20431
|
-
if (
|
|
20430
|
+
if (chunkKV3EOLP3_js.hasTextProperties(element)) {
|
|
20432
20431
|
if (element.textStyle?.fontFamily) {
|
|
20433
20432
|
fonts.add(element.textStyle.fontFamily);
|
|
20434
20433
|
}
|
|
Binary file
|
|
Binary file
|