pptx-react-viewer 2.5.3 → 2.6.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 +9 -0
- package/dist/{AiChatPanel-DPMHPOWF.js → AiChatPanel-LBK6YRKH.js} +22 -22
- package/dist/AiChatPanel-LBK6YRKH.js.br +0 -0
- package/dist/AiChatPanel-LBK6YRKH.js.gz +0 -0
- package/dist/{AiChatPanel-OFOOWR4U.mjs → AiChatPanel-RVZOGGFK.mjs} +3 -3
- package/dist/AiChatPanel-RVZOGGFK.mjs.br +0 -0
- package/dist/AiChatPanel-RVZOGGFK.mjs.gz +0 -0
- package/dist/{Model3DScene-PD2MDBIE.js → Model3DScene-L46RNRU5.js} +2 -2
- package/dist/Model3DScene-L46RNRU5.js.br +0 -0
- package/dist/Model3DScene-L46RNRU5.js.gz +0 -0
- package/dist/{Model3DScene-P4OKVQBF.mjs → Model3DScene-WBUZ74G3.mjs} +1 -1
- package/dist/Model3DScene-WBUZ74G3.mjs.br +0 -0
- package/dist/Model3DScene-WBUZ74G3.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-TL4ZIOI4.mjs → SurfaceChart3DScene-CB32AJS4.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-TL4ZIOI4.mjs.br → SurfaceChart3DScene-CB32AJS4.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-CB32AJS4.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-FECS3THE.js → SurfaceChart3DScene-RWMGMREC.js} +2 -2
- package/dist/SurfaceChart3DScene-RWMGMREC.js.br +0 -0
- package/dist/SurfaceChart3DScene-RWMGMREC.js.gz +0 -0
- package/dist/{chunk-UUS7QT22.js → chunk-2VE3LVKZ.js} +346 -315
- package/dist/chunk-2VE3LVKZ.js.br +0 -0
- package/dist/chunk-2VE3LVKZ.js.gz +0 -0
- package/dist/{chunk-FFLUALX5.js → chunk-4O7PPQ2V.js} +260 -240
- package/dist/chunk-4O7PPQ2V.js.br +0 -0
- package/dist/chunk-4O7PPQ2V.js.gz +0 -0
- package/dist/{chunk-ZZA62IND.mjs → chunk-54FSVX3O.mjs} +35 -4
- package/dist/chunk-54FSVX3O.mjs.br +0 -0
- package/dist/chunk-54FSVX3O.mjs.gz +0 -0
- package/dist/{chunk-H2FZ2NJ7.js → chunk-AX4Q5JWN.js} +3 -3
- package/dist/chunk-AX4Q5JWN.js.br +0 -0
- package/dist/chunk-AX4Q5JWN.js.gz +0 -0
- package/dist/{chunk-F3JUUSC4.mjs → chunk-BL3WW2BS.mjs} +95 -15
- package/dist/chunk-BL3WW2BS.mjs.br +0 -0
- package/dist/chunk-BL3WW2BS.mjs.gz +0 -0
- package/dist/{chunk-6KOM27PS.mjs → chunk-EI456HZK.mjs} +964 -64
- package/dist/chunk-EI456HZK.mjs.br +0 -0
- package/dist/chunk-EI456HZK.mjs.gz +0 -0
- package/dist/{chunk-SAXG53MO.mjs → chunk-GC6HQMVG.mjs} +1 -1
- package/dist/chunk-GC6HQMVG.mjs.br +0 -0
- package/dist/chunk-GC6HQMVG.mjs.gz +0 -0
- package/dist/{chunk-USHZUHHG.js → chunk-IEFH47TF.js} +929 -849
- package/dist/chunk-IEFH47TF.js.br +0 -0
- package/dist/chunk-IEFH47TF.js.gz +0 -0
- package/dist/{chunk-23Q3I2LM.js → chunk-T7AMP24E.js} +966 -63
- package/dist/chunk-T7AMP24E.js.br +0 -0
- package/dist/chunk-T7AMP24E.js.gz +0 -0
- package/dist/{chunk-QDIF3ZXF.mjs → chunk-ZUNDIOGD.mjs} +28 -8
- package/dist/chunk-ZUNDIOGD.mjs.br +0 -0
- package/dist/chunk-ZUNDIOGD.mjs.gz +0 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +44 -0
- 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/viewer/index.d.ts +15 -0
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-DPMHPOWF.js.br +0 -0
- package/dist/AiChatPanel-DPMHPOWF.js.gz +0 -0
- package/dist/AiChatPanel-OFOOWR4U.mjs.br +0 -0
- package/dist/AiChatPanel-OFOOWR4U.mjs.gz +0 -0
- package/dist/Model3DScene-P4OKVQBF.mjs.br +0 -0
- package/dist/Model3DScene-P4OKVQBF.mjs.gz +0 -0
- package/dist/Model3DScene-PD2MDBIE.js.br +0 -0
- package/dist/Model3DScene-PD2MDBIE.js.gz +0 -0
- package/dist/SurfaceChart3DScene-FECS3THE.js.br +0 -0
- package/dist/SurfaceChart3DScene-FECS3THE.js.gz +0 -0
- package/dist/SurfaceChart3DScene-TL4ZIOI4.mjs.gz +0 -0
- package/dist/chunk-23Q3I2LM.js.br +0 -0
- package/dist/chunk-23Q3I2LM.js.gz +0 -0
- package/dist/chunk-6KOM27PS.mjs.br +0 -0
- package/dist/chunk-6KOM27PS.mjs.gz +0 -0
- package/dist/chunk-F3JUUSC4.mjs.br +0 -0
- package/dist/chunk-F3JUUSC4.mjs.gz +0 -0
- package/dist/chunk-FFLUALX5.js.br +0 -0
- package/dist/chunk-FFLUALX5.js.gz +0 -0
- package/dist/chunk-H2FZ2NJ7.js.br +0 -0
- package/dist/chunk-H2FZ2NJ7.js.gz +0 -0
- package/dist/chunk-QDIF3ZXF.mjs.br +0 -0
- package/dist/chunk-QDIF3ZXF.mjs.gz +0 -0
- package/dist/chunk-SAXG53MO.mjs.br +0 -0
- package/dist/chunk-SAXG53MO.mjs.gz +0 -0
- package/dist/chunk-USHZUHHG.js.br +0 -0
- package/dist/chunk-USHZUHHG.js.gz +0 -0
- package/dist/chunk-UUS7QT22.js.br +0 -0
- package/dist/chunk-UUS7QT22.js.gz +0 -0
- package/dist/chunk-ZZA62IND.mjs.br +0 -0
- package/dist/chunk-ZZA62IND.mjs.gz +0 -0
|
@@ -12654,9 +12654,9 @@ var PptxEffectDagExtractor = class {
|
|
|
12654
12654
|
if (Number.isFinite(endPos)) {
|
|
12655
12655
|
style.reflectionEndPosition = endPos / 1e5;
|
|
12656
12656
|
}
|
|
12657
|
-
const
|
|
12658
|
-
if (Number.isFinite(
|
|
12659
|
-
style.reflectionDistance =
|
|
12657
|
+
const dist2 = parseInt(String(refl["@_dist"] || ""), 10);
|
|
12658
|
+
if (Number.isFinite(dist2) && dist2 >= 0) {
|
|
12659
|
+
style.reflectionDistance = dist2 / this.context.emuPerPx;
|
|
12660
12660
|
}
|
|
12661
12661
|
}
|
|
12662
12662
|
extractDagBlur(dag, style) {
|
|
@@ -13803,10 +13803,7 @@ var PptxShapeStyleExtractor = class {
|
|
|
13803
13803
|
}
|
|
13804
13804
|
const lineNode = shapeProps["a:ln"];
|
|
13805
13805
|
if (lineNode) {
|
|
13806
|
-
|
|
13807
|
-
if (earlyReturn) {
|
|
13808
|
-
return style;
|
|
13809
|
-
}
|
|
13806
|
+
applyLineProperties(lineNode, style, this.context);
|
|
13810
13807
|
} else if (styleNode?.["a:lnRef"]) {
|
|
13811
13808
|
this.context.resolveThemeLineRef(styleNode["a:lnRef"], style);
|
|
13812
13809
|
}
|
|
@@ -20387,6 +20384,11 @@ var STANDARD_TRANSITION_TYPES = /* @__PURE__ */ new Set([
|
|
|
20387
20384
|
]);
|
|
20388
20385
|
var SPEEDS = /* @__PURE__ */ new Set(["slow", "med", "fast"]);
|
|
20389
20386
|
var UINT_MAX = 4294967295;
|
|
20387
|
+
var MORPH_OPTIONS = /* @__PURE__ */ new Set(["byObject", "byWord", "byChar"]);
|
|
20388
|
+
function normalizeMorphOption(value) {
|
|
20389
|
+
const candidate = token(value);
|
|
20390
|
+
return MORPH_OPTIONS.has(candidate) ? candidate : void 0;
|
|
20391
|
+
}
|
|
20390
20392
|
function parseTransitionDetails(node, localName22) {
|
|
20391
20393
|
const result = { type: "cut" };
|
|
20392
20394
|
for (const [key, value] of Object.entries(node)) {
|
|
@@ -20402,6 +20404,11 @@ function parseTransitionDetails(node, localName22) {
|
|
|
20402
20404
|
result.rawExtLst = value;
|
|
20403
20405
|
continue;
|
|
20404
20406
|
}
|
|
20407
|
+
if (name === "morph") {
|
|
20408
|
+
result.type = "morph";
|
|
20409
|
+
result.morphOption = normalizeMorphOption(value?.["@_option"]);
|
|
20410
|
+
continue;
|
|
20411
|
+
}
|
|
20405
20412
|
if (STANDARD_TRANSITION_TYPES.has(name)) {
|
|
20406
20413
|
result.type = name;
|
|
20407
20414
|
}
|
|
@@ -20601,6 +20608,7 @@ var PptxSlideTransitionService = class {
|
|
|
20601
20608
|
let transitionType = details.type;
|
|
20602
20609
|
let { direction, orient, pattern } = details;
|
|
20603
20610
|
const { spokes, thruBlk, rawSoundAction, rawExtLst } = details;
|
|
20611
|
+
let { morphOption } = details;
|
|
20604
20612
|
if (rawExtLst && transitionType === "cut") {
|
|
20605
20613
|
const p14Result = parseP14FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
|
|
20606
20614
|
const p15Result = p14Result ? void 0 : parseP15FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
|
|
@@ -20617,8 +20625,12 @@ var PptxSlideTransitionService = class {
|
|
|
20617
20625
|
}
|
|
20618
20626
|
} else if (p15Result) {
|
|
20619
20627
|
transitionType = p15Result.type;
|
|
20620
|
-
} else
|
|
20621
|
-
|
|
20628
|
+
} else {
|
|
20629
|
+
const morphResult = this.parseMorphFromExtLst(rawExtLst);
|
|
20630
|
+
if (morphResult) {
|
|
20631
|
+
transitionType = "morph";
|
|
20632
|
+
morphOption = morphResult.morphOption;
|
|
20633
|
+
}
|
|
20622
20634
|
}
|
|
20623
20635
|
}
|
|
20624
20636
|
const attributes = parseTransitionAttributes(transitionNode);
|
|
@@ -20631,6 +20643,7 @@ var PptxSlideTransitionService = class {
|
|
|
20631
20643
|
spokes,
|
|
20632
20644
|
pattern,
|
|
20633
20645
|
thruBlk,
|
|
20646
|
+
morphOption,
|
|
20634
20647
|
...sound,
|
|
20635
20648
|
rawSoundAction,
|
|
20636
20649
|
rawExtLst,
|
|
@@ -20676,21 +20689,18 @@ var PptxSlideTransitionService = class {
|
|
|
20676
20689
|
if (!ext) {
|
|
20677
20690
|
continue;
|
|
20678
20691
|
}
|
|
20679
|
-
const
|
|
20680
|
-
const matchesUri = uri.toUpperCase() === MORPH_EXT_URI.toUpperCase();
|
|
20681
|
-
for (const key of Object.keys(ext)) {
|
|
20692
|
+
for (const [key, value] of Object.entries(ext)) {
|
|
20682
20693
|
if (key.startsWith("@_")) {
|
|
20683
20694
|
continue;
|
|
20684
20695
|
}
|
|
20685
20696
|
if (this.getXmlLocalName(key) === "morph") {
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
}
|
|
20689
|
-
return true;
|
|
20697
|
+
return {
|
|
20698
|
+
morphOption: normalizeMorphOption(value?.["@_option"])
|
|
20699
|
+
};
|
|
20690
20700
|
}
|
|
20691
20701
|
}
|
|
20692
20702
|
}
|
|
20693
|
-
return
|
|
20703
|
+
return void 0;
|
|
20694
20704
|
}
|
|
20695
20705
|
buildSlideTransitionXml(transition) {
|
|
20696
20706
|
if (!transition || transition.type === "none") {
|
|
@@ -20714,7 +20724,9 @@ var PptxSlideTransitionService = class {
|
|
|
20714
20724
|
} else if (isP15Type) {
|
|
20715
20725
|
node["p:extLst"] = transition.rawExtLst ?? buildP15ExtLst(transitionType);
|
|
20716
20726
|
} else if (isMorphType) {
|
|
20717
|
-
|
|
20727
|
+
if (!this.hasDirectMorphChild(node)) {
|
|
20728
|
+
node["p:extLst"] = this.buildMorphExtLst(transition.rawExtLst, transition.morphOption);
|
|
20729
|
+
}
|
|
20718
20730
|
} else {
|
|
20719
20731
|
node[`p:${transitionType}`] = buildStandardTransitionChild(transition);
|
|
20720
20732
|
}
|
|
@@ -20728,16 +20740,32 @@ var PptxSlideTransitionService = class {
|
|
|
20728
20740
|
}
|
|
20729
20741
|
return node;
|
|
20730
20742
|
}
|
|
20743
|
+
/**
|
|
20744
|
+
* True when the (preserved) transition node already carries a `morph`
|
|
20745
|
+
* element as a direct child, in any namespace prefix.
|
|
20746
|
+
*/
|
|
20747
|
+
hasDirectMorphChild(node) {
|
|
20748
|
+
for (const key of Object.keys(node)) {
|
|
20749
|
+
if (!key.startsWith("@_") && this.getXmlLocalName(key) === "morph") {
|
|
20750
|
+
return true;
|
|
20751
|
+
}
|
|
20752
|
+
}
|
|
20753
|
+
return false;
|
|
20754
|
+
}
|
|
20731
20755
|
/**
|
|
20732
20756
|
* Build the extLst XML node for a morph (p159) transition, preserving any
|
|
20733
20757
|
* non-morph extensions from rawExtLst.
|
|
20734
20758
|
*/
|
|
20735
|
-
buildMorphExtLst(rawExtLst) {
|
|
20759
|
+
buildMorphExtLst(rawExtLst, morphOption) {
|
|
20760
|
+
const morphNode = {
|
|
20761
|
+
"@_xmlns:p159": "http://schemas.microsoft.com/office/powerpoint/2015/09/main"
|
|
20762
|
+
};
|
|
20763
|
+
if (morphOption) {
|
|
20764
|
+
morphNode["@_option"] = morphOption;
|
|
20765
|
+
}
|
|
20736
20766
|
const morphExt = {
|
|
20737
20767
|
"@_uri": MORPH_EXT_URI,
|
|
20738
|
-
"p159:morph":
|
|
20739
|
-
"@_xmlns:p159": "http://schemas.microsoft.com/office/powerpoint/2015/09/main"
|
|
20740
|
-
}
|
|
20768
|
+
"p159:morph": morphNode
|
|
20741
20769
|
};
|
|
20742
20770
|
if (!rawExtLst) {
|
|
20743
20771
|
return { "p:ext": morphExt };
|
|
@@ -49658,17 +49686,17 @@ function buildShadowColorNode(hex10, opacity2) {
|
|
|
49658
49686
|
};
|
|
49659
49687
|
}
|
|
49660
49688
|
function distAndDir(ox, oy) {
|
|
49661
|
-
const
|
|
49689
|
+
const dist2 = Math.sqrt(ox * ox + oy * oy);
|
|
49662
49690
|
const dir = Math.atan2(oy, ox) * 180 / Math.PI;
|
|
49663
|
-
return { dist, dir };
|
|
49691
|
+
return { dist: dist2, dir };
|
|
49664
49692
|
}
|
|
49665
49693
|
function buildOuterShadowNode(style) {
|
|
49666
49694
|
const ox = style.textShadowOffsetX ?? 0;
|
|
49667
49695
|
const oy = style.textShadowOffsetY ?? 0;
|
|
49668
|
-
const { dist, dir } = distAndDir(ox, oy);
|
|
49696
|
+
const { dist: dist2, dir } = distAndDir(ox, oy);
|
|
49669
49697
|
return {
|
|
49670
49698
|
"@_blurRad": String(Math.round((style.textShadowBlur ?? 4) * EMU_PER_PX8)),
|
|
49671
|
-
"@_dist": String(Math.round(
|
|
49699
|
+
"@_dist": String(Math.round(dist2 * EMU_PER_PX8)),
|
|
49672
49700
|
"@_dir": String(Math.round(dir * 6e4)),
|
|
49673
49701
|
"a:srgbClr": buildShadowColorNode(style.textShadowColor || "#000000", style.textShadowOpacity)
|
|
49674
49702
|
};
|
|
@@ -49676,10 +49704,10 @@ function buildOuterShadowNode(style) {
|
|
|
49676
49704
|
function buildInnerShadowNode(style) {
|
|
49677
49705
|
const ox = style.textInnerShadowOffsetX ?? 0;
|
|
49678
49706
|
const oy = style.textInnerShadowOffsetY ?? 0;
|
|
49679
|
-
const { dist, dir } = distAndDir(ox, oy);
|
|
49707
|
+
const { dist: dist2, dir } = distAndDir(ox, oy);
|
|
49680
49708
|
return {
|
|
49681
49709
|
"@_blurRad": String(Math.round((style.textInnerShadowBlur ?? 3) * EMU_PER_PX8)),
|
|
49682
|
-
"@_dist": String(Math.round(
|
|
49710
|
+
"@_dist": String(Math.round(dist2 * EMU_PER_PX8)),
|
|
49683
49711
|
"@_dir": String(Math.round(dir * 6e4)),
|
|
49684
49712
|
"a:srgbClr": buildShadowColorNode(
|
|
49685
49713
|
style.textInnerShadowColor || "#000000",
|
|
@@ -51305,10 +51333,10 @@ var PptxHandlerRuntime18 = class extends PptxHandlerRuntime17 {
|
|
|
51305
51333
|
const distRaw = Number.parseInt(String(outerShdw["@_dist"] || ""), 10);
|
|
51306
51334
|
const dirRaw = Number.parseInt(String(outerShdw["@_dir"] || ""), 10);
|
|
51307
51335
|
if (Number.isFinite(distRaw) && distRaw >= 0) {
|
|
51308
|
-
const
|
|
51336
|
+
const dist2 = distRaw / PptxHandlerRuntime17.EMU_PER_PX;
|
|
51309
51337
|
const dirRad = (Number.isFinite(dirRaw) ? dirRaw / 6e4 : 0) * Math.PI / 180;
|
|
51310
|
-
style.textShadowOffsetX = Math.round(Math.cos(dirRad) *
|
|
51311
|
-
style.textShadowOffsetY = Math.round(Math.sin(dirRad) *
|
|
51338
|
+
style.textShadowOffsetX = Math.round(Math.cos(dirRad) * dist2 * 100) / 100;
|
|
51339
|
+
style.textShadowOffsetY = Math.round(Math.sin(dirRad) * dist2 * 100) / 100;
|
|
51312
51340
|
}
|
|
51313
51341
|
}
|
|
51314
51342
|
const glowNode = runEffectList["a:glow"];
|
|
@@ -62898,6 +62926,12 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
62898
62926
|
...endParagraphStyle,
|
|
62899
62927
|
...defaultRunStyle
|
|
62900
62928
|
};
|
|
62929
|
+
if (mergedDefaultRunStyle.color === void 0 && ctx.styleFontRefColor !== void 0) {
|
|
62930
|
+
mergedDefaultRunStyle.color = ctx.styleFontRefColor;
|
|
62931
|
+
}
|
|
62932
|
+
if (mergedDefaultRunStyle.fontFamily === void 0 && ctx.styleFontRefTypeface !== void 0) {
|
|
62933
|
+
mergedDefaultRunStyle.fontFamily = ctx.styleFontRefTypeface;
|
|
62934
|
+
}
|
|
62901
62935
|
if (ctx.effectiveLevelStyles) {
|
|
62902
62936
|
const normalizedLevel = level === -1 ? -1 : Number.isFinite(level) ? Math.min(Math.max(level, 0), 8) : 0;
|
|
62903
62937
|
const phLevel = ctx.effectiveLevelStyles[normalizedLevel] ?? ctx.effectiveLevelStyles[-1] ?? (normalizedLevel === -1 ? ctx.effectiveLevelStyles[0] : void 0);
|
|
@@ -62970,10 +63004,17 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
|
|
|
62970
63004
|
} else {
|
|
62971
63005
|
bulletText = "\u2022 ";
|
|
62972
63006
|
}
|
|
63007
|
+
const bulletStyle = { ...mergedDefaultRunStyle };
|
|
63008
|
+
if (paragraphBulletInfo.sizePercent === void 0 && paragraphBulletInfo.sizePts === void 0) {
|
|
63009
|
+
const firstRunSize = this.resolveFirstRunFontSize(p, paraAlign, ctx);
|
|
63010
|
+
if (firstRunSize !== void 0) {
|
|
63011
|
+
bulletStyle.fontSize = firstRunSize;
|
|
63012
|
+
}
|
|
63013
|
+
}
|
|
62973
63014
|
parts.push(bulletText);
|
|
62974
63015
|
segments.push({
|
|
62975
63016
|
text: bulletText,
|
|
62976
|
-
style:
|
|
63017
|
+
style: bulletStyle,
|
|
62977
63018
|
bulletInfo: paragraphBulletInfo
|
|
62978
63019
|
});
|
|
62979
63020
|
maybeSeed(mergedDefaultRunStyle);
|
|
@@ -63183,6 +63224,32 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
|
|
|
63183
63224
|
}
|
|
63184
63225
|
return { parts, segments, seedStyle };
|
|
63185
63226
|
}
|
|
63227
|
+
/**
|
|
63228
|
+
* Font size (px) of the first text run in a paragraph, or `undefined` when
|
|
63229
|
+
* the paragraph has no run that declares one.
|
|
63230
|
+
*
|
|
63231
|
+
* Used to size an unsized bullet the way PowerPoint does: `a:buChar` /
|
|
63232
|
+
* `a:buAutoNum` with no `a:buSzPct`/`a:buSzPts` inherits the first run's
|
|
63233
|
+
* size. Only `a:r` and `a:fld` carry renderable text; `a:br` does not.
|
|
63234
|
+
*/
|
|
63235
|
+
resolveFirstRunFontSize(p, paraAlign, ctx) {
|
|
63236
|
+
for (const key of ["a:r", "a:fld"]) {
|
|
63237
|
+
const node = p[key];
|
|
63238
|
+
if (!node) {
|
|
63239
|
+
continue;
|
|
63240
|
+
}
|
|
63241
|
+
const first = this.ensureArray(node)[0];
|
|
63242
|
+
const runProps = first?.["a:rPr"];
|
|
63243
|
+
if (!runProps) {
|
|
63244
|
+
continue;
|
|
63245
|
+
}
|
|
63246
|
+
const style = this.extractTextRunStyle(runProps, paraAlign, ctx.slideRelationshipMap);
|
|
63247
|
+
if (typeof style.fontSize === "number") {
|
|
63248
|
+
return style.fontSize;
|
|
63249
|
+
}
|
|
63250
|
+
}
|
|
63251
|
+
return void 0;
|
|
63252
|
+
}
|
|
63186
63253
|
/**
|
|
63187
63254
|
* Parse an `a:ruby` element into a {@link TextSegment} with ruby annotation metadata.
|
|
63188
63255
|
*
|
|
@@ -63404,15 +63471,13 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime27 extends PptxHandlerRuntim
|
|
|
63404
63471
|
Object.assign(textStyle, bodyDefaultRunStyle);
|
|
63405
63472
|
const fontRef = styleNode?.["a:fontRef"];
|
|
63406
63473
|
const fontRefIdx = String(fontRef?.["@_idx"] || "").toLowerCase();
|
|
63407
|
-
|
|
63408
|
-
|
|
63409
|
-
|
|
63410
|
-
|
|
63411
|
-
textStyle.fontFamily = resolved;
|
|
63412
|
-
}
|
|
63474
|
+
const styleFontRefTypeface = fontRefIdx.length > 0 ? this.resolveThemeTypeface(fontRefIdx.includes("minor") ? "+mn-lt" : "+mj-lt") : void 0;
|
|
63475
|
+
const styleFontRefColor = fontRef ? this.parseColor(fontRef) : void 0;
|
|
63476
|
+
if (!textStyle.fontFamily && styleFontRefTypeface) {
|
|
63477
|
+
textStyle.fontFamily = styleFontRefTypeface;
|
|
63413
63478
|
}
|
|
63414
63479
|
if (!textStyle.color) {
|
|
63415
|
-
textStyle.color =
|
|
63480
|
+
textStyle.color = styleFontRefColor;
|
|
63416
63481
|
}
|
|
63417
63482
|
const bodyPr = txBody?.["a:bodyPr"] || inheritedTxBody?.["a:bodyPr"];
|
|
63418
63483
|
const bodyPropResult = this.applyBodyProperties(
|
|
@@ -63443,7 +63508,9 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime27 extends PptxHandlerRuntim
|
|
|
63443
63508
|
placeholderInfo: placeholderInfo ?? void 0,
|
|
63444
63509
|
phDefaults,
|
|
63445
63510
|
slidePath,
|
|
63446
|
-
effectiveLevelStyles
|
|
63511
|
+
effectiveLevelStyles,
|
|
63512
|
+
styleFontRefColor,
|
|
63513
|
+
styleFontRefTypeface
|
|
63447
63514
|
};
|
|
63448
63515
|
paras.forEach((p, pIdx) => {
|
|
63449
63516
|
const styleResult = this.resolveShapeParagraphStyle(p, textStyle, ctx);
|
|
@@ -64292,18 +64359,6 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64292
64359
|
if (hasShapeProperties(el) && el.shapeStyle?.strokeWidth) {
|
|
64293
64360
|
el.shapeStyle.strokeWidth *= avgScale;
|
|
64294
64361
|
}
|
|
64295
|
-
if (hasTextProperties(el)) {
|
|
64296
|
-
if (el.textStyle?.fontSize) {
|
|
64297
|
-
el.textStyle.fontSize *= Math.abs(scaleY);
|
|
64298
|
-
}
|
|
64299
|
-
if (el.textSegments) {
|
|
64300
|
-
el.textSegments.forEach((seg) => {
|
|
64301
|
-
if (seg.style.fontSize) {
|
|
64302
|
-
seg.style.fontSize *= Math.abs(scaleY);
|
|
64303
|
-
}
|
|
64304
|
-
});
|
|
64305
|
-
}
|
|
64306
|
-
}
|
|
64307
64362
|
return el;
|
|
64308
64363
|
};
|
|
64309
64364
|
this.unwrapAlternateContent(group);
|
|
@@ -66353,12 +66408,12 @@ var PptxHandlerRuntime77 = class _PptxHandlerRuntime33 extends PptxHandlerRuntim
|
|
|
66353
66408
|
if (Number.isFinite(blurRad) && blurRad > 0) {
|
|
66354
66409
|
result.shadowBlur = blurRad / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66355
66410
|
}
|
|
66356
|
-
const
|
|
66411
|
+
const dist2 = parseInt(String(outerShdw["@_dist"] || "0"));
|
|
66357
66412
|
const dir = parseInt(String(outerShdw["@_dir"] || "0"));
|
|
66358
|
-
if (Number.isFinite(
|
|
66413
|
+
if (Number.isFinite(dist2) && dist2 > 0 && Number.isFinite(dir)) {
|
|
66359
66414
|
const angleRad = dir / 6e4 * (Math.PI / 180);
|
|
66360
|
-
result.shadowOffsetX = Math.cos(angleRad) *
|
|
66361
|
-
result.shadowOffsetY = Math.sin(angleRad) *
|
|
66415
|
+
result.shadowOffsetX = Math.cos(angleRad) * dist2 / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66416
|
+
result.shadowOffsetY = Math.sin(angleRad) * dist2 / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66362
66417
|
}
|
|
66363
66418
|
}
|
|
66364
66419
|
const innerShdw = effectLst["a:innerShdw"];
|
|
@@ -66369,12 +66424,12 @@ var PptxHandlerRuntime77 = class _PptxHandlerRuntime33 extends PptxHandlerRuntim
|
|
|
66369
66424
|
if (Number.isFinite(blurRad) && blurRad > 0) {
|
|
66370
66425
|
result.innerShadowBlur = blurRad / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66371
66426
|
}
|
|
66372
|
-
const
|
|
66427
|
+
const dist2 = parseInt(String(innerShdw["@_dist"] || "0"));
|
|
66373
66428
|
const dir = parseInt(String(innerShdw["@_dir"] || "0"));
|
|
66374
|
-
if (Number.isFinite(
|
|
66429
|
+
if (Number.isFinite(dist2) && dist2 > 0 && Number.isFinite(dir)) {
|
|
66375
66430
|
const angleRad = dir / 6e4 * (Math.PI / 180);
|
|
66376
|
-
result.innerShadowOffsetX = Math.cos(angleRad) *
|
|
66377
|
-
result.innerShadowOffsetY = Math.sin(angleRad) *
|
|
66431
|
+
result.innerShadowOffsetX = Math.cos(angleRad) * dist2 / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66432
|
+
result.innerShadowOffsetY = Math.sin(angleRad) * dist2 / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66378
66433
|
}
|
|
66379
66434
|
}
|
|
66380
66435
|
const glow = effectLst["a:glow"];
|
|
@@ -66419,9 +66474,9 @@ var PptxHandlerRuntime77 = class _PptxHandlerRuntime33 extends PptxHandlerRuntim
|
|
|
66419
66474
|
if (Number.isFinite(rot)) {
|
|
66420
66475
|
result.reflectionRotation = rot / 6e4;
|
|
66421
66476
|
}
|
|
66422
|
-
const
|
|
66423
|
-
if (Number.isFinite(
|
|
66424
|
-
result.reflectionDistance =
|
|
66477
|
+
const dist2 = parseInt(String(reflection["@_dist"] || "0"));
|
|
66478
|
+
if (Number.isFinite(dist2) && dist2 >= 0) {
|
|
66479
|
+
result.reflectionDistance = dist2 / _PptxHandlerRuntime33.EMU_PER_PX;
|
|
66425
66480
|
}
|
|
66426
66481
|
}
|
|
66427
66482
|
const scene3dNode = es["a:scene3d"];
|
|
@@ -97941,6 +97996,851 @@ function sanitizeMathMl(markup) {
|
|
|
97941
97996
|
}
|
|
97942
97997
|
return sanitized;
|
|
97943
97998
|
}
|
|
97999
|
+
function resolveParagraphStrutFontSize(segments, bodyFontSize) {
|
|
98000
|
+
let largest;
|
|
98001
|
+
for (const segment of segments) {
|
|
98002
|
+
if (segment.bulletInfo) {
|
|
98003
|
+
continue;
|
|
98004
|
+
}
|
|
98005
|
+
const size = segment.style?.fontSize;
|
|
98006
|
+
if (typeof size !== "number" || !Number.isFinite(size) || size <= 0) {
|
|
98007
|
+
continue;
|
|
98008
|
+
}
|
|
98009
|
+
if (largest === void 0 || size > largest) {
|
|
98010
|
+
largest = size;
|
|
98011
|
+
}
|
|
98012
|
+
}
|
|
98013
|
+
if (largest === void 0) {
|
|
98014
|
+
return void 0;
|
|
98015
|
+
}
|
|
98016
|
+
if (typeof bodyFontSize === "number" && Math.abs(largest - bodyFontSize) < 0.01) {
|
|
98017
|
+
return void 0;
|
|
98018
|
+
}
|
|
98019
|
+
return largest;
|
|
98020
|
+
}
|
|
98021
|
+
function parseHexColor(hex10) {
|
|
98022
|
+
if (!hex10 || typeof hex10 !== "string") {
|
|
98023
|
+
return null;
|
|
98024
|
+
}
|
|
98025
|
+
let cleaned = hex10.replace(/^#/u, "");
|
|
98026
|
+
if (cleaned.length === 3) {
|
|
98027
|
+
cleaned = cleaned[0] + cleaned[0] + cleaned[1] + cleaned[1] + cleaned[2] + cleaned[2];
|
|
98028
|
+
} else if (cleaned.length === 4) {
|
|
98029
|
+
cleaned = cleaned[0] + cleaned[0] + cleaned[1] + cleaned[1] + cleaned[2] + cleaned[2] + cleaned[3] + cleaned[3];
|
|
98030
|
+
}
|
|
98031
|
+
if (cleaned.length !== 6 && cleaned.length !== 8) {
|
|
98032
|
+
return null;
|
|
98033
|
+
}
|
|
98034
|
+
const r = Number.parseInt(cleaned.slice(0, 2), 16);
|
|
98035
|
+
const g = Number.parseInt(cleaned.slice(2, 4), 16);
|
|
98036
|
+
const b = Number.parseInt(cleaned.slice(4, 6), 16);
|
|
98037
|
+
const a = cleaned.length === 8 ? Number.parseInt(cleaned.slice(6, 8), 16) / 255 : 1;
|
|
98038
|
+
if ([r, g, b].some((v) => Number.isNaN(v))) {
|
|
98039
|
+
return null;
|
|
98040
|
+
}
|
|
98041
|
+
return { r, g, b, a: Number.isNaN(a) ? 1 : a };
|
|
98042
|
+
}
|
|
98043
|
+
function lerpColor2(from, to, t) {
|
|
98044
|
+
const clamped = Math.max(0, Math.min(1, t));
|
|
98045
|
+
const r = Math.round(from.r + (to.r - from.r) * clamped);
|
|
98046
|
+
const g = Math.round(from.g + (to.g - from.g) * clamped);
|
|
98047
|
+
const b = Math.round(from.b + (to.b - from.b) * clamped);
|
|
98048
|
+
const a = Number((from.a + (to.a - from.a) * clamped).toFixed(3));
|
|
98049
|
+
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
|
98050
|
+
}
|
|
98051
|
+
var OUTLINE_SAMPLE_COUNT = 64;
|
|
98052
|
+
var ELLIPSE_SAMPLE_COUNT = 48;
|
|
98053
|
+
function resolveLength(token2, axis) {
|
|
98054
|
+
const trimmed = token2.trim();
|
|
98055
|
+
if (trimmed.endsWith("%")) {
|
|
98056
|
+
const pct = Number.parseFloat(trimmed.slice(0, -1));
|
|
98057
|
+
return Number.isFinite(pct) ? pct / 100 * axis : 0;
|
|
98058
|
+
}
|
|
98059
|
+
const px3 = Number.parseFloat(trimmed.replace(/px$/u, ""));
|
|
98060
|
+
return Number.isFinite(px3) ? px3 : 0;
|
|
98061
|
+
}
|
|
98062
|
+
function polygonClipToPoints(value, width, height) {
|
|
98063
|
+
const inner = value.slice(value.indexOf("(") + 1, value.lastIndexOf(")"));
|
|
98064
|
+
const points3 = [];
|
|
98065
|
+
for (const pairStr of inner.split(",")) {
|
|
98066
|
+
const parts = pairStr.trim().split(/\s+/u);
|
|
98067
|
+
if (parts.length < 2) {
|
|
98068
|
+
continue;
|
|
98069
|
+
}
|
|
98070
|
+
points3.push({
|
|
98071
|
+
x: resolveLength(parts[0], width),
|
|
98072
|
+
y: resolveLength(parts[1], height)
|
|
98073
|
+
});
|
|
98074
|
+
}
|
|
98075
|
+
return points3;
|
|
98076
|
+
}
|
|
98077
|
+
function insetClipToPoints(value, width, height) {
|
|
98078
|
+
const inner = value.slice(value.indexOf("(") + 1, value.lastIndexOf(")"));
|
|
98079
|
+
const tokens = inner.split(/round/u)[0].trim().split(/\s+/u);
|
|
98080
|
+
const top = resolveLength(tokens[0] ?? "0", height);
|
|
98081
|
+
const right = resolveLength(tokens[1] ?? tokens[0] ?? "0", width);
|
|
98082
|
+
const bottom = resolveLength(tokens[2] ?? tokens[0] ?? "0", height);
|
|
98083
|
+
const left = resolveLength(tokens[3] ?? tokens[1] ?? tokens[0] ?? "0", width);
|
|
98084
|
+
return [
|
|
98085
|
+
{ x: left, y: top },
|
|
98086
|
+
{ x: width - right, y: top },
|
|
98087
|
+
{ x: width - right, y: height - bottom },
|
|
98088
|
+
{ x: left, y: height - bottom }
|
|
98089
|
+
];
|
|
98090
|
+
}
|
|
98091
|
+
function ellipseClipToPoints(value, width, height) {
|
|
98092
|
+
const isCircle = value.startsWith("circle");
|
|
98093
|
+
const inner = value.slice(value.indexOf("(") + 1, value.lastIndexOf(")"));
|
|
98094
|
+
const [radii, position2] = inner.split(/\s+at\s+/u);
|
|
98095
|
+
const radiusTokens = radii.trim().split(/\s+/u).filter(Boolean);
|
|
98096
|
+
let rx = width / 2;
|
|
98097
|
+
let ry = height / 2;
|
|
98098
|
+
if (isCircle) {
|
|
98099
|
+
const r = resolveLength(radiusTokens[0] ?? "50%", Math.min(width, height));
|
|
98100
|
+
rx = r;
|
|
98101
|
+
ry = r;
|
|
98102
|
+
} else {
|
|
98103
|
+
rx = resolveLength(radiusTokens[0] ?? "50%", width);
|
|
98104
|
+
ry = resolveLength(radiusTokens[1] ?? radiusTokens[0] ?? "50%", height);
|
|
98105
|
+
}
|
|
98106
|
+
let cx = width / 2;
|
|
98107
|
+
let cy = height / 2;
|
|
98108
|
+
if (position2) {
|
|
98109
|
+
const posTokens = position2.trim().split(/\s+/u);
|
|
98110
|
+
cx = resolveLength(posTokens[0] ?? "50%", width);
|
|
98111
|
+
cy = resolveLength(posTokens[1] ?? posTokens[0] ?? "50%", height);
|
|
98112
|
+
}
|
|
98113
|
+
const points3 = [];
|
|
98114
|
+
for (let i = 0; i < ELLIPSE_SAMPLE_COUNT; i++) {
|
|
98115
|
+
const a = i / ELLIPSE_SAMPLE_COUNT * Math.PI * 2;
|
|
98116
|
+
points3.push({ x: cx + Math.cos(a) * rx, y: cy + Math.sin(a) * ry });
|
|
98117
|
+
}
|
|
98118
|
+
return points3;
|
|
98119
|
+
}
|
|
98120
|
+
function clipPathToPolygon(value, width, height) {
|
|
98121
|
+
const v = value.trim();
|
|
98122
|
+
if (v.startsWith("polygon")) {
|
|
98123
|
+
return polygonClipToPoints(v, width, height);
|
|
98124
|
+
}
|
|
98125
|
+
if (v.startsWith("inset")) {
|
|
98126
|
+
return insetClipToPoints(v, width, height);
|
|
98127
|
+
}
|
|
98128
|
+
if (v.startsWith("ellipse") || v.startsWith("circle")) {
|
|
98129
|
+
return ellipseClipToPoints(v, width, height);
|
|
98130
|
+
}
|
|
98131
|
+
if (v.startsWith("path")) {
|
|
98132
|
+
const start = v.indexOf("'") >= 0 ? v.indexOf("'") : v.indexOf('"');
|
|
98133
|
+
const end = v.lastIndexOf("'") >= 0 ? v.lastIndexOf("'") : v.lastIndexOf('"');
|
|
98134
|
+
if (start >= 0 && end > start) {
|
|
98135
|
+
const d = v.slice(start + 1, end);
|
|
98136
|
+
const polys = svgPathToPolygons(d);
|
|
98137
|
+
if (polys.length === 0) {
|
|
98138
|
+
return [];
|
|
98139
|
+
}
|
|
98140
|
+
return polys.reduce((a, b) => b.length > a.length ? b : a);
|
|
98141
|
+
}
|
|
98142
|
+
}
|
|
98143
|
+
return [];
|
|
98144
|
+
}
|
|
98145
|
+
function resolveElementOutline(element) {
|
|
98146
|
+
const width = Math.max(element.width, 1);
|
|
98147
|
+
const height = Math.max(element.height, 1);
|
|
98148
|
+
const shapeType = element.shapeType;
|
|
98149
|
+
const adjustments = element.shapeAdjustments;
|
|
98150
|
+
const clip = getResolvedShapeClipPathFor(shapeType, width, height, adjustments);
|
|
98151
|
+
if (clip) {
|
|
98152
|
+
const poly = clipPathToPolygon(clip, width, height);
|
|
98153
|
+
if (poly.length >= 3) {
|
|
98154
|
+
return poly;
|
|
98155
|
+
}
|
|
98156
|
+
}
|
|
98157
|
+
return [
|
|
98158
|
+
{ x: 0, y: 0 },
|
|
98159
|
+
{ x: width, y: 0 },
|
|
98160
|
+
{ x: width, y: height },
|
|
98161
|
+
{ x: 0, y: height }
|
|
98162
|
+
];
|
|
98163
|
+
}
|
|
98164
|
+
function dist(a, b) {
|
|
98165
|
+
return Math.hypot(a.x - b.x, a.y - b.y);
|
|
98166
|
+
}
|
|
98167
|
+
function resamplePolygon(poly, count) {
|
|
98168
|
+
if (poly.length < 2) {
|
|
98169
|
+
return Array.from({ length: count }, () => ({ x: poly[0]?.x ?? 0, y: poly[0]?.y ?? 0 }));
|
|
98170
|
+
}
|
|
98171
|
+
const ring = [...poly, poly[0]];
|
|
98172
|
+
const segLen = [];
|
|
98173
|
+
let total = 0;
|
|
98174
|
+
for (let i = 0; i < ring.length - 1; i++) {
|
|
98175
|
+
const d = dist(ring[i], ring[i + 1]);
|
|
98176
|
+
segLen.push(d);
|
|
98177
|
+
total += d;
|
|
98178
|
+
}
|
|
98179
|
+
if (total === 0) {
|
|
98180
|
+
return Array.from({ length: count }, () => ({ x: poly[0].x, y: poly[0].y }));
|
|
98181
|
+
}
|
|
98182
|
+
const result = [];
|
|
98183
|
+
const step = total / count;
|
|
98184
|
+
let seg = 0;
|
|
98185
|
+
let segStart = 0;
|
|
98186
|
+
for (let i = 0; i < count; i++) {
|
|
98187
|
+
const target = i * step;
|
|
98188
|
+
while (seg < segLen.length - 1 && segStart + segLen[seg] < target) {
|
|
98189
|
+
segStart += segLen[seg];
|
|
98190
|
+
seg++;
|
|
98191
|
+
}
|
|
98192
|
+
const within = segLen[seg] > 0 ? (target - segStart) / segLen[seg] : 0;
|
|
98193
|
+
const a = ring[seg];
|
|
98194
|
+
const b = ring[seg + 1];
|
|
98195
|
+
result.push({ x: a.x + (b.x - a.x) * within, y: a.y + (b.y - a.y) * within });
|
|
98196
|
+
}
|
|
98197
|
+
return result;
|
|
98198
|
+
}
|
|
98199
|
+
function signedArea2(poly) {
|
|
98200
|
+
let area = 0;
|
|
98201
|
+
for (let i = 0; i < poly.length; i++) {
|
|
98202
|
+
const a = poly[i];
|
|
98203
|
+
const b = poly[(i + 1) % poly.length];
|
|
98204
|
+
area += a.x * b.y - b.x * a.y;
|
|
98205
|
+
}
|
|
98206
|
+
return area / 2;
|
|
98207
|
+
}
|
|
98208
|
+
function rotateRing(poly, offset) {
|
|
98209
|
+
const n = poly.length;
|
|
98210
|
+
const o = (offset % n + n) % n;
|
|
98211
|
+
return poly.slice(o).concat(poly.slice(0, o));
|
|
98212
|
+
}
|
|
98213
|
+
function bestRotation(from, to) {
|
|
98214
|
+
let bestOffset = 0;
|
|
98215
|
+
let bestCost = Infinity;
|
|
98216
|
+
for (let offset = 0; offset < to.length; offset++) {
|
|
98217
|
+
let cost = 0;
|
|
98218
|
+
for (let i = 0; i < from.length; i++) {
|
|
98219
|
+
const t = to[(i + offset) % to.length];
|
|
98220
|
+
const dx = from[i].x - t.x;
|
|
98221
|
+
const dy = from[i].y - t.y;
|
|
98222
|
+
cost += dx * dx + dy * dy;
|
|
98223
|
+
if (cost >= bestCost) {
|
|
98224
|
+
break;
|
|
98225
|
+
}
|
|
98226
|
+
}
|
|
98227
|
+
if (cost < bestCost) {
|
|
98228
|
+
bestCost = cost;
|
|
98229
|
+
bestOffset = offset;
|
|
98230
|
+
}
|
|
98231
|
+
}
|
|
98232
|
+
return bestOffset;
|
|
98233
|
+
}
|
|
98234
|
+
function normalizeOutlinePair(fromPoly, toPoly, count = OUTLINE_SAMPLE_COUNT) {
|
|
98235
|
+
const from = resamplePolygon(fromPoly, count);
|
|
98236
|
+
let to = resamplePolygon(toPoly, count);
|
|
98237
|
+
if (Math.sign(signedArea2(from)) !== Math.sign(signedArea2(to))) {
|
|
98238
|
+
to = [...to].reverse();
|
|
98239
|
+
}
|
|
98240
|
+
const offset = bestRotation(from, to);
|
|
98241
|
+
to = rotateRing(to, offset);
|
|
98242
|
+
return [from, to];
|
|
98243
|
+
}
|
|
98244
|
+
function interpolateOutline(from, to, t) {
|
|
98245
|
+
const clamped = Math.max(0, Math.min(1, t));
|
|
98246
|
+
const len = Math.min(from.length, to.length);
|
|
98247
|
+
if (len === 0) {
|
|
98248
|
+
return "";
|
|
98249
|
+
}
|
|
98250
|
+
const parts = [];
|
|
98251
|
+
for (let i = 0; i < len; i++) {
|
|
98252
|
+
const x = from[i].x + (to[i].x - from[i].x) * clamped;
|
|
98253
|
+
const y = from[i].y + (to[i].y - from[i].y) * clamped;
|
|
98254
|
+
parts.push(`${i === 0 ? "M" : "L"}${Number(x.toFixed(2))} ${Number(y.toFixed(2))}`);
|
|
98255
|
+
}
|
|
98256
|
+
parts.push("Z");
|
|
98257
|
+
return parts.join(" ");
|
|
98258
|
+
}
|
|
98259
|
+
var MORPH_EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
98260
|
+
var PROXIMITY_THRESHOLD = 300;
|
|
98261
|
+
var GEOMETRY_MORPH_STEPS = 8;
|
|
98262
|
+
function shouldGeometryMorph(pair) {
|
|
98263
|
+
const fromType = pair.fromElement.shapeType;
|
|
98264
|
+
const toType = pair.toElement.shapeType;
|
|
98265
|
+
if (!fromType || !toType) {
|
|
98266
|
+
return false;
|
|
98267
|
+
}
|
|
98268
|
+
if (fromType.toLowerCase() !== toType.toLowerCase()) {
|
|
98269
|
+
return true;
|
|
98270
|
+
}
|
|
98271
|
+
const fromAdj = JSON.stringify(
|
|
98272
|
+
pair.fromElement.shapeAdjustments ?? {}
|
|
98273
|
+
);
|
|
98274
|
+
const toAdj = JSON.stringify(
|
|
98275
|
+
pair.toElement.shapeAdjustments ?? {}
|
|
98276
|
+
);
|
|
98277
|
+
return fromAdj !== toAdj;
|
|
98278
|
+
}
|
|
98279
|
+
function buildClipKeyframeBody(from, to, steps) {
|
|
98280
|
+
const [fromRing, toRing] = normalizeOutlinePair(
|
|
98281
|
+
resolveElementOutline(from),
|
|
98282
|
+
resolveElementOutline(to)
|
|
98283
|
+
);
|
|
98284
|
+
if (fromRing.length === 0 || toRing.length === 0) {
|
|
98285
|
+
return null;
|
|
98286
|
+
}
|
|
98287
|
+
const lines = [];
|
|
98288
|
+
for (let s = 0; s <= steps; s++) {
|
|
98289
|
+
const t = s / steps;
|
|
98290
|
+
const d = interpolateOutline(fromRing, toRing, t);
|
|
98291
|
+
if (!d) {
|
|
98292
|
+
return null;
|
|
98293
|
+
}
|
|
98294
|
+
const pct = Number((s / steps * 100).toFixed(2));
|
|
98295
|
+
lines.push(` ${pct}% {
|
|
98296
|
+
clip-path: path('${d}');
|
|
98297
|
+
}`);
|
|
98298
|
+
}
|
|
98299
|
+
return lines.join("\n");
|
|
98300
|
+
}
|
|
98301
|
+
function generateGeometryMorphAnimation(pair, durationMs, pairIndex, steps = GEOMETRY_MORPH_STEPS) {
|
|
98302
|
+
if (!shouldGeometryMorph(pair)) {
|
|
98303
|
+
return null;
|
|
98304
|
+
}
|
|
98305
|
+
const body = buildClipKeyframeBody(pair.fromElement, pair.toElement, steps);
|
|
98306
|
+
if (!body) {
|
|
98307
|
+
return null;
|
|
98308
|
+
}
|
|
98309
|
+
const safeName = `pptx-morph-geo-${pairIndex}-${pair.toElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
98310
|
+
const keyframes = `
|
|
98311
|
+
@keyframes ${safeName} {
|
|
98312
|
+
${body}
|
|
98313
|
+
}`;
|
|
98314
|
+
return {
|
|
98315
|
+
elementId: pair.toElement.id,
|
|
98316
|
+
animation: `${safeName} ${durationMs}ms ${MORPH_EASING} forwards`,
|
|
98317
|
+
keyframes
|
|
98318
|
+
};
|
|
98319
|
+
}
|
|
98320
|
+
function getElementMorphName(element) {
|
|
98321
|
+
if (element.name) {
|
|
98322
|
+
const name = element.name.trim();
|
|
98323
|
+
if (name.startsWith("!!")) {
|
|
98324
|
+
return name;
|
|
98325
|
+
}
|
|
98326
|
+
}
|
|
98327
|
+
if (hasTextProperties(element) && element.text) {
|
|
98328
|
+
const text2 = element.text.trim();
|
|
98329
|
+
if (text2.startsWith("!!")) {
|
|
98330
|
+
return text2;
|
|
98331
|
+
}
|
|
98332
|
+
}
|
|
98333
|
+
return void 0;
|
|
98334
|
+
}
|
|
98335
|
+
function matchMorphElementsFull(fromSlide, toSlide) {
|
|
98336
|
+
const pairs2 = [];
|
|
98337
|
+
const usedFrom = /* @__PURE__ */ new Set();
|
|
98338
|
+
const usedTo = /* @__PURE__ */ new Set();
|
|
98339
|
+
for (const fromEl of fromSlide.elements) {
|
|
98340
|
+
const fromName = getElementMorphName(fromEl);
|
|
98341
|
+
if (!fromName) {
|
|
98342
|
+
continue;
|
|
98343
|
+
}
|
|
98344
|
+
for (const toEl of toSlide.elements) {
|
|
98345
|
+
if (usedTo.has(toEl.id)) {
|
|
98346
|
+
continue;
|
|
98347
|
+
}
|
|
98348
|
+
const toName = getElementMorphName(toEl);
|
|
98349
|
+
if (toName === fromName) {
|
|
98350
|
+
pairs2.push({ fromElement: fromEl, toElement: toEl });
|
|
98351
|
+
usedFrom.add(fromEl.id);
|
|
98352
|
+
usedTo.add(toEl.id);
|
|
98353
|
+
break;
|
|
98354
|
+
}
|
|
98355
|
+
}
|
|
98356
|
+
}
|
|
98357
|
+
for (const fromEl of fromSlide.elements) {
|
|
98358
|
+
if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
|
|
98359
|
+
continue;
|
|
98360
|
+
}
|
|
98361
|
+
for (const toEl of toSlide.elements) {
|
|
98362
|
+
if (usedTo.has(toEl.id)) {
|
|
98363
|
+
continue;
|
|
98364
|
+
}
|
|
98365
|
+
if (toEl.shapeId && fromEl.shapeId === toEl.shapeId && fromEl.type === toEl.type) {
|
|
98366
|
+
pairs2.push({ fromElement: fromEl, toElement: toEl });
|
|
98367
|
+
usedFrom.add(fromEl.id);
|
|
98368
|
+
usedTo.add(toEl.id);
|
|
98369
|
+
break;
|
|
98370
|
+
}
|
|
98371
|
+
}
|
|
98372
|
+
}
|
|
98373
|
+
for (const fromEl of fromSlide.elements) {
|
|
98374
|
+
if (usedFrom.has(fromEl.id)) {
|
|
98375
|
+
continue;
|
|
98376
|
+
}
|
|
98377
|
+
let bestMatch = null;
|
|
98378
|
+
let bestDist = Infinity;
|
|
98379
|
+
for (const toEl of toSlide.elements) {
|
|
98380
|
+
if (usedTo.has(toEl.id)) {
|
|
98381
|
+
continue;
|
|
98382
|
+
}
|
|
98383
|
+
if (fromEl.type !== toEl.type) {
|
|
98384
|
+
continue;
|
|
98385
|
+
}
|
|
98386
|
+
const dx = fromEl.x - toEl.x;
|
|
98387
|
+
const dy = fromEl.y - toEl.y;
|
|
98388
|
+
const dist2 = Math.sqrt(dx * dx + dy * dy);
|
|
98389
|
+
if (dist2 < bestDist && dist2 < PROXIMITY_THRESHOLD) {
|
|
98390
|
+
bestDist = dist2;
|
|
98391
|
+
bestMatch = toEl;
|
|
98392
|
+
}
|
|
98393
|
+
}
|
|
98394
|
+
if (bestMatch) {
|
|
98395
|
+
pairs2.push({ fromElement: fromEl, toElement: bestMatch });
|
|
98396
|
+
usedFrom.add(fromEl.id);
|
|
98397
|
+
usedTo.add(bestMatch.id);
|
|
98398
|
+
}
|
|
98399
|
+
}
|
|
98400
|
+
const unmatchedFrom = fromSlide.elements.filter((el) => !usedFrom.has(el.id));
|
|
98401
|
+
const unmatchedTo = toSlide.elements.filter((el) => !usedTo.has(el.id));
|
|
98402
|
+
return { pairs: pairs2, unmatchedFrom, unmatchedTo };
|
|
98403
|
+
}
|
|
98404
|
+
function tokenizeText(element, mode) {
|
|
98405
|
+
if (!hasTextProperties(element) || !element.text) {
|
|
98406
|
+
return [];
|
|
98407
|
+
}
|
|
98408
|
+
const text2 = element.text;
|
|
98409
|
+
const style = element.textStyle;
|
|
98410
|
+
const fontSize = style?.fontSize ?? 14;
|
|
98411
|
+
const fontWeight = style?.bold ? "bold" : "normal";
|
|
98412
|
+
const color2 = style?.color ?? "#000000";
|
|
98413
|
+
const tokens = [];
|
|
98414
|
+
if (mode === "character") {
|
|
98415
|
+
const chars = Array.from(text2);
|
|
98416
|
+
const totalChars = chars.length;
|
|
98417
|
+
if (totalChars === 0) {
|
|
98418
|
+
return [];
|
|
98419
|
+
}
|
|
98420
|
+
for (let i = 0; i < chars.length; i++) {
|
|
98421
|
+
if (chars[i] === "\n") {
|
|
98422
|
+
continue;
|
|
98423
|
+
}
|
|
98424
|
+
tokens.push({
|
|
98425
|
+
text: chars[i],
|
|
98426
|
+
x: totalChars > 1 ? i / (totalChars - 1) : 0.5,
|
|
98427
|
+
y: 0.5,
|
|
98428
|
+
fontSize,
|
|
98429
|
+
fontWeight,
|
|
98430
|
+
color: color2
|
|
98431
|
+
});
|
|
98432
|
+
}
|
|
98433
|
+
} else {
|
|
98434
|
+
const words = text2.split(/\s+/u);
|
|
98435
|
+
const nonEmptyWords = words.filter((w) => w.trim().length > 0);
|
|
98436
|
+
const totalWords = nonEmptyWords.length;
|
|
98437
|
+
if (totalWords === 0) {
|
|
98438
|
+
return [];
|
|
98439
|
+
}
|
|
98440
|
+
let wordIndex = 0;
|
|
98441
|
+
for (const word of words) {
|
|
98442
|
+
if (word.trim().length === 0) {
|
|
98443
|
+
continue;
|
|
98444
|
+
}
|
|
98445
|
+
tokens.push({
|
|
98446
|
+
text: word,
|
|
98447
|
+
x: totalWords > 1 ? wordIndex / (totalWords - 1) : 0.5,
|
|
98448
|
+
y: 0.5,
|
|
98449
|
+
fontSize,
|
|
98450
|
+
fontWeight,
|
|
98451
|
+
color: color2
|
|
98452
|
+
});
|
|
98453
|
+
wordIndex++;
|
|
98454
|
+
}
|
|
98455
|
+
}
|
|
98456
|
+
return tokens;
|
|
98457
|
+
}
|
|
98458
|
+
function diffTokens(fromTokens, toTokens) {
|
|
98459
|
+
const n = fromTokens.length;
|
|
98460
|
+
const m = toTokens.length;
|
|
98461
|
+
const lcs = Array.from({ length: n + 1 }, () => new Array(m + 1).fill(0));
|
|
98462
|
+
for (let i2 = n - 1; i2 >= 0; i2--) {
|
|
98463
|
+
for (let j2 = m - 1; j2 >= 0; j2--) {
|
|
98464
|
+
lcs[i2][j2] = fromTokens[i2].text === toTokens[j2].text ? lcs[i2 + 1][j2 + 1] + 1 : Math.max(lcs[i2 + 1][j2], lcs[i2][j2 + 1]);
|
|
98465
|
+
}
|
|
98466
|
+
}
|
|
98467
|
+
const ops = [];
|
|
98468
|
+
let i = 0;
|
|
98469
|
+
let j = 0;
|
|
98470
|
+
while (i < n && j < m) {
|
|
98471
|
+
if (fromTokens[i].text === toTokens[j].text) {
|
|
98472
|
+
ops.push({
|
|
98473
|
+
change: "shared",
|
|
98474
|
+
from: fromTokens[i],
|
|
98475
|
+
to: toTokens[j],
|
|
98476
|
+
fromIndex: i,
|
|
98477
|
+
toIndex: j
|
|
98478
|
+
});
|
|
98479
|
+
i++;
|
|
98480
|
+
j++;
|
|
98481
|
+
} else if (lcs[i + 1][j] >= lcs[i][j + 1]) {
|
|
98482
|
+
ops.push({ change: "removed", from: fromTokens[i], to: null, fromIndex: i, toIndex: -1 });
|
|
98483
|
+
i++;
|
|
98484
|
+
} else {
|
|
98485
|
+
ops.push({ change: "added", from: null, to: toTokens[j], fromIndex: -1, toIndex: j });
|
|
98486
|
+
j++;
|
|
98487
|
+
}
|
|
98488
|
+
}
|
|
98489
|
+
while (i < n) {
|
|
98490
|
+
ops.push({ change: "removed", from: fromTokens[i], to: null, fromIndex: i, toIndex: -1 });
|
|
98491
|
+
i++;
|
|
98492
|
+
}
|
|
98493
|
+
while (j < m) {
|
|
98494
|
+
ops.push({ change: "added", from: null, to: toTokens[j], fromIndex: -1, toIndex: j });
|
|
98495
|
+
j++;
|
|
98496
|
+
}
|
|
98497
|
+
return ops;
|
|
98498
|
+
}
|
|
98499
|
+
function tokenColor(token2) {
|
|
98500
|
+
const parsed = parseHexColor(token2.color);
|
|
98501
|
+
return parsed ? lerpColor2(parsed, parsed, 0) : token2.color;
|
|
98502
|
+
}
|
|
98503
|
+
function sharedKeyframes(name, op) {
|
|
98504
|
+
const from = op.from;
|
|
98505
|
+
const to = op.to;
|
|
98506
|
+
return `
|
|
98507
|
+
@keyframes ${name} {
|
|
98508
|
+
from {
|
|
98509
|
+
left: ${Number((from.x * 100).toFixed(2))}%;
|
|
98510
|
+
top: ${Number((from.y * 100).toFixed(2))}%;
|
|
98511
|
+
font-size: ${from.fontSize}pt;
|
|
98512
|
+
font-weight: ${from.fontWeight};
|
|
98513
|
+
color: ${tokenColor(from)};
|
|
98514
|
+
opacity: 1;
|
|
98515
|
+
}
|
|
98516
|
+
to {
|
|
98517
|
+
left: ${Number((to.x * 100).toFixed(2))}%;
|
|
98518
|
+
top: ${Number((to.y * 100).toFixed(2))}%;
|
|
98519
|
+
font-size: ${to.fontSize}pt;
|
|
98520
|
+
font-weight: ${to.fontWeight};
|
|
98521
|
+
color: ${tokenColor(to)};
|
|
98522
|
+
opacity: 1;
|
|
98523
|
+
}
|
|
98524
|
+
}`;
|
|
98525
|
+
}
|
|
98526
|
+
function fadeKeyframes(name, fadeIn) {
|
|
98527
|
+
const a = fadeIn ? 0 : 1;
|
|
98528
|
+
const b = fadeIn ? 1 : 0;
|
|
98529
|
+
return `
|
|
98530
|
+
@keyframes ${name} {
|
|
98531
|
+
from { opacity: ${a}; }
|
|
98532
|
+
to { opacity: ${b}; }
|
|
98533
|
+
}`;
|
|
98534
|
+
}
|
|
98535
|
+
function buildTokenMorphAnimations(ops, fromId, toId, durationMs, pairIndex) {
|
|
98536
|
+
const animations = [];
|
|
98537
|
+
for (let k = 0; k < ops.length; k++) {
|
|
98538
|
+
const op = ops[k];
|
|
98539
|
+
const name = `pptx-morph-tok-${pairIndex}-${k}`;
|
|
98540
|
+
const anim = `${name} ${durationMs}ms ${MORPH_EASING} forwards`;
|
|
98541
|
+
if (op.change === "shared") {
|
|
98542
|
+
animations.push({
|
|
98543
|
+
elementId: `${toId}__token_${op.toIndex}`,
|
|
98544
|
+
animation: anim,
|
|
98545
|
+
keyframes: sharedKeyframes(name, op)
|
|
98546
|
+
});
|
|
98547
|
+
} else if (op.change === "added") {
|
|
98548
|
+
animations.push({
|
|
98549
|
+
elementId: `${toId}__token_${op.toIndex}`,
|
|
98550
|
+
animation: anim,
|
|
98551
|
+
keyframes: fadeKeyframes(name, true)
|
|
98552
|
+
});
|
|
98553
|
+
} else {
|
|
98554
|
+
animations.push({
|
|
98555
|
+
elementId: `${fromId}__token_${op.fromIndex}`,
|
|
98556
|
+
animation: anim,
|
|
98557
|
+
keyframes: fadeKeyframes(name, false)
|
|
98558
|
+
});
|
|
98559
|
+
}
|
|
98560
|
+
}
|
|
98561
|
+
return animations;
|
|
98562
|
+
}
|
|
98563
|
+
function buildColorInterpolationProps(fromElement, toElement) {
|
|
98564
|
+
const fromFill = hasShapeProperties(fromElement) ? fromElement.shapeStyle?.fillColor : void 0;
|
|
98565
|
+
const toFill = hasShapeProperties(toElement) ? toElement.shapeStyle?.fillColor : void 0;
|
|
98566
|
+
if (!fromFill && !toFill) {
|
|
98567
|
+
return null;
|
|
98568
|
+
}
|
|
98569
|
+
if (fromFill === toFill) {
|
|
98570
|
+
return null;
|
|
98571
|
+
}
|
|
98572
|
+
const fromColor = parseHexColor(fromFill);
|
|
98573
|
+
const toColor = parseHexColor(toFill);
|
|
98574
|
+
if (!fromColor && !toColor) {
|
|
98575
|
+
return null;
|
|
98576
|
+
}
|
|
98577
|
+
const from = fromColor ?? { r: 255, g: 255, b: 255, a: 0 };
|
|
98578
|
+
const to = toColor ?? { r: 255, g: 255, b: 255, a: 0 };
|
|
98579
|
+
return {
|
|
98580
|
+
fromBg: lerpColor2(from, from, 0),
|
|
98581
|
+
toBg: lerpColor2(to, to, 0)
|
|
98582
|
+
};
|
|
98583
|
+
}
|
|
98584
|
+
function buildStrokeInterpolationProps(fromElement, toElement) {
|
|
98585
|
+
const fromStyle = hasShapeProperties(fromElement) ? fromElement.shapeStyle : void 0;
|
|
98586
|
+
const toStyle = hasShapeProperties(toElement) ? toElement.shapeStyle : void 0;
|
|
98587
|
+
const fromColor = fromStyle?.strokeColor;
|
|
98588
|
+
const toColor = toStyle?.strokeColor;
|
|
98589
|
+
const fromWidth = fromStyle?.strokeWidth ?? 0;
|
|
98590
|
+
const toWidth = toStyle?.strokeWidth ?? 0;
|
|
98591
|
+
if (!fromColor && !toColor && fromWidth === 0 && toWidth === 0) {
|
|
98592
|
+
return null;
|
|
98593
|
+
}
|
|
98594
|
+
if (fromColor === toColor && fromWidth === toWidth) {
|
|
98595
|
+
return null;
|
|
98596
|
+
}
|
|
98597
|
+
const fc = parseHexColor(fromColor) ?? { r: 0, g: 0, b: 0, a: 1 };
|
|
98598
|
+
const tc = parseHexColor(toColor) ?? { r: 0, g: 0, b: 0, a: 1 };
|
|
98599
|
+
return {
|
|
98600
|
+
fromStroke: lerpColor2(fc, fc, 0),
|
|
98601
|
+
toStroke: lerpColor2(tc, tc, 0),
|
|
98602
|
+
fromWidth,
|
|
98603
|
+
toWidth
|
|
98604
|
+
};
|
|
98605
|
+
}
|
|
98606
|
+
function appearanceSignature(element) {
|
|
98607
|
+
const parts = [element.type];
|
|
98608
|
+
if (hasShapeProperties(element)) {
|
|
98609
|
+
const style = element.shapeStyle;
|
|
98610
|
+
parts.push(
|
|
98611
|
+
element.shapeType ?? "",
|
|
98612
|
+
style?.fillMode ?? "",
|
|
98613
|
+
style?.fillColor ?? "",
|
|
98614
|
+
style?.fillGradient ?? "",
|
|
98615
|
+
String(style?.fillOpacity ?? ""),
|
|
98616
|
+
style?.strokeColor ?? "",
|
|
98617
|
+
String(style?.strokeWidth ?? "")
|
|
98618
|
+
);
|
|
98619
|
+
}
|
|
98620
|
+
const image = element;
|
|
98621
|
+
parts.push(image.imagePath ?? "", image.svgPath ?? "");
|
|
98622
|
+
if (hasTextProperties(element)) {
|
|
98623
|
+
parts.push(element.text ?? "", element.textStyle?.color ?? "");
|
|
98624
|
+
}
|
|
98625
|
+
return parts.join("");
|
|
98626
|
+
}
|
|
98627
|
+
function morphPairNeedsCrossfade(fromElement, toElement) {
|
|
98628
|
+
return appearanceSignature(fromElement) !== appearanceSignature(toElement);
|
|
98629
|
+
}
|
|
98630
|
+
function generateMorphAnimations(pairs2, durationMs, _mode = "object") {
|
|
98631
|
+
const animations = [];
|
|
98632
|
+
for (let index = 0; index < pairs2.length; index++) {
|
|
98633
|
+
const { fromElement, toElement } = pairs2[index];
|
|
98634
|
+
const safeName = `pptx-morph-${index}-${toElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
98635
|
+
const dx = fromElement.x - toElement.x;
|
|
98636
|
+
const dy = fromElement.y - toElement.y;
|
|
98637
|
+
const sx = Math.max(fromElement.width, 1) / Math.max(toElement.width, 1);
|
|
98638
|
+
const sy = Math.max(fromElement.height, 1) / Math.max(toElement.height, 1);
|
|
98639
|
+
const dr = (fromElement.rotation ?? 0) - (toElement.rotation ?? 0);
|
|
98640
|
+
const fromOpacity = fromElement.opacity ?? 1;
|
|
98641
|
+
const toOpacity = toElement.opacity ?? 1;
|
|
98642
|
+
const crossfades = morphPairNeedsCrossfade(fromElement, toElement);
|
|
98643
|
+
const fromProps = [
|
|
98644
|
+
` transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${dr}deg);`,
|
|
98645
|
+
` opacity: ${crossfades ? 0 : fromOpacity};`
|
|
98646
|
+
];
|
|
98647
|
+
const toProps = [
|
|
98648
|
+
" transform: translate(0, 0) scale(1, 1) rotate(0deg);",
|
|
98649
|
+
` opacity: ${toOpacity};`
|
|
98650
|
+
];
|
|
98651
|
+
const colorInterp = buildColorInterpolationProps(fromElement, toElement);
|
|
98652
|
+
if (colorInterp) {
|
|
98653
|
+
fromProps.push(` background-color: ${colorInterp.fromBg};`);
|
|
98654
|
+
toProps.push(` background-color: ${colorInterp.toBg};`);
|
|
98655
|
+
}
|
|
98656
|
+
const strokeInterp = buildStrokeInterpolationProps(fromElement, toElement);
|
|
98657
|
+
if (strokeInterp) {
|
|
98658
|
+
fromProps.push(` outline: ${strokeInterp.fromWidth}px solid ${strokeInterp.fromStroke};`);
|
|
98659
|
+
toProps.push(` outline: ${strokeInterp.toWidth}px solid ${strokeInterp.toStroke};`);
|
|
98660
|
+
}
|
|
98661
|
+
const keyframes = `
|
|
98662
|
+
@keyframes ${safeName} {
|
|
98663
|
+
from {
|
|
98664
|
+
${fromProps.join("\n")}
|
|
98665
|
+
}
|
|
98666
|
+
to {
|
|
98667
|
+
${toProps.join("\n")}
|
|
98668
|
+
}
|
|
98669
|
+
}`;
|
|
98670
|
+
animations.push({
|
|
98671
|
+
elementId: toElement.id,
|
|
98672
|
+
animation: `${safeName} ${durationMs}ms ${MORPH_EASING} forwards`,
|
|
98673
|
+
keyframes
|
|
98674
|
+
});
|
|
98675
|
+
}
|
|
98676
|
+
return animations;
|
|
98677
|
+
}
|
|
98678
|
+
function generateMorphGhostAnimations(pairs2, durationMs, startIndex) {
|
|
98679
|
+
const animations = [];
|
|
98680
|
+
for (let index = 0; index < pairs2.length; index++) {
|
|
98681
|
+
const { fromElement, toElement } = pairs2[index];
|
|
98682
|
+
const fadesOut = morphPairNeedsCrossfade(fromElement, toElement);
|
|
98683
|
+
const safeName = `pptx-morph-ghost-${startIndex + index}-${fromElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
98684
|
+
const dx = toElement.x - fromElement.x;
|
|
98685
|
+
const dy = toElement.y - fromElement.y;
|
|
98686
|
+
const sx = Math.max(toElement.width, 1) / Math.max(fromElement.width, 1);
|
|
98687
|
+
const sy = Math.max(toElement.height, 1) / Math.max(fromElement.height, 1);
|
|
98688
|
+
const dr = (toElement.rotation ?? 0) - (fromElement.rotation ?? 0);
|
|
98689
|
+
const originX = fromElement.x + fromElement.width / 2;
|
|
98690
|
+
const originY = fromElement.y + fromElement.height / 2;
|
|
98691
|
+
const keyframes = `
|
|
98692
|
+
@keyframes ${safeName} {
|
|
98693
|
+
from {
|
|
98694
|
+
transform-origin: ${originX}px ${originY}px;
|
|
98695
|
+
transform: translate(0, 0) scale(1, 1) rotate(0deg);
|
|
98696
|
+
opacity: ${fromElement.opacity ?? 1};
|
|
98697
|
+
}
|
|
98698
|
+
to {
|
|
98699
|
+
transform-origin: ${originX}px ${originY}px;
|
|
98700
|
+
transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${dr}deg);
|
|
98701
|
+
opacity: ${fadesOut ? 0 : fromElement.opacity ?? 1};
|
|
98702
|
+
}
|
|
98703
|
+
}`;
|
|
98704
|
+
animations.push({
|
|
98705
|
+
elementId: fromElement.id,
|
|
98706
|
+
animation: `${safeName} ${durationMs}ms ${MORPH_EASING} forwards`,
|
|
98707
|
+
keyframes
|
|
98708
|
+
});
|
|
98709
|
+
}
|
|
98710
|
+
return animations;
|
|
98711
|
+
}
|
|
98712
|
+
function generateUnmatchedFadeOutAnimations(elements, durationMs, startIndex) {
|
|
98713
|
+
return elements.map((el, i) => {
|
|
98714
|
+
const safeName = `pptx-morph-fadeout-${startIndex + i}-${el.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
98715
|
+
const keyframes = `
|
|
98716
|
+
@keyframes ${safeName} {
|
|
98717
|
+
from {
|
|
98718
|
+
opacity: ${el.opacity ?? 1};
|
|
98719
|
+
transform: scale(1);
|
|
98720
|
+
}
|
|
98721
|
+
to {
|
|
98722
|
+
opacity: 0;
|
|
98723
|
+
transform: scale(0.95);
|
|
98724
|
+
}
|
|
98725
|
+
}`;
|
|
98726
|
+
return {
|
|
98727
|
+
elementId: el.id,
|
|
98728
|
+
animation: `${safeName} ${durationMs}ms ${MORPH_EASING} forwards`,
|
|
98729
|
+
keyframes
|
|
98730
|
+
};
|
|
98731
|
+
});
|
|
98732
|
+
}
|
|
98733
|
+
function generateUnmatchedFadeInAnimations(elements, durationMs, startIndex) {
|
|
98734
|
+
return elements.map((el, i) => {
|
|
98735
|
+
const safeName = `pptx-morph-fadein-${startIndex + i}-${el.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
98736
|
+
const keyframes = `
|
|
98737
|
+
@keyframes ${safeName} {
|
|
98738
|
+
from {
|
|
98739
|
+
opacity: 0;
|
|
98740
|
+
transform: scale(0.95);
|
|
98741
|
+
}
|
|
98742
|
+
to {
|
|
98743
|
+
opacity: ${el.opacity ?? 1};
|
|
98744
|
+
transform: scale(1);
|
|
98745
|
+
}
|
|
98746
|
+
}`;
|
|
98747
|
+
return {
|
|
98748
|
+
elementId: el.id,
|
|
98749
|
+
animation: `${safeName} ${durationMs}ms ${MORPH_EASING} forwards`,
|
|
98750
|
+
keyframes
|
|
98751
|
+
};
|
|
98752
|
+
});
|
|
98753
|
+
}
|
|
98754
|
+
function generateTextMorphAnimations(pair, durationMs, mode, pairIndex) {
|
|
98755
|
+
const fromTokens = tokenizeText(pair.fromElement, mode);
|
|
98756
|
+
const toTokens = tokenizeText(pair.toElement, mode);
|
|
98757
|
+
if (fromTokens.length === 0 && toTokens.length === 0) {
|
|
98758
|
+
return [];
|
|
98759
|
+
}
|
|
98760
|
+
const ops = diffTokens(fromTokens, toTokens);
|
|
98761
|
+
return buildTokenMorphAnimations(
|
|
98762
|
+
ops,
|
|
98763
|
+
pair.fromElement.id,
|
|
98764
|
+
pair.toElement.id,
|
|
98765
|
+
durationMs,
|
|
98766
|
+
pairIndex
|
|
98767
|
+
);
|
|
98768
|
+
}
|
|
98769
|
+
function generateFullMorphTransition(fromSlide, toSlide, durationMs, mode = "object") {
|
|
98770
|
+
const matchResult = matchMorphElementsFull(fromSlide, toSlide);
|
|
98771
|
+
const allAnimations = [];
|
|
98772
|
+
const pairAnims = generateMorphAnimations(matchResult.pairs, durationMs, mode);
|
|
98773
|
+
allAnimations.push(...pairAnims);
|
|
98774
|
+
for (let i = 0; i < matchResult.pairs.length; i++) {
|
|
98775
|
+
const geo = generateGeometryMorphAnimation(matchResult.pairs[i], durationMs, i);
|
|
98776
|
+
if (geo) {
|
|
98777
|
+
allAnimations.push(geo);
|
|
98778
|
+
}
|
|
98779
|
+
}
|
|
98780
|
+
if (mode === "word" || mode === "character") {
|
|
98781
|
+
for (let i = 0; i < matchResult.pairs.length; i++) {
|
|
98782
|
+
const pair = matchResult.pairs[i];
|
|
98783
|
+
if (hasTextProperties(pair.fromElement) && hasTextProperties(pair.toElement)) {
|
|
98784
|
+
const textAnims = generateTextMorphAnimations(pair, durationMs, mode, i);
|
|
98785
|
+
allAnimations.push(...textAnims);
|
|
98786
|
+
}
|
|
98787
|
+
}
|
|
98788
|
+
}
|
|
98789
|
+
const ghosts = generateMorphGhostAnimations(matchResult.pairs, durationMs, pairAnims.length);
|
|
98790
|
+
allAnimations.push(...ghosts);
|
|
98791
|
+
const fadeOuts = generateUnmatchedFadeOutAnimations(
|
|
98792
|
+
matchResult.unmatchedFrom,
|
|
98793
|
+
durationMs,
|
|
98794
|
+
pairAnims.length + ghosts.length
|
|
98795
|
+
);
|
|
98796
|
+
allAnimations.push(...fadeOuts);
|
|
98797
|
+
const fadeIns = generateUnmatchedFadeInAnimations(
|
|
98798
|
+
matchResult.unmatchedTo,
|
|
98799
|
+
durationMs,
|
|
98800
|
+
pairAnims.length + ghosts.length + fadeOuts.length
|
|
98801
|
+
);
|
|
98802
|
+
allAnimations.push(...fadeIns);
|
|
98803
|
+
return allAnimations;
|
|
98804
|
+
}
|
|
98805
|
+
function morphOptionToMode(option) {
|
|
98806
|
+
if (option === "byWord") {
|
|
98807
|
+
return "word";
|
|
98808
|
+
}
|
|
98809
|
+
if (option === "byChar") {
|
|
98810
|
+
return "character";
|
|
98811
|
+
}
|
|
98812
|
+
return "object";
|
|
98813
|
+
}
|
|
98814
|
+
function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object") {
|
|
98815
|
+
if (!fromSlide || !toSlide) {
|
|
98816
|
+
return void 0;
|
|
98817
|
+
}
|
|
98818
|
+
const match = matchMorphElementsFull(fromSlide, toSlide);
|
|
98819
|
+
if (match.pairs.length === 0 && match.unmatchedFrom.length === 0 && match.unmatchedTo.length === 0) {
|
|
98820
|
+
return void 0;
|
|
98821
|
+
}
|
|
98822
|
+
const animations = generateFullMorphTransition(fromSlide, toSlide, durationMs, mode);
|
|
98823
|
+
const outgoingElements = [...fromSlide.elements];
|
|
98824
|
+
const outgoingIds = new Set(outgoingElements.map((element) => element.id));
|
|
98825
|
+
const incomingAnimations = /* @__PURE__ */ new Map();
|
|
98826
|
+
const outgoingAnimations = /* @__PURE__ */ new Map();
|
|
98827
|
+
const keyframes = [];
|
|
98828
|
+
for (const animation of animations) {
|
|
98829
|
+
keyframes.push(animation.keyframes);
|
|
98830
|
+
if (outgoingIds.has(animation.elementId)) {
|
|
98831
|
+
outgoingAnimations.set(animation.elementId, animation.animation);
|
|
98832
|
+
} else {
|
|
98833
|
+
incomingAnimations.set(animation.elementId, animation.animation);
|
|
98834
|
+
}
|
|
98835
|
+
}
|
|
98836
|
+
return {
|
|
98837
|
+
keyframesCss: keyframes.join("\n"),
|
|
98838
|
+
incomingAnimations,
|
|
98839
|
+
outgoingAnimations,
|
|
98840
|
+
outgoingElements,
|
|
98841
|
+
durationMs
|
|
98842
|
+
};
|
|
98843
|
+
}
|
|
97944
98844
|
function hexToRgb6(hex10) {
|
|
97945
98845
|
const clean = hex10.replace(/^#/u, "");
|
|
97946
98846
|
return {
|
|
@@ -109715,4 +110615,4 @@ function segmentFrameCount(durationMs, fps) {
|
|
|
109715
110615
|
* `<p:extLst>` (optional)
|
|
109716
110616
|
*/
|
|
109717
110617
|
|
|
109718
|
-
export { ACTION_BUTTON_PRESETS, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BROADCAST_THROTTLE_MS, CATEGORIES, COLOR_MAP_ALIAS_KEYS, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_INSERT_CHART_TYPE, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, EQUATION_TEMPLATES, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LOCAL_SYNC_ORIGIN, MOBILE_BREAKPOINT, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, PATTERN_OPTIONS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESETS, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHORTCUT_REFERENCE_ITEMS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_VIRTUALIZATION_THRESHOLD, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, THEME_CATALOG, THEME_COLOR_LABELS, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, WEBM_MIME_CANDIDATES, acceptsPresentationInput, activateModalFocus, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, alignElements, appendPresentationInkPoint, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFormatToElement, applyPreferenceToOptions, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, availableQuickAccessCommands, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDuotoneCacheKey, buildElementClipboardPayload, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildSummaryZoomView, buildTextBody3DSceneStyle, buildTextBuildSpec, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canvasToJpegData, cell3DBevelCss, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampUnitInterval2 as clampUnitInterval, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, computeAllNotesPages, computeAutoFitTextStyle, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPresentationKeyBuffer, createPresentationSessionId, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, demoteSmartArtNode, derivePresenceList, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, encodeGif, endAudienceDisplay, erasePresentationInkAt, evaluatePresetShape, extractPathPoints, filterCommands, findChartPartTarget, findSmartArtNodeText, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLinkedTextBoxSegments, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeFilterId, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCalloutShape, isCellInRect, isEditableTextElement, isExportAbortError, isFirstSlide, isImageLikeElement, isInkElement, isKeyboardOpen, isLastSlide, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationSessionMessage, isTemplateElement, isTemplateElementId2 as isTemplateElementId, isUrlSafe, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, makeCloneId, makeSlideId, mapPresentationKey, mayLeaveSlideShow, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mobileElapsedSince, mobileSlideCounter, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, ooxmlGradientAngleToCssDegrees, openPptxFile, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parseMediaCommand, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationInkPath, presenterElapsed, presenterPaneAdvancesOnClick, pressuresToWidths, printPropertiesFrameSlides, printPropertiesSlidesPerPage, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, reResolveSlideColors, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, remapTextToSegments, removeQuickAccessCommand, removeSmartArtNode, renameSection, reorderSmartArtNode, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveAudienceScreenPlacement, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveFontForScript, resolveFontRefIdx, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveLineHeight, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, resolveViewerAddinRows, restoreSegmentSelection, revealedSmartArtNodeCount, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setPendingSelectionRestore, setSmartArtNodeStyle, shadeColor2, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storeAudienceContent, substituteFieldText, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, textBuildSpanStyle, themeColorSchemesEqual, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, togglePresenterTimer, transformTextCase, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml, updateSmartArtNodeText, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, withChartPointValue, withChartTitle, withFrameSlides, withSlidesPerPage, writeStoredViewerPrefs };
|
|
110618
|
+
export { ACTION_BUTTON_PRESETS, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BROADCAST_THROTTLE_MS, CATEGORIES, COLOR_MAP_ALIAS_KEYS, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_INSERT_CHART_TYPE, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, EQUATION_TEMPLATES, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LOCAL_SYNC_ORIGIN, MOBILE_BREAKPOINT, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, PATTERN_OPTIONS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESETS, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHORTCUT_REFERENCE_ITEMS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_VIRTUALIZATION_THRESHOLD, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, THEME_CATALOG, THEME_COLOR_LABELS, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, WEBM_MIME_CANDIDATES, acceptsPresentationInput, activateModalFocus, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, alignElements, appendPresentationInkPoint, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFormatToElement, applyPreferenceToOptions, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, availableQuickAccessCommands, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDuotoneCacheKey, buildElementClipboardPayload, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMorphTransitionPlan, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildSummaryZoomView, buildTextBody3DSceneStyle, buildTextBuildSpec, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canvasToJpegData, cell3DBevelCss, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampUnitInterval2 as clampUnitInterval, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, computeAllNotesPages, computeAutoFitTextStyle, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPresentationKeyBuffer, createPresentationSessionId, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, demoteSmartArtNode, derivePresenceList, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, encodeGif, endAudienceDisplay, erasePresentationInkAt, evaluatePresetShape, extractPathPoints, filterCommands, findChartPartTarget, findSmartArtNodeText, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLinkedTextBoxSegments, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeFilterId, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCalloutShape, isCellInRect, isEditableTextElement, isExportAbortError, isFirstSlide, isImageLikeElement, isInkElement, isKeyboardOpen, isLastSlide, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationSessionMessage, isTemplateElement, isTemplateElementId2 as isTemplateElementId, isUrlSafe, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, makeCloneId, makeSlideId, mapPresentationKey, mayLeaveSlideShow, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, ooxmlGradientAngleToCssDegrees, openPptxFile, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parseMediaCommand, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationInkPath, presenterElapsed, presenterPaneAdvancesOnClick, pressuresToWidths, printPropertiesFrameSlides, printPropertiesSlidesPerPage, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, reResolveSlideColors, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, remapTextToSegments, removeQuickAccessCommand, removeSmartArtNode, renameSection, reorderSmartArtNode, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveAudienceScreenPlacement, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveFontForScript, resolveFontRefIdx, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveLineHeight, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolveParagraphStrutFontSize, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, resolveViewerAddinRows, restoreSegmentSelection, revealedSmartArtNodeCount, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setPendingSelectionRestore, setSmartArtNodeStyle, shadeColor2, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storeAudienceContent, substituteFieldText, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, textBuildSpanStyle, themeColorSchemesEqual, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, togglePresenterTimer, transformTextCase, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml, updateSmartArtNodeText, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, withChartPointValue, withChartTitle, withFrameSlides, withSlidesPerPage, writeStoredViewerPrefs };
|