@docx-editor.dev/core 2.30.0 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +24 -0
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +18 -27
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +17 -16
  7. package/dist/binding.js +1 -1
  8. package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
  9. package/dist/{chrome-print-BM3Js-6X.d.ts → chrome-print-CznJ0ucN.d.ts} +361 -41
  10. package/dist/chunk-25EXMBV2.cjs +5 -0
  11. package/dist/chunk-2CWQY27B.cjs +1 -0
  12. package/dist/chunk-3IEXDEFH.cjs +7 -0
  13. package/dist/chunk-65XBN67F.cjs +2 -0
  14. package/dist/chunk-6NVZNB7O.cjs +3 -0
  15. package/dist/chunk-6UDJUI3W.cjs +2 -0
  16. package/dist/chunk-ACLR4DMK.js +1 -0
  17. package/dist/{chunk-RJCQGJR7.js → chunk-B2BEELUE.js} +1 -1
  18. package/dist/chunk-DDFHKQFU.js +30 -0
  19. package/dist/chunk-E4IAO4CY.cjs +2 -0
  20. package/dist/chunk-ETDZFNMI.js +2 -0
  21. package/dist/chunk-FDSL5OJU.cjs +30 -0
  22. package/dist/chunk-FS7CMYLT.js +4 -0
  23. package/dist/chunk-GDS24SZN.js +30 -0
  24. package/dist/chunk-GIY6NT2X.js +5 -0
  25. package/dist/chunk-GWM3AKUD.js +18 -0
  26. package/dist/chunk-HDOXACHP.js +2 -0
  27. package/dist/chunk-IILEENID.js +1 -0
  28. package/dist/chunk-L5TYBFDB.js +1 -0
  29. package/dist/chunk-MNF2K7NN.cjs +30 -0
  30. package/dist/chunk-O324RB6R.cjs +1 -0
  31. package/dist/chunk-OKMEMSKB.cjs +1 -0
  32. package/dist/chunk-QXJKYNYZ.js +1 -0
  33. package/dist/chunk-RALTVLB6.js +2 -0
  34. package/dist/chunk-SRVKFUFI.js +3 -0
  35. package/dist/chunk-TELQ52LG.cjs +1 -0
  36. package/dist/chunk-TJHE5EET.cjs +1 -0
  37. package/dist/chunk-UMMRURPE.js +7 -0
  38. package/dist/chunk-WN7ICTA5.js +1 -0
  39. package/dist/{chunk-FLBEJC6X.cjs → chunk-XJYZVGQR.cjs} +1 -1
  40. package/dist/chunk-ZGTIE3QJ.cjs +4 -0
  41. package/dist/chunk-ZOZI27AW.cjs +18 -0
  42. package/dist/collaboration/replication.cjs +1 -1
  43. package/dist/collaboration/replication.d.ts +20 -5
  44. package/dist/collaboration/replication.js +1 -1
  45. package/dist/collaboration.cjs +1 -1
  46. package/dist/collaboration.d.ts +5 -6
  47. package/dist/collaboration.js +1 -1
  48. package/dist/contracts/document.d.ts +3 -3
  49. package/dist/contracts/editor.d.ts +13 -10
  50. package/dist/contracts/interaction.d.ts +2 -2
  51. package/dist/contracts/modules.d.ts +15 -13
  52. package/dist/contracts/types.d.ts +135 -2
  53. package/dist/{custom-node-writes-0v0Kgw1T.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
  54. package/dist/{diagnostic-context-CcAO4q1s.d.ts → diagnostic-context-BtDUY3v2.d.ts} +3 -2
  55. package/dist/{diagnostic-hints-2Bke6H_w.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
  56. package/dist/{document-protection-8eyMWIJ0.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
  57. package/dist/{editor-DaEJd2so.d.ts → editor-DZwOTmlR.d.ts} +386 -279
  58. package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
  59. package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-B3L-1ALc.d.ts} +57 -4
  60. package/dist/editor.cjs +1 -1
  61. package/dist/editor.css +6 -4
  62. package/dist/editor.d.ts +646 -31
  63. package/dist/editor.js +1 -1
  64. package/dist/export.cjs +2 -2
  65. package/dist/export.d.ts +9 -16
  66. package/dist/export.js +2 -2
  67. package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
  68. package/dist/{font-resolver-CL9BVKZo.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
  69. package/dist/{headless-document-view-DZQN8Bnx.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
  70. package/dist/index.cjs +1 -1
  71. package/dist/index.d.ts +27 -26
  72. package/dist/index.js +1 -1
  73. package/dist/{layout-shaping-cEnVrhWg.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
  74. package/dist/layout.cjs +1 -1
  75. package/dist/layout.d.ts +95 -23
  76. package/dist/layout.js +1 -1
  77. package/dist/{note-properties-9FH8zAeG.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
  78. package/dist/output.cjs +1 -1
  79. package/dist/output.d.ts +24 -10
  80. package/dist/output.js +1 -1
  81. package/dist/{protocol-CZ1uUlPO.d.ts → protocol-DKa4qt7F.d.ts} +167 -5
  82. package/dist/{review-paragraph-order-CqVelc5A.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
  83. package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
  84. package/dist/{semantic-cell-selection-Dr9yxFZt.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
  85. package/dist/{semantic-interaction-Dc3pf3hr.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
  86. package/dist/{semantic-paint-Bz3FBAoH.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
  87. package/dist/{semantic-record-queries-Bx0pl6kL.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
  88. package/dist/{semantic-records-CjcF26ZL.d.ts → semantic-records-BvN-WWst.d.ts} +365 -512
  89. package/dist/store.cjs +1 -1
  90. package/dist/store.d.ts +47 -22
  91. package/dist/store.js +1 -1
  92. package/dist/{types-barrel-CA0xB8kH.d.ts → tree-op-types-C_S2niXW.d.ts} +1239 -747
  93. package/dist/{tree-package-store-DKhdEVym.d.ts → tree-package-store-CRHvMyNj.d.ts} +676 -646
  94. package/dist/{tree-session-contract-CwnTEVLF.d.ts → tree-session-contract-D1awo_dA.d.ts} +26 -13
  95. package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
  96. package/docs/accept-reject-without-scrolling.md +95 -0
  97. package/docs/comment-on-found-text.md +72 -0
  98. package/docs/custom-review-cards.md +178 -0
  99. package/docs/highlight-ranges.md +48 -0
  100. package/docs/index.md +36 -0
  101. package/docs/propose-rewrite.md +247 -0
  102. package/docs/tracked-replacement.md +68 -0
  103. package/package.json +3 -2
  104. package/dist/chunk-2PV5L5NJ.js +0 -5
  105. package/dist/chunk-5OTS2EJ7.js +0 -7
  106. package/dist/chunk-5P4223J4.cjs +0 -27
  107. package/dist/chunk-5RRAZMBU.cjs +0 -1
  108. package/dist/chunk-5SPITS5F.js +0 -18
  109. package/dist/chunk-6JIJOZDW.js +0 -1
  110. package/dist/chunk-7ATNKARV.js +0 -2
  111. package/dist/chunk-BGCUTKWE.cjs +0 -5
  112. package/dist/chunk-BTQKU64Q.cjs +0 -1
  113. package/dist/chunk-EBCXSH2W.js +0 -3
  114. package/dist/chunk-ERECKTIR.cjs +0 -2
  115. package/dist/chunk-HYASLE2G.cjs +0 -1
  116. package/dist/chunk-JC47NRJC.cjs +0 -3
  117. package/dist/chunk-KJRTNY2Q.cjs +0 -2
  118. package/dist/chunk-NKPUH3QJ.js +0 -1
  119. package/dist/chunk-PF5NJWS3.js +0 -2
  120. package/dist/chunk-PWTRJSES.cjs +0 -18
  121. package/dist/chunk-QFKGI242.cjs +0 -30
  122. package/dist/chunk-RPPV4S6T.cjs +0 -4
  123. package/dist/chunk-T32MGBJS.js +0 -1
  124. package/dist/chunk-UM26GH5B.js +0 -30
  125. package/dist/chunk-VRCZBFLH.js +0 -27
  126. package/dist/chunk-WF7JZ755.cjs +0 -1
  127. package/dist/chunk-WK5X2MMA.cjs +0 -7
  128. package/dist/chunk-WPDD2Y32.js +0 -2
  129. package/dist/chunk-YBMWBXST.cjs +0 -2
  130. package/dist/chunk-YZGUBCHP.js +0 -1
  131. package/dist/chunk-ZOS2PM4A.js +0 -4
  132. package/dist/image-resources-Bipz8toD.d.ts +0 -211
  133. package/dist/omml-equation-DP2WpUbK.d.ts +0 -97
package/dist/editor.d.ts CHANGED
@@ -9,41 +9,46 @@
9
9
  * @packageDocumentation
10
10
  * @public
11
11
  */
12
- export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-DKhdEVym.js';
13
- import { O as OoxmlPart, aK as TreeDocColorValue, r as ColorValue, _ as DrawingPositionInput, A as ParagraphTabStop } from './types-barrel-CA0xB8kH.js';
14
- export { aL as IMAGE_WRAP_TARGETS, a1 as ImageWrapTarget, z as ParagraphFlags, R as ReviewModelInput, aM as TEXT_FORM_FORMATS } from './types-barrel-CA0xB8kH.js';
15
- export { D as DEFAULT_IMAGE_RESOURCE_LIMITS, c as ImageDecodePort, b as ImageResourceLimits, R as RenderableImageMime, S as SupportedImageMime, a as VectorImageMime, r as resolveImageResourceLimits, d as resolveSvgIntrinsicSize, s as sniffImageMime, v as validateRasterHeader } from './image-resources-Bipz8toD.js';
16
- import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-CwnTEVLF.js';
17
- export { a as TreeApplyResult } from './tree-session-contract-CwnTEVLF.js';
12
+ import { O as OoxmlPart, aU as TreeDocColorValue, r as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop, ar as Watermark } from './tree-op-types-C_S2niXW.js';
13
+ export { aV as DEFAULT_IMAGE_RESOURCE_LIMITS, aW as IMAGE_WRAP_TARGETS, ad as ImageDecodePort, ae as ImageResourceLimits, ag as ImageWrapTarget, F as ParagraphFlags, al as RenderableImageMime, R as ReviewModelInput, an as SupportedImageMime, aX as TEXT_FORM_FORMATS, aq as VectorImageMime, aY as resolveImageResourceLimits, aZ as resolveSvgIntrinsicSize, a_ as sniffImageMime, a$ as validateRasterHeader } from './tree-op-types-C_S2niXW.js';
14
+ export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-CRHvMyNj.js';
15
+ import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-D1awo_dA.js';
16
+ export { a as TreeApplyResult } from './tree-session-contract-D1awo_dA.js';
18
17
  export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost, resolveEditorModules } from './contracts/modules.js';
19
18
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
20
- import { Q as FontConfiguration, z as EditorFontError, P as EditorSnapshot, b as EditorCommand, C as CanResult, aN as ZoomMode, aO as ReviewPaneOverflow, e as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, at as ScrollToAnchorOptions, as as ScrollPlacement, A as AnchorHighlightAnimation, a2 as HighlightRange, t as Editor, a4 as HighlightResult, a1 as HighlightOptions, aI as TextMatch } from './editor-DaEJd2so.js';
21
- export { aP as CommentMarkerStyle, aQ as DEFAULT_REVIEW_PANE, a0 as HighlightHit, a3 as HighlightRect, a7 as ImageContext, a8 as ImageCropPercent, aR as ImageCropPermille, aS as ResolvedReviewPane, ak as ReviewItemHit, aT as ReviewPaneItemFields, aU as ReviewPaneOpening, R as ReviewPaneOptions, aV as RevisionDisplay, au as SelectedImageState, aK as TrackedChangeFilterMode, aL as TrackedChangePredicate, aW as cropPercentFromCropPermille, aX as cropPercentFromPermille, aY as cropPercentFromSourceCrop, aZ as cropPermilleFromCropPercent, a_ as cropPermilleFromPercent, a$ as resolveReviewPane, b0 as reviewPaneListsItem, b1 as sourceCropFromCropPercent, b2 as validateImageCropPercent } from './editor-DaEJd2so.js';
22
- import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-cEnVrhWg.js';
23
- export { d as disposeLayoutShaping } from './layout-shaping-cEnVrhWg.js';
24
- export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, m as MAX_RESOLVER_FAMILIES, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-CL9BVKZo.js';
25
- import { W as PaginatedSurfaceOptions, X as OpenPaginatedResult, Y as PaginatedSurface, Z as TableCommandPlan, s as DocxEditorInstance } from './chrome-print-BM3Js-6X.js';
26
- export { _ as AnchorFrameOrigin, C as CHROME_GROUPS, a as CHROME_MENUS, $ as CHROME_UNAVAILABLE_KEY, a0 as ChromeControl, a1 as ChromeControlId, a2 as ChromeControlState, b as ChromeExportError, c as ChromeExportFormat, d as ChromeExportHandlers, e as ChromeExportResult, a3 as ChromeExportView, a4 as ChromeGroup, a5 as ChromeGroupId, f as ChromeMenu, g as ChromeMenuEntry, h as ChromeMenuId, i as ChromeMenuItemEntry, j as ChromeMenuSeparatorEntry, k as ChromeMenuSubmenuEntry, l as ChromePrintError, m as ChromePrintErrorCode, n as ChromePrintJob, o as ChromePrintOptions, p as ChromeSlotId, a6 as ContentControlWidgetChromeHandlers, a7 as ContentControlWidgetSession, q as CustomFontsOptions, r as CustomFontsResolver, a8 as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, a9 as DrawingSelectionIntent, aa as EMU_PER_POINT, ab as EditorCommandExecute, ac as EquationActivation, ad as EquationChromeHandlers, ae as EquationOps, af as FinalizedImageOverlayInteraction, F as FontLoadFailure, t as FontLoadFailureReason, u as FontMeasurementState, v as FontUrlSource, H as HistoryGroupBinding, w as HistoryGroupBindingOptions, x as HyperlinkActivation, y as HyperlinkChromeHandlers, ag as HyperlinkOps, ah as IMAGE_OVERLAY_NUDGE_PT, ai as IMAGE_OVERLAY_NUDGE_SHIFT_PT, aj as ImageInteractionSession, ak as ImageOverlayScrollPort, al as ImageResizeHandle, am as ImageResizeResult, an as InvalidTextFormFieldChromeHandlers, ao as InvalidTextFormFieldSession, L as LoadFontsRequest, z as LoadFontsResult, A as LockedControlNavigation, ap as OpeningIndicatorHost, aq as OverlayFrameRect, ar as PaginatedSurfaceState, as as ParagraphPropertyEdit, at as PopupChromeRegistrationOptions, au as RemoteCaretLabelAnchor, av as RemoteCaretLabelHost, aw as ReviewWriteIntent, ax as RunTableChromeCommandResult, ay as SectionAnchor, az as SectionBreakInsertType, aA as SelectedDrawingOverlayTarget, aB as SurfaceEquation, aC as SurfaceFormatting, S as SurfaceHyperlink, aD as SurfaceInsertImageInput, aE as SurfaceNavigation, aF as SurfaceOverlayCoordinates, aG as SurfaceParagraphFormat, aH as TABLE_BORDER_STYLE_OPTIONS, aI as TABLE_BORDER_TARGET_OPTIONS, aJ as TABLE_BORDER_WIDTH_OPTIONS, aK as TABLE_CHROME_SLOT_IDS, aL as TableBorderStyleOption, aM as TableBorderTargetOption, aN as TableBorderTargetValue, aO as TableBorderWidthOption, aP as TableChromeDraft, aQ as TableChromePick, aR as TableChromeSlotId, aS as TableInteractionLabelKey, aT as TextFormFieldChromeHandlers, aU as TextFormFieldDialogSession, T as ToolbarCommandState, aV as ToolbarSlotValue, aW as ToolbarValueMap, aX as ToolbarValueSlot, aY as applyTableChromePick, B as bindHistoryGroup, E as blankDocumentBytes, aZ as canExecuteImageCommand, a_ as captureImageMutationPreconditions, a$ as chromeControlCount, G as chromeMenuSlots, b0 as chromeProbeForSlot, b1 as chromeSlotId, b2 as chromeSlotIsToggle, b3 as commandExecOptions, I as commandForSlot, J as commandForSlotValue, b4 as commandForTableChromeSlotValue, b5 as computeImageResizeResult, b6 as computeMovedImagePosition, b7 as computeResizedImageExtentEmu, K as createDocxEditor, M as createFontSource, b8 as createImageOverlayScrollPort, b9 as cssPixelsToLayoutPoints, N as customFonts, ba as defaultChromeGroups, bb as defaultTableLabel, bc as emuToOverlayPoints, bd as equationAtPosition, be as executeImageCommand, bf as finalizeImageOverlayInteraction, bg as formattingBarChromeGroups, O as isChromePrintShortcut, bh as isStaleImageInteractionCommit, bi as isTableChromeSlot, bj as layoutPointsToCssPixels, P as loadFonts, bk as overlayFrameToSheetCssPixels, bl as overlayHostOrigin, bm as pointsToEmu, bn as probeTableChromeCommand, bo as resizePreservesAspect, Q as runChromeExport, R as runChromePrint, bp as runSave, bq as runTableChromeCommand, br as runTableCommand, U as runToolbarCommand, bs as selectedDrawingOverlayTargetOf, bt as selectedImageStateOf, bu as surfacePaintScale, bv as tableChromeIconPaths, bw as tableChromeLabelKeyForTarget, bx as tableChromeToolbarState, by as tableChromeVisible, bz as tableCommandToolbarState, V as toolbarCommandState, bA as toolbarCommandStates } from './chrome-print-BM3Js-6X.js';
27
- import { a as AutomationCapabilities, b as AutomationHost } from './protocol-CZ1uUlPO.js';
28
- import { E as EditDiagnosticCode } from './diagnostic-hints-2Bke6H_w.js';
29
- import { S as SemanticLayout } from './semantic-records-CjcF26ZL.js';
30
- export { D as DEFAULT_REVISION_MARKUP, w as REVISION_MARKUP_COLORS, q as ResolvedRevisionMarkup, a as ReviewDisplayMode, x as RevisionChangedLinesMark, y as RevisionDeletionMark, z as RevisionMarkupChromeHandlers, E as RevisionMarkupColor, R as RevisionMarkupDialogSession, G as RevisionMarkupMark, J as RevisionMarkupNamedColor, t as RevisionMarkupOptions, K as RevisionMarkupStyle, M as RevisionMarkupTextStyle, O as SectionProperties, T as TextMeasurer, Q as resolveRevisionMarkup } from './semantic-records-CjcF26ZL.js';
31
- export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-Dc3pf3hr.js';
32
- export { F as FieldShadingMode, R as ReviewAuthorInfo, b as RevisionAuthorAssignments, c as RevisionAuthorStyle, d as RevisionStyles } from './semantic-paint-Bz3FBAoH.js';
19
+ import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult, aP as ZoomMode, g as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, av as ScrollToAnchorOptions, au as ScrollPlacement, A as AnchorHighlightAnimation, a4 as HighlightRange, a6 as HighlightResult, a3 as HighlightOptions, aK as TextMatch, f as BookmarkSummary, B as BookmarkPlace } from './editor-DZwOTmlR.js';
20
+ export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent, aQ as ImageCropPermille, am as ReviewItemHit, aw as SelectedImageState, aM as TrackedChangeFilterMode, aN as TrackedChangePredicate, aR as cropPercentFromCropPermille, aS as cropPercentFromPermille, aT as cropPercentFromSourceCrop, aU as cropPermilleFromCropPercent, aV as cropPermilleFromPercent, aW as sourceCropFromCropPercent, aX as validateImageCropPercent } from './editor-DZwOTmlR.js';
21
+ import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-E5J4Z1Gf.js';
22
+ export { d as disposeLayoutShaping } from './layout-shaping-E5J4Z1Gf.js';
23
+ import { F as FontConfiguration } from './editor-fonts-D_-vjuJi.js';
24
+ export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, m as MAX_RESOLVER_FAMILIES, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-BlQNGdvR.js';
25
+ import { ac as PaginatedSurfaceOptions, ad as OpenPaginatedResult, ae as PaginatedSurface, af as TableCommandPlan, y as DocxEditorInstance, ag as SurfaceFormatting } from './chrome-print-CznJ0ucN.js';
26
+ export { ah as AnchorFrameOrigin, A as AttachOptions, B as BookmarkChromeHandlers, a as BookmarkMarkInfo, b as BookmarkMarkOptions, ai as BookmarkMarkOptionsSource, C as CHROME_GROUPS, c as CHROME_MENUS, aj as CHROME_UNAVAILABLE_KEY, ak as ChromeControl, al as ChromeControlId, am as ChromeControlState, d as ChromeExportError, e as ChromeExportFormat, f as ChromeExportHandlers, g as ChromeExportResult, h as ChromeExportView, an as ChromeGroup, ao as ChromeGroupId, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromePrintError, p as ChromePrintErrorCode, q as ChromePrintJob, r as ChromePrintOptions, s as ChromeSlotId, t as CommentDraftChromeHandlers, u as ContentControlWidgetChromeHandlers, v as ContentControlWidgetSession, w as CustomFontsOptions, x as CustomFontsResolver, ap as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, aq as DrawingSelectionIntent, ar as EMU_PER_POINT, as as EditorCommandExecute, E as EquationActivation, z as EquationChromeHandlers, at as EquationOps, au as FinalizedImageOverlayInteraction, F as FontLoadFailure, G as FontLoadFailureReason, H as FontMeasurementState, I as FontUrlSource, J as GoToChromeHandlers, K as HistoryGroupBinding, L as HistoryGroupBindingOptions, M as HyperlinkActivation, N as HyperlinkChromeHandlers, av as HyperlinkOps, aw as IMAGE_OVERLAY_NUDGE_PT, ax as IMAGE_OVERLAY_NUDGE_SHIFT_PT, ay as ImageInteractionSession, az as ImageOverlayScrollPort, aA as ImageResizeHandle, aB as ImageResizeResult, O as InvalidTextFormFieldChromeHandlers, P as InvalidTextFormFieldSession, Q as LoadFontsRequest, R as LoadFontsResult, S as LockedControlNavigation, aC as OpeningIndicatorHost, aD as OverlayFrameRect, aE as PaginatedSurfaceState, aF as ParagraphPropertyEdit, T as PopupChromeRegistrationOptions, aG as RemoteCaretLabelAnchor, aH as RemoteCaretLabelHost, aI as ReviewWriteIntent, aJ as RunTableChromeCommandResult, aK as SectionAnchor, aL as SectionBreakInsertType, aM as SelectedDrawingOverlayTarget, U as SurfaceEquation, V as SurfaceHyperlink, aN as SurfaceInsertImageInput, aO as SurfaceNavigation, aP as SurfaceOverlayCoordinates, aQ as SurfaceParagraphFormat, aR as TABLE_BORDER_STYLE_OPTIONS, aS as TABLE_BORDER_TARGET_OPTIONS, aT as TABLE_BORDER_WIDTH_OPTIONS, aU as TABLE_CHROME_SLOT_IDS, aV as TableBorderStyleOption, aW as TableBorderTargetOption, aX as TableBorderTargetValue, aY as TableBorderWidthOption, aZ as TableChromeDraft, a_ as TableChromePick, W as TableChromeSlotId, a$ as TableInteractionLabelKey, b0 as TextFormFieldChromeHandlers, b1 as TextFormFieldDialogSession, X as ToolbarCommandState, b2 as ToolbarSlotValue, Y as ToolbarValueMap, Z as ToolbarValueSlot, b3 as applyTableChromePick, _ as bindHistoryGroup, $ as blankDocumentBytes, b4 as canExecuteImageCommand, b5 as captureImageMutationPreconditions, b6 as chromeControlCount, a0 as chromeMenuSlots, b7 as chromeProbeForSlot, b8 as chromeSlotId, b9 as chromeSlotIsToggle, ba as commandExecOptions, a1 as commandForSlot, a2 as commandForSlotValue, bb as commandForTableChromeSlotValue, bc as computeImageResizeResult, bd as computeMovedImagePosition, be as computeResizedImageExtentEmu, a3 as createDocxEditor, a4 as createFontSource, bf as createImageOverlayScrollPort, bg as cssPixelsToLayoutPoints, a5 as customFonts, bh as defaultChromeGroups, bi as defaultTableLabel, bj as emuToOverlayPoints, bk as equationAtPosition, bl as executeImageCommand, bm as finalizeImageOverlayInteraction, bn as formattingBarChromeGroups, a6 as isChromePrintShortcut, bo as isStaleImageInteractionCommit, bp as isTableChromeSlot, bq as layoutPointsToCssPixels, a7 as loadFonts, br as overlayFrameToSheetCssPixels, bs as overlayHostOrigin, bt as pointsToEmu, bu as probeTableChromeCommand, bv as resizePreservesAspect, a8 as runChromeExport, a9 as runChromePrint, bw as runSave, bx as runTableChromeCommand, by as runTableCommand, aa as runToolbarCommand, bz as selectedDrawingOverlayTargetOf, bA as selectedImageStateOf, bB as surfacePaintScale, bC as tableChromeIconPaths, bD as tableChromeLabelKeyForTarget, bE as tableChromeToolbarState, bF as tableChromeVisible, bG as tableCommandToolbarState, ab as toolbarCommandState, bH as toolbarCommandStates } from './chrome-print-CznJ0ucN.js';
27
+ import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-DKa4qt7F.js';
28
+ import { c as HistoryGroup } from './editor-scope-B3L-1ALc.js';
29
+ export { d as HistoryGroupOptions } from './editor-scope-B3L-1ALc.js';
30
+ import { E as EditDiagnosticCode } from './diagnostic-hints-DK8-V0fk.js';
31
+ import { S as SemanticLayout, T as TextMeasurer } from './semantic-records-BvN-WWst.js';
32
+ export { t as SectionProperties, U as UnsupportedElement, e as UnsupportedElementLayout, f as UnsupportedElementRule } from './semantic-records-BvN-WWst.js';
33
+ import { ReviewPaneOverflow } from './contracts/types.js';
34
+ export { CommentMarkerStyle, DEFAULT_REVIEW_PANE, ResolvedReviewPane, ReviewPaneItemFields, ReviewPaneOpening, ReviewPaneOptions, RevisionDisplay, resolveReviewPane, reviewPaneListsItem } from './contracts/types.js';
35
+ export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-Cn6rZJ7H.js';
36
+ export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-CJoHLoOl.js';
37
+ export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-BPw_n0li.js';
38
+ export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-CVos5cqe.js';
39
+ import { B as BookmarkNameProblem } from './bookmark-names-DDuAra_V.js';
33
40
  export { CollaborationModuleContribution } from './collaboration.js';
34
- import './editor-scope-7o9xweiJ.js';
35
- import './custom-node-writes-0v0Kgw1T.js';
36
- import './headless-document-view-DZQN8Bnx.js';
41
+ import './custom-node-writes-CLJKGD9t.js';
42
+ import './headless-document-view-Bcz9_Qva.js';
37
43
  import 'prosemirror-model';
38
44
  import './collaboration/replication.js';
39
- import './omml-equation-DP2WpUbK.js';
45
+ import './failure-6KGFrDO9.js';
46
+ import './document-protection-NaniLHWF.js';
40
47
  import './contracts/document.js';
41
48
  import './contracts/interaction.js';
42
- import './document-protection-8eyMWIJ0.js';
43
- import './failure-NS2lsya4.js';
44
- import './note-properties-9FH8zAeG.js';
45
- import './semantic-cell-selection-Dr9yxFZt.js';
46
- import './semantic-record-queries-Bx0pl6kL.js';
49
+ import './note-properties-Ds5R2_3F.js';
50
+ import './semantic-cell-selection-BaUR0iJ4.js';
51
+ import './semantic-record-queries-C0rJ3sB4.js';
47
52
 
48
53
  declare function toEditorFontError(error: unknown): EditorFontError;
49
54
  declare function createLayoutShaping(configuration: FontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<LayoutShapingOptions>;
@@ -89,6 +94,299 @@ declare function clipboardPasteLandsContent(transfer: DataTransfer | null | unde
89
94
  */
90
95
  declare function clipboardDropLandsText(transfer: DataTransfer | null | undefined): boolean;
91
96
 
97
+ /** Options for {@link openEditorWindow}. @public */
98
+ interface OpenEditorWindowOptions {
99
+ /**
100
+ * A same-origin page to open. Defaults to `about:blank`, which needs no file on your server.
101
+ * A served page (an empty HTML file) gives the window a real URL and lets it load its own
102
+ * scripts or fonts first.
103
+ */
104
+ readonly url?: string;
105
+ /**
106
+ * The window name passed to `window.open`. Defaults to `docx-editor`. Windows opened with
107
+ * the same name are one browser window, so give each editor its own name.
108
+ */
109
+ readonly name?: string;
110
+ /** The `window.open` features. Defaults to `popup,width=1000,height=900`. */
111
+ readonly features?: string;
112
+ /** The pop-out's title. */
113
+ readonly title?: string;
114
+ /**
115
+ * Copy the opener's stylesheets, and keep copying the ones it adds later. Defaults to `true`.
116
+ * Pass `false` to style the window yourself, or a function that copies and returns a stop.
117
+ */
118
+ readonly styles?: boolean | ((from: Document, to: Document) => () => void);
119
+ }
120
+ /** A pop-out window opened by {@link openEditorWindow}. @public */
121
+ interface EditorWindow {
122
+ /** The pop-out window. */
123
+ readonly window: Window;
124
+ /** The mount point: attach the editor, or render the editor panel, here. */
125
+ readonly element: HTMLElement;
126
+ /**
127
+ * Run `listener` once when the window goes away: the user closed it, or you called
128
+ * `close()`. It runs while the window's document still exists, so move the editor back
129
+ * from here. Returns a function that removes the listener.
130
+ */
131
+ onClose(listener: () => void): () => void;
132
+ /** Close the window. Runs the `onClose` listeners first. */
133
+ close(): void;
134
+ }
135
+ /**
136
+ * Open a pop-out window ready for the editor: same origin, styled like this page, with an
137
+ * empty mount point that fills it.
138
+ *
139
+ * Resolves to `null` when the browser blocks the window, so call it from a user gesture such
140
+ * as a button click. The React `DocxEditor.Window` and Vue `DocxEditorWindow` components use
141
+ * it; call it directly when you mount the editor without an adapter.
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * const popup = await openEditorWindow({ title: 'Contract' });
146
+ * if (popup) {
147
+ * editor.attach(popup.element);
148
+ * popup.onClose(() => editor.attach(homeElement));
149
+ * }
150
+ * ```
151
+ *
152
+ * @public
153
+ */
154
+ declare function openEditorWindow(options?: OpenEditorWindowOptions): Promise<EditorWindow | null>;
155
+ /**
156
+ * Copy every stylesheet of `from` into `to`, and keep copying the ones `from` adds later.
157
+ *
158
+ * Covers `<link rel="stylesheet">` and `<style>` elements added, changed or removed at any
159
+ * time; rules inserted into a same-origin `<style>` through the CSSOM (CSS-in-JS libraries in
160
+ * production), checked every 250 ms on the pop-out's own clock while it is open; constructed
161
+ * `adoptedStyleSheets`, checked the same way; and the theme attributes on `<html>` such as `class` and `data-theme`. Rules
162
+ * inserted into a `<link>` sheet, or any sheet of another origin, are not copied. Returns a
163
+ * function that stops the mirroring.
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * const stop = copyEditorStyles(document, popup.document);
168
+ * // Later, when the pop-out closes:
169
+ * stop();
170
+ * ```
171
+ *
172
+ * @public
173
+ */
174
+ declare function copyEditorStyles(from: Document, to: Document): () => void;
175
+
176
+ /** The window type of a realm: its own timers, observers and constructors. */
177
+ type HostWindow = Window & typeof globalThis;
178
+ /**
179
+ * The document that owns `node`, or the script's own document when `node` is absent.
180
+ * Without a DOM (server rendering) and without a node, this is `undefined` despite its type:
181
+ * call it from effects and event handlers, not during render.
182
+ *
183
+ * Use it to add document-level listeners (`selectionchange`, `pointerup`, `keydown`) and to
184
+ * read `activeElement` for an editor that may live in another window.
185
+ *
186
+ * @example
187
+ * ```ts
188
+ * const doc = hostDocumentOf(menuElement);
189
+ * doc.addEventListener('pointerdown', onOutsidePress, true);
190
+ * ```
191
+ *
192
+ * @public
193
+ */
194
+ declare function hostDocumentOf(node: Node | null | undefined): Document;
195
+ /**
196
+ * The window that owns `node`: its timers, animation frames, observers and viewport size.
197
+ *
198
+ * Falls back to the script's own window when the node's document has no window (an inert
199
+ * document from `DOMParser`, or a window that closed), and to `globalThis` without a DOM.
200
+ *
201
+ * @example
202
+ * ```ts
203
+ * const win = hostWindowOf(anchorElement);
204
+ * const handle = win.setTimeout(close, 300);
205
+ * const maxX = win.innerWidth - menuWidth;
206
+ * ```
207
+ *
208
+ * @public
209
+ */
210
+ declare function hostWindowOf(node: Node | null | undefined): HostWindow;
211
+ /**
212
+ * The element `editor` is mounted in, or `null` while it is detached or headless.
213
+ *
214
+ * Use it to tell which editor an event belongs to when several share a window.
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * const mine = editorHostElement(editor)?.contains(event.target as Node) ?? false;
219
+ * ```
220
+ *
221
+ * @public
222
+ */
223
+ declare function editorHostElement(editor: Editor): Element | null;
224
+ /**
225
+ * The document `editor` is mounted in: a pop-out window's or an iframe's when it is
226
+ * attached there. While the editor is detached, the script's own document.
227
+ *
228
+ * Use it in custom chrome that is not inside the editor's own DOM, such as a toolbar
229
+ * popover, to add document listeners and to read focus.
230
+ *
231
+ * @example
232
+ * ```ts
233
+ * const doc = editorHostDocument(editor);
234
+ * doc.addEventListener('keydown', onShortcut);
235
+ * ```
236
+ *
237
+ * @public
238
+ */
239
+ declare function editorHostDocument(editor: Editor): Document;
240
+ /**
241
+ * The window `editor` is mounted in: its timers, frames, viewport size and clipboard.
242
+ * While the editor is detached, the script's own window.
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * const win = editorHostWindow(editor);
247
+ * await win.navigator.clipboard.writeText(text);
248
+ * ```
249
+ *
250
+ * @public
251
+ */
252
+ declare function editorHostWindow(editor: Editor): HostWindow;
253
+ /**
254
+ * Whether `value` is a DOM element of any window. Use it instead of `instanceof Element`,
255
+ * which is false for an element of a pop-out window or an iframe.
256
+ *
257
+ * @example
258
+ * ```ts
259
+ * if (isElementNode(event.target)) event.target.closest('[data-docx-hf]');
260
+ * ```
261
+ *
262
+ * @public
263
+ */
264
+ declare function isElementNode(value: unknown): value is Element;
265
+ /**
266
+ * Whether `value` is an HTML (not SVG or MathML) element of any window.
267
+ *
268
+ * @example
269
+ * ```ts
270
+ * if (isHTMLElementNode(event.target)) event.target.focus();
271
+ * ```
272
+ *
273
+ * @public
274
+ */
275
+ declare function isHTMLElementNode(value: unknown): value is HTMLElement;
276
+ /**
277
+ * Whether `value` is a DOM text node of any window.
278
+ *
279
+ * @example
280
+ * ```ts
281
+ * const anchor = selection.anchorNode;
282
+ * const element = isTextNode(anchor) ? anchor.parentElement : anchor;
283
+ * ```
284
+ *
285
+ * @public
286
+ */
287
+ declare function isTextNode(value: unknown): value is Text;
288
+ /**
289
+ * Whether `value` is a DOM node of any window.
290
+ *
291
+ * @example
292
+ * ```ts
293
+ * if (isDomNode(event.target) && panel.contains(event.target)) return;
294
+ * ```
295
+ *
296
+ * @public
297
+ */
298
+ declare function isDomNode(value: unknown): value is Node;
299
+ /**
300
+ * Timers that run on the window `node` belongs to, resolved at each call.
301
+ *
302
+ * A handle is cleared on the window that issued it, so a timer set before the editor moved
303
+ * to another window is still cancelled after the move. Handles are this object's own numbers:
304
+ * two windows count their native handles independently, so a native number alone could name
305
+ * a timer in either one. Clear them with this object, never with the global `clearTimeout`.
306
+ *
307
+ * @public
308
+ */
309
+ interface HostTimers {
310
+ setTimeout(run: () => void, delay?: number): number;
311
+ clearTimeout(handle: number | null | undefined): void;
312
+ requestAnimationFrame(run: (time: number) => void): number;
313
+ cancelAnimationFrame(handle: number | null | undefined): void;
314
+ /**
315
+ * Move pending work to the window the node lives in now. Every other call does this first;
316
+ * call it yourself where you only check whether something is pending. A hidden opener runs
317
+ * no frames and fires no `pagehide`, so work left there would wait until it is shown again.
318
+ */
319
+ migrate(): void;
320
+ }
321
+ /**
322
+ * {@link HostTimers} bound to whatever window `node()` lives in when each call runs.
323
+ *
324
+ * Use it for debounces and frames in chrome that can end up in a pop-out window: the opener's
325
+ * timers are throttled while it is hidden, and a pop-out's never run once it closes.
326
+ *
327
+ * @example
328
+ * ```ts
329
+ * const timers = hostTimers(() => panelElement);
330
+ * let pending: number | null = null;
331
+ * function schedule() {
332
+ * timers.clearTimeout(pending);
333
+ * pending = timers.setTimeout(refresh, 150);
334
+ * }
335
+ * ```
336
+ *
337
+ * @public
338
+ *
339
+ * A window that goes away (a pop-out the user closes) never runs what is pending in it, and a
340
+ * dropped commit, notification or search is worse than a late one. So each window with pending
341
+ * work is watched for `pagehide`, and its pending timers and frames move to the window the node
342
+ * lives in by then, or to the script's own window.
343
+ */
344
+ declare function hostTimers(node: () => Node | null | undefined): HostTimers;
345
+ /**
346
+ * Whether `event` is a keyboard event, from any window.
347
+ *
348
+ * @example
349
+ * ```ts
350
+ * if (isKeyboardEvent(event) && event.key === 'Escape') close();
351
+ * ```
352
+ *
353
+ * @public
354
+ */
355
+ declare function isKeyboardEvent(event: Event): event is KeyboardEvent;
356
+ /**
357
+ * Whether `event` is a pointer event, from any window.
358
+ *
359
+ * @example
360
+ * ```ts
361
+ * if (isPointerEvent(event) && event.button !== 0) return;
362
+ * ```
363
+ *
364
+ * @public
365
+ */
366
+ declare function isPointerEvent(event: Event): event is PointerEvent;
367
+ /**
368
+ * Whether `event` is a mouse (or pointer) event, from any window.
369
+ *
370
+ * @example
371
+ * ```ts
372
+ * const point = isMouseEvent(event) ? { x: event.clientX, y: event.clientY } : null;
373
+ * ```
374
+ *
375
+ * @public
376
+ */
377
+ declare function isMouseEvent(event: Event): event is MouseEvent;
378
+ /**
379
+ * Whether `event` is an `input` or `beforeinput` event, from any window.
380
+ *
381
+ * @example
382
+ * ```ts
383
+ * if (isInputEvent(event) && event.inputType === 'insertText') track(event.data);
384
+ * ```
385
+ *
386
+ * @public
387
+ */
388
+ declare function isInputEvent(event: Event): event is InputEvent;
389
+
92
390
  /**
93
391
  * Mount a paginated surface over DOCX bytes.
94
392
  *
@@ -512,6 +810,13 @@ declare function readAvailableWidth(bar: HTMLElement, style: CSSStyleDeclaration
512
810
  * @internal
513
811
  */
514
812
  declare function chordLetter(event: KeyboardEvent): string;
813
+ /**
814
+ * The Go To chord: Ctrl+G, or Cmd+Option+G on Apple platforms. F5 is not used: browsers
815
+ * reload on it. Cmd+G alone is left to the browser's find-next on macOS.
816
+ *
817
+ * @public
818
+ */
819
+ declare function isGoToChord(event: KeyboardEvent, apple?: boolean): boolean;
515
820
 
516
821
  /** Planner-backed can/plan pair — production gate for table commands. Task 9 maps chrome slots. */
517
822
  declare function tableCommandState(command: EditorCommand, surface: PaginatedSurface): {
@@ -519,6 +824,32 @@ declare function tableCommandState(command: EditorCommand, surface: PaginatedSur
519
824
  readonly plan: TableCommandPlan;
520
825
  };
521
826
 
827
+ /**
828
+ * One automation run inside a history group: every batch it executes is a frame of the
829
+ * group, and the run settles once into one outcome on the handle.
830
+ *
831
+ * @internal
832
+ */
833
+ interface HistoryGroupRun {
834
+ /** Execute one batch; `null`, executing nothing, once the group is no longer open. */
835
+ execute(request: AutomationBatchRequest): AutomationBatchResponse | null;
836
+ /** Settle the run's outcome on the handle. Safe to call more than once. */
837
+ finish(): void;
838
+ }
839
+ /**
840
+ * An automation host over a live editor.
841
+ *
842
+ * @public
843
+ */
844
+ interface BrowserAutomationHost extends AutomationHost {
845
+ /**
846
+ * Begin one run inside `group`, or `null` when `group` is not an open handle from this
847
+ * editor. Used by the browser runtime's `run({ historyToken }, callback)`.
848
+ *
849
+ * @internal
850
+ */
851
+ beginHistoryGroupRun(group: HistoryGroup): HistoryGroupRun | null;
852
+ }
522
853
  /**
523
854
  * What a browser host can do.
524
855
  *
@@ -538,7 +869,63 @@ declare const BROWSER_AUTOMATION_CAPABILITIES: AutomationCapabilities;
538
869
  * return `transaction-refused`. For autosaving from change callbacks, use the asynchronous
539
870
  * `editor.save()`, which waits for the active edit to finish.
540
871
  */
541
- declare function createBrowserAutomationHost(editor: DocxEditorInstance): AutomationHost;
872
+ declare function createBrowserAutomationHost(editor: DocxEditorInstance): BrowserAutomationHost;
873
+
874
+ /**
875
+ * Why a preview could not begin.
876
+ *
877
+ * - `no-document`: the editor is detached, still opening, or holds no document.
878
+ * - `viewing`: the editor is open for viewing, so a commit could never write.
879
+ * - `blocked`: an external refresh is replacing the document.
880
+ * - `composing`: an input method composition is in progress in the editor.
881
+ * - `preview-active`: another preview is already open on this editor.
882
+ *
883
+ * @internal
884
+ */
885
+ type EditorPreviewRefusal = 'no-document' | 'viewing' | 'blocked' | 'composing' | 'preview-active';
886
+ /**
887
+ * One open preview over a live editor.
888
+ *
889
+ * @internal
890
+ */
891
+ interface EditorPreviewFork {
892
+ /** Defer host event listeners until a synchronous commit finishes. */
893
+ deferEvents<T>(run: () => T): T;
894
+ /** An automation host over the fork. Its writes never reach the live editor. */
895
+ readonly host: AutomationHost;
896
+ /**
897
+ * Paint the fork over the live pages and refuse live writes from now on. False when it
898
+ * cannot mount; nothing changes then.
899
+ */
900
+ show(): boolean;
901
+ /** Whether the fork is painted now. */
902
+ readonly shown: boolean;
903
+ /** Bring the first body paragraph the fork changed into view. False when there is none. */
904
+ reveal(): boolean;
905
+ /** Whether the preview has ended. Final. */
906
+ readonly ended: boolean;
907
+ /** Restore the live pages and lift the write guard. Idempotent. */
908
+ end(): void;
909
+ /** Told once when the preview ends, by `end()` or because the editor remounted. */
910
+ onEnd(listener: () => void): () => void;
911
+ }
912
+ /** Whether a preview is painted over `editor`, so its writes are refused. @internal */
913
+ declare function editorPreviewActive(editor: object): boolean;
914
+ /**
915
+ * Open a preview over `editor`'s current document.
916
+ *
917
+ * Flushes buffered typing first, so the fork starts from the revision the caller compares
918
+ * against at commit. Writes nothing and refuses nothing on the live editor until `show()`.
919
+ *
920
+ * @internal
921
+ */
922
+ declare function beginEditorPreview(editor: DocxEditorInstance): {
923
+ readonly ok: true;
924
+ readonly fork: EditorPreviewFork;
925
+ } | {
926
+ readonly ok: false;
927
+ readonly reason: EditorPreviewRefusal;
928
+ };
542
929
 
543
930
  /**
544
931
  * The facade's anonymous diagnostics: builds each {@link EditorDiagnostic} from codes and
@@ -608,6 +995,23 @@ declare function lowerColorValueForFill(color: ColorValue, themeColors: readonly
608
995
  /** Resolve any public colour to a CSS `#RRGGBB` string for chrome display. */
609
996
  declare function resolveColorValueToCss(color: ColorValue | undefined | null, themeColors: readonly DocumentThemeColorEntry[], defaultHex?: string): string;
610
997
 
998
+ /** The keys that undo and redo, shared by the text surface and every overlay that takes focus. */
999
+ /** Modifier and key state of one keydown, as both DOM and framework key events carry it. */
1000
+ interface HistoryShortcutKeys {
1001
+ readonly key: string;
1002
+ readonly metaKey: boolean;
1003
+ readonly ctrlKey: boolean;
1004
+ readonly shiftKey: boolean;
1005
+ }
1006
+ /**
1007
+ * Which history step a keydown asks for, or `null` for any other key.
1008
+ *
1009
+ * Ctrl+Y is the Windows redo; Ctrl/Cmd+Shift+Z is the macOS one. Both are accepted on every
1010
+ * platform. Focused chrome, such as the picture selection overlay, calls this so history keys
1011
+ * reach the editor instead of stopping at the control that holds focus.
1012
+ */
1013
+ declare function historyShortcutOf(event: HistoryShortcutKeys): 'undo' | 'redo' | null;
1014
+
611
1015
  interface SurfaceExtent {
612
1016
  readonly width: number;
613
1017
  readonly height: number;
@@ -1036,6 +1440,46 @@ declare function withTabStop(stops: readonly ParagraphTabStop[], stop: Paragraph
1036
1440
  */
1037
1441
  declare function trapTabWithin(panel: HTMLElement, event: KeyboardEvent): boolean;
1038
1442
 
1443
+ /** Shared count reading and defaults for Split cells dialogs. */
1444
+
1445
+ /** The most rows and columns a cell splits into, as `splitCellConfig` answers. @public */
1446
+ interface SplitCellLimits {
1447
+ readonly maxRows: number;
1448
+ readonly maxCols: number;
1449
+ }
1450
+ /** The highest count a dialog offers when the editor gives no limit. @public */
1451
+ declare const SPLIT_CELL_FALLBACK_MAX = 63;
1452
+ /** Why typed counts cannot split, before the engine is asked. @public */
1453
+ type SplitCellCountProblem = {
1454
+ readonly kind: 'range';
1455
+ readonly field: 'columns' | 'rows';
1456
+ readonly max: number;
1457
+ } | {
1458
+ readonly kind: 'oneCell';
1459
+ };
1460
+ /** Typed split counts read against the cell's limits. @public */
1461
+ interface SplitCellCounts {
1462
+ /** The counts to ask the engine about, or null while a problem stands. */
1463
+ readonly counts: {
1464
+ readonly rows: number;
1465
+ readonly cols: number;
1466
+ } | null;
1467
+ readonly problem: SplitCellCountProblem | null;
1468
+ }
1469
+ /** Read the typed column and row counts of a Split cells dialog. @public */
1470
+ declare function readSplitCellCounts(columns: string, rows: string, limits: SplitCellLimits | null): SplitCellCounts;
1471
+ /**
1472
+ * The counts a Split cells dialog opens with: two columns, else two rows, else as many rows as
1473
+ * a merged cell spans, whichever the engine honours first.
1474
+ * @public
1475
+ */
1476
+ declare function initialSplitCellCounts(limits: SplitCellLimits | null, can: (command: Extract<EditorCommand, {
1477
+ type: 'splitCell';
1478
+ }>) => CanResult): {
1479
+ readonly columns: string;
1480
+ readonly rows: string;
1481
+ };
1482
+
1039
1483
  /** One cell of a month grid. @public */
1040
1484
  interface CalendarDay {
1041
1485
  /** Local calendar date as `YYYY-MM-DD`. */
@@ -1139,6 +1583,56 @@ declare function createContentControlListNavigation(locale?: string): ContentCon
1139
1583
  /** The `accept` list of the engine's picker: what `replaceImage` takes. */
1140
1584
  declare const CONTENT_CONTROL_PICTURE_ACCEPT = "image/png,image/jpeg,image/gif,image/bmp,image/webp";
1141
1585
 
1586
+ /** The multiples the line-spacing menu offers, in lines. @public */
1587
+ declare const LINE_SPACING_PRESETS: readonly number[];
1588
+ /** The line spacing a menu row stands for: lines for `multiple`, points otherwise. @public */
1589
+ type LineSpacingMenuValue = NonNullable<SurfaceFormatting['lineSpacing']>;
1590
+ /** One row of the line-spacing menu. @public */
1591
+ interface LineSpacingMenuRow {
1592
+ /** The spacing the row stands for. */
1593
+ readonly spacing: LineSpacingMenuValue;
1594
+ /**
1595
+ * What picking the row executes, or null for the selected row: it already holds, and
1596
+ * its value is the read rounded to two decimals, so writing it back would quietly move
1597
+ * an authored `w:line="253"` to 252. Picking a null row only closes the menu.
1598
+ */
1599
+ readonly command: Extract<EditorCommand, {
1600
+ type: 'setLineSpacing';
1601
+ }> | null;
1602
+ /**
1603
+ * The number as the row shows it: one decimal for a multiple unless it needs two (`1.0`,
1604
+ * `1.15`), and the point value for `exact` and `atLeast`.
1605
+ */
1606
+ readonly text: string;
1607
+ /**
1608
+ * The i18n key whose `{value}` placeholder takes `text`, or null when `text` is the
1609
+ * whole label (a multiple).
1610
+ */
1611
+ readonly labelKey: 'lineSpacing.exactlyPoints' | 'lineSpacing.atLeastPoints' | null;
1612
+ /** Whether this is the spacing in force across the whole selection. */
1613
+ readonly selected: boolean;
1614
+ /** False for the extra row that shows a current spacing no preset matches. */
1615
+ readonly preset: boolean;
1616
+ }
1617
+ /**
1618
+ * The line-spacing menu rows for the spacing in force.
1619
+ *
1620
+ * A current multiple that is not a preset joins the list in order, ticked; a current
1621
+ * `exact` or `atLeast` leads the list as its own ticked row. A selection whose paragraphs
1622
+ * disagree (`current` null) ticks nothing, because no one row is true of all of it.
1623
+ * @public
1624
+ */
1625
+ declare function lineSpacingMenuRows(current: SurfaceFormatting['lineSpacing']): readonly LineSpacingMenuRow[];
1626
+ /**
1627
+ * A row's visible label, with its number in `locale`'s format (`1,5` in German).
1628
+ *
1629
+ * `label` resolves an i18n key without interpolation, as a toolbar's host translation
1630
+ * does, so the `{value}` placeholder is filled here. Without a `locale` the number reads
1631
+ * as `text` does.
1632
+ * @public
1633
+ */
1634
+ declare function lineSpacingMenuRowLabel(row: LineSpacingMenuRow, label: (key: string) => string, locale?: string): string;
1635
+
1142
1636
  /** A processor location in the returned document's body, including table paragraphs. @public */
1143
1637
  interface RefreshLocation {
1144
1638
  /** OOXML w14:paraId: eight hexadecimal digits, 00000001 through 7FFFFFFF. Case-insensitive. Use this or paragraphIndex, not both. */
@@ -1412,5 +1906,126 @@ interface DocumentSearch {
1412
1906
  */
1413
1907
  declare function createDocumentSearch(editor: Editor): DocumentSearch;
1414
1908
 
1415
- export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, ScrollPlacement, ScrollToAnchorOptions, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, collapsibleGroupCost, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, editorCommandKey, editorInstanceScope, firstDayOfWeek, formatInches, generateRulerTicks, handlePosition, hasOpenNestedPopup, inchesToTwips, isoDateOf, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, parseIsoDate, partOfNodeId, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, reportAutomationException, reportAutomationRefusal, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerPageBox, sameOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, surfaceExtent, tableCommandState, toEditorFontError, toolbarGroupPriority, toolbarOverflowGroups, toolbarPanelPlacement, toolbarPopupLeft, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, withTabStop };
1416
- export type { BarRoomInput, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, HighlightSource, HighlightWatch, NavigateToChangeOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SurfaceExtent, TabAlignment, TabLeaderName, ToolbarFitInput, ToolbarHostGroupPlacement, ToolbarPanelPlacement, WatchHighlightsOptions };
1909
+ /** The font a text watermark uses when its options name none. @public */
1910
+ declare const DEFAULT_WATERMARK_FONT = "Calibri";
1911
+ /** A width and a height in points. @public */
1912
+ interface WatermarkSize {
1913
+ readonly width: number;
1914
+ readonly height: number;
1915
+ }
1916
+ /**
1917
+ * The shape box, in points, that `setWatermark` writes for `watermark` on a page whose text
1918
+ * area (page size less margins) is `area`. The box is centered on the text area, and a
1919
+ * diagonal text box turns 45 degrees counterclockwise about its center. Null when the
1920
+ * options name no text and no readable picture. Pass a measurer for the exact text
1921
+ * advance; without one the advance is an estimate.
1922
+ *
1923
+ * @example
1924
+ * ```ts
1925
+ * const box = watermarkShapeBox({ text: 'DRAFT' }, { width: 468, height: 648 });
1926
+ * ```
1927
+ * @public
1928
+ */
1929
+ declare function watermarkShapeBox(watermark: Watermark, area: WatermarkSize, measurer?: TextMeasurer): WatermarkSize | null;
1930
+
1931
+ /**
1932
+ * How the Bookmark dialog orders its list: by name, or by where each bookmark is.
1933
+ *
1934
+ * @public
1935
+ */
1936
+ type BookmarkSortOrder = 'name' | 'location';
1937
+ /**
1938
+ * The bookmarks the dialog lists. Hidden bookmarks show only when asked for. Names sort
1939
+ * without case and with numbers in order, and location sorts by document order.
1940
+ *
1941
+ * @public
1942
+ */
1943
+ declare function bookmarkDialogRows(bookmarks: readonly BookmarkSummary[], options: {
1944
+ readonly sortBy: BookmarkSortOrder;
1945
+ readonly showHidden: boolean;
1946
+ }): readonly BookmarkSummary[];
1947
+ /**
1948
+ * The bookmarks a Go To name box offers for what was typed: those whose name contains it,
1949
+ * compared without case, in the dialog's order. Names that start with it come first. An empty
1950
+ * query offers every row. Sorted by location, the rows are in the order
1951
+ * {@link goToBookmarkGroups} shows them: by place first, so moving through the list follows
1952
+ * the screen.
1953
+ *
1954
+ * @public
1955
+ */
1956
+ declare function goToBookmarkRows(bookmarks: readonly BookmarkSummary[], options: {
1957
+ readonly query: string;
1958
+ readonly sortBy: BookmarkSortOrder;
1959
+ readonly showHidden: boolean;
1960
+ }): readonly BookmarkSummary[];
1961
+ /**
1962
+ * The bookmark a Go To name box means: the one whose name equals what was typed, compared
1963
+ * without case, hidden or not; else the first row offered. Null when there is none.
1964
+ *
1965
+ * @public
1966
+ */
1967
+ declare function goToBookmarkTarget(bookmarks: readonly BookmarkSummary[], query: string, offered: readonly BookmarkSummary[]): BookmarkSummary | null;
1968
+ /**
1969
+ * Where the typed text sits in a bookmark name, compared without case, for showing the match.
1970
+ * Null when the text is empty or the name does not contain it.
1971
+ *
1972
+ * @public
1973
+ */
1974
+ declare function goToBookmarkMatch(name: string, query: string): {
1975
+ readonly start: number;
1976
+ readonly end: number;
1977
+ } | null;
1978
+ /**
1979
+ * One section of a Go To list sorted by location: the rows of one place, each with its index
1980
+ * in the full list.
1981
+ *
1982
+ * @public
1983
+ */
1984
+ interface GoToBookmarkGroup {
1985
+ /** The place every row of the section is in. */
1986
+ readonly place: BookmarkPlace;
1987
+ /** The section's rows, each with its index in the full list (the one the highlight uses). */
1988
+ readonly rows: readonly {
1989
+ readonly row: BookmarkSummary;
1990
+ readonly index: number;
1991
+ }[];
1992
+ }
1993
+ /**
1994
+ * The rows of a Go To list grouped by place: the main text, then headers, footers, footnotes
1995
+ * and endnotes. Places with no row are left out. Rows keep their order within a place.
1996
+ *
1997
+ * @public
1998
+ */
1999
+ declare function goToBookmarkGroups(rows: readonly BookmarkSummary[]): readonly GoToBookmarkGroup[];
2000
+ /**
2001
+ * The name the dialog starts with: the visible bookmark the selection is in, or an empty name.
2002
+ *
2003
+ * @public
2004
+ */
2005
+ declare function bookmarkDialogInitialName(bookmarks: readonly BookmarkSummary[]): string;
2006
+ /**
2007
+ * What the typed name allows in the Bookmark dialog.
2008
+ *
2009
+ * @public
2010
+ */
2011
+ interface BookmarkDialogNameState {
2012
+ /** Why Add cannot use the name, or null when it can. Hidden names cannot be added. */
2013
+ readonly problem: BookmarkNameProblem | null;
2014
+ /** The bookmark the name already belongs to, compared without case, or null. */
2015
+ readonly existing: BookmarkSummary | null;
2016
+ /** Add bookmarks the selection under the name; an existing bookmark moves. */
2017
+ readonly canAdd: boolean;
2018
+ /** Delete and Go To act on an existing bookmark. */
2019
+ readonly canDelete: boolean;
2020
+ readonly canGoTo: boolean;
2021
+ }
2022
+ /**
2023
+ * Evaluate the name typed in the Bookmark dialog against the document's bookmarks.
2024
+ * `writable` is whether the document accepts edits; Go To works either way.
2025
+ *
2026
+ * @public
2027
+ */
2028
+ declare function bookmarkDialogNameState(bookmarks: readonly BookmarkSummary[], name: string, writable: boolean): BookmarkDialogNameState;
2029
+
2030
+ export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, collapsibleGroupCost, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, copyEditorStyles, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, editorCommandKey, editorHostDocument, editorHostElement, editorHostWindow, editorInstanceScope, editorPreviewActive, firstDayOfWeek, formatInches, generateRulerTicks, goToBookmarkGroups, goToBookmarkMatch, goToBookmarkRows, goToBookmarkTarget, handlePosition, hasOpenNestedPopup, historyShortcutOf, hostDocumentOf, hostTimers, hostWindowOf, inchesToTwips, initialSplitCellCounts, isDomNode, isElementNode, isGoToChord, isHTMLElementNode, isInputEvent, isKeyboardEvent, isMouseEvent, isPointerEvent, isTextNode, isoDateOf, lineSpacingMenuRowLabel, lineSpacingMenuRows, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, openEditorWindow, parseIsoDate, partOfNodeId, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, readSplitCellCounts, reportAutomationException, reportAutomationRefusal, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerPageBox, sameOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, surfaceExtent, tableCommandState, toEditorFontError, toolbarGroupPriority, toolbarOverflowGroups, toolbarPanelPlacement, toolbarPopupLeft, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, watermarkShapeBox, withTabStop };
2031
+ export type { BarRoomInput, BookmarkDialogNameState, BookmarkSortOrder, BrowserAutomationHost, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, EditorPreviewFork, EditorPreviewRefusal, EditorWindow, GoToBookmarkGroup, HighlightSource, HighlightWatch, HistoryGroupRun, HistoryShortcutKeys, HostTimers, HostWindow, LineSpacingMenuRow, LineSpacingMenuValue, NavigateToChangeOptions, OpenEditorWindowOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SplitCellCountProblem, SplitCellCounts, SplitCellLimits, SurfaceExtent, TabAlignment, TabLeaderName, ToolbarFitInput, ToolbarHostGroupPlacement, ToolbarPanelPlacement, WatchHighlightsOptions, WatermarkSize };