@docx-editor.dev/core 2.32.0 → 2.34.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 +1 -1
- package/THIRD_PARTY_NOTICES.md +1 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +14 -52
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +14 -14
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-CznJ0ucN.d.ts → chrome-print-DY0xsXm_.d.ts} +231 -125
- package/dist/chunk-37IYWENL.cjs +1 -0
- package/dist/chunk-37RNWL45.js +4 -0
- package/dist/chunk-5HUVQXET.cjs +4 -0
- package/dist/chunk-5JP3QQF7.js +7 -0
- package/dist/chunk-5KOLFKOB.cjs +5 -0
- package/dist/chunk-6MF5PN2E.js +236 -0
- package/dist/chunk-77JT2AU7.js +2 -0
- package/dist/{chunk-ETDZFNMI.js → chunk-7FUORGCW.js} +1 -1
- package/dist/chunk-A5BTVPET.cjs +236 -0
- package/dist/chunk-AFXFH2T2.js +3 -0
- package/dist/chunk-AVCYP7OY.js +5 -0
- package/dist/chunk-BL2E4QRA.js +1 -0
- package/dist/chunk-DB7X4Y6O.js +4 -0
- package/dist/chunk-DR6W23TB.cjs +2 -0
- package/dist/chunk-DYLB5U42.js +1 -0
- package/dist/chunk-E5BKDHIP.cjs +1 -0
- package/dist/chunk-IWXBRUPG.cjs +4 -0
- package/dist/{chunk-L5TYBFDB.js → chunk-KCUXXO3Q.js} +1 -1
- package/dist/chunk-KYA4Y2YB.js +1 -0
- package/dist/{chunk-6UDJUI3W.cjs → chunk-L74TCGVH.cjs} +1 -1
- package/dist/chunk-NBSSQSKY.js +30 -0
- package/dist/{chunk-OKMEMSKB.cjs → chunk-NEM774E3.cjs} +1 -1
- package/dist/chunk-NKZVMMHU.cjs +1 -0
- package/dist/chunk-TXIO5WYQ.cjs +32 -0
- package/dist/chunk-UKG2TXWH.cjs +7 -0
- package/dist/chunk-V7CO55DO.cjs +3 -0
- package/dist/chunk-VLQDQNSS.js +1 -0
- package/dist/chunk-VQOAC3VI.cjs +30 -0
- package/dist/chunk-YWJSQA2O.js +32 -0
- package/dist/chunk-ZJ74LCFI.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +13 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -3
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +10 -10
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -12
- package/dist/contracts/types.d.ts +4 -4
- package/dist/{custom-node-writes-CLJKGD9t.d.ts → custom-node-writes-DparEcZK.d.ts} +45 -7
- package/dist/diagnostic-context-CkZKkKvB.d.ts +98 -0
- package/dist/{diagnostic-hints-DK8-V0fk.d.ts → diagnostic-hints-BTyb8yzX.d.ts} +3 -3
- package/dist/{document-protection-NaniLHWF.d.ts → document-protection-DdWxihIN.d.ts} +1 -1
- package/dist/{headless-document-view-Bcz9_Qva.d.ts → drawing-graphic-kind-CK0cMc7H.d.ts} +161 -18
- package/dist/drawing-preview-package-fFjXpOMS.d.ts +115 -0
- package/dist/{editor-DZwOTmlR.d.ts → editor-DDCkWqfD.d.ts} +125 -21
- package/dist/{editor-scope-B3L-1ALc.d.ts → editor-scope-CA6egMaK.d.ts} +5 -1
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +4 -4
- package/dist/editor.d.ts +387 -78
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +47 -12
- package/dist/export.js +2 -2
- package/dist/{font-resolver-BlQNGdvR.d.ts → font-resolver-Bm9XqTNO.d.ts} +14 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +38 -23
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-E5J4Z1Gf.d.ts → layout-shaping-Byj-TwsI.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +434 -199
- package/dist/layout.js +1 -1
- package/dist/metafile-drawing-Ce6TuWLm.d.ts +115 -0
- package/dist/{note-properties-Ds5R2_3F.d.ts → note-properties-BiunaIQa.d.ts} +31 -7
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +77 -13
- package/dist/output.js +1 -1
- package/dist/{protocol-DKa4qt7F.d.ts → protocol-Dn44dL4M.d.ts} +184 -120
- package/dist/{review-paragraph-order-Dc17w_6v.d.ts → review-paragraph-order-BWMXAKuA.d.ts} +1 -1
- package/dist/{revision-projection-Cn6rZJ7H.d.ts → revision-projection-DwFhgIR0.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BaUR0iJ4.d.ts → semantic-cell-selection-DhalxEBH.d.ts} +2 -2
- package/dist/{semantic-interaction-CJoHLoOl.d.ts → semantic-interaction-QeuzEtAk.d.ts} +2 -4
- package/dist/{semantic-paint-BPw_n0li.d.ts → semantic-paint-BYDZbTiY.d.ts} +16 -9
- package/dist/{semantic-record-queries-C0rJ3sB4.d.ts → semantic-record-queries-Bf5bgQL3.d.ts} +1 -1
- package/dist/{semantic-records-BvN-WWst.d.ts → semantic-records-CzZiWMY8.d.ts} +348 -132
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +526 -19
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-C_S2niXW.d.ts → tree-op-types-DKvJSH8T.d.ts} +1024 -501
- package/dist/{tree-package-store-CRHvMyNj.d.ts → tree-package-store-Cl3BkWXF.d.ts} +8 -3
- package/dist/{tree-session-contract-D1awo_dA.d.ts → tree-session-contract-BL50pqs8.d.ts} +15 -8
- package/dist/{unsupported-elements-CVos5cqe.d.ts → unsupported-elements-Bra4QTOM.d.ts} +1 -1
- package/licenses/ECMA-376.md +29 -0
- package/package.json +2 -2
- package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
- package/dist/chunk-25EXMBV2.cjs +0 -5
- package/dist/chunk-3IEXDEFH.cjs +0 -7
- package/dist/chunk-65XBN67F.cjs +0 -2
- package/dist/chunk-6NVZNB7O.cjs +0 -3
- package/dist/chunk-ACLR4DMK.js +0 -1
- package/dist/chunk-B2BEELUE.js +0 -1
- package/dist/chunk-DDFHKQFU.js +0 -30
- package/dist/chunk-E4IAO4CY.cjs +0 -2
- package/dist/chunk-FDSL5OJU.cjs +0 -30
- package/dist/chunk-FS7CMYLT.js +0 -4
- package/dist/chunk-GDS24SZN.js +0 -30
- package/dist/chunk-GIY6NT2X.js +0 -5
- package/dist/chunk-GWM3AKUD.js +0 -18
- package/dist/chunk-HDOXACHP.js +0 -2
- package/dist/chunk-IILEENID.js +0 -1
- package/dist/chunk-MNF2K7NN.cjs +0 -30
- package/dist/chunk-O324RB6R.cjs +0 -1
- package/dist/chunk-QXJKYNYZ.js +0 -1
- package/dist/chunk-RALTVLB6.js +0 -2
- package/dist/chunk-SRVKFUFI.js +0 -3
- package/dist/chunk-TELQ52LG.cjs +0 -1
- package/dist/chunk-TJHE5EET.cjs +0 -1
- package/dist/chunk-UMMRURPE.js +0 -7
- package/dist/chunk-XJYZVGQR.cjs +0 -1
- package/dist/chunk-ZGTIE3QJ.cjs +0 -4
- package/dist/chunk-ZOZI27AW.cjs +0 -18
- package/dist/diagnostic-context-BtDUY3v2.d.ts +0 -31
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { aG as OoxmlNodeId, ax as OoxmlGenericElementNode, a4 as OoxmlNode, a5 as OoxmlPackage, O as OoxmlPart, av as OoxmlElement, aA as OoxmlPackageRejection } from './tree-op-types-DKvJSH8T.js';
|
|
2
|
+
import { e as HeaderFooterParts, f as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-Cl3BkWXF.js';
|
|
3
3
|
|
|
4
|
-
/** Office Math Markup Language namespace. */
|
|
5
|
-
declare const OFFICE_MATH_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
6
|
-
declare const DEFAULT_OMML_LIMITS: Readonly<{
|
|
7
|
-
maxDepth: 24;
|
|
8
|
-
maxNodes: 256;
|
|
9
|
-
maxTextLength: 512;
|
|
10
|
-
}>;
|
|
11
|
-
/** Shared work limits for untrusted OMML and linear-math input. */
|
|
12
|
-
interface OmmlLimits {
|
|
13
|
-
readonly maxDepth?: number;
|
|
14
|
-
readonly maxNodes?: number;
|
|
15
|
-
readonly maxTextLength?: number;
|
|
16
|
-
}
|
|
17
4
|
/**
|
|
18
5
|
* Marks a structure whose property element carries `m:ctrlPr` operator run formatting that
|
|
19
6
|
* compact replacement cannot reproduce.
|
|
@@ -26,6 +13,17 @@ interface OmmlLimits {
|
|
|
26
13
|
interface EquationControlSource {
|
|
27
14
|
/** The structure carries non-default `m:ctrlPr` properties, so compact replacement refuses it. */
|
|
28
15
|
readonly controlProperties?: true;
|
|
16
|
+
/**
|
|
17
|
+
* Font size of the structure, in points. The source is the `w:sz` value of the run
|
|
18
|
+
* properties in the structure's `m:ctrlPr`, which counts half-points.
|
|
19
|
+
*
|
|
20
|
+
* Layout sizes script offsets and bar strokes and gaps from this size, not from the size of
|
|
21
|
+
* the runs inside the structure. When it is not set, those use the size of the text around
|
|
22
|
+
* the equation. A script or fraction after the first atom of the equation takes its offsets
|
|
23
|
+
* from the size of that first atom instead. Set whether or not the control properties are
|
|
24
|
+
* default. Radicals and n-ary operators with limits below and above do not use it yet.
|
|
25
|
+
*/
|
|
26
|
+
readonly controlFontSizePt?: number;
|
|
29
27
|
}
|
|
30
28
|
type EquationExpression = {
|
|
31
29
|
readonly kind: 'row';
|
|
@@ -33,8 +31,32 @@ type EquationExpression = {
|
|
|
33
31
|
} | {
|
|
34
32
|
readonly kind: 'text';
|
|
35
33
|
readonly value: string;
|
|
34
|
+
/**
|
|
35
|
+
* Authored font size of the run, in points. The source is the `w:sz` value of the
|
|
36
|
+
* run properties (`w:rPr`), which counts half-points.
|
|
37
|
+
*
|
|
38
|
+
* Set only when every run of the equation holds the same default math formatting: the
|
|
39
|
+
* Cambria Math font, italic, one size, and at most a language. Such runs have no
|
|
40
|
+
* `format`, so compact replacement stays available and writes the same `w:rPr` back.
|
|
41
|
+
* Otherwise the size is in `format.fontSizePt`. When neither field is set, the text
|
|
42
|
+
* takes the size of the surrounding text. To read the size of any text expression,
|
|
43
|
+
* use `format?.fontSizePt ?? fontSizePt`.
|
|
44
|
+
*/
|
|
45
|
+
readonly fontSizePt?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Source formatting of the run. Set when the run has its own supported formatting and
|
|
48
|
+
* the equation does not use the uniform default math formatting. Compact replacement
|
|
49
|
+
* refuses an equation that has a text expression with a `format`, because it cannot
|
|
50
|
+
* write that formatting back.
|
|
51
|
+
*/
|
|
36
52
|
readonly format?: {
|
|
37
53
|
readonly fontFamily?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Authored font size of the run, in points. The source is the `w:sz` value of the
|
|
56
|
+
* run properties (`w:rPr`), which counts half-points. Set when the run has a
|
|
57
|
+
* `format` and a `w:sz`. The top-level `fontSizePt` is not set in that case.
|
|
58
|
+
*/
|
|
59
|
+
readonly fontSizePt?: number;
|
|
38
60
|
readonly bold?: boolean;
|
|
39
61
|
readonly italic?: boolean;
|
|
40
62
|
readonly literal?: boolean;
|
|
@@ -60,14 +82,64 @@ type EquationExpression = {
|
|
|
60
82
|
readonly superscript?: EquationExpression;
|
|
61
83
|
} & EquationControlSource) | ({
|
|
62
84
|
readonly kind: 'nary';
|
|
85
|
+
/** The operator character from `m:chr`, or `∫` when the source names none. */
|
|
63
86
|
readonly operator: string;
|
|
64
87
|
readonly body: EquationExpression;
|
|
65
88
|
readonly lowerLimit?: EquationExpression;
|
|
66
89
|
readonly upperLimit?: EquationExpression;
|
|
90
|
+
/**
|
|
91
|
+
* Where the limits sit, from `m:limLoc`: `undOvr` below and above the operator, `subSup`
|
|
92
|
+
* to its right as a subscript and superscript. Not set when the source names none.
|
|
93
|
+
* Inline equations place the limits to the right either way. An `m:oMath` alone in its
|
|
94
|
+
* paragraph is a display equation, as an `m:oMathPara` is, and follows this location.
|
|
95
|
+
*/
|
|
96
|
+
readonly limitLocation?: 'undOvr' | 'subSup';
|
|
97
|
+
} & EquationControlSource) | ({
|
|
98
|
+
/**
|
|
99
|
+
* `m:borderBox`: the body inside a rectangle. A hidden edge draws no rule and keeps no
|
|
100
|
+
* gap. Strikes cross the box horizontally, vertically, or along a diagonal.
|
|
101
|
+
*/
|
|
102
|
+
readonly kind: 'borderBox';
|
|
103
|
+
readonly body: EquationExpression;
|
|
104
|
+
readonly hidden: EquationBoxEdges;
|
|
105
|
+
readonly strikes: EquationBoxStrikes;
|
|
67
106
|
} & EquationControlSource) | {
|
|
68
107
|
readonly kind: 'fallback';
|
|
69
108
|
readonly text: string;
|
|
70
109
|
};
|
|
110
|
+
/** The edges of an `m:borderBox` that its properties hide. */
|
|
111
|
+
interface EquationBoxEdges {
|
|
112
|
+
readonly top: boolean;
|
|
113
|
+
readonly bottom: boolean;
|
|
114
|
+
readonly left: boolean;
|
|
115
|
+
readonly right: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** The strikes an `m:borderBox` draws across its body. */
|
|
118
|
+
interface EquationBoxStrikes {
|
|
119
|
+
/** `m:strikeH`: a horizontal line through the centre. */
|
|
120
|
+
readonly horizontal: boolean;
|
|
121
|
+
/** `m:strikeV`: a vertical line through the centre. */
|
|
122
|
+
readonly vertical: boolean;
|
|
123
|
+
/** `m:strikeBLTR`: from the bottom-left corner to the top-right corner. */
|
|
124
|
+
readonly bottomLeftToTopRight: boolean;
|
|
125
|
+
/** `m:strikeTLBR`: from the top-left corner to the bottom-right corner. */
|
|
126
|
+
readonly topLeftToBottomRight: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Office Math Markup Language namespace. */
|
|
130
|
+
declare const OFFICE_MATH_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
131
|
+
declare const DEFAULT_OMML_LIMITS: Readonly<{
|
|
132
|
+
maxDepth: 24;
|
|
133
|
+
maxNodes: 256;
|
|
134
|
+
maxTextLength: 512;
|
|
135
|
+
}>;
|
|
136
|
+
/** Shared work limits for untrusted OMML and linear-math input. */
|
|
137
|
+
interface OmmlLimits {
|
|
138
|
+
readonly maxDepth?: number;
|
|
139
|
+
readonly maxNodes?: number;
|
|
140
|
+
readonly maxTextLength?: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
71
143
|
interface OmmlEquationProjection {
|
|
72
144
|
readonly sourceNodeId: OoxmlNodeId;
|
|
73
145
|
readonly expression: EquationExpression;
|
|
@@ -76,7 +148,8 @@ interface OmmlEquationProjection {
|
|
|
76
148
|
readonly visitedNodes: number;
|
|
77
149
|
/**
|
|
78
150
|
* The font size, in points, that every run of the equation shares through default run
|
|
79
|
-
* properties (`w:sz`).
|
|
151
|
+
* properties (`w:sz`). Individual run sizes remain on their text expressions. Without a
|
|
152
|
+
* shared size, structural spacing takes the size of the surrounding text.
|
|
80
153
|
*/
|
|
81
154
|
readonly fontSizePt?: number;
|
|
82
155
|
}
|
|
@@ -250,5 +323,75 @@ declare function openHeadlessDocument(bytes: Uint8Array): OpenHeadlessDocumentRe
|
|
|
250
323
|
/** Internal live read view over the canonical store, preserving node identities for field pagination. */
|
|
251
324
|
declare function headlessViewOfStore(store: TreePackageStore): HeadlessDocumentView;
|
|
252
325
|
|
|
253
|
-
|
|
254
|
-
|
|
326
|
+
/**
|
|
327
|
+
* A drawing feature that the editor does not show as authored. Each code means:
|
|
328
|
+
*
|
|
329
|
+
* - `unsupported-effect`: the editor ignores an explicit effect, such as `a:blur`, `a:duotone`,
|
|
330
|
+
* or `a14:imgProps`. The drawing renders without it.
|
|
331
|
+
* - `renderer-required`: an optional effect, such as `a:glow`, needs the drawing module:
|
|
332
|
+
* `drawingModule()` or `installDrawing()` from `@docx-editor.dev/pro/drawing`. It appears
|
|
333
|
+
* only while that module is not installed in the current process, for occurrences and
|
|
334
|
+
* reports alike.
|
|
335
|
+
* - `unverified-3d`: the drawing has 3-D properties (`a:scene3d`, `a:sp3d`), which render flat.
|
|
336
|
+
* - `saved-fallback`: the editor shows the saved `mc:Fallback` content, not the main content.
|
|
337
|
+
* - `unplaced-drawing`: the drawing has no layout position, so the editor does not show it.
|
|
338
|
+
* - `inspection-limit`: a scan budget stopped the check, so the result is incomplete.
|
|
339
|
+
* - `projection-diagnostic`: the source is malformed or partly unusable. `detail` holds the
|
|
340
|
+
* diagnostic code, such as `invalid-geometry` or `resource-refused`.
|
|
341
|
+
*
|
|
342
|
+
* The check reads the drawing's own XML. It does not read chart or diagram parts, inherited
|
|
343
|
+
* theme effects, or image bytes, so an empty list does not prove full fidelity.
|
|
344
|
+
*
|
|
345
|
+
* @public
|
|
346
|
+
*/
|
|
347
|
+
interface DrawingSupportIssue {
|
|
348
|
+
/** The kind of limitation. The list in this type's description explains each code. */
|
|
349
|
+
readonly code: 'unsupported-effect' | 'renderer-required' | 'unverified-3d' | 'saved-fallback' | 'unplaced-drawing' | 'inspection-limit' | 'projection-diagnostic';
|
|
350
|
+
/**
|
|
351
|
+
* The source node with the feature: in the inspected package for a report, or in the
|
|
352
|
+
* editor's current document for an occurrence's `drawingIssues`.
|
|
353
|
+
*/
|
|
354
|
+
readonly nodeId: string;
|
|
355
|
+
/** The namespace of the node with the feature. */
|
|
356
|
+
readonly namespaceUri: string;
|
|
357
|
+
/** The local name of the node with the feature, such as `blur`. */
|
|
358
|
+
readonly localName: string;
|
|
359
|
+
/** The feature, such as `a:blur` or `mc:Fallback`, or the projection diagnostic code. */
|
|
360
|
+
readonly detail: string;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* How completely the editor shows a drawing:
|
|
364
|
+
*
|
|
365
|
+
* - `native`: the editor renders the drawing and found no unsupported feature in its source.
|
|
366
|
+
* - `partial`: the editor renders the drawing, but without some features, or it shows a saved
|
|
367
|
+
* fallback. The issue list names the features.
|
|
368
|
+
* - `unrendered`: the editor shows a placeholder, or the drawing has no layout position.
|
|
369
|
+
*
|
|
370
|
+
* A drawing that the document itself hides is `native` or `partial`: the editor shows it as
|
|
371
|
+
* authored, which is not at all.
|
|
372
|
+
*
|
|
373
|
+
* Charts and SmartArt diagrams that the editor draws report `native`, because the check does
|
|
374
|
+
* not read their chart or diagram parts. Inherited theme effects and image bytes are not
|
|
375
|
+
* checked either.
|
|
376
|
+
*
|
|
377
|
+
* @public
|
|
378
|
+
*/
|
|
379
|
+
type DrawingSupport = 'native' | 'partial' | 'unrendered';
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* The kind of graphic a drawing holds. Note: `textbox` names every DrawingML shape, with or
|
|
383
|
+
* without text, and `shape` names only legacy VML drawings.
|
|
384
|
+
*
|
|
385
|
+
* Read from its source: `picture`, `chart` (a chart),
|
|
386
|
+
* `diagram` (SmartArt), `textbox` (a DrawingML shape, with or without text), `group` (a shape
|
|
387
|
+
* group), `canvas` (a drawing canvas), `shape` (a legacy VML drawing, such as WordArt), or
|
|
388
|
+
* `graphic` (any other graphic). It does not say whether the engine renders the graphic.
|
|
389
|
+
* The names match `placeholderGraphicKind`, which adds no `picture` and is set only for
|
|
390
|
+
* placeholders.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
*/
|
|
394
|
+
type DrawingGraphicKind = 'picture' | 'chart' | 'diagram' | 'shape' | 'group' | 'textbox' | 'canvas' | 'graphic';
|
|
395
|
+
|
|
396
|
+
export { DEFAULT_OMML_LIMITS as e, OFFICE_MATH_NAMESPACE_URI as m, authorableHyperlinkTarget as p, ensureHyperlinkRelationship as q, equationExpressionToLinearMath as r, headlessViewOfStore as s, linearMathToOmml as t, openHeadlessDocument as u, parseLinearMath as v, projectOmmlEquation as w, relationshipTargetIn as x };
|
|
397
|
+
export type { DrawingGraphicKind as D, EnsuredHyperlinkRelationship as E, HeadlessDocumentView as H, LinearMathOmmlResult as L, OmmlEquationProjection as O, DrawingSupport as a, DrawingSupportIssue as b, DocumentProperties as c, HeadlessDocumentRejection as d, EquationBoxEdges as f, EquationBoxStrikes as g, EquationControlSource as h, EquationExpression as i, HeadlessThemeFonts as j, LinearMathParseResult as k, LinearMathRejection as l, OmmlLimits as n, OpenHeadlessDocumentResult as o };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { a5 as OoxmlPackage } from './tree-op-types-DKvJSH8T.js';
|
|
2
|
+
|
|
3
|
+
/** The longest name a bookmark is written with. */
|
|
4
|
+
declare const MAX_AUTHORED_BOOKMARK_NAME_LENGTH = 40;
|
|
5
|
+
/**
|
|
6
|
+
* Why a name cannot be written, or null when it can.
|
|
7
|
+
*
|
|
8
|
+
* - `empty`: no characters.
|
|
9
|
+
* - `tooLong`: more than {@link MAX_AUTHORED_BOOKMARK_NAME_LENGTH} characters.
|
|
10
|
+
* - `invalidStart`: the first character is not a letter or an underscore.
|
|
11
|
+
* - `invalidCharacter`: a later character is not a letter, a digit or an underscore.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
type BookmarkNameProblem = 'empty' | 'tooLong' | 'invalidStart' | 'invalidCharacter';
|
|
16
|
+
/**
|
|
17
|
+
* Check a name before it is written. Measured in code points, so a letter outside the Basic
|
|
18
|
+
* Multilingual Plane counts once.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
declare function bookmarkNameProblem(name: string): BookmarkNameProblem | null;
|
|
23
|
+
/**
|
|
24
|
+
* Whether a bookmark is hidden: its name starts with an underscore. Hidden bookmarks are the
|
|
25
|
+
* ones applications write for themselves, such as the targets of a table of contents.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
declare function isHiddenBookmarkName(name: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The key two names are compared by. Names are case-insensitive, so `Intro` and `intro`
|
|
32
|
+
* share a key.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
declare function bookmarkNameKey(name: string): string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Where a drawing is. Pass an `inspectDrawingSupport` entry or an editor occurrence as is.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
interface DrawingPreviewTarget {
|
|
44
|
+
/** The part that holds the drawing, such as `/word/document.xml`. */
|
|
45
|
+
readonly ownerPartName: string;
|
|
46
|
+
/**
|
|
47
|
+
* The drawing, its compatibility wrapper, or any node inside them, in the package you pass.
|
|
48
|
+
* Every node of one drawing gives the same package.
|
|
49
|
+
*/
|
|
50
|
+
readonly nodeId: string;
|
|
51
|
+
}
|
|
52
|
+
/** Caps for {@link createDrawingPreviewPackage}. @public */
|
|
53
|
+
interface DrawingPreviewPackageLimits {
|
|
54
|
+
/** Maximum number of copied parts. Defaults to 64. */
|
|
55
|
+
readonly maxParts?: number;
|
|
56
|
+
/** Maximum number of copied bytes. Defaults to 64 MiB. */
|
|
57
|
+
readonly maxBytes?: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A preview package, or why it could not be built.
|
|
61
|
+
*
|
|
62
|
+
* - `drawing-not-found`: the target is not a drawing in the package.
|
|
63
|
+
* - `too-many-parts` or `too-large`: the drawing needs more than the limits allow.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
type DrawingPreviewPackageResult = {
|
|
68
|
+
readonly ok: true;
|
|
69
|
+
/**
|
|
70
|
+
* DOCX bytes with one paragraph that holds the drawing. The same drawing and document
|
|
71
|
+
* parts always give the same bytes, so a hash of them works as a cache key.
|
|
72
|
+
*/
|
|
73
|
+
readonly docx: Uint8Array;
|
|
74
|
+
/**
|
|
75
|
+
* True when the page has the drawing's size, so the first page is the preview image.
|
|
76
|
+
* False when the size is unknown, such as a legacy VML drawing without a width and height
|
|
77
|
+
* in its style. Then the page has the document's page size and no margins, and the
|
|
78
|
+
* drawing starts at its top left corner. With the occurrence's `element.bounds`, crop
|
|
79
|
+
* from (0, 0) to `bounds.width * dpi / 72` by `bounds.height * dpi / 72` pixels;
|
|
80
|
+
* `bounds.x` and `bounds.y` are page positions, not crop offsets. Send this flag and the
|
|
81
|
+
* `bounds` size to your renderer with the bytes.
|
|
82
|
+
* Without `bounds`, such as for a report entry, trim the white space instead.
|
|
83
|
+
*/
|
|
84
|
+
readonly pageFitsDrawing: boolean;
|
|
85
|
+
/** The package parts copied from the source document, for logging and caching. */
|
|
86
|
+
readonly copiedParts: readonly string[];
|
|
87
|
+
} | {
|
|
88
|
+
readonly ok: false;
|
|
89
|
+
readonly reason: 'drawing-not-found' | 'too-many-parts' | 'too-large';
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Build a small DOCX that holds one drawing for an external renderer.
|
|
93
|
+
*
|
|
94
|
+
* Contents: one paragraph with the drawing, plus the chart and diagram parts, images, styles,
|
|
95
|
+
* theme, settings, and fonts it needs. Relationships to external targets, embedded objects,
|
|
96
|
+
* macros, and templates are dropped, so the package never points outside itself.
|
|
97
|
+
*
|
|
98
|
+
* Page: the first page is the preview. It has the drawing's size, including its effect
|
|
99
|
+
* extent, so it matches the occurrence's `bounds`, and it has no margins. A floating drawing
|
|
100
|
+
* is placed on the line, and a legacy VML drawing takes its size from its style. When the
|
|
101
|
+
* size is unknown, `pageFitsDrawing` is false; see that field for how to crop.
|
|
102
|
+
*
|
|
103
|
+
* Renderer: use one other than this library, whose own exporters show the same placeholder.
|
|
104
|
+
* The bytes come from the document, so run the renderer in a sandbox without network access,
|
|
105
|
+
* with time and memory limits.
|
|
106
|
+
*
|
|
107
|
+
* Pass the package that the target comes from: an `inspectDrawingSupport` entry with the
|
|
108
|
+
* parsed package it inspected, or an editor occurrence with the editor's current package.
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
declare function createDrawingPreviewPackage(pkg: OoxmlPackage, target: DrawingPreviewTarget, limits?: DrawingPreviewPackageLimits): DrawingPreviewPackageResult;
|
|
113
|
+
|
|
114
|
+
export { MAX_AUTHORED_BOOKMARK_NAME_LENGTH as M, bookmarkNameKey as c, bookmarkNameProblem as d, createDrawingPreviewPackage as e, isHiddenBookmarkName as i };
|
|
115
|
+
export type { BookmarkNameProblem as B, DrawingPreviewPackageLimits as D, DrawingPreviewPackageResult as a, DrawingPreviewTarget as b };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as ResolvedRevisionMarkup, a as ReviewDisplayMode } from './revision-projection-
|
|
1
|
+
import { d as ResolvedRevisionMarkup, a as ReviewDisplayMode } from './revision-projection-DwFhgIR0.js';
|
|
2
2
|
import { ResolvedReviewPane } from './contracts/types.js';
|
|
3
|
-
import { V as ViewScope, b as HistoryDiagnostic, c as HistoryGroup, a as EditorExecOptions, E as EditorScope, d as HistoryGroupOptions } from './editor-scope-
|
|
3
|
+
import { V as ViewScope, b as HistoryDiagnostic, c as HistoryGroup, a as EditorExecOptions, E as EditorScope, d as HistoryGroupOptions } from './editor-scope-CA6egMaK.js';
|
|
4
4
|
import { E as EditorFontErrorCode, a as FontFaceRequest } from './editor-fonts-D_-vjuJi.js';
|
|
5
|
-
import { t as DocAnchor, g as ReviewRevisionKind, c as ReviewCommentItem, b as ReviewRevisionItem, d as ReviewCustomItem, aT as SourceCrop, a8 as DrawingKind, ag as ImageWrapTarget, aa as DrawingPositionInput, a9 as DrawingLocks, af as ImageResourceState, r as ColorValue, x as ExecErrorCode, ah as ParagraphFormatCommand, an as SupportedImageMime, ar as Watermark, E as ExecResult, at as WatermarkState, n as ContentControlFilter, o as DocRange, k as RunFormatting, p as Revision, ak as Rect, am as SelectionPin, ao as Unsubscribe } from './tree-op-types-
|
|
6
|
-
import { C as CollaborationDiagnosticCode,
|
|
5
|
+
import { T as RevisionBatchSkipDetail, t as DocAnchor, g as ReviewRevisionKind, c as ReviewCommentItem, b as ReviewRevisionItem, d as ReviewCustomItem, aT as SourceCrop, a8 as DrawingKind, ag as ImageWrapTarget, aa as DrawingPositionInput, a9 as DrawingLocks, af as ImageResourceState, r as ColorValue, x as ExecErrorCode, ah as ParagraphFormatCommand, an as SupportedImageMime, ar as Watermark, E as ExecResult, at as WatermarkState, n as ContentControlFilter, o as DocRange, k as RunFormatting, p as Revision, ak as Rect, am as SelectionPin, ao as Unsubscribe } from './tree-op-types-DKvJSH8T.js';
|
|
6
|
+
import { C as CollaborationDiagnosticCode, b as CustomNodeDiagnosticCode, c as DiagnosticErrorName, F as FailureStage, B as ByteSizeBucket, a as CountBucket, e as DocumentOpenDiagnosticCode, f as DocumentPartKind, g as DocumentSaveDiagnosticCode, E as EditDiagnosticCode, R as ReviewDiagnosticCode, k as ReviewOperation, j as ReviewChangeKind, i as FormattingChangeKind, h as FontDiagnosticCode, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode } from './diagnostic-hints-BTyb8yzX.js';
|
|
7
7
|
import { DocEdits, DocQueries, DocQueryResults, ContentControlSummary } from './contracts/document.js';
|
|
8
8
|
import { InteractionOutcome } from './contracts/interaction.js';
|
|
9
|
-
import { a as SemanticSelection, S as SemanticPosition } from './semantic-interaction-
|
|
10
|
-
import { a as DocumentProtectionState } from './document-protection-
|
|
9
|
+
import { a as SemanticSelection, S as SemanticPosition } from './semantic-interaction-QeuzEtAk.js';
|
|
10
|
+
import { a as DocumentProtectionState } from './document-protection-DdWxihIN.js';
|
|
11
11
|
import { a as CollaborationStatus } from './failure-6KGFrDO9.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -273,8 +273,11 @@ interface ReviewSkippedDiagnostic extends DiagnosticBase {
|
|
|
273
273
|
/** The role of the part the changes are in, such as `'footnotes'`. Never its name. */
|
|
274
274
|
readonly part?: DocumentPartKind;
|
|
275
275
|
/**
|
|
276
|
-
* For `review.revision-unsupported`, the engine condition that
|
|
277
|
-
* `unaddressed` (no `w:id` or author)
|
|
276
|
+
* The structure behind the skip. For `review.revision-unsupported`, the engine condition that
|
|
277
|
+
* refused the change, such as `unaddressed` (no `w:id` or author). For
|
|
278
|
+
* `review.incomplete-group`, the change the decision would also decide, such as
|
|
279
|
+
* `paired-change` (the other half of a move or merge) or `removed-content`. For
|
|
280
|
+
* `review.retained-structure`, `nested-table`. See `diagnosticCauses()`.
|
|
278
281
|
*/
|
|
279
282
|
readonly cause?: string;
|
|
280
283
|
}
|
|
@@ -411,8 +414,8 @@ interface EditorEvents {
|
|
|
411
414
|
change: (change: DocumentChange) => void;
|
|
412
415
|
/**
|
|
413
416
|
* Observable editor state moved without a document change: the selection or its derived
|
|
414
|
-
* formatting, the armed typing format, the open header or footer,
|
|
415
|
-
* session's status.
|
|
417
|
+
* formatting, the armed typing format, the open header or footer, the collaboration
|
|
418
|
+
* session's status, or the page count when pages finish laying out in the background.
|
|
416
419
|
*/
|
|
417
420
|
selectionChange: (snapshot: EditorSnapshot) => void;
|
|
418
421
|
error: (error: EditorError) => void;
|
|
@@ -452,6 +455,20 @@ interface EditorEvents {
|
|
|
452
455
|
* ```
|
|
453
456
|
*/
|
|
454
457
|
reviewItemReveal: (event: ReviewItemRevealEvent) => void;
|
|
458
|
+
/**
|
|
459
|
+
* An accept-all or reject-all decision committed: from the toolbar, the menu, or
|
|
460
|
+
* `exec({ type: 'resolveAllReviewChanges' })`. `skipped` names the changes it left pending,
|
|
461
|
+
* so a host can say why they stay. A remote decision in a collaboration session never fires
|
|
462
|
+
* it: it is a local event.
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```ts
|
|
466
|
+
* editor.on('reviewChangesResolved', ({ skipped }) => {
|
|
467
|
+
* if (skipped.length) showNotice(`${skipped.length} changes stay pending`);
|
|
468
|
+
* });
|
|
469
|
+
* ```
|
|
470
|
+
*/
|
|
471
|
+
reviewChangesResolved: (event: ReviewChangesResolvedEvent) => void;
|
|
455
472
|
/**
|
|
456
473
|
* The editor's pages are now in another document: it was attached for the first time, moved
|
|
457
474
|
* into another element or window, detached (`document` is `null`), or found its element
|
|
@@ -516,6 +533,33 @@ interface ReviewItemRevealEvent {
|
|
|
516
533
|
*/
|
|
517
534
|
readonly source: ReviewItemRevealSource;
|
|
518
535
|
}
|
|
536
|
+
/**
|
|
537
|
+
* The payload of the `reviewChangesResolved` event.
|
|
538
|
+
*
|
|
539
|
+
* @public
|
|
540
|
+
*/
|
|
541
|
+
interface ReviewChangesResolvedEvent {
|
|
542
|
+
/** Whether the decision accepted or rejected the changes. */
|
|
543
|
+
readonly action: 'accept' | 'reject';
|
|
544
|
+
/** How many listed changes it resolved. The `exec` result lists them in `revisions.resolved`. */
|
|
545
|
+
readonly resolvedCount: number;
|
|
546
|
+
/**
|
|
547
|
+
* The listed changes it left pending, with why: `'retained-structure'` for a row that stays
|
|
548
|
+
* to keep a nested table, `'incomplete-group'` for a change that would also resolve one the
|
|
549
|
+
* selection leaves out, `'unsupported-revision'` for a structure the engine cannot resolve,
|
|
550
|
+
* and `'unknown-revision'` for a key that no longer names a change. `reviewCodeOfSkip(skip)`
|
|
551
|
+
* gives each entry's review code, with its `detail`.
|
|
552
|
+
*/
|
|
553
|
+
readonly skipped: readonly {
|
|
554
|
+
/** The skipped change's key, as `getReviewItems({ pairReplacements: false })` lists it. */
|
|
555
|
+
readonly key: string;
|
|
556
|
+
/** The key of the replacement it is one half of, as the default `getReviewItems()` lists it. */
|
|
557
|
+
readonly pairKey?: string;
|
|
558
|
+
readonly reason: 'unsupported-revision' | 'incomplete-group' | 'retained-structure' | 'unknown-revision';
|
|
559
|
+
/** Which condition kept it, such as `'locked-content'` (a content lock) or `'bound-content'` (a data binding). */
|
|
560
|
+
readonly detail?: RevisionBatchSkipDetail;
|
|
561
|
+
}[];
|
|
562
|
+
}
|
|
519
563
|
/** What asked to reveal a review item. See {@link ReviewItemRevealEvent.source}. @public */
|
|
520
564
|
type ReviewItemRevealSource = 'navigate' | 'host';
|
|
521
565
|
/**
|
|
@@ -1162,7 +1206,11 @@ interface AuthoredNoteNumbering {
|
|
|
1162
1206
|
readonly numStart?: number;
|
|
1163
1207
|
readonly numRestart?: string;
|
|
1164
1208
|
}
|
|
1165
|
-
/**
|
|
1209
|
+
/**
|
|
1210
|
+
* Resolved note-numbering fields for one section. Numbering and the footnote position come
|
|
1211
|
+
* from the section's own properties and the defaults; the endnote position comes from the
|
|
1212
|
+
* document settings.
|
|
1213
|
+
*/
|
|
1166
1214
|
interface ResolvedNoteNumbering {
|
|
1167
1215
|
readonly pos: string;
|
|
1168
1216
|
readonly numFmt: string;
|
|
@@ -1172,7 +1220,12 @@ interface ResolvedNoteNumbering {
|
|
|
1172
1220
|
/** One note kind's resolved + authored properties for the caret section. */
|
|
1173
1221
|
interface NotePropertiesSide {
|
|
1174
1222
|
readonly resolved: ResolvedNoteNumbering;
|
|
1223
|
+
/**
|
|
1224
|
+
* The document settings (settings.xml) values. Only the endnote `pos` affects `resolved`;
|
|
1225
|
+
* the other fields are kept for files that carry them.
|
|
1226
|
+
*/
|
|
1175
1227
|
readonly documentAuthored?: AuthoredNoteNumbering;
|
|
1228
|
+
/** The caret section's own values, which set numbering and the footnote position. */
|
|
1176
1229
|
readonly sectionAuthored?: AuthoredNoteNumbering;
|
|
1177
1230
|
}
|
|
1178
1231
|
/** Resolved and authored note properties for the caret section — properties dialog read-model. */
|
|
@@ -1272,8 +1325,17 @@ interface EditorNoteCommands {
|
|
|
1272
1325
|
fromKind: NoteKind;
|
|
1273
1326
|
};
|
|
1274
1327
|
/**
|
|
1275
|
-
* Footnote and endnote properties
|
|
1276
|
-
*
|
|
1328
|
+
* Footnote and endnote properties: numbering format, start value, restart rule and
|
|
1329
|
+
* position.
|
|
1330
|
+
*
|
|
1331
|
+
* - `scope: 'document'` (the default) writes every section and the document settings.
|
|
1332
|
+
* - `scope: 'section'` writes the `sectionIndex` section.
|
|
1333
|
+
* - The endnote `position` applies to the whole document, so it always goes to the document
|
|
1334
|
+
* settings, in either scope, and never to a section.
|
|
1335
|
+
* - Fields you omit keep each section's value. A value equal to the default is not added
|
|
1336
|
+
* where nothing authors the field, so applying the values a section already shows
|
|
1337
|
+
* leaves the document unchanged.
|
|
1338
|
+
* - The write is not tracked in suggesting mode, like other section property writes.
|
|
1277
1339
|
*/
|
|
1278
1340
|
setNoteProperties: {
|
|
1279
1341
|
scope?: 'document' | 'section';
|
|
@@ -1438,9 +1500,21 @@ interface SelectedImageState {
|
|
|
1438
1500
|
readonly dpiX: number;
|
|
1439
1501
|
readonly dpiY: number;
|
|
1440
1502
|
}> | null;
|
|
1503
|
+
/**
|
|
1504
|
+
* Whether `setImageProperties` can change the size. False for a hidden drawing, a drawing
|
|
1505
|
+
* whose size is locked, a rotated legacy VML text box or one sized as a percentage of a
|
|
1506
|
+
* frame, and in viewing mode. An inline text box resizes.
|
|
1507
|
+
*/
|
|
1441
1508
|
readonly canResize: boolean;
|
|
1509
|
+
/**
|
|
1510
|
+
* Whether `setImagePosition` can move the drawing. False for an inline drawing, which flows
|
|
1511
|
+
* with its line, for a locked or hidden drawing, a rotated legacy VML text box, and in
|
|
1512
|
+
* viewing mode.
|
|
1513
|
+
*/
|
|
1442
1514
|
readonly canMove: boolean;
|
|
1515
|
+
/** Whether `setImageWrapType` applies: pictures only, never text boxes. */
|
|
1443
1516
|
readonly canChangeWrap: boolean;
|
|
1517
|
+
/** Whether `setImageProperties` can crop: pictures only, never text boxes. */
|
|
1444
1518
|
readonly canCrop: boolean;
|
|
1445
1519
|
}
|
|
1446
1520
|
/**
|
|
@@ -1627,6 +1701,9 @@ interface TableColumnOccurrenceTarget {
|
|
|
1627
1701
|
readonly isHeaderRepeat: boolean;
|
|
1628
1702
|
}
|
|
1629
1703
|
|
|
1704
|
+
/** Keys for the table furniture's accessible names, resolved by `tableInteractionLabel`. */
|
|
1705
|
+
type TableInteractionLabelKey = 'table.insertRowBelow' | 'table.insertColumnRight' | 'table.selectTable';
|
|
1706
|
+
|
|
1630
1707
|
/**
|
|
1631
1708
|
* An opaque handle to a loaded document — its stable identity and current
|
|
1632
1709
|
* revision. The canonical authored state is the engine's `PackageModel`, NOT a
|
|
@@ -1900,7 +1977,7 @@ interface Editor extends EditorAnchorNavigation, EditorHighlights, EditorReviewH
|
|
|
1900
1977
|
readonly cellIds: readonly string[];
|
|
1901
1978
|
} | null;
|
|
1902
1979
|
/** Update table furniture aria labels without remounting the editor. */
|
|
1903
|
-
setTableInteractionLabel(resolver: (key:
|
|
1980
|
+
setTableInteractionLabel(resolver: (key: TableInteractionLabelKey) => string): void;
|
|
1904
1981
|
/** Section page setup — size, orientation and margins — for the page-setup dialog. */
|
|
1905
1982
|
getPageSetup(): PageSetup | null;
|
|
1906
1983
|
/**
|
|
@@ -2101,7 +2178,13 @@ interface Editor extends EditorAnchorNavigation, EditorHighlights, EditorReviewH
|
|
|
2101
2178
|
*
|
|
2102
2179
|
* Refused for a card whose kind the engine cannot resolve structurally, which is why
|
|
2103
2180
|
* `readOnly` is on the item — a surface should not offer the button in the first place.
|
|
2104
|
-
* Other refusals name their cause, as {@link addComment} describes.
|
|
2181
|
+
* Other refusals name their cause, as {@link addComment} describes. A change that resolves
|
|
2182
|
+
* only together with another change refuses with a reason led by `incomplete-group:`, and a
|
|
2183
|
+
* row that stays to keep a nested table with one led by `retained-structure:`. A change a
|
|
2184
|
+
* content control lock keeps refuses with `code: 'locked'` and a reason led by
|
|
2185
|
+
* `locked-content:`; one in a data-bound control with `code: 'bound'` and `bound-content:`.
|
|
2186
|
+
* `reviewCodeOfRefusal(result.reason)` names the review code of each. In a React or
|
|
2187
|
+
* Vue host, `useReviewRefusalMessage()` turns `useReview().lastRefusal` into a sentence.
|
|
2105
2188
|
*
|
|
2106
2189
|
* Neither call scrolls. In a React or Vue host with the review module, `useReview().accept`
|
|
2107
2190
|
* and `useReview().reject` call these. For headless or server use, see `Revision.accept()`
|
|
@@ -2156,7 +2239,17 @@ interface Editor extends EditorAnchorNavigation, EditorHighlights, EditorReviewH
|
|
|
2156
2239
|
replyToReviewItem(key: string, text: string, options?: HistoryGroupOptions): ExecResult;
|
|
2157
2240
|
/** {@link replyToReviewItem} with an author for this call, overriding the configured author. */
|
|
2158
2241
|
replyToReviewItem(key: string, text: string, author?: string, options?: HistoryGroupOptions): ExecResult;
|
|
2242
|
+
/**
|
|
2243
|
+
* Move editing into `scope`: the body, a header or footer, a note, or a text box (`frame`).
|
|
2244
|
+
*
|
|
2245
|
+
* A frame whose `owner` is a header or footer opens that story first and edits the box
|
|
2246
|
+
* inside it. The box is edited on the page of the open story when that story is already
|
|
2247
|
+
* open, otherwise on the page in view, otherwise on the first page that shows it. A frame
|
|
2248
|
+
* owned by a note, a box with rotated or vertical text, and a box holding a table are refused:
|
|
2249
|
+
* the scope stays where it was. Read {@link getActiveScope} to confirm the entry.
|
|
2250
|
+
*/
|
|
2159
2251
|
setActiveScope(scope: ViewScope): void;
|
|
2252
|
+
/** The scope editing is in, as {@link setActiveScope} last set it or a press moved it. */
|
|
2160
2253
|
getActiveScope(): ViewScope;
|
|
2161
2254
|
query<K extends keyof EditorQueries>(query: {
|
|
2162
2255
|
type: K;
|
|
@@ -2654,6 +2747,15 @@ interface EditorCommands extends EditorCommandShape<DocEdits>, EditorHeaderFoote
|
|
|
2654
2747
|
tocId?: string;
|
|
2655
2748
|
mode?: 'entire' | 'pageNumbers';
|
|
2656
2749
|
};
|
|
2750
|
+
/**
|
|
2751
|
+
* Remove a table of contents: its field, or the table of contents control around it with
|
|
2752
|
+
* its heading. Text before and after the field stays. Without `tocId`, removes the table of
|
|
2753
|
+
* contents last right-clicked, the one at the selection, or the only one. One undo step.
|
|
2754
|
+
* Refuses with `notFound` when there is none, and while suggesting.
|
|
2755
|
+
*/
|
|
2756
|
+
removeToc: {
|
|
2757
|
+
tocId?: string;
|
|
2758
|
+
};
|
|
2657
2759
|
undo: Record<never, never>;
|
|
2658
2760
|
redo: Record<never, never>;
|
|
2659
2761
|
/**
|
|
@@ -2878,8 +2980,8 @@ interface EditorSnapshot {
|
|
|
2878
2980
|
/**
|
|
2879
2981
|
* The table of contents the last right-click landed on, or null.
|
|
2880
2982
|
*
|
|
2881
|
-
* NOT caret context, unlike `table`: a
|
|
2882
|
-
*
|
|
2983
|
+
* NOT caret context, unlike `table`: a generated TOC refuses the caret outright, so a
|
|
2984
|
+
* right-click on it leaves the selection where it was, and a host's context menu could otherwise
|
|
2883
2985
|
* never tell which table of contents it was opened over. Cleared by a right-click
|
|
2884
2986
|
* anywhere else.
|
|
2885
2987
|
*/
|
|
@@ -2976,8 +3078,10 @@ interface EditorSnapshot {
|
|
|
2976
3078
|
* A family the app answers with a metric-compatible stand-in — Word's Times New Roman
|
|
2977
3079
|
* with Liberation Serif — is AVAILABLE and stays out: the outlines differ, the advance
|
|
2978
3080
|
* widths do not, so wrap and pagination land where Word puts them. The face a `w:sym`
|
|
2979
|
-
* names (MS Gothic for a checkbox, Wingdings for a bullet) stays out
|
|
2980
|
-
*
|
|
3081
|
+
* names (MS Gothic for a checkbox, Wingdings for a bullet) stays out while each glyph it
|
|
3082
|
+
* draws has a Unicode equivalent, because any face can paint that. A `w:sym` face joins
|
|
3083
|
+
* when one of its glyphs is a private-use code point with no equivalent, because that
|
|
3084
|
+
* glyph shows as a missing-glyph box in every other face.
|
|
2981
3085
|
*
|
|
2982
3086
|
* Optional and additive like `canUndo`: absent means the implementation has not derived
|
|
2983
3087
|
* it; empty means every family resolved (or no document is loaded).
|
|
@@ -3002,5 +3106,5 @@ interface EditorError extends Error {
|
|
|
3002
3106
|
readonly code?: string;
|
|
3003
3107
|
}
|
|
3004
3108
|
|
|
3005
|
-
export { DIAGNOSTIC_SCHEMA_VERSION as D, EditorFontError as J, cropPercentFromCropPermille as
|
|
3006
|
-
export type { FurnitureVariant as $, AnchorHighlightAnimation as A, BookmarkPlace as B, CanResult as C, EditorDiagnostic as E, EditorCommandShape as F, EditorCommands as G, EditorError as H, EditorEvents as I, EditorFormatPainterCommands as K, EditorHeaderFooterCommands as L, EditorHighlights as M, EditorHostChange as N, EditorHostDocument as O, EditorNoteCommands as P, EditorPosition as Q, EditorQueries as R, EditorQuery as S, EditorQueryResults as T, EditorReviewHits as U, EditorSelection as V, EditorSnapshot as W, FontFailedDiagnostic as X, FormatPainterLevel as Y, FormatPainterMode as Z, FormatPainterSurfaceState as _, EditorDiagnosticKind as a, HeaderFooterSlotArgs as a0, HeaderFooterState as a1, HighlightHit as a2, HighlightOptions as a3, HighlightRange as a4, HighlightRect as a5, HighlightResult as a6, HistoryDiagnosticEvent as a7, HyperlinkInfo as a8, ImageContext as a9,
|
|
3109
|
+
export { DIAGNOSTIC_SCHEMA_VERSION as D, EditorFontError as J, cropPercentFromCropPermille as aT, cropPercentFromPermille as aU, cropPercentFromSourceCrop as aV, cropPermilleFromCropPercent as aW, cropPermilleFromPercent as aX, sourceCropFromCropPercent as aY, validateImageCropPercent as aZ };
|
|
3110
|
+
export type { FurnitureVariant as $, AnchorHighlightAnimation as A, BookmarkPlace as B, CanResult as C, EditorDiagnostic as E, EditorCommandShape as F, EditorCommands as G, EditorError as H, EditorEvents as I, EditorFormatPainterCommands as K, EditorHeaderFooterCommands as L, EditorHighlights as M, EditorHostChange as N, EditorHostDocument as O, EditorNoteCommands as P, EditorPosition as Q, EditorQueries as R, EditorQuery as S, EditorQueryResults as T, EditorReviewHits as U, EditorSelection as V, EditorSnapshot as W, FontFailedDiagnostic as X, FormatPainterLevel as Y, FormatPainterMode as Z, FormatPainterSurfaceState as _, EditorDiagnosticKind as a, HeaderFooterSlotArgs as a0, HeaderFooterState as a1, HighlightHit as a2, HighlightOptions as a3, HighlightRange as a4, HighlightRect as a5, HighlightResult as a6, HistoryDiagnosticEvent as a7, HyperlinkInfo as a8, ImageContext as a9, SetReviewChangesAuthorOptions as aA, TableBorderEdgeTarget as aB, TableBorderSpec as aC, TableBorderStyle as aD, TableBorderTarget as aE, TableCellVerticalAlignment as aF, TableColumnDividerResizeTarget as aG, TableColumnOccurrenceTarget as aH, TableContext as aI, TableInteractionLabelKey as aJ, TableRightEdgeResizeTarget as aK, TableRowOccurrenceTarget as aL, TextMatch as aM, TimingSummary as aN, TrackedChangeFilterMode as aO, TrackedChangePredicate as aP, ZoomFitTarget as aQ, ZoomMode as aR, ImageCropPermille as aS, ImageCropPercent as aa, NoteKind as ab, NotePropertiesSide as ac, NotePropertiesState as ad, PageSetup as ae, PerformanceDiagnostic as af, ResolveReviewChangesOptions as ag, ResolvedNoteNumbering as ah, ReviewActivationOptions as ai, ReviewChangesAttribution as aj, ReviewChangesResolvedEvent as ak, ReviewCommentPlacement as al, ReviewCustomPlacement as am, ReviewItemHit as an, ReviewItemPlacement as ao, ReviewItemPlacementBase as ap, ReviewItemQuery as aq, ReviewItemRevealEvent as ar, ReviewItemRevealSource as as, ReviewRevisionPlacement as at, ReviewSkippedDiagnostic as au, ScrollPlacement as av, ScrollToAnchorOptions as aw, SelectedImageState as ax, SessionActivity as ay, SessionDiagnostic as az, EditorCommand as b, AnchorHighlightOptions as c, AuthoredNoteNumbering as d, BookmarkStory as e, BookmarkSummary as f, ClearAnchorHighlightOptions as g, CollaborationParticipantsDiagnostic as h, CollaborationStatusDiagnostic as i, CustomNodeDiagnosticEvent as j, DiagnosticBase as k, DiagnosticFailureDetail as l, DocumentChange as m, DocumentEditingMode as n, DocumentHandle as o, DocumentOpenDiagnostic as p, DocumentOpenFailure as q, DocumentOpenFailureReason as r, DocumentSaveDiagnostic as s, DocumentShape as t, DocumentSource as u, EditRejectedDiagnostic as v, EditRejectionOrigin as w, Editor as x, EditorAnchorNavigation as y, EditorBookmarkCommands as z };
|
|
@@ -66,7 +66,11 @@ type EditorScope = {
|
|
|
66
66
|
drawingNodeId: string;
|
|
67
67
|
/** The paragraph that anchors that drawing. */
|
|
68
68
|
hostParagraphId: string;
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Furniture or note story that owns this frame. Absence means the body story. Entering a
|
|
71
|
+
* frame owned by a header or footer opens that story around it; a note-owned frame cannot
|
|
72
|
+
* be entered.
|
|
73
|
+
*/
|
|
70
74
|
owner?: {
|
|
71
75
|
kind: 'headerFooter';
|
|
72
76
|
rId: string;
|