@superdoc/sdk 2.19.0-next.1 → 2.19.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.
package/README.md CHANGED
@@ -96,6 +96,26 @@ if (matches.total === 1) {
96
96
  }
97
97
  ```
98
98
 
99
+ ## Tracked comparison with direct style definitions
100
+
101
+ For standalone V2 comparisons, `styleChangeMode: 'direct'` lets you explicitly
102
+ carry the target style definitions while applying body edits as tracked changes:
103
+
104
+ ```js
105
+ const diff = await older.diff.compare({ targetSnapshot, styleChangeMode: 'direct' });
106
+ const result = await older.diff.apply({ diff, changeMode: 'tracked', styleChangeMode: 'direct' });
107
+ console.log(result.styleChanges); // { changeMode: 'direct', partUris: [...] }, when styles changed
108
+ await older.save({ out: 'comparison.docx' });
109
+ ```
110
+
111
+ Set the policy on both calls: compare reports eligibility for that policy;
112
+ apply requires its own explicit consent. Style definitions are applied directly
113
+ and remain if the body revisions are rejected in Word. A style-only comparison
114
+ creates no body revisions. Without this option, changed style definitions still
115
+ block tracked apply. Unsupported numbering, settings, and other package changes
116
+ retain their existing restrictions. Suggest-only versioned review sessions
117
+ refuse this direct-style option.
118
+
99
119
  ## Tracked comparison with exact-file review
100
120
 
101
121
  The SDK's `diff.capture` and `diff.compare` describe a snapshot comparison. A
@@ -26693,6 +26693,7 @@ export interface DocContentControlsDeleteParams {
26693
26693
  textboxId: string;
26694
26694
  });
26695
26695
  };
26696
+ overrideDeletionLock?: boolean;
26696
26697
  }
26697
26698
  export interface DocContentControlsCopyParams {
26698
26699
  doc?: string;
@@ -30733,6 +30734,7 @@ export interface DocDiffCompareParams {
30733
30734
  };
30734
30735
  payload: Record<string, unknown>;
30735
30736
  };
30737
+ styleChangeMode?: string;
30736
30738
  }
30737
30739
  export interface DocDiffApplyParams {
30738
30740
  doc?: string;
@@ -30801,6 +30803,7 @@ export interface DocDiffApplyParams {
30801
30803
  }>;
30802
30804
  payload: Record<string, unknown>;
30803
30805
  };
30806
+ styleChangeMode?: string;
30804
30807
  }
30805
30808
  export interface DocExportToDocxParams {
30806
30809
  doc?: string;
@@ -103374,6 +103377,55 @@ export type DocSelectionCurrentResult = {
103374
103377
  });
103375
103378
  coordinateSpace?: "visible" | "tracked";
103376
103379
  }) | null;
103380
+ tableSelection?: ({
103381
+ kind: "tableCells";
103382
+ type: "table" | "cell" | "cells";
103383
+ tableId: string;
103384
+ story?: ({
103385
+ kind: "story";
103386
+ storyType: "body";
103387
+ }) | ({
103388
+ kind: "story";
103389
+ storyType: "headerFooterSlot";
103390
+ section: {
103391
+ kind: "section";
103392
+ sectionId: string;
103393
+ };
103394
+ headerFooterKind: "header" | "footer";
103395
+ variant: "default" | "first" | "even";
103396
+ resolution?: "effective" | "explicit";
103397
+ onWrite?: "materializeIfInherited" | "editResolvedPart" | "error";
103398
+ }) | ({
103399
+ kind: "story";
103400
+ storyType: "headerFooterPart";
103401
+ refId: string;
103402
+ }) | ({
103403
+ kind: "story";
103404
+ storyType: "footnote";
103405
+ noteId: string;
103406
+ }) | ({
103407
+ kind: "story";
103408
+ storyType: "endnote";
103409
+ noteId: string;
103410
+ }) | ({
103411
+ kind: "story";
103412
+ storyType: "textbox";
103413
+ textboxId: string;
103414
+ });
103415
+ start: {
103416
+ rowIndex: number;
103417
+ columnIndex: number;
103418
+ };
103419
+ end: {
103420
+ rowIndex: number;
103421
+ columnIndex: number;
103422
+ };
103423
+ cells: Array<{
103424
+ nodeId: string;
103425
+ rowIndex: number;
103426
+ columnIndex: number;
103427
+ }>;
103428
+ }) | null;
103377
103429
  activeMarks: Array<string>;
103378
103430
  activeCommentIds: Array<string>;
103379
103431
  activeChangeIds: Array<string>;
@@ -122818,6 +122870,10 @@ export type DocDiffCompareResult = {
122818
122870
  };
122819
122871
  export type DocDiffApplyResult = {
122820
122872
  appliedOperations: number;
122873
+ styleChanges?: {
122874
+ changeMode: "direct";
122875
+ partUris: Array<string>;
122876
+ };
122821
122877
  operationReceipts: Array<({
122822
122878
  operationId: string;
122823
122879
  disposition: "review-created";
@@ -149090,6 +149146,7 @@ export interface DocContentControlsDeleteBoundParams {
149090
149146
  textboxId: string;
149091
149147
  });
149092
149148
  };
149149
+ overrideDeletionLock?: boolean;
149093
149150
  }
149094
149151
  export interface DocContentControlsCopyBoundParams {
149095
149152
  out?: string;
@@ -152904,6 +152961,7 @@ export interface DocDiffCompareBoundParams {
152904
152961
  };
152905
152962
  payload: Record<string, unknown>;
152906
152963
  };
152964
+ styleChangeMode?: string;
152907
152965
  }
152908
152966
  export interface DocDiffApplyBoundParams {
152909
152967
  out?: string;
@@ -152970,6 +153028,7 @@ export interface DocDiffApplyBoundParams {
152970
153028
  }>;
152971
153029
  payload: Record<string, unknown>;
152972
153030
  };
153031
+ styleChangeMode?: string;
152973
153032
  }
152974
153033
  export interface DocExportToDocxBoundParams {
152975
153034
  mode?: string;