ooxml-ui 1.42.0 → 1.43.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/dist/chart/design-galleries.d.ts +1 -0
- package/dist/chart/format-pane-types.d.ts +1 -0
- package/dist/chart/format-pane-view.d.ts +1 -0
- package/dist/chrome/status-bar.d.ts +2 -0
- package/dist/chrome/status-bar.d.ts.map +1 -1
- package/dist/{chunk-4RFFOPBU.js → chunk-2ZYRZANE.js} +1 -1
- package/dist/{chunk-Y6KY34VD.js → chunk-I57TCM2Q.js} +57 -11
- package/dist/{chunk-TTT5IQBU.js → chunk-JWBWLGEY.js} +2 -2
- package/dist/{chunk-LBIABP4I.js → chunk-M4ARYL3L.js} +1 -1
- package/dist/{chunk-7L4NP4HN.js → chunk-NH5ZSZMI.js} +1 -1
- package/dist/controls.d.ts +1 -0
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/dialog/message-dialogs.d.ts.map +1 -1
- package/dist/docx/locales/en-app.d.ts +5 -0
- package/dist/docx/locales/en.d.ts +5 -0
- package/dist/docx/localization-strings.d.ts +5 -0
- package/dist/docx/title-bar.d.ts +2 -1
- package/dist/docx.js +40 -11
- package/dist/files/save-progress-label.d.ts +23 -0
- package/dist/files/save-progress-label.d.ts.map +1 -0
- package/dist/index.js +4 -4
- package/dist/picture-effects.d.ts +1 -0
- package/dist/picture-view.d.ts +1 -0
- package/dist/pptx/{chunk-C7G2CSU2.mjs → chunk-5BINBXFV.mjs} +1 -1
- package/dist/pptx/{chunk-OPLK7GPB.mjs → chunk-7FTP7OOA.mjs} +714 -414
- package/dist/pptx/{chunk-RI4YZ4AG.cjs → chunk-P4NVINSK.cjs} +721 -416
- package/dist/pptx/{chunk-XTYRGVT5.cjs → chunk-UGSMMZU6.cjs} +42 -42
- package/dist/pptx/{chunk-SF3MYUTD.mjs → chunk-W2QJX2ON.mjs} +5 -0
- package/dist/pptx/{chunk-WNDGU3GQ.cjs → chunk-ZHVKGGLQ.cjs} +5 -0
- package/dist/pptx/dom/index.cjs +388 -388
- package/dist/pptx/dom/index.mjs +6 -6
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3108 -3088
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/controller/index.d.ts +2 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/controller/save-progress-controller.d.ts +56 -0
- package/dist/pptx/render/controller/save-progress-controller.d.ts.map +1 -0
- package/dist/pptx/render/embedded-fonts-sheet.d.ts +25 -0
- package/dist/pptx/render/embedded-fonts-sheet.d.ts.map +1 -0
- package/dist/pptx/render/font-line-gap.d.ts +21 -0
- package/dist/pptx/render/font-line-gap.d.ts.map +1 -0
- package/dist/pptx/render/font-settled.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/morph-plan-carry.d.ts +41 -0
- package/dist/pptx/render/morph-plan-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-channels.d.ts +30 -0
- package/dist/pptx/render/morph-plan-channels.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-crossfade.d.ts +23 -0
- package/dist/pptx/render/morph-plan-crossfade.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-css.d.ts +62 -0
- package/dist/pptx/render/morph-plan-css.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-lift.d.ts +44 -0
- package/dist/pptx/render/morph-plan-lift.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-overlay.d.ts +62 -0
- package/dist/pptx/render/morph-plan-overlay.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-types.d.ts +208 -0
- package/dist/pptx/render/morph-plan-types.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan.d.ts +4 -252
- package/dist/pptx/render/morph-plan.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-baseline.d.ts +6 -0
- package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -1
- package/dist/pptx/render/status-bar-state.d.ts +7 -1
- package/dist/pptx/render/status-bar-state.d.ts.map +1 -1
- package/dist/pptx/render/text-field-substitution.d.ts +13 -14
- package/dist/pptx/render/text-field-substitution.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-AE7D4I7L.mjs → smartart-insert-preview-DXFDFDSC.mjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-P4NV2FRD.cjs → smartart-insert-preview-UP6DYY42.cjs} +4 -4
- package/dist/pptx/web-components/status-bar.d.ts.map +1 -1
- package/dist/teams.js +2 -2
- package/dist/theme-bridge.d.ts +1 -0
- package/dist/theme.d.ts +1 -0
- package/dist/visio/title-bar.d.ts +3 -1
- package/dist/visio/viewer-backstage.d.ts +2 -0
- package/dist/visio/viewer-file-commands.d.ts +2 -2
- package/dist/visio.js +75 -20
- package/dist/xlsx/editor-files.d.ts +1 -1
- package/dist/xlsx/title-bar.d.ts +2 -1
- package/dist/xlsx.js +21 -12
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
|
23
23
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
24
24
|
var chunkXZSGVMRN_cjs = require('./chunk-XZSGVMRN.cjs');
|
|
25
25
|
var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
|
|
26
|
-
var
|
|
26
|
+
var chunkZHVKGGLQ_cjs = require('./chunk-ZHVKGGLQ.cjs');
|
|
27
27
|
var chunk3RIGT7H6_cjs = require('./chunk-3RIGT7H6.cjs');
|
|
28
28
|
var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
|
|
29
29
|
var pptx = require('ooxml-core/pptx');
|
|
@@ -2542,14 +2542,14 @@ function tileAlignmentPercentages(alignment) {
|
|
|
2542
2542
|
const point = geometry.pictureTileAlignment(alignment);
|
|
2543
2543
|
return { x: point.x * 100, y: point.y * 100 };
|
|
2544
2544
|
}
|
|
2545
|
-
function tileAxisPosition(
|
|
2545
|
+
function tileAxisPosition(percent6, offsetPx) {
|
|
2546
2546
|
if (offsetPx === 0) {
|
|
2547
|
-
return `${
|
|
2547
|
+
return `${percent6}%`;
|
|
2548
2548
|
}
|
|
2549
|
-
if (
|
|
2549
|
+
if (percent6 === 0) {
|
|
2550
2550
|
return `${offsetPx}px`;
|
|
2551
2551
|
}
|
|
2552
|
-
return `calc(${
|
|
2552
|
+
return `calc(${percent6}% + ${offsetPx}px)`;
|
|
2553
2553
|
}
|
|
2554
2554
|
function buildMirrorTiledBackground(src, flip, scaleX, scaleY, nativeSize) {
|
|
2555
2555
|
if (!src.startsWith("data:")) {
|
|
@@ -17011,10 +17011,10 @@ function createAttributeTransformModel(anim, box) {
|
|
|
17011
17011
|
}
|
|
17012
17012
|
|
|
17013
17013
|
// src/pptx/render/animation-transform-keyframes.ts
|
|
17014
|
-
function slideOffset(
|
|
17014
|
+
function slideOffset(percent6, axis, origin) {
|
|
17015
17015
|
const fallback = axis === "w" ? "1280px" : "720px";
|
|
17016
17016
|
const varName = origin === "parent" ? `--pptx-parent-${axis}` : `--pptx-slide-${axis}`;
|
|
17017
|
-
return `calc(var(${varName}, ${fallback}) * ${(
|
|
17017
|
+
return `calc(var(${varName}, ${fallback}) * ${(percent6 / 100).toFixed(4)})`;
|
|
17018
17018
|
}
|
|
17019
17019
|
function hasRotation(anim) {
|
|
17020
17020
|
return anim.rotationBy !== void 0 || anim.rotationFrom !== void 0 || anim.rotationTo !== void 0;
|
|
@@ -20975,10 +20975,10 @@ function buildMotionPathKeyframes(args) {
|
|
|
20975
20975
|
return void 0;
|
|
20976
20976
|
}
|
|
20977
20977
|
const frames = points.map((point, index) => {
|
|
20978
|
-
const
|
|
20978
|
+
const percent6 = Math.round(index / (points.length - 1) * 100);
|
|
20979
20979
|
const x = trimNumber(point.x * args.slideWidth);
|
|
20980
20980
|
const y = trimNumber(point.y * args.slideHeight);
|
|
20981
|
-
return ` ${
|
|
20981
|
+
return ` ${percent6}% { transform: translate(${x}px, ${y}px); }`;
|
|
20982
20982
|
});
|
|
20983
20983
|
return {
|
|
20984
20984
|
keyframeName: args.keyframeName,
|
|
@@ -26740,72 +26740,30 @@ function formatLocalizedDateTimeField(type, date, locale) {
|
|
|
26740
26740
|
function resolveDisplaySlideNumber(slideNumber, firstSlideNumber = 1) {
|
|
26741
26741
|
return slideNumber < 1 ? slideNumber : firstSlideNumber + slideNumber - 1;
|
|
26742
26742
|
}
|
|
26743
|
-
|
|
26744
|
-
datetime1: "M/d/yyyy",
|
|
26745
|
-
datetime2: "EEEE, MMMM d, yyyy",
|
|
26746
|
-
datetime3: "d MMMM yyyy",
|
|
26747
|
-
datetime4: "MMMM d, yyyy",
|
|
26748
|
-
datetime5: "dd-MMM-yy",
|
|
26749
|
-
datetime6: "MMMM yy",
|
|
26750
|
-
datetime7: "MMM-yy",
|
|
26751
|
-
datetime8: "M/d/yyyy h:mm a",
|
|
26752
|
-
datetime9: "M/d/yyyy h:mm:ss a",
|
|
26753
|
-
datetime10: "H:mm",
|
|
26754
|
-
datetime11: "H:mm:ss",
|
|
26755
|
-
datetime12: "h:mm a",
|
|
26756
|
-
datetime13: "h:mm:ss a"
|
|
26757
|
-
};
|
|
26758
|
-
function monthNames(locale, style) {
|
|
26759
|
-
const formatter = new Intl.DateTimeFormat(locale ?? "en-US", { month: style });
|
|
26760
|
-
return Array.from({ length: 12 }, (_, month) => formatter.format(new Date(2e3, month, 1)));
|
|
26761
|
-
}
|
|
26762
|
-
function weekdayNames(locale, style) {
|
|
26763
|
-
const formatter = new Intl.DateTimeFormat(locale ?? "en-US", { weekday: style });
|
|
26764
|
-
return Array.from({ length: 7 }, (_, day) => formatter.format(new Date(2023, 0, 1 + day)));
|
|
26765
|
-
}
|
|
26766
|
-
function formatDateWithPattern(date, pattern, locale) {
|
|
26767
|
-
const months = monthNames(locale, "long");
|
|
26768
|
-
const monthsShort = monthNames(locale, "short");
|
|
26769
|
-
const days = weekdayNames(locale, "long");
|
|
26770
|
-
const daysShort = weekdayNames(locale, "short");
|
|
26771
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
26772
|
-
const h12 = (h) => h === 0 ? 12 : h > 12 ? h - 12 : h;
|
|
26773
|
-
const hours = date.getHours();
|
|
26774
|
-
let result = pattern;
|
|
26775
|
-
result = result.replace(/yyyy/gu, String(date.getFullYear()));
|
|
26776
|
-
result = result.replace(/EEEE/gu, days[date.getDay()]);
|
|
26777
|
-
result = result.replace(/MMMM/gu, months[date.getMonth()]);
|
|
26778
|
-
result = result.replace(/EEE/gu, daysShort[date.getDay()]);
|
|
26779
|
-
result = result.replace(/MMM/gu, monthsShort[date.getMonth()]);
|
|
26780
|
-
result = result.replace(/yy/gu, String(date.getFullYear()).slice(2));
|
|
26781
|
-
result = result.replace(/MM/gu, pad(date.getMonth() + 1));
|
|
26782
|
-
result = result.replace(/dd/gu, pad(date.getDate()));
|
|
26783
|
-
result = result.replace(/HH/gu, pad(hours));
|
|
26784
|
-
result = result.replace(/hh/gu, pad(h12(hours)));
|
|
26785
|
-
result = result.replace(/mm/gu, pad(date.getMinutes()));
|
|
26786
|
-
result = result.replace(/ss/gu, pad(date.getSeconds()));
|
|
26787
|
-
result = result.replace(/(?<![A-Za-z])M(?![A-Za-z])/gu, String(date.getMonth() + 1));
|
|
26788
|
-
result = result.replace(/(?<![A-Za-z])d(?![A-Za-z])/gu, String(date.getDate()));
|
|
26789
|
-
result = result.replace(/(?<![A-Za-z])H(?![A-Za-z])/gu, String(hours));
|
|
26790
|
-
result = result.replace(/(?<![A-Za-z])h(?![A-Za-z])/gu, String(h12(hours)));
|
|
26791
|
-
result = result.replace(/\ba\b/gu, hours >= 12 ? "PM" : "AM");
|
|
26792
|
-
return result;
|
|
26793
|
-
}
|
|
26794
|
-
function resolveFieldDateText(fieldType, dateFormat, locale) {
|
|
26743
|
+
function resolveFieldDateText(fieldType, dateFormat, locale, cachedText) {
|
|
26795
26744
|
const now = /* @__PURE__ */ new Date();
|
|
26796
|
-
|
|
26797
|
-
|
|
26745
|
+
let effectiveType = fieldType;
|
|
26746
|
+
if (text$1.ooxmlDateTimeFieldPicture(fieldType) === void 0 && dateFormat) {
|
|
26747
|
+
if (fieldType.toLowerCase() === "datetime") {
|
|
26748
|
+
effectiveType = dateFormat;
|
|
26749
|
+
}
|
|
26750
|
+
}
|
|
26751
|
+
const picture = text$1.ooxmlDateTimeFieldPicture(effectiveType);
|
|
26752
|
+
if (picture === void 0) {
|
|
26753
|
+
const generic = fieldType.toLowerCase() === "datetime";
|
|
26754
|
+
return !generic && cachedText || now.toLocaleDateString(locale);
|
|
26755
|
+
}
|
|
26798
26756
|
if (!isEnglishLocale(locale)) {
|
|
26799
|
-
const localized = formatLocalizedDateTimeField(
|
|
26757
|
+
const localized = formatLocalizedDateTimeField(
|
|
26758
|
+
effectiveType.toLowerCase(),
|
|
26759
|
+
now,
|
|
26760
|
+
locale
|
|
26761
|
+
);
|
|
26800
26762
|
if (localized !== void 0) {
|
|
26801
26763
|
return localized;
|
|
26802
26764
|
}
|
|
26803
26765
|
}
|
|
26804
|
-
|
|
26805
|
-
if (pattern) {
|
|
26806
|
-
return formatDateWithPattern(now, pattern, locale);
|
|
26807
|
-
}
|
|
26808
|
-
return now.toLocaleDateString(locale);
|
|
26766
|
+
return text$1.formatDatePicture(now, picture, locale === void 0 ? {} : { locale });
|
|
26809
26767
|
}
|
|
26810
26768
|
function substituteFieldText(segmentText, fieldType, ctx, runLocale) {
|
|
26811
26769
|
if (!fieldType || !ctx) {
|
|
@@ -26817,7 +26775,7 @@ function substituteFieldText(segmentText, fieldType, ctx, runLocale) {
|
|
|
26817
26775
|
return String(resolveDisplaySlideNumber(ctx.slideNumber, ctx.firstSlideNumber));
|
|
26818
26776
|
}
|
|
26819
26777
|
if (fl.startsWith("datetime")) {
|
|
26820
|
-
return resolveFieldDateText(
|
|
26778
|
+
return resolveFieldDateText(fieldType, ctx.dateFormat, locale, segmentText);
|
|
26821
26779
|
}
|
|
26822
26780
|
if (fl === "footer" && ctx.footerText !== void 0) {
|
|
26823
26781
|
return ctx.footerText;
|
|
@@ -29143,6 +29101,121 @@ function createCustomShowsController(initial, selectedId = null) {
|
|
|
29143
29101
|
}
|
|
29144
29102
|
};
|
|
29145
29103
|
}
|
|
29104
|
+
|
|
29105
|
+
// src/files/save-progress-label.ts
|
|
29106
|
+
var SAVE_PROGRESS_TEXT = {
|
|
29107
|
+
/** Before any fragment is confirmed; most files upload in one request, so this is common. */
|
|
29108
|
+
uploadingStart: "Saving\u2026",
|
|
29109
|
+
uploading: "Saving\u2026 {percent}%",
|
|
29110
|
+
checking: "Checking for changes\u2026",
|
|
29111
|
+
downloading: "Getting the latest version\u2026 {percent}%",
|
|
29112
|
+
downloadingUnknown: "Getting the latest version\u2026",
|
|
29113
|
+
merging: "Combining edits\u2026"
|
|
29114
|
+
};
|
|
29115
|
+
var percent2 = (loaded2, total) => String(Math.max(0, Math.min(100, Math.round(loaded2 / total * 100))));
|
|
29116
|
+
function saveProgressLabel(progress, t2 = (text4) => text4) {
|
|
29117
|
+
switch (progress.phase) {
|
|
29118
|
+
case "uploading":
|
|
29119
|
+
return progress.loaded > 0 && progress.total > 0 ? t2(SAVE_PROGRESS_TEXT.uploading).replace(
|
|
29120
|
+
"{percent}",
|
|
29121
|
+
percent2(progress.loaded, progress.total)
|
|
29122
|
+
) : t2(SAVE_PROGRESS_TEXT.uploadingStart);
|
|
29123
|
+
case "checking":
|
|
29124
|
+
return t2(SAVE_PROGRESS_TEXT.checking);
|
|
29125
|
+
case "downloading":
|
|
29126
|
+
return progress.total ? t2(SAVE_PROGRESS_TEXT.downloading).replace(
|
|
29127
|
+
"{percent}",
|
|
29128
|
+
percent2(progress.loaded, progress.total)
|
|
29129
|
+
) : t2(SAVE_PROGRESS_TEXT.downloadingUnknown);
|
|
29130
|
+
case "merging":
|
|
29131
|
+
return t2(SAVE_PROGRESS_TEXT.merging);
|
|
29132
|
+
}
|
|
29133
|
+
}
|
|
29134
|
+
function saveProgressStepChanged(previous, next2) {
|
|
29135
|
+
if (!previous || previous.phase !== next2.phase) return true;
|
|
29136
|
+
if ((next2.phase === "uploading" || next2.phase === "downloading") && (previous.phase === "uploading" || previous.phase === "downloading") && next2.total && previous.total)
|
|
29137
|
+
return Math.floor(next2.loaded / next2.total * 10) !== Math.floor(previous.loaded / previous.total * 10);
|
|
29138
|
+
return false;
|
|
29139
|
+
}
|
|
29140
|
+
|
|
29141
|
+
// src/pptx/render/controller/save-progress-controller.ts
|
|
29142
|
+
function createSaveProgressController() {
|
|
29143
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore({});
|
|
29144
|
+
let runs = 0;
|
|
29145
|
+
const report = (progress) => {
|
|
29146
|
+
store.update(
|
|
29147
|
+
(current) => saveProgressStepChanged(current.announced, progress) ? { progress, announced: progress } : { progress, ...current.announced ? { announced: current.announced } : {} }
|
|
29148
|
+
);
|
|
29149
|
+
};
|
|
29150
|
+
const wrapped = /* @__PURE__ */ new WeakMap();
|
|
29151
|
+
const controller = {
|
|
29152
|
+
getSnapshot: store.getSnapshot,
|
|
29153
|
+
subscribe: store.subscribe,
|
|
29154
|
+
wrap(storage) {
|
|
29155
|
+
let wrapper = wrapped.get(storage);
|
|
29156
|
+
if (!wrapper) {
|
|
29157
|
+
wrapper = withSaveProgress(storage, controller);
|
|
29158
|
+
wrapped.set(storage, wrapper);
|
|
29159
|
+
}
|
|
29160
|
+
return wrapper;
|
|
29161
|
+
},
|
|
29162
|
+
report,
|
|
29163
|
+
clear: () => store.set({}),
|
|
29164
|
+
async track(run2) {
|
|
29165
|
+
const id = ++runs;
|
|
29166
|
+
try {
|
|
29167
|
+
return await run2((progress) => {
|
|
29168
|
+
if (id === runs) {
|
|
29169
|
+
report(progress);
|
|
29170
|
+
}
|
|
29171
|
+
});
|
|
29172
|
+
} finally {
|
|
29173
|
+
if (id === runs) {
|
|
29174
|
+
store.set({});
|
|
29175
|
+
}
|
|
29176
|
+
}
|
|
29177
|
+
}
|
|
29178
|
+
};
|
|
29179
|
+
return controller;
|
|
29180
|
+
}
|
|
29181
|
+
var SAVE_PROGRESS_TEXT_KEYS = {
|
|
29182
|
+
[SAVE_PROGRESS_TEXT.uploadingStart]: "pptx.autosave.saving",
|
|
29183
|
+
[SAVE_PROGRESS_TEXT.uploading]: "pptx.autosave.progress.uploading",
|
|
29184
|
+
[SAVE_PROGRESS_TEXT.checking]: "pptx.autosave.progress.checking",
|
|
29185
|
+
[SAVE_PROGRESS_TEXT.downloading]: "pptx.autosave.progress.downloading",
|
|
29186
|
+
[SAVE_PROGRESS_TEXT.downloadingUnknown]: "pptx.autosave.progress.downloadingUnknown",
|
|
29187
|
+
[SAVE_PROGRESS_TEXT.merging]: "pptx.autosave.progress.merging"
|
|
29188
|
+
};
|
|
29189
|
+
function saveProgressStatus(state, translate2) {
|
|
29190
|
+
if (!state.progress) {
|
|
29191
|
+
return void 0;
|
|
29192
|
+
}
|
|
29193
|
+
const t2 = (text4) => {
|
|
29194
|
+
const key = SAVE_PROGRESS_TEXT_KEYS[text4];
|
|
29195
|
+
const translated = key && translate2 ? translate2(key) : text4;
|
|
29196
|
+
return !translated || translated === key ? text4 : translated;
|
|
29197
|
+
};
|
|
29198
|
+
return {
|
|
29199
|
+
text: saveProgressLabel(state.progress, t2),
|
|
29200
|
+
announcement: saveProgressLabel(state.announced ?? state.progress, t2)
|
|
29201
|
+
};
|
|
29202
|
+
}
|
|
29203
|
+
function withSaveProgress(storage, controller) {
|
|
29204
|
+
return Object.create(storage, {
|
|
29205
|
+
save: {
|
|
29206
|
+
value: (bytes, meta) => controller.track(
|
|
29207
|
+
(report) => storage.save(bytes, {
|
|
29208
|
+
...meta,
|
|
29209
|
+
onProgress: (progress) => {
|
|
29210
|
+
report(progress);
|
|
29211
|
+
meta.onProgress?.(progress);
|
|
29212
|
+
}
|
|
29213
|
+
})
|
|
29214
|
+
),
|
|
29215
|
+
enumerable: true
|
|
29216
|
+
}
|
|
29217
|
+
});
|
|
29218
|
+
}
|
|
29146
29219
|
var TEMPLATE_REF_WIDTH_EMU = 12192e3;
|
|
29147
29220
|
var TEMPLATE_REF_HEIGHT_EMU = 6858e3;
|
|
29148
29221
|
var DEFAULT_SLIDE_WIDTH_PX = 1280;
|
|
@@ -29184,7 +29257,7 @@ function createTemplateContext(options = {}) {
|
|
|
29184
29257
|
const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
|
|
29185
29258
|
let counter = 0;
|
|
29186
29259
|
const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
|
|
29187
|
-
const dictionary =
|
|
29260
|
+
const dictionary = chunkZHVKGGLQ_cjs.translationsEn;
|
|
29188
29261
|
const translate2 = options.translate ?? ((key) => dictionary[key] ?? key);
|
|
29189
29262
|
return {
|
|
29190
29263
|
scheme,
|
|
@@ -29956,6 +30029,25 @@ function withInlineListDecorationDefaults(style, defaults) {
|
|
|
29956
30029
|
strikeType: style.strikeType ?? defaults?.strikeType
|
|
29957
30030
|
};
|
|
29958
30031
|
}
|
|
30032
|
+
|
|
30033
|
+
// src/pptx/render/font-line-gap.ts
|
|
30034
|
+
var TYPO_LINE_GAP = /* @__PURE__ */ new Map([
|
|
30035
|
+
["bahnschrift", 0.2],
|
|
30036
|
+
["cambria math", 0.172],
|
|
30037
|
+
["dejavu math tex gyre", 0.2],
|
|
30038
|
+
["gabriola", 0.7],
|
|
30039
|
+
["nirmala text", 0.862],
|
|
30040
|
+
["nirmala text semilight", 0.862],
|
|
30041
|
+
["sitka text", 0.25],
|
|
30042
|
+
["sitka heading", 0.25],
|
|
30043
|
+
["sitka subheading", 0.25],
|
|
30044
|
+
["sitka small", 0.25],
|
|
30045
|
+
["sitka banner", 0.25],
|
|
30046
|
+
["sitka display", 0.25]
|
|
30047
|
+
]);
|
|
30048
|
+
function typoLineGapEm(family2) {
|
|
30049
|
+
return family2 && TYPO_LINE_GAP.get(family2.trim().toLowerCase()) || 0;
|
|
30050
|
+
}
|
|
29959
30051
|
function collectFontsFromElement(element, fonts) {
|
|
29960
30052
|
if (pptx.hasTextProperties(element)) {
|
|
29961
30053
|
if (element.textStyle?.fontFamily) {
|
|
@@ -30157,7 +30249,18 @@ var GENERIC_FAMILIES = /* @__PURE__ */ new Set([
|
|
|
30157
30249
|
]);
|
|
30158
30250
|
var installedCache = /* @__PURE__ */ new Map();
|
|
30159
30251
|
function firstFontFamily(font) {
|
|
30160
|
-
const
|
|
30252
|
+
const size2 = /\d(?:px|pt|em|rem|%)/u.exec(font);
|
|
30253
|
+
if (!size2) return void 0;
|
|
30254
|
+
let rest = font.slice(size2.index + size2[0].length);
|
|
30255
|
+
const slash = /^\s*\//u.exec(rest);
|
|
30256
|
+
if (slash) {
|
|
30257
|
+
rest = rest.slice(slash[0].length).trimStart();
|
|
30258
|
+
const end = rest.search(/\s/u);
|
|
30259
|
+
if (end <= 0) return void 0;
|
|
30260
|
+
rest = rest.slice(end);
|
|
30261
|
+
}
|
|
30262
|
+
if (!/^\s/u.test(rest)) return void 0;
|
|
30263
|
+
const list2 = rest.trim() || void 0;
|
|
30161
30264
|
const first = list2?.split(",")[0]?.trim().replace(/^["']|["']$/gu, "");
|
|
30162
30265
|
return first ? first : void 0;
|
|
30163
30266
|
}
|
|
@@ -30206,7 +30309,7 @@ function powerPointBaseline(pitch, size2, descent) {
|
|
|
30206
30309
|
return pitch >= single * (1 - SINGLE_EPSILON) ? pitch - descent : Math.max(share, pitch - descent);
|
|
30207
30310
|
}
|
|
30208
30311
|
function powerPointDescent(size2, box) {
|
|
30209
|
-
const total = box.ascent + box.descent;
|
|
30312
|
+
const total = box.ascent + box.descent + (box.lineGap ?? 0);
|
|
30210
30313
|
return total > 0 ? SINGLE_PITCH * size2 * box.descent / total : box.descent;
|
|
30211
30314
|
}
|
|
30212
30315
|
function cssBaseline(boxes) {
|
|
@@ -30244,6 +30347,11 @@ var measureFontBoxWithCanvas = (font) => {
|
|
|
30244
30347
|
if (state !== "settled") {
|
|
30245
30348
|
return { ...box, provisional: true, ...state === "loading" ? { loading: true } : {} };
|
|
30246
30349
|
}
|
|
30350
|
+
const size2 = Number.parseFloat(/(\d+(?:\.\d+)?)px/u.exec(font)?.[1] ?? "");
|
|
30351
|
+
const gap = typoLineGapEm(firstFontFamily(font)) * size2;
|
|
30352
|
+
if (gap > 0) {
|
|
30353
|
+
box.lineGap = gap;
|
|
30354
|
+
}
|
|
30247
30355
|
cache.set(font, box);
|
|
30248
30356
|
return box;
|
|
30249
30357
|
};
|
|
@@ -37752,11 +37860,11 @@ function sampleImageCropMorphSteps(fromElement, toElement) {
|
|
|
37752
37860
|
for (const key of keys) {
|
|
37753
37861
|
insets[key] = from[key] + (to[key] - from[key]) * progress;
|
|
37754
37862
|
}
|
|
37755
|
-
const
|
|
37863
|
+
const percent6 = Math.round(time * 100 * 1e4) / 1e4;
|
|
37756
37864
|
const { placement, crop } = fitTransformsFromInsets(insets);
|
|
37757
37865
|
const identity10 = "translate(0%, 0%) scale(1, 1)";
|
|
37758
37866
|
const transform = step2 === CROP_TRACK_STEPS ? buildImageFitTransform(toElement, true) : `${placement || identity10} ${crop || identity10}`;
|
|
37759
|
-
samples.push({ percent: `${
|
|
37867
|
+
samples.push({ percent: `${percent6}%`, progress, transform });
|
|
37760
37868
|
}
|
|
37761
37869
|
return samples;
|
|
37762
37870
|
}
|
|
@@ -39308,111 +39416,55 @@ function generateFullMorphTransition(fromSlide, toSlide, durationMs, mode = "obj
|
|
|
39308
39416
|
return allAnimations;
|
|
39309
39417
|
}
|
|
39310
39418
|
|
|
39311
|
-
// src/pptx/render/morph-
|
|
39312
|
-
|
|
39313
|
-
|
|
39314
|
-
|
|
39315
|
-
|
|
39316
|
-
|
|
39317
|
-
|
|
39318
|
-
|
|
39319
|
-
|
|
39320
|
-
|
|
39321
|
-
|
|
39322
|
-
|
|
39323
|
-
|
|
39324
|
-
|
|
39325
|
-
|
|
39326
|
-
|
|
39327
|
-
|
|
39328
|
-
|
|
39329
|
-
byIncomingId.set(pair.toElement.id, pair);
|
|
39330
|
-
}
|
|
39331
|
-
}
|
|
39332
|
-
const groups = [];
|
|
39333
|
-
for (const element of incomingOrder) {
|
|
39334
|
-
const pair = byIncomingId.get(element.id);
|
|
39335
|
-
if (pair) {
|
|
39336
|
-
groups.push({ outgoing: pair.fromElement, incoming: pair.toElement });
|
|
39337
|
-
}
|
|
39338
|
-
}
|
|
39339
|
-
return groups;
|
|
39340
|
-
}
|
|
39341
|
-
|
|
39342
|
-
// src/pptx/render/morph-overlay-stack.ts
|
|
39343
|
-
function resolveMorphOverlayStack(ghosts, lifted, groups, outgoing, incoming, pairs, aliases) {
|
|
39344
|
-
const rank = buildMorphIncomingAnchoredOrder(outgoing, incoming, pairs);
|
|
39345
|
-
const rankOf = (id) => rank.get(aliases?.get(id) ?? id) ?? 0;
|
|
39346
|
-
const entries2 = [
|
|
39347
|
-
...ghosts.map((element, index) => ({
|
|
39348
|
-
kind: "outgoing",
|
|
39349
|
-
element,
|
|
39350
|
-
index,
|
|
39351
|
-
rank: rankOf(element.id)
|
|
39352
|
-
})),
|
|
39353
|
-
...lifted.map((element, index) => ({
|
|
39354
|
-
kind: "incoming",
|
|
39355
|
-
element,
|
|
39356
|
-
index,
|
|
39357
|
-
rank: rankOf(element.id)
|
|
39358
|
-
})),
|
|
39359
|
-
...groups.map((group, index) => ({
|
|
39360
|
-
kind: "crossfade",
|
|
39361
|
-
index,
|
|
39362
|
-
rank: rankOf(group.incoming.id)
|
|
39363
|
-
}))
|
|
39364
|
-
];
|
|
39365
|
-
entries2.sort(
|
|
39366
|
-
(a, b) => a.rank - b.rank || Number(a.kind !== "outgoing") - Number(b.kind !== "outgoing") || a.index - b.index
|
|
39367
|
-
);
|
|
39368
|
-
const layers = [];
|
|
39369
|
-
const stack = [];
|
|
39370
|
-
let open;
|
|
39371
|
-
for (const entry6 of entries2) {
|
|
39372
|
-
if (entry6.kind === "crossfade") {
|
|
39373
|
-
open = void 0;
|
|
39374
|
-
stack.push({ kind: "crossfade", index: entry6.index });
|
|
39419
|
+
// src/pptx/render/morph-plan-channels.ts
|
|
39420
|
+
function partitionMorphAnimations(animations, outgoingIds) {
|
|
39421
|
+
const incomingAnimations = /* @__PURE__ */ new Map();
|
|
39422
|
+
const outgoingAnimations = /* @__PURE__ */ new Map();
|
|
39423
|
+
const incomingImageAnimations = /* @__PURE__ */ new Map();
|
|
39424
|
+
const outgoingImageAnimations = /* @__PURE__ */ new Map();
|
|
39425
|
+
const outlineAnimations = /* @__PURE__ */ new Map();
|
|
39426
|
+
const outlineStrandAnimations = /* @__PURE__ */ new Map();
|
|
39427
|
+
const customGeometryAnimations = /* @__PURE__ */ new Map();
|
|
39428
|
+
const lineAnimations = /* @__PURE__ */ new Map();
|
|
39429
|
+
const keyframes = [];
|
|
39430
|
+
for (const animation of animations) {
|
|
39431
|
+
keyframes.push(animation.keyframes);
|
|
39432
|
+
const isOutgoing = outgoingIds.has(animation.elementId);
|
|
39433
|
+
if (animation.target === "outline" && animation.strand !== void 0) {
|
|
39434
|
+
const strands = outlineStrandAnimations.get(animation.elementId) ?? [];
|
|
39435
|
+
strands[animation.strand] = animation.animation;
|
|
39436
|
+
outlineStrandAnimations.set(animation.elementId, strands);
|
|
39375
39437
|
continue;
|
|
39376
39438
|
}
|
|
39377
|
-
if (
|
|
39378
|
-
|
|
39379
|
-
|
|
39380
|
-
|
|
39381
|
-
|
|
39382
|
-
open.elements.push(entry6.element);
|
|
39383
|
-
}
|
|
39384
|
-
return { layers, stack };
|
|
39385
|
-
}
|
|
39386
|
-
function stackOf(plan) {
|
|
39387
|
-
return plan.overlayStack ?? [
|
|
39388
|
-
...(plan.overlayLayers ?? []).map((_, index) => ({ kind: "layer", index })),
|
|
39389
|
-
...(plan.crossfadeGroups ?? []).map((_, index) => ({ kind: "crossfade", index }))
|
|
39390
|
-
];
|
|
39391
|
-
}
|
|
39392
|
-
function morphOverlayStackSlots(plan) {
|
|
39393
|
-
const layers = [];
|
|
39394
|
-
const groups = [];
|
|
39395
|
-
stackOf(plan).forEach((entry6, slot) => {
|
|
39396
|
-
(entry6.kind === "layer" ? layers : groups)[entry6.index] = slot;
|
|
39397
|
-
});
|
|
39398
|
-
return { layers, groups };
|
|
39399
|
-
}
|
|
39400
|
-
function morphOverlayElementSlots(plan) {
|
|
39401
|
-
const elements = /* @__PURE__ */ new Map();
|
|
39402
|
-
const groups = [];
|
|
39403
|
-
let slot = 0;
|
|
39404
|
-
for (const entry6 of stackOf(plan)) {
|
|
39405
|
-
if (entry6.kind === "crossfade") {
|
|
39406
|
-
groups[entry6.index] = slot;
|
|
39407
|
-
slot += 1;
|
|
39439
|
+
if (animation.target === "outline" || animation.target === "custom") {
|
|
39440
|
+
(animation.target === "outline" ? outlineAnimations : customGeometryAnimations).set(
|
|
39441
|
+
animation.elementId,
|
|
39442
|
+
animation.animation
|
|
39443
|
+
);
|
|
39408
39444
|
continue;
|
|
39409
39445
|
}
|
|
39410
|
-
|
|
39411
|
-
|
|
39412
|
-
|
|
39446
|
+
if (animation.target === "line") {
|
|
39447
|
+
lineAnimations.set(animation.elementId, animation.animation);
|
|
39448
|
+
continue;
|
|
39413
39449
|
}
|
|
39450
|
+
const target = animation.target === "image" ? isOutgoing ? outgoingImageAnimations : incomingImageAnimations : isOutgoing ? outgoingAnimations : incomingAnimations;
|
|
39451
|
+
const existing = target.get(animation.elementId);
|
|
39452
|
+
target.set(
|
|
39453
|
+
animation.elementId,
|
|
39454
|
+
existing === void 0 ? animation.animation : `${existing}, ${animation.animation}`
|
|
39455
|
+
);
|
|
39414
39456
|
}
|
|
39415
|
-
return {
|
|
39457
|
+
return {
|
|
39458
|
+
keyframes,
|
|
39459
|
+
incomingAnimations,
|
|
39460
|
+
outgoingAnimations,
|
|
39461
|
+
incomingImageAnimations,
|
|
39462
|
+
outgoingImageAnimations,
|
|
39463
|
+
outlineAnimations,
|
|
39464
|
+
outlineStrandAnimations,
|
|
39465
|
+
customGeometryAnimations,
|
|
39466
|
+
lineAnimations
|
|
39467
|
+
};
|
|
39416
39468
|
}
|
|
39417
39469
|
|
|
39418
39470
|
// src/pptx/render/morph-text-body.ts
|
|
@@ -39725,7 +39777,7 @@ function clipOf(cell, first, last) {
|
|
|
39725
39777
|
function morphGlyphId(sourceId, index) {
|
|
39726
39778
|
return `${sourceId}-morph-glyph-${index}`;
|
|
39727
39779
|
}
|
|
39728
|
-
function
|
|
39780
|
+
function percent3(value) {
|
|
39729
39781
|
return `${Math.round(value * 1e4) / 100}%`;
|
|
39730
39782
|
}
|
|
39731
39783
|
function buildMorphTextGlyphPlan(pairs, ghostIds, durationMs, measure2) {
|
|
@@ -39766,7 +39818,7 @@ function buildMorphTextGlyphPlan(pairs, ghostIds, durationMs, measure2) {
|
|
|
39766
39818
|
const frames = (name, clip, transform, opacity) => `
|
|
39767
39819
|
@keyframes ${name} {
|
|
39768
39820
|
${stops.map(
|
|
39769
|
-
(at, i) => ` ${
|
|
39821
|
+
(at, i) => ` ${percent3(i / SAMPLES2)} {
|
|
39770
39822
|
transform: ${transform(at)};
|
|
39771
39823
|
clip-path: ${clip};
|
|
39772
39824
|
opacity: ${round11(opacity(progresses[i]))};
|
|
@@ -39900,136 +39952,53 @@ function buildMorphTextPiecePlan(pairs, ghostIds, durationMs, measure2) {
|
|
|
39900
39952
|
return plan;
|
|
39901
39953
|
}
|
|
39902
39954
|
|
|
39903
|
-
// src/pptx/render/morph-plan.ts
|
|
39904
|
-
|
|
39905
|
-
|
|
39906
|
-
@keyframes ${LIFTED_HIDDEN_NAME} {
|
|
39907
|
-
from {
|
|
39908
|
-
opacity: 0;
|
|
39909
|
-
}
|
|
39910
|
-
to {
|
|
39911
|
-
opacity: 0;
|
|
39912
|
-
}
|
|
39913
|
-
}`;
|
|
39914
|
-
function morphOptionToMode(option) {
|
|
39915
|
-
if (option === "byWord") {
|
|
39916
|
-
return "word";
|
|
39917
|
-
}
|
|
39918
|
-
if (option === "byChar") {
|
|
39919
|
-
return "character";
|
|
39920
|
-
}
|
|
39921
|
-
return "object";
|
|
39922
|
-
}
|
|
39923
|
-
function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object", options = {}) {
|
|
39924
|
-
if (!fromSlide || !toSlide) {
|
|
39925
|
-
return void 0;
|
|
39926
|
-
}
|
|
39927
|
-
const match = matchMorphElementsFull(fromSlide, toSlide);
|
|
39928
|
-
if (match.pairs.length === 0 && match.unmatchedFrom.length === 0 && match.unmatchedTo.length === 0) {
|
|
39929
|
-
return void 0;
|
|
39930
|
-
}
|
|
39931
|
-
const animations = generateFullMorphTransition(
|
|
39932
|
-
fromSlide,
|
|
39933
|
-
toSlide,
|
|
39934
|
-
durationMs,
|
|
39935
|
-
mode,
|
|
39936
|
-
options.zIndexBase ?? 0,
|
|
39937
|
-
options.measureText,
|
|
39938
|
-
options.slideSize
|
|
39939
|
-
);
|
|
39940
|
-
const flattenedOutgoing = flattenMorphElements(fromSlide.elements, toSlide.elements);
|
|
39941
|
-
const outgoingIds = new Set(flattenedOutgoing.map((element) => element.id));
|
|
39942
|
-
const flattenedIncoming = flattenMorphElements(toSlide.elements, fromSlide.elements);
|
|
39943
|
-
const ghostIds = resolveMorphGhostIds(flattenedOutgoing, match.pairs, flattenedIncoming);
|
|
39944
|
-
const incomingAnimations = /* @__PURE__ */ new Map();
|
|
39945
|
-
const outgoingAnimations = /* @__PURE__ */ new Map();
|
|
39946
|
-
const incomingImageAnimations = /* @__PURE__ */ new Map();
|
|
39947
|
-
const outgoingImageAnimations = /* @__PURE__ */ new Map();
|
|
39948
|
-
const outlineAnimations = /* @__PURE__ */ new Map();
|
|
39949
|
-
const outlineStrandAnimations = /* @__PURE__ */ new Map();
|
|
39950
|
-
const customGeometryAnimations = /* @__PURE__ */ new Map();
|
|
39951
|
-
const lineAnimations = /* @__PURE__ */ new Map();
|
|
39952
|
-
const keyframes = [];
|
|
39953
|
-
for (const animation of animations) {
|
|
39954
|
-
keyframes.push(animation.keyframes);
|
|
39955
|
-
const isOutgoing = outgoingIds.has(animation.elementId);
|
|
39956
|
-
if (animation.target === "outline" && animation.strand !== void 0) {
|
|
39957
|
-
const strands = outlineStrandAnimations.get(animation.elementId) ?? [];
|
|
39958
|
-
strands[animation.strand] = animation.animation;
|
|
39959
|
-
outlineStrandAnimations.set(animation.elementId, strands);
|
|
39960
|
-
continue;
|
|
39961
|
-
}
|
|
39962
|
-
if (animation.target === "outline" || animation.target === "custom") {
|
|
39963
|
-
(animation.target === "outline" ? outlineAnimations : customGeometryAnimations).set(
|
|
39964
|
-
animation.elementId,
|
|
39965
|
-
animation.animation
|
|
39966
|
-
);
|
|
39967
|
-
continue;
|
|
39968
|
-
}
|
|
39969
|
-
if (animation.target === "line") {
|
|
39970
|
-
lineAnimations.set(animation.elementId, animation.animation);
|
|
39971
|
-
continue;
|
|
39972
|
-
}
|
|
39973
|
-
const target = animation.target === "image" ? isOutgoing ? outgoingImageAnimations : incomingImageAnimations : isOutgoing ? outgoingAnimations : incomingAnimations;
|
|
39974
|
-
const existing = target.get(animation.elementId);
|
|
39975
|
-
target.set(
|
|
39976
|
-
animation.elementId,
|
|
39977
|
-
existing === void 0 ? animation.animation : `${existing}, ${animation.animation}`
|
|
39978
|
-
);
|
|
39979
|
-
}
|
|
39955
|
+
// src/pptx/render/morph-plan-carry.ts
|
|
39956
|
+
function planMorphTextCarry(input) {
|
|
39957
|
+
const { mode, durationMs, measureText, pairs, ghostIds } = input;
|
|
39980
39958
|
const offstageRestyles = new Map(
|
|
39981
|
-
|
|
39959
|
+
pairs.filter(({ fromElement, toElement }) => morphOffstageTextAdoptsTarget(fromElement, toElement)).map(({ fromElement, toElement }) => [fromElement.id, toElement])
|
|
39982
39960
|
);
|
|
39983
39961
|
const pieces = buildMorphTextPiecePlan(
|
|
39984
|
-
mode === "object" ?
|
|
39962
|
+
mode === "object" ? pairs : [],
|
|
39985
39963
|
ghostIds,
|
|
39986
39964
|
durationMs,
|
|
39987
|
-
|
|
39965
|
+
measureText
|
|
39988
39966
|
);
|
|
39989
39967
|
const glyphs = buildMorphTextGlyphPlan(
|
|
39990
|
-
mode === "object" ?
|
|
39968
|
+
mode === "object" ? pairs.filter((pair) => !pieces.pairs.includes(pair)) : [],
|
|
39991
39969
|
ghostIds,
|
|
39992
39970
|
durationMs,
|
|
39993
|
-
|
|
39971
|
+
measureText
|
|
39994
39972
|
);
|
|
39995
39973
|
mergeMorphTextBodyPlan(pieces, glyphs);
|
|
39996
39974
|
const bodies = buildMorphTextBodyPlan(
|
|
39997
|
-
mode === "object" ?
|
|
39975
|
+
mode === "object" ? pairs.filter((pair) => !pieces.pairs.includes(pair)) : [],
|
|
39998
39976
|
{
|
|
39999
|
-
outgoing: flattenedOutgoing,
|
|
40000
|
-
incoming: flattenedIncoming,
|
|
40001
|
-
pairs
|
|
39977
|
+
outgoing: input.flattenedOutgoing,
|
|
39978
|
+
incoming: input.flattenedIncoming,
|
|
39979
|
+
pairs,
|
|
40002
39980
|
ghostIds,
|
|
40003
39981
|
overlaid: new Set(pieces.pairs.map((pair) => pair.toElement.id)),
|
|
40004
|
-
animated:
|
|
39982
|
+
animated: input.animated
|
|
40005
39983
|
},
|
|
40006
39984
|
durationMs,
|
|
40007
|
-
|
|
39985
|
+
measureText
|
|
40008
39986
|
);
|
|
40009
39987
|
mergeMorphTextBodyPlan(pieces, bodies);
|
|
40010
39988
|
addMorphBodyCopyCarry(
|
|
40011
39989
|
bodies.pairs,
|
|
40012
39990
|
durationMs,
|
|
40013
39991
|
pieces,
|
|
40014
|
-
outlineAnimations,
|
|
40015
|
-
customGeometryAnimations,
|
|
40016
|
-
outlineStrandAnimations
|
|
39992
|
+
input.outlineAnimations,
|
|
39993
|
+
input.customGeometryAnimations,
|
|
39994
|
+
input.outlineStrandAnimations
|
|
40017
39995
|
);
|
|
40018
|
-
|
|
40019
|
-
|
|
40020
|
-
|
|
40021
|
-
|
|
40022
|
-
|
|
40023
|
-
|
|
40024
|
-
if (!target || element.type !== "text" || target.type !== "text") return element;
|
|
40025
|
-
return {
|
|
40026
|
-
...element,
|
|
40027
|
-
width: target.width,
|
|
40028
|
-
height: target.height,
|
|
40029
|
-
textStyle: target.textStyle,
|
|
40030
|
-
textSegments: target.textSegments
|
|
40031
|
-
};
|
|
40032
|
-
});
|
|
39996
|
+
return { offstageRestyles, pieces, bodies };
|
|
39997
|
+
}
|
|
39998
|
+
|
|
39999
|
+
// src/pptx/render/morph-plan-lift.ts
|
|
40000
|
+
function resolveMorphLiftedIds(input) {
|
|
40001
|
+
const { pairs, wholePairs, ghostIds, flattenedOutgoing, flattenedIncoming, pieceToIds } = input;
|
|
40033
40002
|
const holdingGhostIds = new Set(
|
|
40034
40003
|
wholePairs.filter(
|
|
40035
40004
|
(candidate) => ghostIds.has(candidate.fromElement.id) && !morphPairNeedsCrossfade(candidate.fromElement, candidate.toElement)
|
|
@@ -40047,22 +40016,22 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
|
|
|
40047
40016
|
const lifted = resolveMorphOverlayArrivals(
|
|
40048
40017
|
flattenedOutgoing,
|
|
40049
40018
|
flattenedIncoming,
|
|
40050
|
-
|
|
40019
|
+
pairs,
|
|
40051
40020
|
holdingGhostIds,
|
|
40052
40021
|
dissolvingInIds
|
|
40053
40022
|
);
|
|
40054
|
-
if (mode === "object") {
|
|
40023
|
+
if (input.mode === "object") {
|
|
40055
40024
|
for (const id of resolveMorphTextBlendLifts(
|
|
40056
40025
|
{
|
|
40057
40026
|
outgoing: flattenedOutgoing,
|
|
40058
40027
|
incoming: flattenedIncoming,
|
|
40059
|
-
pairs
|
|
40028
|
+
pairs,
|
|
40060
40029
|
ghostIds,
|
|
40061
40030
|
overlaid: /* @__PURE__ */ new Set([...lifted, ...pieceToIds]),
|
|
40062
|
-
animated:
|
|
40031
|
+
animated: input.animated
|
|
40063
40032
|
},
|
|
40064
40033
|
dissolvingInIds,
|
|
40065
|
-
|
|
40034
|
+
input.measureText
|
|
40066
40035
|
)) {
|
|
40067
40036
|
lifted.add(id);
|
|
40068
40037
|
}
|
|
@@ -40074,99 +40043,129 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
|
|
|
40074
40043
|
pairs: wholePairs,
|
|
40075
40044
|
ghostIds,
|
|
40076
40045
|
overlaid: /* @__PURE__ */ new Set([...lifted, ...pieceToIds]),
|
|
40077
|
-
animated:
|
|
40046
|
+
animated: input.animated
|
|
40078
40047
|
},
|
|
40079
40048
|
dissolvingInIds
|
|
40080
40049
|
)) {
|
|
40081
40050
|
lifted.add(id);
|
|
40082
40051
|
}
|
|
40083
|
-
for (const id of
|
|
40052
|
+
for (const id of input.risingIds) {
|
|
40084
40053
|
lifted.add(id);
|
|
40085
40054
|
}
|
|
40086
40055
|
for (const id of pieceToIds) {
|
|
40087
40056
|
lifted.delete(id);
|
|
40088
40057
|
}
|
|
40089
|
-
|
|
40090
|
-
|
|
40091
|
-
|
|
40092
|
-
|
|
40093
|
-
|
|
40058
|
+
return lifted;
|
|
40059
|
+
}
|
|
40060
|
+
|
|
40061
|
+
// src/pptx/render/morph-crossfade-group.ts
|
|
40062
|
+
var MORPH_CROSSFADE_GROUP_STYLE = {
|
|
40063
|
+
position: "absolute",
|
|
40064
|
+
inset: "0",
|
|
40065
|
+
isolation: "isolate"
|
|
40066
|
+
};
|
|
40067
|
+
var MORPH_CROSSFADE_GROUP_CSS_TEXT = "position: absolute; inset: 0; isolation: isolate;";
|
|
40068
|
+
var MORPH_CROSSFADE_HALF_BLEND_MODE = "plus-lighter";
|
|
40069
|
+
var MORPH_CROSSFADE_HALF_STYLE = {
|
|
40070
|
+
position: "absolute",
|
|
40071
|
+
inset: "0",
|
|
40072
|
+
mixBlendMode: MORPH_CROSSFADE_HALF_BLEND_MODE
|
|
40073
|
+
};
|
|
40074
|
+
var MORPH_CROSSFADE_HALF_CSS_TEXT = `position: absolute; inset: 0; mix-blend-mode: ${MORPH_CROSSFADE_HALF_BLEND_MODE};`;
|
|
40075
|
+
function resolveMorphCrossfadeGroups(pairs, ghostIds, liftedIds, incomingOrder) {
|
|
40076
|
+
const byIncomingId = /* @__PURE__ */ new Map();
|
|
40077
|
+
for (const pair of pairs) {
|
|
40078
|
+
if (ghostIds.has(pair.fromElement.id) && liftedIds.has(pair.toElement.id)) {
|
|
40079
|
+
byIncomingId.set(pair.toElement.id, pair);
|
|
40094
40080
|
}
|
|
40095
|
-
overlayIncomingAnimations.set(id, animation);
|
|
40096
|
-
incomingAnimations.set(id, `${LIFTED_HIDDEN_NAME} ${durationMs}ms linear forwards`);
|
|
40097
|
-
}
|
|
40098
|
-
for (const id of pieceToIds) {
|
|
40099
|
-
incomingAnimations.set(id, `${LIFTED_HIDDEN_NAME} ${durationMs}ms linear forwards`);
|
|
40100
|
-
}
|
|
40101
|
-
for (const id of pieceFromIds) {
|
|
40102
|
-
outgoingAnimations.delete(id);
|
|
40103
|
-
outlineAnimations.delete(id);
|
|
40104
|
-
outlineStrandAnimations.delete(id);
|
|
40105
|
-
customGeometryAnimations.delete(id);
|
|
40106
|
-
}
|
|
40107
|
-
for (const id of pieceToIds) {
|
|
40108
|
-
outlineAnimations.delete(id);
|
|
40109
|
-
outlineStrandAnimations.delete(id);
|
|
40110
|
-
customGeometryAnimations.delete(id);
|
|
40111
40081
|
}
|
|
40112
|
-
|
|
40113
|
-
|
|
40082
|
+
const groups = [];
|
|
40083
|
+
for (const element of incomingOrder) {
|
|
40084
|
+
const pair = byIncomingId.get(element.id);
|
|
40085
|
+
if (pair) {
|
|
40086
|
+
groups.push({ outgoing: pair.fromElement, incoming: pair.toElement });
|
|
40087
|
+
}
|
|
40114
40088
|
}
|
|
40115
|
-
|
|
40116
|
-
|
|
40117
|
-
|
|
40118
|
-
|
|
40119
|
-
|
|
40120
|
-
|
|
40121
|
-
).
|
|
40122
|
-
|
|
40089
|
+
return groups;
|
|
40090
|
+
}
|
|
40091
|
+
|
|
40092
|
+
// src/pptx/render/morph-overlay-stack.ts
|
|
40093
|
+
function resolveMorphOverlayStack(ghosts, lifted, groups, outgoing, incoming, pairs, aliases) {
|
|
40094
|
+
const rank = buildMorphIncomingAnchoredOrder(outgoing, incoming, pairs);
|
|
40095
|
+
const rankOf = (id) => rank.get(aliases?.get(id) ?? id) ?? 0;
|
|
40096
|
+
const entries2 = [
|
|
40097
|
+
...ghosts.map((element, index) => ({
|
|
40098
|
+
kind: "outgoing",
|
|
40099
|
+
element,
|
|
40100
|
+
index,
|
|
40101
|
+
rank: rankOf(element.id)
|
|
40102
|
+
})),
|
|
40103
|
+
...lifted.map((element, index) => ({
|
|
40104
|
+
kind: "incoming",
|
|
40105
|
+
element,
|
|
40106
|
+
index,
|
|
40107
|
+
rank: rankOf(element.id)
|
|
40108
|
+
})),
|
|
40109
|
+
...groups.map((group, index) => ({
|
|
40110
|
+
kind: "crossfade",
|
|
40111
|
+
index,
|
|
40112
|
+
rank: rankOf(group.incoming.id)
|
|
40113
|
+
}))
|
|
40114
|
+
];
|
|
40115
|
+
entries2.sort(
|
|
40116
|
+
(a, b) => a.rank - b.rank || Number(a.kind !== "outgoing") - Number(b.kind !== "outgoing") || a.index - b.index
|
|
40123
40117
|
);
|
|
40124
|
-
|
|
40125
|
-
|
|
40126
|
-
|
|
40118
|
+
const layers = [];
|
|
40119
|
+
const stack = [];
|
|
40120
|
+
let open;
|
|
40121
|
+
for (const entry6 of entries2) {
|
|
40122
|
+
if (entry6.kind === "crossfade") {
|
|
40123
|
+
open = void 0;
|
|
40124
|
+
stack.push({ kind: "crossfade", index: entry6.index });
|
|
40125
|
+
continue;
|
|
40126
|
+
}
|
|
40127
|
+
if (open?.side !== entry6.kind) {
|
|
40128
|
+
open = { side: entry6.kind, elements: [] };
|
|
40129
|
+
stack.push({ kind: "layer", index: layers.length });
|
|
40130
|
+
layers.push(open);
|
|
40131
|
+
}
|
|
40132
|
+
open.elements.push(entry6.element);
|
|
40127
40133
|
}
|
|
40128
|
-
|
|
40129
|
-
|
|
40134
|
+
return { layers, stack };
|
|
40135
|
+
}
|
|
40136
|
+
function stackOf(plan) {
|
|
40137
|
+
return plan.overlayStack ?? [
|
|
40138
|
+
...(plan.overlayLayers ?? []).map((_, index) => ({ kind: "layer", index })),
|
|
40139
|
+
...(plan.crossfadeGroups ?? []).map((_, index) => ({ kind: "crossfade", index }))
|
|
40140
|
+
];
|
|
40141
|
+
}
|
|
40142
|
+
function morphOverlayStackSlots(plan) {
|
|
40143
|
+
const layers = [];
|
|
40144
|
+
const groups = [];
|
|
40145
|
+
stackOf(plan).forEach((entry6, slot) => {
|
|
40146
|
+
(entry6.kind === "layer" ? layers : groups)[entry6.index] = slot;
|
|
40147
|
+
});
|
|
40148
|
+
return { layers, groups };
|
|
40149
|
+
}
|
|
40150
|
+
function morphOverlayElementSlots(plan) {
|
|
40151
|
+
const elements = /* @__PURE__ */ new Map();
|
|
40152
|
+
const groups = [];
|
|
40153
|
+
let slot = 0;
|
|
40154
|
+
for (const entry6 of stackOf(plan)) {
|
|
40155
|
+
if (entry6.kind === "crossfade") {
|
|
40156
|
+
groups[entry6.index] = slot;
|
|
40157
|
+
slot += 1;
|
|
40158
|
+
continue;
|
|
40159
|
+
}
|
|
40160
|
+
for (const element of plan.overlayLayers?.[entry6.index]?.elements ?? []) {
|
|
40161
|
+
elements.set(element.id, slot);
|
|
40162
|
+
slot += 1;
|
|
40163
|
+
}
|
|
40130
40164
|
}
|
|
40131
|
-
|
|
40132
|
-
const groupedIncomingIds = new Set(crossfadeGroups.map((group) => group.incoming.id));
|
|
40133
|
-
const outgoingElements = ghostElements.filter((element) => !groupedOutgoingIds.has(element.id));
|
|
40134
|
-
const overlayIncomingElements = flattenedIncoming.filter(
|
|
40135
|
-
(element) => overlayIncomingAnimations.has(element.id) && !groupedIncomingIds.has(element.id)
|
|
40136
|
-
);
|
|
40137
|
-
const { layers: overlayLayers, stack: overlayStack } = resolveMorphOverlayStack(
|
|
40138
|
-
outgoingElements,
|
|
40139
|
-
overlayIncomingElements,
|
|
40140
|
-
crossfadeGroups,
|
|
40141
|
-
flattenedOutgoing,
|
|
40142
|
-
flattenedIncoming,
|
|
40143
|
-
match.pairs,
|
|
40144
|
-
pieces.sources
|
|
40145
|
-
);
|
|
40146
|
-
return {
|
|
40147
|
-
keyframesCss: keyframes.join("\n"),
|
|
40148
|
-
incomingAnimations,
|
|
40149
|
-
outgoingAnimations,
|
|
40150
|
-
incomingImageAnimations,
|
|
40151
|
-
outgoingImageAnimations,
|
|
40152
|
-
overlayIncomingAnimations,
|
|
40153
|
-
outgoingElements,
|
|
40154
|
-
outgoingTextReplacements: new Map(
|
|
40155
|
-
[...offstageRestyles].filter(([id]) => ghostIds.has(id)).map(([id, target]) => [id, target.id])
|
|
40156
|
-
),
|
|
40157
|
-
overlayIncomingElements,
|
|
40158
|
-
overlayLayers,
|
|
40159
|
-
overlayStack,
|
|
40160
|
-
crossfadeGroups,
|
|
40161
|
-
...pieces.sources.size > 0 ? { textPieceSources: pieces.sources } : {},
|
|
40162
|
-
...bodies.parts.size > 0 ? { morphCopyParts: bodies.parts } : {},
|
|
40163
|
-
...outlineAnimations.size > 0 ? { outlineAnimations } : {},
|
|
40164
|
-
...outlineStrandAnimations.size > 0 ? { outlineStrandAnimations } : {},
|
|
40165
|
-
...customGeometryAnimations.size > 0 ? { customGeometryAnimations } : {},
|
|
40166
|
-
...lineAnimations.size > 0 ? { lineAnimations } : {},
|
|
40167
|
-
durationMs
|
|
40168
|
-
};
|
|
40165
|
+
return { elements, groups };
|
|
40169
40166
|
}
|
|
40167
|
+
|
|
40168
|
+
// src/pptx/render/morph-plan-crossfade.ts
|
|
40170
40169
|
function liftCrossfadeToWrapper(group, animations, outgoingAnimations, overlayIncomingAnimations) {
|
|
40171
40170
|
const tracksOf = (elementId) => {
|
|
40172
40171
|
const fade = [];
|
|
@@ -40236,6 +40235,99 @@ function keyframesBlockOf(name, keyframes) {
|
|
|
40236
40235
|
}
|
|
40237
40236
|
return void 0;
|
|
40238
40237
|
}
|
|
40238
|
+
|
|
40239
|
+
// src/pptx/render/morph-plan-overlay.ts
|
|
40240
|
+
var LIFTED_HIDDEN_NAME = "pptx-morph-lifted-hidden";
|
|
40241
|
+
var LIFTED_HIDDEN_KEYFRAMES = `
|
|
40242
|
+
@keyframes ${LIFTED_HIDDEN_NAME} {
|
|
40243
|
+
from {
|
|
40244
|
+
opacity: 0;
|
|
40245
|
+
}
|
|
40246
|
+
to {
|
|
40247
|
+
opacity: 0;
|
|
40248
|
+
}
|
|
40249
|
+
}`;
|
|
40250
|
+
function settleMorphLifts(input) {
|
|
40251
|
+
const { durationMs, incomingAnimations, outgoingAnimations, pieceFromIds, pieceToIds } = input;
|
|
40252
|
+
const hold = `${LIFTED_HIDDEN_NAME} ${durationMs}ms linear forwards`;
|
|
40253
|
+
const overlayIncomingAnimations = /* @__PURE__ */ new Map();
|
|
40254
|
+
for (const id of input.lifted) {
|
|
40255
|
+
const animation = incomingAnimations.get(id);
|
|
40256
|
+
if (animation === void 0) {
|
|
40257
|
+
continue;
|
|
40258
|
+
}
|
|
40259
|
+
overlayIncomingAnimations.set(id, animation);
|
|
40260
|
+
incomingAnimations.set(id, hold);
|
|
40261
|
+
}
|
|
40262
|
+
for (const id of pieceToIds) {
|
|
40263
|
+
incomingAnimations.set(id, hold);
|
|
40264
|
+
}
|
|
40265
|
+
for (const id of pieceFromIds) {
|
|
40266
|
+
outgoingAnimations.delete(id);
|
|
40267
|
+
input.outlineAnimations.delete(id);
|
|
40268
|
+
input.outlineStrandAnimations.delete(id);
|
|
40269
|
+
input.customGeometryAnimations.delete(id);
|
|
40270
|
+
}
|
|
40271
|
+
for (const id of pieceToIds) {
|
|
40272
|
+
input.outlineAnimations.delete(id);
|
|
40273
|
+
input.outlineStrandAnimations.delete(id);
|
|
40274
|
+
input.customGeometryAnimations.delete(id);
|
|
40275
|
+
}
|
|
40276
|
+
if (overlayIncomingAnimations.size > 0 || pieceToIds.size > 0) {
|
|
40277
|
+
input.keyframes.push(LIFTED_HIDDEN_KEYFRAMES);
|
|
40278
|
+
}
|
|
40279
|
+
input.keyframes.push(...input.pieces.keyframes);
|
|
40280
|
+
return overlayIncomingAnimations;
|
|
40281
|
+
}
|
|
40282
|
+
function assembleMorphOverlay(input) {
|
|
40283
|
+
const { pieces, flattenedOutgoing, flattenedIncoming, overlayIncomingAnimations } = input;
|
|
40284
|
+
const crossfadeGroups = resolveMorphCrossfadeGroups(
|
|
40285
|
+
input.wholePairs,
|
|
40286
|
+
input.ghostIds,
|
|
40287
|
+
new Set(overlayIncomingAnimations.keys()),
|
|
40288
|
+
flattenedIncoming
|
|
40289
|
+
).map(
|
|
40290
|
+
(group) => liftCrossfadeToWrapper(
|
|
40291
|
+
group,
|
|
40292
|
+
input.animations,
|
|
40293
|
+
input.outgoingAnimations,
|
|
40294
|
+
overlayIncomingAnimations
|
|
40295
|
+
)
|
|
40296
|
+
);
|
|
40297
|
+
crossfadeGroups.push(...pieces.groups);
|
|
40298
|
+
for (const [id, animation] of pieces.outgoingAnimations) {
|
|
40299
|
+
input.outgoingAnimations.set(id, animation);
|
|
40300
|
+
}
|
|
40301
|
+
for (const [id, animation] of pieces.incomingAnimations) {
|
|
40302
|
+
overlayIncomingAnimations.set(id, animation);
|
|
40303
|
+
}
|
|
40304
|
+
const groupedOutgoingIds = new Set(crossfadeGroups.map((group) => group.outgoing.id));
|
|
40305
|
+
const groupedIncomingIds = new Set(crossfadeGroups.map((group) => group.incoming.id));
|
|
40306
|
+
const outgoingElements = input.ghostElements.filter(
|
|
40307
|
+
(element) => !groupedOutgoingIds.has(element.id)
|
|
40308
|
+
);
|
|
40309
|
+
const overlayIncomingElements = flattenedIncoming.filter(
|
|
40310
|
+
(element) => overlayIncomingAnimations.has(element.id) && !groupedIncomingIds.has(element.id)
|
|
40311
|
+
);
|
|
40312
|
+
const { layers: overlayLayers, stack: overlayStack } = resolveMorphOverlayStack(
|
|
40313
|
+
outgoingElements,
|
|
40314
|
+
overlayIncomingElements,
|
|
40315
|
+
crossfadeGroups,
|
|
40316
|
+
flattenedOutgoing,
|
|
40317
|
+
flattenedIncoming,
|
|
40318
|
+
input.pairs,
|
|
40319
|
+
pieces.sources
|
|
40320
|
+
);
|
|
40321
|
+
return {
|
|
40322
|
+
crossfadeGroups,
|
|
40323
|
+
outgoingElements,
|
|
40324
|
+
overlayIncomingElements,
|
|
40325
|
+
overlayLayers,
|
|
40326
|
+
overlayStack
|
|
40327
|
+
};
|
|
40328
|
+
}
|
|
40329
|
+
|
|
40330
|
+
// src/pptx/render/morph-plan-css.ts
|
|
40239
40331
|
var CSS_UNSAFE_CHAR = /["\\<>&'\u0000-\u001f\u007f]/u;
|
|
40240
40332
|
function cssAttributeValue(value) {
|
|
40241
40333
|
let out = "";
|
|
@@ -40293,6 +40385,136 @@ ${rules.join("\n")}
|
|
|
40293
40385
|
}` : "";
|
|
40294
40386
|
return [supported, ...lines].filter(Boolean).join("\n");
|
|
40295
40387
|
}
|
|
40388
|
+
|
|
40389
|
+
// src/pptx/render/morph-plan.ts
|
|
40390
|
+
function morphOptionToMode(option) {
|
|
40391
|
+
if (option === "byWord") {
|
|
40392
|
+
return "word";
|
|
40393
|
+
}
|
|
40394
|
+
if (option === "byChar") {
|
|
40395
|
+
return "character";
|
|
40396
|
+
}
|
|
40397
|
+
return "object";
|
|
40398
|
+
}
|
|
40399
|
+
function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object", options = {}) {
|
|
40400
|
+
if (!fromSlide || !toSlide) {
|
|
40401
|
+
return void 0;
|
|
40402
|
+
}
|
|
40403
|
+
const match = matchMorphElementsFull(fromSlide, toSlide);
|
|
40404
|
+
if (match.pairs.length === 0 && match.unmatchedFrom.length === 0 && match.unmatchedTo.length === 0) {
|
|
40405
|
+
return void 0;
|
|
40406
|
+
}
|
|
40407
|
+
const animations = generateFullMorphTransition(
|
|
40408
|
+
fromSlide,
|
|
40409
|
+
toSlide,
|
|
40410
|
+
durationMs,
|
|
40411
|
+
mode,
|
|
40412
|
+
options.zIndexBase ?? 0,
|
|
40413
|
+
options.measureText,
|
|
40414
|
+
options.slideSize
|
|
40415
|
+
);
|
|
40416
|
+
const flattenedOutgoing = flattenMorphElements(fromSlide.elements, toSlide.elements);
|
|
40417
|
+
const outgoingIds = new Set(flattenedOutgoing.map((element) => element.id));
|
|
40418
|
+
const flattenedIncoming = flattenMorphElements(toSlide.elements, fromSlide.elements);
|
|
40419
|
+
const ghostIds = resolveMorphGhostIds(flattenedOutgoing, match.pairs, flattenedIncoming);
|
|
40420
|
+
const channels = partitionMorphAnimations(animations, outgoingIds);
|
|
40421
|
+
const {
|
|
40422
|
+
keyframes,
|
|
40423
|
+
incomingAnimations,
|
|
40424
|
+
outgoingAnimations,
|
|
40425
|
+
outlineAnimations,
|
|
40426
|
+
outlineStrandAnimations,
|
|
40427
|
+
customGeometryAnimations
|
|
40428
|
+
} = channels;
|
|
40429
|
+
const { offstageRestyles, pieces, bodies } = planMorphTextCarry({
|
|
40430
|
+
mode,
|
|
40431
|
+
durationMs,
|
|
40432
|
+
measureText: options.measureText,
|
|
40433
|
+
pairs: match.pairs,
|
|
40434
|
+
ghostIds,
|
|
40435
|
+
flattenedOutgoing,
|
|
40436
|
+
flattenedIncoming,
|
|
40437
|
+
animated: (id) => incomingAnimations.has(id),
|
|
40438
|
+
outlineAnimations,
|
|
40439
|
+
customGeometryAnimations,
|
|
40440
|
+
outlineStrandAnimations
|
|
40441
|
+
});
|
|
40442
|
+
const piecePairs = new Set(pieces.pairs);
|
|
40443
|
+
const pieceFromIds = new Set(pieces.pairs.map((pair) => pair.fromElement.id));
|
|
40444
|
+
const pieceToIds = new Set(pieces.pairs.map((pair) => pair.toElement.id));
|
|
40445
|
+
const wholePairs = match.pairs.filter((pair) => !piecePairs.has(pair));
|
|
40446
|
+
const ghostElements = flattenedOutgoing.filter((element) => ghostIds.has(element.id) && !pieceFromIds.has(element.id)).map((element) => {
|
|
40447
|
+
const target = offstageRestyles.get(element.id);
|
|
40448
|
+
if (!target || element.type !== "text" || target.type !== "text") return element;
|
|
40449
|
+
return {
|
|
40450
|
+
...element,
|
|
40451
|
+
width: target.width,
|
|
40452
|
+
height: target.height,
|
|
40453
|
+
textStyle: target.textStyle,
|
|
40454
|
+
textSegments: target.textSegments
|
|
40455
|
+
};
|
|
40456
|
+
});
|
|
40457
|
+
const lifted = resolveMorphLiftedIds({
|
|
40458
|
+
mode,
|
|
40459
|
+
measureText: options.measureText,
|
|
40460
|
+
pairs: match.pairs,
|
|
40461
|
+
wholePairs,
|
|
40462
|
+
ghostIds,
|
|
40463
|
+
flattenedOutgoing,
|
|
40464
|
+
flattenedIncoming,
|
|
40465
|
+
pieceToIds,
|
|
40466
|
+
risingIds: bodies.rising,
|
|
40467
|
+
animated: (id) => incomingAnimations.has(id)
|
|
40468
|
+
});
|
|
40469
|
+
const overlayIncomingAnimations = settleMorphLifts({
|
|
40470
|
+
durationMs,
|
|
40471
|
+
lifted,
|
|
40472
|
+
pieces,
|
|
40473
|
+
pieceFromIds,
|
|
40474
|
+
pieceToIds,
|
|
40475
|
+
incomingAnimations,
|
|
40476
|
+
outgoingAnimations,
|
|
40477
|
+
outlineAnimations,
|
|
40478
|
+
outlineStrandAnimations,
|
|
40479
|
+
customGeometryAnimations,
|
|
40480
|
+
keyframes
|
|
40481
|
+
});
|
|
40482
|
+
const overlay = assembleMorphOverlay({
|
|
40483
|
+
animations,
|
|
40484
|
+
pairs: match.pairs,
|
|
40485
|
+
wholePairs,
|
|
40486
|
+
ghostIds,
|
|
40487
|
+
ghostElements,
|
|
40488
|
+
flattenedOutgoing,
|
|
40489
|
+
flattenedIncoming,
|
|
40490
|
+
pieces,
|
|
40491
|
+
outgoingAnimations,
|
|
40492
|
+
overlayIncomingAnimations
|
|
40493
|
+
});
|
|
40494
|
+
return {
|
|
40495
|
+
keyframesCss: keyframes.join("\n"),
|
|
40496
|
+
incomingAnimations,
|
|
40497
|
+
outgoingAnimations,
|
|
40498
|
+
incomingImageAnimations: channels.incomingImageAnimations,
|
|
40499
|
+
outgoingImageAnimations: channels.outgoingImageAnimations,
|
|
40500
|
+
overlayIncomingAnimations,
|
|
40501
|
+
outgoingElements: overlay.outgoingElements,
|
|
40502
|
+
outgoingTextReplacements: new Map(
|
|
40503
|
+
[...offstageRestyles].filter(([id]) => ghostIds.has(id)).map(([id, target]) => [id, target.id])
|
|
40504
|
+
),
|
|
40505
|
+
overlayIncomingElements: overlay.overlayIncomingElements,
|
|
40506
|
+
overlayLayers: overlay.overlayLayers,
|
|
40507
|
+
overlayStack: overlay.overlayStack,
|
|
40508
|
+
crossfadeGroups: overlay.crossfadeGroups,
|
|
40509
|
+
...pieces.sources.size > 0 ? { textPieceSources: pieces.sources } : {},
|
|
40510
|
+
...bodies.parts.size > 0 ? { morphCopyParts: bodies.parts } : {},
|
|
40511
|
+
...outlineAnimations.size > 0 ? { outlineAnimations } : {},
|
|
40512
|
+
...outlineStrandAnimations.size > 0 ? { outlineStrandAnimations } : {},
|
|
40513
|
+
...customGeometryAnimations.size > 0 ? { customGeometryAnimations } : {},
|
|
40514
|
+
...channels.lineAnimations.size > 0 ? { lineAnimations: channels.lineAnimations } : {},
|
|
40515
|
+
durationMs
|
|
40516
|
+
};
|
|
40517
|
+
}
|
|
40296
40518
|
var TEXT_DIRECTION_OPTIONS = [
|
|
40297
40519
|
["horizontal", "Horizontal"],
|
|
40298
40520
|
["vertical", "Vertical"],
|
|
@@ -51005,7 +51227,7 @@ function fontMimeForFormat(format2) {
|
|
|
51005
51227
|
function normalizeFontFormat(format2) {
|
|
51006
51228
|
return typeof format2 === "string" && FONT_FORMAT_ALLOWED.has(format2) ? format2 : DEFAULT_FONT_FORMAT;
|
|
51007
51229
|
}
|
|
51008
|
-
function resolveFontVariant(font,
|
|
51230
|
+
function resolveFontVariant(font, mintObjectUrl2) {
|
|
51009
51231
|
const name = typeof font.name === "string" ? font.name.trim() : "";
|
|
51010
51232
|
if (name.length === 0 || FONT_NAME_UNSAFE_CHARS.test(name)) {
|
|
51011
51233
|
return null;
|
|
@@ -51022,7 +51244,7 @@ function resolveFontVariant(font, mintObjectUrl) {
|
|
|
51022
51244
|
const detected = pptx.detectFontFormat(clearBytes);
|
|
51023
51245
|
const format2 = FONT_FORMAT_ALLOWED.has(detected) ? detected : DEFAULT_FONT_FORMAT;
|
|
51024
51246
|
const mime = fontMimeForFormat(format2);
|
|
51025
|
-
const objectUrl =
|
|
51247
|
+
const objectUrl = mintObjectUrl2(clearBytes, mime);
|
|
51026
51248
|
if (!objectUrl) {
|
|
51027
51249
|
return null;
|
|
51028
51250
|
}
|
|
@@ -51057,13 +51279,13 @@ function buildUserFontFaceStyles(fonts) {
|
|
|
51057
51279
|
}
|
|
51058
51280
|
return rules.join("\n\n");
|
|
51059
51281
|
}
|
|
51060
|
-
function buildEmbeddedFontStyles(fonts,
|
|
51282
|
+
function buildEmbeddedFontStyles(fonts, mintObjectUrl2) {
|
|
51061
51283
|
const trusted = new Set(selectTrustedEmbeddedFonts(fonts));
|
|
51062
51284
|
const variants = [];
|
|
51063
51285
|
const registered = [];
|
|
51064
51286
|
const objectUrls = [];
|
|
51065
51287
|
for (const font of fonts ?? []) {
|
|
51066
|
-
const variant = resolveFontVariant(font,
|
|
51288
|
+
const variant = resolveFontVariant(font, mintObjectUrl2);
|
|
51067
51289
|
if (!variant) {
|
|
51068
51290
|
continue;
|
|
51069
51291
|
}
|
|
@@ -51088,6 +51310,62 @@ function buildEmbeddedFontStyles(fonts, mintObjectUrl) {
|
|
|
51088
51310
|
return { fontFaceCss, fontFamilies, objectUrls };
|
|
51089
51311
|
}
|
|
51090
51312
|
|
|
51313
|
+
// src/pptx/render/embedded-fonts-sheet.ts
|
|
51314
|
+
function hasObjectUrlSupport() {
|
|
51315
|
+
return typeof URL !== "undefined" && typeof URL.createObjectURL === "function" && typeof URL.revokeObjectURL === "function" && typeof Blob !== "undefined";
|
|
51316
|
+
}
|
|
51317
|
+
var mintObjectUrl = (bytes, mime) => {
|
|
51318
|
+
if (!hasObjectUrlSupport()) {
|
|
51319
|
+
return null;
|
|
51320
|
+
}
|
|
51321
|
+
const copy = new Uint8Array(bytes.length);
|
|
51322
|
+
copy.set(bytes);
|
|
51323
|
+
return URL.createObjectURL(new Blob([copy], { type: mime }));
|
|
51324
|
+
};
|
|
51325
|
+
function createEmbeddedFontsSheet(doc, styleId) {
|
|
51326
|
+
let liveUrls = [];
|
|
51327
|
+
let lastFonts;
|
|
51328
|
+
const revoke = (urls) => {
|
|
51329
|
+
if (hasObjectUrlSupport()) {
|
|
51330
|
+
for (const url of urls) {
|
|
51331
|
+
URL.revokeObjectURL(url);
|
|
51332
|
+
}
|
|
51333
|
+
}
|
|
51334
|
+
};
|
|
51335
|
+
const remove = () => {
|
|
51336
|
+
doc.getElementById(styleId)?.remove();
|
|
51337
|
+
};
|
|
51338
|
+
return {
|
|
51339
|
+
set(fonts) {
|
|
51340
|
+
if (fonts === lastFonts) {
|
|
51341
|
+
return;
|
|
51342
|
+
}
|
|
51343
|
+
lastFonts = fonts;
|
|
51344
|
+
const previous = liveUrls;
|
|
51345
|
+
const { fontFaceCss, objectUrls } = buildEmbeddedFontStyles(fonts, mintObjectUrl);
|
|
51346
|
+
liveUrls = objectUrls;
|
|
51347
|
+
if (fontFaceCss.length === 0) {
|
|
51348
|
+
remove();
|
|
51349
|
+
} else {
|
|
51350
|
+
let style = doc.getElementById(styleId);
|
|
51351
|
+
if (!style) {
|
|
51352
|
+
style = doc.createElement("style");
|
|
51353
|
+
style.id = styleId;
|
|
51354
|
+
doc.head.appendChild(style);
|
|
51355
|
+
}
|
|
51356
|
+
style.textContent = fontFaceCss;
|
|
51357
|
+
}
|
|
51358
|
+
revoke(previous);
|
|
51359
|
+
},
|
|
51360
|
+
dispose() {
|
|
51361
|
+
remove();
|
|
51362
|
+
revoke(liveUrls);
|
|
51363
|
+
liveUrls = [];
|
|
51364
|
+
lastFonts = void 0;
|
|
51365
|
+
}
|
|
51366
|
+
};
|
|
51367
|
+
}
|
|
51368
|
+
|
|
51091
51369
|
// src/pptx/render/google-webfonts-link.ts
|
|
51092
51370
|
function syncGoogleWebfontStylesheet(doc, id, href) {
|
|
51093
51371
|
const existing = doc.getElementById(id);
|
|
@@ -52323,11 +52601,11 @@ function zoomOutScale(scale3) {
|
|
|
52323
52601
|
}
|
|
52324
52602
|
var ZOOM_MIN_PERCENT = MIN_ZOOM_SCALE * 100;
|
|
52325
52603
|
var ZOOM_MAX_PERCENT = MAX_ZOOM_SCALE * 100;
|
|
52326
|
-
function zoomInPercent(
|
|
52327
|
-
return Math.round(zoomInScale(
|
|
52604
|
+
function zoomInPercent(percent6) {
|
|
52605
|
+
return Math.round(zoomInScale(percent6 / 100) * 100);
|
|
52328
52606
|
}
|
|
52329
|
-
function zoomOutPercent(
|
|
52330
|
-
return Math.round(zoomOutScale(
|
|
52607
|
+
function zoomOutPercent(percent6) {
|
|
52608
|
+
return Math.round(zoomOutScale(percent6 / 100) * 100);
|
|
52331
52609
|
}
|
|
52332
52610
|
|
|
52333
52611
|
// src/pptx/render/viewer-zoom-store.ts
|
|
@@ -58689,13 +58967,13 @@ function fixedTileStyle(element, x, y, width, height) {
|
|
|
58689
58967
|
const safeHeight = Math.max(element.height, 1);
|
|
58690
58968
|
return {
|
|
58691
58969
|
position: "absolute",
|
|
58692
|
-
left:
|
|
58693
|
-
top:
|
|
58694
|
-
width:
|
|
58695
|
-
height:
|
|
58970
|
+
left: percent4((x - element.x) / safeWidth),
|
|
58971
|
+
top: percent4((y - element.y) / safeHeight),
|
|
58972
|
+
width: percent4(width / safeWidth),
|
|
58973
|
+
height: percent4(height / safeHeight)
|
|
58696
58974
|
};
|
|
58697
58975
|
}
|
|
58698
|
-
function
|
|
58976
|
+
function percent4(value) {
|
|
58699
58977
|
return `${Math.round(value * 1e5) / 1e3}%`;
|
|
58700
58978
|
}
|
|
58701
58979
|
|
|
@@ -67090,14 +67368,14 @@ function resolveAccentHex(themeColorMap, slot) {
|
|
|
67090
67368
|
|
|
67091
67369
|
// src/pptx/render/ribbon-galleries/picture-color-gallery.ts
|
|
67092
67370
|
var KEY2 = "pptx.gallery.pictureColor";
|
|
67093
|
-
function saturationPreset(
|
|
67094
|
-
const sat =
|
|
67095
|
-
const normal =
|
|
67371
|
+
function saturationPreset(percent6) {
|
|
67372
|
+
const sat = percent6 * 1e3;
|
|
67373
|
+
const normal = percent6 === NEUTRAL_SATURATION_PERCENT;
|
|
67096
67374
|
return {
|
|
67097
|
-
id: normal ? "saturationNormal" : `saturation${
|
|
67375
|
+
id: normal ? "saturationNormal" : `saturation${percent6}`,
|
|
67098
67376
|
labelKey: normal ? `${KEY2}.saturationNormal` : `${KEY2}.saturation`,
|
|
67099
|
-
...!normal && { labelParams: { amount:
|
|
67100
|
-
label: normal ? "Saturation: 100% (Normal)" : `Saturation: ${
|
|
67377
|
+
...!normal && { labelParams: { amount: percent6 } },
|
|
67378
|
+
label: normal ? "Saturation: 100% (Normal)" : `Saturation: ${percent6}%`,
|
|
67101
67379
|
changes: () => ({ colorSaturation: normal ? void 0 : { sat } }),
|
|
67102
67380
|
applied: (fx2) => (fx2.colorSaturation?.sat ?? NEUTRAL_SATURATION_PERCENT * 1e3) === sat,
|
|
67103
67381
|
preview: { css: getImageCorrectionsFilterTokens({ colorSaturation: { sat } }).join(" ") }
|
|
@@ -67165,14 +67443,14 @@ function recolorPresets(themeColorMap) {
|
|
|
67165
67443
|
applied: isWashout,
|
|
67166
67444
|
preview: { css: "brightness(1.7) contrast(0.3)" }
|
|
67167
67445
|
};
|
|
67168
|
-
const biLevels = BI_LEVEL_THRESHOLDS.map((
|
|
67169
|
-
id: `recolorBlackWhite${
|
|
67446
|
+
const biLevels = BI_LEVEL_THRESHOLDS.map((percent6) => ({
|
|
67447
|
+
id: `recolorBlackWhite${percent6}`,
|
|
67170
67448
|
labelKey: `${KEY2}.recolorBlackWhite`,
|
|
67171
|
-
labelParams: { amount:
|
|
67172
|
-
label: `Black and White: ${
|
|
67173
|
-
changes: (fx2) => ({ ...recolorReset(fx2), biLevel:
|
|
67174
|
-
applied: (fx2) => fx2.biLevel ===
|
|
67175
|
-
preview: { threshold:
|
|
67449
|
+
labelParams: { amount: percent6 },
|
|
67450
|
+
label: `Black and White: ${percent6}%`,
|
|
67451
|
+
changes: (fx2) => ({ ...recolorReset(fx2), biLevel: percent6 }),
|
|
67452
|
+
applied: (fx2) => fx2.biLevel === percent6,
|
|
67453
|
+
preview: { threshold: percent6 }
|
|
67176
67454
|
}));
|
|
67177
67455
|
const accents = RECOLOR_ACCENTS.flatMap((slot, index) => {
|
|
67178
67456
|
const hex2 = resolveAccentHex(themeColorMap, slot);
|
|
@@ -67230,20 +67508,20 @@ var PICTURE_COLOR_GALLERY = adjustGalleryModule(
|
|
|
67230
67508
|
|
|
67231
67509
|
// src/pptx/render/ribbon-galleries/picture-corrections-gallery.ts
|
|
67232
67510
|
var KEY3 = "pptx.gallery.pictureCorrections";
|
|
67233
|
-
function sharpenPreset(
|
|
67234
|
-
const amount =
|
|
67235
|
-
const abs = Math.abs(
|
|
67236
|
-
const id =
|
|
67237
|
-
const css =
|
|
67511
|
+
function sharpenPreset(percent6) {
|
|
67512
|
+
const amount = percent6 * 1e3;
|
|
67513
|
+
const abs = Math.abs(percent6);
|
|
67514
|
+
const id = percent6 < 0 ? `soften${abs}` : percent6 > 0 ? `sharpen${abs}` : "sharpenNormal";
|
|
67515
|
+
const css = percent6 < 0 ? getImageCorrectionsFilterTokens({ sharpenSoften: { amount } }).join(" ") : (
|
|
67238
67516
|
// A sharpen is an SVG convolution at render time; a contrast lift previews it.
|
|
67239
|
-
|
|
67517
|
+
percent6 > 0 ? `contrast(${1 + percent6 / 200})` : ""
|
|
67240
67518
|
);
|
|
67241
67519
|
return {
|
|
67242
67520
|
id,
|
|
67243
|
-
labelKey:
|
|
67244
|
-
...
|
|
67245
|
-
label:
|
|
67246
|
-
changes: () => ({ sharpenSoften:
|
|
67521
|
+
labelKey: percent6 === 0 ? `${KEY3}.sharpenNormal` : `${KEY3}.${percent6 < 0 ? "soften" : "sharpen"}`,
|
|
67522
|
+
...percent6 !== 0 && { labelParams: { amount: abs } },
|
|
67523
|
+
label: percent6 === 0 ? "Sharpen: 0% (Normal)" : `${percent6 < 0 ? "Soften" : "Sharpen"}: ${abs}%`,
|
|
67524
|
+
changes: () => ({ sharpenSoften: percent6 === 0 ? void 0 : { amount } }),
|
|
67247
67525
|
applied: (fx2) => (fx2.sharpenSoften?.amount ?? 0) === amount,
|
|
67248
67526
|
preview: { css }
|
|
67249
67527
|
};
|
|
@@ -79802,7 +80080,10 @@ function formatAge(timestamp, t2, now) {
|
|
|
79802
80080
|
}
|
|
79803
80081
|
return t2("pptx.autosave.minutesAgo", { count: minutes });
|
|
79804
80082
|
}
|
|
79805
|
-
function resolveStatusBarSave(t2, autosave, dirty, now = Date.now()) {
|
|
80083
|
+
function resolveStatusBarSave(t2, autosave, dirty, now = Date.now(), progress) {
|
|
80084
|
+
if (progress) {
|
|
80085
|
+
return { text: progress.text, kind: "saving", announcement: progress.announcement };
|
|
80086
|
+
}
|
|
79806
80087
|
if (autosave?.state === "saving") {
|
|
79807
80088
|
return { text: t2("pptx.autosave.saving"), kind: "saving" };
|
|
79808
80089
|
}
|
|
@@ -79830,7 +80111,13 @@ function statusBarViewMode(mode, sorterOpen = false) {
|
|
|
79830
80111
|
return mode === "edit" ? "normal" : void 0;
|
|
79831
80112
|
}
|
|
79832
80113
|
function statusBarState(host2) {
|
|
79833
|
-
const save = resolveStatusBarSave(
|
|
80114
|
+
const save = resolveStatusBarSave(
|
|
80115
|
+
host2.translate,
|
|
80116
|
+
host2.autosave,
|
|
80117
|
+
host2.dirty,
|
|
80118
|
+
host2.now,
|
|
80119
|
+
host2.saveProgress
|
|
80120
|
+
);
|
|
79834
80121
|
const handles = (id) => host2.handles?.[id] !== false;
|
|
79835
80122
|
const hidden = (id) => isActionHidden(id, host2.hiddenActions);
|
|
79836
80123
|
const zoom = hidden("zoom") ? void 0 : host2.zoomPercent;
|
|
@@ -79839,6 +80126,7 @@ function statusBarState(host2) {
|
|
|
79839
80126
|
activeSlideIndex: host2.activeSlideIndex,
|
|
79840
80127
|
saveText: save.text,
|
|
79841
80128
|
saveKind: save.kind,
|
|
80129
|
+
...save.announcement ? { saveAnnouncement: save.announcement } : {},
|
|
79842
80130
|
...zoom === void 0 ? {} : { zoomPercent: zoom },
|
|
79843
80131
|
showNotes: handles("notes") && !hidden("notes"),
|
|
79844
80132
|
notesExpanded: host2.notesExpanded === true,
|
|
@@ -80375,6 +80663,16 @@ function mountPoint(host2) {
|
|
|
80375
80663
|
}
|
|
80376
80664
|
return doc?.body ?? null;
|
|
80377
80665
|
}
|
|
80666
|
+
var MESSAGE_DIALOG_TAG = "office-ui-message-dialog";
|
|
80667
|
+
function createMessageDialog(parent) {
|
|
80668
|
+
const doc = parent.ownerDocument ?? (parent instanceof Document ? parent : null);
|
|
80669
|
+
const registered = doc?.defaultView?.customElements?.get(MESSAGE_DIALOG_TAG);
|
|
80670
|
+
const dialog = doc?.createElement(MESSAGE_DIALOG_TAG) ?? null;
|
|
80671
|
+
if (!dialog || !registered || !(dialog instanceof registered)) {
|
|
80672
|
+
return null;
|
|
80673
|
+
}
|
|
80674
|
+
return dialog;
|
|
80675
|
+
}
|
|
80378
80676
|
function run(pending3) {
|
|
80379
80677
|
const { options, kind } = pending3;
|
|
80380
80678
|
const parent = mountPoint(options.host);
|
|
@@ -80383,8 +80681,8 @@ function run(pending3) {
|
|
|
80383
80681
|
return;
|
|
80384
80682
|
}
|
|
80385
80683
|
defineMessageDialog();
|
|
80386
|
-
const dialog = parent
|
|
80387
|
-
if (!
|
|
80684
|
+
const dialog = createMessageDialog(parent);
|
|
80685
|
+
if (!dialog) {
|
|
80388
80686
|
pending3.settle({ confirmed: false, value: "" });
|
|
80389
80687
|
return;
|
|
80390
80688
|
}
|
|
@@ -80397,7 +80695,7 @@ function run(pending3) {
|
|
|
80397
80695
|
if (options.label) dialog.inputLabel = options.label;
|
|
80398
80696
|
dialog.value = options.defaultValue ?? "";
|
|
80399
80697
|
dialog.placeholder = options.placeholder ?? "";
|
|
80400
|
-
const { resultEvent } =
|
|
80698
|
+
const { resultEvent } = dialog.constructor;
|
|
80401
80699
|
const onResult = (event) => {
|
|
80402
80700
|
event.stopPropagation();
|
|
80403
80701
|
dialog.removeEventListener(resultEvent, onResult);
|
|
@@ -83396,10 +83694,10 @@ function statusLine(vm) {
|
|
|
83396
83694
|
if (!vm.opening) return lit.nothing;
|
|
83397
83695
|
const entry6 = vm.entries.find((candidate) => candidate.id === vm.opening);
|
|
83398
83696
|
const name = entry6?.name ?? text4.openLink;
|
|
83399
|
-
const
|
|
83400
|
-
const message =
|
|
83697
|
+
const percent6 = progress?.total && progress.total > 0 ? Math.min(100, Math.round(progress.loaded / progress.total * 100)) : void 0;
|
|
83698
|
+
const message = percent6 === void 0 ? fillLabel(text4.opening, { name }) : fillLabel(text4.openingPercent, { name, percent: String(percent6) });
|
|
83401
83699
|
return lit.html`<div class="status"
|
|
83402
|
-
><span role="status" data-progress=${ifDefined_js.ifDefined(
|
|
83700
|
+
><span role="status" data-progress=${ifDefined_js.ifDefined(percent6)}>${message}</span
|
|
83403
83701
|
><button type="button" data-action="cancel" @click=${vm.cancel}>${text4.cancel}</button></div
|
|
83404
83702
|
>`;
|
|
83405
83703
|
}
|
|
@@ -84679,13 +84977,13 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
84679
84977
|
labelOptions: labels
|
|
84680
84978
|
};
|
|
84681
84979
|
}
|
|
84682
|
-
var chartFormatLocale = (value) => i18n.normalizeLocale(value,
|
|
84980
|
+
var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkZHVKGGLQ_cjs.CHART_FORMAT_LOCALES, "en");
|
|
84683
84981
|
function chartFormatTranslator(locale, override) {
|
|
84684
|
-
const strings =
|
|
84982
|
+
const strings = chunkZHVKGGLQ_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
|
|
84685
84983
|
return (key, params, fallback) => {
|
|
84686
84984
|
const own = override?.(key, params, fallback);
|
|
84687
84985
|
if (own && own !== key) return own;
|
|
84688
|
-
return strings[key] ??
|
|
84986
|
+
return strings[key] ?? chunkZHVKGGLQ_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
|
|
84689
84987
|
};
|
|
84690
84988
|
}
|
|
84691
84989
|
|
|
@@ -87133,7 +87431,7 @@ var OfficeUiSelect = class extends OfficeElement {
|
|
|
87133
87431
|
var defineSelect = definer("office-ui-select", () => OfficeUiSelect);
|
|
87134
87432
|
|
|
87135
87433
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/chrome/status-bar.css?raw
|
|
87136
|
-
var status_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: var(--office-status-bar-height);\n padding: 0 var(--office-space-2);\n font-size: var(--office-font-size-xs);\n background: var(--office-surface);\n color: var(--office-foreground);\n border-top: var(--office-border-width) solid var(--office-border);\n font-family: var(--office-font);\n}\n::slotted([slot='end']) {\n margin-inline-start: auto;\n}\n.bar {\n display: contents;\n}\n[hidden] {\n display: none !important;\n}\n:host([data-controlled]) {\n display: block;\n flex: none;\n padding: 0;\n gap: 0;\n}\n:host([data-controlled]) .bar {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n width: 100%;\n min-height: var(--office-status-bar-height);\n padding: var(--office-space-0) var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n:host([data-controlled]) ::slotted([slot='end']) {\n margin-inline-start: 0;\n}\n.items {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n.item {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* The page counter is the one text that stays whole. */\n.item[aria-live] {\n flex: none;\n}\n.item + .item::before {\n content: '';\n display: inline-block;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-2);\n vertical-align: middle;\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.item.saving {\n color: var(--office-warning);\n}\n.item.error {\n color: var(--office-danger);\n}\n.spacer {\n flex: 1;\n}\n.toggles,\n.group {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.sep {\n flex: none;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-0);\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.bar button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: var(--office-control-height-xs);\n min-height: var(--office-control-height-xs);\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n touch-action: manipulation;\n}\n.bar button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button[aria-pressed='true'] {\n color: var(--office-accent);\n}\n.bar button:active {\n opacity: 0.8;\n}\n.bar button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.bar svg {\n flex: none;\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.toggle svg,\n.zoom-step svg {\n width: var(--office-icon-size-sm);\n height: var(--office-icon-size-sm);\n}\n.zoom-fit {\n min-width: var(--office-zoom-value-width);\n font-variant-numeric: tabular-nums;\n}\n@media (max-width: 767px) {\n .narrow-hide,\n .toggle .label {\n display: none !important;\n }\n}\n@media (pointer: coarse) {\n .bar button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n@media (forced-colors: active) {\n :host {\n background: Canvas;\n color: CanvasText;\n border-top-color: CanvasText;\n }\n .bar button {\n color: ButtonText;\n }\n .bar button:hover {\n background: Highlight;\n color: HighlightText;\n }\n .bar button[aria-pressed='true'] {\n border: var(--office-border-width) solid Highlight;\n }\n .bar button:focus-visible {\n outline-color: Highlight;\n }\n .sep,\n .item + .item::before {\n background: CanvasText;\n }\n}\n";
|
|
87434
|
+
var status_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: var(--office-status-bar-height);\n padding: 0 var(--office-space-2);\n font-size: var(--office-font-size-xs);\n background: var(--office-surface);\n color: var(--office-foreground);\n border-top: var(--office-border-width) solid var(--office-border);\n font-family: var(--office-font);\n}\n::slotted([slot='end']) {\n margin-inline-start: auto;\n}\n.bar {\n display: contents;\n}\n[hidden] {\n display: none !important;\n}\n:host([data-controlled]) {\n display: block;\n flex: none;\n padding: 0;\n gap: 0;\n}\n:host([data-controlled]) .bar {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n width: 100%;\n min-height: var(--office-status-bar-height);\n padding: var(--office-space-0) var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n:host([data-controlled]) ::slotted([slot='end']) {\n margin-inline-start: 0;\n}\n.items {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n.item {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* The page counter is the one text that stays whole. */\n.item[aria-live] {\n flex: none;\n}\n.item + .item::before {\n content: '';\n display: inline-block;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-2);\n vertical-align: middle;\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.item.sr,\n.item.sr::before {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.item.sr::before {\n display: none;\n}\n.item.saving {\n color: var(--office-warning);\n}\n.item.error {\n color: var(--office-danger);\n}\n.spacer {\n flex: 1;\n}\n.toggles,\n.group {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.sep {\n flex: none;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-0);\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.bar button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: var(--office-control-height-xs);\n min-height: var(--office-control-height-xs);\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n touch-action: manipulation;\n}\n.bar button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button[aria-pressed='true'] {\n color: var(--office-accent);\n}\n.bar button:active {\n opacity: 0.8;\n}\n.bar button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.bar svg {\n flex: none;\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.toggle svg,\n.zoom-step svg {\n width: var(--office-icon-size-sm);\n height: var(--office-icon-size-sm);\n}\n.zoom-fit {\n min-width: var(--office-zoom-value-width);\n font-variant-numeric: tabular-nums;\n}\n@media (max-width: 767px) {\n .narrow-hide,\n .toggle .label {\n display: none !important;\n }\n}\n@media (pointer: coarse) {\n .bar button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n@media (forced-colors: active) {\n :host {\n background: Canvas;\n color: CanvasText;\n border-top-color: CanvasText;\n }\n .bar button {\n color: ButtonText;\n }\n .bar button:hover {\n background: Highlight;\n color: HighlightText;\n }\n .bar button[aria-pressed='true'] {\n border: var(--office-border-width) solid Highlight;\n }\n .bar button:focus-visible {\n outline-color: Highlight;\n }\n .sep,\n .item + .item::before {\n background: CanvasText;\n }\n}\n";
|
|
87137
87435
|
|
|
87138
87436
|
// src/chrome/status-bar.ts
|
|
87139
87437
|
var OfficeUiStatusBar = class extends OfficeElement {
|
|
@@ -87214,7 +87512,7 @@ var OfficeUiStatusBar = class extends OfficeElement {
|
|
|
87214
87512
|
items,
|
|
87215
87513
|
(spec5) => spec5.id,
|
|
87216
87514
|
(spec5) => lit.html`<span
|
|
87217
|
-
class="item${spec5.tone === "saving" ? " saving" : ""}${spec5.tone === "error" ? " error" : ""}${spec5.narrowHide ? " narrow-hide" : ""}"
|
|
87515
|
+
class="item${spec5.tone === "saving" ? " saving" : ""}${spec5.tone === "error" ? " error" : ""}${spec5.narrowHide ? " narrow-hide" : ""}${spec5.srOnly ? " sr" : ""}"
|
|
87218
87516
|
data-item=${spec5.id}
|
|
87219
87517
|
title=${ifDefined_js.ifDefined(spec5.title)}
|
|
87220
87518
|
aria-live=${ifDefined_js.ifDefined(spec5.live ? "polite" : void 0)}
|
|
@@ -88193,7 +88491,7 @@ var defineChartDataSheet = definer(
|
|
|
88193
88491
|
var progress_dialog_default = ":host {\n display: none;\n position: fixed;\n inset: 0;\n /* Above popovers and the File backstage the job is started from. */\n z-index: calc(var(--office-z-popover) + 100);\n align-items: center;\n justify-content: center;\n}\n:host([open]) {\n display: flex;\n}\n.backdrop {\n position: absolute;\n inset: 0;\n background: var(--office-overlay);\n}\n.box {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: var(--office-space-3);\n width: min(calc(100vw - 2 * var(--office-space-4)), 24rem);\n padding: var(--office-space-5);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-lg);\n background: var(--office-popover);\n color: var(--office-popover-foreground);\n box-shadow: var(--office-shadow-lg);\n font-family: var(--office-font);\n}\nh2 {\n margin: 0;\n font-size: var(--office-font-size);\n font-weight: 600;\n}\n.track {\n height: var(--office-space-2-5);\n overflow: hidden;\n border-radius: var(--office-radius-full);\n background: var(--office-selected);\n}\n.fill {\n height: 100%;\n border-radius: inherit;\n background: var(--office-accent);\n transition: width 300ms ease-out;\n}\n.row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-2);\n font-size: var(--office-font-size-xs);\n color: var(--office-muted-foreground);\n}\n.percent {\n font-variant-numeric: tabular-nums;\n}\n.actions {\n display: flex;\n justify-content: flex-end;\n}\nbutton {\n box-sizing: border-box;\n min-height: var(--office-control-height-lg);\n padding: var(--office-space-1-5) var(--office-space-3-5);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-md);\n background: var(--office-surface);\n color: var(--office-foreground);\n font: 500 var(--office-font-size) / 1.2 var(--office-font);\n cursor: pointer;\n}\nbutton:hover {\n background: var(--office-selected);\n}\nbutton:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n@media (prefers-reduced-motion: reduce) {\n .fill {\n transition: none;\n }\n}\n@media (pointer: coarse) {\n button {\n min-height: var(--office-target-size-touch);\n }\n}\n@media (forced-colors: active) {\n .fill {\n background: Highlight;\n }\n .track {\n border: var(--office-border-width) solid CanvasText;\n }\n}\n";
|
|
88194
88492
|
|
|
88195
88493
|
// src/dialog/progress-dialog.ts
|
|
88196
|
-
function
|
|
88494
|
+
function percent5(value) {
|
|
88197
88495
|
return Number.isFinite(value) ? Math.min(100, Math.max(0, Math.round(value))) : 0;
|
|
88198
88496
|
}
|
|
88199
88497
|
var OfficeUiProgressDialog = class extends OfficeElement {
|
|
@@ -88257,7 +88555,7 @@ var OfficeUiProgressDialog = class extends OfficeElement {
|
|
|
88257
88555
|
const { testIdPrefix: p } = this.constructor;
|
|
88258
88556
|
const s = this.model;
|
|
88259
88557
|
if (!s.open) return lit.html``;
|
|
88260
|
-
const value =
|
|
88558
|
+
const value = percent5(s.progress);
|
|
88261
88559
|
return lit.html`
|
|
88262
88560
|
<div class="backdrop"></div>
|
|
88263
88561
|
<div
|
|
@@ -89806,7 +90104,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
89806
90104
|
if (this.#live || this.#draw) {
|
|
89807
90105
|
return;
|
|
89808
90106
|
}
|
|
89809
|
-
this.#live = import('./smartart-insert-preview-
|
|
90107
|
+
this.#live = import('./smartart-insert-preview-UP6DYY42.cjs').then((module) => {
|
|
89810
90108
|
if (this.#draw || !this.#picker) {
|
|
89811
90109
|
return;
|
|
89812
90110
|
}
|
|
@@ -93819,7 +94117,9 @@ function officeStatusBarState(state) {
|
|
|
93819
94117
|
}) : t2("pptx.statusBar.noSlides")
|
|
93820
94118
|
},
|
|
93821
94119
|
{ id: "language", text: t2("pptx.statusBar.language"), narrowHide: true },
|
|
93822
|
-
{ id: "save", text: state.saveText, tone: state.saveKind, narrowHide: true }
|
|
94120
|
+
{ id: "save", text: state.saveText, tone: state.saveKind, narrowHide: true },
|
|
94121
|
+
// Announced politely and only on steps worth hearing; the visible text above is not live.
|
|
94122
|
+
{ id: "save-live", text: state.saveAnnouncement ?? "", live: true, srOnly: true }
|
|
93823
94123
|
],
|
|
93824
94124
|
toggles: [
|
|
93825
94125
|
{
|
|
@@ -99122,6 +99422,7 @@ exports.RUN_PROGRAM_NOTICE_METRICS = RUN_PROGRAM_NOTICE_METRICS;
|
|
|
99122
99422
|
exports.SATURATION_PERCENTS = SATURATION_PERCENTS;
|
|
99123
99423
|
exports.SAVE_FAILED_TOAST = SAVE_FAILED_TOAST;
|
|
99124
99424
|
exports.SAVE_FAILED_TOAST_CODE = SAVE_FAILED_TOAST_CODE;
|
|
99425
|
+
exports.SAVE_PROGRESS_TEXT_KEYS = SAVE_PROGRESS_TEXT_KEYS;
|
|
99125
99426
|
exports.SAVE_TAB = SAVE_TAB;
|
|
99126
99427
|
exports.SCREEN_TIP_CHOICES = SCREEN_TIP_CHOICES;
|
|
99127
99428
|
exports.SECTION_HEADING = SECTION_HEADING;
|
|
@@ -99805,6 +100106,7 @@ exports.createDeckStyleHost = createDeckStyleHost;
|
|
|
99805
100106
|
exports.createDefaultChartElement = createDefaultChartElement;
|
|
99806
100107
|
exports.createDefaultChartUserShapeGroupChild = createDefaultChartUserShapeGroupChild;
|
|
99807
100108
|
exports.createEditorHistoryController = createEditorHistoryController;
|
|
100109
|
+
exports.createEmbeddedFontsSheet = createEmbeddedFontsSheet;
|
|
99808
100110
|
exports.createEmbeddedOutlineFontsSlot = createEmbeddedOutlineFontsSlot;
|
|
99809
100111
|
exports.createEnvelopeWarp = createEnvelopeWarp;
|
|
99810
100112
|
exports.createGalleryPreviewController = createGalleryPreviewController;
|
|
@@ -99826,6 +100128,7 @@ exports.createPresenterShowGuard = createPresenterShowGuard;
|
|
|
99826
100128
|
exports.createPresenterTimer = createPresenterTimer;
|
|
99827
100129
|
exports.createPreviewEditGuard = createPreviewEditGuard;
|
|
99828
100130
|
exports.createRibbonControlIcon = createRibbonControlIcon;
|
|
100131
|
+
exports.createSaveProgressController = createSaveProgressController;
|
|
99829
100132
|
exports.createSheetDismissGesture = createSheetDismissGesture;
|
|
99830
100133
|
exports.createSlidePackageClipboard = createSlidePackageClipboard;
|
|
99831
100134
|
exports.createSlideSorterState = createSlideSorterState;
|
|
@@ -101080,6 +101383,7 @@ exports.saveAutosaveSnapshot = saveAutosaveSnapshot;
|
|
|
101080
101383
|
exports.saveDeckWithPassword = saveDeckWithPassword;
|
|
101081
101384
|
exports.saveElementAsPicture = saveElementAsPicture;
|
|
101082
101385
|
exports.saveFailureMessage = saveFailureMessage;
|
|
101386
|
+
exports.saveProgressStatus = saveProgressStatus;
|
|
101083
101387
|
exports.saveViewerProfile = saveViewerProfile;
|
|
101084
101388
|
exports.savedPresentationFileName = savedPresentationFileName;
|
|
101085
101389
|
exports.savedPresentationRevision = savedPresentationRevision;
|
|
@@ -101363,6 +101667,7 @@ exports.withInlineListDecorationDefaults = withInlineListDecorationDefaults;
|
|
|
101363
101667
|
exports.withNodeAtPath = withNodeAtPath;
|
|
101364
101668
|
exports.withRecordEntry = withRecordEntry;
|
|
101365
101669
|
exports.withSaveFailureToast = withSaveFailureToast;
|
|
101670
|
+
exports.withSaveProgress = withSaveProgress;
|
|
101366
101671
|
exports.withSlideSizeOrientation = withSlideSizeOrientation;
|
|
101367
101672
|
exports.wrapEnvelopeParagraph = wrapEnvelopeParagraph;
|
|
101368
101673
|
exports.wrapForeignObjectSvg = wrapForeignObjectSvg;
|