@docx-editor.dev/react 2.30.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/index.d.ts CHANGED
@@ -9,11 +9,11 @@
9
9
  * @public
10
10
  */
11
11
  import * as react from 'react';
12
- import react__default, { ReactNode, CSSProperties, ReactElement, ComponentType, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
13
- import { RevisionMarkupDialogSession, ResolvedRevisionMarkup, RevisionMarkupOptions, ChromeExportFormat, InvalidTextFormFieldSession, ContentControlWidgetSession, CalendarMonth, ContentControlListNavigation, CalendarDay, TextFormFieldDialogSession, RevisionAuthorStyle, ParagraphDialogFields, ParagraphDialogMixed, ChromeMenuId, ChromeSlotId, ChromeMenuEntry, DocxEditorInstance, FontConfigurationFragment, FontResolver, FontShapingOptions, EditorModule, ReviewDisplayMode, FieldResultsMode, ContentLockPolicy, LockedControlNavigation, ImageDecodePort, ChromeGroupId, SupportedImageMime, TableChromeSlotId, ChromeExportHandlers, DocumentSearchHighlight, DocumentSearchFindOptions, SurfaceHyperlink, FontOrigin, MarkedFontResolver, ReviewAuthorInfo, EditorCommandExecute, ToolbarValueMap, HighlightSource, ParagraphFormatRead, ParagraphFormatUpdate, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent, HistoryGroupBindingOptions } from '@docx-editor.dev/core/editor';
12
+ import react__default, { ReactNode, CSSProperties, ReactElement, ComponentType, ButtonHTMLAttributes, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
13
+ import { RevisionMarkupDialogSession, ResolvedRevisionMarkup, RevisionMarkupOptions, ChromeExportFormat, InvalidTextFormFieldSession, ContentControlWidgetSession, CalendarMonth, ContentControlListNavigation, CalendarDay, TextFormFieldDialogSession, RevisionAuthorStyle, ParagraphDialogFields, ParagraphDialogMixed, BookmarkSortOrder, ChromeMenuId, ChromeSlotId, ChromeMenuEntry, DocxEditorInstance, FontConfigurationFragment, FontResolver, FontShapingOptions, EditorModule, ReviewDisplayMode, FieldResultsMode, ContentLockPolicy, LockedControlNavigation, ImageDecodePort, ChromeGroupId, SupportedImageMime, TableChromeSlotId, ChromeExportHandlers, DocumentSearchHighlight, DocumentSearchFindOptions, SurfaceHyperlink, FontOrigin, MarkedFontResolver, ReviewAuthorInfo, EditorCommandExecute, ToolbarValueMap, HighlightSource, ParagraphFormatRead, ParagraphFormatUpdate, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent, HistoryGroupBindingOptions } from '@docx-editor.dev/core/editor';
14
14
  export { CHROME_GROUPS, CHROME_MENUS, ChromeExportFormat, ChromeExportHandlers, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, ClearRefreshHighlightsOptions, DEFAULT_FONT, DocumentRefresh, DocumentRefreshError, DocumentRefreshState, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontOrigin, FontResolutionRequest, FontResolver, FontResolverMark, FontUrlSource, HIGHLIGHT_REFRESH_MS, HighlightSource, ImageWrapTarget, LOADING_SNAPSHOT, LoadFontsRequest, LoadFontsResult, MAX_RESOLVER_FAMILIES, MarkedFontResolver, NavigateToChangeOptions, PX_PER_CM, PX_PER_INCH, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, ParagraphTabStop, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, ResolvedRevisionMarkup, ReviewAuthorInfo, ReviewDisplayMode, RevisionAuthorAssignments, RevisionAuthorStyle, RevisionChangedLinesMark, RevisionDeletionMark, RevisionMarkupChromeHandlers, RevisionMarkupColor, RevisionMarkupDialogSession, RevisionMarkupMark, RevisionMarkupNamedColor, RevisionMarkupOptions, RevisionStyles, RulerTick, RulerUnit, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, composeFontOrigins, createDocumentRefresh, createFontSource, defineFontResolver, generateRulerTicks, isFontResolver, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
15
- import { Editor, ViewScope, EditorCommand, DocumentSource, FontConfiguration, ZoomMode, DocumentChange, EditorFontError, TextMatch, DocumentHandle, EditorExecOptions, ExecResult, EditorScope, EditorSnapshot, EditorEvents, HighlightOptions, HighlightResult, HighlightRange, HighlightHit, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
16
- export { AnchorHighlightAnimation, AnchorHighlightOptions, ClearAnchorHighlightOptions, Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, HighlightHit, HighlightOptions, HighlightRange, HighlightRect, HighlightResult, PageSetup, ScrollToAnchorOptions, TextMatch } from '@docx-editor.dev/core/contracts/editor';
15
+ import { Editor, ViewScope, EditorCommand, WatermarkState, BookmarkSummary, DocumentSource, FontConfiguration, ZoomMode, DocumentChange, EditorFontError, TextMatch, ExecResult, DocumentOpenFailure, DocumentHandle, EditorExecOptions, EditorScope, EditorSnapshot, Watermark, EditorEvents, HighlightOptions, HighlightResult, HighlightRange, HighlightHit, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
16
+ export { AnchorHighlightAnimation, AnchorHighlightOptions, ClearAnchorHighlightOptions, DocumentOpenFailure, DocumentOpenFailureReason, Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, HighlightHit, HighlightOptions, HighlightRange, HighlightRect, HighlightResult, PageSetup, ScrollToAnchorOptions, TextMatch, Watermark, WatermarkState } from '@docx-editor.dev/core/contracts/editor';
17
17
  import { TFunction, Translations, LocaleStrings } from '@docx-editor.dev/i18n';
18
18
  export { TranslationKey } from '@docx-editor.dev/i18n';
19
19
  import { ContentControlType, ContentControlSummary } from '@docx-editor.dev/core';
@@ -547,8 +547,9 @@ interface DocxEditorContentProps {
547
547
  }
548
548
  /**
549
549
  * The element the engine paints pages into. Must render inside a
550
- * `DocxEditor.Viewport`; the facade attaches here and detaches on unmount (stashing
551
- * the live document bytes, so remounting elsewhere restores the content).
550
+ * `DocxEditor.Viewport`; the facade attaches here and detaches on unmount. Detaching parks
551
+ * the editor, so mounting the content elsewhere, even in another window, moves it with its
552
+ * undo history, selection and reading position.
552
553
  *
553
554
  * Its centring margin lives in the STYLESHEET, not in an inline style here, and behind
554
555
  * `:where()` so it carries no specificity: a host that places the page itself — inside its
@@ -560,6 +561,58 @@ interface DocxEditorContentProps {
560
561
  */
561
562
  declare function DocxEditorContent({ className }: DocxEditorContentProps): react.JSX.Element;
562
563
 
564
+ /** Props for `DocxEditor.Window`. @public */
565
+ interface DocxEditorWindowProps {
566
+ /** Render `children` in a pop-out window. While `false`, they render in place. */
567
+ open: boolean;
568
+ /** A same-origin page to open. Defaults to `about:blank`. */
569
+ url?: string;
570
+ /**
571
+ * The window name. Defaults to `docx-editor`. Two `DocxEditor.Window` components with the
572
+ * same name share one browser window, so give each editor its own name.
573
+ */
574
+ name?: string;
575
+ /** The `window.open` features. Defaults to `popup,width=1000,height=900`. */
576
+ features?: string;
577
+ /** The pop-out's title. */
578
+ title?: string;
579
+ /** Copy this page's stylesheets into the window, and keep copying new ones. Default `true`. */
580
+ styles?: boolean | ((from: Document, to: Document) => () => void);
581
+ /**
582
+ * The pop-out went away: the user closed it, or the browser blocked it. Set `open` to
583
+ * `false` here. The panel is already back in place when this runs.
584
+ */
585
+ onClose?: () => void;
586
+ /** The editor panel: toolbar, viewport and content, or any part of them. */
587
+ children?: DocxEditorChildren;
588
+ }
589
+ /**
590
+ * Render the editor panel in its own browser window while `open` is `true`.
591
+ *
592
+ * Place it inside `DocxEditor.Root` around the parts to pop out. The Root stays in this
593
+ * window, so the editor moves into the pop-out and back with its undo history, selection and
594
+ * collaboration session. The window gets this page's stylesheets, and closing it brings the
595
+ * panel back and calls `onClose`.
596
+ *
597
+ * @example
598
+ * ```tsx
599
+ * const [popped, setPopped] = useState(false);
600
+ *
601
+ * <DocxEditor.Root document={bytes}>
602
+ * <button onClick={() => setPopped(!popped)}>Pop out</button>
603
+ * <DocxEditor.Window open={popped} onClose={() => setPopped(false)}>
604
+ * <DocxEditor.Toolbar />
605
+ * <DocxEditor.Viewport>
606
+ * <DocxEditor.Content />
607
+ * </DocxEditor.Viewport>
608
+ * </DocxEditor.Window>
609
+ * </DocxEditor.Root>
610
+ * ```
611
+ *
612
+ * @public
613
+ */
614
+ declare function DocxEditorWindow({ open, onClose, children, url, name, features, title, styles, }: DocxEditorWindowProps): react.JSX.Element;
615
+
563
616
  /** Props for `DocxEditor.Loading`. @public */
564
617
  interface DocxEditorLoadingProps {
565
618
  /**
@@ -730,6 +783,24 @@ interface DocxEditorAuthorStyleProps extends RevisionAuthorStyle {
730
783
  */
731
784
  declare function DocxEditorAuthorStyle(props: DocxEditorAuthorStyleProps): null;
732
785
 
786
+ /**
787
+ * Why a picture could not be inserted. Replace it through `popups.imageInsertError`, or pass
788
+ * `false` there to show nothing.
789
+ * @public
790
+ */
791
+ interface DocxEditorImageInsertErrorDialogProps {
792
+ /** The translated reason the picture was refused. */
793
+ message: string;
794
+ /** Close the dialog. */
795
+ onClose(): void;
796
+ className?: string;
797
+ style?: CSSProperties;
798
+ /** Replaces the packaged header, message and button. */
799
+ children?: DocxEditorChildren;
800
+ }
801
+ /** The packaged picture refusal: an editor dialog, never a page-blocking browser alert. @public */
802
+ declare function DocxEditorImageInsertErrorDialog({ message, onClose, className, style, children, }: DocxEditorImageInsertErrorDialogProps): react.JSX.Element;
803
+
733
804
  /** A render callback for an automatic popup. `false` disables automatic rendering. @public */
734
805
  type DocxEditorPopup<Props extends object> = false | ((props: Props) => DocxEditorChildren | null);
735
806
  /**
@@ -767,7 +838,15 @@ interface PageSetupDialogFields {
767
838
  /** Page Setup draft and actions. @public */
768
839
  interface UsePageSetupDialogReturn extends UseDialogReturn<PageSetupDialogFields> {
769
840
  }
770
- /** Read the enclosing Page Setup dialog draft. @public */
841
+ /**
842
+ * Read the enclosing Page Setup dialog draft.
843
+ *
844
+ * Call it in a child of the dialog. It does not open the dialog. To open the dialog from your
845
+ * own toolbar, keep its `open` state and render `DocxEditor.PageSetupDialog` with `open` and
846
+ * `onClose`. Take the button's enabled state from `usePageSetup().isEnabled`.
847
+ *
848
+ * @public
849
+ */
771
850
  declare function usePageSetupDialog(): UsePageSetupDialogReturn;
772
851
  /** Page Setup with replaceable controls and layout. @public */
773
852
  declare const DocxEditorPageSetupDialog: typeof PageSetupDialogRoot & {
@@ -815,7 +894,15 @@ declare function ParagraphDialogRoot({ open, onClose, className, style, children
815
894
  interface UseParagraphDialogReturn extends UseDialogReturn<ParagraphDialogFields> {
816
895
  readonly mixed: ParagraphDialogMixed;
817
896
  }
818
- /** Read the enclosing Paragraph Options draft. @public */
897
+ /**
898
+ * Read the enclosing Paragraph Options draft.
899
+ *
900
+ * Call it in a child of the dialog. It does not open the dialog. To open the dialog from your
901
+ * own toolbar, keep its `open` state and render `DocxEditor.ParagraphDialog` with `open` and
902
+ * `onClose`. Take the button's enabled state from `useParagraphFormat().isEnabled`.
903
+ *
904
+ * @public
905
+ */
819
906
  declare function useParagraphDialog(): UseParagraphDialogReturn;
820
907
  /** Paragraph Options with replaceable controls and layout. @public */
821
908
  declare const DocxEditorParagraphDialog: typeof ParagraphDialogRoot & {
@@ -845,6 +932,159 @@ declare const DocxEditorParagraphDialog: typeof ParagraphDialogRoot & {
845
932
  }) => react.ReactNode;
846
933
  };
847
934
 
935
+ /** How a text watermark crosses the page. @public */
936
+ type WatermarkDialogLayout = NonNullable<WatermarkState['layout']>;
937
+ /** Which watermark the dialog writes. @public */
938
+ type WatermarkDialogKind = 'none' | 'picture' | 'text';
939
+ /** The Watermark dialog draft. Transparency is 0 to 1, color is `RRGGBB`. @public */
940
+ interface WatermarkDialogFields {
941
+ kind: WatermarkDialogKind;
942
+ /** The picture bytes, or null when no picture is chosen. */
943
+ imageData: Uint8Array | null;
944
+ /** The chosen file name. Null for no picture or for the document's current picture. */
945
+ imageName: string | null;
946
+ /** A factor of the picture's natural size. Null is Auto. */
947
+ scale: number | null;
948
+ washout: boolean;
949
+ text: string;
950
+ fontFamily: string;
951
+ /** Points. Null is Auto. */
952
+ fontSizePt: number | null;
953
+ bold: boolean;
954
+ italic: boolean;
955
+ transparency: number;
956
+ color: string;
957
+ layout: WatermarkDialogLayout;
958
+ }
959
+ /** The text choices the dialog offers when the host passes no `presets`. @public */
960
+ declare const DEFAULT_WATERMARK_PRESETS: readonly string[];
961
+
962
+ /** Props for `DocxEditor.WatermarkDialog`. @public */
963
+ interface DocxEditorWatermarkDialogProps extends DialogCustomizationProps {
964
+ /** Whether the dialog is shown. The host owns this state. */
965
+ open: boolean;
966
+ /** Called on Cancel, Escape, overlay click, and after a successful Apply. */
967
+ onClose: () => void;
968
+ /** The text choices offered for a text watermark. Defaults to `DEFAULT_WATERMARK_PRESETS`. */
969
+ presets?: readonly string[];
970
+ }
971
+ /** Named controls a host can replace with `DocxEditor.WatermarkDialog.Field`. @public */
972
+ type WatermarkDialogFieldName = 'noWatermark' | 'pictureWatermark' | 'picture' | 'scale' | 'washout' | 'textWatermark' | 'preset' | 'text' | 'fontFamily' | 'fontSizePt' | 'bold' | 'italic' | 'transparency' | 'color' | 'layout';
973
+ /** Watermark dialog draft and actions. @public */
974
+ interface UseWatermarkDialogReturn extends UseDialogReturn<WatermarkDialogFields> {
975
+ }
976
+ /** Read the enclosing Watermark dialog draft. @public */
977
+ declare function useWatermarkDialog(): UseWatermarkDialogReturn;
978
+ declare function WatermarkDialogRoot({ open, onClose, presets, className, style, children, preset, }: DocxEditorWatermarkDialogProps): ReactElement | null;
979
+ /**
980
+ * Watermark dialog: no watermark, a picture, or text, with a live page preview and
981
+ * replaceable controls and layout. Applies the whole form as one undoable `setWatermark`
982
+ * command, and writes nothing when the form is unchanged.
983
+ *
984
+ * @public
985
+ */
986
+ declare const DocxEditorWatermarkDialog: typeof WatermarkDialogRoot & {
987
+ Header: (props: DialogPartProps & {
988
+ name?: WatermarkDialogFieldName | undefined;
989
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
990
+ Title: (props: DialogPartProps & {
991
+ name?: WatermarkDialogFieldName | undefined;
992
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
993
+ Body: (props: DialogPartProps & {
994
+ name?: WatermarkDialogFieldName | undefined;
995
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
996
+ /** The page preview of the current draft. Decorative (`aria-hidden`). */
997
+ Preview: (props: DialogPartProps) => ReactNode;
998
+ Footer: (props: DialogPartProps & {
999
+ name?: WatermarkDialogFieldName | undefined;
1000
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1001
+ Apply: (props: DialogPartProps & {
1002
+ name?: WatermarkDialogFieldName | undefined;
1003
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1004
+ Cancel: (props: DialogPartProps & {
1005
+ name?: WatermarkDialogFieldName | undefined;
1006
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1007
+ Error: (props: DialogPartProps & {
1008
+ name?: WatermarkDialogFieldName | undefined;
1009
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1010
+ Field: (props: DialogPartProps & {
1011
+ name: WatermarkDialogFieldName;
1012
+ }) => ReactNode;
1013
+ };
1014
+
1015
+ /** Props for `DocxEditor.BookmarkDialog`. @public */
1016
+ interface DocxEditorBookmarkDialogProps extends DialogCustomizationProps {
1017
+ /** Whether the dialog is shown. The host owns this state. */
1018
+ open: boolean;
1019
+ /** Called on Cancel, Escape, overlay click, and after a successful Add. */
1020
+ onClose: () => void;
1021
+ }
1022
+ /** The Bookmark dialog's draft. @public */
1023
+ interface BookmarkDialogFields {
1024
+ /** The name typed or picked from the list. */
1025
+ name: string;
1026
+ sortBy: BookmarkSortOrder;
1027
+ /** Whether hidden bookmarks (names starting with an underscore) are listed. */
1028
+ showHidden: boolean;
1029
+ }
1030
+ /** Bookmark dialog draft and actions. `apply` is Add. @public */
1031
+ interface UseBookmarkDialogReturn extends UseDialogReturn<BookmarkDialogFields> {
1032
+ /** The bookmarks the list shows, in the chosen order. */
1033
+ readonly rows: readonly BookmarkSummary[];
1034
+ /** Whether Delete and Go To can act on the typed name. */
1035
+ readonly canDelete: boolean;
1036
+ readonly canGoTo: boolean;
1037
+ /**
1038
+ * How many other places carry the typed bookmark's name, which collaborators adding one name
1039
+ * offline can leave. 0 for a name with one bookmark, or no bookmark.
1040
+ */
1041
+ readonly duplicates: number;
1042
+ remove(): void;
1043
+ goTo(): void;
1044
+ /** Keep the first bookmark with the typed name and remove its copies. */
1045
+ keepFirst(): void;
1046
+ }
1047
+ /**
1048
+ * The dialog is mounted only while it is open, so a closed dialog reads no bookmarks on each
1049
+ * editor update. Each opening starts a fresh draft.
1050
+ */
1051
+ declare function BookmarkDialogRoot(props: DocxEditorBookmarkDialogProps): ReactElement | null;
1052
+ /** Read the enclosing Bookmark dialog draft. @public */
1053
+ declare function useBookmarkDialog(): UseBookmarkDialogReturn;
1054
+ type PartComponent = (props: DialogPartProps) => ReactNode;
1055
+ /** The Bookmark dialog with replaceable controls and layout. @public */
1056
+ declare const DocxEditorBookmarkDialog: typeof BookmarkDialogRoot & {
1057
+ Header: (props: DialogPartProps & {
1058
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1059
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1060
+ Title: (props: DialogPartProps & {
1061
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1062
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1063
+ Body: (props: DialogPartProps & {
1064
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1065
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1066
+ Footer: (props: DialogPartProps & {
1067
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1068
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1069
+ /** Add: bookmark the selection under the typed name. */
1070
+ Apply: (props: DialogPartProps & {
1071
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1072
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1073
+ Cancel: (props: DialogPartProps & {
1074
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1075
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1076
+ Error: (props: DialogPartProps & {
1077
+ name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
1078
+ }) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
1079
+ Field: (props: DialogPartProps & {
1080
+ name: "list" | "name" | "showHidden" | "sortBy";
1081
+ }) => ReactNode;
1082
+ Delete: PartComponent;
1083
+ GoTo: PartComponent;
1084
+ /** Shown while the typed name has copies: keep the first, remove the rest. */
1085
+ KeepFirst: PartComponent;
1086
+ };
1087
+
848
1088
  /** Shared props for every part. @public */
849
1089
  interface HyperLinkPartProps {
850
1090
  className?: string;
@@ -1568,6 +1808,8 @@ interface DocxEditorPopups {
1568
1808
  */
1569
1809
  contentControlPicture?: DocxEditorPopup<DocxEditorContentControlWidgetProps>;
1570
1810
  invalidTextFormField?: DocxEditorPopup<DocxEditorInvalidTextFormFieldDialogProps>;
1811
+ /** Why a chosen or pasted picture could not be inserted. False shows nothing. */
1812
+ imageInsertError?: DocxEditorPopup<DocxEditorImageInsertErrorDialogProps>;
1571
1813
  imageProperties?: DocxEditorPopup<DocxEditorImagePropertiesDialogProps>;
1572
1814
  imageAltText?: DocxEditorPopup<DocxEditorImageAltTextPopupProps>;
1573
1815
  noteProperties?: DocxEditorPopup<DocxEditorNotePropertiesDialogProps>;
@@ -1575,6 +1817,10 @@ interface DocxEditorPopups {
1575
1817
  notesContextMenu?: DocxEditorPopup<DocxEditorNotesContextMenuProps>;
1576
1818
  pageSetup?: DocxEditorPopup<DocxEditorPageSetupDialogProps>;
1577
1819
  paragraph?: DocxEditorPopup<DocxEditorParagraphDialogProps>;
1820
+ /** The Watermark dialog the Insert menu opens. Pass `presets` here to change its text choices. */
1821
+ watermark?: DocxEditorPopup<DocxEditorWatermarkDialogProps>;
1822
+ /** The Bookmark dialog the Insert menu and Ctrl/Cmd+Shift+F5 open. */
1823
+ bookmark?: DocxEditorPopup<DocxEditorBookmarkDialogProps>;
1578
1824
  revisionMarkup?: DocxEditorPopup<DocxEditorRevisionMarkupDialogProps>;
1579
1825
  textFormField?: DocxEditorPopup<DocxEditorTextFormFieldDialogProps>;
1580
1826
  hyperlink?: DocxEditorPopup<HyperLinkProps>;
@@ -1606,9 +1852,41 @@ declare function useDocxEditor(): DocxEditorInstance | null;
1606
1852
  * legitimately compose two rails.
1607
1853
  */
1608
1854
  interface ReviewRailRegistry {
1855
+ /**
1856
+ * Review columns registered through `register`: the packaged rail, and any column that
1857
+ * serves comment drafts. The Add comment controls in the toolbar and the context menu
1858
+ * appear only while this is above zero.
1859
+ */
1609
1860
  readonly mounted: number;
1861
+ /**
1862
+ * Register a review column that serves comment drafts. Also reserves the review gutter.
1863
+ * Call it on mount, together with `registerCommentDraft`. Returns the unregister function.
1864
+ */
1610
1865
  readonly register: () => () => void;
1866
+ /**
1867
+ * Claims registered through `reserveGutter`: columns that need the review gutter but
1868
+ * serve no comment draft. The viewport reserves the gutter while `mounted + gutters` is
1869
+ * above zero.
1870
+ */
1871
+ readonly gutters?: number;
1872
+ /** Reserve the review gutter without showing comment controls. Returns the release. */
1873
+ readonly reserveGutter?: () => () => void;
1874
+ /**
1875
+ * Receive the Add comment requests. The handler takes no arguments: it reads the
1876
+ * selection's position with `getSelectionPlacement`, pins the selection with
1877
+ * `retainSelection`, and opens the pane. Release the pin with `releaseSelection` when the
1878
+ * draft closes or is cancelled. The most recently registered handler receives each request. Do not register
1879
+ * while the column cannot open a draft, such as in viewing mode: a request counts as
1880
+ * served once a handler runs. While a handler is registered, the `review.addComment`
1881
+ * control is enabled. Returns the unregister function.
1882
+ */
1611
1883
  readonly registerCommentDraft: (handler: () => void) => () => void;
1884
+ /**
1885
+ * Send an Add comment request through the `review.addComment` control. The most recent
1886
+ * registration receives it: a handler registered here, or one registered with
1887
+ * `useCommentDraftRequest`. Returns `true` when a handler ran, even if it then opened
1888
+ * nothing, and `false` when the control is disabled.
1889
+ */
1612
1890
  readonly requestCommentDraft: () => boolean;
1613
1891
  }
1614
1892
  declare const ReviewRailContext: react.Context<ReviewRailRegistry | null>;
@@ -2425,6 +2703,32 @@ interface DocxEditorToolbarNamespace {
2425
2703
  */
2426
2704
  declare const DocxEditorToolbar: DocxEditorToolbarNamespace;
2427
2705
 
2706
+ /**
2707
+ * The Watermark dialog, from the Insert menu.
2708
+ *
2709
+ * Same shape as page setup: no fixed command to dispatch, so the row asks through the
2710
+ * slot's probe and is disabled with the engine's own words on a document it cannot rewrite.
2711
+ */
2712
+ declare function MenuWatermarkImpl({ className, hidden }: MenuActionProps): react.JSX.Element | null;
2713
+ /** Insert › Watermark, so a host can hide it or place it elsewhere by name. @public */
2714
+ declare const MenuWatermark: typeof MenuWatermarkImpl & {
2715
+ docxSlot: 'insert.watermark';
2716
+ };
2717
+
2718
+ declare function MenuBookmarkImpl({ className, hidden }: MenuActionProps): react.JSX.Element;
2719
+ /**
2720
+ * Insert › Bookmark, so a host can hide it or place it elsewhere by name.
2721
+ *
2722
+ * An ordinary command row: the slot runs `openBookmarkDialog`, which opens the `bookmark`
2723
+ * popup through the editor, the same request Ctrl/Cmd+Shift+F5 sends. The row is disabled
2724
+ * while no bookmark dialog is registered, for example when the popup is `false`.
2725
+ *
2726
+ * @public
2727
+ */
2728
+ declare const MenuBookmark: typeof MenuBookmarkImpl & {
2729
+ docxSlot: 'insert.bookmark';
2730
+ };
2731
+
2428
2732
  /** Props for `DocxEditor.Menu.ReportIssue`. @public */
2429
2733
  interface MenuReportIssueProps {
2430
2734
  className?: string;
@@ -2562,6 +2866,9 @@ interface DocxEditorMenuNamespace {
2562
2866
  readonly PageSetup: typeof MenuPageSetup;
2563
2867
  /** Insert › Image, so a host can hide it or place it elsewhere by name. */
2564
2868
  readonly ImageInsert: typeof MenuImageInsert;
2869
+ /** Insert › Watermark, so a host can hide it or place it elsewhere by name. */
2870
+ readonly Watermark: typeof MenuWatermark;
2871
+ readonly Bookmark: typeof MenuBookmark;
2565
2872
  /** Review > Markup Options > Reviewers. */
2566
2873
  readonly Reviewers: typeof MenuReviewers;
2567
2874
  /** Help › Report issue, so a host can drop it or point it elsewhere by name. */
@@ -2635,64 +2942,8 @@ interface DocxEditorDocumentOutlineProps {
2635
2942
  */
2636
2943
  declare function DocxEditorDocumentOutline(props: DocxEditorDocumentOutlineProps): ReactElement | null;
2637
2944
 
2638
- /** How `useDocumentSearch` behaves. @public */
2639
- interface UseDocumentSearchOptions {
2640
- /**
2641
- * Which matches to mark: every match with the active one emphasized (`'all'`), only the
2642
- * active match (`'active'`), or none (`'none'`). Default: `'all'`.
2643
- */
2644
- readonly highlight?: DocumentSearchHighlight;
2645
- }
2646
- /** What `useDocumentSearch` answers. @public */
2647
- interface UseDocumentSearchResult {
2648
- /** The text in the search box, updated synchronously as the user types. */
2649
- readonly query: string;
2650
- /** Update the typed query. The search runs after a short debounce. */
2651
- readonly setQuery: (query: string) => void;
2652
- /**
2653
- * Search now and return the matches. `selectFirst` selects the first match; `highlight`
2654
- * highlights the results until `clear()`, even without this hook's own request.
2655
- */
2656
- readonly find: (query: string, options?: DocumentSearchFindOptions) => readonly TextMatch[];
2657
- readonly matchCase: boolean;
2658
- readonly setMatchCase: (value: boolean) => void;
2659
- readonly wholeWord: boolean;
2660
- readonly setWholeWord: (value: boolean) => void;
2661
- /** Matches for the last RUN query, in document order. */
2662
- readonly matches: readonly TextMatch[];
2663
- /**
2664
- * Whether the engine stopped at its cap with matches still ahead of it, so a count
2665
- * should read "2000+" rather than an exact total. A search that lands on exactly the cap
2666
- * reports true; over-reporting by one is the honest direction.
2667
- */
2668
- readonly truncated: boolean;
2669
- /** Index of the match the caret was last sent to, or `-1` before any navigation. */
2670
- readonly activeIndex: number;
2671
- /** The current match, or `null` before any navigation. */
2672
- readonly activeMatch: TextMatch | null;
2673
- /**
2674
- * Select a match by index and bring its page into view. Focus stays where it is, so a
2675
- * search box keeps it. Returns false for an index without a match.
2676
- */
2677
- readonly goTo: (index: number) => boolean;
2678
- /** Next / previous match, wrapping at the ends the way Word's arrows do. */
2679
- readonly next: () => boolean;
2680
- readonly previous: () => boolean;
2681
- /** Empty the box and drop the results, without touching the selection. */
2682
- readonly clear: () => void;
2683
- /** Whether a typed query is waiting for its debounce to elapse. */
2684
- readonly isPending: boolean;
2685
- }
2686
- /**
2687
- * The editor's shared search, with no UI attached. The packaged Find pane uses the same
2688
- * session, so state set here shows there.
2689
- *
2690
- * @public
2691
- */
2692
- declare function useDocumentSearch(options?: UseDocumentSearchOptions): UseDocumentSearchResult;
2693
-
2694
- /** The pane's tabs. Word's Replace tab is a later slice; nothing here pretends it exists. */
2695
- type NavigationTab$1 = 'headings' | 'find';
2945
+ /** The pane's tabs: the outline, Find, and Go to (bookmarks). */
2946
+ type NavigationTab$1 = 'headings' | 'find' | 'goto';
2696
2947
  /** How `useNavigationPane` is configured. @public */
2697
2948
  interface UseNavigationPaneOptions {
2698
2949
  /** Open state for the first render when the pane is uncontrolled. Defaults to closed. */
@@ -2797,6 +3048,70 @@ declare function NavigationFind({ className, style }: NavigationPartProps): Reac
2797
3048
  */
2798
3049
  declare function NavigationToggle({ className, style, children, }: NavigationPartProps): ReactElement;
2799
3050
 
3051
+ /**
3052
+ * The Bookmarks panel: a bookmark search box, the sort order and hidden-bookmarks toggle, and
3053
+ * the bookmarks it offers, grouped by place when sorted by location.
3054
+ *
3055
+ * @public
3056
+ */
3057
+ declare function NavigationGoTo({ className, style }: NavigationPartProps): ReactElement;
3058
+
3059
+ /** How `useDocumentSearch` behaves. @public */
3060
+ interface UseDocumentSearchOptions {
3061
+ /**
3062
+ * Which matches to mark: every match with the active one emphasized (`'all'`), only the
3063
+ * active match (`'active'`), or none (`'none'`). Default: `'all'`.
3064
+ */
3065
+ readonly highlight?: DocumentSearchHighlight;
3066
+ }
3067
+ /** What `useDocumentSearch` answers. @public */
3068
+ interface UseDocumentSearchResult {
3069
+ /** The text in the search box, updated synchronously as the user types. */
3070
+ readonly query: string;
3071
+ /** Update the typed query. The search runs after a short debounce. */
3072
+ readonly setQuery: (query: string) => void;
3073
+ /**
3074
+ * Search now and return the matches. `selectFirst` selects the first match; `highlight`
3075
+ * highlights the results until `clear()`, even without this hook's own request.
3076
+ */
3077
+ readonly find: (query: string, options?: DocumentSearchFindOptions) => readonly TextMatch[];
3078
+ readonly matchCase: boolean;
3079
+ readonly setMatchCase: (value: boolean) => void;
3080
+ readonly wholeWord: boolean;
3081
+ readonly setWholeWord: (value: boolean) => void;
3082
+ /** Matches for the last RUN query, in document order. */
3083
+ readonly matches: readonly TextMatch[];
3084
+ /**
3085
+ * Whether the engine stopped at its cap with matches still ahead of it, so a count
3086
+ * should read "2000+" rather than an exact total. A search that lands on exactly the cap
3087
+ * reports true; over-reporting by one is the honest direction.
3088
+ */
3089
+ readonly truncated: boolean;
3090
+ /** Index of the match the caret was last sent to, or `-1` before any navigation. */
3091
+ readonly activeIndex: number;
3092
+ /** The current match, or `null` before any navigation. */
3093
+ readonly activeMatch: TextMatch | null;
3094
+ /**
3095
+ * Select a match by index and bring its page into view. Focus stays where it is, so a
3096
+ * search box keeps it. Returns false for an index without a match.
3097
+ */
3098
+ readonly goTo: (index: number) => boolean;
3099
+ /** Next / previous match, wrapping at the ends the way Word's arrows do. */
3100
+ readonly next: () => boolean;
3101
+ readonly previous: () => boolean;
3102
+ /** Empty the box and drop the results, without touching the selection. */
3103
+ readonly clear: () => void;
3104
+ /** Whether a typed query is waiting for its debounce to elapse. */
3105
+ readonly isPending: boolean;
3106
+ }
3107
+ /**
3108
+ * The editor's shared search, with no UI attached. The packaged Find pane uses the same
3109
+ * session, so state set here shows there.
3110
+ *
3111
+ * @public
3112
+ */
3113
+ declare function useDocumentSearch(options?: UseDocumentSearchOptions): UseDocumentSearchResult;
3114
+
2800
3115
  /** Props for `DocxEditor.Navigation`. @public */
2801
3116
  interface DocxEditorNavigationProps extends UseNavigationPaneOptions {
2802
3117
  /**
@@ -2826,6 +3141,12 @@ interface DocxEditorNavigationProps extends UseNavigationPaneOptions {
2826
3141
  * browser's own search. Set `false` to leave the shortcut to the browser everywhere.
2827
3142
  */
2828
3143
  findShortcut?: boolean;
3144
+ /**
3145
+ * Whether Ctrl+G (Cmd+Option+G on macOS) opens the pane on the Go to tab. Defaults to
3146
+ * `true`, and applies only while focus is in this editor. The `openGoTo` editor command
3147
+ * opens the tab either way.
3148
+ */
3149
+ goToShortcut?: boolean;
2829
3150
  className?: string;
2830
3151
  style?: CSSProperties;
2831
3152
  /** Replaces the default composition (header, tabs, both panels). */
@@ -2851,10 +3172,68 @@ interface DocxEditorNavigationNamespace {
2851
3172
  readonly Tab: typeof NavigationTab;
2852
3173
  readonly Headings: typeof NavigationHeadings;
2853
3174
  readonly Find: typeof NavigationFind;
3175
+ readonly GoTo: typeof NavigationGoTo;
2854
3176
  readonly Toggle: typeof NavigationToggle;
2855
3177
  }
2856
3178
  declare const Navigation: DocxEditorNavigationNamespace;
2857
3179
 
3180
+ /**
3181
+ * Why a Go To jump did not happen: nothing was typed, no bookmark has the name, or the editor
3182
+ * refused the jump for another reason (it is not ready, or the story could not be shown).
3183
+ *
3184
+ * @public
3185
+ */
3186
+ type GoToBookmarkProblem = 'empty' | 'notFound' | 'failed';
3187
+ /** How `useGoToBookmark` is configured. @public */
3188
+ interface UseGoToBookmarkOptions {
3189
+ /**
3190
+ * Whether to read the document's bookmarks. Defaults to `true`. Pass `false` while your UI
3191
+ * is hidden: the list is then empty and the document is not read on each change.
3192
+ */
3193
+ readonly enabled?: boolean;
3194
+ }
3195
+ /** What `useGoToBookmark` answers. @public */
3196
+ interface UseGoToBookmarkReturn {
3197
+ /** The text in the name box. */
3198
+ readonly query: string;
3199
+ /** Change the text. The highlight goes back to none. */
3200
+ readonly setQuery: (query: string) => void;
3201
+ readonly sortBy: BookmarkSortOrder;
3202
+ readonly setSortBy: (sortBy: BookmarkSortOrder) => void;
3203
+ /** Whether hidden bookmarks (names starting with an underscore) are offered. */
3204
+ readonly showHidden: boolean;
3205
+ readonly setShowHidden: (showHidden: boolean) => void;
3206
+ /** The bookmarks offered for the query: names that start with it first. */
3207
+ readonly rows: readonly BookmarkSummary[];
3208
+ /** Every bookmark the document declares, hidden ones included. Empty while disabled. */
3209
+ readonly bookmarks: readonly BookmarkSummary[];
3210
+ /**
3211
+ * Index into `rows` of the highlighted row, or -1 when none is. The highlight follows its
3212
+ * bookmark when rows move, and clears when that bookmark goes away.
3213
+ */
3214
+ readonly activeIndex: number;
3215
+ /** Move the highlight by `delta` rows, wrapping at either end. */
3216
+ readonly move: (delta: number) => void;
3217
+ /** Highlight the row at `index` of `rows`, or none with -1. */
3218
+ readonly setActiveIndex: (index: number) => void;
3219
+ /**
3220
+ * Jump to `name`, or else to what the name box means: the highlighted row, the bookmark
3221
+ * named exactly as typed, or the first row offered. Answers the `goToBookmark` result and
3222
+ * sets `problem` when it is refused.
3223
+ */
3224
+ readonly go: (name?: string) => ExecResult;
3225
+ /** Why the last jump did not happen, or null. Cleared when the query changes. */
3226
+ readonly problem: GoToBookmarkProblem | null;
3227
+ /** The name the last refused jump asked for, for a message. Empty when nothing was typed. */
3228
+ readonly problemName: string;
3229
+ }
3230
+ /**
3231
+ * Go To for bookmarks: filter by name, move through the offered rows, and jump.
3232
+ *
3233
+ * @public
3234
+ */
3235
+ declare function useGoToBookmark(options?: UseGoToBookmarkOptions): UseGoToBookmarkReturn;
3236
+
2858
3237
  /**
2859
3238
  * One heading of the engine's outline: text, 0-based level, and the block id
2860
3239
  * `Editor.scrollToBlock` accepts.
@@ -3031,6 +3410,162 @@ interface DocxEditorFontNoticeProps {
3031
3410
  */
3032
3411
  declare function DocxEditorFontNotice({ className, style, t: tProp }: DocxEditorFontNoticeProps): react.JSX.Element | null;
3033
3412
 
3413
+ /** The current refused open, with the packaged message and a way to dismiss it. @public */
3414
+ interface UseOpenFailureReturn {
3415
+ /** The refused open, or `null` when there is none or the person dismissed it. */
3416
+ readonly failure: DocumentOpenFailure | null;
3417
+ /** The packaged, translated message for {@link UseOpenFailureReturn.failure}. */
3418
+ readonly message: string | null;
3419
+ /**
3420
+ * Hide this refusal. A later refusal shows again, even for the same file. Pass the failure
3421
+ * your UI showed, such as from a toast's close callback, so a late call cannot hide a newer
3422
+ * refusal. It also works as a click handler directly, such as `onClick={dismiss}`: an event
3423
+ * hides the refusal on screen.
3424
+ */
3425
+ dismiss(failure?: DocumentOpenFailure | Event | {
3426
+ readonly nativeEvent: Event;
3427
+ }): void;
3428
+ }
3429
+ /** Options for {@link useOpenFailure}. @public */
3430
+ interface UseOpenFailureOptions {
3431
+ /** Translator override; defaults to the ambient locale context. */
3432
+ t?: TFunction;
3433
+ }
3434
+ /**
3435
+ * Reads the document the editor refused to open, for a host that shows it in its own UI,
3436
+ * such as a toast. Pair it with `openFailure={false}` on `<DocxEditor>`, so the packaged
3437
+ * dialog does not show as well. Call it inside a `DocxEditor.Root`.
3438
+ *
3439
+ * ```tsx
3440
+ * function OpenFailureToast() {
3441
+ * const { failure, message, dismiss } = useOpenFailure();
3442
+ * if (!failure) return null;
3443
+ * return <Toast title={message} detail={failure.code} onClose={() => dismiss(failure)} />;
3444
+ * }
3445
+ * ```
3446
+ *
3447
+ * @public
3448
+ */
3449
+ declare function useOpenFailure(options?: UseOpenFailureOptions): UseOpenFailureReturn;
3450
+ /** What `actions` and `children` receive. @public */
3451
+ interface DocxEditorOpenFailureContext {
3452
+ /** The refused open: its stable `code` and its `reason`. */
3453
+ readonly failure: DocumentOpenFailure;
3454
+ /** The packaged, translated message for the failure. */
3455
+ readonly message: string;
3456
+ /** Close the dialog. It calls `onDismiss`, as **Close** does. */
3457
+ dismiss(): void;
3458
+ }
3459
+ /** Props for `DocxEditor.OpenFailure.Action`. @public */
3460
+ interface DocxEditorOpenFailureActionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
3461
+ /** `primary` is filled, `secondary` is outlined. Defaults to `secondary`. */
3462
+ variant?: 'primary' | 'secondary';
3463
+ /** Close the dialog after `onClick` runs, unless the handler called `preventDefault()`. */
3464
+ dismiss?: boolean;
3465
+ /** Render your own element, such as a link, with the button's classes and handler. */
3466
+ asChild?: boolean;
3467
+ children?: DocxEditorChildren;
3468
+ }
3469
+ /**
3470
+ * A button in the open-failure dialog, styled as the packaged **Close**. Use it in `actions`,
3471
+ * or in your own `children`. With `asChild`, it styles your own element instead, such as a
3472
+ * link to your support page:
3473
+ *
3474
+ * ```tsx
3475
+ * <DocxEditor.OpenFailure
3476
+ * actions={({ failure }) => (
3477
+ * <DocxEditor.OpenFailure.Action asChild>
3478
+ * <a href={`/support?code=${failure.code}`}>Get help</a>
3479
+ * </DocxEditor.OpenFailure.Action>
3480
+ * )}
3481
+ * />
3482
+ * ```
3483
+ *
3484
+ * @public
3485
+ */
3486
+ declare function DocxEditorOpenFailureAction({ variant, dismiss, asChild, className, onClick, children, type, ...rest }: DocxEditorOpenFailureActionProps): react.JSX.Element;
3487
+ /**
3488
+ * A message for the open-failure dialog: text, content, or a function of the failure. It
3489
+ * renders in a `div`, so block content is valid.
3490
+ *
3491
+ * @public
3492
+ */
3493
+ type DocxEditorOpenFailureMessage = string | DocxEditorChildren | ((failure: DocumentOpenFailure) => string | DocxEditorChildren);
3494
+ /** Props for `DocxEditor.OpenFailure`. @public */
3495
+ interface DocxEditorOpenFailureProps {
3496
+ /**
3497
+ * The dialog title. Defaults to the translated `openFailure.title`. It also names the dialog
3498
+ * for screen readers, including when your own content replaces the packaged one.
3499
+ */
3500
+ title?: string;
3501
+ /** Your own message in place of the packaged one, as content or per failure. */
3502
+ message?: DocxEditorOpenFailureMessage;
3503
+ /** Show the stable error code under the message. Defaults to `true`. */
3504
+ showCode?: boolean;
3505
+ /**
3506
+ * Your own buttons, before **Close**. Build them from `DocxEditor.OpenFailure.Action` so
3507
+ * they match the dialog. The dialog shows no contact of its own.
3508
+ */
3509
+ actions?: (context: DocxEditorOpenFailureContext) => DocxEditorChildren;
3510
+ /** The label of the **Close** button. Defaults to the translated `common.close`. */
3511
+ closeLabel?: string;
3512
+ /**
3513
+ * Show the packaged **Close** button. Defaults to `true`. Turn it off only when `actions`
3514
+ * gives a way out. Escape still closes the dialog.
3515
+ */
3516
+ showClose?: boolean;
3517
+ /** Called after the person closes the dialog, by any route. */
3518
+ onDismiss?: (failure: DocumentOpenFailure) => void;
3519
+ /**
3520
+ * Your own dialog content, in place of the packaged header, body and footer. The dialog
3521
+ * frame, its focus handling and Escape stay.
3522
+ */
3523
+ children?: (context: DocxEditorOpenFailureContext) => DocxEditorChildren;
3524
+ /** Appended after the load-bearing `docx-dialog` class. */
3525
+ className?: string;
3526
+ /** Inline styles for the dialog element. */
3527
+ style?: CSSProperties;
3528
+ /** Translator override; defaults to the ambient locale context. */
3529
+ t?: TFunction;
3530
+ }
3531
+ /**
3532
+ * The open-failure part with its button attached as a static.
3533
+ *
3534
+ * @public
3535
+ */
3536
+ interface DocxEditorOpenFailureComponent {
3537
+ /** Renders the dialog while a refused open is waiting, and nothing otherwise. */
3538
+ (props: DocxEditorOpenFailureProps): ReactNode;
3539
+ /** A button styled for the dialog, for `actions` and custom `children`. */
3540
+ readonly Action: typeof DocxEditorOpenFailureAction;
3541
+ }
3542
+ /**
3543
+ * A dialog that explains why a file did not open. It shows nothing until the editor refuses a
3544
+ * document, and shows again for each later refusal. `<DocxEditor>` renders it by default;
3545
+ * compose it yourself inside a `DocxEditor.Root`:
3546
+ *
3547
+ * ```tsx
3548
+ * <DocxEditor.Root document={bytes}>
3549
+ * <DocxEditor.OpenFailure
3550
+ * actions={({ failure }) => (
3551
+ * <DocxEditor.OpenFailure.Action variant="primary" onClick={() => report(failure.code)}>
3552
+ * Report
3553
+ * </DocxEditor.OpenFailure.Action>
3554
+ * )}
3555
+ * />
3556
+ * <DocxEditor.Viewport>
3557
+ * <DocxEditor.Content />
3558
+ * </DocxEditor.Viewport>
3559
+ * </DocxEditor.Root>
3560
+ * ```
3561
+ *
3562
+ * The packaged message is generic and names no contact. For a toast or banner instead of a
3563
+ * dialog, use `useOpenFailure`.
3564
+ *
3565
+ * @public
3566
+ */
3567
+ declare const DocxEditorOpenFailure: DocxEditorOpenFailureComponent;
3568
+
3034
3569
  /** Props for `DocxEditor.HeaderFooterChrome`. @public */
3035
3570
  interface DocxEditorHeaderFooterChromeProps {
3036
3571
  className?: string;
@@ -3076,6 +3611,23 @@ interface DocxEditorProps {
3076
3611
  */
3077
3612
  readonly renderTitleBarLeft?: () => DocxEditorChildren;
3078
3613
  readonly renderTitleBarRight?: () => DocxEditorChildren;
3614
+ /**
3615
+ * Your own buttons in the dialog for a file that does not open, before **Close**. Build
3616
+ * them from `DocxEditor.OpenFailure.Action`. It is the same as `openFailure.actions`; pass
3617
+ * only one. With `openFailure={false}` there is no dialog, so it renders nothing.
3618
+ *
3619
+ * ```tsx
3620
+ * <DocxEditor
3621
+ * document={bytes}
3622
+ * renderOpenFailureActions={({ failure }) => (
3623
+ * <DocxEditor.OpenFailure.Action asChild>
3624
+ * <a href={`/support?code=${failure.code}`}>Get help</a>
3625
+ * </DocxEditor.OpenFailure.Action>
3626
+ * )}
3627
+ * />
3628
+ * ```
3629
+ */
3630
+ readonly renderOpenFailureActions?: (context: DocxEditorOpenFailureContext) => DocxEditorChildren;
3079
3631
  /**
3080
3632
  * Your own loading indicator, in place of the packaged spinner. It shows centered on a
3081
3633
  * blank page before the document arrives, then on the document's first page while a large
@@ -3205,6 +3757,15 @@ interface DocxEditorProps {
3205
3757
  * `navigation={{ findShortcut: false }}` leaves the shortcut to the browser.
3206
3758
  */
3207
3759
  navigation?: boolean | DocxEditorNavigationProps;
3760
+ /**
3761
+ * The dialog that explains a file the editor refused to open, on by default. A refused
3762
+ * open leaves the pages blank, so without it the reader sees nothing.
3763
+ *
3764
+ * An object is `DocxEditorOpenFailureProps`, passed straight through: change the title or
3765
+ * message, hide the error code, or add your own support action with `actions`. `false`
3766
+ * removes the dialog, for a host that reports the failure itself through `useOpenFailure`.
3767
+ */
3768
+ openFailure?: boolean | DocxEditorOpenFailureProps;
3208
3769
  /**
3209
3770
  * Horizontal and vertical rulers, on by default with the packaged chrome.
3210
3771
  *
@@ -3339,6 +3900,8 @@ interface DocxEditorNamespace extends ForwardRefExoticComponent<DocxEditorProps
3339
3900
  readonly Root: typeof DocxEditorRoot;
3340
3901
  readonly Viewport: typeof DocxEditorViewport;
3341
3902
  readonly Content: typeof DocxEditorContent;
3903
+ /** The editor panel in a pop-out window while `open`; see the pop-out guide. */
3904
+ readonly Window: typeof DocxEditorWindow;
3342
3905
  readonly Toolbar: typeof DocxEditorToolbar;
3343
3906
  /**
3344
3907
  * The menu bar — File · Format · Insert · Help — with its parts as statics (`.File`,
@@ -3370,6 +3933,10 @@ interface DocxEditorNamespace extends ForwardRefExoticComponent<DocxEditorProps
3370
3933
  readonly PrintDialog: typeof DocxEditorPrintDialog;
3371
3934
  /** Page Setup dialog — size, orientation, margins — applied as one undo step. */
3372
3935
  readonly PageSetupDialog: typeof DocxEditorPageSetupDialog;
3936
+ /** Watermark dialog — none, picture or text — applied as one undo step. */
3937
+ readonly WatermarkDialog: typeof DocxEditorWatermarkDialog;
3938
+ /** Bookmark dialog — list, add, delete and go to bookmarks. */
3939
+ readonly BookmarkDialog: typeof DocxEditorBookmarkDialog;
3373
3940
  /** The Paragraph dialog: alignment, indentation, spacing and the paragraph flags. */
3374
3941
  readonly TextFormFieldDialog: typeof DocxEditorTextFormFieldDialog;
3375
3942
  readonly ParagraphDialog: typeof DocxEditorParagraphDialog;
@@ -3377,6 +3944,11 @@ interface DocxEditorNamespace extends ForwardRefExoticComponent<DocxEditorProps
3377
3944
  readonly PageNumber: typeof DocxEditorPageNumber;
3378
3945
  /** Word-style notice when document fonts render in substitute faces. */
3379
3946
  readonly FontNotice: typeof DocxEditorFontNotice;
3947
+ /**
3948
+ * The dialog that explains a file the editor refused to open. Mounted by default;
3949
+ * `openFailure={false}` removes it.
3950
+ */
3951
+ readonly OpenFailure: typeof DocxEditorOpenFailure;
3380
3952
  /** Header/footer scope chrome while editing page furniture. */
3381
3953
  readonly HeaderFooterChrome: typeof DocxEditorHeaderFooterChrome;
3382
3954
  readonly NotesChrome: typeof DocxEditorNotesChrome;
@@ -3446,6 +4018,49 @@ declare function notificationYieldsToTask(): boolean;
3446
4018
  */
3447
4019
  declare function useScopeClassName(): '' | 'docx-editor ';
3448
4020
 
4021
+ /** What `useWatermark` returns. @public */
4022
+ interface UseWatermarkReturn {
4023
+ /** The document's watermark, or null when it has none. Reference-stable while unchanged. */
4024
+ readonly watermark: WatermarkState | null;
4025
+ /** Whether the engine can write a watermark right now (mounted, editable). */
4026
+ readonly isEnabled: boolean;
4027
+ /** The full current watermark, with picture bytes, through `query({ type: 'watermark' })`. */
4028
+ readonly read: () => Watermark | null;
4029
+ /** Set the watermark as one undo step. Null removes it. */
4030
+ readonly apply: (watermark: Watermark | null) => ExecResult;
4031
+ }
4032
+ /**
4033
+ * The document watermark plus the command to change it.
4034
+ *
4035
+ * @public
4036
+ */
4037
+ declare function useWatermark(): UseWatermarkReturn;
4038
+
4039
+ /** What `useBookmarks` returns. @public */
4040
+ interface UseBookmarksReturn {
4041
+ /** Every bookmark, hidden ones included, in document order. Reference-stable while unchanged. */
4042
+ readonly bookmarks: readonly BookmarkSummary[];
4043
+ /** Whether the document accepts bookmark edits now. Go To works either way. */
4044
+ readonly isWritable: boolean;
4045
+ /** Bookmark the selection under `name`. A bookmark with the name moves. */
4046
+ readonly insert: (name: string) => ExecResult;
4047
+ /** Delete the bookmark with this name. The text stays. */
4048
+ readonly remove: (name: string) => ExecResult;
4049
+ /** Select the bookmark and scroll to it. */
4050
+ readonly goTo: (name: string) => ExecResult;
4051
+ /**
4052
+ * Keep the first bookmark with this name and remove its copies, which collaborators adding
4053
+ * one name offline can leave. The selection does not move.
4054
+ */
4055
+ readonly keepFirst: (name: string) => ExecResult;
4056
+ }
4057
+ /**
4058
+ * The document's bookmarks plus the commands that change them.
4059
+ *
4060
+ * @public
4061
+ */
4062
+ declare function useBookmarks(): UseBookmarksReturn;
4063
+
3449
4064
  /** Full reservation: the 300px card column plus its 16px gutter off the page edge. */
3450
4065
  declare const REVIEW_PANE_GUTTER = 316;
3451
4066
  /** The marker strip: anchors and the add-comment button, no cards. */
@@ -3522,9 +4137,14 @@ interface LocaleProviderProps {
3522
4137
  children: DocxEditorChildren;
3523
4138
  }
3524
4139
  declare function LocaleProvider({ i18n, children }: LocaleProviderProps): react.JSX.Element;
4140
+ /**
4141
+ * The active catalogue's `t()`, the catalogue itself, and its language tag (`_lang`, `en`
4142
+ * by default), which formats numbers the way the strings around them read.
4143
+ */
3525
4144
  declare function useTranslation(): {
3526
4145
  t: TFunction;
3527
4146
  catalogue: LocaleStrings;
4147
+ lang: string;
3528
4148
  };
3529
4149
 
3530
4150
  /**
@@ -4078,6 +4698,71 @@ declare function useScopedChromeAnchor(findAnchor: (viewport: HTMLElement) => HT
4078
4698
  */
4079
4699
  declare function useEditorEvent<E extends keyof EditorEvents>(event: E, handler: EditorEvents[E]): void;
4080
4700
 
4701
+ /**
4702
+ * Open the host's own comment draft when the `review.addComment` control is pressed.
4703
+ *
4704
+ * While the component is mounted and `handler` is set, the control is enabled (subject to the
4705
+ * engine's other rules: the review module, the editing mode, and a selection). Without any
4706
+ * registration the control is disabled, because nothing could open the draft. The most recent
4707
+ * registration receives each request. Pass `null` to stop serving requests, for example while
4708
+ * your comment UI cannot open a draft.
4709
+ *
4710
+ * The handler takes no arguments. Read the selection with `editor.getSelectionPlacement()`,
4711
+ * and pin it with `editor.retainSelection()` while the draft is open.
4712
+ *
4713
+ * @example
4714
+ * ```tsx
4715
+ * function CommentButton() {
4716
+ * const [drafting, setDrafting] = useState(false);
4717
+ * useCommentDraftRequest(() => setDrafting(true));
4718
+ * const addComment = useEditorCommand('review.addComment');
4719
+ * return (
4720
+ * <>
4721
+ * <button
4722
+ * disabled={!addComment.isEnabled}
4723
+ * title={addComment.disabledReason ?? 'Add comment'}
4724
+ * onClick={() => addComment.execute()}
4725
+ * >
4726
+ * Add comment
4727
+ * </button>
4728
+ * {drafting ? <MyCommentDraft onClose={() => setDrafting(false)} /> : null}
4729
+ * </>
4730
+ * );
4731
+ * }
4732
+ * ```
4733
+ *
4734
+ * @public
4735
+ */
4736
+ declare function useCommentDraftRequest(handler: (() => void) | null | undefined): void;
4737
+
4738
+ /** What {@link useEditorHostDocument} returns: the host document, or `null` on the server. @public */
4739
+ type UseEditorHostDocumentReturn = Document | null;
4740
+ /**
4741
+ * The document the editor's pages are mounted in: a pop-out window's or an iframe's when the
4742
+ * host attached the editor there, otherwise the page's own. `null` during server rendering.
4743
+ *
4744
+ * Custom chrome that adds document listeners, reads focus, or injects a `<style>` uses this
4745
+ * instead of the global `document`, which belongs to the window the script runs in. The value
4746
+ * changes when the editor moves to another window, so effects keyed on it re-bind.
4747
+ * Its `defaultView` is the editor's window, for timers, viewport size and the clipboard.
4748
+ *
4749
+ * @example
4750
+ * ```tsx
4751
+ * function ShortcutListener() {
4752
+ * const hostDocument = useEditorHostDocument();
4753
+ * useEffect(() => {
4754
+ * if (!hostDocument) return;
4755
+ * hostDocument.addEventListener('keydown', onShortcut);
4756
+ * return () => hostDocument.removeEventListener('keydown', onShortcut);
4757
+ * }, [hostDocument]);
4758
+ * return null;
4759
+ * }
4760
+ * ```
4761
+ *
4762
+ * @public
4763
+ */
4764
+ declare function useEditorHostDocument(): UseEditorHostDocumentReturn;
4765
+
4081
4766
  /**
4082
4767
  * Highlight text ranges as the named set while the component is mounted, and keep them
4083
4768
  * current as the document changes. Returns what the last application resolved.
@@ -4956,5 +5641,5 @@ interface UseHistoryGroupReturn {
4956
5641
  /** Bind a control's native gesture lifecycle. Apply values through the existing command hooks. @public */
4957
5642
  declare function useHistoryGroup({ kind }: HistoryGroupBindingOptions): UseHistoryGroupReturn;
4958
5643
 
4959
- export { CONTENT_CONTROL_SLOTS, ContextMenuCellVerticalAlignment, ContextMenuCopy, ContextMenuCopyFormatting, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, ContextMenuPaste, ContextMenuPasteFormatting, ContextMenuPasteWithoutFormatting, ContextMenuRefreshToc, ContextMenuRefreshTocPageNumbers, ContextMenuSelectAll, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, DocxEditorContentControlWidget, DocxEditorContextMenu, DocxEditorDocumentOutline, DocxEditorEquation, DocxEditorExportDialog, DocxEditorFontNotice, DocxEditorHeaderFooterChrome, DocxEditorHorizontalRuler, DocxEditorHyperLink, DocxEditorImageAltTextPopup, DocxEditorImagePropertiesDialog, DocxEditorInvalidTextFormFieldDialog, DocxEditorLoading, DocxEditorLoadingSpinner, DocxEditorMenu, DocxEditorNavigation, DocxEditorNotePreview, DocxEditorNotePropertiesDialog, DocxEditorNotesChrome, DocxEditorNotesContextMenu, DocxEditorPageNumber, DocxEditorPageSetupDialog, DocxEditorParagraphDialog, DocxEditorPrintDialog, DocxEditorRevisionMarkup, DocxEditorRevisionMarkupDialog, DocxEditorRoot, DocxEditorShell, DocxEditorTextFormFieldDialog, DocxEditorToolbar, DocxEditorVerticalRuler, DocxEditorViewport, HorizontalRuler, ImageAltText, ImageInsertProvider, ImageInsertTrigger, ImagePropertiesTrigger, ImageWrap, LocaleProvider, Logo, MenuBar, NAVIGATION_PANE_GAP, NAVIGATION_PANE_INSET, NAVIGATION_PANE_MIN_PAGE_ROOM, NAVIGATION_PANE_WIDTH, NavigationClose, NavigationFind, NavigationHeader, NavigationHeadings, NavigationTab, NavigationTabs, NavigationTitle, NavigationToggle, OUTLINE_BUTTON_LEFT_OFFSET, OUTLINE_BUTTON_RESERVED_SPACE, OUTLINE_LEFT_OFFSET, OUTLINE_RESERVED_SPACE, PageIndicator, PageNumberTranslationContext, PaginatedDocxEditor, PaginatedDocxEditorShell, REVIEW_MARKERS_GUTTER, REVIEW_PANE_GUTTER, RULER_WIDTH, ReviewRailContext, Slot, TitleBar, TitleBarRight, Toolbar, ToolbarButton, ToolbarContext, ToolbarGroup, ToolbarImageProperties, VERSION, VerticalRuler, definePopup, editorStateActiveSubscriptionCount, isFieldLink, navigationPaneOverlays, navigationPaneReservation, navigationShift, normalizeImageBytes, notificationYieldsToTask, useProvidedDocxEditor as provideDocxEditor, reviewGutter, useChromeTranslate, useContentControl, useContentControlInstance, useContentControlWidget, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHighlightAt, useHighlights, useHistoryGroup, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, usePageSetupDialog, useParagraphDialog, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useRevisionMarkupDialog, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useTextFormFieldDialog, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };
4960
- export type { ChromeTranslate, ContentControlActionProps, ContentControlInspectorState, ContentControlLock, ContentControlPartProps, ContentControlProps, ContentControlSlotId, ContentControlWidgetDayProps, ContentControlWidgetEntry, ContentControlWidgetItemProps, ContentControlWidgetPictureProps, ContextMenuAnchor, ContextMenuCommandProps, ContextMenuContextValue, ContextMenuItemProps, ContextMenuTableRowProps, DialogCustomizationProps, DialogPartProps, DocxEditorAuthorStyleProps, DocxEditorChildren, DocxEditorContentControlNamespace, DocxEditorContentControlWidgetNamespace, DocxEditorContentControlWidgetPartProps, DocxEditorContentControlWidgetProps, DocxEditorContentProps, DocxEditorContextMenuNamespace, DocxEditorContextMenuProps, DocxEditorDocumentOutlineProps, DocxEditorExportDialogProps, DocxEditorFontNoticeProps, DocxEditorHeaderFooterChromeProps, DocxEditorHyperLinkNamespace, DocxEditorImageAltTextPopupProps, DocxEditorImagePropertiesDialogProps, DocxEditorInvalidTextFormFieldDialogProps, DocxEditorLoadingComponent, DocxEditorLoadingProps, DocxEditorLoadingSpinnerProps, DocxEditorMenuNamespace, DocxEditorMenuProps, DocxEditorNamespace, DocxEditorNavigationNamespace, DocxEditorNavigationProps, DocxEditorNotePreviewProps, DocxEditorNotePropertiesDialogProps, DocxEditorNotesChromeProps, DocxEditorNotesContextMenuProps, DocxEditorPageNumberProps, DocxEditorPageSetupDialogProps, DocxEditorParagraphDialogProps, DocxEditorPopup, DocxEditorPopups, DocxEditorPrintDialogProps, DocxEditorProps, DocxEditorRef, DocxEditorRevisionMarkupDialogProps, DocxEditorRevisionMarkupProps, DocxEditorRootListeners, DocxEditorRootProps, DocxEditorRulerProps, DocxEditorTextFormFieldDialogProps, DocxEditorToolbarGroupProps, DocxEditorToolbarNamespace, DocxEditorToolbarProps, DocxEditorToolbarSlotProps, DocxEditorViewportProps, DocxFontOrigin, DocxFontsInput, DocxFontsSource, DocxSource, EditorCaret, EditorCommandState, EditorMode, EditorValueCommandState, FontFamilyItemProps, FontFamilyNamespace, FontFamilyPartProps, FontFamilyProps, FontsInput, HeaderFooterState, HorizontalRulerProps$1 as HorizontalRulerProps, HyperLinkActionProps, HyperLinkPartProps, HyperLinkProps, HyperlinkPopupAnchor, HyperlinkPopupMode, HyperlinkPopupState, ImagePropertiesTriggerProps, IndentUpdate, LocaleProviderProps, MaybeRefOrGetter, MenuActionProps, MenuGroupProps, MenuId, MenuItemBaseProps, MenuItemProps, MenuPartComponent, MenuProps, MenuReportIssueProps, MenuReviewersProps, MenuRowProps, MenuSeparatorProps, MenuSubmenuBaseProps, MenuSubmenuProps, MenuTableGridProps, NavigationPartProps, NavigationShiftInput, NavigationTabProps, NavigationTab$1 as NavigationTabValue, NormalizedImagePayload, NotePropertiesState, OutlineHeading$1 as OutlineHeading, OutlineHeadingItem, PageIndicatorProps, PageSetupDialogFields, PageSetupUpdate, PaginatedDocxEditorExpose, PaginatedDocxEditorHandle, PaginatedDocxEditorProps, PaginatedDocxEditorShellProps, ParagraphStyleItemProps, ParagraphStyleNamespace, ParagraphStyleOption, ParagraphStylePartProps, ParagraphStyleProps, ProvideDocxEditorResult, ReviewGutter, ReviewGutterInput, ReviewRailRegistry, ScopedChromeAnchor, SlotProps, TableBorderColorNamespace, TableBorderStyleNamespace, TableBorderTargetNamespace, TableBorderWidthNamespace, TableCellFillNamespace, TableChromeItemProps, TableChromePartComponent, TableChromePartProps, TextFormFieldDialogFields, ToolbarActionProps, ToolbarAlignmentComponent, ToolbarButtonProps$1 as ToolbarButtonProps, ToolbarContextValue, ToolbarPartComponent, ToolbarPartProps, ToolbarProps, ToolbarReviewersProps, ToolbarSeparatorProps, ToolbarSlotPartComponent, ToolbarSlotPartProps, ToolbarTranslate, UseContentControlResult, UseContentControlWidgetResult, UseDialogReturn, UseDocumentOutlineResult, UseDocumentSearchOptions, UseDocumentSearchResult, UseDocxSourceOptions, UseDocxSourceResult, UseFontFamilyResult, UseHistoryGroupReturn, UseHyperlinkPopupResult, UseNavigationPaneOptions, UseNavigationPaneResult, UsePageSetupDialogReturn, UsePageSetupReturn, UseParagraphDialogReturn, UseParagraphFormatReturn, UseParagraphIndentReturn, UseParagraphStyleResult, UseRevisionMarkupDialogReturn, UseTextFormFieldDialogReturn, UseZoomResult, VerticalRulerProps };
5644
+ export { CONTENT_CONTROL_SLOTS, ContextMenuCellVerticalAlignment, ContextMenuCopy, ContextMenuCopyFormatting, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, ContextMenuPaste, ContextMenuPasteFormatting, ContextMenuPasteWithoutFormatting, ContextMenuRefreshToc, ContextMenuRefreshTocPageNumbers, ContextMenuSelectAll, DEFAULT_WATERMARK_PRESETS, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, DocxEditorBookmarkDialog, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, DocxEditorContentControlWidget, DocxEditorContextMenu, DocxEditorDocumentOutline, DocxEditorEquation, DocxEditorExportDialog, DocxEditorFontNotice, DocxEditorHeaderFooterChrome, DocxEditorHorizontalRuler, DocxEditorHyperLink, DocxEditorImageAltTextPopup, DocxEditorImageInsertErrorDialog, DocxEditorImagePropertiesDialog, DocxEditorInvalidTextFormFieldDialog, DocxEditorLoading, DocxEditorLoadingSpinner, DocxEditorMenu, DocxEditorNavigation, DocxEditorNotePreview, DocxEditorNotePropertiesDialog, DocxEditorNotesChrome, DocxEditorNotesContextMenu, DocxEditorOpenFailure, DocxEditorOpenFailureAction, DocxEditorPageNumber, DocxEditorPageSetupDialog, DocxEditorParagraphDialog, DocxEditorPrintDialog, DocxEditorRevisionMarkup, DocxEditorRevisionMarkupDialog, DocxEditorRoot, DocxEditorShell, DocxEditorTextFormFieldDialog, DocxEditorToolbar, DocxEditorVerticalRuler, DocxEditorViewport, DocxEditorWatermarkDialog, DocxEditorWindow, HorizontalRuler, ImageAltText, ImageInsertProvider, ImageInsertTrigger, ImagePropertiesTrigger, ImageWrap, LocaleProvider, Logo, MenuBar, NAVIGATION_PANE_GAP, NAVIGATION_PANE_INSET, NAVIGATION_PANE_MIN_PAGE_ROOM, NAVIGATION_PANE_WIDTH, NavigationClose, NavigationFind, NavigationGoTo, NavigationHeader, NavigationHeadings, NavigationTab, NavigationTabs, NavigationTitle, NavigationToggle, OUTLINE_BUTTON_LEFT_OFFSET, OUTLINE_BUTTON_RESERVED_SPACE, OUTLINE_LEFT_OFFSET, OUTLINE_RESERVED_SPACE, PageIndicator, PageNumberTranslationContext, PaginatedDocxEditor, PaginatedDocxEditorShell, REVIEW_MARKERS_GUTTER, REVIEW_PANE_GUTTER, RULER_WIDTH, ReviewRailContext, Slot, TitleBar, TitleBarRight, Toolbar, ToolbarButton, ToolbarContext, ToolbarGroup, ToolbarImageProperties, VERSION, VerticalRuler, definePopup, editorStateActiveSubscriptionCount, isFieldLink, navigationPaneOverlays, navigationPaneReservation, navigationShift, normalizeImageBytes, notificationYieldsToTask, useProvidedDocxEditor as provideDocxEditor, reviewGutter, useBookmarkDialog, useBookmarks, useChromeTranslate, useCommentDraftRequest, useContentControl, useContentControlInstance, useContentControlWidget, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorHostDocument, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useGoToBookmark, useHeaderFooterState, useHighlightAt, useHighlights, useHistoryGroup, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, useOpenFailure, usePageSetup, usePageSetupDialog, useParagraphDialog, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useRevisionMarkupDialog, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useTextFormFieldDialog, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useWatermark, useWatermarkDialog, useZoom };
5645
+ export type { BookmarkDialogFields, ChromeTranslate, ContentControlActionProps, ContentControlInspectorState, ContentControlLock, ContentControlPartProps, ContentControlProps, ContentControlSlotId, ContentControlWidgetDayProps, ContentControlWidgetEntry, ContentControlWidgetItemProps, ContentControlWidgetPictureProps, ContextMenuAnchor, ContextMenuCommandProps, ContextMenuContextValue, ContextMenuItemProps, ContextMenuTableRowProps, DialogCustomizationProps, DialogPartProps, DocxEditorAuthorStyleProps, DocxEditorBookmarkDialogProps, DocxEditorChildren, DocxEditorContentControlNamespace, DocxEditorContentControlWidgetNamespace, DocxEditorContentControlWidgetPartProps, DocxEditorContentControlWidgetProps, DocxEditorContentProps, DocxEditorContextMenuNamespace, DocxEditorContextMenuProps, DocxEditorDocumentOutlineProps, DocxEditorExportDialogProps, DocxEditorFontNoticeProps, DocxEditorHeaderFooterChromeProps, DocxEditorHyperLinkNamespace, DocxEditorImageAltTextPopupProps, DocxEditorImageInsertErrorDialogProps, DocxEditorImagePropertiesDialogProps, DocxEditorInvalidTextFormFieldDialogProps, DocxEditorLoadingComponent, DocxEditorLoadingProps, DocxEditorLoadingSpinnerProps, DocxEditorMenuNamespace, DocxEditorMenuProps, DocxEditorNamespace, DocxEditorNavigationNamespace, DocxEditorNavigationProps, DocxEditorNotePreviewProps, DocxEditorNotePropertiesDialogProps, DocxEditorNotesChromeProps, DocxEditorNotesContextMenuProps, DocxEditorOpenFailureActionProps, DocxEditorOpenFailureComponent, DocxEditorOpenFailureContext, DocxEditorOpenFailureMessage, DocxEditorOpenFailureProps, DocxEditorPageNumberProps, DocxEditorPageSetupDialogProps, DocxEditorParagraphDialogProps, DocxEditorPopup, DocxEditorPopups, DocxEditorPrintDialogProps, DocxEditorProps, DocxEditorRef, DocxEditorRevisionMarkupDialogProps, DocxEditorRevisionMarkupProps, DocxEditorRootListeners, DocxEditorRootProps, DocxEditorRulerProps, DocxEditorTextFormFieldDialogProps, DocxEditorToolbarGroupProps, DocxEditorToolbarNamespace, DocxEditorToolbarProps, DocxEditorToolbarSlotProps, DocxEditorViewportProps, DocxEditorWatermarkDialogProps, DocxEditorWindowProps, DocxFontOrigin, DocxFontsInput, DocxFontsSource, DocxSource, EditorCaret, EditorCommandState, EditorMode, EditorValueCommandState, FontFamilyItemProps, FontFamilyNamespace, FontFamilyPartProps, FontFamilyProps, FontsInput, GoToBookmarkProblem, HeaderFooterState, HorizontalRulerProps$1 as HorizontalRulerProps, HyperLinkActionProps, HyperLinkPartProps, HyperLinkProps, HyperlinkPopupAnchor, HyperlinkPopupMode, HyperlinkPopupState, ImagePropertiesTriggerProps, IndentUpdate, LocaleProviderProps, MaybeRefOrGetter, MenuActionProps, MenuGroupProps, MenuId, MenuItemBaseProps, MenuItemProps, MenuPartComponent, MenuProps, MenuReportIssueProps, MenuReviewersProps, MenuRowProps, MenuSeparatorProps, MenuSubmenuBaseProps, MenuSubmenuProps, MenuTableGridProps, NavigationPartProps, NavigationShiftInput, NavigationTabProps, NavigationTab$1 as NavigationTabValue, NormalizedImagePayload, NotePropertiesState, OutlineHeading$1 as OutlineHeading, OutlineHeadingItem, PageIndicatorProps, PageSetupDialogFields, PageSetupUpdate, PaginatedDocxEditorExpose, PaginatedDocxEditorHandle, PaginatedDocxEditorProps, PaginatedDocxEditorShellProps, ParagraphStyleItemProps, ParagraphStyleNamespace, ParagraphStyleOption, ParagraphStylePartProps, ParagraphStyleProps, ProvideDocxEditorResult, ReviewGutter, ReviewGutterInput, ReviewRailRegistry, ScopedChromeAnchor, SlotProps, TableBorderColorNamespace, TableBorderStyleNamespace, TableBorderTargetNamespace, TableBorderWidthNamespace, TableCellFillNamespace, TableChromeItemProps, TableChromePartComponent, TableChromePartProps, TextFormFieldDialogFields, ToolbarActionProps, ToolbarAlignmentComponent, ToolbarButtonProps$1 as ToolbarButtonProps, ToolbarContextValue, ToolbarPartComponent, ToolbarPartProps, ToolbarProps, ToolbarReviewersProps, ToolbarSeparatorProps, ToolbarSlotPartComponent, ToolbarSlotPartProps, ToolbarTranslate, UseBookmarkDialogReturn, UseBookmarksReturn, UseContentControlResult, UseContentControlWidgetResult, UseDialogReturn, UseDocumentOutlineResult, UseDocumentSearchOptions, UseDocumentSearchResult, UseDocxSourceOptions, UseDocxSourceResult, UseEditorHostDocumentReturn, UseFontFamilyResult, UseGoToBookmarkOptions, UseGoToBookmarkReturn, UseHistoryGroupReturn, UseHyperlinkPopupResult, UseNavigationPaneOptions, UseNavigationPaneResult, UseOpenFailureOptions, UseOpenFailureReturn, UsePageSetupDialogReturn, UsePageSetupReturn, UseParagraphDialogReturn, UseParagraphFormatReturn, UseParagraphIndentReturn, UseParagraphStyleResult, UseRevisionMarkupDialogReturn, UseTextFormFieldDialogReturn, UseWatermarkDialogReturn, UseWatermarkReturn, UseZoomResult, VerticalRulerProps, WatermarkDialogFieldName, WatermarkDialogFields, WatermarkDialogKind, WatermarkDialogLayout };