superdoc 2.25.0-next.1 → 2.25.0-next.11

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 (72) hide show
  1. package/dist/chunks/{FindReplaceSurface-BUw19rV8.cjs → FindReplaceSurface-8V8AjgR4.cjs} +1 -1
  2. package/dist/chunks/{FindReplaceSurface-B5dzB2sG.es.js → FindReplaceSurface-RUiTFDt3.es.js} +1 -1
  3. package/dist/chunks/{PasswordPromptSurface-DaIztq50.cjs → PasswordPromptSurface-B5DHV6qr.cjs} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-Ciu8aSmK.es.js → PasswordPromptSurface-BDpxqdzp.es.js} +1 -1
  5. package/dist/chunks/{PdfViewer-B8y_9or_.es.js → PdfViewer-DjdsIh6n.es.js} +1 -1
  6. package/dist/chunks/{PdfViewer-DRzLH3eS.cjs → PdfViewer-omriDChK.cjs} +1 -1
  7. package/dist/chunks/{_plugin-vue_export-helper-DHiJKCsy.es.js → _plugin-vue_export-helper-7ZiLY07t.es.js} +4 -1
  8. package/dist/chunks/{_plugin-vue_export-helper-CYxINHh_.cjs → _plugin-vue_export-helper-BUdjGKyl.cjs} +9 -0
  9. package/dist/chunks/{create-super-doc-ui-bTFGKVRb.cjs → create-super-doc-ui-ABeUNZlq.cjs} +105 -8
  10. package/dist/chunks/{create-super-doc-ui-8UTu16Lw.es.js → create-super-doc-ui-CCNvH6mr.es.js} +105 -8
  11. package/dist/collaboration-upgrade-engine.cjs +1 -1
  12. package/dist/collaboration-upgrade-engine.es.js +1 -1
  13. package/dist/document-api/src/comments/comments.d.ts +2 -1
  14. package/dist/document-api/src/comments/comments.types.d.ts +2 -0
  15. package/dist/document-api/src/content-controls/content-controls.types.d.ts +4 -2
  16. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  17. package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
  18. package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +9 -2
  19. package/dist/document-api/src/images/images.types.d.ts +3 -3
  20. package/dist/document-api/src/index.d.ts +1 -0
  21. package/dist/document-api/src/lists/lists.types.d.ts +11 -11
  22. package/dist/document-api/src/permission-ranges/permission-ranges.d.ts +9 -1
  23. package/dist/document-api/src/permission-ranges/permission-ranges.types.d.ts +17 -0
  24. package/dist/document-api/src/protection/protection.types.d.ts +2 -2
  25. package/dist/document-api/src/receipt-bridge.d.ts +3 -0
  26. package/dist/document-api/src/selection/selection.types.d.ts +3 -2
  27. package/dist/document-api/src/types/blocks.types.d.ts +2 -2
  28. package/dist/document-api/src/types/mutation-plan.types.d.ts +45 -5
  29. package/dist/document-api/src/types/receipt.d.ts +12 -0
  30. package/dist/document-api/src/types/sd-contract.d.ts +3 -0
  31. package/dist/document-api/src/types/track-changes.types.d.ts +8 -0
  32. package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +2 -2
  33. package/dist/layout-engine/contracts/src/index.d.ts +4 -0
  34. package/dist/layout-engine/layout-bridge/src/font-metrics-cache.d.ts +2 -23
  35. package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +11 -4
  36. package/dist/layout-engine/layout-bridge/src/index.d.ts +3 -3
  37. package/dist/layout-engine/layout-bridge/src/measurement-environment.d.ts +12 -0
  38. package/dist/layout-engine/layout-bridge/src/resolveLiveCrossReferences.d.ts +1 -1
  39. package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +8 -0
  40. package/dist/layout-engine/painters/dom/src/decoration-geometry.d.ts +17 -0
  41. package/dist/layout-engine/painters/dom/src/index.d.ts +5 -0
  42. package/dist/layout-engine/painters/dom/src/renderer.d.ts +0 -31
  43. package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +2 -17
  44. package/dist/layout-engine/painters/dom/src/runs/text-style-facts.d.ts +9 -0
  45. package/dist/layout-engine/painters/dom/src/runs/tracked-changes.d.ts +6 -9
  46. package/dist/layout-engine/painters/dom/src/styles.d.ts +21 -0
  47. package/dist/public/ui-react.cjs +1 -1
  48. package/dist/public/ui-react.es.js +1 -1
  49. package/dist/public/ui-vue.cjs +1 -1
  50. package/dist/public/ui-vue.es.js +1 -1
  51. package/dist/public/ui.cjs +1 -1
  52. package/dist/public/ui.es.js +1 -1
  53. package/dist/shared/font-system/src/registry.d.ts +5 -1
  54. package/dist/shared/font-system/src/resolver.d.ts +2 -0
  55. package/dist/style.css +1 -4239
  56. package/dist/style.layered.css +1 -4239
  57. package/dist/superdoc/src/composables/use-link-popover.d.ts +9 -0
  58. package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -0
  59. package/dist/superdoc/src/core/types/index.d.ts +1 -1
  60. package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +1 -0
  61. package/dist/superdoc/src/index.d.cts +2 -0
  62. package/dist/superdoc/src/index.d.ts +1 -0
  63. package/dist/superdoc/src/public/index.d.cts +8 -0
  64. package/dist/superdoc/src/public/index.d.ts +2 -0
  65. package/dist/superdoc/src/stores/comments-store.d.ts +7 -4
  66. package/dist/superdoc/src/stores/superdoc-store.d.ts +21 -12
  67. package/dist/superdoc.cjs +357 -137
  68. package/dist/superdoc.es.js +356 -138
  69. package/dist-cdn/style.layered.css +1 -1
  70. package/dist-cdn/superdoc.min.css +1 -1
  71. package/dist-cdn/superdoc.min.js +42 -42
  72. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-CYxINHh_.cjs");
1
+ const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BUdjGKyl.cjs");
2
2
  //#region src/components/surfaces/FindReplaceSurface.vue
3
3
  var _hoisted_1 = ["onKeydown"];
4
4
  var _hoisted_2 = { class: "sd-find-replace__row" };
@@ -1,4 +1,4 @@
1
- import { D as normalizeClass, F as openBlock, L as ref, N as onMounted, U as toDisplayString, a as computed, c as createCommentVNode, l as createElementBlock, nt as withKeys, rt as withModifiers, t as _plugin_vue_export_helper_default, u as createElementVNode } from "./_plugin-vue_export-helper-DHiJKCsy.es.js";
1
+ import { D as normalizeClass, F as openBlock, N as onMounted, R as ref, W as toDisplayString, a as computed, c as createCommentVNode, it as withModifiers, l as createElementBlock, rt as withKeys, t as _plugin_vue_export_helper_default, u as createElementVNode } from "./_plugin-vue_export-helper-7ZiLY07t.es.js";
2
2
  //#region src/components/surfaces/FindReplaceSurface.vue
3
3
  var _hoisted_1 = ["onKeydown"];
4
4
  var _hoisted_2 = { class: "sd-find-replace__row" };
@@ -1,4 +1,4 @@
1
- const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-CYxINHh_.cjs");
1
+ const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BUdjGKyl.cjs");
2
2
  //#region src/components/surfaces/PasswordPromptSurface.vue
3
3
  var _hoisted_1 = ["onKeydown"];
4
4
  var _hoisted_2 = ["id"];
@@ -1,4 +1,4 @@
1
- import { F as openBlock, L as ref, Q as vModelText, U as toDisplayString, a as computed, c as createCommentVNode, l as createElementBlock, nt as withKeys, rt as withModifiers, t as _plugin_vue_export_helper_default, tt as withDirectives, u as createElementVNode } from "./_plugin-vue_export-helper-DHiJKCsy.es.js";
1
+ import { $ as vModelText, F as openBlock, R as ref, W as toDisplayString, a as computed, c as createCommentVNode, it as withModifiers, l as createElementBlock, nt as withDirectives, rt as withKeys, t as _plugin_vue_export_helper_default, u as createElementVNode } from "./_plugin-vue_export-helper-7ZiLY07t.es.js";
2
2
  //#region src/components/surfaces/PasswordPromptSurface.vue
3
3
  var _hoisted_1 = ["onKeydown"];
4
4
  var _hoisted_2 = ["id"];
@@ -1,4 +1,4 @@
1
- import { $ as watch, F as openBlock, H as shallowRef, L as ref, N as onMounted, R as renderList, T as mergeProps, a as computed, c as createCommentVNode, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, n as Fragment, p as createVNode, s as createBlock, t as _plugin_vue_export_helper_default, u as createElementVNode, w as markRaw } from "./_plugin-vue_export-helper-DHiJKCsy.es.js";
1
+ import { F as openBlock, N as onMounted, R as ref, T as mergeProps, U as shallowRef, a as computed, c as createCommentVNode, et as watch, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, n as Fragment, p as createVNode, s as createBlock, t as _plugin_vue_export_helper_default, u as createElementVNode, w as markRaw, z as renderList } from "./_plugin-vue_export-helper-7ZiLY07t.es.js";
2
2
  import { t as PDF_TO_CSS_UNITS } from "./constants-B6VBlmKp.es.js";
3
3
  //#region src/core/pdf/helpers/floor.js
4
4
  var floor = (val, precision) => {
@@ -1,4 +1,4 @@
1
- const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-CYxINHh_.cjs");
1
+ const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BUdjGKyl.cjs");
2
2
  const require_constants = require("./constants-DpXuDx_g.cjs");
3
3
  //#region src/core/pdf/helpers/floor.js
4
4
  var floor = (val, precision) => {
@@ -140,6 +140,9 @@ function onScopeDispose(...args) {
140
140
  function openBlock(...args) {
141
141
  return runtime().openBlock(...args);
142
142
  }
143
+ function provide(...args) {
144
+ return runtime().provide(...args);
145
+ }
143
146
  function reactive(...args) {
144
147
  return runtime().reactive(...args);
145
148
  }
@@ -208,4 +211,4 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
208
211
  return target;
209
212
  };
210
213
  //#endregion
211
- export { watch as $, onActivated as A, resolveDirective as B, isRef as C, normalizeClass as D, nextTick as E, openBlock as F, toRef as G, shallowRef as H, reactive as I, useAttrs as J, toRefs as K, ref as L, onDeactivated as M, onMounted as N, normalizeProps as O, onScopeDispose as P, vModelText as Q, renderList as R, isReactive as S, mergeProps as T, toDisplayString as U, resolveDynamicComponent as V, toRaw as W, vModelCheckbox as X, useSlots as Y, vModelSelect as Z, getCurrentInstance as _, computed as a, hasInjectionContext as b, createCommentVNode as c, createStaticVNode as d, withCtx as et, createTextVNode as f, effectScope as g, defineComponent as h, Transition as i, onBeforeUnmount as j, normalizeStyle as k, createElementBlock as l, defineAsyncComponent as m, Fragment as n, withKeys as nt, createApp as o, createVNode as p, unref as q, Teleport as r, withModifiers as rt, createBlock as s, _plugin_vue_export_helper_default as t, withDirectives as tt, createElementVNode as u, getCurrentScope as v, markRaw as w, inject as x, h as y, renderSlot as z };
214
+ export { vModelText as $, onActivated as A, renderSlot as B, isRef as C, normalizeClass as D, nextTick as E, openBlock as F, toRaw as G, resolveDynamicComponent as H, provide as I, unref as J, toRef as K, reactive as L, onDeactivated as M, onMounted as N, normalizeProps as O, onScopeDispose as P, vModelSelect as Q, ref as R, isReactive as S, mergeProps as T, shallowRef as U, resolveDirective as V, toDisplayString as W, useSlots as X, useAttrs as Y, vModelCheckbox as Z, getCurrentInstance as _, computed as a, hasInjectionContext as b, createCommentVNode as c, createStaticVNode as d, watch as et, createTextVNode as f, effectScope as g, defineComponent as h, Transition as i, withModifiers as it, onBeforeUnmount as j, normalizeStyle as k, createElementBlock as l, defineAsyncComponent as m, Fragment as n, withDirectives as nt, createApp as o, createVNode as p, toRefs as q, Teleport as r, withKeys as rt, createBlock as s, _plugin_vue_export_helper_default as t, withCtx as tt, createElementVNode as u, getCurrentScope as v, markRaw as w, inject as x, h as y, renderList as z };
@@ -140,6 +140,9 @@ function onScopeDispose(...args) {
140
140
  function openBlock(...args) {
141
141
  return runtime().openBlock(...args);
142
142
  }
143
+ function provide(...args) {
144
+ return runtime().provide(...args);
145
+ }
143
146
  function reactive(...args) {
144
147
  return runtime().reactive(...args);
145
148
  }
@@ -418,6 +421,12 @@ Object.defineProperty(exports, "openBlock", {
418
421
  return openBlock;
419
422
  }
420
423
  });
424
+ Object.defineProperty(exports, "provide", {
425
+ enumerable: true,
426
+ get: function() {
427
+ return provide;
428
+ }
429
+ });
421
430
  Object.defineProperty(exports, "reactive", {
422
431
  enumerable: true,
423
432
  get: function() {
@@ -1,4 +1,4 @@
1
- const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-CYxINHh_.cjs");
1
+ const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BUdjGKyl.cjs");
2
2
  //#region src/internal/diagnostics/workflow-recording.ts
3
3
  var fields$1 = /* @__PURE__ */ new Set([
4
4
  "documentId",
@@ -3970,6 +3970,7 @@ Object.keys(DRAWING_SUPPORT_TAXONOMY);
3970
3970
  Object.freeze([
3971
3971
  "multiple-sections",
3972
3972
  "furniture-page-tokens",
3973
+ "body-page-number-tokens",
3973
3974
  "non-balanceable-multi-column-sections",
3974
3975
  "body-anchored-objects",
3975
3976
  "non-flowing-page-relative-body-anchors",
@@ -7346,7 +7347,7 @@ function createSuperDocUI(options) {
7346
7347
  * host's local snapshot so the toolbar reflects the NEW caret's block (and the
7347
7348
  * effective font resolved from it) on the next recompute, instead of serving
7348
7349
  * the previous selection until the worker `selection.current` round-trip lands
7349
- * (SD-3652). Only a resolvable COLLAPSED CARET is seeded - a range's snapshot
7350
+ * (SD-3652). A resolvable collapsed caret is seeded; a range's snapshot
7350
7351
  * cannot be resolved synchronously in worker mode, so a new range starts an
7351
7352
  * authoritative async read without waiting for the input-idle gate (SD-5394).
7352
7353
  * Seeding an empty value would wrongly disable range-only commands. The
@@ -7356,8 +7357,10 @@ function createSuperDocUI(options) {
7356
7357
  * tracked-change id is carried only when the host's painted caret proves the
7357
7358
  * same carrier, or while an active typing dispatch advances the same caret by
7358
7359
  * one code point. Pending work alone never carries review command context.
7360
+ * Explicit whole-table changes have a complete local source range and also
7361
+ * seed clears, so a delayed worker read cannot retain a cleared table target.
7359
7362
  */
7360
- const refreshSelectionFromHost = (hostSelectionSnapshot, afterTypingPaint = false) => {
7363
+ const refreshSelectionFromHost = (hostSelectionSnapshot, afterTypingPaint = false, wholeTableSelectionChanged = false) => {
7361
7364
  const foreground = foregroundMutationState();
7362
7365
  if (isNonCollapsedHostSelection(hostSelectionSnapshot) && !(foreground && foreground.active > 0)) {
7363
7366
  typedCaretValidationHeld = false;
@@ -7369,7 +7372,21 @@ function createSuperDocUI(options) {
7369
7372
  const read = host?.readLiveSelectionSyncSnapshot;
7370
7373
  if (typeof read !== "function") return;
7371
7374
  const seed = normalizeSelectionInfo(safeCall(() => read.call(host), null));
7372
- if (!seed || !isCollapsedCaretSnapshot(seed)) return;
7375
+ if (!seed) return;
7376
+ if (wholeTableSelectionChanged) {
7377
+ typedCaretValidationHeld = false;
7378
+ pendingSelectionSeedValidationToken = null;
7379
+ const token = selectionReadToken();
7380
+ asyncReads.set("selection", {
7381
+ token,
7382
+ value: seed,
7383
+ hasSettled: true,
7384
+ inflightToken: null
7385
+ });
7386
+ issueAsyncRead("selection", token, selectionCurrentRun, normalizeSelectionInfo);
7387
+ return;
7388
+ }
7389
+ if (!isCollapsedCaretSnapshot(seed)) return;
7373
7390
  const previousCaret = collapsedTextAddressFromSelection(state.selection);
7374
7391
  const nextCaret = collapsedTextAddressFromTarget(seed.selectionTarget) ?? collapsedTextAddressFromTarget(seed.target);
7375
7392
  const previousRange = previousCaret?.range;
@@ -7817,7 +7834,16 @@ function createSuperDocUI(options) {
7817
7834
  * query surfaces only DIRECT run properties, so inherited fonts have no
7818
7835
  * projected value; the layout has already resolved them for painting.
7819
7836
  */
7837
+ const appliedSelectionPresentation = (selection) => {
7838
+ const host = getHost(), read = host?.readAppliedSelectionPresentation;
7839
+ if (typeof read !== "function") return null;
7840
+ const value = safeCall(() => read.call(host), null);
7841
+ const info = normalizeSelectionInfo(value?.selection);
7842
+ return value && info && selectionSignature(selectionSliceFromInfo(info, "ready")) === selectionSignature(selection) ? value : null;
7843
+ };
7820
7844
  const resolveEffectiveInlineValuesFromLayout = (selection) => {
7845
+ const applied = appliedSelectionPresentation(selection);
7846
+ if (applied) return applied.inlineStyle ?? {};
7821
7847
  const host = getHost();
7822
7848
  const blockIds = new Set(selectionBlockIds(selection));
7823
7849
  if (blockIds.size === 0) return {};
@@ -7935,6 +7961,8 @@ function createSuperDocUI(options) {
7935
7961
  * `{ style: 'single' }`) when active, never a bare `true` — check presence.
7936
7962
  */
7937
7963
  const resolveEffectiveMarkValuesFromLayout = (selection) => {
7964
+ const applied = appliedSelectionPresentation(selection);
7965
+ if (applied) return applied.inlineStyle ?? {};
7938
7966
  const host = getHost();
7939
7967
  const blockIds = new Set(selectionBlockIds(selection));
7940
7968
  if (blockIds.size === 0) return {};
@@ -8169,6 +8197,15 @@ function createSuperDocUI(options) {
8169
8197
  const fromWorker = values?.[key];
8170
8198
  return fromWorker !== void 0 ? fromWorker : null;
8171
8199
  };
8200
+ const inlineToggleStateIsCurrent = (commandId, selection) => {
8201
+ const mark = getCommandDescriptor(commandId)?.activeMark;
8202
+ if (!mark || !EFFECTIVE_MARK_KEYS.includes(mark)) return true;
8203
+ if (resolveEffectiveMarkValuesFromLayout(selection)[mark] !== void 0) return true;
8204
+ if (!resolveDocOperation(getDoc(), "format.readEffectiveInlineUniformity")) return true;
8205
+ const { status } = readEffectiveInlineUniformityCached(selection);
8206
+ const key = effectiveInlineUniformityCacheKey(selection);
8207
+ return status === "ready" || key != null && asyncReads.get(key)?.failedToken === contentToken();
8208
+ };
8172
8209
  const readEffectiveInlineUniformityNow = async (input) => {
8173
8210
  if (!input) return null;
8174
8211
  const op = resolveDocOperation(getDoc(), "format.readEffectiveInlineUniformity");
@@ -8770,6 +8807,11 @@ function createSuperDocUI(options) {
8770
8807
  };
8771
8808
  /** Read effective paragraph alignments from the mounted, style-resolved layout. */
8772
8809
  const readEffectiveParagraphAlignments = (selection, blockIds) => {
8810
+ const applied = appliedSelectionPresentation(selection);
8811
+ if (applied) return new Map(blockIds.flatMap((id) => {
8812
+ const alignment = normalizeParagraphAlignment(applied.paragraphAlignments?.[id]);
8813
+ return alignment ? [[id, alignment]] : [];
8814
+ }));
8773
8815
  const host = getHost();
8774
8816
  const readByIds = host?.readMountedProjectionBlocksByIds;
8775
8817
  if (typeof readByIds !== "function") return null;
@@ -9486,8 +9528,8 @@ function createSuperDocUI(options) {
9486
9528
  if (selection.status === "ready") pruneSelectionScopedAsyncReads(selection);
9487
9529
  reconcilePendingInlineFormat(selection);
9488
9530
  const selectionSignature = selectionInlineValueSignature(selection);
9489
- for (const [commandId, optimistic] of optimisticInlineToggles) if (!selectionSignature || optimistic.selectionSignature !== selectionSignature) optimisticInlineToggles.delete(commandId);
9490
- else if (optimistic.settled && selection.status === "ready") optimisticInlineToggles.delete(commandId);
9531
+ for (const [commandId, optimistic] of optimisticInlineToggles) if (!selectionSignature || optimistic.selectionSignature !== selectionSignature || optimistic.editorSource !== getEditor() || optimistic.documentSource !== getEditor()?.doc || optimistic.documentMode !== documentMode) optimisticInlineToggles.delete(commandId);
9532
+ else if (optimistic.settled && selection.status === "ready" && inlineToggleStateIsCurrent(commandId, selection)) optimisticInlineToggles.delete(commandId);
9491
9533
  const nextState = {
9492
9534
  ready: getEditor() != null,
9493
9535
  documentMode,
@@ -9617,13 +9659,29 @@ function createSuperDocUI(options) {
9617
9659
  currentHostSelectionSource = next;
9618
9660
  if (!next) return;
9619
9661
  try {
9662
+ const unsubscribeCallbacks = [];
9663
+ detachHostSelection = () => {
9664
+ for (const detach of unsubscribeCallbacks) detach();
9665
+ };
9620
9666
  const unsubscribe = next.subscribe((snapshot) => {
9621
9667
  if (foregroundMutationActive() && caretSelectionNeedsProjectionPaint() && schedulePostPaintSelectionRefresh()) return;
9622
9668
  selectionEpoch += 1;
9623
9669
  refreshSelectionFromHost(snapshot);
9624
9670
  recompute("host-selection");
9625
9671
  });
9626
- if (typeof unsubscribe === "function") detachHostSelection = unsubscribe;
9672
+ if (typeof unsubscribe === "function") unsubscribeCallbacks.push(unsubscribe);
9673
+ const host = getHost();
9674
+ const tableSelection = safeCall(host?.getHandles ? () => host.getHandles() : void 0, null)?.selection;
9675
+ if (typeof tableSelection?.subscribeWholeTable === "function") {
9676
+ const refreshWholeTable = () => {
9677
+ selectionEpoch += 1;
9678
+ refreshSelectionFromHost(void 0, false, true);
9679
+ recompute("host-selection");
9680
+ };
9681
+ const detach = tableSelection.subscribeWholeTable(refreshWholeTable);
9682
+ if (typeof detach === "function") unsubscribeCallbacks.push(detach);
9683
+ if (tableSelection.getWholeTableNodeId?.()) refreshWholeTable();
9684
+ }
9627
9685
  } catch {
9628
9686
  currentHostSelectionSource = null;
9629
9687
  }
@@ -9640,6 +9698,7 @@ function createSuperDocUI(options) {
9640
9698
  return null;
9641
9699
  };
9642
9700
  let trackedChangeNavigationInFlight = 0;
9701
+ let lastPublishedHostReviewTarget;
9643
9702
  const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget, rawSnapshot) => {
9644
9703
  const rejection = (rawSnapshot && typeof rawSnapshot === "object" ? rawSnapshot : null)?.lastInteractionRejection;
9645
9704
  if (rawTarget == null && rejection && typeof rejection === "object" && rejection.code === "review-target-invalidated" && rejection.detail === "not-painted" && explicitActiveChange) return false;
@@ -9667,7 +9726,18 @@ function createSuperDocUI(options) {
9667
9726
  };
9668
9727
  }
9669
9728
  if (rawTarget == null && next == null && explicitActiveChange != null && hasPendingTrackChangeRevealFocus(explicitActiveChange)) return false;
9729
+ const previousPublication = lastPublishedHostReviewTarget;
9730
+ if (previousPublication && (rawTarget === previousPublication.raw || target?.origin === "panel" && previousPublication.origin === "panel" && next && previousPublication.focus && explicitActiveChangesEqual(previousPublication.focus, next))) return false;
9731
+ lastPublishedHostReviewTarget = {
9732
+ raw: rawTarget,
9733
+ focus: next,
9734
+ origin: target?.origin
9735
+ };
9670
9736
  if (explicitActiveChangesEqual(explicitActiveChange, next)) return false;
9737
+ if (target?.origin === "panel" && explicitActiveChange && next && explicitActiveChange.id === next.id && storyLocatorSignature(explicitActiveChange.story) === storyLocatorSignature(next.story) && !explicitActiveChange.paintedEntityId && next.paintedEntityId) {
9738
+ explicitActiveChange.paintedEntityId = next.paintedEntityId;
9739
+ return false;
9740
+ }
9671
9741
  setExplicitActiveChange(next);
9672
9742
  return true;
9673
9743
  };
@@ -9679,6 +9749,7 @@ function createSuperDocUI(options) {
9679
9749
  detachHostReview = null;
9680
9750
  }
9681
9751
  currentHostReviewSource = next;
9752
+ lastPublishedHostReviewTarget = void 0;
9682
9753
  if (!next) {
9683
9754
  syncTrackedChangeFocusFromHostReviewTarget(null);
9684
9755
  return;
@@ -9751,6 +9822,9 @@ function createSuperDocUI(options) {
9751
9822
  const off = next.subscribe((event) => {
9752
9823
  const type = event?.type;
9753
9824
  const isStandaloneDocumentMutation = type === "document:mutated" && event.hasCommitEvent !== true;
9825
+ if (type === "collaboration:document-replaced" || isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedDocument(event) || type === "collaboration:remote-changed") {
9826
+ for (const [commandId, optimistic] of optimisticInlineToggles) if (optimistic.settled || type === "collaboration:document-replaced") optimisticInlineToggles.delete(commandId);
9827
+ }
9754
9828
  if (isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedDocument(event) || type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0) scheduleActiveSearchRefresh();
9755
9829
  if ((type === "document:mutated" || type === "mutation:committed" && mutationCommittedEventChangedDocument(event)) && host && !dirtyHosts.has(host)) {
9756
9830
  dirtyHosts.add(host);
@@ -9917,6 +9991,7 @@ function createSuperDocUI(options) {
9917
9991
  hostSeededMutationRevision.delete(replacedDirtyHost);
9918
9992
  }
9919
9993
  runDocumentResetHooks();
9994
+ optimisticInlineToggles.clear();
9920
9995
  asyncReads.clear();
9921
9996
  invalidateDocumentContent();
9922
9997
  recompute();
@@ -10410,7 +10485,10 @@ function createSuperDocUI(options) {
10410
10485
  selectionSignature,
10411
10486
  active: input.value === true,
10412
10487
  generation,
10413
- settled: false
10488
+ settled: false,
10489
+ editorSource: getEditor(),
10490
+ documentSource: getEditor()?.doc,
10491
+ documentMode: readDocumentMode()
10414
10492
  });
10415
10493
  recompute();
10416
10494
  return generation;
@@ -11252,6 +11330,8 @@ function createSuperDocUI(options) {
11252
11330
  return Boolean(readLinkPayloadTarget(payload) || isLooseObject(record.hyperlinkTarget) || isLooseObject(record.textTarget));
11253
11331
  };
11254
11332
  const commandSelectionIsReady = (id, descriptor, payload) => {
11333
+ const foreground = foregroundMutationState();
11334
+ if (foreground && (foreground.active > 0 || foreground.pending > 0)) return false;
11255
11335
  if (state.selection.status !== "ready") return false;
11256
11336
  if (trackDecisionCommand(id)?.scope === "id") return true;
11257
11337
  if (!descriptor || descriptor.disposition !== "routed") return true;
@@ -12958,6 +13038,23 @@ function createSuperDocUI(options) {
12958
13038
  success: false,
12959
13039
  reason: "not-reachable"
12960
13040
  };
13041
+ const editor = getEditor(), host = getHost();
13042
+ const readiness = editor?.documentMutationReadiness;
13043
+ if (typeof readiness?.whenPainted === "function") {
13044
+ try {
13045
+ await readiness.whenPainted.call(readiness);
13046
+ } catch {
13047
+ return {
13048
+ success: false,
13049
+ reason: "not-reachable"
13050
+ };
13051
+ }
13052
+ if (getEditor() !== editor || getHost() !== host) return {
13053
+ success: false,
13054
+ reason: "not-ready"
13055
+ };
13056
+ }
13057
+ host?.getMountedHandle?.()?.focus?.focus({ preventScroll: true });
12961
13058
  activateContentControlChrome(id);
12962
13059
  return { success: true };
12963
13060
  }
@@ -1,4 +1,4 @@
1
- import { $ as watch, D as normalizeClass, E as nextTick, F as openBlock, H as shallowRef, L as ref, N as onMounted, R as renderList, U as toDisplayString, a as computed, c as createCommentVNode, f as createTextVNode, h as defineComponent, j as onBeforeUnmount, l as createElementBlock, n as Fragment, q as unref, rt as withModifiers, t as _plugin_vue_export_helper_default, u as createElementVNode } from "./_plugin-vue_export-helper-DHiJKCsy.es.js";
1
+ import { D as normalizeClass, E as nextTick, F as openBlock, J as unref, N as onMounted, R as ref, U as shallowRef, W as toDisplayString, a as computed, c as createCommentVNode, et as watch, f as createTextVNode, h as defineComponent, it as withModifiers, j as onBeforeUnmount, l as createElementBlock, n as Fragment, t as _plugin_vue_export_helper_default, u as createElementVNode, z as renderList } from "./_plugin-vue_export-helper-7ZiLY07t.es.js";
2
2
  //#region src/internal/diagnostics/workflow-recording.ts
3
3
  var fields$1 = /* @__PURE__ */ new Set([
4
4
  "documentId",
@@ -3969,6 +3969,7 @@ Object.keys(DRAWING_SUPPORT_TAXONOMY);
3969
3969
  Object.freeze([
3970
3970
  "multiple-sections",
3971
3971
  "furniture-page-tokens",
3972
+ "body-page-number-tokens",
3972
3973
  "non-balanceable-multi-column-sections",
3973
3974
  "body-anchored-objects",
3974
3975
  "non-flowing-page-relative-body-anchors",
@@ -7345,7 +7346,7 @@ function createSuperDocUI(options) {
7345
7346
  * host's local snapshot so the toolbar reflects the NEW caret's block (and the
7346
7347
  * effective font resolved from it) on the next recompute, instead of serving
7347
7348
  * the previous selection until the worker `selection.current` round-trip lands
7348
- * (SD-3652). Only a resolvable COLLAPSED CARET is seeded - a range's snapshot
7349
+ * (SD-3652). A resolvable collapsed caret is seeded; a range's snapshot
7349
7350
  * cannot be resolved synchronously in worker mode, so a new range starts an
7350
7351
  * authoritative async read without waiting for the input-idle gate (SD-5394).
7351
7352
  * Seeding an empty value would wrongly disable range-only commands. The
@@ -7355,8 +7356,10 @@ function createSuperDocUI(options) {
7355
7356
  * tracked-change id is carried only when the host's painted caret proves the
7356
7357
  * same carrier, or while an active typing dispatch advances the same caret by
7357
7358
  * one code point. Pending work alone never carries review command context.
7359
+ * Explicit whole-table changes have a complete local source range and also
7360
+ * seed clears, so a delayed worker read cannot retain a cleared table target.
7358
7361
  */
7359
- const refreshSelectionFromHost = (hostSelectionSnapshot, afterTypingPaint = false) => {
7362
+ const refreshSelectionFromHost = (hostSelectionSnapshot, afterTypingPaint = false, wholeTableSelectionChanged = false) => {
7360
7363
  const foreground = foregroundMutationState();
7361
7364
  if (isNonCollapsedHostSelection(hostSelectionSnapshot) && !(foreground && foreground.active > 0)) {
7362
7365
  typedCaretValidationHeld = false;
@@ -7368,7 +7371,21 @@ function createSuperDocUI(options) {
7368
7371
  const read = host?.readLiveSelectionSyncSnapshot;
7369
7372
  if (typeof read !== "function") return;
7370
7373
  const seed = normalizeSelectionInfo(safeCall(() => read.call(host), null));
7371
- if (!seed || !isCollapsedCaretSnapshot(seed)) return;
7374
+ if (!seed) return;
7375
+ if (wholeTableSelectionChanged) {
7376
+ typedCaretValidationHeld = false;
7377
+ pendingSelectionSeedValidationToken = null;
7378
+ const token = selectionReadToken();
7379
+ asyncReads.set("selection", {
7380
+ token,
7381
+ value: seed,
7382
+ hasSettled: true,
7383
+ inflightToken: null
7384
+ });
7385
+ issueAsyncRead("selection", token, selectionCurrentRun, normalizeSelectionInfo);
7386
+ return;
7387
+ }
7388
+ if (!isCollapsedCaretSnapshot(seed)) return;
7372
7389
  const previousCaret = collapsedTextAddressFromSelection(state.selection);
7373
7390
  const nextCaret = collapsedTextAddressFromTarget(seed.selectionTarget) ?? collapsedTextAddressFromTarget(seed.target);
7374
7391
  const previousRange = previousCaret?.range;
@@ -7816,7 +7833,16 @@ function createSuperDocUI(options) {
7816
7833
  * query surfaces only DIRECT run properties, so inherited fonts have no
7817
7834
  * projected value; the layout has already resolved them for painting.
7818
7835
  */
7836
+ const appliedSelectionPresentation = (selection) => {
7837
+ const host = getHost(), read = host?.readAppliedSelectionPresentation;
7838
+ if (typeof read !== "function") return null;
7839
+ const value = safeCall(() => read.call(host), null);
7840
+ const info = normalizeSelectionInfo(value?.selection);
7841
+ return value && info && selectionSignature(selectionSliceFromInfo(info, "ready")) === selectionSignature(selection) ? value : null;
7842
+ };
7819
7843
  const resolveEffectiveInlineValuesFromLayout = (selection) => {
7844
+ const applied = appliedSelectionPresentation(selection);
7845
+ if (applied) return applied.inlineStyle ?? {};
7820
7846
  const host = getHost();
7821
7847
  const blockIds = new Set(selectionBlockIds(selection));
7822
7848
  if (blockIds.size === 0) return {};
@@ -7934,6 +7960,8 @@ function createSuperDocUI(options) {
7934
7960
  * `{ style: 'single' }`) when active, never a bare `true` — check presence.
7935
7961
  */
7936
7962
  const resolveEffectiveMarkValuesFromLayout = (selection) => {
7963
+ const applied = appliedSelectionPresentation(selection);
7964
+ if (applied) return applied.inlineStyle ?? {};
7937
7965
  const host = getHost();
7938
7966
  const blockIds = new Set(selectionBlockIds(selection));
7939
7967
  if (blockIds.size === 0) return {};
@@ -8168,6 +8196,15 @@ function createSuperDocUI(options) {
8168
8196
  const fromWorker = values?.[key];
8169
8197
  return fromWorker !== void 0 ? fromWorker : null;
8170
8198
  };
8199
+ const inlineToggleStateIsCurrent = (commandId, selection) => {
8200
+ const mark = getCommandDescriptor(commandId)?.activeMark;
8201
+ if (!mark || !EFFECTIVE_MARK_KEYS.includes(mark)) return true;
8202
+ if (resolveEffectiveMarkValuesFromLayout(selection)[mark] !== void 0) return true;
8203
+ if (!resolveDocOperation(getDoc(), "format.readEffectiveInlineUniformity")) return true;
8204
+ const { status } = readEffectiveInlineUniformityCached(selection);
8205
+ const key = effectiveInlineUniformityCacheKey(selection);
8206
+ return status === "ready" || key != null && asyncReads.get(key)?.failedToken === contentToken();
8207
+ };
8171
8208
  const readEffectiveInlineUniformityNow = async (input) => {
8172
8209
  if (!input) return null;
8173
8210
  const op = resolveDocOperation(getDoc(), "format.readEffectiveInlineUniformity");
@@ -8769,6 +8806,11 @@ function createSuperDocUI(options) {
8769
8806
  };
8770
8807
  /** Read effective paragraph alignments from the mounted, style-resolved layout. */
8771
8808
  const readEffectiveParagraphAlignments = (selection, blockIds) => {
8809
+ const applied = appliedSelectionPresentation(selection);
8810
+ if (applied) return new Map(blockIds.flatMap((id) => {
8811
+ const alignment = normalizeParagraphAlignment(applied.paragraphAlignments?.[id]);
8812
+ return alignment ? [[id, alignment]] : [];
8813
+ }));
8772
8814
  const host = getHost();
8773
8815
  const readByIds = host?.readMountedProjectionBlocksByIds;
8774
8816
  if (typeof readByIds !== "function") return null;
@@ -9485,8 +9527,8 @@ function createSuperDocUI(options) {
9485
9527
  if (selection.status === "ready") pruneSelectionScopedAsyncReads(selection);
9486
9528
  reconcilePendingInlineFormat(selection);
9487
9529
  const selectionSignature = selectionInlineValueSignature(selection);
9488
- for (const [commandId, optimistic] of optimisticInlineToggles) if (!selectionSignature || optimistic.selectionSignature !== selectionSignature) optimisticInlineToggles.delete(commandId);
9489
- else if (optimistic.settled && selection.status === "ready") optimisticInlineToggles.delete(commandId);
9530
+ for (const [commandId, optimistic] of optimisticInlineToggles) if (!selectionSignature || optimistic.selectionSignature !== selectionSignature || optimistic.editorSource !== getEditor() || optimistic.documentSource !== getEditor()?.doc || optimistic.documentMode !== documentMode) optimisticInlineToggles.delete(commandId);
9531
+ else if (optimistic.settled && selection.status === "ready" && inlineToggleStateIsCurrent(commandId, selection)) optimisticInlineToggles.delete(commandId);
9490
9532
  const nextState = {
9491
9533
  ready: getEditor() != null,
9492
9534
  documentMode,
@@ -9616,13 +9658,29 @@ function createSuperDocUI(options) {
9616
9658
  currentHostSelectionSource = next;
9617
9659
  if (!next) return;
9618
9660
  try {
9661
+ const unsubscribeCallbacks = [];
9662
+ detachHostSelection = () => {
9663
+ for (const detach of unsubscribeCallbacks) detach();
9664
+ };
9619
9665
  const unsubscribe = next.subscribe((snapshot) => {
9620
9666
  if (foregroundMutationActive() && caretSelectionNeedsProjectionPaint() && schedulePostPaintSelectionRefresh()) return;
9621
9667
  selectionEpoch += 1;
9622
9668
  refreshSelectionFromHost(snapshot);
9623
9669
  recompute("host-selection");
9624
9670
  });
9625
- if (typeof unsubscribe === "function") detachHostSelection = unsubscribe;
9671
+ if (typeof unsubscribe === "function") unsubscribeCallbacks.push(unsubscribe);
9672
+ const host = getHost();
9673
+ const tableSelection = safeCall(host?.getHandles ? () => host.getHandles() : void 0, null)?.selection;
9674
+ if (typeof tableSelection?.subscribeWholeTable === "function") {
9675
+ const refreshWholeTable = () => {
9676
+ selectionEpoch += 1;
9677
+ refreshSelectionFromHost(void 0, false, true);
9678
+ recompute("host-selection");
9679
+ };
9680
+ const detach = tableSelection.subscribeWholeTable(refreshWholeTable);
9681
+ if (typeof detach === "function") unsubscribeCallbacks.push(detach);
9682
+ if (tableSelection.getWholeTableNodeId?.()) refreshWholeTable();
9683
+ }
9626
9684
  } catch {
9627
9685
  currentHostSelectionSource = null;
9628
9686
  }
@@ -9639,6 +9697,7 @@ function createSuperDocUI(options) {
9639
9697
  return null;
9640
9698
  };
9641
9699
  let trackedChangeNavigationInFlight = 0;
9700
+ let lastPublishedHostReviewTarget;
9642
9701
  const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget, rawSnapshot) => {
9643
9702
  const rejection = (rawSnapshot && typeof rawSnapshot === "object" ? rawSnapshot : null)?.lastInteractionRejection;
9644
9703
  if (rawTarget == null && rejection && typeof rejection === "object" && rejection.code === "review-target-invalidated" && rejection.detail === "not-painted" && explicitActiveChange) return false;
@@ -9666,7 +9725,18 @@ function createSuperDocUI(options) {
9666
9725
  };
9667
9726
  }
9668
9727
  if (rawTarget == null && next == null && explicitActiveChange != null && hasPendingTrackChangeRevealFocus(explicitActiveChange)) return false;
9728
+ const previousPublication = lastPublishedHostReviewTarget;
9729
+ if (previousPublication && (rawTarget === previousPublication.raw || target?.origin === "panel" && previousPublication.origin === "panel" && next && previousPublication.focus && explicitActiveChangesEqual(previousPublication.focus, next))) return false;
9730
+ lastPublishedHostReviewTarget = {
9731
+ raw: rawTarget,
9732
+ focus: next,
9733
+ origin: target?.origin
9734
+ };
9669
9735
  if (explicitActiveChangesEqual(explicitActiveChange, next)) return false;
9736
+ if (target?.origin === "panel" && explicitActiveChange && next && explicitActiveChange.id === next.id && storyLocatorSignature(explicitActiveChange.story) === storyLocatorSignature(next.story) && !explicitActiveChange.paintedEntityId && next.paintedEntityId) {
9737
+ explicitActiveChange.paintedEntityId = next.paintedEntityId;
9738
+ return false;
9739
+ }
9670
9740
  setExplicitActiveChange(next);
9671
9741
  return true;
9672
9742
  };
@@ -9678,6 +9748,7 @@ function createSuperDocUI(options) {
9678
9748
  detachHostReview = null;
9679
9749
  }
9680
9750
  currentHostReviewSource = next;
9751
+ lastPublishedHostReviewTarget = void 0;
9681
9752
  if (!next) {
9682
9753
  syncTrackedChangeFocusFromHostReviewTarget(null);
9683
9754
  return;
@@ -9750,6 +9821,9 @@ function createSuperDocUI(options) {
9750
9821
  const off = next.subscribe((event) => {
9751
9822
  const type = event?.type;
9752
9823
  const isStandaloneDocumentMutation = type === "document:mutated" && event.hasCommitEvent !== true;
9824
+ if (type === "collaboration:document-replaced" || isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedDocument(event) || type === "collaboration:remote-changed") {
9825
+ for (const [commandId, optimistic] of optimisticInlineToggles) if (optimistic.settled || type === "collaboration:document-replaced") optimisticInlineToggles.delete(commandId);
9826
+ }
9753
9827
  if (isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedDocument(event) || type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0) scheduleActiveSearchRefresh();
9754
9828
  if ((type === "document:mutated" || type === "mutation:committed" && mutationCommittedEventChangedDocument(event)) && host && !dirtyHosts.has(host)) {
9755
9829
  dirtyHosts.add(host);
@@ -9916,6 +9990,7 @@ function createSuperDocUI(options) {
9916
9990
  hostSeededMutationRevision.delete(replacedDirtyHost);
9917
9991
  }
9918
9992
  runDocumentResetHooks();
9993
+ optimisticInlineToggles.clear();
9919
9994
  asyncReads.clear();
9920
9995
  invalidateDocumentContent();
9921
9996
  recompute();
@@ -10409,7 +10484,10 @@ function createSuperDocUI(options) {
10409
10484
  selectionSignature,
10410
10485
  active: input.value === true,
10411
10486
  generation,
10412
- settled: false
10487
+ settled: false,
10488
+ editorSource: getEditor(),
10489
+ documentSource: getEditor()?.doc,
10490
+ documentMode: readDocumentMode()
10413
10491
  });
10414
10492
  recompute();
10415
10493
  return generation;
@@ -11251,6 +11329,8 @@ function createSuperDocUI(options) {
11251
11329
  return Boolean(readLinkPayloadTarget(payload) || isLooseObject(record.hyperlinkTarget) || isLooseObject(record.textTarget));
11252
11330
  };
11253
11331
  const commandSelectionIsReady = (id, descriptor, payload) => {
11332
+ const foreground = foregroundMutationState();
11333
+ if (foreground && (foreground.active > 0 || foreground.pending > 0)) return false;
11254
11334
  if (state.selection.status !== "ready") return false;
11255
11335
  if (trackDecisionCommand(id)?.scope === "id") return true;
11256
11336
  if (!descriptor || descriptor.disposition !== "routed") return true;
@@ -12957,6 +13037,23 @@ function createSuperDocUI(options) {
12957
13037
  success: false,
12958
13038
  reason: "not-reachable"
12959
13039
  };
13040
+ const editor = getEditor(), host = getHost();
13041
+ const readiness = editor?.documentMutationReadiness;
13042
+ if (typeof readiness?.whenPainted === "function") {
13043
+ try {
13044
+ await readiness.whenPainted.call(readiness);
13045
+ } catch {
13046
+ return {
13047
+ success: false,
13048
+ reason: "not-reachable"
13049
+ };
13050
+ }
13051
+ if (getEditor() !== editor || getHost() !== host) return {
13052
+ success: false,
13053
+ reason: "not-ready"
13054
+ };
13055
+ }
13056
+ host?.getMountedHandle?.()?.focus?.focus({ preventScroll: true });
12960
13057
  activateContentControlChrome(id);
12961
13058
  return { success: true };
12962
13059
  }
@@ -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.25.0-next.1",
22
+ superdocVersion: "2.25.0-next.11",
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.25.0-next.1",
21
+ superdocVersion: "2.25.0-next.11",
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
@@ -37,7 +37,8 @@ export interface ReplyToCommentInput extends CommentCreateAttributionInput {
37
37
  export interface MoveCommentInput {
38
38
  commentId: string;
39
39
  /**
40
- * New anchor target. Accepts a plain {@link TextAddress}, a
40
+ * New root-thread anchor target. Existing descendant anchors move with the root.
41
+ * Accepts a plain {@link TextAddress}, a
41
42
  * {@link SelectionTarget}, or a {@link TrackedChangeCommentTarget} that
42
43
  * names a logical tracked-change id as a convenience re-anchor target.
43
44
  */
@@ -216,6 +216,8 @@ export interface CommentsListQuery {
216
216
  */
217
217
  export interface CommentDomain {
218
218
  address: CommentAddress;
219
+ /** Canonical comment id alias returned by native runtimes. */
220
+ commentId?: string;
219
221
  /** See {@link CommentInfo.externalId}. */
220
222
  externalId?: string;
221
223
  /** See {@link CommentInfo.metadata}. */
@@ -1,7 +1,7 @@
1
1
  import { BlockNodeAddress, NodeKind } from '../types/base.js';
2
2
  import { SelectionTarget } from '../types/address.js';
3
3
  import { SDFragment } from '../types/fragment.js';
4
- import { ReceiptFailure, ReceiptInsert } from '../types/receipt.js';
4
+ import { ReceiptFailure, ReceiptInsert, ReceiptSuccess } from '../types/receipt.js';
5
5
  import { StoryLocator } from '../types/story.types.js';
6
6
  /**
7
7
  * Semantic SDT subtype derived from `w:sdtPr` children.
@@ -154,11 +154,13 @@ export interface ContentControlInfo {
154
154
  /** Authoritative structural emptiness when the adapter can determine it. */
155
155
  isEmpty?: boolean;
156
156
  }
157
- export interface ContentControlMutationSuccess {
157
+ export interface ContentControlMutationSuccess extends ReceiptSuccess {
158
158
  success: true;
159
159
  appliedChangeMode?: 'direct' | 'tracked';
160
160
  contentControl: ContentControlTarget;
161
161
  updatedRef?: ContentControlTarget;
162
+ /** Identity of the block created by an adjacent-content insertion. */
163
+ createdBlockId?: string;
162
164
  affectedStories?: StoryLocator[];
163
165
  trackedChangeRefs?: ReceiptInsert[];
164
166
  }