@docx-editor.dev/core 2.29.0 → 2.31.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/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +22 -26
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +47 -40
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-BWvaVEhD.d.ts} +577 -243
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-G4HOFIKJ.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-7WQ7AAHW.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-UHHYFIDT.cjs → chunk-6IDOVU6L.cjs} +1 -1
- package/dist/chunk-DBOOTED4.cjs +30 -0
- package/dist/chunk-EOTAXOJY.cjs +5 -0
- package/dist/chunk-FDAKJ2SJ.cjs +30 -0
- package/dist/chunk-FNNOJNGY.js +3 -0
- package/dist/chunk-FT33HRZP.js +5 -0
- package/dist/{chunk-W35WTWAO.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-MM5QBMTE.cjs → chunk-IBRBNT37.cjs} +1 -1
- package/dist/chunk-IVIN7X43.js +30 -0
- package/dist/chunk-LZY6B6IV.js +4 -0
- package/dist/chunk-MOYYRVFV.cjs +2 -0
- package/dist/{chunk-OMCG63ZF.js → chunk-N6B3BXCL.js} +1 -1
- package/dist/chunk-Q5K2GGNG.js +2 -0
- package/dist/chunk-R2XINWVE.js +7 -0
- package/dist/chunk-SUEXVBPR.js +1 -0
- package/dist/chunk-T2QQHG5C.js +18 -0
- package/dist/{chunk-LSZ6KPKK.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-BY2ACZZ6.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-RCLZXP3B.js → chunk-ZCJS7D7S.js} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -4
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -13
- package/dist/contracts/types.d.ts +2 -2
- package/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-B8M79cfK.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +12 -5
- package/dist/{document-protection-CUb55pl_.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-CZQZmTIU.d.ts → editor-B2ShlO23.d.ts} +368 -52
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-C7ke1KJG.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -3
- package/dist/editor.d.ts +606 -34
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +17 -15
- package/dist/export.js +2 -2
- package/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
- package/dist/{headless-document-view-pp3q7wIh.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-CWS3j0Xr.d.ts} +3 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +112 -44
- package/dist/layout.js +1 -1
- package/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-BUbU0utM.d.ts → omml-equation-BsLAa2lX.d.ts} +38 -8
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-DYzzz2ej.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-B-akgRch.d.ts} +207 -139
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +49 -136
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-B8l8DX3Z.d.ts} +612 -428
- package/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-DeLRqohz.d.ts} +28 -13
- package/dist/{types-barrel-DuC5QBNC.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-236O4YQW.js +0 -2
- package/dist/chunk-6JPL6ZAS.cjs +0 -5
- package/dist/chunk-6ZQP4HQ7.js +0 -3
- package/dist/chunk-BCXH4BXB.js +0 -5
- package/dist/chunk-CAJEXXVG.cjs +0 -4
- package/dist/chunk-CPWLFPWC.js +0 -30
- package/dist/chunk-D7ZMDMPX.cjs +0 -3
- package/dist/chunk-DOHF6FA7.cjs +0 -30
- package/dist/chunk-DVX32P2P.js +0 -27
- package/dist/chunk-E4LOMDNL.js +0 -1
- package/dist/chunk-EKLM7NWB.cjs +0 -7
- package/dist/chunk-G3K63G7P.cjs +0 -27
- package/dist/chunk-JLVBDYVQ.cjs +0 -2
- package/dist/chunk-LQX36Z5P.js +0 -7
- package/dist/chunk-OSFOJTHU.cjs +0 -18
- package/dist/chunk-T6K2QYNZ.cjs +0 -2
- package/dist/chunk-TRGAVV2Y.js +0 -4
- package/dist/chunk-U4JZVSOE.js +0 -2
- package/dist/chunk-YQ5G6LC7.js +0 -18
- package/dist/image-resources-tXLQShoC.d.ts +0 -211
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { c as FontConfigurationFragment, g as FontResolver, M as MarkedFontResolver, f as FontResolutionRequest } from './font-resolver-
|
|
2
|
-
import {
|
|
3
|
-
import { V as ViewScope, a as EditorExecOptions } from './editor-scope-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { F as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { C as CellSelection } from './semantic-cell-selection-
|
|
15
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
1
|
+
import { c as FontConfigurationFragment, g as FontResolver, M as MarkedFontResolver, f as FontResolutionRequest } from './font-resolver-CWh40DYp.js';
|
|
2
|
+
import { e as BookmarkStory, u as DocumentSource, Z as FontConfiguration, aV as ZoomMode, J as EditorFontError, x as Editor, R as ReviewPaneOptions, b as EditorCommand, C as CanResult, aC as SelectedImageState, a4 as FormatPainterSurfaceState, f as BookmarkSummary, aA as ScrollPlacement, aT as TrackedChangePredicate, aS as TrackedChangeFilterMode, _ as FontFaceRequest, a0 as FontSource, af as ImageContext, aG as TableBorderEdgeTarget, aH as TableBorderSpec, aI as TableBorderStyle, aN as TableContext } from './editor-B2ShlO23.js';
|
|
3
|
+
import { V as ViewScope, a as EditorExecOptions } from './editor-scope-C7ke1KJG.js';
|
|
4
|
+
import { ao as TreeDocOp, b0 as TextFormFieldRange, b1 as TextFormFieldOptions, aE as ImageDecodePort, ai as Unsubscribe, E as ExecResult, _ as DrawingPositionInput, b2 as DrawingTransform, A as ParagraphTabStop, y as IndentFormatting, z as ParagraphFlags, a5 as ParagraphDisagreements, aJ as DrawingTreeDocOp, af as SupportedImageMime, ae as SelectionPin, Q as OoxmlPackage, g as ReviewRevisionKind, aH as PackageWatermarkWrite, a2 as ImageWrapTarget } from './types-barrel-CkF2JbU4.js';
|
|
5
|
+
import { T as TextMeasurer, a as ReviewDisplayMode, q as ResolvedRevisionMarkup, t as RevisionMarkupOptions, z as RevisionMarkupChromeHandlers, S as SemanticLayout, C as ContentControlBoundaryRecord, O as SectionProperties } from './semantic-records-B-akgRch.js';
|
|
6
|
+
import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-store-B8l8DX3Z.js';
|
|
7
|
+
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
8
|
+
import { F as FieldShadingMode, d as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, c as RevisionAuthorStyle } from './semantic-paint-DLzA8sjP.js';
|
|
9
|
+
import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
|
|
10
|
+
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-dApRIYpt.js';
|
|
11
|
+
import { CollaborationModuleContribution, EditorCollaborationSession, CollaborationRemoteSelection } from './collaboration.js';
|
|
12
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-QsKh24sM.js';
|
|
13
|
+
import { B as BookmarkIndex } from './custom-node-writes-TeUvMP13.js';
|
|
14
|
+
import { C as CellSelection } from './semantic-cell-selection-Cub9FDa8.js';
|
|
15
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DeLRqohz.js';
|
|
16
16
|
import { C as CollaborationStatus } from './failure-NS2lsya4.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -136,29 +136,47 @@ interface TextFormFieldChromeHandlers {
|
|
|
136
136
|
readonly onRequest?: (session: TextFormFieldDialogSession) => void;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
/**
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
139
|
+
/** One addressable inline equation and its compact editable projection. */
|
|
140
|
+
interface SurfaceEquation {
|
|
141
|
+
readonly id: string;
|
|
142
|
+
readonly paragraphId: string;
|
|
143
|
+
readonly start: number;
|
|
144
|
+
readonly end: number;
|
|
145
|
+
readonly linear: string;
|
|
146
|
+
readonly fallbackText: string;
|
|
147
|
+
/** True when every source construct belongs to the editable subset. */
|
|
148
|
+
readonly supported: boolean;
|
|
149
|
+
}
|
|
150
|
+
/** A user click on one painted equation. */
|
|
151
|
+
interface EquationActivation {
|
|
152
|
+
readonly equation: SurfaceEquation;
|
|
153
|
+
readonly rect: {
|
|
154
|
+
readonly left: number;
|
|
155
|
+
readonly top: number;
|
|
156
|
+
readonly right: number;
|
|
157
|
+
readonly bottom: number;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/** Boundary-inclusive lookup, matching the hyperlink and field atom popovers. */
|
|
161
|
+
declare function equationAtPosition(equations: readonly SurfaceEquation[], position: SemanticPosition): SurfaceEquation | null;
|
|
162
|
+
type EquationAction = 'replace' | 'remove';
|
|
163
|
+
/** Engine-owned capability result for equation editing chrome. */
|
|
164
|
+
type EquationCanResult = {
|
|
165
|
+
readonly ok: true;
|
|
166
|
+
} | {
|
|
167
|
+
readonly ok: false;
|
|
168
|
+
readonly code: 'locked' | 'notFound' | 'unsupported';
|
|
169
|
+
readonly reason: string;
|
|
170
|
+
};
|
|
171
|
+
/** Surface equation reads and atomic replace/remove writes. */
|
|
172
|
+
interface EquationOps {
|
|
173
|
+
equationsInCaretParagraph(): SurfaceEquation[];
|
|
174
|
+
equationAtCaret(): SurfaceEquation | null;
|
|
175
|
+
equationById(equationId: string): SurfaceEquation | null;
|
|
176
|
+
/** Whether equation chrome can run an action, with the engine-owned refusal reason. */
|
|
177
|
+
can(equationId: string, action: EquationAction): EquationCanResult;
|
|
178
|
+
applyEquation(equationId: string, linear: string): boolean;
|
|
179
|
+
removeEquation(equationId: string): boolean;
|
|
162
180
|
}
|
|
163
181
|
|
|
164
182
|
/**
|
|
@@ -240,10 +258,18 @@ interface HyperlinkActivation {
|
|
|
240
258
|
*/
|
|
241
259
|
interface SurfaceNavigation {
|
|
242
260
|
/** Snap to a semantic position using layout geometry, then place the caret there. */
|
|
261
|
+
/**
|
|
262
|
+
* With `orShow`, a story that cannot be opened is scrolled to without moving the caret into
|
|
263
|
+
* it, and the answer is `'shown'`. With `center`, the target is centered in the viewport
|
|
264
|
+
* unless it is already well inside it, so it never lands under chrome at the top edge.
|
|
265
|
+
*/
|
|
243
266
|
goToPosition(position: {
|
|
244
267
|
paragraphId: string;
|
|
245
268
|
offset: number;
|
|
246
|
-
}
|
|
269
|
+
}, options?: {
|
|
270
|
+
readonly orShow?: boolean;
|
|
271
|
+
readonly center?: boolean;
|
|
272
|
+
}): boolean | 'shown';
|
|
247
273
|
/**
|
|
248
274
|
* Scroll a bookmark into view and place the caret at it. Answers false for a name no
|
|
249
275
|
* bookmark declares — an inert click, which is what Word does with a dangling anchor.
|
|
@@ -257,47 +283,251 @@ interface SurfaceNavigation {
|
|
|
257
283
|
destroy(): void;
|
|
258
284
|
}
|
|
259
285
|
|
|
260
|
-
/**
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
readonly
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
286
|
+
/**
|
|
287
|
+
* The surface's view of the mark options.
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
291
|
+
interface BookmarkMarkOptionsSource {
|
|
292
|
+
readonly current: () => BookmarkMarkOptions;
|
|
293
|
+
/** Name the repaint to run when the options change. One slot: a remount replaces it. */
|
|
294
|
+
readonly onChange: (repaint: (() => void) | null) => void;
|
|
295
|
+
/** Report an error a host callback threw while marks were painted. */
|
|
296
|
+
readonly reportError: (error: unknown) => void;
|
|
270
297
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* How the caret moves through an inline content control whose effective lock is
|
|
301
|
+
* `contentLocked` or `sdtContentLocked`.
|
|
302
|
+
*
|
|
303
|
+
* - `'characters'` (the default) — the caret walks through the control's characters, as in Word.
|
|
304
|
+
* - `'atomic'` — the control is one caret unit, as a `w:showingPlcHdr` prompt already is. Arrows
|
|
305
|
+
* step over it, Shift+arrows select it whole, and a press or double click inside it selects it
|
|
306
|
+
* whole. A press on its edge still places a caret beside it.
|
|
307
|
+
*
|
|
308
|
+
* It applies in the body, headers and footers; notes and text boxes publish no control
|
|
309
|
+
* boundaries, so they keep character navigation.
|
|
310
|
+
*
|
|
311
|
+
* Navigation only: what a lock refuses does not change. The rule covers keyboard motions and
|
|
312
|
+
* the engine's own pointer gestures. A selection set in code (`setSelection`, find) is kept as
|
|
313
|
+
* given, and `pointer: 'native'` leaves caret placement to the browser.
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
type LockedControlNavigation = 'characters' | 'atomic';
|
|
318
|
+
/**
|
|
319
|
+
* How a paginated surface opens. Every field is optional.
|
|
320
|
+
*
|
|
321
|
+
* `measurer` is the injection seam that keeps layout DOM-free — supply one to lay a document out
|
|
322
|
+
* on a server, or leave it off in a browser to get the canvas measurer.
|
|
323
|
+
*/
|
|
324
|
+
interface PaginatedSurfaceOptions {
|
|
325
|
+
/** UI labels for shared form controls; omitted keys fall back to English. */
|
|
326
|
+
readonly translate?: (key: string, params?: Record<string, string | number>) => string;
|
|
327
|
+
/** Regional conventions for new date input; defaults to en-US. */
|
|
328
|
+
readonly locale?: string;
|
|
329
|
+
/**
|
|
330
|
+
* The collaboration module's replica for this surface's session. Absent,
|
|
331
|
+
* the surface does not attach, and local store history remains the undo
|
|
332
|
+
* authority.
|
|
333
|
+
*/
|
|
334
|
+
readonly collaborationModel?: CollaborationModuleContribution;
|
|
335
|
+
/**
|
|
336
|
+
* How saved field results are edited. `atomic` (the default) keeps every field one unit.
|
|
337
|
+
* `editable` lets the reader type, delete, and select inside the saved result of a DATE,
|
|
338
|
+
* MERGEFIELD, HYPERLINK, or similar field. Results must be unnested; simple fields inside
|
|
339
|
+
* complex field results are not supported. Refused with a {@link collaborationModel}.
|
|
340
|
+
*/
|
|
341
|
+
readonly fieldResults?: FieldResultsMode;
|
|
342
|
+
readonly measurer?: TextMeasurer;
|
|
343
|
+
/** Ambient author for tracked edits. Required before suggesting can write anything. */
|
|
344
|
+
readonly author?: string;
|
|
345
|
+
/** Opening mode; changeable at runtime with `setEditingMode`. */
|
|
346
|
+
readonly editingMode?: SurfaceEditingMode;
|
|
347
|
+
/**
|
|
348
|
+
* True while the active band covers both halves of a replacement: when the review UI lists
|
|
349
|
+
* a replacement as one card, or while an activation of the whole replacement holds. Read
|
|
350
|
+
* on each band paint. Set by the editor; a host changes `revisionsIn` instead.
|
|
351
|
+
*
|
|
352
|
+
* @internal
|
|
353
|
+
*/
|
|
354
|
+
readonly pairsReplacements?: () => boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Identifies the measurer for cache invalidation.
|
|
357
|
+
*
|
|
358
|
+
* Fonts resolve asynchronously, so a host that swaps its measurer must change this or the
|
|
359
|
+
* cached pre-font layout is served for the rest of the session.
|
|
360
|
+
*/
|
|
361
|
+
readonly producer?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Maps a document-declared font family to the alias its registered bytes live under, so
|
|
364
|
+
* painted runs can use embedded glyphs without the file's family name entering the
|
|
365
|
+
* page-global CSS font namespace.
|
|
366
|
+
*/
|
|
367
|
+
readonly fontAlias?: (family: string) => string | undefined;
|
|
368
|
+
/** Points to CSS pixels. */
|
|
369
|
+
readonly scale?: number;
|
|
370
|
+
/**
|
|
371
|
+
* How revisions project into layout and paint. Omitted keeps the layout default
|
|
372
|
+
* (`all-markup`). The editor facade passes `proposed` when no review module is
|
|
373
|
+
* registered — the free tier's final-state rendering; the machinery below this
|
|
374
|
+
* option is shared either way.
|
|
375
|
+
*/
|
|
376
|
+
readonly revisionDisplayMode?: ReviewDisplayMode;
|
|
377
|
+
/** Authors whose changes open in their accepted view-time projection. */
|
|
378
|
+
readonly hiddenRevisionAuthors?: readonly string[];
|
|
379
|
+
/**
|
|
380
|
+
* When a field's result wears Word's grey shading. Omitted keeps Word's own default,
|
|
381
|
+
* `when-selected`.
|
|
382
|
+
*
|
|
383
|
+
* Applies to ORDINARY fields only. Legacy form fields follow the document's
|
|
384
|
+
* `w:doNotShadeFormData`, because a form's blanks are the document's own statement about
|
|
385
|
+
* itself rather than a reader's preference.
|
|
386
|
+
*
|
|
387
|
+
* A paint-level option, not a layout one: it changes no geometry, so switching it repaints
|
|
388
|
+
* without remeasuring a single line.
|
|
389
|
+
*/
|
|
390
|
+
readonly fieldShading?: FieldShadingMode;
|
|
391
|
+
/** Show paragraph-end furniture without changing document content. */
|
|
392
|
+
readonly showParagraphMarks?: boolean;
|
|
393
|
+
readonly onToggleParagraphMarks?: () => void;
|
|
394
|
+
/** Show bracket marks at bookmarks. Paint-level; the document does not change. */
|
|
395
|
+
readonly showBookmarks?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* How tracked changes are coloured: by AUTHOR (the default), by kind, or by author with
|
|
398
|
+
* host-pinned colours. A paint-level option like {@link fieldShading}: it changes no
|
|
399
|
+
* geometry, so switching it repaints without remeasuring a line. Applies wherever
|
|
400
|
+
* revision markup paints, whatever the {@link revisionDisplayMode} leaves visible.
|
|
401
|
+
*/
|
|
402
|
+
readonly revisionStyles?: RevisionStyles;
|
|
403
|
+
readonly revisionMarkup?: ResolvedRevisionMarkup;
|
|
404
|
+
/**
|
|
405
|
+
* The review module's derivation hooks for this surface's session. Absent,
|
|
406
|
+
* `session.reviewItems()` is the typed empty queue and every review affordance
|
|
407
|
+
* built on it stays inert.
|
|
408
|
+
*/
|
|
409
|
+
readonly reviewModel?: ReviewModuleContribution;
|
|
410
|
+
/**
|
|
411
|
+
* Opt-in relaxation of `w:lock` for run-property writes: `contentLocked` / `sdtContentLocked`
|
|
412
|
+
* controls can be restyled (toolbar, shortcuts, automation `setFont`) but not retyped.
|
|
413
|
+
* Absent, they refuse both, as ECMA-376 / Word do.
|
|
414
|
+
*/
|
|
415
|
+
readonly contentLockPolicy?: ContentLockPolicy;
|
|
416
|
+
/**
|
|
417
|
+
* The family a run with no authored font is reported as by `formatting()` AND painted
|
|
418
|
+
* in — the face the measurer falls back to. Absent, such a run reports
|
|
419
|
+
* `fontFamily: null` and paints in whatever font the page inherits, which the measurer
|
|
420
|
+
* did not measure: visible glyphs drift from wrap points and caret geometry.
|
|
421
|
+
*/
|
|
422
|
+
readonly defaultFontFamily?: string;
|
|
423
|
+
/**
|
|
424
|
+
* Who resolves a pointer to a caret.
|
|
425
|
+
*
|
|
426
|
+
* `'engine'` (the default) answers from the layout records, which is what makes a click in
|
|
427
|
+
* a margin, an indent or a cell's padding land where it was aimed. `'native'` binds no
|
|
428
|
+
* pointer handlers and leaves the browser's own caret placement in charge.
|
|
429
|
+
*/
|
|
430
|
+
readonly pointer?: 'engine' | 'native';
|
|
431
|
+
/** How the caret moves through a content-locked inline control; see `LockedControlNavigation`. */
|
|
432
|
+
readonly lockedControlNavigation?: LockedControlNavigation;
|
|
433
|
+
readonly onChange?: (state: PaginatedSurfaceState) => void;
|
|
434
|
+
/**
|
|
435
|
+
* Told each time an edit is refused, with the raw reason: a store code such as `'locked'`,
|
|
436
|
+
* or the surface's own refusal sentence. The raw reason can be a sentence, so a listener
|
|
437
|
+
* maps it to a public code before it reports anything.
|
|
438
|
+
*/
|
|
439
|
+
readonly onRejection?: (reason: string) => void;
|
|
440
|
+
/**
|
|
441
|
+
* The pages turned up in another document without a `moveTo`: a host moved the mount
|
|
442
|
+
* element itself (a Vue `Teleport` retargeted, or a plain `appendChild`). The surface has
|
|
443
|
+
* already re-bound its own listeners; the owner re-registers what is per document.
|
|
444
|
+
*/
|
|
445
|
+
readonly onHostMoved?: (document: Document) => void;
|
|
446
|
+
/**
|
|
447
|
+
* Told the milliseconds of each layout pass and each paint. For `'input'`, told the browser
|
|
448
|
+
* timestamp of each key press or pointer press on the pages, so a listener can time it to
|
|
449
|
+
* the next frame. Numbers only.
|
|
450
|
+
*/
|
|
451
|
+
readonly onTiming?: (phase: 'layout' | 'paint' | 'input', value: number) => void;
|
|
452
|
+
/**
|
|
453
|
+
* Told once for each local edit that changed the document, with `typing` true for buffered
|
|
454
|
+
* typing, which can land inside a later command's commit. Remote edits are not local.
|
|
455
|
+
*/
|
|
456
|
+
readonly onEdit?: (typing: boolean) => void;
|
|
457
|
+
/**
|
|
458
|
+
* A plain click on an external (or inert) hyperlink, for a host to open its popover with.
|
|
459
|
+
*
|
|
460
|
+
* Absent means such a click does nothing. That is deliberate: a host with no popover
|
|
461
|
+
* mounted must not have clicks silently opening tabs, and the popover is the only path to
|
|
462
|
+
* activation (see the navigation module's single `window.open` gate).
|
|
463
|
+
*/
|
|
464
|
+
readonly onHyperlinkPopover?: (activation: HyperlinkActivation) => void;
|
|
465
|
+
readonly onEquationPopover?: (activation: EquationActivation) => void;
|
|
466
|
+
/**
|
|
467
|
+
* Ctrl/Cmd+K — Word's Insert Hyperlink. The engine reports the request; the host's chrome
|
|
468
|
+
* decides what a link dialog looks like. A host that passes nothing leaves the key alone
|
|
469
|
+
* rather than doing something surprising with it.
|
|
470
|
+
*/
|
|
471
|
+
readonly onRequestHyperlink?: () => void;
|
|
472
|
+
/**
|
|
473
|
+
* Ctrl/Cmd+Shift+F5: open the host's bookmark dialog. Answers whether chrome took the
|
|
474
|
+
* request; when none did, or when this is absent, the key is left to the browser.
|
|
475
|
+
*/
|
|
476
|
+
readonly onRequestBookmark?: () => boolean;
|
|
477
|
+
/** Ctrl+G (Cmd+Option+G on macOS): open the host's Go To UI; answers whether chrome took it. */
|
|
478
|
+
readonly onRequestGoTo?: () => boolean;
|
|
479
|
+
/**
|
|
480
|
+
* The host's Show bookmarks options, read on every paint. `onChange` names the repaint to
|
|
481
|
+
* run when the host changes them.
|
|
482
|
+
*/
|
|
483
|
+
readonly bookmarkMarks?: BookmarkMarkOptionsSource;
|
|
484
|
+
/** Return true when host chrome handles this session. */
|
|
485
|
+
readonly onRequestTextFormField?: (session: TextFormFieldDialogSession) => boolean;
|
|
486
|
+
readonly onRequestContentControlWidget?: (session: ContentControlWidgetSession) => boolean;
|
|
487
|
+
readonly onRequestInvalidTextFormField?: (session: InvalidTextFormFieldSession) => boolean;
|
|
488
|
+
/**
|
|
489
|
+
* Localized accessible names for core-owned table insertion furniture.
|
|
490
|
+
* Defaults to English from `@docx-editor.dev/i18n` when omitted.
|
|
491
|
+
*/
|
|
492
|
+
readonly tableInteractionLabel?: (key: 'table.insertRowBelow' | 'table.insertColumnRight') => string;
|
|
493
|
+
/** Localized drawing refusal labels; defaults to English when omitted. */
|
|
494
|
+
readonly drawingStrings?: DrawingPaintStrings;
|
|
495
|
+
/** Override raster decode for package image intents; defaults to browser/headless. */
|
|
496
|
+
readonly imageDecodePort?: ImageDecodePort;
|
|
497
|
+
/**
|
|
498
|
+
* Localized name for a generated TOC, written as the control's `w:alias` on insert.
|
|
499
|
+
*
|
|
500
|
+
* The update ACTIONS are not here: they are rows in the host's context menu, which owns
|
|
501
|
+
* its own labels. The engine paints no menu of its own.
|
|
502
|
+
*/
|
|
503
|
+
readonly tocLabels?: {
|
|
504
|
+
readonly title: string;
|
|
279
505
|
};
|
|
280
506
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Receives the element that shows the loading indicator on the first page, while a large
|
|
510
|
+
* document lays out its remaining pages.
|
|
511
|
+
*
|
|
512
|
+
* @example
|
|
513
|
+
* ```ts
|
|
514
|
+
* editor.setOpeningIndicatorHost({
|
|
515
|
+
* publish(element) {
|
|
516
|
+
* // Render your indicator into `element`, or remove it when `element` is null.
|
|
517
|
+
* },
|
|
518
|
+
* });
|
|
519
|
+
* ```
|
|
520
|
+
*
|
|
521
|
+
* @public
|
|
522
|
+
*/
|
|
523
|
+
interface OpeningIndicatorHost {
|
|
524
|
+
/**
|
|
525
|
+
* Called with the indicator element when the first pages show, and with `null` when the
|
|
526
|
+
* remaining pages are laid out or the open is abandoned. The element is empty while a host
|
|
527
|
+
* is set: render the host's content into it. It is centered on the first page, at most 30%
|
|
528
|
+
* of the window height below the page top, and scrolls with the document.
|
|
529
|
+
*/
|
|
530
|
+
publish(element: HTMLElement | null): void;
|
|
301
531
|
}
|
|
302
532
|
|
|
303
533
|
/**
|
|
@@ -342,6 +572,8 @@ interface DocxEditorConfig {
|
|
|
342
572
|
* requests — the engine never supplies one, so that stays your call.
|
|
343
573
|
*/
|
|
344
574
|
fonts?: FontConfiguration | FontConfigurationFragment | FontResolver;
|
|
575
|
+
/** Explicit shaping execution limits. Omitted, the per-face byte ceiling remains 16 MiB. */
|
|
576
|
+
fontShaping?: FontShapingOptions;
|
|
345
577
|
author?: string;
|
|
346
578
|
/** BCP-47 locale for regional date input and generated labels; defaults to en-US. */
|
|
347
579
|
locale?: string;
|
|
@@ -354,6 +586,14 @@ interface DocxEditorConfig {
|
|
|
354
586
|
* reason. See {@link EditorModule}.
|
|
355
587
|
*/
|
|
356
588
|
modules?: readonly EditorModule[];
|
|
589
|
+
/**
|
|
590
|
+
* Opt-in relaxation of content-control `w:lock`: with `allowFormattingInLockedContent`,
|
|
591
|
+
* `contentLocked` / `sdtContentLocked` controls refuse typing, pasting and deleting their
|
|
592
|
+
* text as always, but accept run formatting (toolbar, shortcuts, automation `setFont`) —
|
|
593
|
+
* for hosts that protect WHAT a control says and let authors style it. Default: Word's
|
|
594
|
+
* behaviour, where a content lock refuses every edit including formatting.
|
|
595
|
+
*/
|
|
596
|
+
contentLockPolicy?: ContentLockPolicy;
|
|
357
597
|
/**
|
|
358
598
|
* The mode the editor opens in — one prop, matching the toolbar's three-state pill.
|
|
359
599
|
*
|
|
@@ -410,6 +650,12 @@ interface DocxEditorConfig {
|
|
|
410
650
|
* shared paragraph text keeps every field one unit.
|
|
411
651
|
*/
|
|
412
652
|
fieldResults?: FieldResultsMode;
|
|
653
|
+
/**
|
|
654
|
+
* How the caret moves through an inline control with a content lock. `'atomic'` makes such a
|
|
655
|
+
* control one caret unit; `'characters'` (the default) walks through its characters, as Word
|
|
656
|
+
* does. Fixed for the instance.
|
|
657
|
+
*/
|
|
658
|
+
lockedControlNavigation?: LockedControlNavigation;
|
|
413
659
|
/** Override raster decode for insert/replace image commands; defaults to browser/headless. */
|
|
414
660
|
imageDecodePort?: ImageDecodePort;
|
|
415
661
|
/**
|
|
@@ -458,10 +704,106 @@ interface HyperlinkChromeHandlers {
|
|
|
458
704
|
/** Ctrl/Cmd+K: open insert-or-edit for the selection. */
|
|
459
705
|
readonly onRequest?: () => void;
|
|
460
706
|
}
|
|
707
|
+
/**
|
|
708
|
+
* Host chrome for bookmarks.
|
|
709
|
+
*
|
|
710
|
+
* @public
|
|
711
|
+
*/
|
|
712
|
+
interface BookmarkChromeHandlers {
|
|
713
|
+
/**
|
|
714
|
+
* Open the Bookmark dialog for the selection: the `openBookmarkDialog` command, which the
|
|
715
|
+
* Insert menu row and Ctrl/Cmd+Shift+F5 send.
|
|
716
|
+
*/
|
|
717
|
+
readonly onRequest?: () => void;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Host chrome for comment drafts: the review rail, or the host's own comment UI.
|
|
721
|
+
*
|
|
722
|
+
* @public
|
|
723
|
+
*/
|
|
724
|
+
interface CommentDraftChromeHandlers {
|
|
725
|
+
/**
|
|
726
|
+
* Open a comment draft on the selection: the `review.addComment` control's press. The
|
|
727
|
+
* handler takes no arguments. It reads the selection with `getSelectionPlacement`, and can
|
|
728
|
+
* pin it with `retainSelection` while the draft is open. The most recent registration
|
|
729
|
+
* receives each request.
|
|
730
|
+
*/
|
|
731
|
+
readonly onRequest?: () => void;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Host chrome for Go To: the Go to tab of `DocxEditor.Navigation`, or the host's own.
|
|
735
|
+
*
|
|
736
|
+
* @public
|
|
737
|
+
*/
|
|
738
|
+
interface GoToChromeHandlers {
|
|
739
|
+
/** Open the Go To UI: the `openGoTo` command, which its shortcut also sends. */
|
|
740
|
+
readonly onRequest?: () => void;
|
|
741
|
+
/**
|
|
742
|
+
* Whether Ctrl+G (Cmd+Option+G on macOS) in the document opens this UI. Defaults to `true`.
|
|
743
|
+
* With `false` the chord is left to the browser; `openGoTo` still opens the UI. The most
|
|
744
|
+
* recent registration decides. It is read when the chord arrives, so a getter can follow a
|
|
745
|
+
* setting without registering again.
|
|
746
|
+
*/
|
|
747
|
+
readonly shortcut?: boolean;
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* One painted bookmark mark, as `BookmarkMarkOptions` callbacks see it.
|
|
751
|
+
*
|
|
752
|
+
* @public
|
|
753
|
+
*/
|
|
754
|
+
interface BookmarkMarkInfo {
|
|
755
|
+
/** The bookmark's name as the document writes it. */
|
|
756
|
+
readonly name: string;
|
|
757
|
+
/** Whether the name starts with an underscore. */
|
|
758
|
+
readonly hidden: boolean;
|
|
759
|
+
/** The story the bookmark is in. */
|
|
760
|
+
readonly story: BookmarkStory;
|
|
761
|
+
/** Which mark this is: the start bracket, the end bracket, or a point bookmark's I-beam. */
|
|
762
|
+
readonly edge: 'start' | 'end' | 'point';
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* How Show bookmarks paints its marks. Register with `setBookmarkMarks`.
|
|
766
|
+
*
|
|
767
|
+
* @public
|
|
768
|
+
*/
|
|
769
|
+
interface BookmarkMarkOptions {
|
|
770
|
+
/**
|
|
771
|
+
* Which bookmarks get marks: `'visible'` (the default) skips hidden bookmarks, `'all'`
|
|
772
|
+
* includes them, and a function decides per bookmark.
|
|
773
|
+
*/
|
|
774
|
+
readonly include?: 'visible' | 'all' | ((bookmark: Omit<BookmarkMarkInfo, 'edge'>) => boolean);
|
|
775
|
+
/**
|
|
776
|
+
* Adjust each mark before it is placed: add a class, a `title` tooltip, or attributes.
|
|
777
|
+
* Return another element to replace the mark. The editor positions whatever comes back.
|
|
778
|
+
* Marks ignore the pointer; set `pointer-events: auto` on a mark that shows a tooltip.
|
|
779
|
+
*/
|
|
780
|
+
readonly decorate?: (element: HTMLElement, mark: BookmarkMarkInfo) => HTMLElement | void;
|
|
781
|
+
/** Keep the marks when the browser prints the page. Exports never include them. */
|
|
782
|
+
readonly print?: boolean;
|
|
783
|
+
}
|
|
461
784
|
/** Host chrome that edits a clicked Office Math equation. */
|
|
462
785
|
interface EquationChromeHandlers {
|
|
463
786
|
readonly onPopover?: (activation: EquationActivation) => void;
|
|
464
787
|
}
|
|
788
|
+
/**
|
|
789
|
+
* How {@link DocxEditorInstance.attach} moves an open document.
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* ```ts
|
|
793
|
+
* // Bring the editor home from a pop-out and keep typing there.
|
|
794
|
+
* editor.attach(mainSlot, { focus: true });
|
|
795
|
+
* ```
|
|
796
|
+
*
|
|
797
|
+
* @public
|
|
798
|
+
*/
|
|
799
|
+
interface AttachOptions {
|
|
800
|
+
/**
|
|
801
|
+
* Focus the pages after the move, so the caret shows and typing continues. Default: focus
|
|
802
|
+
* returns only when the pages had it before the move or the `detach()`. A first mount from
|
|
803
|
+
* bytes does not take focus.
|
|
804
|
+
*/
|
|
805
|
+
readonly focus?: boolean;
|
|
806
|
+
}
|
|
465
807
|
/**
|
|
466
808
|
* The concrete facade type: the full `Editor` contract plus the instance-only surface.
|
|
467
809
|
*
|
|
@@ -486,6 +828,28 @@ interface DocxEditorInstance extends Editor {
|
|
|
486
828
|
* command needs.
|
|
487
829
|
*/
|
|
488
830
|
setHyperlinkChrome(handlers: HyperlinkChromeHandlers): Unsubscribe;
|
|
831
|
+
/**
|
|
832
|
+
* Wire the host's bookmark dialog to Ctrl/Cmd+Shift+F5. Returns an unsubscribe that
|
|
833
|
+
* restores whatever was registered before, like {@link DocxEditorInstance.setHyperlinkChrome}.
|
|
834
|
+
*/
|
|
835
|
+
setBookmarkChrome(handlers: BookmarkChromeHandlers): Unsubscribe;
|
|
836
|
+
/**
|
|
837
|
+
* Wire the host's Go To UI to the `openGoTo` command. Returns an unsubscribe that restores
|
|
838
|
+
* whatever was registered before. `DocxEditor.Navigation` registers its Go to tab.
|
|
839
|
+
*/
|
|
840
|
+
setGoToChrome(handlers: GoToChromeHandlers): Unsubscribe;
|
|
841
|
+
/**
|
|
842
|
+
* Wire the host's comment draft UI to the `review.addComment` control. Returns an
|
|
843
|
+
* unsubscribe that restores whatever was registered before. While nothing is registered,
|
|
844
|
+
* the control is disabled, because nothing could open the draft. The review rail registers
|
|
845
|
+
* when it mounts.
|
|
846
|
+
*/
|
|
847
|
+
setCommentDraftChrome(handlers: CommentDraftChromeHandlers): Unsubscribe;
|
|
848
|
+
/**
|
|
849
|
+
* Choose which bookmarks Show bookmarks marks and customize each mark. Returns an
|
|
850
|
+
* unsubscribe that restores the previous options.
|
|
851
|
+
*/
|
|
852
|
+
setBookmarkMarks(options: BookmarkMarkOptions): Unsubscribe;
|
|
489
853
|
/**
|
|
490
854
|
* Register local revision settings chrome. Disposal cancels its active sessions.
|
|
491
855
|
* Manual renderers take priority over fallback renderers. Pass null to use native chrome
|
|
@@ -694,20 +1058,42 @@ interface DocxEditorInstance extends Editor {
|
|
|
694
1058
|
*/
|
|
695
1059
|
setReviewPaneOptions(options: ReviewPaneOptions): ExecResult;
|
|
696
1060
|
/**
|
|
697
|
-
* Mount into `el
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
1061
|
+
* Mount into `el`, which may belong to another document: a pop-out window opened with
|
|
1062
|
+
* `window.open`, or a same-origin iframe.
|
|
1063
|
+
*
|
|
1064
|
+
* A document that is already open MOVES into `el`, from another element or from a
|
|
1065
|
+
* previous `detach()`: the undo history, the selection, other editing state (such as an
|
|
1066
|
+
* armed format painter) and any collaboration session stay as they are. The reading
|
|
1067
|
+
* position is kept, and keyboard focus returns when the pages had it before (see
|
|
1068
|
+
* {@link AttachOptions.focus}). Focus, selection, pointer, scroll and resize listeners,
|
|
1069
|
+
* timers and registered font faces follow `el`'s window. Pending document bytes (an
|
|
1070
|
+
* instance created without a container, or a `load` while detached) mount now instead, as
|
|
1071
|
+
* a fresh session.
|
|
701
1072
|
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
1073
|
+
* The host copies the editor stylesheet and any web fonts it loads into `el`'s document.
|
|
1074
|
+
* Move the editor back, or `destroy()` it, before that window closes. An element whose
|
|
1075
|
+
* window has closed (or that has no window) is refused with an `invalidTarget` error and
|
|
1076
|
+
* the editor stays where it is. After `destroy()` this is a no-op that emits a typed
|
|
1077
|
+
* `error` event: a destroyed instance never remounts.
|
|
1078
|
+
*
|
|
1079
|
+
* @example
|
|
1080
|
+
* ```ts
|
|
1081
|
+
* // Pop the editor out into its own window and bring it back later.
|
|
1082
|
+
* const popup = window.open('', 'editor', 'width=900,height=1000')!;
|
|
1083
|
+
* copyStyles(document, popup.document); // host-owned: the editor CSS and fonts
|
|
1084
|
+
* const slot = popup.document.createElement('div');
|
|
1085
|
+
* popup.document.body.append(slot);
|
|
1086
|
+
* editor.attach(slot);
|
|
1087
|
+
* popup.addEventListener('pagehide', () => editor.attach(mainSlot), { once: true });
|
|
1088
|
+
* ```
|
|
705
1089
|
*/
|
|
706
|
-
attach(el: HTMLElement): void;
|
|
1090
|
+
attach(el: HTMLElement, options?: AttachOptions): void;
|
|
707
1091
|
/**
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
1092
|
+
* Take the editor out of its element and keep it, with its undo history, selection and
|
|
1093
|
+
* collaboration session, for a later `attach`. While detached the instance still saves,
|
|
1094
|
+
* runs commands and receives remote edits; it paints when attached again. A `load` while
|
|
1095
|
+
* detached replaces the kept document. `destroy()` releases everything. No-op when already
|
|
1096
|
+
* detached or destroyed.
|
|
711
1097
|
*/
|
|
712
1098
|
detach(): void;
|
|
713
1099
|
}
|
|
@@ -1290,153 +1676,27 @@ interface RemoteCaretLabelHost {
|
|
|
1290
1676
|
publish(anchors: readonly RemoteCaretLabelAnchor[]): void;
|
|
1291
1677
|
}
|
|
1292
1678
|
|
|
1293
|
-
/**
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
* complex field results are not supported. Refused with a {@link collaborationModel}.
|
|
1315
|
-
*/
|
|
1316
|
-
readonly fieldResults?: FieldResultsMode;
|
|
1317
|
-
readonly measurer?: TextMeasurer;
|
|
1318
|
-
/** Ambient author for tracked edits. Required before suggesting can write anything. */
|
|
1319
|
-
readonly author?: string;
|
|
1320
|
-
/** Opening mode; changeable at runtime with `setEditingMode`. */
|
|
1321
|
-
readonly editingMode?: SurfaceEditingMode;
|
|
1322
|
-
/**
|
|
1323
|
-
* Identifies the measurer for cache invalidation.
|
|
1324
|
-
*
|
|
1325
|
-
* Fonts resolve asynchronously, so a host that swaps its measurer must change this or the
|
|
1326
|
-
* cached pre-font layout is served for the rest of the session.
|
|
1327
|
-
*/
|
|
1328
|
-
readonly producer?: string;
|
|
1329
|
-
/**
|
|
1330
|
-
* Maps a document-declared font family to the alias its registered bytes live under, so
|
|
1331
|
-
* painted runs can use embedded glyphs without the file's family name entering the
|
|
1332
|
-
* page-global CSS font namespace.
|
|
1333
|
-
*/
|
|
1334
|
-
readonly fontAlias?: (family: string) => string | undefined;
|
|
1335
|
-
/** Points to CSS pixels. */
|
|
1336
|
-
readonly scale?: number;
|
|
1337
|
-
/**
|
|
1338
|
-
* How revisions project into layout and paint. Omitted keeps the layout default
|
|
1339
|
-
* (`all-markup`). The editor facade passes `proposed` when no review module is
|
|
1340
|
-
* registered — the free tier's final-state rendering; the machinery below this
|
|
1341
|
-
* option is shared either way.
|
|
1342
|
-
*/
|
|
1343
|
-
readonly revisionDisplayMode?: ReviewDisplayMode;
|
|
1344
|
-
/** Authors whose changes open in their accepted view-time projection. */
|
|
1345
|
-
readonly hiddenRevisionAuthors?: readonly string[];
|
|
1346
|
-
/**
|
|
1347
|
-
* When a field's result wears Word's grey shading. Omitted keeps Word's own default,
|
|
1348
|
-
* `when-selected`.
|
|
1349
|
-
*
|
|
1350
|
-
* Applies to ORDINARY fields only. Legacy form fields follow the document's
|
|
1351
|
-
* `w:doNotShadeFormData`, because a form's blanks are the document's own statement about
|
|
1352
|
-
* itself rather than a reader's preference.
|
|
1353
|
-
*
|
|
1354
|
-
* A paint-level option, not a layout one: it changes no geometry, so switching it repaints
|
|
1355
|
-
* without remeasuring a single line.
|
|
1356
|
-
*/
|
|
1357
|
-
readonly fieldShading?: FieldShadingMode;
|
|
1358
|
-
/** Show paragraph-end furniture without changing document content. */
|
|
1359
|
-
readonly showParagraphMarks?: boolean;
|
|
1360
|
-
readonly onToggleParagraphMarks?: () => void;
|
|
1361
|
-
/**
|
|
1362
|
-
* How tracked changes are coloured: by AUTHOR (the default), by kind, or by author with
|
|
1363
|
-
* host-pinned colours. A paint-level option like {@link fieldShading}: it changes no
|
|
1364
|
-
* geometry, so switching it repaints without remeasuring a line. Applies wherever
|
|
1365
|
-
* revision markup paints, whatever the {@link revisionDisplayMode} leaves visible.
|
|
1366
|
-
*/
|
|
1367
|
-
readonly revisionStyles?: RevisionStyles;
|
|
1368
|
-
readonly revisionMarkup?: ResolvedRevisionMarkup;
|
|
1369
|
-
/**
|
|
1370
|
-
* The review module's derivation hooks for this surface's session. Absent,
|
|
1371
|
-
* `session.reviewItems()` is the typed empty queue and every review affordance
|
|
1372
|
-
* built on it stays inert.
|
|
1373
|
-
*/
|
|
1374
|
-
readonly reviewModel?: ReviewModuleContribution;
|
|
1375
|
-
/**
|
|
1376
|
-
* The family a run with no authored font is reported as by `formatting()` AND painted
|
|
1377
|
-
* in — the face the measurer falls back to. Absent, such a run reports
|
|
1378
|
-
* `fontFamily: null` and paints in whatever font the page inherits, which the measurer
|
|
1379
|
-
* did not measure: visible glyphs drift from wrap points and caret geometry.
|
|
1380
|
-
*/
|
|
1381
|
-
readonly defaultFontFamily?: string;
|
|
1382
|
-
/**
|
|
1383
|
-
* Who resolves a pointer to a caret.
|
|
1384
|
-
*
|
|
1385
|
-
* `'engine'` (the default) answers from the layout records, which is what makes a click in
|
|
1386
|
-
* a margin, an indent or a cell's padding land where it was aimed. `'native'` binds no
|
|
1387
|
-
* pointer handlers and leaves the browser's own caret placement in charge.
|
|
1388
|
-
*/
|
|
1389
|
-
readonly pointer?: 'engine' | 'native';
|
|
1390
|
-
readonly onChange?: (state: PaginatedSurfaceState) => void;
|
|
1391
|
-
/**
|
|
1392
|
-
* Told each time an edit is refused, with the raw reason: a store code such as `'locked'`,
|
|
1393
|
-
* or the surface's own refusal sentence. The raw reason can be a sentence, so a listener
|
|
1394
|
-
* maps it to a public code before it reports anything.
|
|
1395
|
-
*/
|
|
1396
|
-
readonly onRejection?: (reason: string) => void;
|
|
1397
|
-
/**
|
|
1398
|
-
* Told the milliseconds of each layout pass and each paint. For `'input'`, told the browser
|
|
1399
|
-
* timestamp of each key press or pointer press on the pages, so a listener can time it to
|
|
1400
|
-
* the next frame. Numbers only.
|
|
1401
|
-
*/
|
|
1402
|
-
readonly onTiming?: (phase: 'layout' | 'paint' | 'input', value: number) => void;
|
|
1403
|
-
/**
|
|
1404
|
-
* A plain click on an external (or inert) hyperlink, for a host to open its popover with.
|
|
1405
|
-
*
|
|
1406
|
-
* Absent means such a click does nothing. That is deliberate: a host with no popover
|
|
1407
|
-
* mounted must not have clicks silently opening tabs, and the popover is the only path to
|
|
1408
|
-
* activation (see the navigation module's single `window.open` gate).
|
|
1409
|
-
*/
|
|
1410
|
-
readonly onHyperlinkPopover?: (activation: HyperlinkActivation) => void;
|
|
1411
|
-
readonly onEquationPopover?: (activation: EquationActivation) => void;
|
|
1412
|
-
/**
|
|
1413
|
-
* Ctrl/Cmd+K — Word's Insert Hyperlink. The engine reports the request; the host's chrome
|
|
1414
|
-
* decides what a link dialog looks like. A host that passes nothing leaves the key alone
|
|
1415
|
-
* rather than doing something surprising with it.
|
|
1416
|
-
*/
|
|
1417
|
-
readonly onRequestHyperlink?: () => void;
|
|
1418
|
-
/** Return true when host chrome handles this session. */
|
|
1419
|
-
readonly onRequestTextFormField?: (session: TextFormFieldDialogSession) => boolean;
|
|
1420
|
-
readonly onRequestContentControlWidget?: (session: ContentControlWidgetSession) => boolean;
|
|
1421
|
-
readonly onRequestInvalidTextFormField?: (session: InvalidTextFormFieldSession) => boolean;
|
|
1422
|
-
/**
|
|
1423
|
-
* Localized accessible names for core-owned table insertion furniture.
|
|
1424
|
-
* Defaults to English from `@docx-editor.dev/i18n` when omitted.
|
|
1425
|
-
*/
|
|
1426
|
-
readonly tableInteractionLabel?: (key: 'table.insertRowBelow' | 'table.insertColumnRight') => string;
|
|
1427
|
-
/** Localized drawing refusal labels; defaults to English when omitted. */
|
|
1428
|
-
readonly drawingStrings?: DrawingPaintStrings;
|
|
1429
|
-
/** Override raster decode for package image intents; defaults to browser/headless. */
|
|
1430
|
-
readonly imageDecodePort?: ImageDecodePort;
|
|
1431
|
-
/**
|
|
1432
|
-
* Localized name for a generated TOC, written as the control's `w:alias` on insert.
|
|
1433
|
-
*
|
|
1434
|
-
* The update ACTIONS are not here: they are rows in the host's context menu, which owns
|
|
1435
|
-
* its own labels. The engine paints no menu of its own.
|
|
1436
|
-
*/
|
|
1437
|
-
readonly tocLabels?: {
|
|
1438
|
-
readonly title: string;
|
|
1439
|
-
};
|
|
1679
|
+
/** The surface's bookmark lane. */
|
|
1680
|
+
interface SurfaceBookmarks {
|
|
1681
|
+
/** Every bookmark in the document: body first, then headers, footers and notes. */
|
|
1682
|
+
list(): readonly BookmarkSummary[];
|
|
1683
|
+
/** Why `insert(name)` would be refused now, or null. */
|
|
1684
|
+
insertRefusal(name: string): string | null;
|
|
1685
|
+
/** Bookmark the selection under `name`, moving a bookmark that already has it. */
|
|
1686
|
+
insert(name: string): boolean;
|
|
1687
|
+
/** Remove the bookmark with this name, compared without case, and its copies. */
|
|
1688
|
+
remove(name: string): boolean;
|
|
1689
|
+
/** Keep the first bookmark with this name and remove its copies, in one transaction. */
|
|
1690
|
+
keepFirst(name: string): boolean;
|
|
1691
|
+
/** Why a bookmark write cannot happen now, or null. */
|
|
1692
|
+
writeRefusal(): string | null;
|
|
1693
|
+
/** Select the bookmark's range and scroll it into view. */
|
|
1694
|
+
goTo(name: string): boolean;
|
|
1695
|
+
/** Whether the marks are shown. */
|
|
1696
|
+
shown(): boolean;
|
|
1697
|
+
setShown(shown: boolean): void;
|
|
1698
|
+
/** Paint the marks for one rendered frame. */
|
|
1699
|
+
paint(frame: SurfaceOverlayFrame): void;
|
|
1440
1700
|
}
|
|
1441
1701
|
|
|
1442
1702
|
/**
|
|
@@ -1465,7 +1725,8 @@ interface SurfaceFormatting {
|
|
|
1465
1725
|
/**
|
|
1466
1726
|
* `w:spacing`'s line rule and its value: LINES for `multiple`, points for the other two
|
|
1467
1727
|
* (`w:line` is 240ths of a line under `auto` and twentieths of a point otherwise).
|
|
1468
|
-
*
|
|
1728
|
+
* The effective value: a paragraph whose cascade states none reads as single spacing
|
|
1729
|
+
* (`multiple`, 1). Null when the selection's paragraphs disagree.
|
|
1469
1730
|
*/
|
|
1470
1731
|
readonly lineSpacing: {
|
|
1471
1732
|
readonly rule: 'multiple' | 'exact' | 'atLeast';
|
|
@@ -1637,12 +1898,16 @@ interface PaginatedSurface {
|
|
|
1637
1898
|
readonly commitGuard?: () => boolean;
|
|
1638
1899
|
}): Promise<ImageIntentResult>;
|
|
1639
1900
|
layout(): SemanticLayout;
|
|
1901
|
+
/** The measurer layout uses; sizes engine-authored shapes such as a watermark. */
|
|
1902
|
+
textMeasurer?(): TextMeasurer;
|
|
1640
1903
|
state(): PaginatedSurfaceState;
|
|
1641
1904
|
/** One-based page at the caret, or at the centre of the mounted viewport. */
|
|
1642
1905
|
currentPage(mode?: 'viewport' | 'caret'): number;
|
|
1643
1906
|
type(text: string): void;
|
|
1644
1907
|
/** Author one explicit tracked text change without changing the editing mode. */
|
|
1645
1908
|
proposeTextChange(kind: 'insertion' | 'deletion' | 'replacement', text: string, author?: string): boolean;
|
|
1909
|
+
/** Replace a paragraph range of the active story in place; suggesting tracks it. */
|
|
1910
|
+
replaceTextInPlace(paragraphId: string, start: number, end: number, text: string): boolean;
|
|
1646
1911
|
/**
|
|
1647
1912
|
* Queue plain typed text for a batched commit at the caret.
|
|
1648
1913
|
*
|
|
@@ -2006,6 +2271,11 @@ interface PaginatedSurface {
|
|
|
2006
2271
|
* with code `destroyed`. Does not change focus.
|
|
2007
2272
|
*/
|
|
2008
2273
|
save(): Uint8Array;
|
|
2274
|
+
/**
|
|
2275
|
+
* {@link save} in steps a caller can pause between. Everything `save` does before it
|
|
2276
|
+
* serializes happens at the call, and the document is captured then.
|
|
2277
|
+
*/
|
|
2278
|
+
saveSteps(): Generator<void, Uint8Array>;
|
|
2009
2279
|
/** Whether a body paragraph belongs to a detected TOC boundary or cached result. */
|
|
2010
2280
|
isInsideToc(paragraphId: string): boolean;
|
|
2011
2281
|
/**
|
|
@@ -2013,6 +2283,8 @@ interface PaginatedSurface {
|
|
|
2013
2283
|
* calls `openExternal`; nothing else in the engine may call `window.open`.
|
|
2014
2284
|
*/
|
|
2015
2285
|
readonly navigation: SurfaceNavigation;
|
|
2286
|
+
/** List, add, delete and jump to bookmarks, and show their marks. */
|
|
2287
|
+
readonly bookmarkEditing: SurfaceBookmarks;
|
|
2016
2288
|
/**
|
|
2017
2289
|
* Pin the current selection so it stays VISIBLY selected while focus is elsewhere.
|
|
2018
2290
|
*
|
|
@@ -2149,11 +2421,19 @@ interface PaginatedSurface {
|
|
|
2149
2421
|
* pages painting text the tree no longer had, every card anchored where it used to be, and
|
|
2150
2422
|
* the caret past the end of the paragraph — after which every keystroke was refused with
|
|
2151
2423
|
* `offset-out-of-range` until the user happened to click somewhere else.
|
|
2424
|
+
*
|
|
2425
|
+
* Returns null when the write went through, and otherwise why it did not: the external
|
|
2426
|
+
* refresh when the write guard skipped the commit, a gate's reason (viewing, collaboration)
|
|
2427
|
+
* when `run` never ran, or the reason `run` reported. A `run` that commits nothing without a
|
|
2428
|
+
* reason counts as refused (`'rejected'`). Gate and `run` reasons also become
|
|
2429
|
+
* `lastRejection`; a skipped refresh changes nothing, `lastRejection` included.
|
|
2430
|
+
*
|
|
2431
|
+
* `run` receives the store history token of this commit, for the store write it performs.
|
|
2152
2432
|
*/
|
|
2153
|
-
commitReviewOps(run: () => {
|
|
2433
|
+
commitReviewOps(run: (historyToken: symbol | undefined) => {
|
|
2154
2434
|
readonly committed: boolean;
|
|
2155
2435
|
readonly reason?: unknown;
|
|
2156
|
-
}, intent?: ReviewWriteIntent):
|
|
2436
|
+
}, intent?: ReviewWriteIntent): string | null;
|
|
2157
2437
|
/**
|
|
2158
2438
|
* The layout as last PUBLISHED, without forcing pending work.
|
|
2159
2439
|
*
|
|
@@ -2209,9 +2489,11 @@ interface PaginatedSurface {
|
|
|
2209
2489
|
* other order repainted the bands and reported state while the caret was still the only
|
|
2210
2490
|
* evidence, so a host saw the wrong twin active for one frame and then a correction. Omit it
|
|
2211
2491
|
* to pin against the live selection, which is what a header or note scope has already set.
|
|
2492
|
+
* `preventScroll` installs `selection` with no scroll, now or on a later repaint.
|
|
2212
2493
|
*/
|
|
2213
2494
|
activateReview(key: string, selection?: SemanticSelection, options?: {
|
|
2214
2495
|
readonly allowExcluded?: boolean;
|
|
2496
|
+
readonly preventScroll?: boolean;
|
|
2215
2497
|
}): void;
|
|
2216
2498
|
/**
|
|
2217
2499
|
* The key {@link activateReview} pinned, or null once its selection is no longer live.
|
|
@@ -2289,6 +2571,25 @@ interface PaginatedSurface {
|
|
|
2289
2571
|
* @public
|
|
2290
2572
|
*/
|
|
2291
2573
|
setTableInteractionLabel(resolver: (key: 'table.insertRowBelow' | 'table.insertColumnRight') => string): void;
|
|
2574
|
+
/**
|
|
2575
|
+
* Move the painted pages into `container`, which may belong to another document: a pop-out
|
|
2576
|
+
* window or an iframe. The session, undo history, selection and collaboration replica stay
|
|
2577
|
+
* as they are; only the DOM and the document- and window-level listeners move. Open
|
|
2578
|
+
* content-control menus close.
|
|
2579
|
+
*/
|
|
2580
|
+
moveTo(container: HTMLElement, options?: {
|
|
2581
|
+
readonly focus?: boolean;
|
|
2582
|
+
}): void;
|
|
2583
|
+
/**
|
|
2584
|
+
* Take the pages out of their container and keep them, with all editing state, for a later
|
|
2585
|
+
* `moveTo`. A parked surface still accepts commands and remote edits; it paints into a
|
|
2586
|
+
* private, disconnected holder until it moves again.
|
|
2587
|
+
*/
|
|
2588
|
+
park(): void;
|
|
2589
|
+
/** Whether the surface is parked: mounted nowhere, state kept. */
|
|
2590
|
+
parked(): boolean;
|
|
2591
|
+
/** The element the pages are in now: the host's, or a private holder while parked. */
|
|
2592
|
+
hostElement(): HTMLElement;
|
|
2292
2593
|
destroy(): void;
|
|
2293
2594
|
/**
|
|
2294
2595
|
* The section a painted page belongs to, and the page that section starts on.
|
|
@@ -2338,8 +2639,10 @@ interface PaginatedSurface {
|
|
|
2338
2639
|
* Flushes layout so the next enter/rebind sees the new resolution.
|
|
2339
2640
|
*/
|
|
2340
2641
|
applyHeaderFooterLifecycle(op: {
|
|
2341
|
-
readonly op: 'createHeaderFooter' | 'deleteHeaderFooter' | 'linkToPrevious' | 'unlinkFromPrevious' | 'setSectionFurnitureOptions' | 'setDocumentProtection';
|
|
2642
|
+
readonly op: 'createHeaderFooter' | 'deleteHeaderFooter' | 'linkToPrevious' | 'unlinkFromPrevious' | 'setSectionFurnitureOptions' | 'setDocumentProtection' | 'setWatermark';
|
|
2342
2643
|
readonly sectionIndex?: number;
|
|
2644
|
+
/** `setWatermark` only: the new watermark, or null to remove it. */
|
|
2645
|
+
readonly watermark?: PackageWatermarkWrite | null;
|
|
2343
2646
|
/** `setDocumentProtection` only: enforce filling-in-forms protection, or lift it. */
|
|
2344
2647
|
readonly enforce?: boolean;
|
|
2345
2648
|
readonly kind?: 'header' | 'footer';
|
|
@@ -3081,6 +3384,15 @@ declare const CHROME_GROUPS: readonly [{
|
|
|
3081
3384
|
readonly state: {
|
|
3082
3385
|
readonly kind: 'command';
|
|
3083
3386
|
};
|
|
3387
|
+
}, {
|
|
3388
|
+
readonly id: 'bookmarks';
|
|
3389
|
+
readonly shape: 'icon';
|
|
3390
|
+
readonly labelKey: 'formattingBar.showBookmarks';
|
|
3391
|
+
readonly defaultToolbar: false;
|
|
3392
|
+
readonly paths: readonly string[];
|
|
3393
|
+
readonly state: {
|
|
3394
|
+
readonly kind: 'command';
|
|
3395
|
+
};
|
|
3084
3396
|
}, {
|
|
3085
3397
|
readonly id: 'protectDocument';
|
|
3086
3398
|
readonly shape: 'icon';
|
|
@@ -3390,6 +3702,27 @@ declare const CHROME_GROUPS: readonly [{
|
|
|
3390
3702
|
readonly state: {
|
|
3391
3703
|
readonly kind: 'command';
|
|
3392
3704
|
};
|
|
3705
|
+
}, {
|
|
3706
|
+
readonly id: 'bookmark';
|
|
3707
|
+
readonly labelKey: 'toolbar.bookmark';
|
|
3708
|
+
readonly paths: readonly string[];
|
|
3709
|
+
readonly state: {
|
|
3710
|
+
readonly kind: 'command';
|
|
3711
|
+
};
|
|
3712
|
+
}, {
|
|
3713
|
+
readonly id: 'goToBookmark';
|
|
3714
|
+
readonly labelKey: 'toolbar.goToBookmark';
|
|
3715
|
+
readonly paths: readonly string[];
|
|
3716
|
+
readonly state: {
|
|
3717
|
+
readonly kind: 'command';
|
|
3718
|
+
};
|
|
3719
|
+
}, {
|
|
3720
|
+
readonly id: 'watermark';
|
|
3721
|
+
readonly labelKey: 'toolbar.watermark';
|
|
3722
|
+
readonly paths: readonly string[];
|
|
3723
|
+
readonly state: {
|
|
3724
|
+
readonly kind: 'command';
|
|
3725
|
+
};
|
|
3393
3726
|
}];
|
|
3394
3727
|
}];
|
|
3395
3728
|
/**
|
|
@@ -3406,7 +3739,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
|
|
|
3406
3739
|
*
|
|
3407
3740
|
* @public
|
|
3408
3741
|
*/
|
|
3409
|
-
type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'direction.ltr' | 'direction.rtl' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.revisionMarkup' | 'review.comments' | 'review.addComment' | 'review.paragraphMarks' | 'review.protectDocument' | 'review.simpleMarkup' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'file.exportMarkdown' | 'file.exportPdf' | 'file.print' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.textBox' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
|
|
3742
|
+
type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'direction.ltr' | 'direction.rtl' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.revisionMarkup' | 'review.comments' | 'review.addComment' | 'review.paragraphMarks' | 'review.bookmarks' | 'review.protectDocument' | 'review.simpleMarkup' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'file.exportMarkdown' | 'file.exportPdf' | 'file.print' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.textBox' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc' | 'insert.bookmark' | 'insert.goToBookmark' | 'insert.watermark';
|
|
3410
3743
|
/**
|
|
3411
3744
|
* Every control id in the chrome, as a literal union. Unique WITHIN a group, not
|
|
3412
3745
|
* globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
|
|
@@ -3738,7 +4071,8 @@ declare function runTableCommand(editor: Editor | null, command: EditorCommand,
|
|
|
3738
4071
|
*
|
|
3739
4072
|
* Construction is separate from mounting. Pass a `container` and the document mounts
|
|
3740
4073
|
* immediately; omit it and nothing touches the DOM until `attach(el)` — the provider-first
|
|
3741
|
-
* shape. `detach()`
|
|
4074
|
+
* shape. `detach()` parks the live document and a later `attach(el)` moves it in, with undo,
|
|
4075
|
+
* selection and collaboration intact, even into another window (a pop-out or an iframe).
|
|
3742
4076
|
*
|
|
3743
4077
|
* `snapshot()` is version-cached: the same reference until state actually moves, with
|
|
3744
4078
|
* reference-stable sub-objects, so it is safe as a `useSyncExternalStore` source.
|
|
@@ -3875,5 +4209,5 @@ interface ChromePrintJob {
|
|
|
3875
4209
|
*/
|
|
3876
4210
|
declare function runChromePrint(editor: Pick<Editor, 'save'> & Partial<Pick<Editor, 'snapshot'>>, handlers?: ChromeExportHandlers, container?: Document | Element): Promise<ChromePrintJob>;
|
|
3877
4211
|
|
|
3878
|
-
export {
|
|
3879
|
-
export type {
|
|
4212
|
+
export { CHROME_GROUPS as C, bindHistoryGroup as J, blankDocumentBytes as K, chromeMenuSlots as M, commandForSlot as N, commandForSlotValue as O, createDocxEditor as P, createFontSource as Q, customFonts as R, isChromePrintShortcut as U, loadFonts as V, runChromeExport as W, runChromePrint as X, runToolbarCommand as Y, toolbarCommandState as Z, CHROME_UNAVAILABLE_KEY as a7, TABLE_BORDER_STYLE_OPTIONS as aO, TABLE_BORDER_TARGET_OPTIONS as aP, TABLE_BORDER_WIDTH_OPTIONS as aQ, TABLE_CHROME_SLOT_IDS as aR, DEFAULT_TABLE_CHROME_DRAFT as ag, EMU_PER_POINT as ai, IMAGE_OVERLAY_NUDGE_PT as ap, IMAGE_OVERLAY_NUDGE_SHIFT_PT as aq, CHROME_MENUS as b, applyTableChromePick as b3, canExecuteImageCommand as b4, captureImageMutationPreconditions as b5, chromeControlCount as b6, chromeProbeForSlot as b7, chromeSlotId as b8, chromeSlotIsToggle as b9, selectedImageStateOf as bA, surfacePaintScale as bB, tableChromeIconPaths as bC, tableChromeLabelKeyForTarget as bD, tableChromeToolbarState as bE, tableChromeVisible as bF, tableCommandToolbarState as bG, toolbarCommandStates as bH, commandExecOptions as ba, commandForTableChromeSlotValue as bb, computeImageResizeResult as bc, computeMovedImagePosition as bd, computeResizedImageExtentEmu as be, createImageOverlayScrollPort as bf, cssPixelsToLayoutPoints as bg, defaultChromeGroups as bh, defaultTableLabel as bi, emuToOverlayPoints as bj, equationAtPosition as bk, executeImageCommand as bl, finalizeImageOverlayInteraction as bm, formattingBarChromeGroups as bn, isStaleImageInteractionCommit as bo, isTableChromeSlot as bp, layoutPointsToCssPixels as bq, overlayFrameToSheetCssPixels as br, overlayHostOrigin as bs, pointsToEmu as bt, probeTableChromeCommand as bu, resizePreservesAspect as bv, runSave as bw, runTableChromeCommand as bx, runTableCommand as by, selectedDrawingOverlayTargetOf as bz, ChromeExportError as c, ChromePrintError as m };
|
|
4213
|
+
export type { OpenPaginatedResult as $, HyperlinkChromeHandlers as A, BookmarkMarkInfo as B, DocxEditorConfig as D, LoadFontsResult as E, FontLoadFailure as F, GoToChromeHandlers as G, HistoryGroupBinding as H, LockedControlNavigation as I, LoadFontsRequest as L, SurfaceHyperlink as S, ToolbarCommandState as T, PaginatedSurfaceOptions as _, BookmarkMarkOptions as a, TextFormFieldDialogSession as a$, PaginatedSurface as a0, TableCommandPlan as a1, SurfaceFormatting as a2, AnchorFrameOrigin as a3, AttachOptions as a4, BookmarkChromeHandlers as a5, BookmarkMarkOptionsSource as a6, ChromeControl as a8, ChromeControlId as a9, ParagraphPropertyEdit as aA, PopupChromeRegistrationOptions as aB, RemoteCaretLabelAnchor as aC, RemoteCaretLabelHost as aD, ReviewWriteIntent as aE, RunTableChromeCommandResult as aF, SectionAnchor as aG, SectionBreakInsertType as aH, SelectedDrawingOverlayTarget as aI, SurfaceEquation as aJ, SurfaceInsertImageInput as aK, SurfaceNavigation as aL, SurfaceOverlayCoordinates as aM, SurfaceParagraphFormat as aN, TableBorderStyleOption as aS, TableBorderTargetOption as aT, TableBorderTargetValue as aU, TableBorderWidthOption as aV, TableChromeDraft as aW, TableChromePick as aX, TableChromeSlotId as aY, TableInteractionLabelKey as aZ, TextFormFieldChromeHandlers as a_, ChromeControlState as aa, ChromeExportView as ab, ChromeGroup as ac, ChromeGroupId as ad, ContentControlWidgetChromeHandlers as ae, ContentControlWidgetSession as af, DrawingSelectionIntent as ah, EditorCommandExecute as aj, EquationActivation as ak, EquationChromeHandlers as al, EquationOps as am, FinalizedImageOverlayInteraction as an, HyperlinkOps as ao, ImageInteractionSession as ar, ImageOverlayScrollPort as as, ImageResizeHandle as at, ImageResizeResult as au, InvalidTextFormFieldChromeHandlers as av, InvalidTextFormFieldSession as aw, OpeningIndicatorHost as ax, OverlayFrameRect as ay, PaginatedSurfaceState as az, ToolbarSlotValue as b0, ToolbarValueMap as b1, ToolbarValueSlot as b2, ChromeExportFormat as d, ChromeExportHandlers as e, ChromeExportResult as f, ChromeMenu as g, ChromeMenuEntry as h, ChromeMenuId as i, ChromeMenuItemEntry as j, ChromeMenuSeparatorEntry as k, ChromeMenuSubmenuEntry as l, ChromePrintErrorCode as n, ChromePrintJob as o, ChromePrintOptions as p, ChromeSlotId as q, CommentDraftChromeHandlers as r, CustomFontsOptions as s, CustomFontsResolver as t, DocxEditorInstance as u, FontLoadFailureReason as v, FontMeasurementState as w, FontUrlSource as x, HistoryGroupBindingOptions as y, HyperlinkActivation as z };
|