@docx-editor.dev/core 2.31.0 → 2.33.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 +25 -1
- package/THIRD_PARTY_NOTICES.md +1 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +16 -54
- 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-CrPI9ZQc.d.ts} +128 -38
- package/dist/chunk-23MKR33J.js +4 -0
- package/dist/chunk-2CWQY27B.cjs +1 -0
- package/dist/chunk-2DEY5NUC.cjs +32 -0
- package/dist/chunk-2DR4TH6B.js +1 -0
- package/dist/chunk-2F2UEAE2.js +2 -0
- package/dist/chunk-2GPGAFOJ.cjs +5 -0
- package/dist/chunk-ALD626VU.cjs +2 -0
- package/dist/chunk-AU33YWEJ.js +236 -0
- package/dist/chunk-AXU63LYW.cjs +1 -0
- package/dist/chunk-CM5VZRBV.js +32 -0
- package/dist/chunk-D7FAFFTN.js +1 -0
- package/dist/chunk-DYUVJNDD.cjs +1 -0
- package/dist/chunk-ESYUKD5D.js +2 -0
- package/dist/chunk-F7TGQMVR.js +5 -0
- package/dist/chunk-FLW7KIQX.js +30 -0
- package/dist/chunk-JG4A6W6I.js +7 -0
- package/dist/chunk-JNGLSBPH.js +2 -0
- package/dist/chunk-KE6ZWRIY.cjs +236 -0
- package/dist/chunk-L3YXJDPX.js +1 -0
- package/dist/chunk-LI42N7OW.cjs +4 -0
- package/dist/chunk-PLKDS4JT.js +1 -0
- package/dist/chunk-PXMTQ73F.cjs +2 -0
- package/dist/chunk-R4R3AAE4.js +1 -0
- package/dist/chunk-RFUNFTGV.cjs +1 -0
- package/dist/chunk-SVM6PGMS.js +3 -0
- package/dist/chunk-SZURLHR3.cjs +3 -0
- package/dist/chunk-UYCGCVZ2.cjs +1 -0
- package/dist/chunk-WN7ICTA5.js +1 -0
- package/dist/chunk-X34QRAUU.cjs +1 -0
- package/dist/chunk-XNBYG4XJ.cjs +30 -0
- package/dist/chunk-ZDFJW5XS.cjs +2 -0
- package/dist/chunk-ZWO4JHNN.cjs +7 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +29 -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-AqY5KpVx.d.ts} +7 -2
- package/dist/diagnostic-context-CuzhOX0g.d.ts +98 -0
- package/dist/{diagnostic-hints-C9JlLz1L.d.ts → diagnostic-hints-BtCaCqQC.d.ts} +4 -4
- package/dist/{document-protection-C8x3P2J6.d.ts → document-protection-BvbpSXbQ.d.ts} +1 -1
- package/dist/drawing-graphic-kind-CXYGYbB3.d.ts +324 -0
- package/dist/drawing-preview-package-B9lSLRg4.d.ts +115 -0
- package/dist/{editor-B2ShlO23.d.ts → editor-B7OOAAie.d.ts} +181 -244
- package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/dist/{editor-scope-C7ke1KJG.d.ts → editor-scope-CA6egMaK.d.ts} +6 -2
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +4 -4
- package/dist/editor.d.ts +259 -31
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +48 -19
- package/dist/export.js +2 -2
- package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/dist/{font-resolver-CWh40DYp.d.ts → font-resolver-Bm9XqTNO.d.ts} +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +43 -26
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-CWS3j0Xr.d.ts → layout-shaping-Ci_BTnSU.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +181 -99
- package/dist/layout.js +1 -1
- package/dist/metafile-drawing-DtMFyMKq.d.ts +107 -0
- package/dist/{note-properties-QsKh24sM.d.ts → note-properties-DCIJUKIy.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-Cp_QzVxS.d.ts} +75 -5
- package/dist/{review-paragraph-order-C_QbCKcH.d.ts → review-paragraph-order-BJQ43_r0.d.ts} +1 -1
- package/dist/revision-projection-OVusTS77.d.ts +258 -0
- package/dist/{semantic-cell-selection-Cub9FDa8.d.ts → semantic-cell-selection-CoI5hHBm.d.ts} +2 -2
- package/dist/{semantic-interaction-dApRIYpt.d.ts → semantic-interaction-BbA4dgEo.d.ts} +1 -1
- package/dist/{semantic-paint-DLzA8sjP.d.ts → semantic-paint-B5JcIv9c.d.ts} +19 -9
- package/dist/{semantic-record-queries-3yp9o11g.d.ts → semantic-record-queries-DnO8J5_j.d.ts} +1 -1
- package/dist/{semantic-records-B-akgRch.d.ts → semantic-records-DoK0lNjS.d.ts} +439 -418
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +511 -20
- package/dist/store.js +1 -1
- package/dist/{types-barrel-CkF2JbU4.d.ts → tree-op-types-Df4oY2u4.d.ts} +1081 -524
- package/dist/{tree-package-store-B8l8DX3Z.d.ts → tree-package-store-DXhX1PE-.d.ts} +8 -3
- package/dist/{tree-session-contract-DeLRqohz.d.ts → tree-session-contract-CF2625mv.d.ts} +5 -5
- package/dist/unsupported-elements-CUojsaCr.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/licenses/ECMA-376.md +29 -0
- package/package.json +3 -2
- package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
- package/dist/chunk-243W4WW2.cjs +0 -2
- package/dist/chunk-2E2RPEKX.js +0 -1
- package/dist/chunk-4S24UOPG.js +0 -30
- package/dist/chunk-5JPIEN54.cjs +0 -3
- 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-MOYYRVFV.cjs +0 -2
- 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-XSTGE3NI.cjs +0 -1
- package/dist/chunk-YQWMI6J5.cjs +0 -7
- package/dist/chunk-ZCJS7D7S.js +0 -2
- package/dist/diagnostic-context-DJ0P1uZE.d.ts +0 -31
- package/dist/headless-document-view-qOpaCF82.d.ts +0 -143
- 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, aC as OoxmlProperty, O as OoxmlPart, av as OoxmlElement, aX as TableBorderStyle, aY as TextboxOutlineProjection, af as ImageResourceState, aT as SourceCrop, aZ as VectorShapeComponent, a_ as DrawingAccessibility, a$ as DrawingImageEffects, aW as DrawingTransform, b0 as DrawingChartSummary, b1 as VectorShapeProjection, b2 as PictureFrameEffects, a7 as DrawingHorizontalReferenceFrame, ab as DrawingVerticalReferenceFrame, ag as ImageWrapTarget, b3 as DrawingProjection, b4 as OoxmlDrawingNode } from './tree-op-types-Df4oY2u4.js';
|
|
2
|
+
import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-OVusTS77.js';
|
|
3
|
+
import { O as OmmlEquationProjection, a as DrawingSupport, b as DrawingSupportIssue, D as DrawingGraphicKind, H as HeadlessDocumentView } from './drawing-graphic-kind-CXYGYbB3.js';
|
|
241
4
|
|
|
242
5
|
/**
|
|
243
6
|
* Whether a paragraph must start a new page (`w:pageBreakBefore`).
|
|
@@ -339,6 +102,15 @@ interface ParagraphLineSpacing {
|
|
|
339
102
|
readonly value: number;
|
|
340
103
|
/** Legacy noExtraLineSpacing: retain the natural baseline within an exact-height box. */
|
|
341
104
|
readonly preserveExactBaseline?: true;
|
|
105
|
+
/** A wrap band tests only the line's content, not the extra an `auto` multiple adds. @internal */
|
|
106
|
+
readonly wrapsContentOnly?: true;
|
|
107
|
+
/**
|
|
108
|
+
* DrawingML shape text: an `auto` line keeps its descent at the bottom of the box, so the
|
|
109
|
+
* space a multiple adds or removes is above the glyphs, never below them.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
readonly descentAnchored?: true;
|
|
342
114
|
/**
|
|
343
115
|
* Active section line-grid pitch in points (`w:docGrid/@w:linePitch`). Present only when
|
|
344
116
|
* the paragraph snaps to the grid; only with `auto`. See `line-grid.ts`.
|
|
@@ -600,6 +372,8 @@ interface SectionColumns {
|
|
|
600
372
|
readonly separator?: boolean;
|
|
601
373
|
/** Authored `w:col` geometry when `equalWidth` is false. */
|
|
602
374
|
readonly definitions?: readonly SectionColumnDefinition[];
|
|
375
|
+
/** A right-to-left section (`w:bidi`): the first column is the rightmost. */
|
|
376
|
+
readonly rightToLeft?: true;
|
|
603
377
|
}
|
|
604
378
|
/**
|
|
605
379
|
* How this section is placed relative to the previous one (ECMA-376 17.6.22,
|
|
@@ -753,7 +527,7 @@ declare function geometryOfSection(section: SectionProperties): PageGeometry;
|
|
|
753
527
|
|
|
754
528
|
/**
|
|
755
529
|
* `w:tblpPr/@w:horzAnchor` (17.4.58) and `@w:vertAnchor` (17.4.66): the box a floated
|
|
756
|
-
* table's offsets are measured from.
|
|
530
|
+
* table's offsets are measured from. An absent horizontal anchor means `text`; an absent vertical anchor means `margin`.
|
|
757
531
|
*/
|
|
758
532
|
type TableFloatAnchor = 'text' | 'margin' | 'page';
|
|
759
533
|
/** `w:tblpPr/@w:tblpXSpec` (17.4.63, ST_XAlign). */
|
|
@@ -1673,112 +1447,6 @@ interface StoryPageFieldNeeds {
|
|
|
1673
1447
|
readonly hasPageParity?: boolean;
|
|
1674
1448
|
}
|
|
1675
1449
|
|
|
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
1450
|
/** One recognized REF instruction: the target name and the supported switches, nothing else. */
|
|
1783
1451
|
interface RefFieldSpec {
|
|
1784
1452
|
readonly bookmark: string;
|
|
@@ -1888,6 +1556,262 @@ interface RefNoteParts {
|
|
|
1888
1556
|
*/
|
|
1889
1557
|
declare function resolveStoryRefFields(blocks: readonly OoxmlElement[], listItems: ReadonlyMap<string, ResolvedListItem> | undefined, notes?: RefNoteParts): RefFieldContext | null;
|
|
1890
1558
|
|
|
1559
|
+
interface EquationGeometryBase {
|
|
1560
|
+
readonly box: LayoutBox;
|
|
1561
|
+
/** Baseline measured from this node's top edge. */
|
|
1562
|
+
readonly baseline: number;
|
|
1563
|
+
}
|
|
1564
|
+
interface EquationTextGeometry extends EquationGeometryBase {
|
|
1565
|
+
readonly kind: 'text' | 'fallback';
|
|
1566
|
+
readonly text: string;
|
|
1567
|
+
readonly fontSizePt: number;
|
|
1568
|
+
/** The same resolved face used by measurement and the trusted paint sink. */
|
|
1569
|
+
readonly runStyle?: ResolvedRunStyle;
|
|
1570
|
+
}
|
|
1571
|
+
interface EquationRowGeometry extends EquationGeometryBase {
|
|
1572
|
+
readonly kind: 'row';
|
|
1573
|
+
readonly items: readonly EquationGeometry[];
|
|
1574
|
+
}
|
|
1575
|
+
interface EquationFractionGeometry extends EquationGeometryBase {
|
|
1576
|
+
readonly kind: 'fraction';
|
|
1577
|
+
readonly numerator: EquationGeometry;
|
|
1578
|
+
readonly denominator: EquationGeometry;
|
|
1579
|
+
readonly bar: LayoutBox;
|
|
1580
|
+
}
|
|
1581
|
+
interface EquationRadicalGeometry extends EquationGeometryBase {
|
|
1582
|
+
readonly kind: 'radical';
|
|
1583
|
+
readonly sign: EquationTextGeometry;
|
|
1584
|
+
readonly radicand: EquationGeometry;
|
|
1585
|
+
readonly degree?: EquationGeometry;
|
|
1586
|
+
readonly bar: LayoutBox;
|
|
1587
|
+
}
|
|
1588
|
+
interface EquationBarGeometry extends EquationGeometryBase {
|
|
1589
|
+
readonly kind: 'bar';
|
|
1590
|
+
readonly body: EquationGeometry;
|
|
1591
|
+
readonly bar: LayoutBox;
|
|
1592
|
+
}
|
|
1593
|
+
interface EquationScriptGeometry extends EquationGeometryBase {
|
|
1594
|
+
readonly kind: 'script';
|
|
1595
|
+
readonly base: EquationGeometry;
|
|
1596
|
+
readonly subscript?: EquationGeometry;
|
|
1597
|
+
readonly superscript?: EquationGeometry;
|
|
1598
|
+
}
|
|
1599
|
+
interface EquationNaryGeometry extends EquationGeometryBase {
|
|
1600
|
+
readonly kind: 'nary';
|
|
1601
|
+
readonly operator: EquationTextGeometry;
|
|
1602
|
+
readonly body: EquationGeometry;
|
|
1603
|
+
readonly lowerLimit?: EquationGeometry;
|
|
1604
|
+
readonly upperLimit?: EquationGeometry;
|
|
1605
|
+
}
|
|
1606
|
+
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
1607
|
+
/** Equation metadata carried by one atomic semantic span. */
|
|
1608
|
+
interface EquationSpanRecord {
|
|
1609
|
+
readonly sourceNodeId: string;
|
|
1610
|
+
readonly geometry: EquationGeometry;
|
|
1611
|
+
readonly fallbackText: string;
|
|
1612
|
+
readonly truncated: boolean;
|
|
1613
|
+
}
|
|
1614
|
+
/** Compose one bounded OMML projection into paint-ready point geometry. */
|
|
1615
|
+
declare function layoutEquation(projection: OmmlEquationProjection, measurer: TextMeasurer, style: ResolvedRunStyle): EquationSpanRecord;
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* One occurrence that a custom component can replace: a placeholder for content the editor
|
|
1619
|
+
* cannot render, or, with `includePartial`, a drawing that the editor renders without some
|
|
1620
|
+
* features. The drawing fields are present only for drawings.
|
|
1621
|
+
*
|
|
1622
|
+
* @public
|
|
1623
|
+
*/
|
|
1624
|
+
interface UnsupportedElement {
|
|
1625
|
+
/**
|
|
1626
|
+
* How completely the editor shows this drawing: `unrendered` for a placeholder, or
|
|
1627
|
+
* `partial` for a drawing that renders without some features, offered only with
|
|
1628
|
+
* `includePartial`. Absent for content that is not a drawing.
|
|
1629
|
+
*/
|
|
1630
|
+
readonly support?: Exclude<DrawingSupport, 'native'>;
|
|
1631
|
+
/**
|
|
1632
|
+
* The features of this drawing that the editor does not show as authored, read from its
|
|
1633
|
+
* own XML. Chart and diagram parts, inherited theme effects, and image bytes are not read,
|
|
1634
|
+
* so an empty list does not prove fidelity.
|
|
1635
|
+
* Never holds `unplaced-drawing` or `projection-diagnostic`, which only a report lists. For
|
|
1636
|
+
* a placeholder, `graphicKind` names the graphic that the editor cannot draw.
|
|
1637
|
+
*/
|
|
1638
|
+
readonly drawingIssues?: readonly DrawingSupportIssue[];
|
|
1639
|
+
/**
|
|
1640
|
+
* The graphic a drawing holds, such as `picture`, `chart`, or `diagram`, from its source.
|
|
1641
|
+
* Note: `textbox` names every DrawingML shape, with or without text, and `shape` names only
|
|
1642
|
+
* legacy VML drawings.
|
|
1643
|
+
*/
|
|
1644
|
+
readonly graphicKind?: DrawingGraphicKind;
|
|
1645
|
+
/** The node the occurrence comes from, in the editor's current document. */
|
|
1646
|
+
readonly nodeId: string;
|
|
1647
|
+
/** The part that holds it, such as `/word/document.xml` or `/word/header1.xml`. */
|
|
1648
|
+
readonly ownerPartName: string;
|
|
1649
|
+
/** The namespace of the source element, such as the WordprocessingML namespace. */
|
|
1650
|
+
readonly namespaceUri: string | null;
|
|
1651
|
+
/** The local name of the source element, such as `drawing` or `AlternateContent`. */
|
|
1652
|
+
readonly localName: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* Lossless canonical source. Treat this value as read-only and untrusted.
|
|
1655
|
+
* The object identity stays unchanged until the drawing content changes.
|
|
1656
|
+
* Use `source` to identify cached previews across component remounts.
|
|
1657
|
+
* Editor occurrences always provide a source. Standalone painters without a source lookup
|
|
1658
|
+
* return `null`.
|
|
1659
|
+
*/
|
|
1660
|
+
readonly source: OoxmlElement | null;
|
|
1661
|
+
/** `inline` inside a line of text, or `block` between paragraphs. */
|
|
1662
|
+
readonly placement: 'inline' | 'block';
|
|
1663
|
+
/** The text of the built-in placeholder. */
|
|
1664
|
+
readonly label: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* Reserved geometry in document points, when the element has been laid out. Always present
|
|
1667
|
+
* for a drawing, and it includes the effect extent, as the page of
|
|
1668
|
+
* `createDrawingPreviewPackage` does.
|
|
1669
|
+
*/
|
|
1670
|
+
readonly bounds?: LayoutBox;
|
|
1671
|
+
/**
|
|
1672
|
+
* The layout record of a drawing. Use `graphicKind` to identify the graphic: the record's
|
|
1673
|
+
* `placeholderGraphicKind` names the graphic only for placeholders. A chart whose chart part
|
|
1674
|
+
* can be read also carries `chart`, whose `shownAs` describes the native presentation.
|
|
1675
|
+
* Absent for other content.
|
|
1676
|
+
*/
|
|
1677
|
+
readonly drawing?: InlineDrawingRecord | AnchoredDrawingRecord;
|
|
1678
|
+
/** The layout record of an equation shown as the built-in placeholder. */
|
|
1679
|
+
readonly equation?: EquationSpanRecord;
|
|
1680
|
+
}
|
|
1681
|
+
/** Dimensions reserved before pagination, in document points. @public */
|
|
1682
|
+
interface UnsupportedElementLayout {
|
|
1683
|
+
/** Width in points: finite, positive, and at most 100,000. */
|
|
1684
|
+
readonly width: number;
|
|
1685
|
+
/** Height in points: finite, positive, and at most 100,000. */
|
|
1686
|
+
readonly height: number;
|
|
1687
|
+
}
|
|
1688
|
+
/** The first matching registration renders each unsupported element. @public */
|
|
1689
|
+
interface UnsupportedElementRule {
|
|
1690
|
+
/**
|
|
1691
|
+
* Include partially rendered drawings (`support: 'partial'`). Defaults to `false`.
|
|
1692
|
+
* Excludes fully supported drawings, hidden drawings, and drawings without a layout position.
|
|
1693
|
+
* Excludes shapes with editable text. Partially rendered shapes without text remain eligible.
|
|
1694
|
+
*/
|
|
1695
|
+
readonly includePartial?: boolean;
|
|
1696
|
+
/**
|
|
1697
|
+
* Return true to replace this occurrence. Omit to match every offered occurrence. Offered
|
|
1698
|
+
* occurrences also include equations and other content that is not a drawing; test
|
|
1699
|
+
* `element.drawing` to match drawings only.
|
|
1700
|
+
*/
|
|
1701
|
+
readonly match?: (element: UnsupportedElement) => boolean;
|
|
1702
|
+
/** The box to reserve for content that has no layout box of its own, in points. */
|
|
1703
|
+
readonly layout?: UnsupportedElementLayout;
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Whether a rule claims an occurrence. Adapters use it to pick the first matching
|
|
1707
|
+
* declaration; hosts with their own registration can use it the same way.
|
|
1708
|
+
*
|
|
1709
|
+
* @public
|
|
1710
|
+
*/
|
|
1711
|
+
declare function unsupportedElementRuleMatches(rule: UnsupportedElementRule, element: UnsupportedElement): boolean;
|
|
1712
|
+
|
|
1713
|
+
/** Reserved geometry for one opaque content component. @internal */
|
|
1714
|
+
interface UnsupportedContentRecord {
|
|
1715
|
+
readonly element: UnsupportedElement;
|
|
1716
|
+
readonly display: 'inline' | 'block';
|
|
1717
|
+
readonly width: number;
|
|
1718
|
+
readonly height: number;
|
|
1719
|
+
}
|
|
1720
|
+
/** Host dimensions in points; absent keeps the engine's hidden fallback. @internal */
|
|
1721
|
+
type UnsupportedContentResolver = (element: UnsupportedElement) => UnsupportedElementLayout | null | undefined;
|
|
1722
|
+
/**
|
|
1723
|
+
* Create one projection per renderer registration set. Reused source parts retain identity.
|
|
1724
|
+
* The result is layout input only. Never serialize it or use it as an editing store.
|
|
1725
|
+
* @internal
|
|
1726
|
+
*/
|
|
1727
|
+
declare function createUnsupportedContentProjector(resolve: UnsupportedContentResolver): {
|
|
1728
|
+
part(part: OoxmlPart): OoxmlPart;
|
|
1729
|
+
view(view: HeadlessDocumentView): HeadlessDocumentView;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
1734
|
+
* within.
|
|
1735
|
+
*
|
|
1736
|
+
* The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
|
|
1737
|
+
* reordering needs, and collapsing it early loses nested isolates.
|
|
1738
|
+
*/
|
|
1739
|
+
interface BidiEmbeddingLevels {
|
|
1740
|
+
readonly levels: Uint8Array;
|
|
1741
|
+
readonly paragraphs: readonly {
|
|
1742
|
+
readonly start: number;
|
|
1743
|
+
readonly end: number;
|
|
1744
|
+
readonly level: number;
|
|
1745
|
+
}[];
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* Which `w:rFonts` slot a character resolves its face through.
|
|
1750
|
+
*
|
|
1751
|
+
* OOXML gives a run up to four faces and picks between them by SCRIPT, so one run of mixed Latin
|
|
1752
|
+
* and CJK text uses two different fonts without saying so anywhere in its properties.
|
|
1753
|
+
*/
|
|
1754
|
+
type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
|
|
1755
|
+
/**
|
|
1756
|
+
* A run of text sharing one script, direction and font slot — the unit handed to the shaper.
|
|
1757
|
+
*
|
|
1758
|
+
* Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
|
|
1759
|
+
* behaviour, so a run is itemized into these first.
|
|
1760
|
+
*/
|
|
1761
|
+
interface ScriptItem {
|
|
1762
|
+
readonly from: number;
|
|
1763
|
+
readonly to: number;
|
|
1764
|
+
readonly direction: TextDirection;
|
|
1765
|
+
readonly bidiLevel: number;
|
|
1766
|
+
readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
|
|
1767
|
+
readonly slot: FontSlot;
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* A code point whose script this engine does not itemize.
|
|
1771
|
+
*
|
|
1772
|
+
* Carries the offending `codePoint` so the caller can report which character stopped it, rather
|
|
1773
|
+
* than failing anonymously somewhere in the middle of a paragraph.
|
|
1774
|
+
*/
|
|
1775
|
+
declare class UnsupportedScriptError extends Error {
|
|
1776
|
+
readonly name = "UnsupportedScriptError";
|
|
1777
|
+
readonly code = "unsupportedScript";
|
|
1778
|
+
readonly codePoint: number;
|
|
1779
|
+
constructor(codePoint: number);
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Split text into shapeable runs by script, bidi level and font slot.
|
|
1783
|
+
*
|
|
1784
|
+
* Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
|
|
1785
|
+
* by construction instead of by two implementations happening to match.
|
|
1786
|
+
*/
|
|
1787
|
+
declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
|
|
1788
|
+
/**
|
|
1789
|
+
* The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
|
|
1790
|
+
*
|
|
1791
|
+
* This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
|
|
1792
|
+
* style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
|
|
1793
|
+
* and the format painter see the run as authored — and every consumer that turns text into
|
|
1794
|
+
* geometry or ink resolves the face through here. The derived object is memoized per
|
|
1795
|
+
* (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
|
|
1796
|
+
* keep their caches.
|
|
1797
|
+
*/
|
|
1798
|
+
declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
|
|
1802
|
+
*
|
|
1803
|
+
* `target` and `anchor` are verbatim from the instruction — the projector at the trust
|
|
1804
|
+
* boundary decides what, if anything, they become in a DOM sink.
|
|
1805
|
+
*/
|
|
1806
|
+
interface HyperlinkFieldSpec {
|
|
1807
|
+
/** The target as authored (first quoted or bare non-switch token), or null. */
|
|
1808
|
+
readonly target: string | null;
|
|
1809
|
+
/** `\l` — a bookmark name in this document, or null. */
|
|
1810
|
+
readonly anchor: string | null;
|
|
1811
|
+
/** `\o` — the hover tooltip, or null. */
|
|
1812
|
+
readonly tooltip: string | null;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1891
1815
|
/**
|
|
1892
1816
|
* What a piece says about the FIELD result it came from, for Word's shading.
|
|
1893
1817
|
*
|
|
@@ -2122,6 +2046,20 @@ declare function tabAdvanceWidth(alignment: TabAlignment, currentX: number, dest
|
|
|
2122
2046
|
*/
|
|
2123
2047
|
declare function tabStopsFingerprint(tabs: ResolvedTabStops): string;
|
|
2124
2048
|
|
|
2049
|
+
/** One layout-owned diagonal stroke, clipped to its cell-local rectangle. */
|
|
2050
|
+
interface TableCellDiagonalRecord {
|
|
2051
|
+
readonly direction: 'tl2br' | 'tr2bl';
|
|
2052
|
+
readonly x1: number;
|
|
2053
|
+
readonly y1: number;
|
|
2054
|
+
readonly x2: number;
|
|
2055
|
+
readonly y2: number;
|
|
2056
|
+
readonly widthPt: number;
|
|
2057
|
+
readonly color: string | null;
|
|
2058
|
+
readonly cssStyle: 'solid' | 'dashed' | 'dotted';
|
|
2059
|
+
readonly clipWidth: number;
|
|
2060
|
+
readonly clipHeight: number;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2125
2063
|
/** Test-only mutable counters; omitted by production call sites. Not package-public. */
|
|
2126
2064
|
interface TableBorderGridResolveWork {
|
|
2127
2065
|
/** Sparse intervals emitted (not dense column slots). */
|
|
@@ -2164,6 +2102,8 @@ interface TableBorderBox {
|
|
|
2164
2102
|
}
|
|
2165
2103
|
/** The four resolved edges of one cell, after conflict resolution against its neighbours. */
|
|
2166
2104
|
interface CellBorderBox {
|
|
2105
|
+
readonly tl2br?: TableBorderSide;
|
|
2106
|
+
readonly tr2bl?: TableBorderSide;
|
|
2167
2107
|
readonly top: TableBorderSide;
|
|
2168
2108
|
readonly left: TableBorderSide;
|
|
2169
2109
|
readonly bottom: TableBorderSide;
|
|
@@ -2214,6 +2154,7 @@ interface TableBorderStrokeRecord {
|
|
|
2214
2154
|
* only on `edgeSegments`. Compound geometry is always on `strokes`.
|
|
2215
2155
|
*/
|
|
2216
2156
|
interface ResolvedCellBorders {
|
|
2157
|
+
readonly diagonals?: readonly TableCellDiagonalRecord[];
|
|
2217
2158
|
readonly top?: ResolvedTableBorderEdge;
|
|
2218
2159
|
readonly left?: ResolvedTableBorderEdge;
|
|
2219
2160
|
readonly bottom?: ResolvedTableBorderEdge;
|
|
@@ -2336,6 +2277,8 @@ interface TextboxStoryLayout {
|
|
|
2336
2277
|
* insets. Placement resolves the shape at this width. Absent when the extent width holds.
|
|
2337
2278
|
*/
|
|
2338
2279
|
readonly extentWidth?: number;
|
|
2280
|
+
/** Box height a story that fits its shape sizes it to; absent when the extent height holds. */
|
|
2281
|
+
readonly extentHeight?: number;
|
|
2339
2282
|
/** Content box height (extent minus vertical insets). */
|
|
2340
2283
|
readonly contentHeight: number;
|
|
2341
2284
|
/** Solid fill of the hosting shape, painted behind the story; null for no fill. */
|
|
@@ -2344,8 +2287,45 @@ interface TextboxStoryLayout {
|
|
|
2344
2287
|
readonly strokeHex: string | null;
|
|
2345
2288
|
/** Outline width in points; 0 when absent. */
|
|
2346
2289
|
readonly strokeWidthPt: number;
|
|
2290
|
+
/**
|
|
2291
|
+
* Clockwise turn of the content box about `pivot`, in drawing-extent points. Absent when
|
|
2292
|
+
* the story is upright: vertical text and text that turns with its shape set it.
|
|
2293
|
+
*/
|
|
2294
|
+
readonly contentRotation?: Readonly<{
|
|
2295
|
+
degrees: number;
|
|
2296
|
+
pivot: Readonly<{
|
|
2297
|
+
x: number;
|
|
2298
|
+
y: number;
|
|
2299
|
+
}>;
|
|
2300
|
+
}>;
|
|
2301
|
+
/** Shape outline painted instead of a rectangle; absent for a rectangle. */
|
|
2302
|
+
readonly outline?: TextboxOutlineProjection;
|
|
2303
|
+
/** Clockwise turn of the fill and outline about the extent centre; absent when upright. */
|
|
2304
|
+
readonly chromeRotationDegrees?: number;
|
|
2305
|
+
/** The outline is centred on the extent edge rather than inside it. */
|
|
2306
|
+
readonly strokeCentered?: true;
|
|
2307
|
+
/** Outline dash pattern in points; absent for solid. */
|
|
2308
|
+
readonly strokeDashPt?: readonly number[];
|
|
2309
|
+
/** How outline dashes end; absent for flat ends. */
|
|
2310
|
+
readonly strokeCap?: 'round' | 'square';
|
|
2311
|
+
/** Shadow colour, opacity and page offset in points. */
|
|
2312
|
+
readonly shadow?: Readonly<{
|
|
2313
|
+
hex: string;
|
|
2314
|
+
alpha: number;
|
|
2315
|
+
dx: number;
|
|
2316
|
+
dy: number;
|
|
2317
|
+
/** The solid silhouette, seen only outside the shape; no text shadow. */
|
|
2318
|
+
obscured: boolean;
|
|
2319
|
+
}>;
|
|
2347
2320
|
/** True when layout hit a named bound and returned a truncated / empty story. */
|
|
2348
2321
|
readonly fallbackReason?: TextboxStoryFallbackReason;
|
|
2322
|
+
/** DrawingML shape text: lines past the box paint outside it, not clipped at the drawing. */
|
|
2323
|
+
readonly overflowVisible?: true;
|
|
2324
|
+
/**
|
|
2325
|
+
* The drawing's `vectorShape` paints the box; the fill, outline and shadow fields here only
|
|
2326
|
+
* describe it, and painters draw just the text.
|
|
2327
|
+
*/
|
|
2328
|
+
readonly chromeByVector?: true;
|
|
2349
2329
|
/**
|
|
2350
2330
|
* Resource identities of the drawings the clip DROPPED, in flow order.
|
|
2351
2331
|
*
|
|
@@ -2375,6 +2355,32 @@ interface GroupTextboxStoryRecord {
|
|
|
2375
2355
|
readonly rotationDegrees: number;
|
|
2376
2356
|
}
|
|
2377
2357
|
|
|
2358
|
+
/** One picture member of a drawing group after the first, as a drawing record holds it. */
|
|
2359
|
+
interface DrawingGroupPictureLayerRecord {
|
|
2360
|
+
/** The picture's own image resource, resolved like the record's `resource`. */
|
|
2361
|
+
readonly resource: ImageResourceState;
|
|
2362
|
+
/** The picture's own `a:srcRect` crop, as fractions of the image. */
|
|
2363
|
+
readonly crop: SourceCrop;
|
|
2364
|
+
/**
|
|
2365
|
+
* The picture's frame as fractions of the drawing extent, which is
|
|
2366
|
+
* `geometry.contentBounds` of the record.
|
|
2367
|
+
*/
|
|
2368
|
+
readonly frameUnit: Readonly<{
|
|
2369
|
+
x: number;
|
|
2370
|
+
y: number;
|
|
2371
|
+
width: number;
|
|
2372
|
+
height: number;
|
|
2373
|
+
}>;
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* The record that paints one layer picture alone: the layer's resource and crop, with its
|
|
2377
|
+
* frame as the image corners, no vector members, no link, and no other layers. Every output
|
|
2378
|
+
* paints a layer through its ordinary group picture path with this record.
|
|
2379
|
+
*
|
|
2380
|
+
* @internal
|
|
2381
|
+
*/
|
|
2382
|
+
declare function groupPictureLayerDrawing<D extends InlineDrawingRecord | AnchoredDrawingRecord>(drawing: D, layer: DrawingGroupPictureLayerRecord): D;
|
|
2383
|
+
|
|
2378
2384
|
/** `x' = scaleX * x + offsetX`, `y' = scaleY * y + offsetY`, from text space into the box. */
|
|
2379
2385
|
interface TextArtFit {
|
|
2380
2386
|
readonly scaleX: number;
|
|
@@ -2406,18 +2412,65 @@ interface DrawingTextArtRecord {
|
|
|
2406
2412
|
readonly path: string | null;
|
|
2407
2413
|
/** Null when the measurer could not bound the string's ink: nothing paints. */
|
|
2408
2414
|
readonly fit: TextArtFit | null;
|
|
2415
|
+
/**
|
|
2416
|
+
* The geometry an installed text art layout drew, in EMU from the box's top-left corner,
|
|
2417
|
+
* unrotated. When present, paint draws these in place of `path`.
|
|
2418
|
+
*/
|
|
2419
|
+
readonly components?: readonly VectorShapeComponent[];
|
|
2420
|
+
/** Box-local bounds of the components' ink in points, when it reaches past the box. */
|
|
2421
|
+
readonly inkBounds?: Readonly<{
|
|
2422
|
+
left: number;
|
|
2423
|
+
top: number;
|
|
2424
|
+
right: number;
|
|
2425
|
+
bottom: number;
|
|
2426
|
+
}>;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
interface DrawingPoint {
|
|
2430
|
+
readonly x: number;
|
|
2431
|
+
readonly y: number;
|
|
2432
|
+
}
|
|
2433
|
+
interface DrawingInsets {
|
|
2434
|
+
readonly top: number;
|
|
2435
|
+
readonly right: number;
|
|
2436
|
+
readonly bottom: number;
|
|
2437
|
+
readonly left: number;
|
|
2438
|
+
}
|
|
2439
|
+
type DrawingClipFallback = 'none' | 'unsupported-preset';
|
|
2440
|
+
interface DrawingGeometry {
|
|
2441
|
+
readonly contentBounds: LayoutBox;
|
|
2442
|
+
readonly paintBounds: LayoutBox;
|
|
2443
|
+
readonly hitBounds: LayoutBox;
|
|
2444
|
+
readonly transformedCorners: readonly DrawingPoint[];
|
|
2445
|
+
/** Unclipped image corners for affine encoding; clipping must not stretch the image. */
|
|
2446
|
+
readonly imageTransformCorners?: readonly DrawingPoint[];
|
|
2447
|
+
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
2448
|
+
readonly clipFallback: DrawingClipFallback;
|
|
2449
|
+
readonly effectInsets: DrawingInsets;
|
|
2409
2450
|
}
|
|
2410
2451
|
|
|
2411
|
-
/**
|
|
2412
|
-
|
|
2452
|
+
/**
|
|
2453
|
+
* How a drawing record holds the picture member of a shape group.
|
|
2454
|
+
*
|
|
2455
|
+
* @public
|
|
2456
|
+
*/
|
|
2413
2457
|
interface DrawingGroupPictureRecord {
|
|
2414
2458
|
/**
|
|
2415
|
-
* Whether the group is the chosen branch of a run-level `mc:AlternateContent`.
|
|
2416
|
-
*
|
|
2417
|
-
* it cannot draw. A group without it shows the output's unsupported-drawing result.
|
|
2459
|
+
* Whether the group is the chosen branch of a run-level `mc:AlternateContent`.
|
|
2460
|
+
* Failed picture resources show one placeholder for the whole group.
|
|
2418
2461
|
*/
|
|
2419
2462
|
readonly alternateContent: boolean;
|
|
2420
2463
|
}
|
|
2464
|
+
/**
|
|
2465
|
+
* The kind of graphic a non-picture drawing holds: `chart` (a chart), `diagram` (SmartArt),
|
|
2466
|
+
* `textbox` (a DrawingML shape, with or without text), `group` (a shape group), `canvas` (a
|
|
2467
|
+
* drawing canvas), `shape` (a legacy VML drawing, such as WordArt), or `graphic` (any other
|
|
2468
|
+
* graphic). A picture, including an EMF, WMF or TIFF picture that does not convert, has none.
|
|
2469
|
+
*
|
|
2470
|
+
* @public
|
|
2471
|
+
*/
|
|
2472
|
+
type DrawingPlaceholderKind = 'chart' | 'diagram' | 'shape' | 'group' | 'textbox' | 'canvas' | 'graphic';
|
|
2473
|
+
|
|
2421
2474
|
interface InlineDrawingRecord {
|
|
2422
2475
|
readonly kind: 'inlineDrawing';
|
|
2423
2476
|
readonly drawingNodeId: string;
|
|
@@ -2448,10 +2501,26 @@ interface InlineDrawingRecord {
|
|
|
2448
2501
|
readonly effects: DrawingImageEffects;
|
|
2449
2502
|
readonly crop: SourceCrop;
|
|
2450
2503
|
readonly transform: DrawingTransform;
|
|
2451
|
-
/**
|
|
2452
|
-
readonly placeholderGraphicKind:
|
|
2504
|
+
/** Graphic kind of a non-picture drawing, naming its placeholder; null for pictures. */
|
|
2505
|
+
readonly placeholderGraphicKind: DrawingPlaceholderKind | null;
|
|
2506
|
+
/**
|
|
2507
|
+
* The title and plot types of a drawing that holds a chart whose chart part can be read, and
|
|
2508
|
+
* how the page shows it (`shownAs`): drawn, by its saved fallback, or as a placeholder.
|
|
2509
|
+
*/
|
|
2510
|
+
readonly chart?: DrawingChartSummary;
|
|
2511
|
+
/**
|
|
2512
|
+
* The resource of the picture saved in a chart's `mc:Fallback`, whichever branch the page
|
|
2513
|
+
* shows, for an output that exports a chart as its saved picture. Absent without one.
|
|
2514
|
+
*
|
|
2515
|
+
* @internal
|
|
2516
|
+
*/
|
|
2517
|
+
readonly chartFallbackResource?: ImageResourceState;
|
|
2453
2518
|
/** Typed solid-geometry payload for a renderable `wps:wsp` shape; null otherwise. */
|
|
2454
2519
|
readonly vectorShape: VectorShapeProjection | null;
|
|
2520
|
+
/** Legacy text art on the line, fitted to its box. */
|
|
2521
|
+
readonly textArt?: DrawingTextArtRecord;
|
|
2522
|
+
/** A picture's reflection and soft edges, in the extent's EMU; absent when it has none. */
|
|
2523
|
+
readonly frameEffects?: PictureFrameEffects;
|
|
2455
2524
|
/**
|
|
2456
2525
|
* Present when the image is the picture member of a drawing group. The image then fills
|
|
2457
2526
|
* the bounds of `geometry.imageTransformCorners`, not `geometry.contentBounds`, and paints
|
|
@@ -2461,6 +2530,11 @@ interface InlineDrawingRecord {
|
|
|
2461
2530
|
* shows no part of the group.
|
|
2462
2531
|
*/
|
|
2463
2532
|
readonly groupPicture?: DrawingGroupPictureRecord;
|
|
2533
|
+
/**
|
|
2534
|
+
* The group's other picture members, in document order. Each paints above the record's
|
|
2535
|
+
* own image and the layers before it, and below `vectorShape`. Absent for one picture.
|
|
2536
|
+
*/
|
|
2537
|
+
readonly groupPictureLayers?: readonly DrawingGroupPictureLayerRecord[];
|
|
2464
2538
|
/**
|
|
2465
2539
|
* The revision wrappers enclosing the owning run, outermost first — the same stack spans
|
|
2466
2540
|
* carry, so paint and review chrome give a tracked picture the same cues as tracked text.
|
|
@@ -2641,6 +2715,8 @@ declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
|
2641
2715
|
* styles part are never reused under another.
|
|
2642
2716
|
*/
|
|
2643
2717
|
interface StyleCascadeTable {
|
|
2718
|
+
/** Fill section columns without balancing: `w:noColumnBalance` is on in a legacy mode. */
|
|
2719
|
+
readonly noColumnBalance?: true;
|
|
2644
2720
|
/** Keep floating tables that fit a full page together under the compatibility flag. */
|
|
2645
2721
|
readonly doNotBreakWrappedTables?: true;
|
|
2646
2722
|
/** Legacy or explicitly disabled optional OpenType substitutions. */
|
|
@@ -2656,16 +2732,15 @@ interface StyleCascadeTable {
|
|
|
2656
2732
|
* spacing is a fixed 5pt before and 10pt after.
|
|
2657
2733
|
*/
|
|
2658
2734
|
readonly fixedParagraphSpacing?: true;
|
|
2659
|
-
/**
|
|
2660
|
-
* `w:doNotExpandShiftReturn`: a justified line ending in a manual line break keeps its
|
|
2661
|
-
* natural spacing, as a last line does.
|
|
2662
|
-
*/
|
|
2735
|
+
/** `w:doNotExpandShiftReturn`: a justified line before a manual break keeps natural spacing. */
|
|
2663
2736
|
readonly unstretchedManualBreakLines?: true;
|
|
2664
2737
|
/**
|
|
2665
2738
|
* Legacy modes: a justified line ending in a page or column break stretches to the measure
|
|
2666
2739
|
* unless it is the last line of its paragraph.
|
|
2667
2740
|
*/
|
|
2668
2741
|
readonly pageBreakLinesStretch?: true;
|
|
2742
|
+
/** `w:splitPgBreakAndParaMark` in a legacy mode: the mark after a page break takes a line. @internal */
|
|
2743
|
+
readonly pageBreakMarkOnNextPage?: true;
|
|
2669
2744
|
/** Explicit compatibility opt-in to the unmodified ISO table style hierarchy. */
|
|
2670
2745
|
readonly strictTableStyleHierarchy?: boolean;
|
|
2671
2746
|
readonly typography?: CjkTypographySettings;
|
|
@@ -2855,64 +2930,6 @@ interface ParagraphLayoutInputs {
|
|
|
2855
2930
|
*/
|
|
2856
2931
|
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean, lineUnitPt?: number): ParagraphLayoutInputs;
|
|
2857
2932
|
|
|
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
2933
|
/** Published root story containing an artifact occurrence. @public */
|
|
2917
2934
|
type SemanticArtifactRootStoryKind = 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'note-separator';
|
|
2918
2935
|
/** Exact story in which a review artifact's source anchor was laid out. @public */
|
|
@@ -3369,6 +3386,8 @@ interface StyleSpanRecord {
|
|
|
3369
3386
|
* and selection mapping refuses them the way it refuses markers.
|
|
3370
3387
|
*/
|
|
3371
3388
|
readonly projected?: boolean;
|
|
3389
|
+
/** Zero-model-width component geometry for opaque content. */
|
|
3390
|
+
readonly unsupported?: UnsupportedContentRecord;
|
|
3372
3391
|
/** Authored inline separator rule; its advance belongs to one note atom. */
|
|
3373
3392
|
readonly noteSeparator?: 'separator' | 'continuationSeparator';
|
|
3374
3393
|
/** Paint-ready geometry for one atomic Office Math equation. */
|
|
@@ -3530,6 +3549,8 @@ interface ParagraphFragmentRecord {
|
|
|
3530
3549
|
readonly hSpace: number;
|
|
3531
3550
|
readonly vSpace: number;
|
|
3532
3551
|
readonly box: LayoutBox;
|
|
3552
|
+
/** The frame's vertical position comes from the page or margin, not from the text flow. */
|
|
3553
|
+
readonly pageFramed?: true;
|
|
3533
3554
|
};
|
|
3534
3555
|
readonly range: SourceRange;
|
|
3535
3556
|
readonly props: readonly OoxmlProperty[];
|
|
@@ -4047,5 +4068,5 @@ interface SectionBreakMarkRecord {
|
|
|
4047
4068
|
readonly kind: SectionBreakType;
|
|
4048
4069
|
}
|
|
4049
4070
|
|
|
4050
|
-
export {
|
|
4051
|
-
export type {
|
|
4071
|
+
export { EMPTY_NUMBERING_INDEX as aC, EMPTY_TAB_STOPS as aD, FontResolutionError as aP, HARD_MAX_AGGREGATE_FONT_BYTES as aY, HARD_MAX_FONT_BYTES as aZ, HARD_MAX_FONT_SOURCES as a_, AUTO_PARAGRAPH_SPACING_PT as ad, DEFAULT_PAGE_GEOMETRY as ao, DEFAULT_RUN_STYLE as ap, DEFAULT_SECTION_PROPERTIES as aq, DEFAULT_TAB_INTERVAL_PT as ar, DEFAULT_TAB_INTERVAL_TWIPS as as, MAX_BORDER_SPACE_PT as b4, MAX_BORDER_WIDTH_PT as b5, MAX_DOCUMENT_SECTIONS as b6, MAX_LVL_OVERRIDES as b7, MAX_NUMBERING_DEFINITIONS as b8, MAX_PARAGRAPH_SPACING_PT as b9, SINGLE_LINE_SPACING as bH, MAX_SHAPING_CONTEXT as ba, MAX_STYLE_DEFINITIONS as bb, MAX_TABLE_BORDER_STROKES as bc, MAX_TAB_POSITION_TWIPS as bd, MAX_TAB_STOPS as be, PAGE_BORDER_SIDES as bh, PARAGRAPH_BORDER_SIDES as bi, parsePageBorders as c$, TAB_LEADER_GLYPH as c4, createShapingEnvironment as cA, createUnsupportedContentProjector as cB, defaultTabIntervalFromSettings as cC, displayText as cD, enumerateDocumentSections as cE, enumerateDocumentSectionsBounded as cF, fixedPoint as cG, fontRequestKey as cH, geometryOfSection as cI, glyphSizeFactorOf as cJ, groupPictureLayerDrawing as cK, isValidStyleId as cL, itemizeScriptFontSlots as cM, layoutEquation as cN, measureDisplayText as cO, nextTabDestination as cP, pageBordersFingerprint as cQ, paragraphBorderExtentPt as cR, paragraphBorderStrokeWidthPt as cS, paragraphBorders as cT, paragraphBordersFingerprint as cU, paragraphBreaksBefore as cV, paragraphContextualSpacing as cW, paragraphLineSpacing as cX, paragraphSectionNode as cY, paragraphSpacing as cZ, paragraphTabStops as c_, UnsupportedScriptError as ch, appliedSpaceBefore as cj, applyLineSpacing as ck, baselineShiftPtOf as cl, borderExtentPt as cm, borderWeight as cn, bottomBorderExtentPt as co, boundedStructuralFontValidator as cp, buildNumberingIndex as cq, buildStyleCascadeTable as cr, cascadeParagraphFormatting as cs, cascadeRunProperties as ct, cascadedBottomBorder as cu, cascadedParagraphBorders as cv, cascadedTabStops as cw, collapsedSpaceBefore as cx, createFontResourceSnapshot as cy, createShapedRun as cz, parsePageNumbering as d0, parseRefInstruction as d1, parseSectionProperties as d2, projectedSectionSourceIndexes as d3, readBorderSide as d4, readCellBorders as d5, readNumPr as d6, readSectionProperties as d7, readTableBorders as d8, resolveBorderConflict as d9, resolveNumberingLevel as da, resolveParagraphLayoutInputs as db, resolveRunStyle as dc, resolveStoryListItems as dd, resolveStoryRefFields as de, resolveTableCellBorderGrid as df, runStylesEqual as dg, shapedRunComparatorInputs as dh, shapingEnvironmentFingerprint as di, shapingEnvironmentFingerprintInputs as dj, styleForFontSlot as dk, tabAdvanceWidth as dl, tabStopsFingerprint as dm, withDefaultTabInterval as dn, withNumberingStyleLinks as dp, withResolvedListItems as dq, unsupportedElementRuleMatches as u };
|
|
4072
|
+
export type { FontByteValidator as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, DrawingPoint as D, TableFloatYSpec as E, FontResourceSnapshot as F, NumberingLevelIndent as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, ResolvedListItem as J, RefFieldContext as K, LineRecord as L, ModelRange as M, NoteAreaRecord as N, InlineDrawingLayoutContext as O, ParagraphFragmentRecord as P, CellBorderBox as Q, ResolvedRunStyle as R, SemanticLayout as S, TextMeasurer as T, UnsupportedElement as U, VersionedShapingLibrary as V, TableBorderBox as W, TableCellStyleFormatting as X, TableFloatPosition as Y, StyleCascadeTable as Z, FixedPoint as _, PageRecord as a, LevelOverride as a$, SourceRange as a0, HyperlinkProjector as a1, FieldLinkProjector as a2, StoryPageFieldNeeds as a3, HyperlinkFieldSpec as a4, SpanLinkRecord as a5, PageGeometry as a6, SectionColumns as a7, SectionPageBorders as a8, PageBorderFrameRecord as a9, DrawingPlaceholderKind as aA, DrawingTextArtRecord as aB, EquationBarGeometry as aE, EquationFractionGeometry as aF, EquationGeometry as aG, EquationNaryGeometry as aH, EquationRadicalGeometry as aI, EquationRowGeometry as aJ, EquationScriptGeometry as aK, EquationSpanRecord as aL, EquationTextGeometry as aM, FieldAtomMarker as aN, FontFingerprintInputs as aO, FontResolutionErrorCode as aQ, FontResourceDefinition as aR, FontResourceInstrumentation as aS, FontResourceSnapshotOptions as aT, FontSlot as aU, FontValidationResult as aV, GlyphOutline as aW, GroupTextboxStoryRecord as aX, ParagraphBorderStrokeRecord as aa, StrikeoutStrokePt as ab, TextOutline as ac, AbstractNumDefinition as ae, AnchoredDrawingLayoutFallback as af, BidiEmbeddingLevels as ag, BorderGridGeometry as ah, CascadedParagraphFormatting as ai, CjkTypographySettings as aj, ContentControlGeometryFragment as ak, ContentControlLevel as al, ContentControlMappedType as am, ContentControlModelRange as an, DeclaredFontSubstitution as at, DocumentSection as au, DocumentSectionsEnumeration as av, DrawingClipFallback as aw, DrawingGeometry as ax, DrawingGroupPictureLayerRecord as ay, DrawingGroupPictureRecord as az, LayoutBox as b, ShapedVerticalMetrics as b$, LineSpacingRule as b0, ListMarkerAlign as b1, ListMarkerRecord as b2, ListSuffix as b3, RefNoteParts as bA, ResolvedCellBorders as bB, ResolvedPictureBullet as bC, ResolvedTabStops as bD, ResolvedTableBorderEdge as bE, ResolvedTableBorderEdgeSegment as bF, ResolvedUnderline as bG, ScriptItem as bI, SectionBreakMarkRecord as bJ, SectionBreakType as bK, SectionColumnDefinition as bL, SectionMargins as bM, SectionPageNumbering as bN, SemanticArtifactRootStoryKind as bO, SemanticArtifactStoryKind as bP, SemanticCommentArtifactRecord as bQ, SemanticReviewArtifactOccurrence as bR, SemanticReviewArtifactOccurrenceGeometry as bS, SemanticReviewArtifactPosition as bT, SemanticReviewArtifactSource as bU, SemanticTrackedChangeArtifactRecord as bV, ShapeInput as bW, ShapedCluster as bX, ShapedFontSpan as bY, ShapedGlyph as bZ, ShapedRunComparatorInputs as b_, NumDefinition as bf, NumberingPictureBullet as bg, PageBorderDisplay as bj, PageBorderOffsetFrom as bk, PageBorderSide as bl, PageBorderStrokeRecord as bm, PageBorderZOrder as bn, PageRefCalibrationCell as bo, PageRefFieldProjection as bp, ParagraphAutoSpacingContext as bq, ParagraphBorderEdge as br, ParagraphBorderSide as bs, ParagraphBorders as bt, ParagraphBottomBorderRecord as bu, ParagraphIndent as bv, ParagraphLayoutInputs as bw, ParagraphLineSpacing as bx, ParagraphSpacing as by, RefFieldSpec as bz, NoteStoryRecord as c, ShapingContext as c0, ShapingEnvironment as c1, ShapingEnvironmentFingerprintInputs as c2, StyleDefinition as c3, TabAlignment as c5, TabDestination as c6, TabLeader as c7, TabStop as c8, TableBorderSideName as c9, TableBorderStrokeRecord as ca, TableCellDiagonalRecord as cb, TableFragmentRecord as cc, TextArtFit as cd, TextDirection as ce, TextboxStoryFallbackReason as cf, TextboxStoryLayout as cg, VerticalAlign as ci, 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 v, NumberingIndex as w, TableBorderSide as x, DrawingInsets as y, TableFloatXSpec as z };
|