@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,326 @@
|
|
|
1
|
+
import { d as ResolvedRevisionMarkup } from './revision-projection-DZ4kKVev.js';
|
|
2
|
+
import { a as PageRecord, C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-4B3WwFAi.js';
|
|
3
|
+
import { S as SemanticRootStoryKind } from './semantic-record-queries-CBlZqZNa.js';
|
|
4
|
+
import { V as ValidatedImageBytesHandle, R as RenderableImageMime } from './image-resources-BN-hUgCn.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Everything a host can say about ONE author's presentation. Every field is optional and
|
|
8
|
+
* every field is presentation-only — nothing here is ever serialised into the document.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately about the PAINTED DOCUMENT (which only the painter can style) plus the
|
|
11
|
+
* author's identity data. Review-card DESIGN is not configured here: the review chrome
|
|
12
|
+
* follows `color` as its accent automatically, and everything further is composition —
|
|
13
|
+
* a custom card reading this style through the review surface's `useReviewAuthor`, or
|
|
14
|
+
* CSS on the cards' `data-review-author`/`data-review-author-slot` hooks.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
interface RevisionAuthorStyle {
|
|
19
|
+
/**
|
|
20
|
+
* Ink and decoration colour of this author's changes in the document — and the accent
|
|
21
|
+
* the review chrome keys on (avatar disc, card variable, marker).
|
|
22
|
+
*/
|
|
23
|
+
color?: string;
|
|
24
|
+
/** Background wash behind this author's changes in the document. */
|
|
25
|
+
background?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Background of the highlight band over this author's OPEN change — the one the caret
|
|
28
|
+
* is in. Applied inline, so it outranks the `--doc-revision-*-active-bg` kind tokens,
|
|
29
|
+
* and the kind-coloured rule under the band goes with it: a custom background with a
|
|
30
|
+
* green or red rule beneath it would contradict the decoration it sits behind, and a
|
|
31
|
+
* `transparent` that left a floating rule would not read as cleared at all.
|
|
32
|
+
*/
|
|
33
|
+
activeBackground?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Class names added to every painted span of this author's changes, for styling the
|
|
36
|
+
* typed fields do not cover. Keep the rules metric-safe (outlines, shadows, accents):
|
|
37
|
+
* the engine measures the text it paints, and a class that resizes glyphs drifts the
|
|
38
|
+
* page from its layout.
|
|
39
|
+
*/
|
|
40
|
+
spanClassName?: string;
|
|
41
|
+
/** Avatar image for this author; the packaged card renders it in place of initials. */
|
|
42
|
+
avatarUrl?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Per-author style assignments.
|
|
46
|
+
*
|
|
47
|
+
* Keys match `w:author` exactly; a value is a CSS colour or a full
|
|
48
|
+
* {@link RevisionAuthorStyle}. `others` says what authors WITHOUT an entry take: the
|
|
49
|
+
* `--doc-review-author-N` ramp by default, or `'kind'` to leave them on the kind colours —
|
|
50
|
+
* which is how "highlight these reviewers, leave everyone else green and red" is said.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
interface RevisionAuthorAssignments {
|
|
55
|
+
/** Authors without an entry: the ramp (default), or the `'kind'` colours. */
|
|
56
|
+
readonly others?: 'kind' | 'author';
|
|
57
|
+
readonly authors: Readonly<Record<string, string | RevisionAuthorStyle>>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* How painted tracked changes are coloured.
|
|
61
|
+
*
|
|
62
|
+
* - `'author'` (the DEFAULT) — every change takes its author's colour from the
|
|
63
|
+
* `--doc-review-author-N` ramp. An attached document seeds slots by order of first
|
|
64
|
+
* appearance, then keeps those assignments stable for that session. Word's own default,
|
|
65
|
+
* and the reason it is this engine's: a paragraph three people edited has to read as three
|
|
66
|
+
* people. Restyle a slot under `.docx-editor` to change the ramp.
|
|
67
|
+
* - `'kind'` — insertions and deletions take the two kind colours
|
|
68
|
+
* (`--doc-revision-insertion` / `--doc-revision-deletion`), so "added" and "removed" are
|
|
69
|
+
* what a reader tells apart at a glance, whoever proposed them.
|
|
70
|
+
* - {@link RevisionAuthorAssignments} — style the named authors; `others` decides whether
|
|
71
|
+
* the rest take the ramp (the default) or the kind colours.
|
|
72
|
+
*
|
|
73
|
+
* Presentation only: nothing here is ever serialised into the document.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
type RevisionStyles = 'kind' | 'author' | RevisionAuthorAssignments;
|
|
78
|
+
/**
|
|
79
|
+
* One document author, resolved: who, which ramp slot, and what they draw in.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
interface ReviewAuthorInfo {
|
|
84
|
+
/** The `w:author` string, exactly as the file carries it. */
|
|
85
|
+
readonly author: string;
|
|
86
|
+
/**
|
|
87
|
+
* Stable session rank, seeded by order of first appearance — an UNBOUNDED index.
|
|
88
|
+
*
|
|
89
|
+
* The ramp defines {@link REVIEW_AUTHOR_SLOTS} colours and every DOM hook wraps into it,
|
|
90
|
+
* so the ninth author ranks 8 here and carries `data-review-author-slot="0"`. Building a
|
|
91
|
+
* selector from this value needs the same wrap: `slot % 8`.
|
|
92
|
+
*/
|
|
93
|
+
readonly slot: number;
|
|
94
|
+
/**
|
|
95
|
+
* The colour this author is DRAWN IN by the review chrome — their declared colour, or
|
|
96
|
+
* their ramp slot's token.
|
|
97
|
+
*
|
|
98
|
+
* Not necessarily what the document paints. `'kind'`, and `others: 'kind'` for an author
|
|
99
|
+
* with no declaration, colour the painted text by insertion/deletion instead, while the
|
|
100
|
+
* cards keep the per-author accent this reports.
|
|
101
|
+
*/
|
|
102
|
+
readonly color: string;
|
|
103
|
+
/** The host-supplied style, normalised; absent when the author rides the ramp. */
|
|
104
|
+
readonly style?: RevisionAuthorStyle;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The resolved form the painter consumes: the document's author→slot map, the host's
|
|
108
|
+
* per-author styles, what UNSTYLED authors take, and the paint-reuse key for all of it.
|
|
109
|
+
* `null` means the default kind colouring for everyone.
|
|
110
|
+
*/
|
|
111
|
+
interface RevisionStyleContext {
|
|
112
|
+
readonly authorSlots: ReadonlyMap<string, number>;
|
|
113
|
+
readonly styles: ReadonlyMap<string, RevisionAuthorStyle>;
|
|
114
|
+
/** `spanClassName` pre-split into tokens, so paint does not split per span. */
|
|
115
|
+
readonly classTokens: ReadonlyMap<string, readonly string[]>;
|
|
116
|
+
/** Authors without a style: `'kind'` colours, or the ramp. */
|
|
117
|
+
readonly others: 'kind' | 'author';
|
|
118
|
+
/** See {@link revisionStyleContextKey}. Computed once, with the context. */
|
|
119
|
+
readonly key: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Host port for safe blob URLs — only called for {@link ImageResourceState.kind} `ready`. */
|
|
123
|
+
interface PaintImageUrlPort {
|
|
124
|
+
create(handle: ValidatedImageBytesHandle, mime: RenderableImageMime): string;
|
|
125
|
+
revoke(url: string): void;
|
|
126
|
+
}
|
|
127
|
+
/** Localized refusal labels; adapters supply i18n-backed implementations. */
|
|
128
|
+
interface DrawingPaintStrings {
|
|
129
|
+
readonly unsupportedFormat: (format: string) => string;
|
|
130
|
+
readonly nonPictureGraphic: (kind: string) => string;
|
|
131
|
+
readonly missingResource: string;
|
|
132
|
+
readonly externalResource: string;
|
|
133
|
+
readonly invalidResource: string;
|
|
134
|
+
readonly contentMismatch: string;
|
|
135
|
+
readonly decodeFailed: string;
|
|
136
|
+
readonly resourceLimit: string;
|
|
137
|
+
readonly pendingResource: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Which bars a paint draws. @public */
|
|
141
|
+
type ChangeBarsMode = 'all-markup' | 'simple-markup' | 'none';
|
|
142
|
+
/** Which story a bar stands beside; the header-editing chrome dims every other story's. */
|
|
143
|
+
type BarStory = Exclude<SemanticRootStoryKind, 'note-separator'>;
|
|
144
|
+
/** One rule in sheet coordinates (points from the page's top-left corner). */
|
|
145
|
+
interface BarRun {
|
|
146
|
+
author?: string;
|
|
147
|
+
color?: string;
|
|
148
|
+
top: number;
|
|
149
|
+
bottom: number;
|
|
150
|
+
story: BarStory;
|
|
151
|
+
insertion: boolean;
|
|
152
|
+
deletion: boolean;
|
|
153
|
+
format: boolean;
|
|
154
|
+
}
|
|
155
|
+
/** Page change bars in page coordinates. @public */
|
|
156
|
+
interface PageChangeBars {
|
|
157
|
+
readonly mode: ChangeBarsMode;
|
|
158
|
+
readonly color?: string;
|
|
159
|
+
/** Whether the bars take the pointer as Word's toggle. */
|
|
160
|
+
readonly toggle: boolean;
|
|
161
|
+
/** Sheet-relative x of the column, already scaled and snapped to a whole pixel. */
|
|
162
|
+
readonly left: number;
|
|
163
|
+
readonly runs: readonly BarRun[];
|
|
164
|
+
/** Cheap identity of `left` + `runs`, for the block-adoption path to compare. */
|
|
165
|
+
readonly signature: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The rules one page needs, in sheet coordinates: every root story the page paints, the
|
|
169
|
+
* blocks of each (tracked rows and rotated cells included), and the text-box stories its
|
|
170
|
+
* anchored drawings carry, each at the origin the painter places it at.
|
|
171
|
+
* @public
|
|
172
|
+
*/
|
|
173
|
+
declare function collectPageChangeBars(page: PageRecord, scale: number, mode: ChangeBarsMode, toggle?: boolean, markup?: ResolvedRevisionMarkup, facingPages?: boolean, colors?: RevisionStyleContext): PageChangeBars;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* When a field's result is drawn on its grey block, following Word's own View option.
|
|
177
|
+
*
|
|
178
|
+
* `when-selected` is Word's default and the reason the option exists at all: a document dense
|
|
179
|
+
* with cross-references turns largely grey under `always`, and under `never` a reader cannot
|
|
180
|
+
* tell computed text from typed text at all.
|
|
181
|
+
*/
|
|
182
|
+
type FieldShadingMode = 'never' | 'when-selected' | 'always';
|
|
183
|
+
/** Word's default: shaded only while the caret is inside the field. */
|
|
184
|
+
declare const DEFAULT_FIELD_SHADING: FieldShadingMode;
|
|
185
|
+
/**
|
|
186
|
+
* How a layout is painted into DOM. Every field is optional.
|
|
187
|
+
*
|
|
188
|
+
* The painted pages ARE the editable surface, so everything here is presentation-only — nothing
|
|
189
|
+
* set through these options is ever serialised back into the document.
|
|
190
|
+
*/
|
|
191
|
+
interface PaintOptions {
|
|
192
|
+
/** Points to CSS pixels. 96/72 renders a point as a CSS point at 100% zoom. */
|
|
193
|
+
readonly scale?: number;
|
|
194
|
+
/** Generated paragraphs that paint as non-editable navigation surfaces. */
|
|
195
|
+
readonly readOnlyParagraphIds?: ReadonlySet<string>;
|
|
196
|
+
/**
|
|
197
|
+
* Empty-TOC begin paragraphs that paint subtle identifiable furniture. Paint-only — never
|
|
198
|
+
* serialised into the document.
|
|
199
|
+
*/
|
|
200
|
+
readonly emptyTocPlaceholderIds?: ReadonlySet<string>;
|
|
201
|
+
/** Marks painted pages as presentational, so assistive tech reads the editable projection. */
|
|
202
|
+
readonly ariaHidden?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Page indices to build in detail (task 9.4).
|
|
205
|
+
*
|
|
206
|
+
* Omitted means all of them. A page left out keeps its size and position but no content,
|
|
207
|
+
* so the document's height and page count are unchanged and scrolling to it reveals it
|
|
208
|
+
* instead of reflowing everything underneath.
|
|
209
|
+
*/
|
|
210
|
+
readonly materialize?: ReadonlySet<number>;
|
|
211
|
+
/**
|
|
212
|
+
* Family-alias lookup for fonts the host registered on behalf of THIS document (see
|
|
213
|
+
* {@link PaintContext.fontAlias}). Painted runs emit the alias ahead of the declared
|
|
214
|
+
* family, so a file can never shadow a family name the host page uses.
|
|
215
|
+
*/
|
|
216
|
+
readonly fontAlias?: (family: string) => string | undefined;
|
|
217
|
+
/** See {@link PaintContext.defaultFontFamily}. */
|
|
218
|
+
readonly defaultFontFamily?: string;
|
|
219
|
+
/** See {@link PaintContext.fieldShading}. */
|
|
220
|
+
readonly fieldShading?: FieldShadingMode;
|
|
221
|
+
/** Paint paragraph-end and manual-line-break furniture. Tracked marks also follow Show/Hide. */
|
|
222
|
+
readonly showParagraphMarks?: boolean;
|
|
223
|
+
/** See {@link PaintContext.shadeFormFields}. */
|
|
224
|
+
readonly shadeFormFields?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* How tracked changes are coloured: by AUTHOR through the `--doc-review-author-N`
|
|
227
|
+
* ramp (the default, as in Word), by kind, or by author with host-pinned colours.
|
|
228
|
+
* See {@link RevisionStyles}.
|
|
229
|
+
*/
|
|
230
|
+
readonly revisionStyles?: RevisionStyles;
|
|
231
|
+
readonly revisionMarkup?: ResolvedRevisionMarkup;
|
|
232
|
+
readonly revisionKindColors?: boolean;
|
|
233
|
+
readonly facingPages?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Which change bars the margin draws: All Markup's neutral rule beside attributed lines
|
|
236
|
+
* (the default, whatever the layout's projection — a layout that carries attribution gets
|
|
237
|
+
* its bars), Simple Markup's red rule beside the change sites a resolved layout published,
|
|
238
|
+
* or none, which the review chrome names for its resolved views.
|
|
239
|
+
*/
|
|
240
|
+
readonly changeBars?: ChangeBarsMode;
|
|
241
|
+
/**
|
|
242
|
+
* Whether a change bar takes the pointer as Word's does — a click swaps Simple and All
|
|
243
|
+
* Markup. Only a host that can act on the press should set it; the bars stay inert
|
|
244
|
+
* furniture otherwise.
|
|
245
|
+
*/
|
|
246
|
+
readonly changeBarsToggle?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Relationship id of the header/footer story currently open for editing.
|
|
249
|
+
*
|
|
250
|
+
* When set, the matching `[data-docx-hf]` container is editable and every body
|
|
251
|
+
* `.docx-page-content` box is inert; all other furniture stays read-only.
|
|
252
|
+
*
|
|
253
|
+
* Deliberately OUTSIDE the paint-reuse key: entering a header must not rebuild
|
|
254
|
+
* body sheets. Chrome is applied to already-painted nodes in place, the way TOC
|
|
255
|
+
* hover is.
|
|
256
|
+
*/
|
|
257
|
+
readonly activeHeaderFooterRId?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Sheet that hosts the active visual occurrence of a shared furniture part.
|
|
260
|
+
*
|
|
261
|
+
* Required with {@link activeHeaderFooterRId} so only one painted copy receives
|
|
262
|
+
* `data-docx-hf-active` / the engine caret when the same rId appears on many pages.
|
|
263
|
+
* Also outside the paint-reuse key — moving the caret across shared copies retints
|
|
264
|
+
* markers in place rather than replacing every page.
|
|
265
|
+
*/
|
|
266
|
+
readonly activeHeaderFooterPageIndex?: number;
|
|
267
|
+
/**
|
|
268
|
+
* On-demand content-control boundary chrome (show-all and/or caret-entry).
|
|
269
|
+
*
|
|
270
|
+
* Furniture only — never contributes layout records or changes page geometry. Omitted or
|
|
271
|
+
* empty means no control chrome is painted. Folded into the paint-reuse key so a toggle
|
|
272
|
+
* rebuilds furniture without a layout pass.
|
|
273
|
+
*/
|
|
274
|
+
readonly contentControlChrome?: {
|
|
275
|
+
readonly showAll?: boolean;
|
|
276
|
+
/** Control ids whose boundaries are visible because the caret is inside them. */
|
|
277
|
+
readonly activeIds?: ReadonlySet<string>;
|
|
278
|
+
/**
|
|
279
|
+
* Control ids whose boundaries are visible because the pointer is over them.
|
|
280
|
+
* Used for TOC hover chrome without projecting a persistent caret-active state.
|
|
281
|
+
*
|
|
282
|
+
* Deliberately OUTSIDE the paint-reuse key: hover must never rebuild a page. The
|
|
283
|
+
* surface toggles `data-hover` / `data-boundary-visible` on the painted chrome it
|
|
284
|
+
* already has, and this set only tells a page that rebuilds for some OTHER reason
|
|
285
|
+
* which of its controls is currently under the pointer.
|
|
286
|
+
*/
|
|
287
|
+
readonly hoverIds?: ReadonlySet<string>;
|
|
288
|
+
/**
|
|
289
|
+
* Control ids whose boundary furniture is painted by something else.
|
|
290
|
+
*
|
|
291
|
+
* An empty TOC paints its own placeholder box on the begin paragraph, so drawing the
|
|
292
|
+
* control boundary as well left two rounded rectangles (of different heights) plus a
|
|
293
|
+
* label chip stacked over one empty region.
|
|
294
|
+
*/
|
|
295
|
+
readonly suppressedIds?: ReadonlySet<string>;
|
|
296
|
+
/** Checkbox control ids whose canonical `w14:checked` state is on. */
|
|
297
|
+
readonly checkedIds?: ReadonlySet<string>;
|
|
298
|
+
/** Non-SDT structured regions that intentionally reuse content-control chrome. */
|
|
299
|
+
readonly additionalBoundaries?: readonly ContentControlBoundaryRecord[];
|
|
300
|
+
/** Control ids that represent TOC regions (hover-only chrome; never caret-sticky). */
|
|
301
|
+
readonly tocControlIds?: ReadonlySet<string>;
|
|
302
|
+
/**
|
|
303
|
+
* No control may be written right now — viewing mode, or a protected document.
|
|
304
|
+
*
|
|
305
|
+
* The widget is a `<button>` the ENGINE paints, and a click on it commits a tree op, so
|
|
306
|
+
* an enabled-looking checkbox on a read-only document is not a cosmetic lie: it is the
|
|
307
|
+
* write itself. Disabling it here also stops the pointer lane, which already skips a
|
|
308
|
+
* widget carrying `data-disabled-reason`.
|
|
309
|
+
*/
|
|
310
|
+
readonly readOnly?: boolean;
|
|
311
|
+
};
|
|
312
|
+
readonly drawingStrings?: DrawingPaintStrings;
|
|
313
|
+
readonly imageUrlPort?: PaintImageUrlPort;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Paint a whole layout into a container, reusing the pages that did not change.
|
|
318
|
+
*
|
|
319
|
+
* The DOM is built with `createElement` and `textContent` only — no file-derived string is
|
|
320
|
+
* ever parsed as markup — and stray children (nothing this module painted) are removed, so
|
|
321
|
+
* the container's content is always exactly the painted pages.
|
|
322
|
+
*/
|
|
323
|
+
declare function paintSemanticLayout(container: HTMLElement, layout: SemanticLayout, options?: PaintOptions): void;
|
|
324
|
+
|
|
325
|
+
export { DEFAULT_FIELD_SHADING as D, collectPageChangeBars as e, paintSemanticLayout as p };
|
|
326
|
+
export type { ChangeBarsMode as C, FieldShadingMode as F, PageChangeBars as P, ReviewAuthorInfo as R, PaintOptions as a, RevisionAuthorAssignments as b, RevisionAuthorStyle as c, RevisionStyles as d, DrawingPaintStrings as f };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { I as InlineDrawingRecord, A as AnchoredDrawingRecord, P as ParagraphFragmentRecord, L as LineRecord, a as PageRecord, N as NoteAreaRecord, b as LayoutBox, H as HeaderFooterStoryRecord, c as NoteStoryRecord, B as BlockFragmentRecord, S as SemanticLayout, C as ContentControlBoundaryRecord, d as ContentControlLock } from './semantic-records-4B3WwFAi.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Depth-first paragraph fragments of one page, in reading order.
|
|
5
|
+
*
|
|
6
|
+
* Table interiors flatten through rows and cells; header-repeat rows are skipped unless
|
|
7
|
+
* asked for, so interaction sees each caret stop exactly once while paint sees everything.
|
|
8
|
+
*/
|
|
9
|
+
declare function paragraphFragmentsOf(page: PageRecord, includeHeaderRepeats?: boolean): ParagraphFragmentRecord[];
|
|
10
|
+
declare function paragraphFragmentsOfBlocks(blocks: readonly BlockFragmentRecord[], includeHeaderRepeats?: boolean): ParagraphFragmentRecord[];
|
|
11
|
+
/** Every line in a layout, in reading order — the order caret navigation walks. */
|
|
12
|
+
declare function linesOf(layout: SemanticLayout): LineRecord[];
|
|
13
|
+
/** The fragment-plus-anchored-drawings shape every laid-out story shares. */
|
|
14
|
+
interface StoryDrawingHost {
|
|
15
|
+
/** Root story fragments in their published reading order. */
|
|
16
|
+
readonly fragments: readonly BlockFragmentRecord[];
|
|
17
|
+
/** Story-level positioned drawings, when that story supports anchors. */
|
|
18
|
+
readonly anchoredDrawings?: readonly AnchoredDrawingRecord[];
|
|
19
|
+
}
|
|
20
|
+
/** Root story kinds published directly from one page record. @public */
|
|
21
|
+
type SemanticRootStoryKind = 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'note-separator';
|
|
22
|
+
/** Story containing a visited semantic record. @public */
|
|
23
|
+
type SemanticStoryKind = SemanticRootStoryKind | 'textbox';
|
|
24
|
+
/**
|
|
25
|
+
* One root story in the engine's complete published page/story order.
|
|
26
|
+
*
|
|
27
|
+
* The story discriminant preserves the precise published host type so exporters can consume
|
|
28
|
+
* furniture and note metadata without casting or searching the page graph a second time.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
type SemanticStoryVisit = {
|
|
32
|
+
readonly page: PageRecord;
|
|
33
|
+
readonly story: 'body';
|
|
34
|
+
readonly host: PageRecord;
|
|
35
|
+
/** Absolute story bounds; body records are relative to the page content box. */
|
|
36
|
+
readonly box: LayoutBox;
|
|
37
|
+
/** Absolute origin to add to story-relative fragment and drawing coordinates. */
|
|
38
|
+
readonly origin: Readonly<{
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
}>;
|
|
42
|
+
readonly noteScopeId: null;
|
|
43
|
+
readonly noteAreaKind: null;
|
|
44
|
+
} | {
|
|
45
|
+
readonly page: PageRecord;
|
|
46
|
+
readonly story: 'header' | 'footer';
|
|
47
|
+
readonly host: HeaderFooterStoryRecord;
|
|
48
|
+
readonly box: LayoutBox;
|
|
49
|
+
readonly origin: Readonly<{
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
}>;
|
|
53
|
+
readonly noteScopeId: null;
|
|
54
|
+
readonly noteAreaKind: null;
|
|
55
|
+
} | {
|
|
56
|
+
readonly page: PageRecord;
|
|
57
|
+
readonly story: 'footnote' | 'endnote';
|
|
58
|
+
readonly host: NoteStoryRecord;
|
|
59
|
+
readonly box: LayoutBox;
|
|
60
|
+
readonly origin: Readonly<{
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
}>;
|
|
64
|
+
readonly noteScopeId: string;
|
|
65
|
+
readonly noteAreaKind: NoteAreaRecord['kind'];
|
|
66
|
+
} | {
|
|
67
|
+
readonly page: PageRecord;
|
|
68
|
+
readonly story: 'note-separator';
|
|
69
|
+
readonly host: NonNullable<NoteAreaRecord['separator']>;
|
|
70
|
+
readonly box: LayoutBox;
|
|
71
|
+
readonly origin: Readonly<{
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
}>;
|
|
75
|
+
readonly noteScopeId: null;
|
|
76
|
+
readonly noteAreaKind: NoteAreaRecord['kind'];
|
|
77
|
+
};
|
|
78
|
+
/** Visit every root story in a semantic layout, preserving page/story order. @public */
|
|
79
|
+
declare function forEachSemanticStory(layout: SemanticLayout, visit: (story: SemanticStoryVisit) => void): void;
|
|
80
|
+
/** Location of one paragraph fragment within a recursively painted story graph. @public */
|
|
81
|
+
interface StoryParagraphFragmentContext {
|
|
82
|
+
/** Absolute origin of the immediate story containing this record. */
|
|
83
|
+
readonly storyOrigin: Readonly<{
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
}>;
|
|
87
|
+
/** Zero for the supplied story; increments for every textbox boundary. */
|
|
88
|
+
readonly textboxDepth: number;
|
|
89
|
+
/** Drawing whose textbox directly owns this fragment, or null for the root story. */
|
|
90
|
+
readonly textboxOwner: TextboxOwnerRecord | null;
|
|
91
|
+
/** Root-to-leaf owning drawings, empty for the supplied story. */
|
|
92
|
+
readonly textboxPath: readonly TextboxOwnerRecord[];
|
|
93
|
+
}
|
|
94
|
+
/** A drawing that owns a text-box story: anchored, or inline on a line. @public */
|
|
95
|
+
type TextboxOwnerRecord = InlineDrawingRecord | AnchoredDrawingRecord;
|
|
96
|
+
/** Location of one drawing within a recursively painted story graph. @public */
|
|
97
|
+
interface StoryDrawingContext extends StoryParagraphFragmentContext {
|
|
98
|
+
/** Enclosing paragraph for an inline drawing; null for a story-level anchor. */
|
|
99
|
+
readonly paragraph: ParagraphFragmentRecord | null;
|
|
100
|
+
/** Enclosing line for an inline drawing; null for a story-level anchor. */
|
|
101
|
+
readonly line: LineRecord | null;
|
|
102
|
+
}
|
|
103
|
+
type RootDrawingOrigin = (drawing: AnchoredDrawingRecord) => Readonly<{
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
}>;
|
|
107
|
+
/** Drawing layer relative to its owning story's text. @public */
|
|
108
|
+
type SemanticDrawingLayer = 'behind-text' | 'inline' | 'in-front-of-text';
|
|
109
|
+
/**
|
|
110
|
+
* One drawing in bounded graph-enumeration order with exporter-grade provenance.
|
|
111
|
+
*
|
|
112
|
+
* Enumeration is deliberately not paint order: story anchors (and nested textboxes) are visited
|
|
113
|
+
* before inline line drawings. Renderers use `paintLayer` plus record geometry to compose layers.
|
|
114
|
+
* @public
|
|
115
|
+
*/
|
|
116
|
+
interface SemanticDrawingVisit extends StoryDrawingContext {
|
|
117
|
+
/** Physical page carrying this drawing occurrence. */
|
|
118
|
+
readonly page: PageRecord;
|
|
119
|
+
/** Immediate story classification; `textbox` after textbox descent. */
|
|
120
|
+
readonly story: SemanticStoryKind;
|
|
121
|
+
/** Root story from which textbox descent began. */
|
|
122
|
+
readonly rootStory: SemanticRootStoryKind;
|
|
123
|
+
/** Note scope for drawings in note stories; null elsewhere. */
|
|
124
|
+
readonly noteScopeId: string | null;
|
|
125
|
+
/** Owning note-area kind for note/separator drawings; null elsewhere. */
|
|
126
|
+
readonly noteAreaKind: NoteAreaRecord['kind'] | null;
|
|
127
|
+
/** Precise root host and absolute origin for story-relative geometry. */
|
|
128
|
+
readonly root: SemanticStoryVisit;
|
|
129
|
+
/** Absolute origin of this drawing's extent in page-stack coordinates. */
|
|
130
|
+
readonly drawingOrigin: Readonly<{
|
|
131
|
+
x: number;
|
|
132
|
+
y: number;
|
|
133
|
+
}>;
|
|
134
|
+
/** Absolute painted bounds, including effects and clipping. */
|
|
135
|
+
readonly absolutePaintBounds: LayoutBox;
|
|
136
|
+
/** Absolute pointer/hit bounds. */
|
|
137
|
+
readonly absoluteHitBounds: LayoutBox;
|
|
138
|
+
/** Layer relative to text in the immediate owning story. */
|
|
139
|
+
readonly paintLayer: SemanticDrawingLayer;
|
|
140
|
+
/** Published drawing record; inline visits also carry paragraph and line. */
|
|
141
|
+
readonly drawing: InlineDrawingRecord | AnchoredDrawingRecord;
|
|
142
|
+
}
|
|
143
|
+
/** Visit every drawing through the canonical root-story and recursive textbox walks. @public */
|
|
144
|
+
declare function forEachSemanticDrawing(layout: SemanticLayout, visit: (drawing: SemanticDrawingVisit) => void): void;
|
|
145
|
+
/**
|
|
146
|
+
* Visit every paragraph fragment one story paints — its own (table interiors flattened,
|
|
147
|
+
* header repeats included) and the fragments inside each anchored drawing's text-box story,
|
|
148
|
+
* recursively.
|
|
149
|
+
*
|
|
150
|
+
* The fragment sibling of {@link forEachStoryDrawing}, sharing its depth bound, for
|
|
151
|
+
* consumers that read per-paragraph published fields (list markers) rather than drawings.
|
|
152
|
+
* The furniture list-marker token walks with this; a fragment it misses leaves a reused
|
|
153
|
+
* page showing a stale marker.
|
|
154
|
+
*/
|
|
155
|
+
declare function forEachStoryParagraphFragment(story: StoryDrawingHost, visit: (fragment: ParagraphFragmentRecord, context: StoryParagraphFragmentContext) => void, rootOrigin?: Readonly<{
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
}>, rootDrawingOrigin?: RootDrawingOrigin): void;
|
|
159
|
+
/** Every fragment belonging to one paragraph, in order, across page boundaries. */
|
|
160
|
+
declare function fragmentsOfParagraph(layout: SemanticLayout, paragraphId: string): ParagraphFragmentRecord[];
|
|
161
|
+
/** The line containing a model position, or null when the position is not laid out. */
|
|
162
|
+
declare function lineAtPosition(layout: SemanticLayout, paragraphId: string, offset: number,
|
|
163
|
+
/** Lines to test, when the caller already knows which ones can carry the paragraph. */
|
|
164
|
+
candidates?: Iterable<LineRecord>): LineRecord | null;
|
|
165
|
+
/** Every content-control boundary on a layout, preferring the layout-level list. */
|
|
166
|
+
declare function contentControlsOfLayout(layout: SemanticLayout): readonly ContentControlBoundaryRecord[];
|
|
167
|
+
/**
|
|
168
|
+
* Axis-aligned union of boxes, or null when the list is empty.
|
|
169
|
+
*
|
|
170
|
+
* Used when a control's content spans several fragments or spans on one page.
|
|
171
|
+
*/
|
|
172
|
+
declare function unionLayoutBoxes(boxes: readonly LayoutBox[]): LayoutBox | null;
|
|
173
|
+
/** Collapse raw + ancestor locks into one `ST_Lock` vocabulary value. */
|
|
174
|
+
declare function effectiveContentControlLock(locks: readonly ContentControlLock[]): ContentControlLock;
|
|
175
|
+
|
|
176
|
+
export { contentControlsOfLayout as h, effectiveContentControlLock as i, forEachSemanticDrawing as j, forEachSemanticStory as k, forEachStoryParagraphFragment as l, fragmentsOfParagraph as m, lineAtPosition as n, linesOf as o, paragraphFragmentsOf as p, paragraphFragmentsOfBlocks as q, unionLayoutBoxes as u };
|
|
177
|
+
export type { SemanticRootStoryKind as S, TextboxOwnerRecord as T, SemanticStoryKind as a, SemanticStoryVisit as b, SemanticDrawingLayer as c, SemanticDrawingVisit as d, StoryDrawingContext as e, StoryDrawingHost as f, StoryParagraphFragmentContext as g };
|