@superdoc/sdk 2.19.0-next.3 → 2.19.0-next.4
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 +20 -0
- package/dist/generated/client.d.ts +57 -0
- package/dist/generated/contract.cjs +1 -1
- package/dist/generated/contract.js +1 -1
- package/dist/runtime/sdk-version.generated.cjs +1 -1
- package/dist/runtime/sdk-version.generated.d.ts +1 -1
- package/dist/runtime/sdk-version.generated.js +1 -1
- package/package.json +7 -7
- package/tools/tools-policy.json +1 -1
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
|
|
@@ -30733,6 +30733,7 @@ export interface DocDiffCompareParams {
|
|
|
30733
30733
|
};
|
|
30734
30734
|
payload: Record<string, unknown>;
|
|
30735
30735
|
};
|
|
30736
|
+
styleChangeMode?: string;
|
|
30736
30737
|
}
|
|
30737
30738
|
export interface DocDiffApplyParams {
|
|
30738
30739
|
doc?: string;
|
|
@@ -30801,6 +30802,7 @@ export interface DocDiffApplyParams {
|
|
|
30801
30802
|
}>;
|
|
30802
30803
|
payload: Record<string, unknown>;
|
|
30803
30804
|
};
|
|
30805
|
+
styleChangeMode?: string;
|
|
30804
30806
|
}
|
|
30805
30807
|
export interface DocExportToDocxParams {
|
|
30806
30808
|
doc?: string;
|
|
@@ -103374,6 +103376,55 @@ export type DocSelectionCurrentResult = {
|
|
|
103374
103376
|
});
|
|
103375
103377
|
coordinateSpace?: "visible" | "tracked";
|
|
103376
103378
|
}) | null;
|
|
103379
|
+
tableSelection?: ({
|
|
103380
|
+
kind: "tableCells";
|
|
103381
|
+
type: "table" | "cell" | "cells";
|
|
103382
|
+
tableId: string;
|
|
103383
|
+
story?: ({
|
|
103384
|
+
kind: "story";
|
|
103385
|
+
storyType: "body";
|
|
103386
|
+
}) | ({
|
|
103387
|
+
kind: "story";
|
|
103388
|
+
storyType: "headerFooterSlot";
|
|
103389
|
+
section: {
|
|
103390
|
+
kind: "section";
|
|
103391
|
+
sectionId: string;
|
|
103392
|
+
};
|
|
103393
|
+
headerFooterKind: "header" | "footer";
|
|
103394
|
+
variant: "default" | "first" | "even";
|
|
103395
|
+
resolution?: "effective" | "explicit";
|
|
103396
|
+
onWrite?: "materializeIfInherited" | "editResolvedPart" | "error";
|
|
103397
|
+
}) | ({
|
|
103398
|
+
kind: "story";
|
|
103399
|
+
storyType: "headerFooterPart";
|
|
103400
|
+
refId: string;
|
|
103401
|
+
}) | ({
|
|
103402
|
+
kind: "story";
|
|
103403
|
+
storyType: "footnote";
|
|
103404
|
+
noteId: string;
|
|
103405
|
+
}) | ({
|
|
103406
|
+
kind: "story";
|
|
103407
|
+
storyType: "endnote";
|
|
103408
|
+
noteId: string;
|
|
103409
|
+
}) | ({
|
|
103410
|
+
kind: "story";
|
|
103411
|
+
storyType: "textbox";
|
|
103412
|
+
textboxId: string;
|
|
103413
|
+
});
|
|
103414
|
+
start: {
|
|
103415
|
+
rowIndex: number;
|
|
103416
|
+
columnIndex: number;
|
|
103417
|
+
};
|
|
103418
|
+
end: {
|
|
103419
|
+
rowIndex: number;
|
|
103420
|
+
columnIndex: number;
|
|
103421
|
+
};
|
|
103422
|
+
cells: Array<{
|
|
103423
|
+
nodeId: string;
|
|
103424
|
+
rowIndex: number;
|
|
103425
|
+
columnIndex: number;
|
|
103426
|
+
}>;
|
|
103427
|
+
}) | null;
|
|
103377
103428
|
activeMarks: Array<string>;
|
|
103378
103429
|
activeCommentIds: Array<string>;
|
|
103379
103430
|
activeChangeIds: Array<string>;
|
|
@@ -122818,6 +122869,10 @@ export type DocDiffCompareResult = {
|
|
|
122818
122869
|
};
|
|
122819
122870
|
export type DocDiffApplyResult = {
|
|
122820
122871
|
appliedOperations: number;
|
|
122872
|
+
styleChanges?: {
|
|
122873
|
+
changeMode: "direct";
|
|
122874
|
+
partUris: Array<string>;
|
|
122875
|
+
};
|
|
122821
122876
|
operationReceipts: Array<({
|
|
122822
122877
|
operationId: string;
|
|
122823
122878
|
disposition: "review-created";
|
|
@@ -152904,6 +152959,7 @@ export interface DocDiffCompareBoundParams {
|
|
|
152904
152959
|
};
|
|
152905
152960
|
payload: Record<string, unknown>;
|
|
152906
152961
|
};
|
|
152962
|
+
styleChangeMode?: string;
|
|
152907
152963
|
}
|
|
152908
152964
|
export interface DocDiffApplyBoundParams {
|
|
152909
152965
|
out?: string;
|
|
@@ -152970,6 +153026,7 @@ export interface DocDiffApplyBoundParams {
|
|
|
152970
153026
|
}>;
|
|
152971
153027
|
payload: Record<string, unknown>;
|
|
152972
153028
|
};
|
|
153029
|
+
styleChangeMode?: string;
|
|
152973
153030
|
}
|
|
152974
153031
|
export interface DocExportToDocxBoundParams {
|
|
152975
153032
|
mode?: string;
|