superdoc 2.3.0 → 2.4.0-next.2
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 +0 -1
- package/dist/chunks/{FindReplaceSurface-DLxnCQOB.cjs → FindReplaceSurface-Dx0llWqP.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-DMbfDvpQ.cjs → PasswordPromptSurface-BUUVC2ee.cjs} +1 -1
- package/dist/chunks/{PdfViewer-CoFiGAhm.cjs → PdfViewer-qpvzwYMz.cjs} +1 -1
- package/dist/chunks/blank-docx-DP8RUPW-.cjs +7 -0
- package/dist/chunks/blank-docx-XRX6Ker2.es.js +2 -0
- package/dist/chunks/{create-super-doc-ui-fxF2Q8Ib.es.js → create-super-doc-ui-D4kk9AjM.es.js} +331 -102
- package/dist/chunks/{create-super-doc-ui-CXCqHc2m.cjs → create-super-doc-ui-DXdWuTzm.cjs} +331 -102
- package/dist/chunks/{eventemitter3-B60Fsz-a.es.js → eventemitter3-Bt2s0X0a.es.js} +1 -1
- package/dist/chunks/{eventemitter3-DCfwFVNn.cjs → eventemitter3-DqY4aSMf.cjs} +1 -1
- package/dist/chunks/{jszip-DzmwAHr3.es.js → jszip-C8srOKAO.es.js} +2 -2
- package/dist/chunks/{jszip-BdUBlUeG.cjs → jszip-Cs9JBLlJ.cjs} +13 -1
- package/dist/chunks/{rolldown-runtime-_dR15c8t.cjs → rolldown-runtime-1Y-nnZJ3.cjs} +0 -28
- package/dist/chunks/{rolldown-runtime-BJVcqBbz.es.js → rolldown-runtime-D7PMmH3s.es.js} +1 -17
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/comments/comment-create-attribution.d.ts +2 -0
- package/dist/document-api/src/comments/comments.d.ts +13 -4
- package/dist/document-api/src/comments/comments.types.d.ts +39 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +2 -0
- package/dist/document-api/src/contract/metadata-types.d.ts +18 -0
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/index.d.ts +2 -2
- package/dist/layout-engine/painters/dom/src/_test-utils.d.ts +3 -2
- package/dist/layout-engine/painters/dom/src/index.d.ts +24 -19
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +107 -39
- package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +144 -0
- package/dist/layout-engine/painters/dom/src/pm-position-validation.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +50 -106
- package/dist/layout-engine/painters/dom/src/sdt/boundaries.d.ts +1 -1
- package/dist/public/ui-react.cjs +2 -2
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +97 -90
- package/dist/style.layered.css +97 -90
- package/dist/superdoc/src/core/types/index.d.ts +258 -11
- package/dist/superdoc/src/helpers/floor.d.ts +1 -1
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -1
- package/dist/superdoc/src/public/index.d.cts +6 -0
- package/dist/superdoc/src/public/index.d.ts +3 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +34 -10
- package/dist/superdoc/src/stores/superdoc-store.d.ts +102 -30
- package/dist/superdoc.cjs +4581 -608
- package/dist/superdoc.es.js +4581 -612
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +37 -37
- package/package.json +5 -4
- package/dist/chunks/blank-docx-CJAXnJKp.es.js +0 -2
- package/dist/chunks/blank-docx-DA-G-3VB.cjs +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __toESM, t as __commonJSMin } from "./rolldown-runtime-D7PMmH3s.es.js";
|
|
2
2
|
var import_eventemitter3 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
3
|
var has = Object.prototype.hasOwnProperty, prefix = "~";
|
|
4
4
|
function Events() {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-1Y-nnZJ3.cjs");
|
|
2
2
|
var require_eventemitter3 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
3
3
|
var has = Object.prototype.hasOwnProperty, prefix = "~";
|
|
4
4
|
function Events() {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __esmMin, r as __require, t as __commonJSMin } from "./rolldown-runtime-D7PMmH3s.es.js";
|
|
2
2
|
function getLens(b64) {
|
|
3
3
|
var len$1 = b64.length;
|
|
4
4
|
if (len$1 % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -4647,4 +4647,4 @@ while (n$2 === a$2[++i$3] && n$2 === a$2[++i$3] && n$2 === a$2[++i$3] && n$2 ===
|
|
|
4647
4647
|
}, {}, [10])(10);
|
|
4648
4648
|
});
|
|
4649
4649
|
}));
|
|
4650
|
-
export { init_dist$1 as a, global as i, init_dist as n, process$1 as r, require_jszip_min as t };
|
|
4650
|
+
export { init_dist$1 as a, global as i, init_dist as n, Buffer as o, process$1 as r, init_dist$2 as s, require_jszip_min as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-1Y-nnZJ3.cjs");
|
|
2
2
|
function getLens(b64) {
|
|
3
3
|
var len$1 = b64.length;
|
|
4
4
|
if (len$1 % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -4647,6 +4647,12 @@ while (n$2 === a$2[++i$3] && n$2 === a$2[++i$3] && n$2 === a$2[++i$3] && n$2 ===
|
|
|
4647
4647
|
}, {}, [10])(10);
|
|
4648
4648
|
});
|
|
4649
4649
|
}));
|
|
4650
|
+
Object.defineProperty(exports, "Buffer", {
|
|
4651
|
+
enumerable: true,
|
|
4652
|
+
get: function() {
|
|
4653
|
+
return Buffer;
|
|
4654
|
+
}
|
|
4655
|
+
});
|
|
4650
4656
|
Object.defineProperty(exports, "global", {
|
|
4651
4657
|
enumerable: true,
|
|
4652
4658
|
get: function() {
|
|
@@ -4665,6 +4671,12 @@ Object.defineProperty(exports, "init_dist$1", {
|
|
|
4665
4671
|
return init_dist$1;
|
|
4666
4672
|
}
|
|
4667
4673
|
});
|
|
4674
|
+
Object.defineProperty(exports, "init_dist$2", {
|
|
4675
|
+
enumerable: true,
|
|
4676
|
+
get: function() {
|
|
4677
|
+
return init_dist$2;
|
|
4678
|
+
}
|
|
4679
|
+
});
|
|
4668
4680
|
Object.defineProperty(exports, "process$1", {
|
|
4669
4681
|
enumerable: true,
|
|
4670
4682
|
get: function() {
|
|
@@ -6,15 +6,6 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
8
8
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
-
var __export = (all, symbols) => {
|
|
10
|
-
let target = {};
|
|
11
|
-
for (var name in all) __defProp(target, name, {
|
|
12
|
-
get: all[name],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
9
|
var __copyProps = (to, from, except, desc) => {
|
|
19
10
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
11
|
key = keys[i];
|
|
@@ -25,13 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
16
|
}
|
|
26
17
|
return to;
|
|
27
18
|
};
|
|
28
|
-
var __reExport = (target, mod, secondTarget, symbols) => {
|
|
29
|
-
if (symbols) {
|
|
30
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
31
|
-
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
32
|
-
}
|
|
33
|
-
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
34
|
-
};
|
|
35
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
36
20
|
value: mod,
|
|
37
21
|
enumerable: true
|
|
@@ -48,18 +32,6 @@ Object.defineProperty(exports, "__esmMin", {
|
|
|
48
32
|
return __esmMin;
|
|
49
33
|
}
|
|
50
34
|
});
|
|
51
|
-
Object.defineProperty(exports, "__export", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function() {
|
|
54
|
-
return __export;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
Object.defineProperty(exports, "__reExport", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: function() {
|
|
60
|
-
return __reExport;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
35
|
Object.defineProperty(exports, "__toESM", {
|
|
64
36
|
enumerable: true,
|
|
65
37
|
get: function() {
|
|
@@ -6,15 +6,6 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
8
8
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
-
var __export = (all, symbols) => {
|
|
10
|
-
let target = {};
|
|
11
|
-
for (var name in all) __defProp(target, name, {
|
|
12
|
-
get: all[name],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
9
|
var __copyProps = (to, from, except, desc) => {
|
|
19
10
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
11
|
key = keys[i];
|
|
@@ -25,13 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
16
|
}
|
|
26
17
|
return to;
|
|
27
18
|
};
|
|
28
|
-
var __reExport = (target, mod, secondTarget, symbols) => {
|
|
29
|
-
if (symbols) {
|
|
30
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
31
|
-
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
32
|
-
}
|
|
33
|
-
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
34
|
-
};
|
|
35
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
36
20
|
value: mod,
|
|
37
21
|
enumerable: true
|
|
@@ -40,4 +24,4 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
40
24
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
41
25
|
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
42
26
|
});
|
|
43
|
-
export {
|
|
27
|
+
export { __toESM as i, __esmMin as n, __require as r, __commonJSMin as t };
|
|
@@ -7,7 +7,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
7
7
|
var PRIVATE_ENGINE_INFO = (0, __superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
8
8
|
var ENGINE_INFO = Object.freeze({
|
|
9
9
|
...PRIVATE_ENGINE_INFO,
|
|
10
|
-
superdocVersion: "2.
|
|
10
|
+
superdocVersion: "2.4.0-next.2",
|
|
11
11
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
12
12
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
13
13
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -6,7 +6,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
6
6
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
7
7
|
var ENGINE_INFO = Object.freeze({
|
|
8
8
|
...PRIVATE_ENGINE_INFO,
|
|
9
|
-
superdocVersion: "2.
|
|
9
|
+
superdocVersion: "2.4.0-next.2",
|
|
10
10
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
11
11
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
12
12
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Receipt, ReceiptFailureResult, ReceiptSuccess, StoryLocator } from '../types/index.js';
|
|
2
|
-
import { CommentInfo, CommentTarget, CommentsListQuery, CommentsListResult, TextSearchCommentTarget, TrackedChangeCommentTarget, TrackedChangeCommentTargetSide } from './comments.types.js';
|
|
2
|
+
import { CommentInfo, CommentCreateAttributionInput, CommentTarget, CommentsListQuery, CommentsListResult, TextSearchCommentTarget, TrackedChangeCommentTarget, TrackedChangeCommentTargetSide } from './comments.types.js';
|
|
3
3
|
import { RevisionGuardOptions } from '../write/write.js';
|
|
4
4
|
export type { TextSearchCommentTarget, TrackedChangeCommentTarget, TrackedChangeCommentTargetSide };
|
|
5
|
+
export type { CommentCreateAttributionInput, CommentMetadata, CommentMetadataValue } from './comments.types.js';
|
|
5
6
|
/**
|
|
6
7
|
* Input for adding a comment to a text range.
|
|
7
8
|
*
|
|
@@ -10,7 +11,7 @@ export type { TextSearchCommentTarget, TrackedChangeCommentTarget, TrackedChange
|
|
|
10
11
|
* across contiguous blocks: use it directly from `editor.doc.selection.current().target`
|
|
11
12
|
* without picking a single segment.
|
|
12
13
|
*/
|
|
13
|
-
export interface AddCommentInput {
|
|
14
|
+
export interface AddCommentInput extends CommentCreateAttributionInput {
|
|
14
15
|
/**
|
|
15
16
|
* The text range to attach the comment to.
|
|
16
17
|
*
|
|
@@ -29,7 +30,7 @@ export interface EditCommentInput {
|
|
|
29
30
|
commentId: string;
|
|
30
31
|
text: string;
|
|
31
32
|
}
|
|
32
|
-
export interface ReplyToCommentInput {
|
|
33
|
+
export interface ReplyToCommentInput extends CommentCreateAttributionInput {
|
|
33
34
|
parentCommentId: string;
|
|
34
35
|
text: string;
|
|
35
36
|
}
|
|
@@ -74,9 +75,17 @@ export interface GetCommentInput {
|
|
|
74
75
|
* When `parentCommentId` is provided, creates a reply on an existing thread.
|
|
75
76
|
* Otherwise, creates a new root comment anchored to the given text range.
|
|
76
77
|
*/
|
|
77
|
-
export interface CommentsCreateInput {
|
|
78
|
+
export interface CommentsCreateInput extends CommentCreateAttributionInput {
|
|
78
79
|
/** The comment body text. */
|
|
79
80
|
text: string;
|
|
81
|
+
/**
|
|
82
|
+
* Compatibility alias for {@link CommentCreateAttributionInput.externalId},
|
|
83
|
+
* matching the caller-supplied `commentId` accepted by the v1 editor.
|
|
84
|
+
*
|
|
85
|
+
* V2 still mints a separate Word-compatible id for the document. Pass
|
|
86
|
+
* either `commentId` or `externalId`; when both are present they must agree.
|
|
87
|
+
*/
|
|
88
|
+
commentId?: string;
|
|
80
89
|
/**
|
|
81
90
|
* The text range to attach the comment to (root comments only).
|
|
82
91
|
*
|
|
@@ -2,6 +2,30 @@ import { CommentAddress, CommentStatus, SelectionTarget, StoryLocator, TextAddre
|
|
|
2
2
|
import { DiscoveryOutput } from '../types/discovery.js';
|
|
3
3
|
import { TrackChangeType } from '../types/track-changes.types.js';
|
|
4
4
|
export type { CommentStatus } from '../types/index.js';
|
|
5
|
+
export type CommentMetadataValue = string | number | boolean | null | readonly CommentMetadataValue[] | {
|
|
6
|
+
readonly [key: string]: CommentMetadataValue;
|
|
7
|
+
};
|
|
8
|
+
/** Caller-owned JSON metadata persisted with a comment. */
|
|
9
|
+
export type CommentMetadata = Readonly<Record<string, CommentMetadataValue>>;
|
|
10
|
+
/** Optional caller-owned identity and authorship for a newly-created comment. */
|
|
11
|
+
export interface CommentCreateAttributionInput {
|
|
12
|
+
/**
|
|
13
|
+
* Durable document-scoped integration id, distinct from the Word-compatible
|
|
14
|
+
* `commentId` returned by the operation. Must be unique when provided and no
|
|
15
|
+
* longer than 1,024 Unicode characters.
|
|
16
|
+
*/
|
|
17
|
+
externalId?: string;
|
|
18
|
+
/** Author display name. Defaults to the configured session author. */
|
|
19
|
+
author?: string;
|
|
20
|
+
/** Stable actor id, matching the v1 `addComment` option. */
|
|
21
|
+
authorId?: string;
|
|
22
|
+
/** Author email, matching the v1 `addComment` option. */
|
|
23
|
+
authorEmail?: string;
|
|
24
|
+
/** Author image URL, matching the v1 `addComment` option. */
|
|
25
|
+
authorImage?: string;
|
|
26
|
+
/** Caller-owned JSON metadata persisted through DOCX save/reopen. */
|
|
27
|
+
metadata?: CommentMetadata;
|
|
28
|
+
}
|
|
5
29
|
/**
|
|
6
30
|
* Side of a tracked-change anchor that a comment is currently anchored on.
|
|
7
31
|
* Derived on read; not stored in a persisted custom carrier.
|
|
@@ -78,6 +102,13 @@ export interface CommentTrackedChangeLink {
|
|
|
78
102
|
export interface CommentInfo {
|
|
79
103
|
address: CommentAddress;
|
|
80
104
|
commentId: string;
|
|
105
|
+
/**
|
|
106
|
+
* Caller-owned integration id. This is distinct from the Word-compatible
|
|
107
|
+
* {@link commentId} and survives save/reopen as a durable correlation key.
|
|
108
|
+
*/
|
|
109
|
+
externalId?: string;
|
|
110
|
+
/** Caller-owned JSON metadata persisted with the comment. */
|
|
111
|
+
metadata?: CommentMetadata;
|
|
81
112
|
/**
|
|
82
113
|
* Logical tracked-change id that the comment anchor
|
|
83
114
|
* currently maps wholly to, when the surviving anchor sits inside
|
|
@@ -161,7 +192,9 @@ export interface CommentInfo {
|
|
|
161
192
|
*/
|
|
162
193
|
createdTime?: number;
|
|
163
194
|
creatorName?: string;
|
|
195
|
+
creatorId?: string;
|
|
164
196
|
creatorEmail?: string;
|
|
197
|
+
creatorImage?: string;
|
|
165
198
|
}
|
|
166
199
|
export interface CommentsListQuery {
|
|
167
200
|
includeResolved?: boolean;
|
|
@@ -176,6 +209,10 @@ export interface CommentsListQuery {
|
|
|
176
209
|
*/
|
|
177
210
|
export interface CommentDomain {
|
|
178
211
|
address: CommentAddress;
|
|
212
|
+
/** See {@link CommentInfo.externalId}. */
|
|
213
|
+
externalId?: string;
|
|
214
|
+
/** See {@link CommentInfo.metadata}. */
|
|
215
|
+
metadata?: CommentMetadata;
|
|
179
216
|
/** See {@link CommentInfo.importedId}. */
|
|
180
217
|
importedId?: string;
|
|
181
218
|
/** See {@link CommentInfo.rawOoxmlId}. */
|
|
@@ -219,7 +256,9 @@ export interface CommentDomain {
|
|
|
219
256
|
anchoredText?: string;
|
|
220
257
|
createdTime?: number;
|
|
221
258
|
creatorName?: string;
|
|
259
|
+
creatorId?: string;
|
|
222
260
|
creatorEmail?: string;
|
|
261
|
+
creatorImage?: string;
|
|
223
262
|
}
|
|
224
263
|
/**
|
|
225
264
|
* Standardized discovery output for `comments.list`.
|
|
@@ -148,6 +148,8 @@ export interface ContentControlInfo {
|
|
|
148
148
|
target: ContentControlTarget;
|
|
149
149
|
selectionTarget?: SelectionTarget | null;
|
|
150
150
|
text?: string;
|
|
151
|
+
/** Authoritative structural emptiness when the adapter can determine it. */
|
|
152
|
+
isEmpty?: boolean;
|
|
151
153
|
}
|
|
152
154
|
export interface ContentControlMutationSuccess {
|
|
153
155
|
success: true;
|
|
@@ -12,6 +12,24 @@ export interface CommandStaticMetadata {
|
|
|
12
12
|
idempotency: OperationIdempotency;
|
|
13
13
|
supportsDryRun: boolean;
|
|
14
14
|
supportsTrackedMode: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Tracked mode is permitted for *some* targets of this operation but cannot
|
|
17
|
+
* be promised statically, because whether it applies depends on the document
|
|
18
|
+
* state at the target — not on the operation itself.
|
|
19
|
+
*
|
|
20
|
+
* Set this only when `supportsTrackedMode` is `false`. It does not advertise
|
|
21
|
+
* tracked support: capability reporting still reports `tracked: false`,
|
|
22
|
+
* because the operation cannot guarantee a reviewable revision. What it does
|
|
23
|
+
* is stop transports from rejecting a tracked call on static metadata alone,
|
|
24
|
+
* so the engine adapter gets to resolve the target and make the real
|
|
25
|
+
* decision — succeeding where the context allows it and otherwise failing
|
|
26
|
+
* closed with `CAPABILITY_UNAVAILABLE`, exactly as an unsupported operation
|
|
27
|
+
* would.
|
|
28
|
+
*
|
|
29
|
+
* Without this, an adapter-level contextual allowance is unreachable from
|
|
30
|
+
* any transport that gates on the contract (see `tables.setCellText`).
|
|
31
|
+
*/
|
|
32
|
+
supportsConditionalTrackedMode?: boolean;
|
|
15
33
|
possibleFailureCodes: readonly ReceiptFailureCode[];
|
|
16
34
|
throws: CommandThrowPolicy;
|
|
17
35
|
deterministicTargetResolution: boolean;
|
|
@@ -901,7 +901,7 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
901
901
|
};
|
|
902
902
|
readonly 'comments.create': {
|
|
903
903
|
readonly memberPath: "comments.create";
|
|
904
|
-
readonly description: "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side.";
|
|
904
|
+
readonly description: "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side. Callers may supply a durable externalId, or use the v1-compatible caller-supplied commentId alias, plus author fields and arbitrary JSON metadata for integration correlation. The caller-owned id remains distinct from the generated Word-compatible commentId.";
|
|
905
905
|
readonly expectedResult: "Returns a Receipt with the new commentId in `id` and `inserted` on success; rejects whitespace-only bodies, unsupported anchor contexts, and cross-story targets. Tracked-change comment targets support insertion, deletion, replacement, and paired-move revisions; they fail with `TARGET_NOT_FOUND` for stale ids, `CAPABILITY_UNAVAILABLE` for formatting / structural revisions and unpaired move sides, and `INVALID_TARGET` for incompatible side requests or ambiguous replacement targets that omit a required `side`.";
|
|
906
906
|
readonly requiresDocumentContext: true;
|
|
907
907
|
readonly metadata: CommandStaticMetadata;
|
|
@@ -144,9 +144,9 @@ export { PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SID
|
|
|
144
144
|
export type { BlockAddress, BlockRange, CanContinueReason, CanJoinReason, JoinDirection, ListInsertInput, ListItemAddress, ListItemInfo, ListKind, ListsAttachInput, ListsCanContinuePreviousInput, ListsCanContinuePreviousResult, ListsCanJoinInput, ListsCanJoinResult, ListsConvertToTextInput, ListsConvertToTextResult, ListsContinuePreviousInput, ListsCreateInput, ListsCreateResult, ListsDetachInput, ListsDetachResult, ListsDeleteInput, ListsDeleteResult, ListsFailureCode, ListsGetInput, ListsInsertResult, ListsJoinInput, ListsJoinResult, ListsListQuery, ListsListResult, ListsMutateItemResult, ListsSeparateInput, ListsSeparateResult, ListsMergeInput, ListsMergeResult, ListsSplitInput, ListsSplitResult, ListsSetLevelInput, ListsSetLevelRestartInput, ListsSetValueInput, ListTargetInput, MutationScope, LevelAlignment, TrailingCharacter, ListPresetId, ListPresetMarker, ListLevelTemplate, ListTemplate, ListsApplyTemplateInput, ListsApplyPresetInput, ListsCaptureTemplateInput, ListsCaptureTemplateResult, ListsCaptureTemplateSuccessResult, ListsSetLevelNumberingInput, ListsSetLevelBulletInput, ListsSetLevelPictureBulletInput, ListsSetLevelAlignmentInput, ListsSetLevelIndentsInput, ListsSetLevelTrailingCharacterInput, ListsSetLevelMarkerFontInput, ListsClearLevelOverridesInput, ListsSetTypeInput, ListStyle, ListLevelStyle, ListLevelLayout, ListsGetStyleInput, ListsGetStyleResult, ListsGetStyleSuccessResult, ListsApplyStyleInput, ListsRestartAtInput, ListsSetLevelNumberStyleInput, ListsSetLevelTextInput, ListsSetLevelStartInput, ListsSetLevelLayoutInput, ListsGetStateInput, ListsGetStateResult, ListsApplyInput, ListsContinueV2Input, ListsRestartV2Input, ListsRemoveV2Input, } from './lists/lists.types.js';
|
|
145
145
|
export { LIST_KINDS, LIST_INSERT_POSITIONS, JOIN_DIRECTIONS, MUTATION_SCOPES, LEVEL_ALIGNMENTS, TRAILING_CHARACTERS, LIST_PRESET_IDS, LIST_PRESET_MARKERS, } from './lists/lists.types.js';
|
|
146
146
|
export type { CreateSectionBreakInput, CreateSectionBreakResult, DocumentMutationResult, SectionAddress, SectionBorderSpec, SectionBreakCreateLocation, SectionBreakRepresentation, SectionBreakType, SectionColumns, SectionDirection, SectionDomain, SectionHeaderFooterKind, SectionHeaderFooterMargins, SectionHeaderFooterRefs, SectionHeaderFooterVariant, SectionInfo, SectionLineNumbering, SectionLineNumberRestart, SectionMutationResult, SectionOrientation, SectionPageBorders, SectionPageMargins, SectionPageNumbering, SectionPageNumberingChapterSeparator, SectionPageNumberingFormat, SectionPageSetup, SectionRangeDomain, SectionTargetInput, SectionVerticalAlign, SectionsClearHeaderFooterRefInput, SectionsClearPageBordersInput, SectionsGetInput, SectionsListQuery, SectionsListResult, SectionsSetBreakTypeInput, SectionsSetColumnsInput, SectionsSetHeaderFooterMarginsInput, SectionsSetHeaderFooterRefInput, SectionsSetLineNumberingInput, SectionsSetLinkToPreviousInput, SectionsSetOddEvenHeadersFootersInput, SectionsSetPageBordersInput, SectionsSetPageMarginsInput, SectionsSetPageNumberingInput, SectionsSetPageSetupInput, SectionsSetSectionDirectionInput, SectionsSetTitlePageInput, SectionsSetVerticalAlignInput, } from './sections/sections.types.js';
|
|
147
|
-
export type { CommentsCreateReceipt, CommentsCreateInput, CommentsPatchInput, CommentsDeleteInput, CommentsAdapter, CommentsApi, GetCommentInput, TrackedChangeCommentTarget, TrackedChangeCommentTargetSide, TextSearchCommentTarget, AddCommentInput, EditCommentInput, ReplyToCommentInput, MoveCommentInput, ResolveCommentInput, ReopenCommentInput, RemoveCommentInput, SetCommentInternalInput, GoToCommentInput, SetCommentActiveInput, } from './comments/comments.js';
|
|
147
|
+
export type { CommentsCreateReceipt, CommentsCreateInput, CommentCreateAttributionInput, CommentsPatchInput, CommentsDeleteInput, CommentsAdapter, CommentsApi, GetCommentInput, TrackedChangeCommentTarget, TrackedChangeCommentTargetSide, TextSearchCommentTarget, AddCommentInput, EditCommentInput, ReplyToCommentInput, MoveCommentInput, ResolveCommentInput, ReopenCommentInput, RemoveCommentInput, SetCommentInternalInput, GoToCommentInput, SetCommentActiveInput, } from './comments/comments.js';
|
|
148
148
|
export { executeCommentsCreate, executeCommentsPatch, executeCommentsDelete, executeGetComment, executeListComments, } from './comments/comments.js';
|
|
149
|
-
export type { CommentInfo, CommentDomain, CommentsListQuery, CommentsListResult, CommentTrackedChangeSide, CommentTrackedChangeLink, CommentTarget, } from './comments/comments.types.js';
|
|
149
|
+
export type { CommentInfo, CommentDomain, CommentMetadata, CommentMetadataValue, CommentsListQuery, CommentsListResult, CommentTrackedChangeSide, CommentTrackedChangeLink, CommentTarget, } from './comments/comments.types.js';
|
|
150
150
|
export type { BlocksApi } from './blocks/blocks.js';
|
|
151
151
|
export { executeBlocksList, executeBlocksDelete, executeBlocksDeleteRange, executeBlocksSplit, executeBlocksMerge, executeBlocksMove, } from './blocks/blocks.js';
|
|
152
152
|
export { executeListsIndent, executeListsOutdent, executeListsGetState, executeListsApply, executeListsContinueV2, executeListsRestartV2, executeListsRemoveV2, } from './lists/lists.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DomPainterOptions, PaintSnapshot } from './index.js';
|
|
1
|
+
import { DomPainterHandle, DomPainterOptions, PaintSnapshot } from './index.js';
|
|
2
2
|
import { PageDecorationProvider } from './renderer.js';
|
|
3
3
|
import { FlowBlock, Layout, Measure, ResolvedLayout } from '../../../contracts/src/index.js';
|
|
4
4
|
export declare const emptyResolved: ResolvedLayout;
|
|
5
|
+
export declare function paintResolvedLayoutPersistent(painter: DomPainterHandle, resolvedLayout: ResolvedLayout, mount: HTMLElement): void;
|
|
5
6
|
/**
|
|
6
7
|
* Test-only bridge: accepts old-style `{ blocks, measures, ...options }` and
|
|
7
8
|
* returns a painter whose `paint()` automatically builds a `DomPainterInput`.
|
|
@@ -14,7 +15,7 @@ export declare function createTestPainter(opts: {
|
|
|
14
15
|
setData(blocks: FlowBlock[], measures: Measure[], hb?: FlowBlock[], hm?: Measure[], fb?: FlowBlock[], fm?: Measure[]): void;
|
|
15
16
|
setResolvedLayout(rl: ResolvedLayout | null): void;
|
|
16
17
|
setProviders(header?: PageDecorationProvider, footer?: PageDecorationProvider): void;
|
|
17
|
-
|
|
18
|
+
getPersistentPageIndices(): number[];
|
|
18
19
|
getPaintSnapshot(): PaintSnapshot | null;
|
|
19
20
|
setShowFormattingMarks(showFormattingMarks: boolean): void;
|
|
20
21
|
dispose(): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PaintWorkSummary } from './page-content.js';
|
|
2
2
|
import { PageStyles } from './styles.js';
|
|
3
3
|
import { PositionValidationOptions, PositionValidationSummary } from './pm-position-validation.js';
|
|
4
|
-
import { DomPainterInput,
|
|
4
|
+
import { DomPainterInput, PageDecorationProvider, PaintSnapshot, PositionMapping, FlowMode } from './renderer.js';
|
|
5
|
+
import { DomPainterPersistentPageInput } from './persistent-page-surface.js';
|
|
5
6
|
export { DOM_CLASS_NAMES } from './constants.js';
|
|
6
7
|
export type { DomClassName } from './constants.js';
|
|
7
8
|
export { ensureDocumentSurfaceStyles } from './styles.js';
|
|
@@ -11,7 +12,7 @@ export { generateRulerDefinition, generateRulerDefinitionFromPx, createRulerElem
|
|
|
11
12
|
export type { RulerDefinition, RulerConfig, RulerConfigPx, RulerTick, CreateRulerElementOptions, } from './ruler/index.js';
|
|
12
13
|
export type { PaintSnapshot, PaintSnapshotAnnotationEntity, PaintSnapshotStructuredContentBlockEntity, PaintSnapshotStructuredContentInlineEntity, PaintSnapshotImageEntity, PaintSnapshotEntities, } from './renderer.js';
|
|
13
14
|
export type { DomPainterInput, PositionMapping } from './renderer.js';
|
|
14
|
-
export type {
|
|
15
|
+
export type { DomPainterPersistentPacketSource, DomPainterPersistentPageInput, DomPainterPersistentScaffold, DomPainterPersistentScaffoldPage, } from './persistent-page-surface.js';
|
|
15
16
|
export type { PaintWorkSummary } from './page-content.js';
|
|
16
17
|
export type { RenderedLineInfo } from './runs/index.js';
|
|
17
18
|
export { sanitizeUrl, linkMetrics, applyRunDataAttributes } from './runs/index.js';
|
|
@@ -66,18 +67,29 @@ export type DomPainterOptions = {
|
|
|
66
67
|
* branch with no allocation. The performance harness enables it (with an
|
|
67
68
|
* explicit `off | summary | verbose` console policy — never `NODE_ENV`) and
|
|
68
69
|
* drains it via `consumePositionValidationSummary()`. Each painter instance
|
|
69
|
-
* owns its collector, so the
|
|
70
|
-
* oracle never mix counts.
|
|
70
|
+
* owns its collector, so the live persistent surface and the fresh-state
|
|
71
|
+
* persistent-page oracle never mix counts.
|
|
71
72
|
*/
|
|
72
73
|
positionValidation?: PositionValidationOptions;
|
|
73
74
|
};
|
|
74
75
|
export type DomPainterHandle = {
|
|
75
|
-
/** Semantic flow only (painter plan P7); paginated documents use
|
|
76
|
+
/** Semantic flow only (painter plan P7); paginated documents use the persistent reconcile. */
|
|
76
77
|
paint(input: DomPainterInput, mount: HTMLElement, mapping?: PositionMapping): void;
|
|
77
|
-
/** Paginated flow only (painter plan P7); a dense paint is a full-range window. */
|
|
78
|
-
paintPageWindow(input: DomPainterPageWindowInput, mount: HTMLElement): void;
|
|
79
78
|
/**
|
|
80
|
-
*
|
|
79
|
+
* The persistent paginated reconcile (default persistent page geometry
|
|
80
|
+
* plan): a generation-scoped scaffold publishes every page root atomically
|
|
81
|
+
* and keeps it mounted for the whole layout generation; only content
|
|
82
|
+
* descendants are virtualized. Paginated flow only.
|
|
83
|
+
*/
|
|
84
|
+
paintPersistentPages(input: DomPainterPersistentPageInput, mount: HTMLElement): void;
|
|
85
|
+
/** Live integrity probe used to prevent zero-work skips over a corrupted shell plane. */
|
|
86
|
+
isPersistentPageSurfaceIntact(): boolean;
|
|
87
|
+
/** Wake-up callback for foreign page-root DOM corruption. */
|
|
88
|
+
setPersistentSurfaceInvalidationHandler(handler?: () => void): void;
|
|
89
|
+
/** Ascending hydrated content page indices of the persistent surface. */
|
|
90
|
+
getHydratedContentPageIndices(): number[];
|
|
91
|
+
/**
|
|
92
|
+
* Painter plan §4.6 (dark observability): persistent-page paint work since the
|
|
81
93
|
* last consume. Fields the path cannot attribute yet are 0/null, never
|
|
82
94
|
* invented (`domNodesCreated` stays null until node counting lands). Since
|
|
83
95
|
* P5, `pagesPositionRemapped` counts uniform in-place pm shifts on reused
|
|
@@ -92,14 +104,10 @@ export type DomPainterHandle = {
|
|
|
92
104
|
*/
|
|
93
105
|
consumePositionValidationSummary(): PositionValidationSummary;
|
|
94
106
|
setProviders(header?: PageDecorationProvider, footer?: PageDecorationProvider): void;
|
|
95
|
-
|
|
107
|
+
getPersistentPageIndices(): number[];
|
|
96
108
|
setShowFormattingMarks(showFormattingMarks: boolean): void;
|
|
97
109
|
dispose(): void;
|
|
98
110
|
};
|
|
99
|
-
export type DenseReferencePainterHandle = DomPainterHandle & {
|
|
100
|
-
/** Proof-only sequential batch traversal; product surfaces never receive this handle. */
|
|
101
|
-
paintDensePageBatch(input: DomPainterInput, mount: HTMLElement, startPageIndex: number, endPageIndexExclusive: number): void;
|
|
102
|
-
};
|
|
103
111
|
/**
|
|
104
112
|
* Thin pass-through factory: instantiates DomPainter with the supplied options
|
|
105
113
|
* and returns a stable handle that exposes only the rendering-stage API.
|
|
@@ -108,11 +116,9 @@ export type DenseReferencePainterHandle = DomPainterHandle & {
|
|
|
108
116
|
* Header/footer decoration providers must supply both `fragments` and `items`
|
|
109
117
|
* on their `PageDecorationPayload`.
|
|
110
118
|
*
|
|
111
|
-
* Mode ownership
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* tests that need the paginated dense REFERENCE go through
|
|
115
|
-
* {@link createDenseReferencePainter} instead.
|
|
119
|
+
* Mode ownership: `paint()` serves semantic flow and rejects paginated flow;
|
|
120
|
+
* paginated documents and fresh-state oracles both use the one persistent
|
|
121
|
+
* page reconcile.
|
|
116
122
|
*
|
|
117
123
|
* v1 EOL (product decision 2026-07-06, P7 review): the v1 PresentationEditor
|
|
118
124
|
* consumed the deleted surface (paginated `paint()`, `virtualization`/`ruler`
|
|
@@ -122,4 +128,3 @@ export type DenseReferencePainterHandle = DomPainterHandle & {
|
|
|
122
128
|
* `mode-ownership.test.ts` battery pins the surface deleted.
|
|
123
129
|
*/
|
|
124
130
|
export declare const createDomPainter: (options: DomPainterOptions) => DomPainterHandle;
|
|
125
|
-
export declare const createDenseReferencePainter: (options: DomPainterOptions) => DenseReferencePainterHandle;
|