ooxml-ui 1.46.0 → 1.48.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.
Files changed (65) hide show
  1. package/README.md +1 -1
  2. package/dist/chart/format-pane-axis.d.ts +0 -1
  3. package/dist/chart/format-pane-model.d.ts +0 -1
  4. package/dist/chart/format-pane-targets.d.ts +0 -1
  5. package/dist/chart/format-pane-types.d.ts +0 -1
  6. package/dist/chart/format-pane-view.d.ts +0 -1
  7. package/dist/{chunk-NH33G6LA.js → chunk-G5CALQUW.js} +43 -2
  8. package/dist/{chunk-HNSFEOSG.js → chunk-J3ROBM74.js} +1 -1
  9. package/dist/docx/backstage-options.d.ts +4 -0
  10. package/dist/docx/backstage-trust.d.ts +11 -0
  11. package/dist/docx/docx-webfonts.d.ts +23 -3
  12. package/dist/docx/element-api.d.ts +3 -1
  13. package/dist/docx/font-downloads.d.ts +8 -0
  14. package/dist/docx/locales/en.d.ts +6 -0
  15. package/dist/docx/locales/options.d.ts +6 -0
  16. package/dist/docx/locales/trust.d.ts +15 -0
  17. package/dist/docx/localization-strings.d.ts +6 -0
  18. package/dist/docx.js +154 -13
  19. package/dist/fonts/font-download-policy.d.ts +23 -0
  20. package/dist/fonts/webfonts.d.ts +34 -13
  21. package/dist/fonts/webfonts.d.ts.map +1 -1
  22. package/dist/form/color-input/live-color-input.d.ts +0 -1
  23. package/dist/form/range-control.d.ts +0 -1
  24. package/dist/index.js +2 -2
  25. package/dist/pptx/{chunk-Y5I2GPXN.cjs → chunk-2C2C27ML.cjs} +99 -2
  26. package/dist/pptx/{chunk-Z6HDGNW6.mjs → chunk-C4GZLKDW.mjs} +97 -3
  27. package/dist/pptx/{chunk-F2LOZTP3.mjs → chunk-JUEKQZSB.mjs} +1 -1
  28. package/dist/pptx/{chunk-XPTB4LSI.cjs → chunk-N5WPJIMK.cjs} +42 -42
  29. package/dist/pptx/dom/index.cjs +370 -370
  30. package/dist/pptx/dom/index.mjs +4 -4
  31. package/dist/pptx/index.cjs +3074 -3062
  32. package/dist/pptx/index.mjs +1 -1
  33. package/dist/pptx/render/deck-webfont-readiness.d.ts +11 -0
  34. package/dist/pptx/render/deck-webfont-readiness.d.ts.map +1 -1
  35. package/dist/pptx/render/index.d.ts +2 -0
  36. package/dist/pptx/render/index.d.ts.map +1 -1
  37. package/dist/pptx/render/inline-text-paragraph-marker.d.ts +3 -0
  38. package/dist/pptx/render/inline-text-paragraph-marker.d.ts.map +1 -0
  39. package/dist/pptx/render/inline-trailing-space.d.ts +14 -0
  40. package/dist/pptx/render/inline-trailing-space.d.ts.map +1 -0
  41. package/dist/pptx/render/morph-predicates.d.ts +5 -1
  42. package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
  43. package/dist/pptx/{smartart-insert-preview-O4B3T6TS.cjs → smartart-insert-preview-3BLHZGCE.cjs} +3 -3
  44. package/dist/pptx/{smartart-insert-preview-Q6V3WY7W.mjs → smartart-insert-preview-WRSYENYB.mjs} +2 -2
  45. package/dist/render-cache.d.ts +0 -1
  46. package/dist/teams.js +1 -1
  47. package/dist/theme-bridge.d.ts +0 -1
  48. package/dist/theme.d.ts +0 -1
  49. package/dist/visio/controller.d.ts +6 -0
  50. package/dist/visio/locales/trust-center.d.ts +7 -0
  51. package/dist/visio/viewer-behaviour.d.ts +5 -0
  52. package/dist/visio/viewer-element.d.ts +5 -3
  53. package/dist/visio/viewer-options-categories.d.ts +6 -0
  54. package/dist/visio/viewer-options-trust.d.ts +10 -0
  55. package/dist/visio/viewer-options.d.ts +6 -0
  56. package/dist/visio/viewer-webfonts.d.ts +15 -3
  57. package/dist/visio.js +184 -16
  58. package/dist/xlsx/backstage/options-trust.d.ts +9 -0
  59. package/dist/xlsx/backstage/parts.d.ts +4 -0
  60. package/dist/xlsx/element-api.d.ts +9 -7
  61. package/dist/xlsx/font-downloads.d.ts +8 -0
  62. package/dist/xlsx/webfonts.d.ts +21 -1
  63. package/dist/xlsx.js +130 -20
  64. package/package.json +2 -2
  65. /package/dist/{chunk-6G6KERIZ.js → chunk-MUY444GW.js} +0 -0
@@ -1,15 +1,3 @@
1
- /**
2
- * The browser side of the webfont fallback every product shares: whether a family is installed,
3
- * the managed `<link>` for the CSS2 stylesheet, and a bounded wait for the faces a document draws.
4
- * Which families to request and how is `ooxml-core/text` (`text/webfonts`); a product reduces its
5
- * model to `WebfontRun`s and calls {@link prepareWebfonts} between parsing and showing (or
6
- * relaying out) a document.
7
- *
8
- * Moved from PowerPoint's `render/google-webfonts.ts`, `google-webfonts-link.ts` and
9
- * `deck-webfont-readiness.ts`, which now delegate here.
10
- *
11
- * @module fonts/webfonts
12
- */
13
1
  import { type WebfontFace, type WebfontRun } from 'ooxml-core/text';
14
2
  /**
15
3
  * How long a loaded document may wait for its webfonts before it is shown with stand-in faces:
@@ -28,7 +16,13 @@ export declare const WEBFONT_PROGRESS_DELAY_MS = 400;
28
16
  * differs for at least one fallback class. A false negative only loads a face that was not needed.
29
17
  */
30
18
  export declare function isFontFamilyInstalledLocally(family: string): boolean;
31
- /** Point the managed `<link id>` at `href`, untouched when it already does; `null` removes it. */
19
+ /** The id of the early stylesheet {@link prefetchWebfonts} adds beside a product's link. */
20
+ export declare const prefetchLinkId: (linkId: string) => string;
21
+ /**
22
+ * Point the managed `<link id>` at `href`, untouched when it already does; `null` removes it, and
23
+ * with it the early stylesheet {@link prefetchWebfonts} added for the same product, so turning
24
+ * downloads off leaves nothing behind.
25
+ */
32
26
  export declare function syncGoogleWebfontStylesheet(doc: Document, id: string, href: string | null): HTMLLinkElement | null;
33
27
  /** Reset the session cache (test isolation). */
34
28
  export declare function resetWebfontSessionCache(): void;
@@ -38,6 +32,33 @@ export declare function selectWebfontCandidates(families: Iterable<string>, embe
38
32
  export declare function matchWebfontFragments(candidates: readonly string[]): string[];
39
33
  /** The stylesheet href for the candidates, or `null` (also when `base` is `null`: off). */
40
34
  export declare function webfontHref(candidates: readonly string[], base: string | null): string | null;
35
+ export interface PrefetchWebfontsOptions {
36
+ document: Document;
37
+ /** The product's managed `<link>` id; the early stylesheet takes `<id>-prefetch`. */
38
+ linkId: string;
39
+ /** The file as it arrived, before parsing. */
40
+ bytes: Uint8Array | ArrayBuffer;
41
+ /** From `resolveGoogleFontsCss2Base`; `null` (off) removes any early stylesheet. */
42
+ base: string | null;
43
+ isLocallyInstalled?: (family: string) => boolean;
44
+ }
45
+ /**
46
+ * Start downloading a file's webfonts before it is parsed. The families its package declares
47
+ * (themes, styles, font table; `ooxml-core/opc` `readDeclaredFonts`) that are neither embedded nor
48
+ * installed, and that the catalogue serves, go into an early stylesheet under its own link id, so
49
+ * the browser fetches the CSS while the parse runs and the faces are usually ready by the time
50
+ * {@link prepareWebfonts} waits for them. The exact stylesheet the product builds afterwards from
51
+ * the runs it draws is a separate link, so neither replaces the other's `@font-face` rules
52
+ * mid-load. Font files are only downloaded for faces the page actually uses. Returns the early
53
+ * href, or `null`. Never throws.
54
+ */
55
+ export declare function prefetchWebfonts(options: PrefetchWebfontsOptions): string | null;
56
+ /**
57
+ * Called once a load has parsed (both {@link prepareWebfonts} and PowerPoint's
58
+ * `prepareDeckWebfonts` do): the early stylesheet stops being pending, so a later
59
+ * `syncGoogleWebfontStylesheet(id, null)` removes it, and with downloads off it goes at once.
60
+ */
61
+ export declare function settlePrefetchedWebfonts(doc: Document, linkId: string, base: string | null): void;
41
62
  /** Progress of the wait, by webfont family (the names the stylesheet serves). */
42
63
  export interface WebfontProgress {
43
64
  loaded: number;
@@ -1 +1 @@
1
- {"version":3,"file":"webfonts.d.ts","sourceRoot":"","sources":["../../src/fonts/webfonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAMN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,2DAA2D;AAC3D,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAK7C;;;;;GAKG;AACH,w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,eAAe,EACrB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC,EAClD,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,EAAE;IACR,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,GACC,OAAO,CAAC,gBAAgB,CAAC,CAoD3B"}
@@ -90,4 +90,3 @@ export declare function createLiveColorInput<T, P extends object>(options: LiveC
90
90
  * value the input shows. Any other event, or an input without a value, is ignored.
91
91
  */
92
92
  export declare function handleLiveColorEvent(control: LiveColorInput, event: Event): void;
93
- //# sourceMappingURL=live-color-input.d.ts.map
@@ -11,4 +11,3 @@ export interface RangeControlOptions {
11
11
  }
12
12
  /** Native keyboard, pointer and accessibility behavior shared by Office range controls. */
13
13
  export declare function rangeControl(options: RangeControlOptions): import("lit").TemplateResult<1>;
14
- //# sourceMappingURL=range-control.d.ts.map
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-HNSFEOSG.js';
1
+ export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-J3ROBM74.js';
2
2
  export { createRecoveryScheduler } from './chunk-DA57FPSN.js';
3
3
  export { HOST_REGION_ATTRIBUTE, HostRegionHost, RIBBON_ADD_IN_EVENT, createHostBackstagePages, defineRibbonAddInElements, syncHostMenuChildren, syncRibbonAddIns, tidyMenuSeparators, withHostMenuItems } from './chunk-ZTLP52FH.js';
4
4
  export { OfficeUiSmartArt, OfficeUiSmartArtPicker, OfficeUiSmartArtTextPane, SmartArtTextPaneController, cachedPicturePixels, defineSmartArt, defineSmartArtPicker, defineSmartArtTextPane, needsPicturePixels, picturePaint, pictureSvg, probePicturePixels, renderDiagramDrawing, smartArtColorsGalleryState, smartArtLayoutTileSvg, smartArtStylesGalleryState, smartArtTileSvg } from './chunk-6FFZFH73.js';
5
- export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_CONTRACT, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, bindTeams, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, pickTeamsProps, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-6G6KERIZ.js';
5
+ export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_CONTRACT, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, bindTeams, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, pickTeamsProps, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-MUY444GW.js';
6
6
  export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-4ZSZPUE5.js';
7
7
  import './chunk-CDAXY5KC.js';
8
8
  import './chunk-NDUD5JJB.js';
@@ -38,6 +38,7 @@ var schemaLabelKeys = require('ooxml-core/pptx/editor/render/schema-label-keys')
38
38
  var chartUserShapeEdit = require('ooxml-core/pptx/editor/render/chart-user-shape-edit');
39
39
  var color = require('ooxml-core/color');
40
40
  var bulletList = require('ooxml-core/pptx/editor/render/bullet-list');
41
+ var opc = require('ooxml-core/opc');
41
42
  var tableMerge = require('ooxml-core/pptx/editor/render/table-merge');
42
43
  var tableLayout = require('ooxml-core/pptx/editor/render/table-layout');
43
44
  var tableCellEdit = require('ooxml-core/pptx/editor/render/table-cell-edit');
@@ -22297,10 +22298,13 @@ function isFontFamilyInstalledLocally(family2) {
22297
22298
  return false;
22298
22299
  }
22299
22300
  }
22301
+ var prefetchLinkId = (linkId) => `${linkId}-prefetch`;
22300
22302
  function syncGoogleWebfontStylesheet(doc, id, href) {
22301
22303
  const existing = doc.getElementById(id);
22302
22304
  if (!href) {
22303
22305
  existing?.remove();
22306
+ const early = id.endsWith("-prefetch") ? null : doc.getElementById(prefetchLinkId(id));
22307
+ if (early && !early.dataset["pending"]) early.remove();
22304
22308
  return null;
22305
22309
  }
22306
22310
  if (existing?.getAttribute("href") === href) return existing;
@@ -22329,6 +22333,34 @@ function webfontHref(candidates, base2) {
22329
22333
  if (base2 === null) return null;
22330
22334
  return text$1.buildGoogleFontsHref(matchWebfontFragments(candidates), base2);
22331
22335
  }
22336
+ function prefetchWebfonts(options) {
22337
+ const { document: doc, linkId, bytes, base: base2 } = options;
22338
+ const id = prefetchLinkId(linkId);
22339
+ try {
22340
+ if (base2 === null) {
22341
+ doc.getElementById(id)?.remove();
22342
+ return null;
22343
+ }
22344
+ const declared = opc.readDeclaredFonts(bytes);
22345
+ const candidates = selectWebfontCandidates(
22346
+ declared.families,
22347
+ declared.embedded,
22348
+ options.isLocallyInstalled ?? isFontFamilyInstalledLocally
22349
+ );
22350
+ const href = webfontHref(candidates, base2);
22351
+ const link = syncGoogleWebfontStylesheet(doc, id, href);
22352
+ if (link) link.dataset["pending"] = "1";
22353
+ return href;
22354
+ } catch {
22355
+ return null;
22356
+ }
22357
+ }
22358
+ function settlePrefetchedWebfonts(doc, linkId, base2) {
22359
+ const early = doc.getElementById(prefetchLinkId(linkId));
22360
+ if (!early) return;
22361
+ if (base2 === null) early.remove();
22362
+ else delete early.dataset["pending"];
22363
+ }
22332
22364
  function stylesheetSettled(link) {
22333
22365
  if (link.sheet) return Promise.resolve();
22334
22366
  return new Promise((resolve) => {
@@ -35703,7 +35735,7 @@ function conflictingMorphNames(a, b) {
35703
35735
  }
35704
35736
  function mediaIdentity(el) {
35705
35737
  const props = el;
35706
- return props.imagePath ?? props.imageData ?? props.svgPath ?? props.svgData ?? void 0;
35738
+ return props.svgPath ?? props.svgData ?? props.imagePath ?? props.imageData ?? void 0;
35707
35739
  }
35708
35740
  function centreDistance(a, b) {
35709
35741
  const dx = a.x - b.x;
@@ -49155,6 +49187,14 @@ function collectDeckWebfontRuns(slides) {
49155
49187
  }
49156
49188
  return runs;
49157
49189
  }
49190
+ function prefetchDeckWebfonts(options) {
49191
+ return prefetchWebfonts({
49192
+ document: options.document,
49193
+ linkId: options.linkId,
49194
+ bytes: options.bytes,
49195
+ base: options.googleFontsBase
49196
+ });
49197
+ }
49158
49198
  async function prepareDeckWebfonts(options) {
49159
49199
  const {
49160
49200
  document: doc,
@@ -49168,6 +49208,7 @@ async function prepareDeckWebfonts(options) {
49168
49208
  followMs = DECK_WEBFONT_FOLLOW_MS,
49169
49209
  isLocallyInstalled = isFontFamilyInstalledLocally
49170
49210
  } = options;
49211
+ settlePrefetchedWebfonts(doc, linkId, googleFontsBase);
49171
49212
  if (googleFontsBase === null) {
49172
49213
  return { href: null, families: [], unavailable: [], timedOut: false };
49173
49214
  }
@@ -73373,6 +73414,59 @@ function transformInlineListCase(snapshot, selection, mode) {
73373
73414
  return text4 === snapshot.text ? snapshot : { ...snapshot, text: text4, textSegments };
73374
73415
  }
73375
73416
 
73417
+ // src/pptx/render/inline-text-paragraph-marker.ts
73418
+ function isCaretPlaceholder(element) {
73419
+ const content = Array.from(element.childNodes).filter((child) => {
73420
+ if (child.nodeType === 3) {
73421
+ return (child.nodeValue ?? "").length > 0;
73422
+ }
73423
+ return child instanceof HTMLElement && !child.hasAttribute("data-pptx-bullet-marker");
73424
+ });
73425
+ if (content.length !== 1 || !(content[0] instanceof HTMLElement)) {
73426
+ return false;
73427
+ }
73428
+ return content[0].tagName === "BR" || isCaretPlaceholder(content[0]);
73429
+ }
73430
+ function firstEditableRunIndex(element) {
73431
+ const run2 = element.matches("[data-seg-idx]") && !element.hasAttribute("data-pptx-bullet-marker") ? element : element.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])");
73432
+ return run2?.dataset.segIdx;
73433
+ }
73434
+ function markInsertedParagraph(doc, surface) {
73435
+ const selection = doc.getSelection();
73436
+ const anchor = selection?.anchorNode;
73437
+ const anchorElement = anchor?.nodeType === Node.ELEMENT_NODE ? anchor : anchor?.parentElement;
73438
+ const insertedRun = anchorElement?.closest("[data-seg-idx]");
73439
+ if (!insertedRun || !surface.contains(insertedRun)) {
73440
+ return;
73441
+ }
73442
+ const block = insertedRun.closest("div, p");
73443
+ const isTextFlow = block?.hasAttribute("data-pptx-text-flow");
73444
+ const isSplitTextFlow = isTextFlow && block?.previousElementSibling?.hasAttribute("data-pptx-text-flow") && block.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])") === insertedRun;
73445
+ const caretParagraph = block && block !== surface && (!isTextFlow || isSplitTextFlow) && surface.contains(block) ? block : insertedRun;
73446
+ const previous = caretParagraph.previousElementSibling;
73447
+ const paragraph2 = previous instanceof HTMLElement && firstEditableRunIndex(previous) === insertedRun.dataset.segIdx && isCaretPlaceholder(previous) ? previous : caretParagraph;
73448
+ paragraph2.dataset.pptxParagraphStart = "";
73449
+ }
73450
+
73451
+ // src/pptx/render/inline-trailing-space.ts
73452
+ function spaceBeforeCaretRange(doc) {
73453
+ const selection = doc.getSelection();
73454
+ if (!selection || !selection.isCollapsed || selection.rangeCount === 0) {
73455
+ return null;
73456
+ }
73457
+ const { startContainer, startOffset } = selection.getRangeAt(0);
73458
+ if (startContainer.nodeType !== Node.TEXT_NODE || startOffset === 0) {
73459
+ return null;
73460
+ }
73461
+ if ((startContainer.textContent ?? "").charAt(startOffset - 1) !== " ") {
73462
+ return null;
73463
+ }
73464
+ const range = doc.createRange();
73465
+ range.setStart(startContainer, startOffset - 1);
73466
+ range.setEnd(startContainer, startOffset);
73467
+ return range;
73468
+ }
73469
+
73376
73470
  // src/pptx/render/edit-points/edit-points-svg.ts
73377
73471
  var COMMAND_RE = /[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi;
73378
73472
  var NUMBER_RE2 = /[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
@@ -88326,7 +88420,7 @@ function definePptxInsertSmartArtDialog(registry2) {
88326
88420
  if (this.#live || this.#draw) {
88327
88421
  return;
88328
88422
  }
88329
- this.#live = import('./smartart-insert-preview-O4B3T6TS.cjs').then((module) => {
88423
+ this.#live = import('./smartart-insert-preview-3BLHZGCE.cjs').then((module) => {
88330
88424
  if (this.#draw || !this.#picker) {
88331
88425
  return;
88332
88426
  }
@@ -99034,6 +99128,7 @@ exports.mapReadingViewKey = mapReadingViewKey;
99034
99128
  exports.mapSlideShowStartKey = mapSlideShowStartKey;
99035
99129
  exports.mapSlideSorterKey = mapSlideSorterKey;
99036
99130
  exports.markAnimationGroupActive = markAnimationGroupActive;
99131
+ exports.markInsertedParagraph = markInsertedParagraph;
99037
99132
  exports.maskEdgeDecl = maskEdgeDecl;
99038
99133
  exports.maskEdgeInitialStyle = maskEdgeInitialStyle;
99039
99134
  exports.maskEdgePartialDecl = maskEdgePartialDecl;
@@ -99255,6 +99350,7 @@ exports.pptxChartFormatSource = pptxChartFormatSource;
99255
99350
  exports.pptxLoadErrorMessage = pptxLoadErrorMessage;
99256
99351
  exports.pptxOptionsLabels = pptxOptionsLabels;
99257
99352
  exports.prefersReducedMotion = prefersReducedMotion;
99353
+ exports.prefetchDeckWebfonts = prefetchDeckWebfonts;
99258
99354
  exports.prepareDeckWebfonts = prepareDeckWebfonts;
99259
99355
  exports.prepareElementForInsertion = prepareElementForInsertion;
99260
99356
  exports.prepareElementUpdateBatch = prepareElementUpdateBatch;
@@ -99760,6 +99856,7 @@ exports.sorterGridColumns = sorterGridColumns;
99760
99856
  exports.sorterMenuContext = sorterMenuContext;
99761
99857
  exports.sorterPasteInsertAt = sorterPasteInsertAt;
99762
99858
  exports.sorterSelectionIndexes = sorterSelectionIndexes;
99859
+ exports.spaceBeforeCaretRange = spaceBeforeCaretRange;
99763
99860
  exports.splitCubic = splitCubic;
99764
99861
  exports.splitEastAsianBreaks = splitEastAsianBreaks;
99765
99862
  exports.splitEastAsianRunPieces = splitEastAsianRunPieces;