@docx-editor.dev/core 2.31.0 → 2.32.0
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 +24 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +16 -16
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +17 -15
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-BWvaVEhD.d.ts → chrome-print-CznJ0ucN.d.ts} +58 -23
- package/dist/chunk-25EXMBV2.cjs +5 -0
- package/dist/chunk-2CWQY27B.cjs +1 -0
- package/dist/chunk-3IEXDEFH.cjs +7 -0
- package/dist/chunk-65XBN67F.cjs +2 -0
- package/dist/{chunk-5JPIEN54.cjs → chunk-6NVZNB7O.cjs} +2 -2
- package/dist/chunk-6UDJUI3W.cjs +2 -0
- package/dist/chunk-ACLR4DMK.js +1 -0
- package/dist/{chunk-2E2RPEKX.js → chunk-B2BEELUE.js} +1 -1
- package/dist/chunk-DDFHKQFU.js +30 -0
- package/dist/{chunk-MOYYRVFV.cjs → chunk-E4IAO4CY.cjs} +1 -1
- package/dist/chunk-ETDZFNMI.js +2 -0
- package/dist/chunk-FDSL5OJU.cjs +30 -0
- package/dist/chunk-FS7CMYLT.js +4 -0
- package/dist/chunk-GDS24SZN.js +30 -0
- package/dist/chunk-GIY6NT2X.js +5 -0
- package/dist/chunk-GWM3AKUD.js +18 -0
- package/dist/chunk-HDOXACHP.js +2 -0
- package/dist/chunk-IILEENID.js +1 -0
- package/dist/chunk-L5TYBFDB.js +1 -0
- package/dist/chunk-MNF2K7NN.cjs +30 -0
- package/dist/chunk-O324RB6R.cjs +1 -0
- package/dist/chunk-OKMEMSKB.cjs +1 -0
- package/dist/chunk-QXJKYNYZ.js +1 -0
- package/dist/chunk-RALTVLB6.js +2 -0
- package/dist/chunk-SRVKFUFI.js +3 -0
- package/dist/chunk-TELQ52LG.cjs +1 -0
- package/dist/chunk-TJHE5EET.cjs +1 -0
- package/dist/chunk-UMMRURPE.js +7 -0
- package/dist/chunk-WN7ICTA5.js +1 -0
- package/dist/{chunk-XSTGE3NI.cjs → chunk-XJYZVGQR.cjs} +1 -1
- package/dist/chunk-ZGTIE3QJ.cjs +4 -0
- package/dist/chunk-ZOZI27AW.cjs +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +20 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.cjs +1 -1
- package/dist/collaboration.d.ts +5 -5
- package/dist/collaboration.js +1 -1
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +13 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +15 -12
- package/dist/contracts/types.d.ts +135 -2
- package/dist/{custom-node-writes-TeUvMP13.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
- package/dist/{diagnostic-context-DJ0P1uZE.d.ts → diagnostic-context-BtDUY3v2.d.ts} +1 -1
- package/dist/{diagnostic-hints-C9JlLz1L.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
- package/dist/{document-protection-C8x3P2J6.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
- package/dist/{editor-B2ShlO23.d.ts → editor-DZwOTmlR.d.ts} +104 -239
- package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/dist/{editor-scope-C7ke1KJG.d.ts → editor-scope-B3L-1ALc.d.ts} +1 -1
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +74 -30
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +9 -15
- package/dist/export.js +1 -1
- package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/dist/{font-resolver-CWh40DYp.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
- package/dist/{headless-document-view-qOpaCF82.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +27 -25
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-CWS3j0Xr.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +24 -17
- package/dist/layout.js +1 -1
- package/dist/{note-properties-QsKh24sM.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +11 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-COZJUKUY.d.ts → protocol-DKa4qt7F.d.ts} +75 -5
- package/dist/{review-paragraph-order-C_QbCKcH.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
- package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
- package/dist/{semantic-cell-selection-Cub9FDa8.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
- package/dist/{semantic-interaction-dApRIYpt.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
- package/dist/{semantic-paint-DLzA8sjP.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
- package/dist/{semantic-record-queries-3yp9o11g.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
- package/dist/{semantic-records-B-akgRch.d.ts → semantic-records-BvN-WWst.d.ts} +216 -406
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +13 -14
- package/dist/store.js +1 -1
- package/dist/{types-barrel-CkF2JbU4.d.ts → tree-op-types-C_S2niXW.d.ts} +117 -26
- package/dist/{tree-package-store-B8l8DX3Z.d.ts → tree-package-store-CRHvMyNj.d.ts} +2 -2
- package/dist/{tree-session-contract-DeLRqohz.d.ts → tree-session-contract-D1awo_dA.d.ts} +5 -5
- package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
- package/docs/accept-reject-without-scrolling.md +95 -0
- package/docs/comment-on-found-text.md +72 -0
- package/docs/custom-review-cards.md +178 -0
- package/docs/highlight-ranges.md +48 -0
- package/docs/index.md +36 -0
- package/docs/propose-rewrite.md +247 -0
- package/docs/tracked-replacement.md +68 -0
- package/package.json +3 -2
- package/dist/chunk-243W4WW2.cjs +0 -2
- package/dist/chunk-4S24UOPG.js +0 -30
- package/dist/chunk-5SO5QDMV.cjs +0 -2
- package/dist/chunk-6IDOVU6L.cjs +0 -1
- package/dist/chunk-6JIJOZDW.js +0 -1
- package/dist/chunk-BTQKU64Q.cjs +0 -1
- package/dist/chunk-DBOOTED4.cjs +0 -30
- package/dist/chunk-EOTAXOJY.cjs +0 -5
- package/dist/chunk-FDAKJ2SJ.cjs +0 -30
- package/dist/chunk-FNNOJNGY.js +0 -3
- package/dist/chunk-FT33HRZP.js +0 -5
- package/dist/chunk-HC6YNKUI.cjs +0 -1
- package/dist/chunk-HZ66UCIS.js +0 -2
- package/dist/chunk-IBRBNT37.cjs +0 -1
- package/dist/chunk-IVIN7X43.js +0 -30
- package/dist/chunk-LZY6B6IV.js +0 -4
- package/dist/chunk-N6B3BXCL.js +0 -1
- package/dist/chunk-Q5K2GGNG.js +0 -2
- package/dist/chunk-R2XINWVE.js +0 -7
- package/dist/chunk-SUEXVBPR.js +0 -1
- package/dist/chunk-T2QQHG5C.js +0 -18
- package/dist/chunk-VWIJKH4A.js +0 -1
- package/dist/chunk-WO4V6PNS.cjs +0 -18
- package/dist/chunk-XMJKFURD.cjs +0 -4
- package/dist/chunk-YQWMI6J5.cjs +0 -7
- package/dist/chunk-ZCJS7D7S.js +0 -2
- package/dist/omml-equation-BsLAa2lX.d.ts +0 -115
|
@@ -1,243 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
/** Named revision colors. Identifiers are stable and never contain CSS. @public */
|
|
5
|
-
declare const REVISION_MARKUP_COLORS: readonly ['black', 'blue', 'turquoise', 'green', 'pink', 'red', 'yellow', 'white', 'darkBlue', 'teal', 'darkGreen', 'violet', 'darkRed', 'darkYellow', 'gray50', 'gray25', 'lightBlue', 'lightYellow', 'lightOrange', 'lightPurple', 'lightGreen', 'gray'];
|
|
6
|
-
/** @public */
|
|
7
|
-
type RevisionMarkupNamedColor = (typeof REVISION_MARKUP_COLORS)[number];
|
|
8
|
-
/** @public */
|
|
9
|
-
type RevisionMarkupColor = RevisionMarkupNamedColor | 'byAuthor' | 'auto';
|
|
10
|
-
/** @public */
|
|
11
|
-
type RevisionMarkupMark = 'none' | 'colorOnly' | 'bold' | 'italic' | 'underline' | 'doubleUnderline' | 'strikethrough' | 'doubleStrikethrough';
|
|
12
|
-
/** @public */
|
|
13
|
-
type RevisionDeletionMark = RevisionMarkupMark | 'hidden' | 'caret' | 'pound';
|
|
14
|
-
/** @public */
|
|
15
|
-
type RevisionChangedLinesMark = 'none' | 'leftBorder' | 'rightBorder' | 'outsideBorder';
|
|
16
|
-
/** @public */
|
|
17
|
-
interface RevisionMarkupStyle<Mark extends string = RevisionMarkupMark> {
|
|
18
|
-
readonly mark: Mark;
|
|
19
|
-
readonly color: RevisionMarkupColor;
|
|
20
|
-
}
|
|
21
|
-
/** Viewer-only text styling. Document highlighting remains unchanged. @public */
|
|
22
|
-
interface RevisionMarkupTextStyle<Mark extends string = RevisionMarkupMark> extends RevisionMarkupStyle<Mark> {
|
|
23
|
-
/** Background color behind revision text. Defaults to `none`. */
|
|
24
|
-
readonly background: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
25
|
-
}
|
|
26
|
-
/** Fully resolved, immutable viewer preferences. @public */
|
|
27
|
-
interface ResolvedRevisionMarkup {
|
|
28
|
-
readonly insertions: RevisionMarkupTextStyle;
|
|
29
|
-
readonly deletions: RevisionMarkupTextStyle<RevisionDeletionMark>;
|
|
30
|
-
readonly movedFrom: RevisionMarkupTextStyle<RevisionDeletionMark>;
|
|
31
|
-
readonly movedTo: RevisionMarkupTextStyle;
|
|
32
|
-
readonly formatting: RevisionMarkupTextStyle;
|
|
33
|
-
readonly changedLines: RevisionMarkupStyle<RevisionChangedLinesMark>;
|
|
34
|
-
readonly cells: {
|
|
35
|
-
readonly inserted: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
36
|
-
readonly deleted: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
37
|
-
readonly merged: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
38
|
-
readonly split: RevisionMarkupNamedColor | 'byAuthor' | 'none';
|
|
39
|
-
};
|
|
40
|
-
readonly trackMoves: boolean;
|
|
41
|
-
readonly trackFormatting: boolean;
|
|
42
|
-
}
|
|
43
|
-
/** Partial viewer preferences. Omitted values keep the previous value. @public */
|
|
44
|
-
type RevisionMarkupOptions = {
|
|
45
|
-
readonly [K in keyof ResolvedRevisionMarkup]?: ResolvedRevisionMarkup[K] extends boolean ? boolean : Partial<ResolvedRevisionMarkup[K]>;
|
|
46
|
-
};
|
|
47
|
-
/** Initial viewer preferences. @public */
|
|
48
|
-
declare const DEFAULT_REVISION_MARKUP: ResolvedRevisionMarkup;
|
|
49
|
-
/** Validate and merge preferences without modifying the input. @public */
|
|
50
|
-
declare function resolveRevisionMarkup(input?: RevisionMarkupOptions, previous?: ResolvedRevisionMarkup): ResolvedRevisionMarkup;
|
|
51
|
-
/** A local settings draft owned by the editor. @public */
|
|
52
|
-
interface RevisionMarkupDialogSession {
|
|
53
|
-
/** Aborts on close, replacement, load, detach, destroy, or renderer disposal. */
|
|
54
|
-
readonly signal: AbortSignal;
|
|
55
|
-
/** Read the immutable draft. */
|
|
56
|
-
get(): ResolvedRevisionMarkup;
|
|
57
|
-
/** Merge validated options into the draft without committing preferences. */
|
|
58
|
-
set(options: RevisionMarkupOptions): void;
|
|
59
|
-
/** Restore default preferences in the draft only. */
|
|
60
|
-
reset(): void;
|
|
61
|
-
/** Observe draft changes, including effective external preference changes. */
|
|
62
|
-
subscribe(listener: () => void): () => void;
|
|
63
|
-
canApply(): boolean;
|
|
64
|
-
/** Commit the draft and close. Returns false after cancellation. */
|
|
65
|
-
apply(): boolean;
|
|
66
|
-
/** Close without committing the draft. */
|
|
67
|
-
cancel(): void;
|
|
68
|
-
}
|
|
69
|
-
/** Host rendering for the Track changes options dialog. @public */
|
|
70
|
-
interface RevisionMarkupChromeHandlers {
|
|
71
|
-
readonly onRequest?: (session: RevisionMarkupDialogSession) => void;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* What a revision wrapper asserts about the content inside it.
|
|
76
|
-
*
|
|
77
|
-
* `moveFrom` / `moveTo` are deliberately distinct from `delete` / `insert`: a move is one
|
|
78
|
-
* decision with two halves, and presenting it as an unrelated deletion and insertion invites
|
|
79
|
-
* resolving one without the other, which duplicates or loses the content.
|
|
80
|
-
*/
|
|
81
|
-
type RevisionKind = 'insert' | 'delete' | 'moveFrom' | 'moveTo' | 'format';
|
|
82
|
-
/**
|
|
83
|
-
* One revision wrapper's provenance, as authored.
|
|
84
|
-
*
|
|
85
|
-
* `id` is the verbatim `@w:id` string rather than a number: `ST_DecimalNumber` restricts
|
|
86
|
-
* `xsd:integer` with no bounds, so a file may carry a value outside the safe integer range, and
|
|
87
|
-
* parsing it to a number would silently merge two distinct revisions.
|
|
88
|
-
*
|
|
89
|
-
* `date` is absent when the file omits it. `@w:date` is optional on `CT_TrackChange`, and
|
|
90
|
-
* inventing one is a silent content change.
|
|
91
|
-
*/
|
|
92
|
-
interface RevisionAttribution {
|
|
93
|
-
readonly kind: RevisionKind;
|
|
94
|
-
readonly id: string;
|
|
95
|
-
readonly author: string;
|
|
96
|
-
readonly date?: string;
|
|
97
|
-
/** The wrapper's node id, so a surface can address this exact site. */
|
|
98
|
-
readonly nodeId: string;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Which revisions layout resolves before producing pages.
|
|
102
|
-
*
|
|
103
|
-
* - `all-markup` shows both halves of every change.
|
|
104
|
-
* - `proposed` shows what the document becomes if every change is accepted.
|
|
105
|
-
* - `original` shows what it was before any of them.
|
|
106
|
-
*
|
|
107
|
-
* The last two are specified as equal to accept-all and reject-all OUTPUT, which is what makes
|
|
108
|
-
* them testable, without either applying an op.
|
|
109
|
-
*/
|
|
110
|
-
type RevisionDisplayMode = 'all-markup' | 'proposed' | 'original';
|
|
111
|
-
/**
|
|
112
|
-
* The views the review chrome offers, in Word's terms: the three layout projections plus
|
|
113
|
-
* Simple Markup, which reads as the proposed result with a red change bar beside every line
|
|
114
|
-
* a change touched — the document as accepting everything would leave it, and where.
|
|
115
|
-
*/
|
|
116
|
-
type ReviewDisplayMode = RevisionDisplayMode | 'simple-markup';
|
|
117
|
-
/**
|
|
118
|
-
* How a document renders tracked changes when nothing says otherwise.
|
|
119
|
-
*
|
|
120
|
-
* `all-markup` matches Word's own default: a reader who opens a document with pending changes
|
|
121
|
-
* sees them, rather than a clean-looking document hiding edits nobody has accepted.
|
|
122
|
-
*/
|
|
123
|
-
declare const DEFAULT_REVISION_DISPLAY_MODE: RevisionDisplayMode;
|
|
124
|
-
/**
|
|
125
|
-
* A view-time tracked-change filter. Revisions rejected by `includes` use the filter's accepted
|
|
126
|
-
* or rejected projection, while included revisions keep the display mode's normal projection.
|
|
127
|
-
*
|
|
128
|
-
* `cacheKey` is a canonical, content-based identity for layout caches. The set itself is kept
|
|
129
|
-
* because author names are attacker-controlled strings and must never be parsed back from a
|
|
130
|
-
* delimiter-based key.
|
|
131
|
-
*/
|
|
132
|
-
interface RevisionFilter {
|
|
133
|
-
readonly revisionMarkup?: ResolvedRevisionMarkup;
|
|
134
|
-
readonly hiddenAuthors: ReadonlySet<string>;
|
|
135
|
-
readonly includes?: (revision: RevisionAttribution) => boolean;
|
|
136
|
-
readonly includesNode?: (nodeId: string, author: string) => boolean;
|
|
137
|
-
/** Accepted/original projection for a revision excluded by `includesNode`. */
|
|
138
|
-
readonly excludedNodeMode?: (nodeId: string, author: string) => 'proposed' | 'original';
|
|
139
|
-
/**
|
|
140
|
-
* In a resolved view, content the view keeps paints as ORDINARY text: no author ink, no
|
|
141
|
-
* decoration, no change bar of its own. This is Word's No Markup, Original and Simple
|
|
142
|
-
* Markup, which the review chrome asks for. Without it the accepted projection keeps the
|
|
143
|
-
* attribution on kept insertions, which is what the engine paints when no review module
|
|
144
|
-
* is registered — colour by author, deletions resolved — and what its roster reads.
|
|
145
|
-
*/
|
|
146
|
-
readonly resolvedMarkup?: 'plain';
|
|
147
|
-
readonly cacheKey: string;
|
|
148
|
-
}
|
|
149
|
-
/** @deprecated Use {@link RevisionFilter}. */
|
|
150
|
-
interface RevisionAuthorFilter extends RevisionFilter {
|
|
151
|
-
}
|
|
152
|
-
/** Build a canonical reviewer filter. An empty input returns `undefined` for the fast path. */
|
|
153
|
-
declare function revisionAuthorFilter(hiddenAuthors: Iterable<string>): RevisionAuthorFilter | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* Whether content under this stack of revisions is laid out in the given mode.
|
|
156
|
-
*
|
|
157
|
-
* Containment governs, so a single enclosing wrapper the mode resolves away suppresses
|
|
158
|
-
* everything inside it regardless of what the inner wrappers say. An insertion inside a
|
|
159
|
-
* deletion does not survive the proposed result: the deletion it sits in was accepted.
|
|
160
|
-
*/
|
|
161
|
-
declare function revisionsVisible(revisions: readonly RevisionAttribution[], mode: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter): boolean;
|
|
162
|
-
/**
|
|
163
|
-
* Every revision on a paragraph's own MARK, from `w:pPr/w:rPr/w:ins|w:del|w:moveFrom|w:moveTo`.
|
|
164
|
-
*
|
|
165
|
-
* All four members of `EG_ParaRPrTrackChanges`. A moved paragraph carries `w:moveFrom` on the
|
|
166
|
-
* mark of the copy it left and `w:moveTo` on the mark of the copy it arrived at, so a move
|
|
167
|
-
* that spans whole paragraphs is recorded here and nowhere else.
|
|
168
|
-
*
|
|
169
|
-
* `EG_ParaRPrTrackChanges` records that the pilcrow itself was inserted or deleted, which is how
|
|
170
|
-
* Word writes a paragraph split or merge. It is not content — there is no text to decorate — so
|
|
171
|
-
* a surface shows it as a mark of its own beside the paragraph, the way Word draws a struck-
|
|
172
|
-
* through ¶.
|
|
173
|
-
*
|
|
174
|
-
* A LIST, because the group is `ins? del? moveFrom? moveTo?` and the first two can both be
|
|
175
|
-
* there: that pair is what Word writes when a second author proposes removing a mark the first
|
|
176
|
-
* proposed adding, and it is what this engine's own writer emits (`tree-op-tracked.ts`).
|
|
177
|
-
* Answering with the first one hid the second author's decision from the PAGE. The review pane
|
|
178
|
-
* walks the tree itself and always listed both, which is the worse shape of the two: a card
|
|
179
|
-
* offering a decision the reader could see no sign of.
|
|
180
|
-
*
|
|
181
|
-
* Ordered as the file orders them, which is the order the group declares.
|
|
182
|
-
*
|
|
183
|
-
* Property-position `w:ins`/`w:del` stay `generic` in the tree deliberately, so this reads them
|
|
184
|
-
* by name rather than by kind.
|
|
185
|
-
*/
|
|
186
|
-
declare function paragraphMarkRevisionsOf(paragraph: OoxmlNode): readonly RevisionAttribution[];
|
|
187
|
-
/**
|
|
188
|
-
* The tracked FORMAT change on a paragraph's own mark, from `w:pPr/w:rPr/w:rPrChange`.
|
|
189
|
-
*
|
|
190
|
-
* `CT_ParaRPr` ends with it (§17.13.5.32), and Word writes it when a user changes the mark's
|
|
191
|
-
* own run properties with tracking on. It reaches the fragment rather than a span because it
|
|
192
|
-
* decorates no characters, and it is not in `props`: a fragment's `props` carry the mark's
|
|
193
|
-
* `w:rPr` by NAME only, with none of its children.
|
|
194
|
-
*
|
|
195
|
-
* Note that `w:rPrChange/w:rPr` is `CT_ParaRPrOriginal`, which may carry its own revision
|
|
196
|
-
* marks. Those describe the mark as it WAS and must not be read as live ones, which is why
|
|
197
|
-
* this reads the change element's own attributes and never descends into it.
|
|
198
|
-
*/
|
|
199
|
-
declare function paragraphMarkFormatRevisionOf(paragraph: OoxmlNode): RevisionAttribution | null;
|
|
200
|
-
/**
|
|
201
|
-
* The single decision a one-field reader sees.
|
|
202
|
-
*
|
|
203
|
-
* A DELETION wins when a mark carries both, for the reason paint draws it that way: a break
|
|
204
|
-
* proposed and then unproposed ends up removed, so that is the decision a reader who can only
|
|
205
|
-
* see one must see. One function decides it, so the deprecated field, the deprecated function
|
|
206
|
-
* and the painted glyph cannot answer differently.
|
|
207
|
-
*/
|
|
208
|
-
declare function shownMarkRevision(revisions: readonly RevisionAttribution[]): RevisionAttribution | undefined;
|
|
209
|
-
/**
|
|
210
|
-
* Does this decision, taken, remove the paragraph mark?
|
|
211
|
-
*
|
|
212
|
-
* A deletion does, and so does a `moveFrom`: the copy the paragraph moved OUT of goes away
|
|
213
|
-
* when the move is accepted. `insert` and `moveTo` are the other half of each pair, and they
|
|
214
|
-
* keep the break. Paint, the change bar and the resolved views all ask this one question, so
|
|
215
|
-
* a `moveFrom` cannot end up struck through in the margin and blue on the glyph.
|
|
216
|
-
*/
|
|
217
|
-
declare function markRevisionRemovesMark(revision: RevisionAttribution): boolean;
|
|
218
|
-
/**
|
|
219
|
-
* The one decision on a paragraph's mark that a single-field reader sees.
|
|
220
|
-
*
|
|
221
|
-
* @deprecated Reads one of the revisions a mark can carry. Use {@link paragraphMarkRevisionsOf},
|
|
222
|
-
* which answers with all of them.
|
|
223
|
-
*/
|
|
224
|
-
declare function paragraphMarkRevisionOf(paragraph: OoxmlNode): RevisionAttribution | null;
|
|
225
|
-
/**
|
|
226
|
-
* The tracked FORMAT change on a property list, from `w:rPrChange` or `w:pPrChange`.
|
|
227
|
-
*
|
|
228
|
-
* A property change alters no characters, so it has no span of its own to strike or underline.
|
|
229
|
-
* Word marks the affected text and says what changed; the minimum a reader needs is to see that
|
|
230
|
-
* this text's formatting is itself a pending decision.
|
|
231
|
-
*
|
|
232
|
-
* Read from the flattened property list because that is what layout already carries — the
|
|
233
|
-
* change wrapper is a `w:rPr`/`w:pPr` child like any other.
|
|
234
|
-
*/
|
|
235
|
-
declare function formatRevisionOf(properties: readonly {
|
|
236
|
-
readonly localName: string;
|
|
237
|
-
readonly attributes?: Readonly<Record<string, string>>;
|
|
238
|
-
}[]): RevisionAttribution | null;
|
|
239
|
-
/** True when this stack of revisions marks its content as deleted from the live document. */
|
|
240
|
-
declare function revisionsAreDeletion(revisions: readonly RevisionAttribution[]): boolean;
|
|
1
|
+
import { a4 as OoxmlNode, az as OoxmlProperty, O as OoxmlPart, av as OoxmlElement, b3 as TableBorderStyle, af as ImageResourceState, b4 as DrawingAccessibility, b5 as DrawingImageEffects, aT as SourceCrop, b2 as DrawingTransform, b6 as VectorShapeProjection, a7 as DrawingHorizontalReferenceFrame, ab as DrawingVerticalReferenceFrame, ag as ImageWrapTarget, b7 as DrawingProjection, b8 as OoxmlDrawingNode } from './tree-op-types-C_S2niXW.js';
|
|
2
|
+
import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-Cn6rZJ7H.js';
|
|
3
|
+
import { O as OmmlEquationProjection, H as HeadlessDocumentView } from './headless-document-view-Bcz9_Qva.js';
|
|
241
4
|
|
|
242
5
|
/**
|
|
243
6
|
* Whether a paragraph must start a new page (`w:pageBreakBefore`).
|
|
@@ -1673,112 +1436,6 @@ interface StoryPageFieldNeeds {
|
|
|
1673
1436
|
readonly hasPageParity?: boolean;
|
|
1674
1437
|
}
|
|
1675
1438
|
|
|
1676
|
-
interface DrawingPoint {
|
|
1677
|
-
readonly x: number;
|
|
1678
|
-
readonly y: number;
|
|
1679
|
-
}
|
|
1680
|
-
interface DrawingInsets {
|
|
1681
|
-
readonly top: number;
|
|
1682
|
-
readonly right: number;
|
|
1683
|
-
readonly bottom: number;
|
|
1684
|
-
readonly left: number;
|
|
1685
|
-
}
|
|
1686
|
-
type DrawingClipFallback = 'none' | 'unsupported-preset';
|
|
1687
|
-
interface DrawingGeometry {
|
|
1688
|
-
readonly contentBounds: LayoutBox;
|
|
1689
|
-
readonly paintBounds: LayoutBox;
|
|
1690
|
-
readonly hitBounds: LayoutBox;
|
|
1691
|
-
readonly transformedCorners: readonly DrawingPoint[];
|
|
1692
|
-
/** Unclipped image corners for affine encoding; clipping must not stretch the image. */
|
|
1693
|
-
readonly imageTransformCorners?: readonly DrawingPoint[];
|
|
1694
|
-
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
1695
|
-
readonly clipFallback: DrawingClipFallback;
|
|
1696
|
-
readonly effectInsets: DrawingInsets;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
/**
|
|
1700
|
-
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
1701
|
-
* within.
|
|
1702
|
-
*
|
|
1703
|
-
* The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
|
|
1704
|
-
* reordering needs, and collapsing it early loses nested isolates.
|
|
1705
|
-
*/
|
|
1706
|
-
interface BidiEmbeddingLevels {
|
|
1707
|
-
readonly levels: Uint8Array;
|
|
1708
|
-
readonly paragraphs: readonly {
|
|
1709
|
-
readonly start: number;
|
|
1710
|
-
readonly end: number;
|
|
1711
|
-
readonly level: number;
|
|
1712
|
-
}[];
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
/**
|
|
1716
|
-
* Which `w:rFonts` slot a character resolves its face through.
|
|
1717
|
-
*
|
|
1718
|
-
* OOXML gives a run up to four faces and picks between them by SCRIPT, so one run of mixed Latin
|
|
1719
|
-
* and CJK text uses two different fonts without saying so anywhere in its properties.
|
|
1720
|
-
*/
|
|
1721
|
-
type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
|
|
1722
|
-
/**
|
|
1723
|
-
* A run of text sharing one script, direction and font slot — the unit handed to the shaper.
|
|
1724
|
-
*
|
|
1725
|
-
* Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
|
|
1726
|
-
* behaviour, so a run is itemized into these first.
|
|
1727
|
-
*/
|
|
1728
|
-
interface ScriptItem {
|
|
1729
|
-
readonly from: number;
|
|
1730
|
-
readonly to: number;
|
|
1731
|
-
readonly direction: TextDirection;
|
|
1732
|
-
readonly bidiLevel: number;
|
|
1733
|
-
readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
|
|
1734
|
-
readonly slot: FontSlot;
|
|
1735
|
-
}
|
|
1736
|
-
/**
|
|
1737
|
-
* A code point whose script this engine does not itemize.
|
|
1738
|
-
*
|
|
1739
|
-
* Carries the offending `codePoint` so the caller can report which character stopped it, rather
|
|
1740
|
-
* than failing anonymously somewhere in the middle of a paragraph.
|
|
1741
|
-
*/
|
|
1742
|
-
declare class UnsupportedScriptError extends Error {
|
|
1743
|
-
readonly name = "UnsupportedScriptError";
|
|
1744
|
-
readonly code = "unsupportedScript";
|
|
1745
|
-
readonly codePoint: number;
|
|
1746
|
-
constructor(codePoint: number);
|
|
1747
|
-
}
|
|
1748
|
-
/**
|
|
1749
|
-
* Split text into shapeable runs by script, bidi level and font slot.
|
|
1750
|
-
*
|
|
1751
|
-
* Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
|
|
1752
|
-
* by construction instead of by two implementations happening to match.
|
|
1753
|
-
*/
|
|
1754
|
-
declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
|
|
1755
|
-
/**
|
|
1756
|
-
* The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
|
|
1757
|
-
*
|
|
1758
|
-
* This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
|
|
1759
|
-
* style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
|
|
1760
|
-
* and the format painter see the run as authored — and every consumer that turns text into
|
|
1761
|
-
* geometry or ink resolves the face through here. The derived object is memoized per
|
|
1762
|
-
* (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
|
|
1763
|
-
* keep their caches.
|
|
1764
|
-
*/
|
|
1765
|
-
declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
|
|
1769
|
-
*
|
|
1770
|
-
* `target` and `anchor` are verbatim from the instruction — the projector at the trust
|
|
1771
|
-
* boundary decides what, if anything, they become in a DOM sink.
|
|
1772
|
-
*/
|
|
1773
|
-
interface HyperlinkFieldSpec {
|
|
1774
|
-
/** The target as authored (first quoted or bare non-switch token), or null. */
|
|
1775
|
-
readonly target: string | null;
|
|
1776
|
-
/** `\l` — a bookmark name in this document, or null. */
|
|
1777
|
-
readonly anchor: string | null;
|
|
1778
|
-
/** `\o` — the hover tooltip, or null. */
|
|
1779
|
-
readonly tooltip: string | null;
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
1439
|
/** One recognized REF instruction: the target name and the supported switches, nothing else. */
|
|
1783
1440
|
interface RefFieldSpec {
|
|
1784
1441
|
readonly bookmark: string;
|
|
@@ -1888,6 +1545,215 @@ interface RefNoteParts {
|
|
|
1888
1545
|
*/
|
|
1889
1546
|
declare function resolveStoryRefFields(blocks: readonly OoxmlElement[], listItems: ReadonlyMap<string, ResolvedListItem> | undefined, notes?: RefNoteParts): RefFieldContext | null;
|
|
1890
1547
|
|
|
1548
|
+
interface EquationGeometryBase {
|
|
1549
|
+
readonly box: LayoutBox;
|
|
1550
|
+
/** Baseline measured from this node's top edge. */
|
|
1551
|
+
readonly baseline: number;
|
|
1552
|
+
}
|
|
1553
|
+
interface EquationTextGeometry extends EquationGeometryBase {
|
|
1554
|
+
readonly kind: 'text' | 'fallback';
|
|
1555
|
+
readonly text: string;
|
|
1556
|
+
readonly fontSizePt: number;
|
|
1557
|
+
/** The same resolved face used by measurement and the trusted paint sink. */
|
|
1558
|
+
readonly runStyle?: ResolvedRunStyle;
|
|
1559
|
+
}
|
|
1560
|
+
interface EquationRowGeometry extends EquationGeometryBase {
|
|
1561
|
+
readonly kind: 'row';
|
|
1562
|
+
readonly items: readonly EquationGeometry[];
|
|
1563
|
+
}
|
|
1564
|
+
interface EquationFractionGeometry extends EquationGeometryBase {
|
|
1565
|
+
readonly kind: 'fraction';
|
|
1566
|
+
readonly numerator: EquationGeometry;
|
|
1567
|
+
readonly denominator: EquationGeometry;
|
|
1568
|
+
readonly bar: LayoutBox;
|
|
1569
|
+
}
|
|
1570
|
+
interface EquationRadicalGeometry extends EquationGeometryBase {
|
|
1571
|
+
readonly kind: 'radical';
|
|
1572
|
+
readonly sign: EquationTextGeometry;
|
|
1573
|
+
readonly radicand: EquationGeometry;
|
|
1574
|
+
readonly degree?: EquationGeometry;
|
|
1575
|
+
readonly bar: LayoutBox;
|
|
1576
|
+
}
|
|
1577
|
+
interface EquationBarGeometry extends EquationGeometryBase {
|
|
1578
|
+
readonly kind: 'bar';
|
|
1579
|
+
readonly body: EquationGeometry;
|
|
1580
|
+
readonly bar: LayoutBox;
|
|
1581
|
+
}
|
|
1582
|
+
interface EquationScriptGeometry extends EquationGeometryBase {
|
|
1583
|
+
readonly kind: 'script';
|
|
1584
|
+
readonly base: EquationGeometry;
|
|
1585
|
+
readonly subscript?: EquationGeometry;
|
|
1586
|
+
readonly superscript?: EquationGeometry;
|
|
1587
|
+
}
|
|
1588
|
+
interface EquationNaryGeometry extends EquationGeometryBase {
|
|
1589
|
+
readonly kind: 'nary';
|
|
1590
|
+
readonly operator: EquationTextGeometry;
|
|
1591
|
+
readonly body: EquationGeometry;
|
|
1592
|
+
readonly lowerLimit?: EquationGeometry;
|
|
1593
|
+
readonly upperLimit?: EquationGeometry;
|
|
1594
|
+
}
|
|
1595
|
+
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
1596
|
+
/** Equation metadata carried by one atomic semantic span. */
|
|
1597
|
+
interface EquationSpanRecord {
|
|
1598
|
+
readonly sourceNodeId: string;
|
|
1599
|
+
readonly geometry: EquationGeometry;
|
|
1600
|
+
readonly fallbackText: string;
|
|
1601
|
+
readonly truncated: boolean;
|
|
1602
|
+
}
|
|
1603
|
+
/** Compose one bounded OMML projection into paint-ready point geometry. */
|
|
1604
|
+
declare function layoutEquation(projection: OmmlEquationProjection, measurer: TextMeasurer, style: ResolvedRunStyle): EquationSpanRecord;
|
|
1605
|
+
|
|
1606
|
+
/** Source metadata for content the engine cannot render. @public */
|
|
1607
|
+
interface UnsupportedElement {
|
|
1608
|
+
readonly nodeId: string;
|
|
1609
|
+
readonly ownerPartName: string;
|
|
1610
|
+
readonly namespaceUri: string | null;
|
|
1611
|
+
readonly localName: string;
|
|
1612
|
+
/** Lossless canonical source. Treat this value as read-only and untrusted. */
|
|
1613
|
+
readonly source: OoxmlElement | null;
|
|
1614
|
+
readonly placement: 'inline' | 'block';
|
|
1615
|
+
readonly label: string;
|
|
1616
|
+
/** Reserved geometry in document points, when the element has been laid out. */
|
|
1617
|
+
readonly bounds?: LayoutBox;
|
|
1618
|
+
readonly drawing?: InlineDrawingRecord | AnchoredDrawingRecord;
|
|
1619
|
+
readonly equation?: EquationSpanRecord;
|
|
1620
|
+
}
|
|
1621
|
+
/** Dimensions reserved before pagination, in document points. @public */
|
|
1622
|
+
interface UnsupportedElementLayout {
|
|
1623
|
+
readonly width: number;
|
|
1624
|
+
readonly height: number;
|
|
1625
|
+
}
|
|
1626
|
+
/** The first matching registration renders each unsupported element. @public */
|
|
1627
|
+
interface UnsupportedElementRule {
|
|
1628
|
+
readonly match?: (element: UnsupportedElement) => boolean;
|
|
1629
|
+
readonly layout?: UnsupportedElementLayout;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/** Reserved geometry for one opaque content component. @internal */
|
|
1633
|
+
interface UnsupportedContentRecord {
|
|
1634
|
+
readonly element: UnsupportedElement;
|
|
1635
|
+
readonly display: 'inline' | 'block';
|
|
1636
|
+
readonly width: number;
|
|
1637
|
+
readonly height: number;
|
|
1638
|
+
}
|
|
1639
|
+
/** Host dimensions in points; absent keeps the engine's hidden fallback. @internal */
|
|
1640
|
+
type UnsupportedContentResolver = (element: UnsupportedElement) => UnsupportedElementLayout | null | undefined;
|
|
1641
|
+
/**
|
|
1642
|
+
* Create one projection per renderer registration set. Reused source parts retain identity.
|
|
1643
|
+
* The result is layout input only. Never serialize it or use it as an editing store.
|
|
1644
|
+
* @internal
|
|
1645
|
+
*/
|
|
1646
|
+
declare function createUnsupportedContentProjector(resolve: UnsupportedContentResolver): {
|
|
1647
|
+
part(part: OoxmlPart): OoxmlPart;
|
|
1648
|
+
view(view: HeadlessDocumentView): HeadlessDocumentView;
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
interface DrawingPoint {
|
|
1652
|
+
readonly x: number;
|
|
1653
|
+
readonly y: number;
|
|
1654
|
+
}
|
|
1655
|
+
interface DrawingInsets {
|
|
1656
|
+
readonly top: number;
|
|
1657
|
+
readonly right: number;
|
|
1658
|
+
readonly bottom: number;
|
|
1659
|
+
readonly left: number;
|
|
1660
|
+
}
|
|
1661
|
+
type DrawingClipFallback = 'none' | 'unsupported-preset';
|
|
1662
|
+
interface DrawingGeometry {
|
|
1663
|
+
readonly contentBounds: LayoutBox;
|
|
1664
|
+
readonly paintBounds: LayoutBox;
|
|
1665
|
+
readonly hitBounds: LayoutBox;
|
|
1666
|
+
readonly transformedCorners: readonly DrawingPoint[];
|
|
1667
|
+
/** Unclipped image corners for affine encoding; clipping must not stretch the image. */
|
|
1668
|
+
readonly imageTransformCorners?: readonly DrawingPoint[];
|
|
1669
|
+
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
1670
|
+
readonly clipFallback: DrawingClipFallback;
|
|
1671
|
+
readonly effectInsets: DrawingInsets;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
1676
|
+
* within.
|
|
1677
|
+
*
|
|
1678
|
+
* The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
|
|
1679
|
+
* reordering needs, and collapsing it early loses nested isolates.
|
|
1680
|
+
*/
|
|
1681
|
+
interface BidiEmbeddingLevels {
|
|
1682
|
+
readonly levels: Uint8Array;
|
|
1683
|
+
readonly paragraphs: readonly {
|
|
1684
|
+
readonly start: number;
|
|
1685
|
+
readonly end: number;
|
|
1686
|
+
readonly level: number;
|
|
1687
|
+
}[];
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* Which `w:rFonts` slot a character resolves its face through.
|
|
1692
|
+
*
|
|
1693
|
+
* OOXML gives a run up to four faces and picks between them by SCRIPT, so one run of mixed Latin
|
|
1694
|
+
* and CJK text uses two different fonts without saying so anywhere in its properties.
|
|
1695
|
+
*/
|
|
1696
|
+
type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
|
|
1697
|
+
/**
|
|
1698
|
+
* A run of text sharing one script, direction and font slot — the unit handed to the shaper.
|
|
1699
|
+
*
|
|
1700
|
+
* Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
|
|
1701
|
+
* behaviour, so a run is itemized into these first.
|
|
1702
|
+
*/
|
|
1703
|
+
interface ScriptItem {
|
|
1704
|
+
readonly from: number;
|
|
1705
|
+
readonly to: number;
|
|
1706
|
+
readonly direction: TextDirection;
|
|
1707
|
+
readonly bidiLevel: number;
|
|
1708
|
+
readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
|
|
1709
|
+
readonly slot: FontSlot;
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* A code point whose script this engine does not itemize.
|
|
1713
|
+
*
|
|
1714
|
+
* Carries the offending `codePoint` so the caller can report which character stopped it, rather
|
|
1715
|
+
* than failing anonymously somewhere in the middle of a paragraph.
|
|
1716
|
+
*/
|
|
1717
|
+
declare class UnsupportedScriptError extends Error {
|
|
1718
|
+
readonly name = "UnsupportedScriptError";
|
|
1719
|
+
readonly code = "unsupportedScript";
|
|
1720
|
+
readonly codePoint: number;
|
|
1721
|
+
constructor(codePoint: number);
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Split text into shapeable runs by script, bidi level and font slot.
|
|
1725
|
+
*
|
|
1726
|
+
* Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
|
|
1727
|
+
* by construction instead of by two implementations happening to match.
|
|
1728
|
+
*/
|
|
1729
|
+
declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
|
|
1730
|
+
/**
|
|
1731
|
+
* The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
|
|
1732
|
+
*
|
|
1733
|
+
* This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
|
|
1734
|
+
* style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
|
|
1735
|
+
* and the format painter see the run as authored — and every consumer that turns text into
|
|
1736
|
+
* geometry or ink resolves the face through here. The derived object is memoized per
|
|
1737
|
+
* (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
|
|
1738
|
+
* keep their caches.
|
|
1739
|
+
*/
|
|
1740
|
+
declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
|
|
1744
|
+
*
|
|
1745
|
+
* `target` and `anchor` are verbatim from the instruction — the projector at the trust
|
|
1746
|
+
* boundary decides what, if anything, they become in a DOM sink.
|
|
1747
|
+
*/
|
|
1748
|
+
interface HyperlinkFieldSpec {
|
|
1749
|
+
/** The target as authored (first quoted or bare non-switch token), or null. */
|
|
1750
|
+
readonly target: string | null;
|
|
1751
|
+
/** `\l` — a bookmark name in this document, or null. */
|
|
1752
|
+
readonly anchor: string | null;
|
|
1753
|
+
/** `\o` — the hover tooltip, or null. */
|
|
1754
|
+
readonly tooltip: string | null;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1891
1757
|
/**
|
|
1892
1758
|
* What a piece says about the FIELD result it came from, for Word's shading.
|
|
1893
1759
|
*
|
|
@@ -2855,64 +2721,6 @@ interface ParagraphLayoutInputs {
|
|
|
2855
2721
|
*/
|
|
2856
2722
|
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean, lineUnitPt?: number): ParagraphLayoutInputs;
|
|
2857
2723
|
|
|
2858
|
-
interface EquationGeometryBase {
|
|
2859
|
-
readonly box: LayoutBox;
|
|
2860
|
-
/** Baseline measured from this node's top edge. */
|
|
2861
|
-
readonly baseline: number;
|
|
2862
|
-
}
|
|
2863
|
-
interface EquationTextGeometry extends EquationGeometryBase {
|
|
2864
|
-
readonly kind: 'text' | 'fallback';
|
|
2865
|
-
readonly text: string;
|
|
2866
|
-
readonly fontSizePt: number;
|
|
2867
|
-
/** The same resolved face used by measurement and the trusted paint sink. */
|
|
2868
|
-
readonly runStyle?: ResolvedRunStyle;
|
|
2869
|
-
}
|
|
2870
|
-
interface EquationRowGeometry extends EquationGeometryBase {
|
|
2871
|
-
readonly kind: 'row';
|
|
2872
|
-
readonly items: readonly EquationGeometry[];
|
|
2873
|
-
}
|
|
2874
|
-
interface EquationFractionGeometry extends EquationGeometryBase {
|
|
2875
|
-
readonly kind: 'fraction';
|
|
2876
|
-
readonly numerator: EquationGeometry;
|
|
2877
|
-
readonly denominator: EquationGeometry;
|
|
2878
|
-
readonly bar: LayoutBox;
|
|
2879
|
-
}
|
|
2880
|
-
interface EquationRadicalGeometry extends EquationGeometryBase {
|
|
2881
|
-
readonly kind: 'radical';
|
|
2882
|
-
readonly sign: EquationTextGeometry;
|
|
2883
|
-
readonly radicand: EquationGeometry;
|
|
2884
|
-
readonly degree?: EquationGeometry;
|
|
2885
|
-
readonly bar: LayoutBox;
|
|
2886
|
-
}
|
|
2887
|
-
interface EquationBarGeometry extends EquationGeometryBase {
|
|
2888
|
-
readonly kind: 'bar';
|
|
2889
|
-
readonly body: EquationGeometry;
|
|
2890
|
-
readonly bar: LayoutBox;
|
|
2891
|
-
}
|
|
2892
|
-
interface EquationScriptGeometry extends EquationGeometryBase {
|
|
2893
|
-
readonly kind: 'script';
|
|
2894
|
-
readonly base: EquationGeometry;
|
|
2895
|
-
readonly subscript?: EquationGeometry;
|
|
2896
|
-
readonly superscript?: EquationGeometry;
|
|
2897
|
-
}
|
|
2898
|
-
interface EquationNaryGeometry extends EquationGeometryBase {
|
|
2899
|
-
readonly kind: 'nary';
|
|
2900
|
-
readonly operator: EquationTextGeometry;
|
|
2901
|
-
readonly body: EquationGeometry;
|
|
2902
|
-
readonly lowerLimit?: EquationGeometry;
|
|
2903
|
-
readonly upperLimit?: EquationGeometry;
|
|
2904
|
-
}
|
|
2905
|
-
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
2906
|
-
/** Equation metadata carried by one atomic semantic span. */
|
|
2907
|
-
interface EquationSpanRecord {
|
|
2908
|
-
readonly sourceNodeId: string;
|
|
2909
|
-
readonly geometry: EquationGeometry;
|
|
2910
|
-
readonly fallbackText: string;
|
|
2911
|
-
readonly truncated: boolean;
|
|
2912
|
-
}
|
|
2913
|
-
/** Compose one bounded OMML projection into paint-ready point geometry. */
|
|
2914
|
-
declare function layoutEquation(projection: OmmlEquationProjection, measurer: TextMeasurer, style: ResolvedRunStyle): EquationSpanRecord;
|
|
2915
|
-
|
|
2916
2724
|
/** Published root story containing an artifact occurrence. @public */
|
|
2917
2725
|
type SemanticArtifactRootStoryKind = 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'note-separator';
|
|
2918
2726
|
/** Exact story in which a review artifact's source anchor was laid out. @public */
|
|
@@ -3369,6 +3177,8 @@ interface StyleSpanRecord {
|
|
|
3369
3177
|
* and selection mapping refuses them the way it refuses markers.
|
|
3370
3178
|
*/
|
|
3371
3179
|
readonly projected?: boolean;
|
|
3180
|
+
/** Zero-model-width component geometry for opaque content. */
|
|
3181
|
+
readonly unsupported?: UnsupportedContentRecord;
|
|
3372
3182
|
/** Authored inline separator rule; its advance belongs to one note atom. */
|
|
3373
3183
|
readonly noteSeparator?: 'separator' | 'continuationSeparator';
|
|
3374
3184
|
/** Paint-ready geometry for one atomic Office Math equation. */
|
|
@@ -4047,5 +3857,5 @@ interface SectionBreakMarkRecord {
|
|
|
4047
3857
|
readonly kind: SectionBreakType;
|
|
4048
3858
|
}
|
|
4049
3859
|
|
|
4050
|
-
export {
|
|
4051
|
-
export type {
|
|
3860
|
+
export { FontResolutionError as aL, HARD_MAX_AGGREGATE_FONT_BYTES as aU, HARD_MAX_FONT_BYTES as aV, HARD_MAX_FONT_SOURCES as aW, AUTO_PARAGRAPH_SPACING_PT as ab, DEFAULT_PAGE_GEOMETRY as am, DEFAULT_RUN_STYLE as an, DEFAULT_SECTION_PROPERTIES as ao, DEFAULT_TAB_INTERVAL_PT as ap, DEFAULT_TAB_INTERVAL_TWIPS as aq, EMPTY_NUMBERING_INDEX as ay, EMPTY_TAB_STOPS as az, MAX_BORDER_SPACE_PT as b0, MAX_BORDER_WIDTH_PT as b1, MAX_DOCUMENT_SECTIONS as b2, MAX_LVL_OVERRIDES as b3, MAX_NUMBERING_DEFINITIONS as b4, MAX_PARAGRAPH_SPACING_PT as b5, MAX_SHAPING_CONTEXT as b6, MAX_STYLE_DEFINITIONS as b7, MAX_TABLE_BORDER_STROKES as b8, MAX_TAB_POSITION_TWIPS as b9, SINGLE_LINE_SPACING as bD, MAX_TAB_STOPS as ba, PAGE_BORDER_SIDES as bd, PARAGRAPH_BORDER_SIDES as be, readBorderSide as c$, TAB_LEADER_GLYPH as c0, enumerateDocumentSections as cA, enumerateDocumentSectionsBounded as cB, fixedPoint as cC, fontRequestKey as cD, geometryOfSection as cE, glyphSizeFactorOf as cF, isValidStyleId as cG, itemizeScriptFontSlots as cH, layoutEquation as cI, measureDisplayText as cJ, nextTabDestination as cK, pageBordersFingerprint as cL, paragraphBorderExtentPt as cM, paragraphBorderStrokeWidthPt as cN, paragraphBorders as cO, paragraphBordersFingerprint as cP, paragraphBreaksBefore as cQ, paragraphContextualSpacing as cR, paragraphLineSpacing as cS, paragraphSectionNode as cT, paragraphSpacing as cU, paragraphTabStops as cV, parsePageBorders as cW, parsePageNumbering as cX, parseRefInstruction as cY, parseSectionProperties as cZ, projectedSectionSourceIndexes as c_, UnsupportedScriptError as cd, appliedSpaceBefore as cf, applyLineSpacing as cg, baselineShiftPtOf as ch, borderExtentPt as ci, borderWeight as cj, bottomBorderExtentPt as ck, boundedStructuralFontValidator as cl, buildNumberingIndex as cm, buildStyleCascadeTable as cn, cascadeParagraphFormatting as co, cascadeRunProperties as cp, cascadedBottomBorder as cq, cascadedParagraphBorders as cr, cascadedTabStops as cs, collapsedSpaceBefore as ct, createFontResourceSnapshot as cu, createShapedRun as cv, createShapingEnvironment as cw, createUnsupportedContentProjector as cx, defaultTabIntervalFromSettings as cy, displayText as cz, readCellBorders as d0, readNumPr as d1, readSectionProperties as d2, readTableBorders as d3, resolveBorderConflict as d4, resolveNumberingLevel as d5, resolveParagraphLayoutInputs as d6, resolveRunStyle as d7, resolveStoryListItems as d8, resolveStoryRefFields as d9, resolveTableCellBorderGrid as da, runStylesEqual as db, shapedRunComparatorInputs as dc, shapingEnvironmentFingerprint as dd, shapingEnvironmentFingerprintInputs as de, styleForFontSlot as df, tabAdvanceWidth as dg, tabStopsFingerprint as dh, withDefaultTabInterval as di, withNumberingStyleLinks as dj, withResolvedListItems as dk };
|
|
3861
|
+
export type { SourceRange as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, DrawingPoint as D, NumberingLevelIndent as E, FontResourceSnapshot as F, ResolvedListItem as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, RefFieldContext as J, InlineDrawingLayoutContext as K, LineRecord as L, ModelRange as M, NoteAreaRecord as N, CellBorderBox as O, ParagraphFragmentRecord as P, TableBorderBox as Q, ResolvedRunStyle as R, SemanticLayout as S, TextMeasurer as T, UnsupportedElement as U, VersionedShapingLibrary as V, TableCellStyleFormatting as W, TableFloatPosition as X, StyleCascadeTable as Y, FixedPoint as Z, FontByteValidator as _, PageRecord as a, ListSuffix as a$, HyperlinkProjector as a0, FieldLinkProjector as a1, StoryPageFieldNeeds as a2, HyperlinkFieldSpec as a3, SpanLinkRecord as a4, PageGeometry as a5, SectionColumns as a6, SectionPageBorders as a7, PageBorderFrameRecord as a8, ParagraphBorderStrokeRecord as a9, EquationBarGeometry as aA, EquationFractionGeometry as aB, EquationGeometry as aC, EquationNaryGeometry as aD, EquationRadicalGeometry as aE, EquationRowGeometry as aF, EquationScriptGeometry as aG, EquationSpanRecord as aH, EquationTextGeometry as aI, FieldAtomMarker as aJ, FontFingerprintInputs as aK, FontResolutionErrorCode as aM, FontResourceDefinition as aN, FontResourceInstrumentation as aO, FontResourceSnapshotOptions as aP, FontSlot as aQ, FontValidationResult as aR, GlyphOutline as aS, GroupTextboxStoryRecord as aT, LevelOverride as aX, LineSpacingRule as aY, ListMarkerAlign as aZ, ListMarkerRecord as a_, StrikeoutStrokePt as aa, AbstractNumDefinition as ac, AnchoredDrawingLayoutFallback as ad, BidiEmbeddingLevels as ae, BorderGridGeometry as af, CascadedParagraphFormatting as ag, CjkTypographySettings as ah, ContentControlGeometryFragment as ai, ContentControlLevel as aj, ContentControlMappedType as ak, ContentControlModelRange as al, DeclaredFontSubstitution as ar, DocumentSection as as, DocumentSectionsEnumeration as at, DrawingClipFallback as au, DrawingGeometry as av, DrawingGroupPictureRecord as aw, DrawingTextArtRecord as ax, LayoutBox as b, StyleDefinition as b$, ResolvedTableBorderEdge as bA, ResolvedTableBorderEdgeSegment as bB, ResolvedUnderline as bC, ScriptItem as bE, SectionBreakMarkRecord as bF, SectionBreakType as bG, SectionColumnDefinition as bH, SectionMargins as bI, SectionPageNumbering as bJ, SemanticArtifactRootStoryKind as bK, SemanticArtifactStoryKind as bL, SemanticCommentArtifactRecord as bM, SemanticReviewArtifactOccurrence as bN, SemanticReviewArtifactOccurrenceGeometry as bO, SemanticReviewArtifactPosition as bP, SemanticReviewArtifactSource as bQ, SemanticTrackedChangeArtifactRecord as bR, ShapeInput as bS, ShapedCluster as bT, ShapedFontSpan as bU, ShapedGlyph as bV, ShapedRunComparatorInputs as bW, ShapedVerticalMetrics as bX, ShapingContext as bY, ShapingEnvironment as bZ, ShapingEnvironmentFingerprintInputs as b_, NumDefinition as bb, NumberingPictureBullet as bc, PageBorderDisplay as bf, PageBorderOffsetFrom as bg, PageBorderSide as bh, PageBorderStrokeRecord as bi, PageBorderZOrder as bj, PageRefCalibrationCell as bk, PageRefFieldProjection as bl, ParagraphAutoSpacingContext as bm, ParagraphBorderEdge as bn, ParagraphBorderSide as bo, ParagraphBorders as bp, ParagraphBottomBorderRecord as bq, ParagraphIndent as br, ParagraphLayoutInputs as bs, ParagraphLineSpacing as bt, ParagraphSpacing as bu, RefFieldSpec as bv, RefNoteParts as bw, ResolvedCellBorders as bx, ResolvedPictureBullet as by, ResolvedTabStops as bz, NoteStoryRecord as c, TabAlignment as c1, TabDestination as c2, TabLeader as c3, TabStop as c4, TableBorderSideName as c5, TableBorderStrokeRecord as c6, TableFragmentRecord as c7, TextArtFit as c8, TextDirection as c9, TextOutline as ca, TextboxStoryFallbackReason as cb, TextboxStoryLayout as cc, VerticalAlign as ce, ContentControlLock as d, UnsupportedElementLayout as e, UnsupportedElementRule as f, StyleSpanRecord as g, TableRowFragmentRecord as h, TableCellFragmentRecord as i, ShapingEnvironmentInput as j, TextShaper as k, ResolvedFont as l, NormalizationPolicy as m, FixedPointRoundingMode as n, FontRequest as o, SemanticReviewArtifactRecord as p, ListMarkerPictureRecord as q, FontSubstitution as r, ShapedRun as s, SectionProperties as t, NumberingLevel as u, NumberingIndex as v, DrawingInsets as w, TableBorderSide as x, TableFloatXSpec as y, TableFloatYSpec as z };
|