pptx-react-viewer 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/{AiChatPanel-NQZBZIRM.mjs → AiChatPanel-KZX4NZ5R.mjs} +4 -4
- package/dist/AiChatPanel-KZX4NZ5R.mjs.br +0 -0
- package/dist/AiChatPanel-KZX4NZ5R.mjs.gz +0 -0
- package/dist/{AiChatPanel-3Q4STA5E.js → AiChatPanel-M7RSMOZV.js} +25 -25
- package/dist/AiChatPanel-M7RSMOZV.js.br +0 -0
- package/dist/AiChatPanel-M7RSMOZV.js.gz +0 -0
- package/dist/{Area3DChartScene-THLG74CM.js → Area3DChartScene-7AYWOGBC.js} +2 -2
- package/dist/Area3DChartScene-7AYWOGBC.js.br +0 -0
- package/dist/Area3DChartScene-7AYWOGBC.js.gz +0 -0
- package/dist/{Area3DChartScene-7PARQDOZ.mjs → Area3DChartScene-AD6BO2VM.mjs} +1 -1
- package/dist/Area3DChartScene-AD6BO2VM.mjs.br +3 -0
- package/dist/Area3DChartScene-AD6BO2VM.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-OLZ2V56I.js → Bar3DChartScene-FWKMBT4O.js} +2 -2
- package/dist/Bar3DChartScene-FWKMBT4O.js.br +0 -0
- package/dist/Bar3DChartScene-FWKMBT4O.js.gz +0 -0
- package/dist/{Bar3DChartScene-QUU6RUXM.mjs → Bar3DChartScene-JOGF3C5E.mjs} +1 -1
- package/dist/Bar3DChartScene-JOGF3C5E.mjs.br +0 -0
- package/dist/Bar3DChartScene-JOGF3C5E.mjs.gz +0 -0
- package/dist/{Line3DChartScene-D77ORA4K.mjs → Line3DChartScene-ADORAAXV.mjs} +1 -1
- package/dist/Line3DChartScene-ADORAAXV.mjs.br +3 -0
- package/dist/Line3DChartScene-ADORAAXV.mjs.gz +0 -0
- package/dist/{Line3DChartScene-2VZS52IB.js → Line3DChartScene-X2BJNGIK.js} +2 -2
- package/dist/Line3DChartScene-X2BJNGIK.js.br +0 -0
- package/dist/Line3DChartScene-X2BJNGIK.js.gz +0 -0
- package/dist/{Model3DScene-3WCALTXO.js → Model3DScene-KSZHZAVD.js} +2 -2
- package/dist/Model3DScene-KSZHZAVD.js.br +0 -0
- package/dist/Model3DScene-KSZHZAVD.js.gz +0 -0
- package/dist/{Model3DScene-ZEGWNILH.mjs → Model3DScene-RORDMQ6Q.mjs} +1 -1
- package/dist/Model3DScene-RORDMQ6Q.mjs.br +0 -0
- package/dist/Model3DScene-RORDMQ6Q.mjs.gz +0 -0
- package/dist/{PieChart3DScene-7C3ACGKN.js → PieChart3DScene-BXMI7U2X.js} +2 -2
- package/dist/PieChart3DScene-BXMI7U2X.js.br +0 -0
- package/dist/PieChart3DScene-BXMI7U2X.js.gz +0 -0
- package/dist/{PieChart3DScene-DGD4PZVV.mjs → PieChart3DScene-IXJHU3MI.mjs} +1 -1
- package/dist/PieChart3DScene-IXJHU3MI.mjs.br +0 -0
- package/dist/PieChart3DScene-IXJHU3MI.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-QGH3OLJV.mjs → SurfaceChart3DScene-SJ2IDLP6.mjs} +1 -1
- package/dist/SurfaceChart3DScene-SJ2IDLP6.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-SJ2IDLP6.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-SJPQGGGE.js → SurfaceChart3DScene-TTBGVNYL.js} +2 -2
- package/dist/SurfaceChart3DScene-TTBGVNYL.js.br +0 -0
- package/dist/SurfaceChart3DScene-TTBGVNYL.js.gz +0 -0
- package/dist/{chunk-SFMATKNJ.mjs → chunk-24XC5C2B.mjs} +2 -2
- package/dist/chunk-24XC5C2B.mjs.br +0 -0
- package/dist/chunk-24XC5C2B.mjs.gz +0 -0
- package/dist/{chunk-XBTHWXNO.js → chunk-AEP6X24D.js} +169 -169
- package/dist/chunk-AEP6X24D.js.br +0 -0
- package/dist/chunk-AEP6X24D.js.gz +0 -0
- package/dist/{chunk-PCW2KT7Z.js → chunk-AU5YFUUK.js} +155 -27
- package/dist/chunk-AU5YFUUK.js.br +0 -0
- package/dist/chunk-AU5YFUUK.js.gz +0 -0
- package/dist/{chunk-MSUUPLQ7.mjs → chunk-C7ZSRYF4.mjs} +76 -26
- package/dist/chunk-C7ZSRYF4.mjs.br +0 -0
- package/dist/chunk-C7ZSRYF4.mjs.gz +0 -0
- package/dist/{chunk-L5MRKDRM.mjs → chunk-DUC32SQJ.mjs} +75 -20
- package/dist/chunk-DUC32SQJ.mjs.br +0 -0
- package/dist/chunk-DUC32SQJ.mjs.gz +0 -0
- package/dist/{chunk-TJNG5VEK.js → chunk-HCTJCUGP.js} +501 -451
- package/dist/chunk-HCTJCUGP.js.br +0 -0
- package/dist/chunk-HCTJCUGP.js.gz +0 -0
- package/dist/{chunk-XWUMM2TX.mjs → chunk-JCJ3EPG6.mjs} +1 -0
- package/dist/chunk-JCJ3EPG6.mjs.br +0 -0
- package/dist/chunk-JCJ3EPG6.mjs.gz +0 -0
- package/dist/{chunk-KY6JQJXK.js → chunk-JTS7AZYQ.js} +5 -5
- package/dist/chunk-JTS7AZYQ.js.br +0 -0
- package/dist/chunk-JTS7AZYQ.js.gz +0 -0
- package/dist/{chunk-UNIJUD5C.js → chunk-UTIMT5CZ.js} +1 -0
- package/dist/chunk-UTIMT5CZ.js.br +0 -0
- package/dist/chunk-UTIMT5CZ.js.gz +0 -0
- package/dist/{chunk-C4WTQIC6.mjs → chunk-X6OJYCTW.mjs} +1 -1
- package/dist/chunk-X6OJYCTW.mjs.br +0 -0
- package/dist/chunk-X6OJYCTW.mjs.gz +0 -0
- package/dist/{chunk-B7WAGQW4.mjs → chunk-X7L3RHFQ.mjs} +153 -28
- package/dist/chunk-X7L3RHFQ.mjs.br +0 -0
- package/dist/chunk-X7L3RHFQ.mjs.gz +0 -0
- package/dist/{chunk-7E6SM42A.js → chunk-XSHYXVPD.js} +1233 -1178
- package/dist/chunk-XSHYXVPD.js.br +0 -0
- package/dist/chunk-XSHYXVPD.js.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +22 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-3Q4STA5E.js.br +0 -0
- package/dist/AiChatPanel-3Q4STA5E.js.gz +0 -0
- package/dist/AiChatPanel-NQZBZIRM.mjs.br +0 -0
- package/dist/AiChatPanel-NQZBZIRM.mjs.gz +0 -0
- package/dist/Area3DChartScene-7PARQDOZ.mjs.br +0 -3
- package/dist/Area3DChartScene-7PARQDOZ.mjs.gz +0 -0
- package/dist/Area3DChartScene-THLG74CM.js.br +0 -0
- package/dist/Area3DChartScene-THLG74CM.js.gz +0 -0
- package/dist/Bar3DChartScene-OLZ2V56I.js.br +0 -2
- package/dist/Bar3DChartScene-OLZ2V56I.js.gz +0 -0
- package/dist/Bar3DChartScene-QUU6RUXM.mjs.br +0 -0
- package/dist/Bar3DChartScene-QUU6RUXM.mjs.gz +0 -0
- package/dist/Line3DChartScene-2VZS52IB.js.br +0 -0
- package/dist/Line3DChartScene-2VZS52IB.js.gz +0 -0
- package/dist/Line3DChartScene-D77ORA4K.mjs.br +0 -3
- package/dist/Line3DChartScene-D77ORA4K.mjs.gz +0 -0
- package/dist/Model3DScene-3WCALTXO.js.br +0 -0
- package/dist/Model3DScene-3WCALTXO.js.gz +0 -0
- package/dist/Model3DScene-ZEGWNILH.mjs.br +0 -0
- package/dist/Model3DScene-ZEGWNILH.mjs.gz +0 -0
- package/dist/PieChart3DScene-7C3ACGKN.js.br +0 -0
- package/dist/PieChart3DScene-7C3ACGKN.js.gz +0 -0
- package/dist/PieChart3DScene-DGD4PZVV.mjs.br +0 -0
- package/dist/PieChart3DScene-DGD4PZVV.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-QGH3OLJV.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-QGH3OLJV.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-SJPQGGGE.js.br +0 -0
- package/dist/SurfaceChart3DScene-SJPQGGGE.js.gz +0 -0
- package/dist/chunk-7E6SM42A.js.br +0 -0
- package/dist/chunk-7E6SM42A.js.gz +0 -0
- package/dist/chunk-B7WAGQW4.mjs.br +0 -0
- package/dist/chunk-B7WAGQW4.mjs.gz +0 -0
- package/dist/chunk-C4WTQIC6.mjs.br +0 -0
- package/dist/chunk-C4WTQIC6.mjs.gz +0 -0
- package/dist/chunk-KY6JQJXK.js.br +0 -0
- package/dist/chunk-KY6JQJXK.js.gz +0 -0
- package/dist/chunk-L5MRKDRM.mjs.br +0 -0
- package/dist/chunk-L5MRKDRM.mjs.gz +0 -0
- package/dist/chunk-MSUUPLQ7.mjs.br +0 -0
- package/dist/chunk-MSUUPLQ7.mjs.gz +0 -0
- package/dist/chunk-PCW2KT7Z.js.br +0 -0
- package/dist/chunk-PCW2KT7Z.js.gz +0 -0
- package/dist/chunk-SFMATKNJ.mjs.br +0 -0
- package/dist/chunk-SFMATKNJ.mjs.gz +0 -0
- package/dist/chunk-TJNG5VEK.js.br +0 -0
- package/dist/chunk-TJNG5VEK.js.gz +0 -0
- package/dist/chunk-UNIJUD5C.js.br +0 -0
- package/dist/chunk-UNIJUD5C.js.gz +0 -0
- package/dist/chunk-XBTHWXNO.js.br +0 -0
- package/dist/chunk-XBTHWXNO.js.gz +0 -0
- package/dist/chunk-XWUMM2TX.mjs.br +0 -0
- package/dist/chunk-XWUMM2TX.mjs.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -7621,6 +7621,23 @@ function orderedPathCommandEntries(path, ensureArray18) {
|
|
|
7621
7621
|
return index < items.length ? [[key2, items[index]]] : [];
|
|
7622
7622
|
});
|
|
7623
7623
|
}
|
|
7624
|
+
function inheritCustomGeometryCommandOrder(target, ...sources) {
|
|
7625
|
+
let targetSignature;
|
|
7626
|
+
for (const source of sources) {
|
|
7627
|
+
if (!source) {
|
|
7628
|
+
continue;
|
|
7629
|
+
}
|
|
7630
|
+
const order = commandOrder.get(source);
|
|
7631
|
+
if (!order) {
|
|
7632
|
+
continue;
|
|
7633
|
+
}
|
|
7634
|
+
targetSignature ??= pathSignature(target);
|
|
7635
|
+
if (orderSignature(order) === targetSignature) {
|
|
7636
|
+
commandOrder.set(target, [...order]);
|
|
7637
|
+
return;
|
|
7638
|
+
}
|
|
7639
|
+
}
|
|
7640
|
+
}
|
|
7624
7641
|
function orderedXmlKey(baseName, order) {
|
|
7625
7642
|
return `${baseName}${ORDER_SUFFIX}${order}`;
|
|
7626
7643
|
}
|
|
@@ -21654,7 +21671,8 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
21654
21671
|
const existingBg = cSld["p:bg"];
|
|
21655
21672
|
const existingBgPr = existingBg?.["p:bgPr"];
|
|
21656
21673
|
const existingHasBlipFill = existingBgPr?.["a:blipFill"] !== void 0;
|
|
21657
|
-
|
|
21674
|
+
const backgroundImageUnchangedFromAuthored = init.authoredBackground === void 0 || rawBackgroundImage === (init.authoredBackground.image ?? "");
|
|
21675
|
+
if (!hasDataUrlBackgroundImage && existingHasBlipFill && backgroundImageUnchangedFromAuthored) {
|
|
21658
21676
|
this.reorderCSldBgFirst(cSld, existingBg);
|
|
21659
21677
|
init.slideNode["p:cSld"] = cSld;
|
|
21660
21678
|
return;
|
|
@@ -35995,6 +36013,14 @@ function reResolveSlideColors(slides, oldColorMap, newColorScheme) {
|
|
|
35995
36013
|
}
|
|
35996
36014
|
return slides.map((slide) => remapSlideColors(slide, remap));
|
|
35997
36015
|
}
|
|
36016
|
+
function reResolveElementColors(elements2, oldColorMap, newColorScheme) {
|
|
36017
|
+
const newMap = buildThemeColorMap(newColorScheme);
|
|
36018
|
+
const remap = buildColorRemapTable(oldColorMap, newMap);
|
|
36019
|
+
if (remap.size === 0) {
|
|
36020
|
+
return elements2;
|
|
36021
|
+
}
|
|
36022
|
+
return elements2.map((el) => remapElementColors(el, remap));
|
|
36023
|
+
}
|
|
35998
36024
|
function applyThemeToData(data, newColorScheme, newFontScheme, themeName) {
|
|
35999
36025
|
const oldColorMap = data.themeColorMap ?? {};
|
|
36000
36026
|
const newColorMap = buildThemeColorMap(newColorScheme);
|
|
@@ -52226,13 +52252,22 @@ function mergeXmlObjects(base, override, depth = 0) {
|
|
|
52226
52252
|
return void 0;
|
|
52227
52253
|
}
|
|
52228
52254
|
if (!base) {
|
|
52229
|
-
|
|
52255
|
+
if (!override) {
|
|
52256
|
+
return void 0;
|
|
52257
|
+
}
|
|
52258
|
+
const merged2 = { ...override };
|
|
52259
|
+
inheritCustomGeometryCommandOrder(merged2, override);
|
|
52260
|
+
return merged2;
|
|
52230
52261
|
}
|
|
52231
52262
|
if (!override) {
|
|
52232
|
-
|
|
52263
|
+
const merged2 = { ...base };
|
|
52264
|
+
inheritCustomGeometryCommandOrder(merged2, base);
|
|
52265
|
+
return merged2;
|
|
52233
52266
|
}
|
|
52234
52267
|
if (depth > MAX_MERGE_DEPTH) {
|
|
52235
|
-
|
|
52268
|
+
const merged2 = { ...base, ...override };
|
|
52269
|
+
inheritCustomGeometryCommandOrder(merged2, override, base);
|
|
52270
|
+
return merged2;
|
|
52236
52271
|
}
|
|
52237
52272
|
const merged = { ...base };
|
|
52238
52273
|
for (const [key2, value] of Object.entries(override)) {
|
|
@@ -52245,6 +52280,7 @@ function mergeXmlObjects(base, override, depth = 0) {
|
|
|
52245
52280
|
merged[key2] = value;
|
|
52246
52281
|
}
|
|
52247
52282
|
}
|
|
52283
|
+
inheritCustomGeometryCommandOrder(merged, override, base);
|
|
52248
52284
|
return merged;
|
|
52249
52285
|
}
|
|
52250
52286
|
var RELATIONSHIPS_NS = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
@@ -72456,6 +72492,9 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime17 extends PptxHandlerRuntim
|
|
|
72456
72492
|
if (slide.showMasterPhAnim !== void 0) {
|
|
72457
72493
|
slideNode["@_showMasterPhAnim"] = slide.showMasterPhAnim ? "1" : "0";
|
|
72458
72494
|
}
|
|
72495
|
+
if (slide.showMasterShapes !== void 0) {
|
|
72496
|
+
slideNode["@_showMasterSp"] = slide.showMasterShapes ? "1" : "0";
|
|
72497
|
+
}
|
|
72459
72498
|
slideNode["p:clrMapOvr"] = buildClrMapOverrideXml(slide.clrMapOverride);
|
|
72460
72499
|
const spTree = this.ensureSlideTree(xmlObj);
|
|
72461
72500
|
writeCommonSlideDataName(slideNode["p:cSld"], slide.name);
|
|
@@ -123204,6 +123243,9 @@ function elementLockTogglePatch(shouldLock) {
|
|
|
123204
123243
|
function filterInteractableIds(ids, lookup, interaction) {
|
|
123205
123244
|
return ids.filter((id) => canInteractWithElement(lookup(id), interaction));
|
|
123206
123245
|
}
|
|
123246
|
+
function shouldShowElementHandles(isEditableCanvas, isSelected, selectedCount) {
|
|
123247
|
+
return isEditableCanvas && isSelected && selectedCount <= 1;
|
|
123248
|
+
}
|
|
123207
123249
|
function getImageFitStyle(el) {
|
|
123208
123250
|
const uncropped = {
|
|
123209
123251
|
width: "100%",
|
|
@@ -125107,6 +125149,7 @@ var translationsEn = {
|
|
|
125107
125149
|
"pptx.slideBackground.backgroundPreview": "Background preview",
|
|
125108
125150
|
"pptx.slideBackground.removeBackgroundImage": "Remove background image",
|
|
125109
125151
|
"pptx.slideBackground.clearBackground": "Clear Background",
|
|
125152
|
+
"pptx.slideBackground.hideBackgroundGraphics": "Hide Background Graphics",
|
|
125110
125153
|
"pptx.presentationSettings.showType": "Show type",
|
|
125111
125154
|
"pptx.presentationSettings.showTypePresented": "Presented",
|
|
125112
125155
|
"pptx.presentationSettings.showTypeBrowsed": "Browsed",
|
|
@@ -136525,6 +136568,102 @@ var CINEMATIC_TRANSITION_KEYFRAMES = `
|
|
|
136525
136568
|
@keyframes pptx-tr-origami-out { 0% { transform: perspective(1400px) rotateX(0deg) translateY(0) scale(1); transform-origin: top center; opacity: 1; filter: brightness(1); } 45% { transform: perspective(1400px) rotateX(-52deg) translateY(2%) scale(.96); transform-origin: top center; opacity: 1; filter: brightness(.82); } 70% { transform: perspective(1400px) rotateX(-84deg) translateY(8%) scale(.88); transform-origin: top center; opacity: .8; filter: brightness(.68); } 100% { transform: perspective(1400px) rotateX(-125deg) translateY(30%) scale(.68); transform-origin: top center; opacity: 0; filter: brightness(.55); } }
|
|
136526
136569
|
@keyframes pptx-tr-origami-in { 0% { transform: perspective(1400px) rotateX(62deg) scale(.94); transform-origin: bottom center; opacity: 0; filter: brightness(.7); } 30% { transform: perspective(1400px) rotateX(62deg) scale(.94); transform-origin: bottom center; opacity: .65; filter: brightness(.75); } 100% { transform: perspective(1400px) rotateX(0deg) scale(1); transform-origin: bottom center; opacity: 1; filter: brightness(1); } }
|
|
136527
136570
|
`;
|
|
136571
|
+
var WIPE_MASK_KEYFRAMES = `
|
|
136572
|
+
/* \u2500\u2500 Wipe (soft mask reveal) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
136573
|
+
/* PowerPoint feathers the wipe edge with a WIDE, smooth gradient - the fade
|
|
136574
|
+
* zone spans roughly a slide width in real renders, not a narrow band. The
|
|
136575
|
+
* incoming layer is masked with a 3x-oversized gradient (fade zone = one slide
|
|
136576
|
+
* width) whose position sweeps it across the slide; the band fully exits both
|
|
136577
|
+
* edges, so the start is fully hidden and the end fully opaque. */
|
|
136578
|
+
@keyframes pptx-tr-wipe-from-left {
|
|
136579
|
+
from {
|
|
136580
|
+
-webkit-mask-image: linear-gradient(to right, #000 33.3%, transparent 66.7%);
|
|
136581
|
+
-webkit-mask-size: 300% 100%;
|
|
136582
|
+
-webkit-mask-repeat: no-repeat;
|
|
136583
|
+
-webkit-mask-position: 100% 0;
|
|
136584
|
+
mask-image: linear-gradient(to right, #000 33.3%, transparent 66.7%);
|
|
136585
|
+
mask-size: 300% 100%;
|
|
136586
|
+
mask-repeat: no-repeat;
|
|
136587
|
+
mask-position: 100% 0;
|
|
136588
|
+
}
|
|
136589
|
+
to {
|
|
136590
|
+
-webkit-mask-image: linear-gradient(to right, #000 33.3%, transparent 66.7%);
|
|
136591
|
+
-webkit-mask-size: 300% 100%;
|
|
136592
|
+
-webkit-mask-repeat: no-repeat;
|
|
136593
|
+
-webkit-mask-position: 0% 0;
|
|
136594
|
+
mask-image: linear-gradient(to right, #000 33.3%, transparent 66.7%);
|
|
136595
|
+
mask-size: 300% 100%;
|
|
136596
|
+
mask-repeat: no-repeat;
|
|
136597
|
+
mask-position: 0% 0;
|
|
136598
|
+
}
|
|
136599
|
+
}
|
|
136600
|
+
@keyframes pptx-tr-wipe-from-right {
|
|
136601
|
+
from {
|
|
136602
|
+
-webkit-mask-image: linear-gradient(to left, #000 33.3%, transparent 66.7%);
|
|
136603
|
+
-webkit-mask-size: 300% 100%;
|
|
136604
|
+
-webkit-mask-repeat: no-repeat;
|
|
136605
|
+
-webkit-mask-position: 0% 0;
|
|
136606
|
+
mask-image: linear-gradient(to left, #000 33.3%, transparent 66.7%);
|
|
136607
|
+
mask-size: 300% 100%;
|
|
136608
|
+
mask-repeat: no-repeat;
|
|
136609
|
+
mask-position: 0% 0;
|
|
136610
|
+
}
|
|
136611
|
+
to {
|
|
136612
|
+
-webkit-mask-image: linear-gradient(to left, #000 33.3%, transparent 66.7%);
|
|
136613
|
+
-webkit-mask-size: 300% 100%;
|
|
136614
|
+
-webkit-mask-repeat: no-repeat;
|
|
136615
|
+
-webkit-mask-position: 100% 0;
|
|
136616
|
+
mask-image: linear-gradient(to left, #000 33.3%, transparent 66.7%);
|
|
136617
|
+
mask-size: 300% 100%;
|
|
136618
|
+
mask-repeat: no-repeat;
|
|
136619
|
+
mask-position: 100% 0;
|
|
136620
|
+
}
|
|
136621
|
+
}
|
|
136622
|
+
@keyframes pptx-tr-wipe-from-top {
|
|
136623
|
+
from {
|
|
136624
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 33.3%, transparent 66.7%);
|
|
136625
|
+
-webkit-mask-size: 100% 300%;
|
|
136626
|
+
-webkit-mask-repeat: no-repeat;
|
|
136627
|
+
-webkit-mask-position: 0 100%;
|
|
136628
|
+
mask-image: linear-gradient(to bottom, #000 33.3%, transparent 66.7%);
|
|
136629
|
+
mask-size: 100% 300%;
|
|
136630
|
+
mask-repeat: no-repeat;
|
|
136631
|
+
mask-position: 0 100%;
|
|
136632
|
+
}
|
|
136633
|
+
to {
|
|
136634
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 33.3%, transparent 66.7%);
|
|
136635
|
+
-webkit-mask-size: 100% 300%;
|
|
136636
|
+
-webkit-mask-repeat: no-repeat;
|
|
136637
|
+
-webkit-mask-position: 0 0%;
|
|
136638
|
+
mask-image: linear-gradient(to bottom, #000 33.3%, transparent 66.7%);
|
|
136639
|
+
mask-size: 100% 300%;
|
|
136640
|
+
mask-repeat: no-repeat;
|
|
136641
|
+
mask-position: 0 0%;
|
|
136642
|
+
}
|
|
136643
|
+
}
|
|
136644
|
+
@keyframes pptx-tr-wipe-from-bottom {
|
|
136645
|
+
from {
|
|
136646
|
+
-webkit-mask-image: linear-gradient(to top, #000 33.3%, transparent 66.7%);
|
|
136647
|
+
-webkit-mask-size: 100% 300%;
|
|
136648
|
+
-webkit-mask-repeat: no-repeat;
|
|
136649
|
+
-webkit-mask-position: 0 0%;
|
|
136650
|
+
mask-image: linear-gradient(to top, #000 33.3%, transparent 66.7%);
|
|
136651
|
+
mask-size: 100% 300%;
|
|
136652
|
+
mask-repeat: no-repeat;
|
|
136653
|
+
mask-position: 0 0%;
|
|
136654
|
+
}
|
|
136655
|
+
to {
|
|
136656
|
+
-webkit-mask-image: linear-gradient(to top, #000 33.3%, transparent 66.7%);
|
|
136657
|
+
-webkit-mask-size: 100% 300%;
|
|
136658
|
+
-webkit-mask-repeat: no-repeat;
|
|
136659
|
+
-webkit-mask-position: 0 100%;
|
|
136660
|
+
mask-image: linear-gradient(to top, #000 33.3%, transparent 66.7%);
|
|
136661
|
+
mask-size: 100% 300%;
|
|
136662
|
+
mask-repeat: no-repeat;
|
|
136663
|
+
mask-position: 0 100%;
|
|
136664
|
+
}
|
|
136665
|
+
}
|
|
136666
|
+
`;
|
|
136528
136667
|
var CORE_SLIDE_TRANSITION_KEYFRAMES = `
|
|
136529
136668
|
/* \u2500\u2500 Fade \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
136530
136669
|
@keyframes pptx-tr-fade-in {
|
|
@@ -136638,24 +136777,6 @@ var CORE_SLIDE_TRANSITION_KEYFRAMES = `
|
|
|
136638
136777
|
to { transform: translate(100%, 100%); }
|
|
136639
136778
|
}
|
|
136640
136779
|
|
|
136641
|
-
/* \u2500\u2500 Wipe (clip-path reveal) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
136642
|
-
@keyframes pptx-tr-wipe-from-left {
|
|
136643
|
-
from { clip-path: inset(0 100% 0 0); }
|
|
136644
|
-
to { clip-path: inset(0 0 0 0); }
|
|
136645
|
-
}
|
|
136646
|
-
@keyframes pptx-tr-wipe-from-right {
|
|
136647
|
-
from { clip-path: inset(0 0 0 100%); }
|
|
136648
|
-
to { clip-path: inset(0 0 0 0); }
|
|
136649
|
-
}
|
|
136650
|
-
@keyframes pptx-tr-wipe-from-top {
|
|
136651
|
-
from { clip-path: inset(0 0 100% 0); }
|
|
136652
|
-
to { clip-path: inset(0 0 0 0); }
|
|
136653
|
-
}
|
|
136654
|
-
@keyframes pptx-tr-wipe-from-bottom {
|
|
136655
|
-
from { clip-path: inset(100% 0 0 0); }
|
|
136656
|
-
to { clip-path: inset(0 0 0 0); }
|
|
136657
|
-
}
|
|
136658
|
-
|
|
136659
136780
|
/* \u2500\u2500 Split \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
136660
136781
|
@keyframes pptx-tr-split-h-out {
|
|
136661
136782
|
from { clip-path: inset(0 50%); }
|
|
@@ -136789,6 +136910,7 @@ var CORE_SLIDE_TRANSITION_KEYFRAMES = `
|
|
|
136789
136910
|
}
|
|
136790
136911
|
`;
|
|
136791
136912
|
var SLIDE_TRANSITION_KEYFRAMES = `${CORE_SLIDE_TRANSITION_KEYFRAMES}
|
|
136913
|
+
${WIPE_MASK_KEYFRAMES}
|
|
136792
136914
|
${P14_TRANSITION_KEYFRAMES_ALL}
|
|
136793
136915
|
${CINEMATIC_TRANSITION_KEYFRAMES}`;
|
|
136794
136916
|
function resolveLR(direction) {
|
|
@@ -137069,10 +137191,10 @@ function getSlideTransitionAnimations(type, durationMs, direction, orient, spoke
|
|
|
137069
137191
|
case "wipe": {
|
|
137070
137192
|
const dir = resolveDirection(direction, "left");
|
|
137071
137193
|
const wipeNames = {
|
|
137072
|
-
left: `pptx-tr-wipe-from-
|
|
137073
|
-
right: `pptx-tr-wipe-from-
|
|
137074
|
-
up: `pptx-tr-wipe-from-
|
|
137075
|
-
down: `pptx-tr-wipe-from-
|
|
137194
|
+
left: `pptx-tr-wipe-from-right ${dur} ${EASE} forwards`,
|
|
137195
|
+
right: `pptx-tr-wipe-from-left ${dur} ${EASE} forwards`,
|
|
137196
|
+
up: `pptx-tr-wipe-from-bottom ${dur} ${EASE} forwards`,
|
|
137197
|
+
down: `pptx-tr-wipe-from-top ${dur} ${EASE} forwards`
|
|
137076
137198
|
};
|
|
137077
137199
|
return {
|
|
137078
137200
|
outgoing: "none",
|
|
@@ -149004,6 +149126,9 @@ function resolveTemplateBackgroundRows(activeSlide, slideMasters, fallbackLayout
|
|
|
149004
149126
|
}
|
|
149005
149127
|
return result;
|
|
149006
149128
|
}
|
|
149129
|
+
function visibleTemplateElements(slide, templateElements) {
|
|
149130
|
+
return slide?.showMasterShapes === false ? [] : templateElements;
|
|
149131
|
+
}
|
|
149007
149132
|
function partitionTemplateElements(slides) {
|
|
149008
149133
|
const templateElementsBySlideId = {};
|
|
149009
149134
|
const nextSlides = slides.map((slide) => {
|
|
@@ -149025,7 +149150,7 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
|
|
|
149025
149150
|
var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
|
|
149026
149151
|
function buildPreviewElements(slide, templateElements = [], options) {
|
|
149027
149152
|
const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
|
|
149028
|
-
const merged = [...templateElements, ...slide.elements];
|
|
149153
|
+
const merged = [...visibleTemplateElements(slide, templateElements), ...slide.elements];
|
|
149029
149154
|
if (cap > 0 && merged.length > cap) {
|
|
149030
149155
|
return merged.slice(0, cap);
|
|
149031
149156
|
}
|
|
@@ -155083,6 +155208,7 @@ exports.publishLiveInlineText = publishLiveInlineText;
|
|
|
155083
155208
|
exports.pushRecentColor = pushRecentColor;
|
|
155084
155209
|
exports.quickStyleSwatchCss = quickStyleSwatchCss;
|
|
155085
155210
|
exports.radarStylePatch = radarStylePatch;
|
|
155211
|
+
exports.reResolveElementColors = reResolveElementColors;
|
|
155086
155212
|
exports.reResolveSlideColors = reResolveSlideColors;
|
|
155087
155213
|
exports.readBackstageRecentFile = readBackstageRecentFile;
|
|
155088
155214
|
exports.readOnlyRecommendation = readOnlyRecommendation;
|
|
@@ -155233,6 +155359,7 @@ exports.shouldLoopContinuously = shouldLoopContinuously;
|
|
|
155233
155359
|
exports.shouldProbeAutosaveRecovery = shouldProbeAutosaveRecovery;
|
|
155234
155360
|
exports.shouldRoomSlidesReplaceLoad = shouldRoomSlidesReplaceLoad;
|
|
155235
155361
|
exports.shouldShowAutosaveRecoveryPrompt = shouldShowAutosaveRecoveryPrompt;
|
|
155362
|
+
exports.shouldShowElementHandles = shouldShowElementHandles;
|
|
155236
155363
|
exports.shouldUseSvgWarp = shouldUseSvgWarp;
|
|
155237
155364
|
exports.shouldWriteAutosaveSnapshot = shouldWriteAutosaveSnapshot;
|
|
155238
155365
|
exports.siblingCount = siblingCount;
|
|
@@ -155298,6 +155425,7 @@ exports.vermilionRadius = vermilionRadius;
|
|
|
155298
155425
|
exports.viewPropertiesPatchFromPreferences = viewPropertiesPatchFromPreferences;
|
|
155299
155426
|
exports.viewerOptionsToPreferences = viewerOptionsToPreferences;
|
|
155300
155427
|
exports.viewerPreferencesFromViewProperties = viewerPreferencesFromViewProperties;
|
|
155428
|
+
exports.visibleTemplateElements = visibleTemplateElements;
|
|
155301
155429
|
exports.warpPreviewPath = warpPreviewPath;
|
|
155302
155430
|
exports.withChartTitle = withChartTitle;
|
|
155303
155431
|
exports.withConnectorEndpointUpdate = withConnectorEndpointUpdate;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-
|
|
2
|
-
import { DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, cancelBuildReveal, PresentationAnimationController, scheduleAutoAdvanceChain, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, hasShapeProperties,
|
|
3
|
-
import { translationsEn } from './chunk-
|
|
1
|
+
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-24XC5C2B.mjs';
|
|
2
|
+
import { DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, cancelBuildReveal, PresentationAnimationController, scheduleAutoAdvanceChain, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, hasTextProperties, remapTextToSegments, updateMasterViewElement, isTemplateElementId, updateElement, hasShapeProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, downloadBlob, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, embeddedFontSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, collectReferencedFontFamilies, resolveGoogleWebfontHref, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, isActionHidden, resolveInlineEditAutoFitHeight, canInteractWithElement, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, safeOpenUrl, toggleStageElementMedia, resolveOleVerbTarget, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, ACTION_BUTTON_PRESETS, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset } from './chunk-X7L3RHFQ.mjs';
|
|
3
|
+
import { translationsEn } from './chunk-JCJ3EPG6.mjs';
|
|
4
4
|
import { createContext, useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect, useContext, useImperativeHandle, useSyncExternalStore } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
@@ -3612,7 +3612,9 @@ function useDerivedElementState(input) {
|
|
|
3612
3612
|
if (!activeSlide) {
|
|
3613
3613
|
return [];
|
|
3614
3614
|
}
|
|
3615
|
-
return
|
|
3615
|
+
return [
|
|
3616
|
+
...visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
|
|
3617
|
+
];
|
|
3616
3618
|
}, [activeSlide, templateElementsBySlideId]);
|
|
3617
3619
|
const activeMaster = slideMasters[activeMasterIndex];
|
|
3618
3620
|
const activeLayout = useMemo(
|
|
@@ -4334,8 +4336,23 @@ function useElementOperations(input) {
|
|
|
4334
4336
|
setSelectedElementId,
|
|
4335
4337
|
setSelectedElementIds,
|
|
4336
4338
|
setInlineEditingElementId,
|
|
4337
|
-
setContextMenuState
|
|
4339
|
+
setContextMenuState,
|
|
4340
|
+
inlineEditingElementId,
|
|
4341
|
+
inlineEditingText
|
|
4338
4342
|
} = input;
|
|
4343
|
+
const liveTextSegments = useCallback(() => {
|
|
4344
|
+
if (!selectedElement || !hasTextProperties(selectedElement)) {
|
|
4345
|
+
return void 0;
|
|
4346
|
+
}
|
|
4347
|
+
if (selectedElement.id !== inlineEditingElementId) {
|
|
4348
|
+
return selectedElement.textSegments;
|
|
4349
|
+
}
|
|
4350
|
+
return remapTextToSegments(
|
|
4351
|
+
inlineEditingText,
|
|
4352
|
+
selectedElement.textSegments,
|
|
4353
|
+
selectedElement.textStyle
|
|
4354
|
+
);
|
|
4355
|
+
}, [selectedElement, inlineEditingElementId, inlineEditingText]);
|
|
4339
4356
|
const applySelection = useCallback(
|
|
4340
4357
|
(primaryId, ids = []) => {
|
|
4341
4358
|
setSelectedElementId(primaryId);
|
|
@@ -4425,60 +4442,78 @@ function useElementOperations(input) {
|
|
|
4425
4442
|
if (!selectedElement || !hasTextProperties(selectedElement)) {
|
|
4426
4443
|
return;
|
|
4427
4444
|
}
|
|
4428
|
-
const
|
|
4429
|
-
|
|
4445
|
+
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
4446
|
+
const currentSegments = liveTextSegments();
|
|
4447
|
+
const inlineSel = getInlineEditorSelection(currentSegments);
|
|
4448
|
+
if (inlineSel && currentSegments) {
|
|
4430
4449
|
const { newSegments: newSegments2, newSelection } = applyStyleToSelectedSegments(
|
|
4431
|
-
|
|
4450
|
+
currentSegments,
|
|
4432
4451
|
inlineSel,
|
|
4433
4452
|
updates
|
|
4434
4453
|
);
|
|
4435
4454
|
setPendingSelectionRestore(newSelection);
|
|
4436
4455
|
updateSelectedElement({
|
|
4437
|
-
textSegments: newSegments2
|
|
4456
|
+
textSegments: newSegments2,
|
|
4457
|
+
...isLiveEditing ? { text: inlineEditingText } : {}
|
|
4438
4458
|
});
|
|
4439
4459
|
return;
|
|
4440
4460
|
}
|
|
4441
4461
|
const newTextStyle = { ...selectedElement.textStyle, ...updates };
|
|
4442
|
-
const newSegments =
|
|
4462
|
+
const newSegments = currentSegments?.map((seg) => ({
|
|
4443
4463
|
...seg,
|
|
4444
4464
|
style: { ...seg.style, ...updates }
|
|
4445
4465
|
}));
|
|
4446
4466
|
updateSelectedElement({
|
|
4447
4467
|
textStyle: newTextStyle,
|
|
4448
|
-
textSegments: newSegments
|
|
4468
|
+
textSegments: newSegments,
|
|
4469
|
+
...isLiveEditing ? { text: inlineEditingText } : {}
|
|
4449
4470
|
});
|
|
4450
4471
|
},
|
|
4451
|
-
[
|
|
4472
|
+
[
|
|
4473
|
+
selectedElement,
|
|
4474
|
+
updateSelectedElement,
|
|
4475
|
+
inlineEditingElementId,
|
|
4476
|
+
inlineEditingText,
|
|
4477
|
+
liveTextSegments
|
|
4478
|
+
]
|
|
4452
4479
|
);
|
|
4453
4480
|
const updateSelectedTextCase = useCallback(
|
|
4454
4481
|
(mode) => {
|
|
4455
4482
|
if (!selectedElement || !hasTextProperties(selectedElement)) {
|
|
4456
4483
|
return;
|
|
4457
4484
|
}
|
|
4458
|
-
const
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4485
|
+
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
4486
|
+
const currentSegments = liveTextSegments();
|
|
4487
|
+
const inlineSel = getInlineEditorSelection(currentSegments);
|
|
4488
|
+
if (inlineSel && currentSegments) {
|
|
4489
|
+
const newSegments = applyCaseTransformToSegments(currentSegments, inlineSel, mode);
|
|
4490
|
+
updateSelectedElement({
|
|
4491
|
+
textSegments: newSegments,
|
|
4492
|
+
...isLiveEditing ? { text: inlineEditingText } : {}
|
|
4493
|
+
});
|
|
4466
4494
|
return;
|
|
4467
4495
|
}
|
|
4468
4496
|
const updates = {};
|
|
4469
|
-
if (
|
|
4497
|
+
if (currentSegments && currentSegments.length > 0) {
|
|
4470
4498
|
updates.textSegments = applyCaseTransformToSegments(
|
|
4471
|
-
|
|
4499
|
+
currentSegments,
|
|
4472
4500
|
null,
|
|
4473
4501
|
mode
|
|
4474
4502
|
);
|
|
4475
4503
|
}
|
|
4476
|
-
|
|
4477
|
-
|
|
4504
|
+
const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
|
|
4505
|
+
if (typeof baseText === "string") {
|
|
4506
|
+
updates.text = transformTextCase(baseText, mode);
|
|
4478
4507
|
}
|
|
4479
4508
|
updateSelectedElement(updates);
|
|
4480
4509
|
},
|
|
4481
|
-
[
|
|
4510
|
+
[
|
|
4511
|
+
selectedElement,
|
|
4512
|
+
updateSelectedElement,
|
|
4513
|
+
inlineEditingElementId,
|
|
4514
|
+
inlineEditingText,
|
|
4515
|
+
liveTextSegments
|
|
4516
|
+
]
|
|
4482
4517
|
);
|
|
4483
4518
|
const updateSlides = useCallback(
|
|
4484
4519
|
(updater) => {
|
|
@@ -7867,6 +7902,8 @@ function useThemeHandlers(input) {
|
|
|
7867
7902
|
slideMasters,
|
|
7868
7903
|
history,
|
|
7869
7904
|
setSlides,
|
|
7905
|
+
templateElementsBySlideId,
|
|
7906
|
+
setTemplateElementsBySlideId,
|
|
7870
7907
|
theme,
|
|
7871
7908
|
bumpHistory
|
|
7872
7909
|
} = input;
|
|
@@ -7902,6 +7939,15 @@ function useThemeHandlers(input) {
|
|
|
7902
7939
|
await handler.updateThemeColorScheme(colorScheme);
|
|
7903
7940
|
const previousMap = theme?.colorScheme ? buildThemeColorMap(theme.colorScheme) : {};
|
|
7904
7941
|
setSlides((prev) => reResolveSlideColors(prev, previousMap, colorScheme));
|
|
7942
|
+
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
7943
|
+
setTemplateElementsBySlideId((prev) => {
|
|
7944
|
+
const next = {};
|
|
7945
|
+
for (const [slideId, elements] of Object.entries(prev)) {
|
|
7946
|
+
next[slideId] = reResolveElementColors(elements, previousMap, colorScheme);
|
|
7947
|
+
}
|
|
7948
|
+
return next;
|
|
7949
|
+
});
|
|
7950
|
+
}
|
|
7905
7951
|
setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
|
|
7906
7952
|
bumpHistory();
|
|
7907
7953
|
history.markDirty();
|
|
@@ -9024,7 +9070,9 @@ function useEditorOperations(input) {
|
|
|
9024
9070
|
setSelectedElementId: state.setSelectedElementId,
|
|
9025
9071
|
setSelectedElementIds: state.setSelectedElementIds,
|
|
9026
9072
|
setInlineEditingElementId: state.setInlineEditingElementId,
|
|
9027
|
-
setContextMenuState: state.setContextMenuState
|
|
9073
|
+
setContextMenuState: state.setContextMenuState,
|
|
9074
|
+
inlineEditingElementId: state.inlineEditingElementId,
|
|
9075
|
+
inlineEditingText: state.inlineEditingText
|
|
9028
9076
|
});
|
|
9029
9077
|
const sectionOps = useSectionOperations({
|
|
9030
9078
|
sections: state.sections,
|
|
@@ -9280,6 +9328,8 @@ function useIOHandlers(input) {
|
|
|
9280
9328
|
slideMasters: state.slideMasters,
|
|
9281
9329
|
history,
|
|
9282
9330
|
setSlides: state.setSlides,
|
|
9331
|
+
templateElementsBySlideId: state.templateElementsBySlideId,
|
|
9332
|
+
setTemplateElementsBySlideId: state.setTemplateElementsBySlideId,
|
|
9283
9333
|
theme: state.theme,
|
|
9284
9334
|
bumpHistory: () => state.setPointerCommitNonce((n) => n + 1)
|
|
9285
9335
|
});
|
|
Binary file
|
|
Binary file
|