superdoc 2.7.0-next.17 → 2.7.0-next.18

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.
@@ -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.7.0-next.17",
22
+ superdocVersion: "2.7.0-next.18",
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.7.0-next.17",
21
+ superdocVersion: "2.7.0-next.18",
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
@@ -3183,7 +3183,7 @@ export declare const OPERATION_DEFINITIONS: {
3183
3183
  readonly 'diff.apply': {
3184
3184
  readonly memberPath: "diff.apply";
3185
3185
  readonly description: string;
3186
- readonly expectedResult: "Returns a DiffApplyResult with applied operation count and diagnostics.";
3186
+ readonly expectedResult: "Returns a DiffApplyResult with per-operation review receipts, applied operation count, and diagnostics.";
3187
3187
  readonly requiresDocumentContext: true;
3188
3188
  readonly metadata: CommandStaticMetadata;
3189
3189
  readonly referenceDocPath: "diff/apply.mdx";
@@ -1,10 +1,6 @@
1
- /**
2
- * Public types for the snapshot-based document diff contract.
3
- *
4
- * These types are engine-agnostic wrappers around opaque engine payloads.
5
- * The `payload` field in both DiffSnapshot and DiffPayload is engine-owned
6
- * and must not be inspected by consumers.
7
- */
1
+ import { TrackedChangeAddress } from '../types/address.js';
2
+ import { StoryLocator } from '../types/story.types.js';
3
+ import { TrackChangeNavigationTarget } from '../types/track-changes.types.js';
8
4
  /** Identifier for the engine adapter that produced the opaque payload. */
9
5
  export type DiffEngineId = 'superdoc-v2';
10
6
  /** Declares which document components are included in a snapshot or diff. */
@@ -58,9 +54,24 @@ export interface DiffPayload {
58
54
  /** Opaque engine-owned diff data. Do not inspect or modify. */
59
55
  payload: Record<string, unknown>;
60
56
  }
61
- /** Result metadata returned after applying a diff. */
57
+ export interface DiffApplyReviewItem {
58
+ id: string;
59
+ story: StoryLocator;
60
+ address: TrackedChangeAddress;
61
+ navigationTarget?: TrackChangeNavigationTarget;
62
+ }
63
+ export type DiffApplyOperationReceipt = {
64
+ operationId: string;
65
+ disposition: 'review-created';
66
+ reviewItems: [DiffApplyReviewItem, ...DiffApplyReviewItem[]];
67
+ } | {
68
+ operationId: string;
69
+ disposition: 'applied-directly';
70
+ reviewItems: [];
71
+ };
62
72
  export interface DiffApplyResult {
63
73
  appliedOperations: number;
74
+ operationReceipts: DiffApplyOperationReceipt[];
64
75
  baseFingerprint: string;
65
76
  targetFingerprint: string;
66
77
  coverage: DiffCoverage;
@@ -1,3 +1,3 @@
1
1
  export type { DiffAdapter, DiffApi } from './diff.js';
2
2
  export { executeDiffCapture, executeDiffCompare, executeDiffApply } from './diff.js';
3
- export type { DiffSnapshot, DiffPayload, DiffApplyResult, DiffSummary, DiffCoverage, DiffEngineId, DiffCompareInput, DiffApplyInput, DiffApplyOptions, DiffChangeMode, } from './diff.types.js';
3
+ export type { DiffSnapshot, DiffPayload, DiffApplyResult, DiffSummary, DiffCoverage, DiffEngineId, DiffCompareInput, DiffApplyInput, DiffApplyOptions, DiffChangeMode, DiffApplyOperationReceipt, DiffApplyReviewItem, } from './diff.types.js';
@@ -91,6 +91,7 @@ export { executeProjectMarkdown } from './project-markdown/project-markdown.js';
91
91
  export type { HistoryState, HistoryActionResult, HistoryNoopReason, SDHistoryStatus, SDHistoryCollaborationMeta, } from './history/history.types.js';
92
92
  export { executeTrackChangesGet, executeTrackChangesList, executeTrackChangesDecide, } from './track-changes/track-changes.js';
93
93
  export { createPlanApi, type PlanApi, type PlanExecuteInput, type PlanExecuteEntry, type PlanExecuteEntryExpect, type PlanExecuteResult, type PlanEntryReceipt, type PlanEntryReceiptStatus, type PlanExecuteFailure, type PlanCaptureRefMarker, type PlanProjectTextOffsetMarker, } from './plan/plan.js';
94
+ export type { DiffSnapshot, DiffPayload, DiffApplyResult, DiffCompareInput, DiffApplyInput, DiffApplyOptions, DiffApplyOperationReceipt, DiffApplyReviewItem, } from './diff/diff.types.js';
94
95
  export type { GetAdapter } from './get/get.js';
95
96
  export type { FindAdapter, FindOptions } from './find/find.js';
96
97
  export type { GetNodeAdapter, GetNodeByIdInput } from './get-node/get-node.js';
@@ -22,6 +22,9 @@ import type { ContextMenuSection as __Cjs_ContextMenuSection } from './index.js'
22
22
  import type { ContextMenuSelectContext as __Cjs_ContextMenuSelectContext } from './index.js' with { "resolution-mode": "import" };
23
23
  import type { ContextMenuSelectPayload as __Cjs_ContextMenuSelectPayload } from './index.js' with { "resolution-mode": "import" };
24
24
  import type { ContextMenuSelectReadiness as __Cjs_ContextMenuSelectReadiness } from './index.js' with { "resolution-mode": "import" };
25
+ import type { DiffApplyOperationReceipt as __Cjs_DiffApplyOperationReceipt } from './index.js' with { "resolution-mode": "import" };
26
+ import type { DiffApplyResult as __Cjs_DiffApplyResult } from './index.js' with { "resolution-mode": "import" };
27
+ import type { DiffApplyReviewItem as __Cjs_DiffApplyReviewItem } from './index.js' with { "resolution-mode": "import" };
25
28
  import type { DirectSurfaceRequest as __Cjs_DirectSurfaceRequest } from './index.js' with { "resolution-mode": "import" };
26
29
  import type { DocRange as __Cjs_DocRange } from './index.js' with { "resolution-mode": "import" };
27
30
  import type { Document as __Cjs_Document } from './index.js' with { "resolution-mode": "import" };
@@ -218,6 +221,9 @@ export type { __Cjs_ContextMenuSelectPayload as ContextMenuSelectPayload };
218
221
  export type { __Cjs_ContextMenuSelectReadiness as ContextMenuSelectReadiness };
219
222
  export declare const createTheme: typeof import('./index.js', { with: { "resolution-mode": "import" } }).createTheme;
220
223
  export declare const defineSuperDocExtension: typeof import('./index.js', { with: { "resolution-mode": "import" } }).defineSuperDocExtension;
224
+ export type { __Cjs_DiffApplyOperationReceipt as DiffApplyOperationReceipt };
225
+ export type { __Cjs_DiffApplyResult as DiffApplyResult };
226
+ export type { __Cjs_DiffApplyReviewItem as DiffApplyReviewItem };
221
227
  export type { __Cjs_DirectSurfaceRequest as DirectSurfaceRequest };
222
228
  export type { __Cjs_DocRange as DocRange };
223
229
  export type { __Cjs_Document as Document };
@@ -24,6 +24,7 @@ export type { DirectSurfaceRequest } from '../core/types/index.js';
24
24
  export type { DocRange } from '../core/types/index.js';
25
25
  export type { Document } from '../core/types/index.js';
26
26
  export type { DocumentApi } from '../../../document-api/src/index.js';
27
+ export type { DiffApplyOperationReceipt, DiffApplyResult, DiffApplyReviewItem } from '../../../document-api/src/index.js';
27
28
  export type { DocumentMode } from '../core/types/index.js';
28
29
  export type { DocumentProtectionState } from '../../../document-api/src/index.js';
29
30
  export type { EntityAddress } from '../../../document-api/src/index.js';
package/dist/superdoc.cjs CHANGED
@@ -43526,7 +43526,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
43526
43526
  this.config.colors = shuffleArray(this.config.colors);
43527
43527
  this.userColorMap = /* @__PURE__ */ new Map();
43528
43528
  this.colorIndex = 0;
43529
- this.version = "2.7.0-next.17";
43529
+ this.version = "2.7.0-next.18";
43530
43530
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
43531
43531
  this.superdocId = config.superdocId || require_uuid.v4();
43532
43532
  this.colors = this.config.colors ?? [];
@@ -43459,7 +43459,7 @@ var SuperDoc = class extends import_eventemitter3.default {
43459
43459
  this.config.colors = shuffleArray(this.config.colors);
43460
43460
  this.userColorMap = /* @__PURE__ */ new Map();
43461
43461
  this.colorIndex = 0;
43462
- this.version = "2.7.0-next.17";
43462
+ this.version = "2.7.0-next.18";
43463
43463
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
43464
43464
  this.superdocId = config.superdocId || v4();
43465
43465
  this.colors = this.config.colors ?? [];