ooxml-ui 1.50.0 → 1.51.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 (52) hide show
  1. package/dist/chart/format-pane-analysis.d.ts +0 -1
  2. package/dist/chart/format-pane-axis.d.ts +0 -1
  3. package/dist/chart/format-pane-fill-kinds.d.ts +0 -1
  4. package/dist/chart/format-pane-fill-line.d.ts +0 -1
  5. package/dist/chart/format-pane-locales/index.d.ts +0 -1
  6. package/dist/chart/format-pane-model.d.ts +0 -1
  7. package/dist/chart/format-pane-targets.d.ts +0 -1
  8. package/dist/chart/format-pane-text.d.ts +0 -1
  9. package/dist/chart/format-pane-types.d.ts +0 -1
  10. package/dist/chart/format-pane-view.d.ts +0 -1
  11. package/dist/embedding/region-host.d.ts +0 -1
  12. package/dist/image-native-size.d.ts +0 -1
  13. package/dist/picture-effects.d.ts +0 -1
  14. package/dist/pptx/{chunk-74ESWHDZ.mjs → chunk-EU7TGRWX.mjs} +1 -1
  15. package/dist/pptx/{chunk-N7RS46HM.cjs → chunk-OIEN54CC.cjs} +382 -126
  16. package/dist/pptx/{chunk-3YKUOEZ5.cjs → chunk-U6YDJVNS.cjs} +42 -42
  17. package/dist/pptx/{chunk-OWXWCDNG.mjs → chunk-VR6UAL2A.mjs} +361 -124
  18. package/dist/pptx/dom/elements/text-run-content.d.ts.map +1 -1
  19. package/dist/pptx/dom/elements/text-shape.d.ts.map +1 -1
  20. package/dist/pptx/dom/index.cjs +400 -372
  21. package/dist/pptx/dom/index.mjs +34 -6
  22. package/dist/pptx/dom/slide-stage.d.ts +14 -1
  23. package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
  24. package/dist/pptx/dom/types.d.ts +3 -1
  25. package/dist/pptx/dom/types.d.ts.map +1 -1
  26. package/dist/pptx/index.cjs +3247 -3171
  27. package/dist/pptx/index.mjs +1 -1
  28. package/dist/pptx/render/building-blocks/find-layout.d.ts +0 -12
  29. package/dist/pptx/render/building-blocks/find-layout.d.ts.map +1 -1
  30. package/dist/pptx/render/building-blocks/index.d.ts +2 -1
  31. package/dist/pptx/render/building-blocks/index.d.ts.map +1 -1
  32. package/dist/pptx/render/building-blocks/live-options.d.ts +49 -0
  33. package/dist/pptx/render/building-blocks/live-options.d.ts.map +1 -0
  34. package/dist/pptx/render/building-blocks/shell.d.ts +36 -0
  35. package/dist/pptx/render/building-blocks/shell.d.ts.map +1 -0
  36. package/dist/pptx/render/element-render-error.d.ts +85 -0
  37. package/dist/pptx/render/element-render-error.d.ts.map +1 -0
  38. package/dist/pptx/render/find-text-highlight.d.ts +52 -0
  39. package/dist/pptx/render/find-text-highlight.d.ts.map +1 -0
  40. package/dist/pptx/render/index.d.ts +2 -0
  41. package/dist/pptx/render/index.d.ts.map +1 -1
  42. package/dist/pptx/render/paragraph-types.d.ts +6 -0
  43. package/dist/pptx/render/paragraph-types.d.ts.map +1 -1
  44. package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
  45. package/dist/pptx/{smartart-insert-preview-WPIGM6UQ.cjs → smartart-insert-preview-4DGDUPAL.cjs} +3 -3
  46. package/dist/pptx/{smartart-insert-preview-ZHDQ5QDD.mjs → smartart-insert-preview-QZWYQJRA.mjs} +2 -2
  47. package/dist/render-cache.d.ts +0 -1
  48. package/dist/ribbon/color-preview.d.ts +1 -0
  49. package/dist/theme.d.ts +0 -1
  50. package/package.json +1 -1
  51. package/dist/pptx/render/building-blocks/find-highlight-dom.d.ts +0 -20
  52. package/dist/pptx/render/building-blocks/find-highlight-dom.d.ts.map +0 -1
@@ -54804,6 +54804,127 @@ function buildHyperlinkPatch(element, draft) {
54804
54804
  function buildClearHyperlinkPatch() {
54805
54805
  return { actionClick: void 0 };
54806
54806
  }
54807
+
54808
+ // src/pptx/render/find-text-highlight.ts
54809
+ var FIND_MATCH_ATTRIBUTE = "data-pptx-find-match";
54810
+ function inShapeText(match) {
54811
+ return !match.notes && !match.tableCell && match.smartArtNodeId === void 0 && match.elementPath === void 0 && !match.chartTitle && match.chartSeriesIndex === void 0 && match.chartCategoryIndex === void 0;
54812
+ }
54813
+ function findTextHighlightsByElement(matches, currentIndex, slideIndex) {
54814
+ const byElement = /* @__PURE__ */ new Map();
54815
+ matches.forEach((match, index) => {
54816
+ if (match.slideIndex !== slideIndex || !inShapeText(match)) {
54817
+ return;
54818
+ }
54819
+ let bySegment = byElement.get(match.elementId);
54820
+ if (!bySegment) {
54821
+ bySegment = /* @__PURE__ */ new Map();
54822
+ byElement.set(match.elementId, bySegment);
54823
+ }
54824
+ let list2 = bySegment.get(match.segmentIndex);
54825
+ if (!list2) {
54826
+ list2 = [];
54827
+ bySegment.set(match.segmentIndex, list2);
54828
+ }
54829
+ list2.push({
54830
+ startOffset: match.startOffset,
54831
+ length: match.length,
54832
+ isCurrent: index === currentIndex
54833
+ });
54834
+ });
54835
+ return byElement;
54836
+ }
54837
+ function splitTextByFindHighlights(text4, highlights) {
54838
+ const sorted = [...highlights ?? []].sort((a, b) => a.startOffset - b.startOffset);
54839
+ const chunks = [];
54840
+ let cursor = 0;
54841
+ for (const highlight of sorted) {
54842
+ const start = Math.max(highlight.startOffset, cursor);
54843
+ const end = Math.min(highlight.startOffset + highlight.length, text4.length);
54844
+ if (end <= start) {
54845
+ continue;
54846
+ }
54847
+ if (start > cursor) {
54848
+ chunks.push({ text: text4.slice(cursor, start) });
54849
+ }
54850
+ chunks.push({ text: text4.slice(start, end), match: highlight.isCurrent ? "current" : "match" });
54851
+ cursor = end;
54852
+ }
54853
+ if (cursor < text4.length || chunks.length === 0) {
54854
+ chunks.push({ text: text4.slice(cursor) });
54855
+ }
54856
+ return chunks;
54857
+ }
54858
+ function findMatchMarkStyle(kind) {
54859
+ return {
54860
+ backgroundColor: kind === "current" ? "#f97316" : "#facc15",
54861
+ color: "inherit",
54862
+ borderRadius: "2px"
54863
+ };
54864
+ }
54865
+ function slicePieces(pieces, from, to) {
54866
+ const out = [];
54867
+ let offset = 0;
54868
+ for (const piece of pieces) {
54869
+ const start = Math.max(from, offset);
54870
+ const end = Math.min(to, offset + piece.text.length);
54871
+ if (end > start) {
54872
+ out.push({ ...piece, text: piece.text.slice(start - offset, end - offset) });
54873
+ }
54874
+ offset += piece.text.length;
54875
+ }
54876
+ return out;
54877
+ }
54878
+ function highlightRun(run2, highlights) {
54879
+ if (run2.equation || run2.segmentIndex === void 0 || !run2.text) {
54880
+ return [run2];
54881
+ }
54882
+ const segment = highlights.get(run2.segmentIndex);
54883
+ if (!segment?.length) {
54884
+ return [run2];
54885
+ }
54886
+ const base2 = run2.charStart ?? 0;
54887
+ const local = segment.map((highlight) => ({
54888
+ ...highlight,
54889
+ startOffset: highlight.startOffset - base2
54890
+ }));
54891
+ const chunks = splitTextByFindHighlights(run2.text, local);
54892
+ const marked = chunks.filter((chunk) => chunk.match);
54893
+ if (marked.length === 0) {
54894
+ return [run2];
54895
+ }
54896
+ if (run2.ruby || run2.tabLines) {
54897
+ const current = marked.some((chunk) => chunk.match === "current");
54898
+ return [{ ...run2, findMatch: current ? "current" : "match" }];
54899
+ }
54900
+ const out = [];
54901
+ let offset = 0;
54902
+ for (const chunk of chunks) {
54903
+ const end = offset + chunk.text.length;
54904
+ const piece = { ...run2, text: chunk.text, charStart: base2 + offset };
54905
+ if (run2.scriptRuns) {
54906
+ piece.scriptRuns = slicePieces(run2.scriptRuns, offset, end);
54907
+ }
54908
+ if (run2.underlineWordPieces) {
54909
+ piece.underlineWordPieces = slicePieces(run2.underlineWordPieces, offset, end);
54910
+ }
54911
+ if (chunk.match) {
54912
+ piece.findMatch = chunk.match;
54913
+ }
54914
+ out.push(piece);
54915
+ offset = end;
54916
+ }
54917
+ return out;
54918
+ }
54919
+ function highlightFindMatches(paragraphs2, highlights) {
54920
+ if (!highlights || highlights.size === 0) {
54921
+ return paragraphs2;
54922
+ }
54923
+ return paragraphs2.map((paragraph2) => ({
54924
+ ...paragraph2,
54925
+ runs: paragraph2.runs.flatMap((run2) => highlightRun(run2, highlights))
54926
+ }));
54927
+ }
54807
54928
  var SEVERITY_ORDER = {
54808
54929
  error: 0,
54809
54930
  warning: 1,
@@ -59235,18 +59356,6 @@ function buildFindReplaceActions(port, refuseReplace) {
59235
59356
  replaceAll: () => refuseReplace() ?? (matches.length === 0 ? buildingBlockFailure("no-match") : (port.replaceAll(), BUILDING_BLOCK_OK))
59236
59357
  };
59237
59358
  }
59238
- function findHighlightTargets(matches, currentIndex, slideIndex) {
59239
- const targets = /* @__PURE__ */ new Map();
59240
- matches.forEach((match, index) => {
59241
- if (match.slideIndex === slideIndex) {
59242
- targets.set(
59243
- match.elementId,
59244
- (targets.get(match.elementId) ?? false) || index === currentIndex
59245
- );
59246
- }
59247
- });
59248
- return [...targets].map(([elementId, current]) => ({ elementId, current }));
59249
- }
59250
59359
  function buildLayoutActions(deps) {
59251
59360
  const apply7 = async (path, requireListed) => {
59252
59361
  const denied = deps.refuse("applyLayout");
@@ -59283,31 +59392,6 @@ function buildLayoutActions(deps) {
59283
59392
  };
59284
59393
  }
59285
59394
 
59286
- // src/pptx/render/building-blocks/find-highlight-dom.ts
59287
- var FIND_MATCH_ATTRIBUTE = "data-pptx-find-match";
59288
- function markFindHighlights(root, targets) {
59289
- const marks = new Map(
59290
- targets.map((target) => [target.elementId, target.current ? "current" : "match"])
59291
- );
59292
- for (const node of root.querySelectorAll(`[${FIND_MATCH_ATTRIBUTE}]`)) {
59293
- if (!marks.has(node.getAttribute("data-element-id") ?? "")) {
59294
- node.removeAttribute(FIND_MATCH_ATTRIBUTE);
59295
- }
59296
- }
59297
- if (marks.size === 0) {
59298
- return;
59299
- }
59300
- for (const node of root.querySelectorAll("[data-element-id]")) {
59301
- const mark = marks.get(node.getAttribute("data-element-id") ?? "");
59302
- if (mark && node.getAttribute(FIND_MATCH_ATTRIBUTE) !== mark) {
59303
- node.setAttribute(FIND_MATCH_ATTRIBUTE, mark);
59304
- }
59305
- }
59306
- }
59307
- function syncFindHighlights(root, matches, currentIndex, slideIndex) {
59308
- markFindHighlights(root, findHighlightTargets(matches, currentIndex, slideIndex));
59309
- }
59310
-
59311
59395
  // src/pptx/render/building-blocks/groups/file-dialog-groups.ts
59312
59396
  var passwordProtectionGroup = defineBuildingBlockActionGroup({
59313
59397
  id: "passwordProtection",
@@ -59580,6 +59664,66 @@ function hyperlinkEditPatch(data) {
59580
59664
  }
59581
59665
  return { ok: true, actionClick };
59582
59666
  }
59667
+
59668
+ // src/pptx/render/options/font-download-policy.ts
59669
+ var FONT_DOWNLOAD_SETTING_ID = "trust.allowFontDownloads";
59670
+ function resolveEffectiveGoogleFonts(host2, options) {
59671
+ if (host2 !== void 0) {
59672
+ return host2;
59673
+ }
59674
+ return options.trust.allowFontDownloads ? void 0 : false;
59675
+ }
59676
+ function resolveFontDownloadBase(host2, options) {
59677
+ return text$1.resolveGoogleFontsCss2Base(resolveEffectiveGoogleFonts(host2, options));
59678
+ }
59679
+ function hostFontDownloadLock(host2) {
59680
+ return host2 === void 0 ? void 0 : text$1.resolveGoogleFontsCss2Base(host2) !== null;
59681
+ }
59682
+ function lockFontDownloadSetting(locked, host2) {
59683
+ const value = hostFontDownloadLock(host2);
59684
+ if (value === void 0) {
59685
+ return locked;
59686
+ }
59687
+ return { ...locked, [FONT_DOWNLOAD_SETTING_ID]: value };
59688
+ }
59689
+
59690
+ // src/pptx/render/building-blocks/live-options.ts
59691
+ var BUILDING_BLOCK_LIVE_OPTIONS = [
59692
+ "content",
59693
+ "canEdit",
59694
+ "onRequest",
59695
+ "fileLimits",
59696
+ "hiddenActions",
59697
+ "listConversionScope",
59698
+ "collaboration",
59699
+ "googleFonts",
59700
+ "allowExternalContent"
59701
+ ];
59702
+ function collaborationOptionChange(previous, next2) {
59703
+ const before = resolveCollaborationConfig(previous);
59704
+ const after = resolveCollaborationConfig(next2);
59705
+ if (before === after) {
59706
+ return null;
59707
+ }
59708
+ return next2 && after ? { kind: "start", input: next2 } : before ? { kind: "stop" } : null;
59709
+ }
59710
+ function googleFontsOptionChanged(previous, next2) {
59711
+ return hostFontDownloadLock(previous) !== hostFontDownloadLock(next2) || text$1.resolveGoogleFontsCss2Base(previous) !== text$1.resolveGoogleFontsCss2Base(next2);
59712
+ }
59713
+ function applyBuildingBlockLiveOptions(previous, next2, port) {
59714
+ if (next2.allowExternalContent !== previous.allowExternalContent) {
59715
+ port.setAllowExternalContent(next2.allowExternalContent);
59716
+ }
59717
+ if (googleFontsOptionChanged(previous.googleFonts, next2.googleFonts)) {
59718
+ port.setGoogleFonts(next2.googleFonts);
59719
+ }
59720
+ const collaboration = collaborationOptionChange(previous.collaboration, next2.collaboration);
59721
+ if (collaboration?.kind === "start") {
59722
+ void port.startCollaboration(collaboration.input);
59723
+ } else if (collaboration?.kind === "stop") {
59724
+ port.stopCollaboration();
59725
+ }
59726
+ }
59583
59727
  var MEDIA_AUDIO_SIZE = { width: 420, height: 64 };
59584
59728
  var MEDIA_VIDEO_MAX_SIZE = { width: 640, height: 360 };
59585
59729
  function probeVideoSize(doc, dataUrl) {
@@ -59854,6 +59998,109 @@ function createPptxBuildingBlockSession(port) {
59854
59998
  };
59855
59999
  }
59856
60000
 
60001
+ // src/pptx/render/collaboration-state.ts
60002
+ function writeBackReport(config, state) {
60003
+ if (!config?.onWriteBack || config.role !== "owner") return void 0;
60004
+ return state ?? { status: "idle" };
60005
+ }
60006
+ var COLLABORATION_OFF = Object.freeze({
60007
+ active: false,
60008
+ roomId: void 0,
60009
+ status: "off",
60010
+ synced: false,
60011
+ people: Object.freeze([])
60012
+ });
60013
+ function buildCollaborationState(input) {
60014
+ if (!input.active) return COLLABORATION_OFF;
60015
+ const name = input.userName ?? "";
60016
+ const people = [];
60017
+ if (input.clientId !== null && input.clientId !== void 0) {
60018
+ people.push({
60019
+ clientId: input.clientId,
60020
+ name,
60021
+ color: input.userColor || assignUserColor(name),
60022
+ self: true
60023
+ });
60024
+ }
60025
+ for (const user of input.remoteUsers) {
60026
+ people.push({
60027
+ clientId: user.clientId,
60028
+ name: user.userName,
60029
+ color: user.userColor,
60030
+ self: false
60031
+ });
60032
+ }
60033
+ return {
60034
+ active: true,
60035
+ roomId: input.roomId || void 0,
60036
+ status: input.status,
60037
+ synced: input.synced,
60038
+ people,
60039
+ ...input.writeBack ? { writeBack: input.writeBack } : {}
60040
+ };
60041
+ }
60042
+ function collaborationStatesEqual(a, b) {
60043
+ if (a === b) return true;
60044
+ if (a.active !== b.active || a.roomId !== b.roomId || a.status !== b.status || a.synced !== b.synced || a.people.length !== b.people.length || a.writeBack?.status !== b.writeBack?.status || a.writeBack?.lastSavedAt !== b.writeBack?.lastSavedAt || a.writeBack?.error !== b.writeBack?.error) {
60045
+ return false;
60046
+ }
60047
+ return a.people.every((person, index) => {
60048
+ const other = b.people[index];
60049
+ return other !== void 0 && person.clientId === other.clientId && person.name === other.name && person.color === other.color && person.self === other.self;
60050
+ });
60051
+ }
60052
+ function createCollaborationStateReporter(report) {
60053
+ let last = COLLABORATION_OFF;
60054
+ return {
60055
+ update: (state) => {
60056
+ if (collaborationStatesEqual(last, state)) return;
60057
+ last = state;
60058
+ report(state);
60059
+ },
60060
+ current: () => last
60061
+ };
60062
+ }
60063
+
60064
+ // src/pptx/render/building-blocks/shell.ts
60065
+ var BUILDING_BLOCK_SHELL_IDLE = Object.freeze({
60066
+ shellState: Object.freeze({
60067
+ canEdit: false,
60068
+ status: "disconnected",
60069
+ remoteUsers: Object.freeze([]),
60070
+ connectedCount: 0
60071
+ }),
60072
+ collaborationState: COLLABORATION_OFF
60073
+ });
60074
+ var isState = (value) => "people" in value;
60075
+ function describeBuildingBlockShell(input) {
60076
+ return {
60077
+ shellState: resolveCollaborationShellState(input.shell),
60078
+ collaborationState: isState(input.collaboration) ? input.collaboration : buildCollaborationState(input.collaboration)
60079
+ };
60080
+ }
60081
+ function shellStatesEqual(a, b) {
60082
+ return a.canEdit === b.canEdit && a.status === b.status && a.connectedCount === b.connectedCount && a.remoteUsers.length === b.remoteUsers.length && a.remoteUsers.every((user, index) => {
60083
+ const other = b.remoteUsers[index];
60084
+ return other !== void 0 && user.clientId === other.clientId && user.userName === other.userName && user.userColor === other.userColor && user.role === other.role && user.activeSlideIndex === other.activeSlideIndex && user.selectedElementId === other.selectedElementId;
60085
+ });
60086
+ }
60087
+ function buildingBlockShellsEqual(a, b) {
60088
+ return a === b || shellStatesEqual(a.shellState, b.shellState) && collaborationStatesEqual(a.collaborationState, b.collaborationState);
60089
+ }
60090
+ function createBuildingBlockShell(read) {
60091
+ let last = BUILDING_BLOCK_SHELL_IDLE;
60092
+ return {
60093
+ current() {
60094
+ const input = read();
60095
+ const next2 = input ? describeBuildingBlockShell(input) : BUILDING_BLOCK_SHELL_IDLE;
60096
+ if (!buildingBlockShellsEqual(last, next2)) {
60097
+ last = next2;
60098
+ }
60099
+ return last;
60100
+ }
60101
+ };
60102
+ }
60103
+
59857
60104
  // src/pptx/render/building-blocks/toolbar.ts
59858
60105
  var LABELS = {
59859
60106
  undo: "pptx.toolbar.undo",
@@ -60011,6 +60258,81 @@ function buildSmartArtPreviewElement(layout, defaultItems) {
60011
60258
  };
60012
60259
  }
60013
60260
 
60261
+ // src/pptx/render/element-render-error.ts
60262
+ function elementRenderRetryKey(element) {
60263
+ return { element, id: element.id };
60264
+ }
60265
+ function shouldRetryElementRender(failed, element) {
60266
+ return !failed || failed.element !== element || failed.id !== element.id;
60267
+ }
60268
+ function elementRenderErrorContext(element, slideId) {
60269
+ return {
60270
+ elementId: element.id,
60271
+ elementType: element.type,
60272
+ ...slideId === void 0 ? {} : { slideId }
60273
+ };
60274
+ }
60275
+ function toElementRenderError(thrown) {
60276
+ return thrown instanceof Error ? thrown : new Error(String(thrown));
60277
+ }
60278
+ function reportElementRenderError(handler, thrown, context3) {
60279
+ const error = toElementRenderError(thrown);
60280
+ if (handler) {
60281
+ try {
60282
+ handler(error, context3);
60283
+ return;
60284
+ } catch {
60285
+ }
60286
+ }
60287
+ try {
60288
+ console.error(error, context3);
60289
+ } catch {
60290
+ }
60291
+ }
60292
+ function mergeElementRenderErrorScope(inherited, own) {
60293
+ return {
60294
+ slideId: own.slideId ?? inherited?.slideId,
60295
+ onElementRenderError: own.onElementRenderError ?? inherited?.onElementRenderError
60296
+ };
60297
+ }
60298
+ function createElementRenderFailures() {
60299
+ const failed = /* @__PURE__ */ new WeakMap();
60300
+ return {
60301
+ has: (element) => failed.get(element) === element.id,
60302
+ add: (element) => {
60303
+ failed.set(element, element.id);
60304
+ }
60305
+ };
60306
+ }
60307
+ function guardElementRender(element, build7, options = {}) {
60308
+ if (options.failures?.has(element)) {
60309
+ return null;
60310
+ }
60311
+ try {
60312
+ probeElementRenderFault(element);
60313
+ return build7();
60314
+ } catch (thrown) {
60315
+ options.failures?.add(element);
60316
+ try {
60317
+ options.onFailure?.();
60318
+ } catch {
60319
+ }
60320
+ reportElementRenderError(
60321
+ options.onElementRenderError,
60322
+ thrown,
60323
+ elementRenderErrorContext(element, options.slideId)
60324
+ );
60325
+ return null;
60326
+ }
60327
+ }
60328
+ var ELEMENT_RENDER_FAULT_KEY = "ooxml-ui.pptx.element-render-fault";
60329
+ function probeElementRenderFault(element) {
60330
+ const fault = globalThis[Symbol.for(ELEMENT_RENDER_FAULT_KEY)];
60331
+ if (fault !== void 0 && fault === element.id) {
60332
+ throw new Error(`Injected element render fault (${element.id})`);
60333
+ }
60334
+ }
60335
+
60014
60336
  // src/pptx/render/shape-preset-catalog.ts
60015
60337
  var SHAPE_PRESET_DEFS = [
60016
60338
  {
@@ -63734,28 +64056,6 @@ function lockExternalContentSetting(locked, host2) {
63734
64056
  }
63735
64057
  return { ...locked, [EXTERNAL_CONTENT_SETTING_ID]: host2 };
63736
64058
  }
63737
-
63738
- // src/pptx/render/options/font-download-policy.ts
63739
- var FONT_DOWNLOAD_SETTING_ID = "trust.allowFontDownloads";
63740
- function resolveEffectiveGoogleFonts(host2, options) {
63741
- if (host2 !== void 0) {
63742
- return host2;
63743
- }
63744
- return options.trust.allowFontDownloads ? void 0 : false;
63745
- }
63746
- function resolveFontDownloadBase(host2, options) {
63747
- return text$1.resolveGoogleFontsCss2Base(resolveEffectiveGoogleFonts(host2, options));
63748
- }
63749
- function hostFontDownloadLock(host2) {
63750
- return host2 === void 0 ? void 0 : text$1.resolveGoogleFontsCss2Base(host2) !== null;
63751
- }
63752
- function lockFontDownloadSetting(locked, host2) {
63753
- const value = hostFontDownloadLock(host2);
63754
- if (value === void 0) {
63755
- return locked;
63756
- }
63757
- return { ...locked, [FONT_DOWNLOAD_SETTING_ID]: value };
63758
- }
63759
64059
  var HOST_REGION_ATTRIBUTE = "data-office-region";
63760
64060
  var HostRegionHost = class {
63761
64061
  #container;
@@ -81316,69 +81616,6 @@ function createSlidePackageClipboard(initialHost) {
81316
81616
  };
81317
81617
  }
81318
81618
 
81319
- // src/pptx/render/collaboration-state.ts
81320
- function writeBackReport(config, state) {
81321
- if (!config?.onWriteBack || config.role !== "owner") return void 0;
81322
- return state ?? { status: "idle" };
81323
- }
81324
- var COLLABORATION_OFF = Object.freeze({
81325
- active: false,
81326
- roomId: void 0,
81327
- status: "off",
81328
- synced: false,
81329
- people: Object.freeze([])
81330
- });
81331
- function buildCollaborationState(input) {
81332
- if (!input.active) return COLLABORATION_OFF;
81333
- const name = input.userName ?? "";
81334
- const people = [];
81335
- if (input.clientId !== null && input.clientId !== void 0) {
81336
- people.push({
81337
- clientId: input.clientId,
81338
- name,
81339
- color: input.userColor || assignUserColor(name),
81340
- self: true
81341
- });
81342
- }
81343
- for (const user of input.remoteUsers) {
81344
- people.push({
81345
- clientId: user.clientId,
81346
- name: user.userName,
81347
- color: user.userColor,
81348
- self: false
81349
- });
81350
- }
81351
- return {
81352
- active: true,
81353
- roomId: input.roomId || void 0,
81354
- status: input.status,
81355
- synced: input.synced,
81356
- people,
81357
- ...input.writeBack ? { writeBack: input.writeBack } : {}
81358
- };
81359
- }
81360
- function collaborationStatesEqual(a, b) {
81361
- if (a === b) return true;
81362
- if (a.active !== b.active || a.roomId !== b.roomId || a.status !== b.status || a.synced !== b.synced || a.people.length !== b.people.length || a.writeBack?.status !== b.writeBack?.status || a.writeBack?.lastSavedAt !== b.writeBack?.lastSavedAt || a.writeBack?.error !== b.writeBack?.error) {
81363
- return false;
81364
- }
81365
- return a.people.every((person, index) => {
81366
- const other = b.people[index];
81367
- return other !== void 0 && person.clientId === other.clientId && person.name === other.name && person.color === other.color && person.self === other.self;
81368
- });
81369
- }
81370
- function createCollaborationStateReporter(report) {
81371
- let last = COLLABORATION_OFF;
81372
- return {
81373
- update: (state) => {
81374
- if (collaborationStatesEqual(last, state)) return;
81375
- last = state;
81376
- report(state);
81377
- },
81378
- current: () => last
81379
- };
81380
- }
81381
-
81382
81619
  // src/pptx/render/viewer-event-payloads.ts
81383
81620
  function autosaveStatusKind(status) {
81384
81621
  const state = typeof status === "string" ? status : status.state;
@@ -90322,7 +90559,7 @@ function definePptxInsertSmartArtDialog(registry2) {
90322
90559
  if (this.#live || this.#draw) {
90323
90560
  return;
90324
90561
  }
90325
- this.#live = import('./smartart-insert-preview-WPIGM6UQ.cjs').then((module) => {
90562
+ this.#live = import('./smartart-insert-preview-4DGDUPAL.cjs').then((module) => {
90326
90563
  if (this.#draw || !this.#picker) {
90327
90564
  return;
90328
90565
  }
@@ -99277,8 +99514,10 @@ exports.BOTTOM_TRIGGER_FRACTION = BOTTOM_TRIGGER_FRACTION;
99277
99514
  exports.BRIGHTNESS_CONTRAST_STEPS = BRIGHTNESS_CONTRAST_STEPS;
99278
99515
  exports.BROADCAST_THROTTLE_MS = BROADCAST_THROTTLE_MS;
99279
99516
  exports.BUILDING_BLOCK_GROUP_IDS = BUILDING_BLOCK_GROUP_IDS;
99517
+ exports.BUILDING_BLOCK_LIVE_OPTIONS = BUILDING_BLOCK_LIVE_OPTIONS;
99280
99518
  exports.BUILDING_BLOCK_OK = BUILDING_BLOCK_OK;
99281
99519
  exports.BUILDING_BLOCK_REQUEST_ACTIONS = BUILDING_BLOCK_REQUEST_ACTIONS;
99520
+ exports.BUILDING_BLOCK_SHELL_IDLE = BUILDING_BLOCK_SHELL_IDLE;
99282
99521
  exports.BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS;
99283
99522
  exports.BUILDING_BLOCK_VIEWABLE_REQUESTS = BUILDING_BLOCK_VIEWABLE_REQUESTS;
99284
99523
  exports.CANVAS_CONTEXT_MENU_COMMAND_IDS = CANVAS_CONTEXT_MENU_COMMAND_IDS;
@@ -99419,6 +99658,7 @@ exports.ELEMENT_CLIPBOARD_VERSION = ELEMENT_CLIPBOARD_VERSION;
99419
99658
  exports.ELEMENT_CONTEXT_MENU_COMMAND_IDS = ELEMENT_CONTEXT_MENU_COMMAND_IDS;
99420
99659
  exports.ELEMENT_GEOMETRY_SECTION = ELEMENT_GEOMETRY_SECTION;
99421
99660
  exports.ELEMENT_GEOMETRY_SECTIONS = ELEMENT_GEOMETRY_SECTIONS;
99661
+ exports.ELEMENT_RENDER_FAULT_KEY = ELEMENT_RENDER_FAULT_KEY;
99422
99662
  exports.EMPH_FILTER_PRESETS = EMPH_FILTER_PRESETS;
99423
99663
  exports.EMPTY_RESOLVED_CUSTOMIZATION = EMPTY_RESOLVED_CUSTOMIZATION;
99424
99664
  exports.EMPTY_RIBBON_TRANSITION_DRAFT = EMPTY_RIBBON_TRANSITION_DRAFT;
@@ -99916,6 +100156,7 @@ exports.applyAnimationOpacity = applyAnimationOpacity;
99916
100156
  exports.applyAnimationTimelineOrder = applyAnimationTimelineOrder;
99917
100157
  exports.applyAutoCorrect = applyAutoCorrect;
99918
100158
  exports.applyAutoCorrectToEdit = applyAutoCorrectToEdit;
100159
+ exports.applyBuildingBlockLiveOptions = applyBuildingBlockLiveOptions;
99919
100160
  exports.applyChart3DDrag = applyChart3DDrag;
99920
100161
  exports.applyChart3DSelect = applyChart3DSelect;
99921
100162
  exports.applyChartBuildReveal = applyChartBuildReveal;
@@ -100191,6 +100432,7 @@ exports.buildWrapperStyle = buildWrapperStyle;
100191
100432
  exports.buildZoomTransitionOverride = buildZoomTransitionOverride;
100192
100433
  exports.buildingBlockFailure = buildingBlockFailure;
100193
100434
  exports.buildingBlockRequestAction = buildingBlockRequestAction;
100435
+ exports.buildingBlockShellsEqual = buildingBlockShellsEqual;
100194
100436
  exports.builtinTableStyleMap = builtinTableStyleMap;
100195
100437
  exports.calculateContinuationPageMaxLines = calculateContinuationPageMaxLines;
100196
100438
  exports.calculateNotesPageLayout = calculateNotesPageLayout;
@@ -100299,6 +100541,7 @@ exports.closeReadingView = closeReadingView;
100299
100541
  exports.cloudFilesLabels = cloudFilesLabels;
100300
100542
  exports.coerceInspectorFieldValue = coerceInspectorFieldValue;
100301
100543
  exports.collaborationHistoryReady = collaborationHistoryReady;
100544
+ exports.collaborationOptionChange = collaborationOptionChange;
100302
100545
  exports.collaborationStatesEqual = collaborationStatesEqual;
100303
100546
  exports.collectAccessibilityIssues = collectAccessibilityIssues;
100304
100547
  exports.collectChartBuildInfo = collectChartBuildInfo;
@@ -100414,6 +100657,7 @@ exports.createAutosaveRecoveryController = createAutosaveRecoveryController;
100414
100657
  exports.createBackstagePresentation = createBackstagePresentation;
100415
100658
  exports.createBuildingBlockGroupContext = createBuildingBlockGroupContext;
100416
100659
  exports.createBuildingBlockRequests = createBuildingBlockRequests;
100660
+ exports.createBuildingBlockShell = createBuildingBlockShell;
100417
100661
  exports.createCloudDocumentController = createCloudDocumentController;
100418
100662
  exports.createCollabProvider = createCollabProvider;
100419
100663
  exports.createCollaborationHistory = createCollaborationHistory;
@@ -100427,6 +100671,7 @@ exports.createDeckStyleHost = createDeckStyleHost;
100427
100671
  exports.createDefaultChartElement = createDefaultChartElement;
100428
100672
  exports.createDefaultChartUserShapeGroupChild = createDefaultChartUserShapeGroupChild;
100429
100673
  exports.createEditorHistoryController = createEditorHistoryController;
100674
+ exports.createElementRenderFailures = createElementRenderFailures;
100430
100675
  exports.createEmbeddedFontsSheet = createEmbeddedFontsSheet;
100431
100676
  exports.createEmbeddedOutlineFontsSlot = createEmbeddedOutlineFontsSlot;
100432
100677
  exports.createEnvelopeWarp = createEnvelopeWarp;
@@ -100517,6 +100762,7 @@ exports.deriveViewportBreakpoints = deriveViewportBreakpoints;
100517
100762
  exports.describeBroadcastSupport = describeBroadcastSupport;
100518
100763
  exports.describeBuildingBlockActions = describeBuildingBlockActions;
100519
100764
  exports.describeBuildingBlockAvailability = describeBuildingBlockAvailability;
100765
+ exports.describeBuildingBlockShell = describeBuildingBlockShell;
100520
100766
  exports.describeBuildingBlockToolbar = describeBuildingBlockToolbar;
100521
100767
  exports.describeCollaborationShellState = describeCollaborationShellState;
100522
100768
  exports.describeCustomShows = describeCustomShows;
@@ -100595,6 +100841,8 @@ exports.elementIdSelector = elementIdSelector;
100595
100841
  exports.elementInLocalFrame = elementInLocalFrame;
100596
100842
  exports.elementOutlineLoops = elementOutlineLoops;
100597
100843
  exports.elementPictureFilename = elementPictureFilename;
100844
+ exports.elementRenderErrorContext = elementRenderErrorContext;
100845
+ exports.elementRenderRetryKey = elementRenderRetryKey;
100598
100846
  exports.ellipseArcToCubics = ellipseArcToCubics;
100599
100847
  exports.embedImagesOnClone = embedImagesOnClone;
100600
100848
  exports.embeddedFontSaveOptions = embeddedFontSaveOptions;
@@ -100658,7 +100906,7 @@ exports.findConnectorSiteNear = findConnectorSiteNear;
100658
100906
  exports.findEffectSoundCatalogueEntry = findEffectSoundCatalogueEntry;
100659
100907
  exports.findEraserHitElementId = findEraserHitElementId;
100660
100908
  exports.findHighlightClickTarget = findHighlightClickTarget;
100661
- exports.findHighlightTargets = findHighlightTargets;
100909
+ exports.findMatchMarkStyle = findMatchMarkStyle;
100662
100910
  exports.findMediaBookmarkGatedSteps = findMediaBookmarkGatedSteps;
100663
100911
  exports.findMediaElementByElementId = findMediaElementByElementId;
100664
100912
  exports.findMediaEndGatedSteps = findMediaEndGatedSteps;
@@ -100670,6 +100918,7 @@ exports.findReplaceTarget = findReplaceTarget;
100670
100918
  exports.findRibbonAddIn = findRibbonAddIn;
100671
100919
  exports.findSlideStage = findSlideStage;
100672
100920
  exports.findSmartArtNodeText = findSmartArtNodeText;
100921
+ exports.findTextHighlightsByElement = findTextHighlightsByElement;
100673
100922
  exports.finishAnimationGroupSteps = finishAnimationGroupSteps;
100674
100923
  exports.finishCropUpdate = finishCropUpdate;
100675
100924
  exports.finishDomAnimationsForGroup = finishDomAnimationsForGroup;
@@ -100873,6 +101122,7 @@ exports.getWarpPath = getWarpPath;
100873
101122
  exports.ghostMorphPairsHiddenByGhosts = ghostMorphPairsHiddenByGhosts;
100874
101123
  exports.glowStateOf = glowStateOf;
100875
101124
  exports.glowStyle = glowStyle;
101125
+ exports.googleFontsOptionChanged = googleFontsOptionChanged;
100876
101126
  exports.gradientStateFromStyle = gradientStateFromStyle;
100877
101127
  exports.gradientStateOf = gradientStateOf;
100878
101128
  exports.gradientStatePatch = gradientStatePatch;
@@ -100884,6 +101134,7 @@ exports.groupIssuesBySeverity = groupIssuesBySeverity;
100884
101134
  exports.groupParagraphsByBuildLevel = groupParagraphsByBuildLevel;
100885
101135
  exports.groupShortcutReference = groupShortcutReference;
100886
101136
  exports.groupTilesByRow = groupTilesByRow;
101137
+ exports.guardElementRender = guardElementRender;
100887
101138
  exports.handleEditorAnchorClick = handleEditorAnchorClick;
100888
101139
  exports.handleLiveColorEvent = handleLiveColorEvent;
100889
101140
  exports.handlePresentationStageClick = handlePresentationStageClick;
@@ -100910,6 +101161,7 @@ exports.hexToRgb = hexToRgb;
100910
101161
  exports.hiddenSlideCue = hiddenSlideCue;
100911
101162
  exports.hiddenSlideLabelId = hiddenSlideLabelId;
100912
101163
  exports.hideChartSeries = hideChartSeries;
101164
+ exports.highlightFindMatches = highlightFindMatches;
100913
101165
  exports.historyStepUsesParts = historyStepUsesParts;
100914
101166
  exports.historyTheme = historyTheme;
100915
101167
  exports.hollowTextFillStyle = hollowTextFillStyle;
@@ -101096,7 +101348,6 @@ exports.mapSlideShowStartKey = mapSlideShowStartKey;
101096
101348
  exports.mapSlideSorterKey = mapSlideSorterKey;
101097
101349
  exports.markAnimationGroupActive = markAnimationGroupActive;
101098
101350
  exports.markAsFinalProperties = markAsFinalProperties;
101099
- exports.markFindHighlights = markFindHighlights;
101100
101351
  exports.markInsertedParagraph = markInsertedParagraph;
101101
101352
  exports.maskEdgeDecl = maskEdgeDecl;
101102
101353
  exports.maskEdgeInitialStyle = maskEdgeInitialStyle;
@@ -101150,6 +101401,7 @@ exports.mergeAdditiveSelection = mergeAdditiveSelection;
101150
101401
  exports.mergeCaptionResults = mergeCaptionResults;
101151
101402
  exports.mergeCoincidentHandles = mergeCoincidentHandles;
101152
101403
  exports.mergeCustomization = mergeCustomization;
101404
+ exports.mergeElementRenderErrorScope = mergeElementRenderErrorScope;
101153
101405
  exports.mergeImageEffects = mergeImageEffects;
101154
101406
  exports.mergeOperationForCommand = mergeOperationForCommand;
101155
101407
  exports.mergePresentationSnapshot = mergePresentationSnapshot;
@@ -101356,6 +101608,7 @@ exports.previousShowSlideIndex = previousShowSlideIndex;
101356
101608
  exports.primaryMasterViewPart = primaryMasterViewPart;
101357
101609
  exports.printJobRasterFallback = printJobRasterFallback;
101358
101610
  exports.probeAutosaveRecovery = probeAutosaveRecovery;
101611
+ exports.probeElementRenderFault = probeElementRenderFault;
101359
101612
  exports.probeMaxCanvasDimension = probeMaxCanvasDimension;
101360
101613
  exports.probeNativeImageSize = probeNativeImageSize;
101361
101614
  exports.probeVideoSize = probeVideoSize;
@@ -101457,6 +101710,7 @@ exports.reorderAnimationTimelineRows = reorderAnimationTimelineRows;
101457
101710
  exports.replaceMasterViewElements = replaceMasterViewElements;
101458
101711
  exports.replacePixels = replacePixels;
101459
101712
  exports.replyToCommentInList = replyToCommentInList;
101713
+ exports.reportElementRenderError = reportElementRenderError;
101460
101714
  exports.reportInlineTextDraft = reportInlineTextDraft;
101461
101715
  exports.rerouteConnectorsForMovedElements = rerouteConnectorsForMovedElements;
101462
101716
  exports.resamplePolygon = resamplePolygon;
@@ -101791,6 +102045,7 @@ exports.shouldLoopContinuously = shouldLoopContinuously;
101791
102045
  exports.shouldOpenInProtectedView = shouldOpenInProtectedView;
101792
102046
  exports.shouldProbeAutosaveRecovery = shouldProbeAutosaveRecovery;
101793
102047
  exports.shouldRenderHitTarget = shouldRenderHitTarget;
102048
+ exports.shouldRetryElementRender = shouldRetryElementRender;
101794
102049
  exports.shouldSeekAnimationGroup = shouldSeekAnimationGroup;
101795
102050
  exports.shouldShowAccessibilitySection = shouldShowAccessibilitySection;
101796
102051
  exports.shouldShowAutosaveRecoveryPrompt = shouldShowAutosaveRecoveryPrompt;
@@ -101855,6 +102110,7 @@ exports.splitRegionComponents = splitRegionComponents;
101855
102110
  exports.splitRunByScriptFont = splitRunByScriptFont;
101856
102111
  exports.splitRunForMetrics = splitRunForMetrics;
101857
102112
  exports.splitStyledRun = splitStyledRun;
102113
+ exports.splitTextByFindHighlights = splitTextByFindHighlights;
101858
102114
  exports.splitWordsForUnderline = splitWordsForUnderline;
101859
102115
  exports.splitsUnderlineIntoWords = splitsUnderlineIntoWords;
101860
102116
  exports.stageKeepsElementIds = stageKeepsElementIds;
@@ -101889,7 +102145,6 @@ exports.svgTile = svgTile;
101889
102145
  exports.svgToDataUrl = svgToDataUrl;
101890
102146
  exports.swapPresentationWindows = swapPresentationWindows;
101891
102147
  exports.switchSmartArtLayoutData = switchSmartArtLayoutData;
101892
- exports.syncFindHighlights = syncFindHighlights;
101893
102148
  exports.syncGoogleWebfontStylesheet = syncGoogleWebfontStylesheet;
101894
102149
  exports.tabRowActionsAttributes = tabRowActionsAttributes;
101895
102150
  exports.tableCellCss = tableCellCss;
@@ -101934,6 +102189,7 @@ exports.toCssTextOrientation = toCssTextOrientation;
101934
102189
  exports.toCssVerticalDirection = toCssVerticalDirection;
101935
102190
  exports.toCssWritingMode = toCssWritingMode;
101936
102191
  exports.toElementAxes = toElementAxes;
102192
+ exports.toElementRenderError = toElementRenderError;
101937
102193
  exports.toGestureTransform = toGestureTransform;
101938
102194
  exports.toHostSignatureInfo = toHostSignatureInfo;
101939
102195
  exports.toSlideIndex = toSlideIndex;