superdoc 2.19.0-next.4 → 2.19.0-next.6

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.
@@ -8898,6 +8898,7 @@ function createSuperDocUI(options) {
8898
8898
  syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(readHostReviewSource()));
8899
8899
  state = computeState("initial");
8900
8900
  lastOptimisticInlineSelectionSignature = selectionInlineValueSignature(state.selection);
8901
+ let scheduleActiveSearchRefresh = () => {};
8901
8902
  const syncHostEventsSubscription = () => {
8902
8903
  const host = getEditor()?.host;
8903
8904
  const events = host?.events;
@@ -8917,6 +8918,7 @@ function createSuperDocUI(options) {
8917
8918
  const off = next.subscribe((event) => {
8918
8919
  const type = event?.type;
8919
8920
  const isStandaloneDocumentMutation = type === "document:mutated" && event.hasCommitEvent !== true;
8921
+ if (isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedDocument(event) || type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0) scheduleActiveSearchRefresh();
8920
8922
  if ((type === "document:mutated" || type === "mutation:committed" && mutationCommittedEventChangedDocument(event)) && host && !dirtyHosts.has(host)) {
8921
8923
  dirtyHosts.add(host);
8922
8924
  recompute("document-dirty");
@@ -12318,6 +12320,12 @@ function createSuperDocUI(options) {
12318
12320
  * session is the one that says how to close it.
12319
12321
  */
12320
12322
  let releaseActiveSearchSession = null;
12323
+ let releaseRefreshShellSearch = null;
12324
+ const cancelRefreshShellSearch = () => {
12325
+ const release = releaseRefreshShellSearch;
12326
+ releaseRefreshShellSearch = null;
12327
+ if (release) safeCall(() => release(), null);
12328
+ };
12321
12329
  /** Release whatever session is open, then forget it. */
12322
12330
  const releaseSearchSession = () => {
12323
12331
  const release = releaseActiveSearchSession;
@@ -12349,6 +12357,7 @@ function createSuperDocUI(options) {
12349
12357
  searchRequestGeneration += 1;
12350
12358
  pendingFallbackGeneration = null;
12351
12359
  shellFallbackOutstanding = false;
12360
+ cancelRefreshShellSearch();
12352
12361
  releaseSearchSession();
12353
12362
  const available = searchIsAvailable();
12354
12363
  searchState = {
@@ -12530,6 +12539,7 @@ function createSuperDocUI(options) {
12530
12539
  },
12531
12540
  close: () => {
12532
12541
  searchRequestGeneration += 1;
12542
+ cancelRefreshShellSearch();
12533
12543
  if (releaseActiveSearchSession) releaseSearchSession();
12534
12544
  else {
12535
12545
  const host = getHostSearch();
@@ -12553,6 +12563,7 @@ function createSuperDocUI(options) {
12553
12563
  const includeDeletedText = (options?.includeTrackedDeletions ?? options?.includeDeletedText) === true;
12554
12564
  const regex = options?.regex === true;
12555
12565
  const generation = ++searchRequestGeneration;
12566
+ cancelRefreshShellSearch();
12556
12567
  cancelOutstandingShellFallback();
12557
12568
  if (!host || typeof host.setSession !== "function") {
12558
12569
  const editSearch = getEditCommandSearch();
@@ -12741,6 +12752,7 @@ function createSuperDocUI(options) {
12741
12752
  },
12742
12753
  clear: () => {
12743
12754
  searchRequestGeneration += 1;
12755
+ cancelRefreshShellSearch();
12744
12756
  cancelOutstandingShellFallback();
12745
12757
  const host = getHostSearch();
12746
12758
  if (host && typeof host.clear === "function") safeCall(() => host.clear(), null);
@@ -12856,6 +12868,49 @@ function createSuperDocUI(options) {
12856
12868
  return mapHostReplaceResult(result);
12857
12869
  }
12858
12870
  };
12871
+ let searchRefreshTimer = null;
12872
+ scheduleActiveSearchRefresh = () => {
12873
+ if (searchRefreshTimer !== null) clearTimeout(searchRefreshTimer);
12874
+ if (!searchState.open || !searchState.query) return;
12875
+ const scheduledGeneration = searchRequestGeneration;
12876
+ searchRefreshTimer = setTimeout(() => {
12877
+ searchRefreshTimer = null;
12878
+ if (disposed || scheduledGeneration !== searchRequestGeneration || !searchState.open || !searchState.query) return;
12879
+ const input = {
12880
+ query: searchState.query,
12881
+ caseSensitive: searchState.caseSensitive,
12882
+ includeDeletedText: searchState.includeDeletedText,
12883
+ regex: searchState.regex
12884
+ };
12885
+ const editSearch = getEditCommandSearch();
12886
+ const host = getHostSearch();
12887
+ if (typeof editSearch?.refresh !== "function" && typeof host?.refresh !== "function") return;
12888
+ const generation = ++searchRequestGeneration;
12889
+ cancelOutstandingShellFallback();
12890
+ if (typeof editSearch?.refresh === "function" && typeof editSearch.query === "function") {
12891
+ const capturedSearch = editSearch;
12892
+ releaseRefreshShellSearch = () => {
12893
+ capturedSearch.query({ query: "" });
12894
+ };
12895
+ }
12896
+ const result = typeof editSearch?.refresh === "function" ? safeCall(() => editSearch.refresh(input), null) : safeCall(() => host.refresh(), null);
12897
+ if (isPromiseLike(result)) {
12898
+ pendingFallbackGeneration = generation;
12899
+ Promise.resolve(result).then((resolved) => {
12900
+ if (generation !== searchRequestGeneration || disposed) return;
12901
+ pendingFallbackGeneration = null;
12902
+ applyHostSearchResult(resolved, readEditCommandCanReplace(), readEditCommandCanReplaceAll());
12903
+ }, () => {
12904
+ if (generation !== searchRequestGeneration || disposed) return;
12905
+ pendingFallbackGeneration = null;
12906
+ setSearchState({
12907
+ available: false,
12908
+ reason: SUPERDOC_UI_REASONS.searchUnavailable
12909
+ });
12910
+ });
12911
+ } else if (result !== null) applyHostSearchResult(result);
12912
+ }, 120);
12913
+ };
12859
12914
  const stylesSub = sliceHandle((s) => s.styles);
12860
12915
  const stylesSnap = snapshotHandle(stylesSub);
12861
12916
  const styles = {
@@ -12903,6 +12958,9 @@ function createSuperDocUI(options) {
12903
12958
  watermark.destroy();
12904
12959
  clearContentControlHighlight();
12905
12960
  disposed = true;
12961
+ if (searchRefreshTimer !== null) clearTimeout(searchRefreshTimer);
12962
+ searchRefreshTimer = null;
12963
+ cancelRefreshShellSearch();
12906
12964
  releaseSharedUiTrackedChangesCatalog(uiTrackedChangesCatalogHost, uiTrackedChangesCatalogState);
12907
12965
  if (foregroundAsyncRetryTimer) {
12908
12966
  clearTimeout(foregroundAsyncRetryTimer);
@@ -8897,6 +8897,7 @@ function createSuperDocUI(options) {
8897
8897
  syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(readHostReviewSource()));
8898
8898
  state = computeState("initial");
8899
8899
  lastOptimisticInlineSelectionSignature = selectionInlineValueSignature(state.selection);
8900
+ let scheduleActiveSearchRefresh = () => {};
8900
8901
  const syncHostEventsSubscription = () => {
8901
8902
  const host = getEditor()?.host;
8902
8903
  const events = host?.events;
@@ -8916,6 +8917,7 @@ function createSuperDocUI(options) {
8916
8917
  const off = next.subscribe((event) => {
8917
8918
  const type = event?.type;
8918
8919
  const isStandaloneDocumentMutation = type === "document:mutated" && event.hasCommitEvent !== true;
8920
+ if (isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedDocument(event) || type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0) scheduleActiveSearchRefresh();
8919
8921
  if ((type === "document:mutated" || type === "mutation:committed" && mutationCommittedEventChangedDocument(event)) && host && !dirtyHosts.has(host)) {
8920
8922
  dirtyHosts.add(host);
8921
8923
  recompute("document-dirty");
@@ -12317,6 +12319,12 @@ function createSuperDocUI(options) {
12317
12319
  * session is the one that says how to close it.
12318
12320
  */
12319
12321
  let releaseActiveSearchSession = null;
12322
+ let releaseRefreshShellSearch = null;
12323
+ const cancelRefreshShellSearch = () => {
12324
+ const release = releaseRefreshShellSearch;
12325
+ releaseRefreshShellSearch = null;
12326
+ if (release) safeCall(() => release(), null);
12327
+ };
12320
12328
  /** Release whatever session is open, then forget it. */
12321
12329
  const releaseSearchSession = () => {
12322
12330
  const release = releaseActiveSearchSession;
@@ -12348,6 +12356,7 @@ function createSuperDocUI(options) {
12348
12356
  searchRequestGeneration += 1;
12349
12357
  pendingFallbackGeneration = null;
12350
12358
  shellFallbackOutstanding = false;
12359
+ cancelRefreshShellSearch();
12351
12360
  releaseSearchSession();
12352
12361
  const available = searchIsAvailable();
12353
12362
  searchState = {
@@ -12529,6 +12538,7 @@ function createSuperDocUI(options) {
12529
12538
  },
12530
12539
  close: () => {
12531
12540
  searchRequestGeneration += 1;
12541
+ cancelRefreshShellSearch();
12532
12542
  if (releaseActiveSearchSession) releaseSearchSession();
12533
12543
  else {
12534
12544
  const host = getHostSearch();
@@ -12552,6 +12562,7 @@ function createSuperDocUI(options) {
12552
12562
  const includeDeletedText = (options?.includeTrackedDeletions ?? options?.includeDeletedText) === true;
12553
12563
  const regex = options?.regex === true;
12554
12564
  const generation = ++searchRequestGeneration;
12565
+ cancelRefreshShellSearch();
12555
12566
  cancelOutstandingShellFallback();
12556
12567
  if (!host || typeof host.setSession !== "function") {
12557
12568
  const editSearch = getEditCommandSearch();
@@ -12740,6 +12751,7 @@ function createSuperDocUI(options) {
12740
12751
  },
12741
12752
  clear: () => {
12742
12753
  searchRequestGeneration += 1;
12754
+ cancelRefreshShellSearch();
12743
12755
  cancelOutstandingShellFallback();
12744
12756
  const host = getHostSearch();
12745
12757
  if (host && typeof host.clear === "function") safeCall(() => host.clear(), null);
@@ -12855,6 +12867,49 @@ function createSuperDocUI(options) {
12855
12867
  return mapHostReplaceResult(result);
12856
12868
  }
12857
12869
  };
12870
+ let searchRefreshTimer = null;
12871
+ scheduleActiveSearchRefresh = () => {
12872
+ if (searchRefreshTimer !== null) clearTimeout(searchRefreshTimer);
12873
+ if (!searchState.open || !searchState.query) return;
12874
+ const scheduledGeneration = searchRequestGeneration;
12875
+ searchRefreshTimer = setTimeout(() => {
12876
+ searchRefreshTimer = null;
12877
+ if (disposed || scheduledGeneration !== searchRequestGeneration || !searchState.open || !searchState.query) return;
12878
+ const input = {
12879
+ query: searchState.query,
12880
+ caseSensitive: searchState.caseSensitive,
12881
+ includeDeletedText: searchState.includeDeletedText,
12882
+ regex: searchState.regex
12883
+ };
12884
+ const editSearch = getEditCommandSearch();
12885
+ const host = getHostSearch();
12886
+ if (typeof editSearch?.refresh !== "function" && typeof host?.refresh !== "function") return;
12887
+ const generation = ++searchRequestGeneration;
12888
+ cancelOutstandingShellFallback();
12889
+ if (typeof editSearch?.refresh === "function" && typeof editSearch.query === "function") {
12890
+ const capturedSearch = editSearch;
12891
+ releaseRefreshShellSearch = () => {
12892
+ capturedSearch.query({ query: "" });
12893
+ };
12894
+ }
12895
+ const result = typeof editSearch?.refresh === "function" ? safeCall(() => editSearch.refresh(input), null) : safeCall(() => host.refresh(), null);
12896
+ if (isPromiseLike(result)) {
12897
+ pendingFallbackGeneration = generation;
12898
+ Promise.resolve(result).then((resolved) => {
12899
+ if (generation !== searchRequestGeneration || disposed) return;
12900
+ pendingFallbackGeneration = null;
12901
+ applyHostSearchResult(resolved, readEditCommandCanReplace(), readEditCommandCanReplaceAll());
12902
+ }, () => {
12903
+ if (generation !== searchRequestGeneration || disposed) return;
12904
+ pendingFallbackGeneration = null;
12905
+ setSearchState({
12906
+ available: false,
12907
+ reason: SUPERDOC_UI_REASONS.searchUnavailable
12908
+ });
12909
+ });
12910
+ } else if (result !== null) applyHostSearchResult(result);
12911
+ }, 120);
12912
+ };
12858
12913
  const stylesSub = sliceHandle((s) => s.styles);
12859
12914
  const stylesSnap = snapshotHandle(stylesSub);
12860
12915
  const styles = {
@@ -12902,6 +12957,9 @@ function createSuperDocUI(options) {
12902
12957
  watermark.destroy();
12903
12958
  clearContentControlHighlight();
12904
12959
  disposed = true;
12960
+ if (searchRefreshTimer !== null) clearTimeout(searchRefreshTimer);
12961
+ searchRefreshTimer = null;
12962
+ cancelRefreshShellSearch();
12905
12963
  releaseSharedUiTrackedChangesCatalog(uiTrackedChangesCatalogHost, uiTrackedChangesCatalogState);
12906
12964
  if (foregroundAsyncRetryTimer) {
12907
12965
  clearTimeout(foregroundAsyncRetryTimer);
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
19
19
  var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
20
20
  var ENGINE_INFO = Object.freeze({
21
21
  ...PRIVATE_ENGINE_INFO,
22
- superdocVersion: "2.19.0-next.4",
22
+ superdocVersion: "2.19.0-next.6",
23
23
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
24
24
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
25
25
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
18
18
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
19
19
  var ENGINE_INFO = Object.freeze({
20
20
  ...PRIVATE_ENGINE_INFO,
21
- superdocVersion: "2.19.0-next.4",
21
+ superdocVersion: "2.19.0-next.6",
22
22
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
23
23
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
24
24
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -1,7 +1,7 @@
1
1
  import { CommandCatalog, CommandStaticMetadata, OperationId } from './types.js';
2
2
  export declare const COMMAND_CATALOG: CommandCatalog;
3
3
  /** Operation IDs whose catalog entry has `mutates: true`. */
4
- export declare const MUTATING_OPERATION_IDS: ("replace" | "find" | "insert" | "delete" | "info" | "projectHtml" | "projectMarkdown" | "capabilities.check" | "format.apply" | "blocks.split" | "blocks.merge" | "blocks.move" | "lists.getState" | "lists.apply" | "lists.continue" | "lists.restart" | "lists.remove" | "format.paragraph.setMarkRunProps" | "tables.moveRow" | "tables.moveColumn" | "format.bold" | "format.strike" | "format.color" | "format.rtl" | "format.cs" | "format.shading" | "format.fontFamily" | "format.lang" | "format.fontSize" | "format.fontSizeCs" | "format.highlight" | "format.italic" | "format.underline" | "format.caps" | "format.smallCaps" | "format.outline" | "format.shadow" | "format.emboss" | "format.imprint" | "format.vanish" | "format.webHidden" | "format.specVanish" | "format.border" | "format.fitText" | "format.dstrike" | "format.vertAlign" | "format.position" | "format.bCs" | "format.iCs" | "format.snapToGrid" | "format.oMath" | "format.letterSpacing" | "format.charScale" | "format.kerning" | "format.rStyle" | "format.rFonts" | "format.eastAsianLayout" | "format.em" | "format.ligatures" | "format.numForm" | "format.numSpacing" | "format.stylisticSets" | "format.contextualAlternates" | "get" | "getNode" | "getNodeById" | "getText" | "getMarkdown" | "getHtml" | "markdownToFragment" | "htmlToFragment" | "extract" | "clearContent" | "formatRange" | "blocks.findText" | "blocks.list" | "blocks.delete" | "blocks.deleteRange" | "styles.apply" | "styles.getCatalog" | "templates.apply" | "create.paragraph" | "create.heading" | "create.sectionBreak" | "sections.list" | "sections.get" | "sections.setBreakType" | "sections.setPageMargins" | "sections.setHeaderFooterMargins" | "sections.setPageSetup" | "sections.setColumns" | "sections.setLineNumbering" | "sections.setPageNumbering" | "sections.setTitlePage" | "sections.setOddEvenHeadersFooters" | "sections.setVerticalAlign" | "sections.setSectionDirection" | "sections.setHeaderFooterRef" | "sections.clearHeaderFooterRef" | "sections.setLinkToPrevious" | "sections.setPageBorders" | "sections.clearPageBorders" | "styles.paragraph.setStyle" | "styles.paragraph.setStyleRef" | "styles.paragraph.clearStyle" | "format.paragraph.resetDirectFormatting" | "format.paragraph.setAlignment" | "format.paragraph.clearAlignment" | "format.paragraph.setIndentation" | "format.paragraph.clearIndentation" | "format.paragraph.setSpacing" | "format.paragraph.clearSpacing" | "format.paragraph.setKeepOptions" | "format.paragraph.setOutlineLevel" | "format.paragraph.setFlowOptions" | "format.paragraph.setTabStop" | "format.paragraph.clearTabStop" | "format.paragraph.clearAllTabStops" | "format.paragraph.setBorder" | "format.paragraph.clearBorder" | "format.paragraph.setShading" | "format.paragraph.clearShading" | "format.paragraph.setDirection" | "format.paragraph.clearDirection" | "format.paragraph.setNumbering" | "lists.list" | "lists.get" | "lists.insert" | "lists.create" | "lists.attach" | "lists.detach" | "lists.delete" | "lists.indent" | "lists.outdent" | "lists.join" | "lists.canJoin" | "lists.separate" | "lists.merge" | "lists.split" | "lists.setLevel" | "lists.setValue" | "lists.continuePrevious" | "lists.canContinuePrevious" | "lists.setLevelRestart" | "lists.convertToText" | "lists.applyTemplate" | "lists.applyPreset" | "lists.setType" | "lists.captureTemplate" | "lists.setLevelNumbering" | "lists.setLevelBullet" | "lists.setLevelPictureBullet" | "lists.setLevelAlignment" | "lists.setLevelIndents" | "lists.setLevelTrailingCharacter" | "lists.setLevelMarkerFont" | "lists.clearLevelOverrides" | "lists.getStyle" | "lists.applyStyle" | "lists.restartAt" | "lists.setLevelNumberStyle" | "lists.setLevelText" | "lists.setLevelStart" | "lists.setLevelLayout" | "comments.create" | "comments.patch" | "comments.delete" | "comments.get" | "comments.list" | "trackChanges.list" | "trackChanges.get" | "trackChanges.decide" | "query.match" | "ranges.resolve" | "selection.current" | "mutations.preview" | "mutations.apply" | "plan.execute" | "capabilities.get" | "capabilities.resolve" | "create.table" | "tables.convertFromText" | "tables.delete" | "tables.clearContents" | "tables.move" | "tables.split" | "tables.convertToText" | "tables.setLayout" | "tables.insertRow" | "tables.deleteRow" | "tables.setRowHeight" | "tables.distributeRows" | "tables.setRowOptions" | "tables.insertColumn" | "tables.deleteColumn" | "tables.setColumnWidth" | "tables.distributeColumns" | "tables.insertCell" | "tables.deleteCell" | "tables.mergeCells" | "tables.unmergeCells" | "tables.splitCell" | "tables.setCellProperties" | "tables.setCellText" | "tables.sort" | "tables.setAltText" | "tables.setStyle" | "tables.clearStyle" | "tables.setStyleOption" | "tables.setBorder" | "tables.clearBorder" | "tables.applyBorderPreset" | "tables.setShading" | "tables.clearShading" | "tables.setTablePadding" | "tables.setCellPadding" | "tables.setCellSpacing" | "tables.clearCellSpacing" | "tables.applyStyle" | "tables.setBorders" | "tables.setTableOptions" | "tables.applyPreset" | "tables.get" | "tables.getCells" | "tables.getProperties" | "tables.getStyles" | "tables.setDefaultStyle" | "tables.clearDefaultStyle" | "create.tableOfContents" | "toc.list" | "toc.get" | "toc.configure" | "toc.update" | "toc.remove" | "toc.markEntry" | "toc.unmarkEntry" | "toc.listEntries" | "toc.getEntry" | "toc.editEntry" | "history.get" | "history.undo" | "history.redo" | "create.image" | "images.list" | "images.get" | "images.delete" | "images.move" | "images.convertToInline" | "images.convertToFloating" | "images.setSize" | "images.setWrapType" | "images.setWrapSide" | "images.setWrapDistances" | "images.setPosition" | "images.setAnchorOptions" | "images.setZOrder" | "images.scale" | "images.setLockAspectRatio" | "images.rotate" | "images.flip" | "images.crop" | "images.resetCrop" | "images.replaceSource" | "images.setAltText" | "images.setDecorative" | "images.setName" | "images.setHyperlink" | "images.insertCaption" | "images.updateCaption" | "images.removeCaption" | "hyperlinks.list" | "hyperlinks.get" | "hyperlinks.wrap" | "hyperlinks.insert" | "hyperlinks.patch" | "hyperlinks.remove" | "headerFooters.list" | "headerFooters.get" | "headerFooters.resolve" | "headerFooters.refs.set" | "headerFooters.refs.clear" | "headerFooters.refs.setLinkedToPrevious" | "headerFooters.parts.list" | "headerFooters.parts.create" | "headerFooters.parts.delete" | "watermarks.apply" | "watermarks.list" | "watermarks.insert" | "watermarks.replace" | "watermarks.remove" | "create.contentControl" | "contentControls.list" | "contentControls.get" | "contentControls.listInRange" | "contentControls.selectByTag" | "contentControls.selectByTitle" | "contentControls.listChildren" | "contentControls.getParent" | "contentControls.wrap" | "contentControls.unwrap" | "contentControls.delete" | "contentControls.copy" | "contentControls.move" | "contentControls.patch" | "contentControls.setLockMode" | "contentControls.setType" | "contentControls.getContent" | "contentControls.replaceContent" | "contentControls.clearContent" | "contentControls.appendContent" | "contentControls.prependContent" | "contentControls.insertBefore" | "contentControls.insertAfter" | "contentControls.getBinding" | "contentControls.setBinding" | "contentControls.clearBinding" | "contentControls.getRawProperties" | "contentControls.patchRawProperties" | "contentControls.validateWordCompatibility" | "contentControls.normalizeWordCompatibility" | "contentControls.normalizeTagPayload" | "contentControls.text.setMultiline" | "contentControls.text.setValue" | "contentControls.text.clearValue" | "contentControls.date.setValue" | "contentControls.date.clearValue" | "contentControls.date.setDisplayFormat" | "contentControls.date.setDisplayLocale" | "contentControls.date.setStorageFormat" | "contentControls.date.setCalendar" | "contentControls.checkbox.getState" | "contentControls.checkbox.setState" | "contentControls.checkbox.toggle" | "contentControls.checkbox.setSymbolPair" | "contentControls.choiceList.getItems" | "contentControls.choiceList.setItems" | "contentControls.choiceList.setSelected" | "contentControls.repeatingSection.listItems" | "contentControls.repeatingSection.insertItemBefore" | "contentControls.repeatingSection.insertItemAfter" | "contentControls.repeatingSection.cloneItem" | "contentControls.repeatingSection.deleteItem" | "contentControls.repeatingSection.setAllowInsertDelete" | "contentControls.group.wrap" | "contentControls.group.ungroup" | "bookmarks.list" | "bookmarks.get" | "bookmarks.insert" | "bookmarks.rename" | "bookmarks.remove" | "footnotes.list" | "footnotes.get" | "footnotes.insert" | "footnotes.update" | "footnotes.remove" | "footnotes.configure" | "clipboard.parse" | "clipboard.insert" | "clipboard.serializeSelection" | "crossRefs.list" | "crossRefs.get" | "crossRefs.insert" | "crossRefs.rebuild" | "crossRefs.remove" | "index.list" | "index.get" | "index.insert" | "index.configure" | "index.rebuild" | "index.remove" | "index.entries.list" | "index.entries.get" | "index.entries.insert" | "index.entries.update" | "index.entries.remove" | "captions.list" | "captions.get" | "captions.insert" | "captions.update" | "captions.remove" | "captions.configure" | "fields.list" | "fields.get" | "fields.insert" | "fields.rebuild" | "fields.remove" | "citations.list" | "citations.get" | "citations.insert" | "citations.update" | "citations.remove" | "citations.sources.list" | "citations.sources.get" | "citations.sources.insert" | "citations.sources.update" | "citations.sources.remove" | "citations.bibliography.get" | "citations.bibliography.insert" | "citations.bibliography.rebuild" | "citations.bibliography.configure" | "citations.bibliography.remove" | "authorities.list" | "authorities.get" | "authorities.insert" | "authorities.configure" | "authorities.rebuild" | "authorities.remove" | "authorities.entries.list" | "authorities.entries.get" | "authorities.entries.insert" | "authorities.entries.update" | "authorities.entries.remove" | "diff.capture" | "diff.compare" | "diff.apply" | "export.toDocx" | "protection.get" | "protection.setEditingRestriction" | "protection.clearEditingRestriction" | "permissionRanges.list" | "permissionRanges.get" | "permissionRanges.create" | "permissionRanges.remove" | "permissionRanges.updatePrincipal" | "customXml.parts.list" | "customXml.parts.get" | "customXml.parts.create" | "customXml.parts.patch" | "customXml.parts.remove" | "metadata.attach" | "metadata.list" | "metadata.get" | "metadata.update" | "metadata.remove" | "metadata.resolve")[];
4
+ export declare const MUTATING_OPERATION_IDS: ("replace" | "find" | "insert" | "delete" | "info" | "projectHtml" | "projectMarkdown" | "capabilities.check" | "format.apply" | "blocks.split" | "blocks.merge" | "blocks.move" | "lists.getState" | "lists.apply" | "lists.continue" | "lists.restart" | "lists.remove" | "format.paragraph.setMarkRunProps" | "tables.moveRow" | "tables.moveColumn" | "format.bold" | "format.strike" | "format.color" | "format.rtl" | "format.cs" | "format.shading" | "format.fontFamily" | "format.lang" | "format.fontSize" | "format.fontSizeCs" | "format.highlight" | "format.italic" | "format.underline" | "format.caps" | "format.smallCaps" | "format.outline" | "format.shadow" | "format.emboss" | "format.imprint" | "format.vanish" | "format.webHidden" | "format.specVanish" | "format.border" | "format.fitText" | "format.dstrike" | "format.vertAlign" | "format.position" | "format.bCs" | "format.iCs" | "format.snapToGrid" | "format.oMath" | "format.letterSpacing" | "format.charScale" | "format.kerning" | "format.rStyle" | "format.rFonts" | "format.eastAsianLayout" | "format.em" | "format.ligatures" | "format.numForm" | "format.numSpacing" | "format.stylisticSets" | "format.contextualAlternates" | "get" | "getNode" | "getNodeById" | "getText" | "getMarkdown" | "getHtml" | "markdownToFragment" | "htmlToFragment" | "extract" | "clearContent" | "formatRange" | "blocks.findText" | "blocks.list" | "blocks.delete" | "blocks.deleteRange" | "styles.apply" | "styles.getCatalog" | "templates.apply" | "create.paragraph" | "create.heading" | "create.sectionBreak" | "sections.list" | "sections.get" | "sections.setBreakType" | "sections.setPageMargins" | "sections.setHeaderFooterMargins" | "sections.setPageSetup" | "sections.setColumns" | "sections.setLineNumbering" | "sections.setPageNumbering" | "sections.setTitlePage" | "sections.setOddEvenHeadersFooters" | "sections.setVerticalAlign" | "sections.setSectionDirection" | "sections.setHeaderFooterRef" | "sections.clearHeaderFooterRef" | "sections.setLinkToPrevious" | "sections.setPageBorders" | "sections.clearPageBorders" | "styles.paragraph.setStyle" | "styles.paragraph.setStyleRef" | "styles.paragraph.clearStyle" | "format.paragraph.resetDirectFormatting" | "format.paragraph.setAlignment" | "format.paragraph.clearAlignment" | "format.paragraph.setIndentation" | "format.paragraph.clearIndentation" | "format.paragraph.setSpacing" | "format.paragraph.clearSpacing" | "format.paragraph.setKeepOptions" | "format.paragraph.setOutlineLevel" | "format.paragraph.setFlowOptions" | "format.paragraph.setTabStop" | "format.paragraph.clearTabStop" | "format.paragraph.clearAllTabStops" | "format.paragraph.setBorder" | "format.paragraph.clearBorder" | "format.paragraph.setShading" | "format.paragraph.clearShading" | "format.paragraph.setDirection" | "format.paragraph.clearDirection" | "format.paragraph.setNumbering" | "lists.list" | "lists.get" | "lists.insert" | "lists.create" | "lists.attach" | "lists.detach" | "lists.delete" | "lists.indent" | "lists.outdent" | "lists.join" | "lists.canJoin" | "lists.separate" | "lists.merge" | "lists.split" | "lists.setLevel" | "lists.setValue" | "lists.continuePrevious" | "lists.canContinuePrevious" | "lists.setLevelRestart" | "lists.convertToText" | "lists.applyTemplate" | "lists.applyPreset" | "lists.setType" | "lists.captureTemplate" | "lists.setLevelNumbering" | "lists.setLevelBullet" | "lists.setLevelPictureBullet" | "lists.setLevelAlignment" | "lists.setLevelIndents" | "lists.setLevelTrailingCharacter" | "lists.setLevelMarkerFont" | "lists.clearLevelOverrides" | "lists.getStyle" | "lists.applyStyle" | "lists.restartAt" | "lists.setLevelNumberStyle" | "lists.setLevelText" | "lists.setLevelStart" | "lists.setLevelLayout" | "comments.create" | "comments.patch" | "comments.delete" | "comments.get" | "comments.list" | "trackChanges.list" | "trackChanges.get" | "trackChanges.decide" | "query.match" | "ranges.resolve" | "selection.current" | "selection.extractOoxml" | "mutations.preview" | "mutations.apply" | "plan.execute" | "capabilities.get" | "capabilities.resolve" | "create.table" | "tables.convertFromText" | "tables.delete" | "tables.clearContents" | "tables.move" | "tables.split" | "tables.convertToText" | "tables.setLayout" | "tables.insertRow" | "tables.deleteRow" | "tables.setRowHeight" | "tables.distributeRows" | "tables.setRowOptions" | "tables.insertColumn" | "tables.deleteColumn" | "tables.setColumnWidth" | "tables.distributeColumns" | "tables.insertCell" | "tables.deleteCell" | "tables.mergeCells" | "tables.unmergeCells" | "tables.splitCell" | "tables.setCellProperties" | "tables.setCellText" | "tables.sort" | "tables.setAltText" | "tables.setStyle" | "tables.clearStyle" | "tables.setStyleOption" | "tables.setBorder" | "tables.clearBorder" | "tables.applyBorderPreset" | "tables.setShading" | "tables.clearShading" | "tables.setTablePadding" | "tables.setCellPadding" | "tables.setCellSpacing" | "tables.clearCellSpacing" | "tables.applyStyle" | "tables.setBorders" | "tables.setTableOptions" | "tables.applyPreset" | "tables.get" | "tables.getCells" | "tables.getProperties" | "tables.getStyles" | "tables.setDefaultStyle" | "tables.clearDefaultStyle" | "create.tableOfContents" | "toc.list" | "toc.get" | "toc.configure" | "toc.update" | "toc.remove" | "toc.markEntry" | "toc.unmarkEntry" | "toc.listEntries" | "toc.getEntry" | "toc.editEntry" | "history.get" | "history.undo" | "history.redo" | "create.image" | "images.list" | "images.get" | "images.delete" | "images.move" | "images.convertToInline" | "images.convertToFloating" | "images.setSize" | "images.setWrapType" | "images.setWrapSide" | "images.setWrapDistances" | "images.setPosition" | "images.setAnchorOptions" | "images.setZOrder" | "images.scale" | "images.setLockAspectRatio" | "images.rotate" | "images.flip" | "images.crop" | "images.resetCrop" | "images.replaceSource" | "images.setAltText" | "images.setDecorative" | "images.setName" | "images.setHyperlink" | "images.insertCaption" | "images.updateCaption" | "images.removeCaption" | "hyperlinks.list" | "hyperlinks.get" | "hyperlinks.wrap" | "hyperlinks.insert" | "hyperlinks.patch" | "hyperlinks.remove" | "headerFooters.list" | "headerFooters.get" | "headerFooters.resolve" | "headerFooters.refs.set" | "headerFooters.refs.clear" | "headerFooters.refs.setLinkedToPrevious" | "headerFooters.parts.list" | "headerFooters.parts.create" | "headerFooters.parts.delete" | "watermarks.apply" | "watermarks.list" | "watermarks.insert" | "watermarks.replace" | "watermarks.remove" | "create.contentControl" | "contentControls.list" | "contentControls.get" | "contentControls.listInRange" | "contentControls.selectByTag" | "contentControls.selectByTitle" | "contentControls.listChildren" | "contentControls.getParent" | "contentControls.wrap" | "contentControls.unwrap" | "contentControls.delete" | "contentControls.copy" | "contentControls.move" | "contentControls.patch" | "contentControls.setLockMode" | "contentControls.setType" | "contentControls.getContent" | "contentControls.replaceContent" | "contentControls.clearContent" | "contentControls.appendContent" | "contentControls.prependContent" | "contentControls.insertBefore" | "contentControls.insertAfter" | "contentControls.getBinding" | "contentControls.setBinding" | "contentControls.clearBinding" | "contentControls.getRawProperties" | "contentControls.patchRawProperties" | "contentControls.validateWordCompatibility" | "contentControls.normalizeWordCompatibility" | "contentControls.normalizeTagPayload" | "contentControls.text.setMultiline" | "contentControls.text.setValue" | "contentControls.text.clearValue" | "contentControls.date.setValue" | "contentControls.date.clearValue" | "contentControls.date.setDisplayFormat" | "contentControls.date.setDisplayLocale" | "contentControls.date.setStorageFormat" | "contentControls.date.setCalendar" | "contentControls.checkbox.getState" | "contentControls.checkbox.setState" | "contentControls.checkbox.toggle" | "contentControls.checkbox.setSymbolPair" | "contentControls.choiceList.getItems" | "contentControls.choiceList.setItems" | "contentControls.choiceList.setSelected" | "contentControls.repeatingSection.listItems" | "contentControls.repeatingSection.insertItemBefore" | "contentControls.repeatingSection.insertItemAfter" | "contentControls.repeatingSection.cloneItem" | "contentControls.repeatingSection.deleteItem" | "contentControls.repeatingSection.setAllowInsertDelete" | "contentControls.group.wrap" | "contentControls.group.ungroup" | "bookmarks.list" | "bookmarks.get" | "bookmarks.insert" | "bookmarks.rename" | "bookmarks.remove" | "footnotes.list" | "footnotes.get" | "footnotes.insert" | "footnotes.update" | "footnotes.remove" | "footnotes.configure" | "clipboard.parse" | "clipboard.insert" | "clipboard.serializeSelection" | "crossRefs.list" | "crossRefs.get" | "crossRefs.insert" | "crossRefs.rebuild" | "crossRefs.remove" | "index.list" | "index.get" | "index.insert" | "index.configure" | "index.rebuild" | "index.remove" | "index.entries.list" | "index.entries.get" | "index.entries.insert" | "index.entries.update" | "index.entries.remove" | "captions.list" | "captions.get" | "captions.insert" | "captions.update" | "captions.remove" | "captions.configure" | "fields.list" | "fields.get" | "fields.insert" | "fields.rebuild" | "fields.remove" | "citations.list" | "citations.get" | "citations.insert" | "citations.update" | "citations.remove" | "citations.sources.list" | "citations.sources.get" | "citations.sources.insert" | "citations.sources.update" | "citations.sources.remove" | "citations.bibliography.get" | "citations.bibliography.insert" | "citations.bibliography.rebuild" | "citations.bibliography.configure" | "citations.bibliography.remove" | "authorities.list" | "authorities.get" | "authorities.insert" | "authorities.configure" | "authorities.rebuild" | "authorities.remove" | "authorities.entries.list" | "authorities.entries.get" | "authorities.entries.insert" | "authorities.entries.update" | "authorities.entries.remove" | "diff.capture" | "diff.compare" | "diff.apply" | "export.toDocx" | "protection.get" | "protection.setEditingRestriction" | "protection.clearEditingRestriction" | "permissionRanges.list" | "permissionRanges.get" | "permissionRanges.create" | "permissionRanges.remove" | "permissionRanges.updatePrincipal" | "customXml.parts.list" | "customXml.parts.get" | "customXml.parts.create" | "customXml.parts.patch" | "customXml.parts.remove" | "metadata.attach" | "metadata.list" | "metadata.get" | "metadata.update" | "metadata.remove" | "metadata.resolve")[];
5
5
  /** Maps each operation to its human-readable description. */
6
6
  export declare const OPERATION_DESCRIPTION_MAP: Record<OperationId, string>;
7
7
  /** Maps each operation to whether it requires an open document to execute. */
@@ -3,7 +3,7 @@ export declare const OPERATION_IDEMPOTENCY_VALUES: readonly ["idempotent", "cond
3
3
  export type OperationIdempotency = (typeof OPERATION_IDEMPOTENCY_VALUES)[number];
4
4
  export declare const OPERATION_TRACKED_SUPPORT_VALUES: readonly ["always", "conditional", "never"];
5
5
  export type OperationTrackedSupport = (typeof OPERATION_TRACKED_SUPPORT_VALUES)[number];
6
- export declare const PRE_APPLY_THROW_CODES: readonly ["TARGET_NOT_FOUND", "CAPABILITY_UNAVAILABLE", "INVALID_TARGET", "AMBIGUOUS_TARGET", "REVISION_MISMATCH", "MATCH_NOT_FOUND", "AMBIGUOUS_MATCH", "STYLE_CONFLICT", "PRECONDITION_FAILED", "INVALID_INPUT", "CROSS_BLOCK_MATCH", "SPAN_FRAGMENTED", "TARGET_MOVED", "PLAN_CONFLICT_OVERLAP", "INVALID_STEP_COMBINATION", "REVISION_CHANGED_SINCE_COMPILE", "INVALID_INSERTION_CONTEXT", "DOCUMENT_IDENTITY_CONFLICT", "INTERNAL_ERROR", "ADDRESS_STALE", "DUPLICATE_ID", "INVALID_CONTEXT", "RAW_MODE_REQUIRED", "PRESERVE_ONLY_VIOLATION", "CAPABILITY_UNSUPPORTED", "LOCK_VIOLATION", "TYPE_MISMATCH", "STORY_NOT_FOUND", "STORY_MISMATCH", "STORY_NOT_SUPPORTED", "CROSS_STORY_PLAN", "MATERIALIZATION_FAILED"];
6
+ export declare const PRE_APPLY_THROW_CODES: readonly ["TARGET_NOT_FOUND", "CAPABILITY_UNAVAILABLE", "INVALID_TARGET", "AMBIGUOUS_TARGET", "REVISION_MISMATCH", "MATCH_NOT_FOUND", "AMBIGUOUS_MATCH", "STYLE_CONFLICT", "PRECONDITION_FAILED", "INVALID_INPUT", "CROSS_BLOCK_MATCH", "SPAN_FRAGMENTED", "TARGET_MOVED", "PLAN_CONFLICT_OVERLAP", "INVALID_STEP_COMBINATION", "REVISION_CHANGED_SINCE_COMPILE", "INVALID_INSERTION_CONTEXT", "DOCUMENT_IDENTITY_CONFLICT", "INTERNAL_ERROR", "ADDRESS_STALE", "DUPLICATE_ID", "INVALID_CONTEXT", "RAW_MODE_REQUIRED", "PRESERVE_ONLY_VIOLATION", "CAPABILITY_UNSUPPORTED", "LOCK_VIOLATION", "TYPE_MISMATCH", "STORY_NOT_FOUND", "STORY_MISMATCH", "STORY_NOT_SUPPORTED", "CROSS_STORY_PLAN", "MATERIALIZATION_FAILED", "RESOURCE_LIMIT"];
7
7
  export type PreApplyThrowCode = (typeof PRE_APPLY_THROW_CODES)[number];
8
8
  export interface CommandThrowPolicy {
9
9
  preApply: readonly PreApplyThrowCode[];
@@ -1031,6 +1031,15 @@ export declare const OPERATION_DEFINITIONS: {
1031
1031
  readonly referenceDocPath: "selection/current.mdx";
1032
1032
  readonly referenceGroup: "selection";
1033
1033
  };
1034
+ readonly 'selection.extractOoxml': {
1035
+ readonly memberPath: "selection.extractOoxml";
1036
+ readonly description: "Capture a nonempty current or addressed selection as OOXML with its structure, context, and package dependencies.";
1037
+ readonly expectedResult: "Returns the selected OOXML, structural placement, source provenance, and required relationships and parts without changing the document.";
1038
+ readonly requiresDocumentContext: true;
1039
+ readonly metadata: CommandStaticMetadata;
1040
+ readonly referenceDocPath: "selection/extract-ooxml.mdx";
1041
+ readonly referenceGroup: "selection";
1042
+ };
1034
1043
  readonly 'mutations.preview': {
1035
1044
  readonly memberPath: "mutations.preview";
1036
1045
  readonly description: "Dry-run a mutation plan, returning resolved targets without applying changes.";
@@ -76,8 +76,8 @@ export * from './export/export.types.js';
76
76
  export type { SelectionMutationAdapter, SelectionMutationRequest, SelectionInsertRequest, } from './selection-mutation.js';
77
77
  export type { RangeAnchor, DocumentEdgeAnchor, PointAnchor, RefBoundaryAnchor, ResolveRangeInput, ResolveRangeOutput, RangeBlockPreview, RangePreview, RangeResolverAdapter, ScrollIntoViewInput, ScrollIntoViewOutput, } from './ranges/index.js';
78
78
  export { executeResolveRange } from './ranges/index.js';
79
- export type { SelectionApi, SelectionAdapter, SelectionCurrentInput, SelectionInfo } from './selection/selection.js';
80
- export { executeSelectionCurrent } from './selection/selection.js';
79
+ export type { SelectionApi, SelectionAdapter, SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, SelectionInfo, } from './selection/selection.js';
80
+ export { executeSelectionCurrent, executeSelectionExtractOoxml } from './selection/selection.js';
81
81
  export type { HeaderFootersAdapter, HeaderFootersApi } from './header-footers/header-footers.js';
82
82
  export * from './header-footers/header-footers.types.js';
83
83
  export type { WatermarksAdapter, WatermarksApi } from './watermarks/watermarks.js';
@@ -1,11 +1,12 @@
1
- import { SelectionCurrentInput, SelectionInfo } from './selection.types.js';
2
- export type { SelectionCurrentInput, SelectionInfo } from './selection.types.js';
1
+ import { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionInfo } from './selection.types.js';
2
+ export type { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, SelectionInfo, } from './selection.types.js';
3
3
  /**
4
4
  * Engine-specific adapter for the selection API.
5
5
  */
6
6
  export interface SelectionAdapter {
7
7
  /** Read the editor's current selection. */
8
8
  current(input: SelectionCurrentInput): SelectionInfo;
9
+ extractOoxml(input: SelectionExtractOoxmlInput): SelectionExtractOoxmlResult;
9
10
  }
10
11
  /**
11
12
  * Public selection API exposed on `editor.doc.selection`.
@@ -19,5 +20,8 @@ export interface SelectionApi {
19
20
  * pass the resulting `target` directly to `comments.create`.
20
21
  */
21
22
  current(input?: SelectionCurrentInput): SelectionInfo;
23
+ /** Capture the addressed selected OOXML and its package dependencies. */
24
+ extractOoxml(input: SelectionExtractOoxmlInput): SelectionExtractOoxmlResult;
22
25
  }
26
+ export declare function executeSelectionExtractOoxml(adapter: SelectionAdapter, input: SelectionExtractOoxmlInput): SelectionExtractOoxmlResult;
23
27
  export declare function executeSelectionCurrent(adapter: SelectionAdapter, input?: SelectionCurrentInput): SelectionInfo;
@@ -1,4 +1,79 @@
1
1
  import { SelectionTarget, TextTarget } from '../types/address.js';
2
+ export interface SelectionTableCellsTarget {
3
+ kind: 'tableCells';
4
+ tableId: string;
5
+ start: {
6
+ rowIndex: number;
7
+ columnIndex: number;
8
+ };
9
+ end: {
10
+ rowIndex: number;
11
+ columnIndex: number;
12
+ };
13
+ story?: SelectionTarget['story'];
14
+ }
15
+ export type SelectionExtractOoxmlInput = {
16
+ at: SelectionTarget | SelectionTableCellsTarget;
17
+ selection?: never;
18
+ } | {
19
+ selection: 'current';
20
+ at?: never;
21
+ };
22
+ export interface SelectionOoxmlDependency {
23
+ sourcePartUri: string;
24
+ relationshipId: string;
25
+ relationshipType: string;
26
+ target: string;
27
+ targetMode: 'Internal' | 'External';
28
+ contentType: string | null;
29
+ /** Base64-encoded target part when the relationship is internal. */
30
+ dataBase64?: string;
31
+ }
32
+ export interface SelectionExtractOoxmlResult {
33
+ /** Version of the serialized selection-capture manifest. */
34
+ formatVersion: 1;
35
+ at: SelectionTarget | SelectionTableCellsTarget;
36
+ /** Source revision for provenance, never a read precondition. */
37
+ evaluatedRevision: string;
38
+ fragment: {
39
+ placement: 'inline' | 'blocks' | 'table';
40
+ /** Selected WordprocessingML with enough structural wrappers for its placement. */
41
+ xml: string;
42
+ /** Namespace bindings needed to parse the selected fragment. */
43
+ namespaces: Record<string, string>;
44
+ /** Source grid positions for a whole-table or rectangular-cell capture. */
45
+ table?: {
46
+ tableId: string;
47
+ gridColumnCount: number;
48
+ cells: {
49
+ rowIndex: number;
50
+ columnIndex: number;
51
+ gridSpan: number;
52
+ vMerge: 'none' | 'restart' | 'continue';
53
+ }[];
54
+ };
55
+ };
56
+ source: {
57
+ story: SelectionTarget['story'] | null;
58
+ partUri: string;
59
+ paragraphStyleId: string | null;
60
+ };
61
+ /** Source structure outside the selected visible content needed to interpret it. */
62
+ context: {
63
+ xml: string[];
64
+ tableMerges?: {
65
+ selectedRowIndex: number;
66
+ columnIndex: number;
67
+ restartRowIndex: number;
68
+ restartCellPropertiesXml: string;
69
+ }[];
70
+ };
71
+ dependencies: SelectionOoxmlDependency[];
72
+ diagnostics: {
73
+ code: string;
74
+ message: string;
75
+ }[];
76
+ }
2
77
  /**
3
78
  * Input for `selection.current`: reads the editor's current selection.
4
79
  *
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-BFJ9Y0YV.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CSZSAgxc.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let react = require("react");
5
5
  //#region src/public/ui/react.ts
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dfw1b6h_.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DMe-GQEe.es.js";
2
2
  import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
3
3
  import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
4
4
  //#region src/public/ui/react.ts
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-BFJ9Y0YV.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CSZSAgxc.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let vue = require("vue");
5
5
  //#region src/public/ui/vue.ts
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dfw1b6h_.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DMe-GQEe.es.js";
2
2
  import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
3
3
  import { computed, inject, onScopeDispose, provide, shallowRef, toRaw, toValue, watch } from "vue";
4
4
  //#region src/public/ui/vue.ts
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-BFJ9Y0YV.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CSZSAgxc.cjs");
3
3
  exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
4
4
  exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
5
5
  exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
@@ -1,2 +1,2 @@
1
- import { i as BUILT_IN_COMMAND_IDS, l as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dfw1b6h_.es.js";
1
+ import { i as BUILT_IN_COMMAND_IDS, l as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-DMe-GQEe.es.js";
2
2
  export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
3
3
  const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
4
- const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-BFJ9Y0YV.cjs");
4
+ const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-CSZSAgxc.cjs");
5
5
  const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
6
6
  const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
7
7
  const require_jszip = require("./chunks/jszip-D8mAFF-r.cjs");
@@ -316,7 +316,7 @@ var shuffleArray = (array) => {
316
316
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
317
317
  function getSuperdocVersion() {
318
318
  try {
319
- return "2.19.0-next.4";
319
+ return "2.19.0-next.6";
320
320
  } catch {
321
321
  return "unknown";
322
322
  }
@@ -45686,7 +45686,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45686
45686
  this.config.colors = shuffleArray(this.config.colors);
45687
45687
  this.userColorMap = /* @__PURE__ */ new Map();
45688
45688
  this.colorIndex = 0;
45689
- this.version = "2.19.0-next.4";
45689
+ this.version = "2.19.0-next.6";
45690
45690
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45691
45691
  this.superdocId = config.superdocId || require_uuid.v4();
45692
45692
  this.colors = this.config.colors ?? [];
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
2
2
  import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
3
- import { a as applyV2CommentInvalidationFromMutation, c as resolveImageSrc, d as closeInteractionHistory, f as createInteractionHistory, n as executeFirstPartyCommandAsync, o as getV2TrackedChangeMutationImpact, p as recordInteraction, r as registerFirstPartyCommandMutation, s as createImageFilePicker, t as createSuperDocUI, u as DOM_CLASS_NAMES } from "./chunks/create-super-doc-ui-Dfw1b6h_.es.js";
3
+ import { a as applyV2CommentInvalidationFromMutation, c as resolveImageSrc, d as closeInteractionHistory, f as createInteractionHistory, n as executeFirstPartyCommandAsync, o as getV2TrackedChangeMutationImpact, p as recordInteraction, r as registerFirstPartyCommandMutation, s as createImageFilePicker, t as createSuperDocUI, u as DOM_CLASS_NAMES } from "./chunks/create-super-doc-ui-DMe-GQEe.es.js";
4
4
  import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
5
5
  import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
6
6
  import { a as init_dist$1, i as global, n as init_dist$2, o as Buffer, r as process$1, s as init_dist, t as require_jszip_min } from "./chunks/jszip-BzJ3CyxR.es.js";
@@ -315,7 +315,7 @@ var shuffleArray = (array) => {
315
315
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
316
316
  function getSuperdocVersion() {
317
317
  try {
318
- return "2.19.0-next.4";
318
+ return "2.19.0-next.6";
319
319
  } catch {
320
320
  return "unknown";
321
321
  }
@@ -45617,7 +45617,7 @@ var SuperDoc = class extends import_eventemitter3.default {
45617
45617
  this.config.colors = shuffleArray(this.config.colors);
45618
45618
  this.userColorMap = /* @__PURE__ */ new Map();
45619
45619
  this.colorIndex = 0;
45620
- this.version = "2.19.0-next.4";
45620
+ this.version = "2.19.0-next.6";
45621
45621
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45622
45622
  this.superdocId = config.superdocId || v4();
45623
45623
  this.colors = this.config.colors ?? [];