@arbidocs/blocks 0.4.101 → 0.4.102
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/dist/chunk-6MG62I5B.cjs +272 -0
- package/dist/chunk-6MG62I5B.cjs.map +1 -0
- package/dist/chunk-EQB3WELX.js +269 -0
- package/dist/chunk-EQB3WELX.js.map +1 -0
- package/dist/document-tools/AdoptSignatureDialog.d.ts +25 -0
- package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
- package/dist/document-tools/SignatureRequestBanner.d.ts +18 -0
- package/dist/document-tools/index.cjs +175 -0
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.ts +3 -1
- package/dist/document-tools/index.js +168 -3
- package/dist/document-tools/index.js.map +1 -1
- package/dist/document-tools/viewer/GuidedSigningViewer.d.ts +26 -0
- package/dist/document-tools/viewer/SignatureFieldsOverlay.d.ts +41 -0
- package/dist/document-tools/viewer/SignatureRequestEditor.d.ts +26 -0
- package/dist/document-tools/viewer/index.cjs +983 -0
- package/dist/document-tools/viewer/index.cjs.map +1 -1
- package/dist/document-tools/viewer/index.d.ts +3 -0
- package/dist/document-tools/viewer/index.js +983 -5
- package/dist/document-tools/viewer/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/LICENSE +21 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.cjs +751 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.d.cts +192 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.d.ts +192 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.js +716 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +1759 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +39 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +39 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +1736 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/index.cjs +1692 -0
- package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/index.d.cts +16 -0
- package/node_modules/@arbidocs/coedit/dist/index.d.ts +16 -0
- package/node_modules/@arbidocs/coedit/dist/index.js +1664 -0
- package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/server.cjs +1852 -0
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +43 -0
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +43 -0
- package/node_modules/@arbidocs/coedit/dist/server.js +1822 -0
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/session-Cf9iu1Vt.d.cts +82 -0
- package/node_modules/@arbidocs/coedit/dist/session-Cf9iu1Vt.d.ts +82 -0
- package/node_modules/@arbidocs/coedit/dist/template.cjs +1627 -0
- package/node_modules/@arbidocs/coedit/dist/template.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/template.d.cts +125 -0
- package/node_modules/@arbidocs/coedit/dist/template.d.ts +125 -0
- package/node_modules/@arbidocs/coedit/dist/template.js +1612 -0
- package/node_modules/@arbidocs/coedit/dist/template.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/versions-DXiFQMA6.d.cts +8 -0
- package/node_modules/@arbidocs/coedit/dist/versions-DXiFQMA6.d.ts +8 -0
- package/node_modules/@arbidocs/coedit/package.json +68 -0
- package/node_modules/@docx-editor.dev/core/LICENSE +201 -0
- package/node_modules/@docx-editor.dev/core/README.md +125 -0
- package/node_modules/@docx-editor.dev/core/THIRD_PARTY_NOTICES.md +56 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.d.ts +162 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/binding.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/binding.d.ts +164 -0
- package/node_modules/@docx-editor.dev/core/dist/binding.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2GO5T2JU.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2RC2EPND.js +3 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-4GBTELJV.cjs +28 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-4R3TEXMN.js +18 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-5CSUYANV.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6APGXLBB.cjs +3 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6AWEKBLB.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6EYYL7FL.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6JIJOZDW.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-BTQKU64Q.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-E7BQA6UP.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-EO4C5QJW.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ETTO6GK3.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-FIJZIQXA.cjs +18 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-FRXAOVTB.js +28 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-J6BVWIDB.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-JGNVNT2A.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-K5U2PLDP.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-KKIJG3C6.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-LWDSDCMO.js +27 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-NBCVVZOM.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-O2AL2HSJ.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-O5INAWZQ.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-QMLCVPCD.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-RCHS4ZEH.cjs +27 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-RIYSCEFQ.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-S6J4O5XP.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-SRPILEWV.cjs +5 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-TSLBZ26X.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-UKVVUHZL.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-VDNNLG6X.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-VHAVHCQY.js +7 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-VX43VBAX.cjs +7 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-Z6WBFXJU.js +5 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ZUHOMK52.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.d.ts +270 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration.d.ts +269 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.d.ts +290 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.js +0 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.d.ts +22 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.d.ts +103 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.js +0 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.d.ts +143 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.d.ts +11 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.js +0 -0
- package/node_modules/@docx-editor.dev/core/dist/custom-node-writes-cvL5rhcD.d.ts +323 -0
- package/node_modules/@docx-editor.dev/core/dist/dist-PKZR6RSH.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/document-protection-BAGVGqaP.d.ts +20 -0
- package/node_modules/@docx-editor.dev/core/dist/editor-Ci7IZGmG.d.ts +2448 -0
- package/node_modules/@docx-editor.dev/core/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.css +15 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.d.ts +1394 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/export.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/export.d.ts +391 -0
- package/node_modules/@docx-editor.dev/core/dist/export.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/failure-NS2lsya4.d.ts +115 -0
- package/node_modules/@docx-editor.dev/core/dist/font-resolver-BVQB14qT.d.ts +256 -0
- package/node_modules/@docx-editor.dev/core/dist/harfbuzz.wasm +0 -0
- package/node_modules/@docx-editor.dev/core/dist/headless-document-view-qH331moE.d.ts +143 -0
- package/node_modules/@docx-editor.dev/core/dist/image-resources-BN-hUgCn.d.ts +211 -0
- package/node_modules/@docx-editor.dev/core/dist/index-Bsg7oIKP.d.ts +3869 -0
- package/node_modules/@docx-editor.dev/core/dist/index.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/index.d.ts +53 -0
- package/node_modules/@docx-editor.dev/core/dist/index.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/layout-shaping-BEyuiQOk.d.ts +246 -0
- package/node_modules/@docx-editor.dev/core/dist/layout.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/layout.d.ts +3151 -0
- package/node_modules/@docx-editor.dev/core/dist/layout.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/node-module-shim-TTKTT66I.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/note-properties-4Y9o6Gyk.d.ts +68 -0
- package/node_modules/@docx-editor.dev/core/dist/omml-equation-CuzBL5DD.d.ts +85 -0
- package/node_modules/@docx-editor.dev/core/dist/output.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/output.d.ts +97 -0
- package/node_modules/@docx-editor.dev/core/dist/output.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/protocol-Bqk4Izjc.d.ts +1651 -0
- package/node_modules/@docx-editor.dev/core/dist/review-pane-D9jm8DcY.d.ts +128 -0
- package/node_modules/@docx-editor.dev/core/dist/review-paragraph-order-DT-n6ouC.d.ts +85 -0
- package/node_modules/@docx-editor.dev/core/dist/revision-projection-DZ4kKVev.d.ts +242 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-cell-selection-D9D1KSXq.d.ts +464 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-interaction-CIC-PooQ.d.ts +135 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-paint-BME37OMv.d.ts +326 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-record-queries-CBlZqZNa.d.ts +177 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-records-4B3WwFAi.d.ts +3532 -0
- package/node_modules/@docx-editor.dev/core/dist/store.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/store.d.ts +2706 -0
- package/node_modules/@docx-editor.dev/core/dist/store.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/tree-package-fragment-BeeKxDw8.d.ts +1201 -0
- package/node_modules/@docx-editor.dev/core/dist/tree-session-contract-CVbmlMlq.d.ts +664 -0
- package/node_modules/@docx-editor.dev/core/dist/types-barrel-D3xCgQX6.d.ts +4269 -0
- package/node_modules/@docx-editor.dev/core/licenses/HarfBuzz-COPYING.txt +42 -0
- package/node_modules/@docx-editor.dev/core/package.json +140 -0
- package/node_modules/@docx-editor.dev/react/LICENSE +201 -0
- package/node_modules/@docx-editor.dev/react/README.md +141 -0
- package/node_modules/@docx-editor.dev/react/THIRD_PARTY_NOTICES.md +18 -0
- package/node_modules/@docx-editor.dev/react/dist/index.d.mts +4928 -0
- package/node_modules/@docx-editor.dev/react/dist/index.d.ts +4928 -0
- package/node_modules/@docx-editor.dev/react/dist/index.js +4 -0
- package/node_modules/@docx-editor.dev/react/dist/index.mjs +4 -0
- package/node_modules/@docx-editor.dev/react/package.json +74 -0
- package/node_modules/@docx-editor.dev/react/src/styles/editor.css +6 -0
- package/node_modules/@docx-editor.dev/react/src/styles/zIndex.ts +28 -0
- package/package.json +26 -15
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@docx-editor.dev/core/collaboration` — provider-neutral collaboration contracts.
|
|
3
|
+
*
|
|
4
|
+
* This lane names the attachment between the canonical tree and an optional replication
|
|
5
|
+
* implementation. It performs no networking and imports no CRDT.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
import { S as StoryScope } from './tree-package-fragment-BeeKxDw8.js';
|
|
11
|
+
import { W as TreeDocOp } from './types-barrel-D3xCgQX6.js';
|
|
12
|
+
import { CollaborationDocumentPort } from './collaboration/replication.js';
|
|
13
|
+
import { C as CollaborationStatus, a as CollaborationStatusSnapshot, b as CollaborationFailureCode } from './failure-NS2lsya4.js';
|
|
14
|
+
export { c as CollaborationFailure, d as createCollaborationStatusTracker, i as isCollaborationFailureCode } from './failure-NS2lsya4.js';
|
|
15
|
+
import './image-resources-BN-hUgCn.js';
|
|
16
|
+
import './editor-scope-OHPwVQ5l.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A peer's presence color is attacker-controlled: it arrives over awareness from whoever is in
|
|
20
|
+
* the room, and the engine paints it into a CSS custom property that the stylesheet consumes in
|
|
21
|
+
* a `background` shorthand. A custom property substitutes verbatim, so `url(...)` is a valid
|
|
22
|
+
* `<bg-image>` there — an unvalidated color is a zero-click GET to any host the peer names, on
|
|
23
|
+
* every replica that paints their caret. A length cap does not help: `url(//host/t)` is short.
|
|
24
|
+
*
|
|
25
|
+
* So the only colors that reach a style property are the two shapes this engine itself produces:
|
|
26
|
+
* a hex literal, or a reference to one of the review author slots the core stylesheet owns.
|
|
27
|
+
* Anything else is dropped and the caller falls back to the accent color.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Return `value` when it is a color this engine can safely paint, otherwise `undefined`.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
declare function safeParticipantColor(value: string | undefined): string | undefined;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* `@docx-editor.dev/core/collaboration` — provider-neutral collaboration contracts.
|
|
38
|
+
*
|
|
39
|
+
* This lane names the attachment between the canonical tree and an optional replication
|
|
40
|
+
* implementation. It performs no networking and imports no CRDT.
|
|
41
|
+
*
|
|
42
|
+
* @packageDocumentation
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/** Human or automation identity attached to authored collaboration transactions. @public */
|
|
47
|
+
interface CollaborationIdentity {
|
|
48
|
+
/** Stable author id, 1 to 256 characters after trimming. Recorded on authored changes. */
|
|
49
|
+
readonly actorId: string;
|
|
50
|
+
/** Display name, 1 to 256 characters after trimming. */
|
|
51
|
+
readonly name: string;
|
|
52
|
+
/** Presence color, at most 64 characters. An unsafe CSS color falls back to the accent. */
|
|
53
|
+
readonly color?: string;
|
|
54
|
+
/** `agent` for automation. Defaults to `human`. */
|
|
55
|
+
readonly role?: 'human' | 'agent';
|
|
56
|
+
}
|
|
57
|
+
/** One validated identity visible through ephemeral collaboration presence. @public */
|
|
58
|
+
interface CollaborationParticipant extends CollaborationIdentity {
|
|
59
|
+
/** True for this replica's own participant. */
|
|
60
|
+
readonly isLocal: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* One endpoint of a published selection: a stable paragraph id and a UTF-16 offset.
|
|
64
|
+
*
|
|
65
|
+
* The wire payload carries only these two endpoints. The receiver walks its own canonical
|
|
66
|
+
* tree to find the paragraphs between them, so a select-all does not grow with document size.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
interface CollaborationSelectionAddress {
|
|
71
|
+
/** The stable `w14:paraId` of the paragraph. */
|
|
72
|
+
readonly paragraphId: string;
|
|
73
|
+
/** A UTF-16 offset in the paragraph's text. */
|
|
74
|
+
readonly offset: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* How a published selection covers the document.
|
|
78
|
+
*
|
|
79
|
+
* Absent or omitted means a character range. `cells` means the table rectangle whose
|
|
80
|
+
* corner cells contain the two endpoints. The payload still carries only those endpoints,
|
|
81
|
+
* so a large table selection does not grow with the number of selected cells.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
type CollaborationSelectionKind = 'cells';
|
|
86
|
+
/**
|
|
87
|
+
* One endpoint of a remote selection resolved into this replica's canonical addresses.
|
|
88
|
+
*
|
|
89
|
+
* `paragraphId` is the stable `w14:paraId`. `nodeId` is replica-local and is used to paint.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
interface CollaborationRemoteSelectionAddress {
|
|
94
|
+
/** The stable `w14:paraId` of the paragraph. */
|
|
95
|
+
readonly paragraphId: string;
|
|
96
|
+
/** The paragraph's node id in this replica's editor tree. */
|
|
97
|
+
readonly nodeId: string;
|
|
98
|
+
/** A UTF-16 offset in the paragraph's text. */
|
|
99
|
+
readonly offset: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Stable remote selection resolved into this replica's canonical paragraph addresses.
|
|
103
|
+
*
|
|
104
|
+
* Anchor and head may name different paragraphs. A collapsed caret is the same address twice.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
interface CollaborationRemoteSelection {
|
|
109
|
+
/** The participant's `actorId`. */
|
|
110
|
+
readonly actorId: string;
|
|
111
|
+
/** The participant's display name. */
|
|
112
|
+
readonly name: string;
|
|
113
|
+
/** The participant's presence color, when it published a safe one. */
|
|
114
|
+
readonly color?: string;
|
|
115
|
+
/** Where the selection starts. */
|
|
116
|
+
readonly anchor: CollaborationRemoteSelectionAddress;
|
|
117
|
+
/** Where the selection ends: the remote caret. */
|
|
118
|
+
readonly head: CollaborationRemoteSelectionAddress;
|
|
119
|
+
/** `cells` for a table cell rectangle; absent for a character range. */
|
|
120
|
+
readonly kind?: CollaborationSelectionKind;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Selection published by the local editor through ephemeral awareness.
|
|
124
|
+
*
|
|
125
|
+
* Publish an anchor address and a head address. Do not materialize every covered paragraph.
|
|
126
|
+
*
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
interface CollaborationLocalSelection {
|
|
130
|
+
/** Where the selection starts. */
|
|
131
|
+
readonly anchor: CollaborationSelectionAddress;
|
|
132
|
+
/** Where the selection ends: the caret. */
|
|
133
|
+
readonly head: CollaborationSelectionAddress;
|
|
134
|
+
/** `cells` for a table cell rectangle; absent for a character range. */
|
|
135
|
+
readonly kind?: CollaborationSelectionKind;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Where a collaboration session carried the local selection across the last remote change.
|
|
139
|
+
*
|
|
140
|
+
* The editor uses `to` only while its selection still equals `from`: a selection the user
|
|
141
|
+
* moved since is the user's. @public
|
|
142
|
+
*/
|
|
143
|
+
interface CollaborationSelectionMove {
|
|
144
|
+
/** The selection the session carried, as the editor last published it. */
|
|
145
|
+
readonly from: CollaborationEditorSelection;
|
|
146
|
+
/** Where it stands now: beside the same characters, wherever they show. */
|
|
147
|
+
readonly to: CollaborationEditorSelection;
|
|
148
|
+
}
|
|
149
|
+
/** A selection in this replica's editor. @public */
|
|
150
|
+
interface CollaborationEditorSelection {
|
|
151
|
+
/** Where the selection starts: it stays put when the selection extends. */
|
|
152
|
+
readonly anchor: CollaborationEditorPosition;
|
|
153
|
+
/** Where the selection ends: the caret. */
|
|
154
|
+
readonly head: CollaborationEditorPosition;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* A position in this replica's editor tree. Unlike a stable paragraph id, which a remote
|
|
158
|
+
* change can rename on one replica, a node id names one paragraph of this editor. @public
|
|
159
|
+
*/
|
|
160
|
+
interface CollaborationEditorPosition {
|
|
161
|
+
/** The node id of the paragraph in this replica's editor tree. */
|
|
162
|
+
readonly nodeId: string;
|
|
163
|
+
/** A UTF-16 offset in the paragraph's text. */
|
|
164
|
+
readonly offset: number;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Optional replication session attached to an editor or headless automation host.
|
|
168
|
+
*
|
|
169
|
+
* Implementations own replication state only. The attached document port remains the authored
|
|
170
|
+
* authority for reads, layout, paint, and save.
|
|
171
|
+
*
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
interface EditorCollaborationSession {
|
|
175
|
+
/** The room's document id. An attached port must carry the same id. */
|
|
176
|
+
readonly documentId: string;
|
|
177
|
+
/** Unique identity for this attachment lifetime. It prevents operation ID reuse after reconnect. */
|
|
178
|
+
readonly sessionId: string;
|
|
179
|
+
/** The validated local identity. */
|
|
180
|
+
readonly identity: CollaborationIdentity;
|
|
181
|
+
/** Current lifecycle state. */
|
|
182
|
+
status(): CollaborationStatus;
|
|
183
|
+
/**
|
|
184
|
+
* Cached status, current reason, and last failure.
|
|
185
|
+
*
|
|
186
|
+
* Same reference until any of those values change. A host that mounts after a
|
|
187
|
+
* recovered error still reads {@link CollaborationStatusSnapshot.lastFailure}.
|
|
188
|
+
*/
|
|
189
|
+
statusSnapshot(): CollaborationStatusSnapshot;
|
|
190
|
+
/** Call `listener` on each status or reason change. Returns the unsubscribe function. */
|
|
191
|
+
subscribeStatus(listener: (status: CollaborationStatus, reason?: CollaborationFailureCode, detail?: string) => void): () => void;
|
|
192
|
+
/**
|
|
193
|
+
* Attach the editor's document port and start replicating. Returns the detach function.
|
|
194
|
+
* A second, different port moves the session to `error` with `port-already-attached`.
|
|
195
|
+
*/
|
|
196
|
+
attach(port: CollaborationDocumentPort): () => void;
|
|
197
|
+
/**
|
|
198
|
+
* Whether an editor has attached its document port to this replica.
|
|
199
|
+
*
|
|
200
|
+
* False means edits do not replicate, whatever `status()` says — the usual cause is a host
|
|
201
|
+
* that did not remount the editor when the session appeared, so `collaborationModule`
|
|
202
|
+
* never attached. That mistake used to be reachable only as a `console.warn`, which a
|
|
203
|
+
* production build discards; this is the same fact as a value a host can render.
|
|
204
|
+
*/
|
|
205
|
+
readonly attached: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Check whether `ops` may commit now. Returns `null` to admit them, or the refusal code.
|
|
208
|
+
* Call it before every store transaction a custom port commits.
|
|
209
|
+
*/
|
|
210
|
+
gateOperations(ops: readonly TreeDocOp[], scope: StoryScope): CollaborationFailureCode | null;
|
|
211
|
+
/** Whether the shared undo history holds a local step to undo. */
|
|
212
|
+
canUndo(): boolean;
|
|
213
|
+
/** Whether the shared undo history holds a local step to redo. */
|
|
214
|
+
canRedo(): boolean;
|
|
215
|
+
/** Undo this participant's last step; others' edits stay. Returns false when refused. */
|
|
216
|
+
undo(): boolean;
|
|
217
|
+
/** Redo this participant's last undone step. Returns false when refused. */
|
|
218
|
+
redo(): boolean;
|
|
219
|
+
/**
|
|
220
|
+
* The selection the last `undo` or `redo` restored: the one its author had before the
|
|
221
|
+
* undone change. Null when the step recorded none. Optional; a session without it leaves
|
|
222
|
+
* the editor to place the caret at the change.
|
|
223
|
+
*/
|
|
224
|
+
historySelection?(): CollaborationLocalSelection | null;
|
|
225
|
+
/**
|
|
226
|
+
* Where the last remote change carried the local selection, on the shared characters
|
|
227
|
+
* beside its endpoints, and the selection it was carried from, both in the editor's
|
|
228
|
+
* paragraph node ids. Null when the session could not carry it. Optional; without it the
|
|
229
|
+
* editor maps the selection by text.
|
|
230
|
+
*/
|
|
231
|
+
remoteSelectionMove?(): CollaborationSelectionMove | null;
|
|
232
|
+
/** Publish the local selection through presence. `null` clears it. */
|
|
233
|
+
setLocalSelection(selection: CollaborationLocalSelection | null): void;
|
|
234
|
+
/** Participants in presence, this replica included. Capped at 256. */
|
|
235
|
+
participants(): readonly CollaborationParticipant[];
|
|
236
|
+
/** Call `listener` when the participant list changes. Returns the unsubscribe function. */
|
|
237
|
+
subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
|
|
238
|
+
/** Other participants' selections, resolved into this replica's addresses. */
|
|
239
|
+
remoteSelections(): readonly CollaborationRemoteSelection[];
|
|
240
|
+
/** Call `listener` when a remote selection changes. Returns the unsubscribe function. */
|
|
241
|
+
subscribeRemoteSelections(listener: (selections: readonly CollaborationRemoteSelection[]) => void): () => void;
|
|
242
|
+
/**
|
|
243
|
+
* Publish queued local journals to shared state.
|
|
244
|
+
*
|
|
245
|
+
* Local typing does not wait for replication. Undo, destroy, and page hide call this
|
|
246
|
+
* so a queued journal is never dropped.
|
|
247
|
+
*/
|
|
248
|
+
flushPendingJournals(): void;
|
|
249
|
+
/** Stop replicating and release listeners. The status becomes `destroyed`. */
|
|
250
|
+
destroy(): void;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* What a collaboration module contributes: the replica the surface attaches.
|
|
254
|
+
*
|
|
255
|
+
* @public
|
|
256
|
+
*/
|
|
257
|
+
interface CollaborationModuleContribution {
|
|
258
|
+
/**
|
|
259
|
+
* A ready session. The host creates the Yjs room, then wraps it with
|
|
260
|
+
* `collaborationModule({ session })`.
|
|
261
|
+
*
|
|
262
|
+
* Core does not build a session from a document id: the opened package has
|
|
263
|
+
* no collaboration room identity. That identity is chosen before mount.
|
|
264
|
+
*/
|
|
265
|
+
readonly session: EditorCollaborationSession;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export { CollaborationFailureCode, CollaborationStatus, CollaborationStatusSnapshot, safeParticipantColor };
|
|
269
|
+
export type { CollaborationEditorPosition, CollaborationEditorSelection, CollaborationIdentity, CollaborationLocalSelection, CollaborationModuleContribution, CollaborationParticipant, CollaborationRemoteSelection, CollaborationRemoteSelectionAddress, CollaborationSelectionAddress, CollaborationSelectionKind, CollaborationSelectionMove, EditorCollaborationSession };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as safeParticipantColor}from'./chunk-6JIJOZDW.js';var C={"already-initialized":true,"authentication-failed":true,"baseline-digest-mismatch":true,"baseline-too-large":true,"blob-digest-mismatch":true,"blob-read":true,"blob-store-full":true,"blob-too-large":true,"collaboration-format-mismatch":true,"collaboration-session-destroyed":true,"collaboration-session-not-attached":true,"collaboration-session-not-ready":true,"collaboration-text-limit":true,"concurrent-seed":true,"document-id-mismatch":true,"duplicate-paragraph-id":true,"experimental-collaboration-body-text-only":true,"experimental-collaboration-existing-paragraphs-only":true,"experimental-collaboration-text-only":true,"experimental-collaboration-untracked-text-only":true,"immutable-baseline-changed":true,"immutable-metadata-changed":true,"initialization-aborted":true,"initialization-timeout":true,"invalid-baseline":true,"invalid-blob-descriptor":true,"invalid-bound":true,"invalid-document-id":true,"invalid-identity":true,"invalid-identity-color":true,"invalid-logical-id":true,"invalid-relationships":true,"invalid-saved-room":true,"invalid-session-id":true,"invalid-shared-metadata":true,"invalid-string":true,"local-mirror-failed":true,"materialize-dropped-content":true,"missing-blob":true,"missing-local-blob":true,"missing-root":true,"no-main-document-part":true,"not-initialized":true,"paragraph-set-mismatch":true,"port-already-attached":true,"protocol-version-mismatch":true,"prototype-key":true,"remote-apply-failed":true,"room-generation-changed":true,"saved-room-unavailable":true,"schema-version-mismatch":true,"shared-schema-invalid":true,"text-too-long":true,"too-many-attributes":true,"too-many-children":true,"too-many-nodes":true,"too-many-parts":true,"too-many-relationships":true,transport:true,"transport-disconnected":true,"tree-too-deep":true,"unknown-logical-id":true,"unknown-paragraph-id":true,"unsafe-part-name":true,"unsupported-root-key":true};function g(e){return Object.hasOwn(C,e)}function f(e,o){return e===o?true:!e||!o?false:e.code===o.code&&e.detail===o.detail}function h(e,o){return Object.freeze(o!==void 0&&o.length>0?{code:e,detail:o}:{code:e})}function S(e="initializing"){let o=e,a,l,s=0,r=false,i=false,d=Object.freeze({status:o,reason:a,lastFailure:l,failureCount:s,recovering:r,waiting:i}),u=()=>{d=Object.freeze({status:o,reason:a,lastFailure:l,failureCount:s,recovering:r,waiting:i});};return {status:()=>o,snapshot:()=>d,set(t,c,p,m=false){let n=c===void 0?void 0:h(c,p),b=t==="error"&&m;return o===t&&f(a,n)&&r===b?false:(o=t,a=n,r=b,t==="error"&&n&&(l=n,s+=1),u(),true)},setWaiting(t){return i===t?false:(i=t,u(),true)}}}export{S as createCollaborationStatusTracker,g as isCollaborationFailureCode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@docx-editor.dev/core/contracts/document` — the document-level edit and query vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* The subset that means something without a live editor: what an automation host or an LLM tool
|
|
5
|
+
* can ask for and change.
|
|
6
|
+
*
|
|
7
|
+
* A CONTRACT module, not a barrel. `contracts/editor` builds the `Editor` command and query
|
|
8
|
+
* surfaces on top of these, so they cannot live in the package root: the root re-exports
|
|
9
|
+
* runtime from `../editor`, and a contract importing the root would invert the dependency —
|
|
10
|
+
* safe today only because that import is type-only, and one accidental value import away from
|
|
11
|
+
* pulling the painted engine into a server bundle.
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
import { D as DocxDocument, E as ExecResult, i as ContentControlType, j as DocTarget, k as RunFormatting, l as Extent, I as InsertableContentControlType, m as ContainerRef, n as ContentControlFilter, o as DocRange, p as Revision, q as DocComment, S as StyleDefinitions } from '../types-barrel-D3xCgQX6.js';
|
|
17
|
+
export { B as Block, r as ColorValue, s as ContentControl, t as DocAnchor, u as DocAnchorRange, v as DocLocation, w as DocumentBody, x as ExecErrorCode, H as HeaderFooterSet, y as IndentFormatting, P as Paragraph, z as ParagraphFlags, A as ParagraphTabStop, F as RevisionType, G as Section, J as SectionProperties, K as StyleDefinition, T as Table, L as Theme, M as ThemeColorScheme } from '../types-barrel-D3xCgQX6.js';
|
|
18
|
+
import '../editor-scope-OHPwVQ5l.js';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* `@docx-editor.dev/core/contracts/document` — the document-level edit and query vocabulary.
|
|
22
|
+
*
|
|
23
|
+
* The subset that means something without a live editor: what an automation host or an LLM tool
|
|
24
|
+
* can ask for and change.
|
|
25
|
+
*
|
|
26
|
+
* A CONTRACT module, not a barrel. `contracts/editor` builds the `Editor` command and query
|
|
27
|
+
* surfaces on top of these, so they cannot live in the package root: the root re-exports
|
|
28
|
+
* runtime from `../editor`, and a contract importing the root would invert the dependency —
|
|
29
|
+
* safe today only because that import is type-only, and one accidental value import away from
|
|
30
|
+
* pulling the painted engine into a server bundle.
|
|
31
|
+
*
|
|
32
|
+
* @packageDocumentation
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The document-executable edit vocabulary.
|
|
38
|
+
*
|
|
39
|
+
* An interface rather than a closed union so extensions can widen it by
|
|
40
|
+
* declaration merging. A sealed union cannot be extended by a plugin, and the
|
|
41
|
+
* runtime dispatch is already registry-backed.
|
|
42
|
+
*/
|
|
43
|
+
interface DocEdits {
|
|
44
|
+
insertText: {
|
|
45
|
+
target: DocTarget;
|
|
46
|
+
text: string;
|
|
47
|
+
};
|
|
48
|
+
replaceText: {
|
|
49
|
+
target: DocTarget;
|
|
50
|
+
text: string;
|
|
51
|
+
};
|
|
52
|
+
deleteText: {
|
|
53
|
+
target: DocTarget;
|
|
54
|
+
};
|
|
55
|
+
applyFormatting: {
|
|
56
|
+
target: DocTarget;
|
|
57
|
+
marks: RunFormatting;
|
|
58
|
+
};
|
|
59
|
+
setParagraphStyle: {
|
|
60
|
+
target: DocTarget;
|
|
61
|
+
styleId: string;
|
|
62
|
+
};
|
|
63
|
+
insertTable: {
|
|
64
|
+
target: DocTarget;
|
|
65
|
+
rows: number;
|
|
66
|
+
cols: number;
|
|
67
|
+
};
|
|
68
|
+
insertImage: {
|
|
69
|
+
target: DocTarget;
|
|
70
|
+
data: Uint8Array;
|
|
71
|
+
extent?: Extent;
|
|
72
|
+
};
|
|
73
|
+
insertHyperlink: {
|
|
74
|
+
target: DocTarget;
|
|
75
|
+
href: string;
|
|
76
|
+
text?: string;
|
|
77
|
+
};
|
|
78
|
+
removeHyperlink: {
|
|
79
|
+
target: DocTarget;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* `'section'` is Word's Next Page break; `'sectionContinuous'` keeps the new section on
|
|
83
|
+
* the sheet the previous one ended, which is how a mid-page column or margin change is
|
|
84
|
+
* authored. `'column'` belongs to the multi-column lane and is refused for now.
|
|
85
|
+
*/
|
|
86
|
+
insertBreak: {
|
|
87
|
+
target: DocTarget;
|
|
88
|
+
kind: 'page' | 'column' | 'line' | 'section' | 'sectionContinuous';
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Word's Increase/Decrease Indent.
|
|
92
|
+
*
|
|
93
|
+
* A numbered or bulleted paragraph changes LEVEL, so its marker re-resolves from the
|
|
94
|
+
* numbering definition — a bullet becomes a hollow circle, a `1.` becomes an `a.`.
|
|
95
|
+
* Every other paragraph moves its left indent by one default tab stop.
|
|
96
|
+
*/
|
|
97
|
+
adjustIndent: {
|
|
98
|
+
target: DocTarget;
|
|
99
|
+
direction: 'increase' | 'decrease';
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Word's Bullets and Numbering.
|
|
103
|
+
*
|
|
104
|
+
* Turns the selection into a list, or takes it out of one when it already is. The
|
|
105
|
+
* definition is created on first use, `numbering.xml` included.
|
|
106
|
+
*/
|
|
107
|
+
toggleList: {
|
|
108
|
+
target: DocTarget;
|
|
109
|
+
kind: 'bullet' | 'ordered';
|
|
110
|
+
};
|
|
111
|
+
splitParagraph: {
|
|
112
|
+
target: DocTarget;
|
|
113
|
+
};
|
|
114
|
+
mergeParagraphs: {
|
|
115
|
+
target: DocTarget;
|
|
116
|
+
};
|
|
117
|
+
setVariable: {
|
|
118
|
+
name: string;
|
|
119
|
+
value: string;
|
|
120
|
+
};
|
|
121
|
+
applyVariables: {
|
|
122
|
+
values: Record<string, string>;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Authored family. `author` is required: tracked-ness is verb identity, not a
|
|
126
|
+
* boolean flag, so there is no global trackChanges toggle to forget.
|
|
127
|
+
*/
|
|
128
|
+
proposeReplacement: {
|
|
129
|
+
target: DocTarget;
|
|
130
|
+
replaceWith: string;
|
|
131
|
+
author: string;
|
|
132
|
+
};
|
|
133
|
+
proposeInsertion: {
|
|
134
|
+
target: DocTarget;
|
|
135
|
+
text: string;
|
|
136
|
+
author: string;
|
|
137
|
+
};
|
|
138
|
+
proposeDeletion: {
|
|
139
|
+
target: DocTarget;
|
|
140
|
+
author: string;
|
|
141
|
+
};
|
|
142
|
+
addComment: {
|
|
143
|
+
target: DocTarget;
|
|
144
|
+
text: string;
|
|
145
|
+
author: string;
|
|
146
|
+
};
|
|
147
|
+
replyComment: {
|
|
148
|
+
commentId: string;
|
|
149
|
+
text: string;
|
|
150
|
+
author: string;
|
|
151
|
+
};
|
|
152
|
+
resolveComment: {
|
|
153
|
+
commentId: string;
|
|
154
|
+
};
|
|
155
|
+
acceptRevision: {
|
|
156
|
+
id: number;
|
|
157
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
158
|
+
noteId?: number;
|
|
159
|
+
};
|
|
160
|
+
rejectRevision: {
|
|
161
|
+
id: number;
|
|
162
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
163
|
+
noteId?: number;
|
|
164
|
+
};
|
|
165
|
+
acceptAllRevisions: Record<never, never>;
|
|
166
|
+
rejectAllRevisions: Record<never, never>;
|
|
167
|
+
/**
|
|
168
|
+
* Author a NEW control over the addressed span.
|
|
169
|
+
*
|
|
170
|
+
* A RANGE becomes a wrapper around the characters that are already there. A COLLAPSED
|
|
171
|
+
* position inserts an empty control showing its type's prompt, which is Word's own gesture
|
|
172
|
+
* and the one a template host reaches for: the first character typed replaces the prompt
|
|
173
|
+
* whole, so nothing has to detect and undo text the caller never asked for.
|
|
174
|
+
*
|
|
175
|
+
* `title` is Word's `w:alias` — the label a user sees — and `tag` is `w:tag`, the
|
|
176
|
+
* machine-readable identity a host looks the control back up by. Named as the automation
|
|
177
|
+
* protocol names them, so a caller who reaches for both surfaces writes one vocabulary.
|
|
178
|
+
*
|
|
179
|
+
* One paragraph only. A control that starts in one paragraph and ends in another is a BLOCK
|
|
180
|
+
* wrapper over both, a different element than the inline one this authors — refused rather
|
|
181
|
+
* than guessed, so a caller learns which they asked for.
|
|
182
|
+
*/
|
|
183
|
+
insertContentControl: {
|
|
184
|
+
target: DocTarget;
|
|
185
|
+
subtype: InsertableContentControlType;
|
|
186
|
+
tag?: string;
|
|
187
|
+
title?: string;
|
|
188
|
+
};
|
|
189
|
+
setContentControlValue: {
|
|
190
|
+
target: DocTarget;
|
|
191
|
+
value: string;
|
|
192
|
+
};
|
|
193
|
+
removeContentControl: {
|
|
194
|
+
target: DocTarget;
|
|
195
|
+
};
|
|
196
|
+
addRepeatingSectionItem: {
|
|
197
|
+
target: DocTarget;
|
|
198
|
+
index?: number;
|
|
199
|
+
};
|
|
200
|
+
removeRepeatingSectionItem: {
|
|
201
|
+
target: DocTarget;
|
|
202
|
+
index: number;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* One edit, as a discriminated union derived from {@link DocEdits}.
|
|
207
|
+
*
|
|
208
|
+
* Adding a key to `DocEdits` — including by declaration merging from a plugin — widens this
|
|
209
|
+
* automatically, so the union never drifts from the vocabulary it is built out of.
|
|
210
|
+
*/
|
|
211
|
+
type DocEdit = {
|
|
212
|
+
[K in keyof DocEdits]: {
|
|
213
|
+
type: K;
|
|
214
|
+
} & DocEdits[K];
|
|
215
|
+
}[keyof DocEdits];
|
|
216
|
+
/**
|
|
217
|
+
* What applying a batch of edits produced: the new document, and a per-edit verdict.
|
|
218
|
+
*
|
|
219
|
+
* `results` is positionally aligned with the input, so an edit that failed is identified by its
|
|
220
|
+
* index rather than by anything the caller has to correlate.
|
|
221
|
+
*/
|
|
222
|
+
interface ApplyResult {
|
|
223
|
+
doc: DocxDocument;
|
|
224
|
+
/** One per edit, positionally aligned with the input. */
|
|
225
|
+
results: ExecResult[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The document-readable query vocabulary, keyed identically to {@link DocQueryResults}.
|
|
229
|
+
*
|
|
230
|
+
* An interface rather than a closed union for the same reason {@link DocEdits} is: an extension
|
|
231
|
+
* widens it by declaration merging, and the runtime dispatch is registry-backed.
|
|
232
|
+
*/
|
|
233
|
+
interface DocQueries {
|
|
234
|
+
paragraphs: {
|
|
235
|
+
container?: ContainerRef;
|
|
236
|
+
};
|
|
237
|
+
findText: {
|
|
238
|
+
text: string;
|
|
239
|
+
container?: ContainerRef;
|
|
240
|
+
};
|
|
241
|
+
contentControls: {
|
|
242
|
+
filter?: ContentControlFilter;
|
|
243
|
+
};
|
|
244
|
+
revisions: {
|
|
245
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
246
|
+
};
|
|
247
|
+
comments: {
|
|
248
|
+
resolved?: boolean;
|
|
249
|
+
};
|
|
250
|
+
styles: Record<never, never>;
|
|
251
|
+
variables: Record<never, never>;
|
|
252
|
+
}
|
|
253
|
+
/** One query, as a discriminated union derived from {@link DocQueries}. */
|
|
254
|
+
type DocQuery = {
|
|
255
|
+
[K in keyof DocQueries]: {
|
|
256
|
+
type: K;
|
|
257
|
+
} & DocQueries[K];
|
|
258
|
+
}[keyof DocQueries];
|
|
259
|
+
/** What each query returns. Keyed identically to `DocQueries`. */
|
|
260
|
+
interface DocQueryResults {
|
|
261
|
+
paragraphs: readonly ParagraphSummary[];
|
|
262
|
+
findText: readonly DocRange[];
|
|
263
|
+
contentControls: readonly ContentControlSummary[];
|
|
264
|
+
revisions: readonly Revision[];
|
|
265
|
+
comments: readonly DocComment[];
|
|
266
|
+
styles: StyleDefinitions;
|
|
267
|
+
variables: Readonly<Record<string, string>>;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A paragraph reduced to what a listing needs: its stable handle, its text, and its style.
|
|
271
|
+
*
|
|
272
|
+
* `paraId` is what a follow-up edit addresses, so a summary without one names a paragraph the
|
|
273
|
+
* file gave no `w14:paraId` and that a `DocAnchor` cannot reach.
|
|
274
|
+
*/
|
|
275
|
+
interface ParagraphSummary {
|
|
276
|
+
readonly paraId?: string;
|
|
277
|
+
readonly text: string;
|
|
278
|
+
readonly styleId?: string;
|
|
279
|
+
}
|
|
280
|
+
/** A content control reduced to what a listing needs: its identity, kind, and lock state. */
|
|
281
|
+
interface ContentControlSummary {
|
|
282
|
+
readonly id: string;
|
|
283
|
+
readonly tag?: string;
|
|
284
|
+
readonly alias?: string;
|
|
285
|
+
readonly controlType: ContentControlType;
|
|
286
|
+
readonly locked?: boolean;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export { ContainerRef, ContentControlFilter, ContentControlType, DocComment, DocRange, DocTarget, DocxDocument, ExecResult, Extent, InsertableContentControlType, Revision, RunFormatting, StyleDefinitions };
|
|
290
|
+
export type { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkUKVVUHZL_cjs=require('../chunk-UKVVUHZL.cjs');Object.defineProperty(exports,"EditorFontError",{enumerable:true,get:function(){return chunkUKVVUHZL_cjs.a}});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@docx-editor.dev/core/contracts/editor` — the `Editor` contract adapters are written against.
|
|
3
|
+
*
|
|
4
|
+
* Commands go through `can` before `exec`; queries answer against the live, laid-out document.
|
|
5
|
+
* Type-only declarations let adapters name the surface without importing the engine.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export { a as ReviewDisplayMode } from '../revision-projection-DZ4kKVev.js';
|
|
11
|
+
import '../review-pane-D9jm8DcY.js';
|
|
12
|
+
export { h as AnchorHighlightAnimation, A as AnchorHighlightOptions, L as AuthoredNoteNumbering, C as CanResult, f as ClearAnchorHighlightOptions, M as DocumentChange, N as DocumentEditingMode, O as DocumentHandle, D as DocumentSource, i as Editor, P as EditorAnchorNavigation, e as EditorCommand, Q as EditorCommandShape, U as EditorCommands, V as EditorError, W as EditorEvents, E as EditorFontError, X as EditorFontErrorCode, Y as EditorFormatPainterCommands, _ as EditorHeaderFooterCommands, $ as EditorHighlights, a0 as EditorNoteCommands, a1 as EditorPosition, a2 as EditorQueries, a3 as EditorQuery, a4 as EditorQueryResults, a5 as EditorReviewHits, a6 as EditorSelection, d as EditorSnapshot, a as FontConfiguration, F as FontFaceRequest, b as FontSource, c as FontSourceSubstitution, a7 as FormatPainterLevel, a8 as FormatPainterMode, z as FormatPainterSurfaceState, a9 as FurnitureVariant, aa as HeaderFooterSlotArgs, ab as HeaderFooterState, l as HighlightHit, k as HighlightOptions, H as HighlightRange, m as HighlightRect, j as HighlightResult, ac as HyperlinkInfo, I as ImageContext, n as ImageCropPercent, ad as NoteKind, ae as NotePropertiesSide, af as NotePropertiesState, ag as PageSetup, ah as ResolveReviewChangesOptions, ai as ResolvedNoteNumbering, aj as ReviewActivationOptions, ak as ReviewChangesAttribution, al as ReviewCommentPlacement, am as ReviewCustomPlacement, R as ReviewItemHit, an as ReviewItemPlacement, ao as ReviewItemPlacementBase, ap as ReviewItemQuery, aq as ReviewItemRevealEvent, ar as ReviewItemRevealSource, as as ReviewRevisionPlacement, g as ScrollPlacement, S as ScrollToAnchorOptions, p as SelectedImageState, at as SetReviewChangesAuthorOptions, B as TableBorderEdgeTarget, G as TableBorderSpec, J as TableBorderStyle, au as TableBorderTarget, av as TableCellVerticalAlignment, aw as TableColumnDividerResizeTarget, ax as TableColumnOccurrenceTarget, K as TableContext, ay as TableRightEdgeResizeTarget, az as TableRowOccurrenceTarget, T as TextMatch, q as TrackedChangeFilterMode, r as TrackedChangePredicate, aA as ZoomFitTarget, Z as ZoomMode } from '../editor-Ci7IZGmG.js';
|
|
13
|
+
export { B as Block, r as ColorValue, C as CommentRecord, m as ContainerRef, s as ContentControl, n as ContentControlFilter, i as ContentControlType, t as DocAnchor, u as DocAnchorRange, q as DocComment, v as DocLocation, o as DocRange, j as DocTarget, w as DocumentBody, D as DocxDocument, av as DocxDocumentJSON, aw as DrawingHorizontalReferenceFrame, am as DrawingKind, ap as DrawingLocks, ao as DrawingPositionInput, ax as DrawingVerticalReferenceFrame, x as ExecErrorCode, E as ExecResult, l as Extent, ay as FontDefinition, H as HeaderFooterSet, an as ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType, az as NumberingRef, aA as PageMargins, P as Paragraph, aB as ParagraphDisagreements, z as ParagraphFlags, aq as ParagraphFormatCommand, A as ParagraphTabStop, aC as Point, as as Rect, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, p as Revision, h as RevisionAddress, a3 as RevisionAuthorResult, a6 as RevisionBatchResult, F as RevisionType, aD as Run, k as RunFormatting, G as Section, J as SectionProperties, at as SelectionPin, K as StyleDefinition, S as StyleDefinitions, T as Table, aE as TableCell, aF as TableRow, L as Theme, M as ThemeColorScheme, au as Unsubscribe, ar as Watermark } from '../types-barrel-D3xCgQX6.js';
|
|
14
|
+
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.js';
|
|
15
|
+
export { b as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, a as HistoryGroup, c as HistoryGroupOutcome, V as ViewScope } from '../editor-scope-OHPwVQ5l.js';
|
|
16
|
+
export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './interaction.js';
|
|
17
|
+
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-CIC-PooQ.js';
|
|
18
|
+
export { b as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, c as VectorImageMime } from '../image-resources-BN-hUgCn.js';
|
|
19
|
+
import '../document-protection-BAGVGqaP.js';
|
|
20
|
+
import '../failure-NS2lsya4.js';
|
|
21
|
+
import '../semantic-records-4B3WwFAi.js';
|
|
22
|
+
import '../omml-equation-CuzBL5DD.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as EditorFontError}from'../chunk-S6J4O5XP.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|