@docx-editor.dev/react 2.21.0 → 2.22.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
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import react__default, { ReactNode, ReactElement, CSSProperties, ComponentType, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
2
+ import react__default, { ReactNode, CSSProperties, ReactElement, ComponentType, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
3
+ import { ChromeExportFormat, InvalidTextFormFieldSession, ContentControlWidgetSession, CalendarMonth, ContentControlListNavigation, CalendarDay, TextFormFieldDialogSession, RevisionAuthorStyle, ParagraphDialogFields, ParagraphDialogMixed, ChromeMenuId, ChromeSlotId, ChromeMenuEntry, DocxEditorInstance, FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, SupportedImageMime, TableChromeSlotId, ChromeExportHandlers, SurfaceHyperlink, FontOrigin, MarkedFontResolver, ReviewAuthorInfo, EditorCommandExecute, ToolbarValueMap, ParagraphFormatRead, ParagraphFormatUpdate, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent, HistoryGroupBindingOptions } from '@docx-editor.dev/core/editor';
4
+ export { CHROME_GROUPS, CHROME_MENUS, ChromeExportFormat, ChromeExportHandlers, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, ClearRefreshHighlightsOptions, DocumentRefresh, DocumentRefreshError, DocumentRefreshState, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontOrigin, FontResolutionRequest, FontResolver, FontResolverMark, FontUrlSource, 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, ReviewAuthorInfo, RevisionAuthorAssignments, RevisionAuthorStyle, RevisionStyles, RulerTick, RulerUnit, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, composeFontOrigins, createDocumentRefresh, createFontSource, defineFontResolver, generateRulerTicks, isFontResolver, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
3
5
  import { Editor, ViewScope, EditorCommand, DocumentSource, FontConfiguration, ZoomMode, DocumentChange, EditorFontError, TextMatch, DocumentHandle, EditorExecOptions, ExecResult, EditorScope, EditorSnapshot, EditorEvents, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
4
6
  export { Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, PageSetup } from '@docx-editor.dev/core/contracts/editor';
5
- import { InvalidTextFormFieldSession, ContentControlWidgetSession, CalendarMonth, ContentControlListNavigation, CalendarDay, TextFormFieldDialogSession, RevisionAuthorStyle, ParagraphDialogFields, ParagraphDialogMixed, ChromeMenuId, ChromeSlotId, ChromeMenuEntry, DocxEditorInstance, FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, SupportedImageMime, TableChromeSlotId, SurfaceHyperlink, FontOrigin, MarkedFontResolver, ReviewAuthorInfo, EditorCommandExecute, ToolbarValueMap, ParagraphFormatRead, ParagraphFormatUpdate, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent, HistoryGroupBindingOptions } from '@docx-editor.dev/core/editor';
6
- export { CHROME_GROUPS, CHROME_MENUS, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontOrigin, FontResolutionRequest, FontResolver, FontResolverMark, FontUrlSource, ImageWrapTarget, LOADING_SNAPSHOT, LoadFontsRequest, LoadFontsResult, MAX_RESOLVER_FAMILIES, MarkedFontResolver, PX_PER_CM, PX_PER_INCH, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, ParagraphTabStop, ReviewAuthorInfo, RevisionAuthorAssignments, RevisionAuthorStyle, RevisionStyles, RulerTick, RulerUnit, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, composeFontOrigins, createFontSource, defineFontResolver, generateRulerTicks, isFontResolver, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
7
7
  import { TFunction, Translations, LocaleStrings } from '@docx-editor.dev/i18n';
8
8
  export { TranslationKey } from '@docx-editor.dev/i18n';
9
9
  import { ContentControlType, ContentControlSummary } from '@docx-editor.dev/core';
@@ -25,6 +25,58 @@ type MaybeRefOrGetter<T> = T;
25
25
  */
26
26
  type DocxEditorChildren = ReactNode;
27
27
 
28
+ /** State and presentation for the File menu export dialog. @public */
29
+ interface DocxEditorExportDialogProps {
30
+ /** Controls visibility when rendering the dialog directly. */
31
+ open: boolean;
32
+ /** The format selected in File > Export. */
33
+ format: ChromeExportFormat;
34
+ /** True while conversion runs. Closing the dialog does not cancel conversion. */
35
+ pending: boolean;
36
+ /** Localized failure text, or an empty string while conversion runs. */
37
+ error: string;
38
+ /** Dismisses feedback without canceling the export. */
39
+ onClose(): void;
40
+ /** Additional class on the dialog element. */
41
+ className?: string;
42
+ /** Inline styles on the dialog element. */
43
+ style?: CSSProperties;
44
+ /** Replaces the default contents while retaining the modal and focus behavior. */
45
+ children?: DocxEditorChildren;
46
+ }
47
+ /** Default progress and error dialog for `popups.export`. @public */
48
+ declare function DocxEditorExportDialog({ open, format, pending, error, onClose, className, style, children, }: DocxEditorExportDialogProps): react.JSX.Element | null;
49
+
50
+ /** State and presentation for the File menu print dialog. @public */
51
+ interface DocxEditorPrintDialogProps {
52
+ /** Controls visibility when rendering the dialog directly. */
53
+ open: boolean;
54
+ /** True while the PDF handler converts the document. */
55
+ pending: boolean;
56
+ /** Localized failure text, or an empty string. */
57
+ error: string;
58
+ /**
59
+ * An object URL for the converted PDF when printing failed after conversion, such as in a
60
+ * browser without a PDF viewer. Otherwise an empty string. The default dialog links only
61
+ * to `blob:` URLs.
62
+ */
63
+ url: string;
64
+ /** Closes the dialog. While `pending` is true, closing also cancels printing. */
65
+ onClose(): void;
66
+ /** Additional class on the dialog element. */
67
+ className?: string;
68
+ /** Inline styles on the dialog element. */
69
+ style?: CSSProperties;
70
+ /** Replaces the default contents while retaining the modal and focus behavior. */
71
+ children?: DocxEditorChildren;
72
+ }
73
+ /**
74
+ * Default progress and error dialog for `popups.print`. The editor closes it when the
75
+ * browser print dialog opens.
76
+ * @public
77
+ */
78
+ declare function DocxEditorPrintDialog({ open, pending, error, url, onClose, className, style, children, }: DocxEditorPrintDialogProps): react.JSX.Element | null;
79
+
28
80
  /** Note hover preview content and viewport coordinates. @public */
29
81
  interface DocxEditorNotePreviewProps {
30
82
  scopeId: string;
@@ -642,28 +694,28 @@ declare function usePageSetupDialog(): UsePageSetupDialogReturn;
642
694
  /** Page Setup with replaceable controls and layout. @public */
643
695
  declare const DocxEditorPageSetupDialog: typeof PageSetupDialogRoot & {
644
696
  Header: (props: DialogPartProps & {
645
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
697
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
646
698
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
647
699
  Title: (props: DialogPartProps & {
648
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
700
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
649
701
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
650
702
  Body: (props: DialogPartProps & {
651
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
703
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
652
704
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
653
705
  Footer: (props: DialogPartProps & {
654
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
706
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
655
707
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
656
708
  Apply: (props: DialogPartProps & {
657
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
709
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
658
710
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
659
711
  Cancel: (props: DialogPartProps & {
660
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
712
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
661
713
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
662
714
  Error: (props: DialogPartProps & {
663
- name?: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
715
+ name?: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop" | undefined;
664
716
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
665
717
  Field: (props: DialogPartProps & {
666
- name: "pageSize" | "orientation" | "scope" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop";
718
+ name: "scope" | "orientation" | "pageSize" | "marginLeft" | "marginRight" | "marginBottom" | "marginTop";
667
719
  }) => react.ReactNode;
668
720
  };
669
721
 
@@ -690,28 +742,28 @@ declare function useParagraphDialog(): UseParagraphDialogReturn;
690
742
  /** Paragraph Options with replaceable controls and layout. @public */
691
743
  declare const DocxEditorParagraphDialog: typeof ParagraphDialogRoot & {
692
744
  Header: (props: DialogPartProps & {
693
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
745
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
694
746
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
695
747
  Title: (props: DialogPartProps & {
696
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
748
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
697
749
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
698
750
  Body: (props: DialogPartProps & {
699
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
751
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
700
752
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
701
753
  Footer: (props: DialogPartProps & {
702
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
754
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
703
755
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
704
756
  Apply: (props: DialogPartProps & {
705
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
757
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
706
758
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
707
759
  Cancel: (props: DialogPartProps & {
708
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
760
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
709
761
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
710
762
  Error: (props: DialogPartProps & {
711
- name?: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
763
+ name?: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue" | undefined;
712
764
  }) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null;
713
765
  Field: (props: DialogPartProps & {
714
- name: "alignment" | "special" | "spaceBefore" | "spaceAfter" | "contextualSpacing" | "keepNext" | "keepLines" | "widowControl" | "pageBreakBefore" | "tabStops" | "lineRule" | "indentLeft" | "indentRight" | "specialBy" | "lineValue";
766
+ name: "keepNext" | "keepLines" | "pageBreakBefore" | "widowControl" | "contextualSpacing" | "alignment" | "spaceBefore" | "spaceAfter" | "lineRule" | "tabStops" | "special" | "indentLeft" | "indentRight" | "specialBy" | "lineValue";
715
767
  }) => react.ReactNode;
716
768
  };
717
769
 
@@ -877,6 +929,25 @@ declare function useToolbarLabel(): (key: string) => string;
877
929
  */
878
930
  type MenuId = ChromeMenuId | (string & {});
879
931
 
932
+ /** Props for `DocxEditor.Menu.TableGrid`. @public */
933
+ interface MenuTableGridProps {
934
+ /** The slot the picked size dispatches through. Defaults to `table.insert`. */
935
+ slot?: ChromeSlotId;
936
+ className?: string;
937
+ }
938
+ /**
939
+ * Word's insert-table size picker: a 6×6 grid that highlights as the pointer sweeps it
940
+ * and reads back the size underneath.
941
+ *
942
+ * Rendered only when the engine will honour an insert (see `MenuTablePicker`). A panel
943
+ * that opens onto a grid nothing can be picked from is worse than no panel: the row
944
+ * cannot act, so it should not disclose — it should look disabled, like every other row
945
+ * the engine refuses.
946
+ *
947
+ * @public
948
+ */
949
+ declare function MenuTableGrid({ slot, className }: MenuTableGridProps): react.JSX.Element;
950
+
880
951
  /** Props for `DocxEditor.Menu.Row`: one presentational menu row. @public */
881
952
  interface MenuRowProps {
882
953
  /** Material Symbols paths, rendered as inline SVG in the row's icon column. */
@@ -989,6 +1060,18 @@ declare const MenuOpen: (({ className, hidden }: MenuActionProps) => react.JSX.E
989
1060
  declare const MenuSave: (({ className, hidden }: MenuActionProps) => react.JSX.Element | null) & {
990
1061
  docxSlot: ChromeSlotId;
991
1062
  };
1063
+ /** Exports continuous Markdown through the menu handler. @public */
1064
+ declare const MenuExportMarkdown: (({ className, hidden }: MenuActionProps) => react.JSX.Element | null) & {
1065
+ docxSlot: ChromeSlotId;
1066
+ };
1067
+ /** Exports PDF through the menu handler. @public */
1068
+ declare const MenuExportPdf: (({ className, hidden }: MenuActionProps) => react.JSX.Element | null) & {
1069
+ docxSlot: ChromeSlotId;
1070
+ };
1071
+ /** Prints through the menu's PDF handler. @public */
1072
+ declare const MenuPrint: (({ className, hidden }: MenuActionProps) => react.JSX.Element | null) & {
1073
+ docxSlot: ChromeSlotId;
1074
+ };
992
1075
  /**
993
1076
  * Page setup. Unlike open and save, the ENGINE has an opinion here — `setPageSetup` is a
994
1077
  * real command, it just needs the dialog's values — so the row asks through the slot's
@@ -1021,24 +1104,6 @@ interface MenuSubmenuProps {
1021
1104
  * @public
1022
1105
  */
1023
1106
  declare function MenuSubmenu({ labelKey, paths, className, children }: MenuSubmenuProps): react.JSX.Element;
1024
- /** Props for `DocxEditor.Menu.TableGrid`. @public */
1025
- interface MenuTableGridProps {
1026
- /** The slot the picked size dispatches through. Defaults to `table.insert`. */
1027
- slot?: ChromeSlotId;
1028
- className?: string;
1029
- }
1030
- /**
1031
- * Word's insert-table size picker: a 6×6 grid that highlights as the pointer sweeps it
1032
- * and reads back the size underneath.
1033
- *
1034
- * Rendered only when the engine will honour an insert (see `MenuTablePicker`). A panel
1035
- * that opens onto a grid nothing can be picked from is worse than no panel: the row
1036
- * cannot act, so it should not disclose — it should look disabled, like every other row
1037
- * the engine refuses.
1038
- *
1039
- * @public
1040
- */
1041
- declare function MenuTableGrid({ slot, className }: MenuTableGridProps): react.JSX.Element;
1042
1107
  /** Props for `DocxEditor.Menu.Separator`. @public */
1043
1108
  interface MenuSeparatorProps {
1044
1109
  className?: string;
@@ -1048,12 +1113,11 @@ declare function MenuSeparator({ className }: MenuSeparatorProps): react.JSX.Ele
1048
1113
  /**
1049
1114
  * One registry entry as its row.
1050
1115
  *
1051
- * The three host-boundary slots route to their pinned parts rather than to the generic
1052
- * `MenuItem`, because a command-driven row would render them permanently disabled — the
1053
- * engine reports, correctly, that neither open nor save is a command.
1116
+ * Host actions use their pinned parts because they are not editing commands.
1054
1117
  */
1055
- declare function MenuEntry({ entry }: {
1118
+ declare function MenuEntry({ entry, children }: {
1056
1119
  entry: ChromeMenuEntry;
1120
+ children?: ReactNode;
1057
1121
  }): react.JSX.Element;
1058
1122
  /** Props for `DocxEditor.Menu.Menu` and the five pinned menu parts. @public */
1059
1123
  interface MenuProps {
@@ -1417,6 +1481,10 @@ declare function useContextMenuTarget(): HTMLElement | null;
1417
1481
 
1418
1482
  /** Render overrides for automatically mounted editor popups. `false` disables automatic rendering. @public */
1419
1483
  interface DocxEditorPopups {
1484
+ /** File export progress and errors. False hides feedback without stopping conversion. */
1485
+ export?: DocxEditorPopup<DocxEditorExportDialogProps>;
1486
+ /** File print progress and errors. False hides feedback; printing still runs. */
1487
+ print?: DocxEditorPopup<DocxEditorPrintDialogProps>;
1420
1488
  contentControlWidget?: DocxEditorPopup<DocxEditorContentControlWidgetProps>;
1421
1489
  /**
1422
1490
  * Renderer for checkbox presses. Omitted, the engine toggles the box itself and
@@ -2120,6 +2188,11 @@ declare const MenuReview: MenuPartComponent;
2120
2188
 
2121
2189
  /** Props for `DocxEditor.Menu`. @public */
2122
2190
  interface DocxEditorMenuProps {
2191
+ /**
2192
+ * Converter handlers. Markdown requires docx-to-markdown; PDF requires docx-to-pdf on Node.js.
2193
+ * File > Print also uses the PDF handler. Missing handlers show an error.
2194
+ */
2195
+ exporters?: ChromeExportHandlers;
2123
2196
  /** Appended after the base `docx-menubar` class. */
2124
2197
  className?: string;
2125
2198
  /** i18n resolver for row labels; without it the raw keys show (never English). */
@@ -2184,6 +2257,9 @@ interface DocxEditorMenuNamespace {
2184
2257
  readonly Entry: typeof MenuEntry;
2185
2258
  readonly Open: typeof MenuOpen;
2186
2259
  readonly Save: typeof MenuSave;
2260
+ readonly ExportMarkdown: typeof MenuExportMarkdown;
2261
+ readonly ExportPdf: typeof MenuExportPdf;
2262
+ readonly Print: typeof MenuPrint;
2187
2263
  readonly PageSetup: typeof MenuPageSetup;
2188
2264
  /** Insert › Image, so a host can hide it or place it elsewhere by name. */
2189
2265
  readonly ImageInsert: typeof MenuImageInsert;
@@ -2628,7 +2704,7 @@ interface DocxEditorProps {
2628
2704
  * HarfBuzz and measures line and page breaks from real font metrics. Without it, layout
2629
2705
  * runs on a fixed monospace approximation: glyphs still paint in their true faces, so the
2630
2706
  * page looks right, but wrap points and pagination are estimated rather than
2631
- * Word-accurate. Omit it to mount in one line; supply it when breaks must match Word.
2707
+ * measured. Omit it to mount in one line; supply it when break positions matter.
2632
2708
  */
2633
2709
  fonts?: FontConfiguration | FontConfigurationFragment | FontResolver;
2634
2710
  /**
@@ -2878,6 +2954,10 @@ interface DocxEditorNamespace extends ForwardRefExoticComponent<DocxEditorProps
2878
2954
  * default; `navigation={false}` removes it.
2879
2955
  */
2880
2956
  readonly Navigation: typeof Navigation;
2957
+ /** File export progress and errors, configured through popups.export. */
2958
+ readonly ExportDialog: typeof DocxEditorExportDialog;
2959
+ /** File print progress and errors, configured through popups.print. */
2960
+ readonly PrintDialog: typeof DocxEditorPrintDialog;
2881
2961
  /** Page Setup dialog — size, orientation, margins — applied as one undo step. */
2882
2962
  readonly PageSetupDialog: typeof DocxEditorPageSetupDialog;
2883
2963
  /** The Paragraph dialog: alignment, indentation, spacing and the paragraph flags. */
@@ -4425,4 +4505,4 @@ interface UseHistoryGroupReturn {
4425
4505
  /** Bind a control's native gesture lifecycle. Apply values through the existing command hooks. @public */
4426
4506
  declare function useHistoryGroup({ kind }: HistoryGroupBindingOptions): UseHistoryGroupReturn;
4427
4507
 
4428
- export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, type ContentControlWidgetDayProps, type ContentControlWidgetEntry, type ContentControlWidgetItemProps, type ContentControlWidgetPictureProps, type ContextMenuAnchor, ContextMenuCellVerticalAlignment, type ContextMenuCommandProps, type ContextMenuContextValue, ContextMenuCopy, ContextMenuCopyFormatting, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, type ContextMenuItemProps, ContextMenuPaste, ContextMenuPasteFormatting, ContextMenuPasteWithoutFormatting, ContextMenuRefreshToc, ContextMenuRefreshTocPageNumbers, ContextMenuSelectAll, type ContextMenuTableRowProps, type DialogCustomizationProps, type DialogPartProps, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, type DocxEditorAuthorStyleProps, type DocxEditorChildren, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, DocxEditorContentControlWidget, type DocxEditorContentControlWidgetNamespace, type DocxEditorContentControlWidgetPartProps, type DocxEditorContentControlWidgetProps, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, DocxEditorEquation, DocxEditorFontNotice, type DocxEditorFontNoticeProps, DocxEditorHeaderFooterChrome, type DocxEditorHeaderFooterChromeProps, DocxEditorHorizontalRuler, DocxEditorHyperLink, type DocxEditorHyperLinkNamespace, DocxEditorImageAltTextPopup, type DocxEditorImageAltTextPopupProps, DocxEditorImagePropertiesDialog, type DocxEditorImagePropertiesDialogProps, DocxEditorInvalidTextFormFieldDialog, type DocxEditorInvalidTextFormFieldDialogProps, DocxEditorLoading, type DocxEditorLoadingComponent, type DocxEditorLoadingProps, DocxEditorLoadingSpinner, type DocxEditorLoadingSpinnerProps, DocxEditorMenu, type DocxEditorMenuNamespace, type DocxEditorMenuProps, type DocxEditorNamespace, DocxEditorNavigation, type DocxEditorNavigationNamespace, type DocxEditorNavigationProps, DocxEditorNotePreview, type DocxEditorNotePreviewProps, DocxEditorNotePropertiesDialog, type DocxEditorNotePropertiesDialogProps, DocxEditorNotesChrome, type DocxEditorNotesChromeProps, DocxEditorNotesContextMenu, type DocxEditorNotesContextMenuProps, DocxEditorPageNumber, type DocxEditorPageNumberProps, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, DocxEditorParagraphDialog, type DocxEditorParagraphDialogProps, type DocxEditorPopup, type DocxEditorPopups, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, type DocxEditorRootListeners, type DocxEditorRootProps, type DocxEditorRulerProps, DocxEditorShell, DocxEditorTextFormFieldDialog, type DocxEditorTextFormFieldDialogProps, DocxEditorToolbar, type DocxEditorToolbarNamespace, type DocxEditorToolbarProps, DocxEditorVerticalRuler, DocxEditorViewport, type DocxEditorViewportProps, type DocxFontOrigin, type DocxFontsInput, type DocxFontsSource, type DocxSource, type EditorCaret, type EditorCommandState, type EditorMode, type EditorValueCommandState, type FontFamilyItemProps, type FontFamilyNamespace, type FontFamilyPartProps, type FontFamilyProps, type FontsInput, type HeaderFooterState, HorizontalRuler, type HorizontalRulerProps$1 as HorizontalRulerProps, type HyperLinkActionProps, type HyperLinkPartProps, type HyperLinkProps, type HyperlinkPopupAnchor, type HyperlinkPopupMode, type HyperlinkPopupState, ImageAltText, ImageInsertProvider, ImageInsertTrigger, ImagePropertiesTrigger, type ImagePropertiesTriggerProps, ImageWrap, type IndentUpdate, LocaleProvider, type LocaleProviderProps, Logo, type MaybeRefOrGetter, type MenuActionProps, MenuBar, type MenuGroupProps, type MenuId, type MenuItemProps, type MenuPartComponent, type MenuProps, type MenuReportIssueProps, type MenuReviewersProps, type MenuRowProps, type MenuSeparatorProps, type MenuSubmenuProps, type MenuTableGridProps, NAVIGATION_PANE_GAP, NAVIGATION_PANE_INSET, NAVIGATION_PANE_WIDTH, NavigationClose, NavigationFind, NavigationHeader, NavigationHeadings, type NavigationPartProps, type NavigationShiftInput, NavigationTab, type NavigationTabProps, type NavigationTab$1 as NavigationTabValue, NavigationTabs, NavigationTitle, NavigationToggle, type NormalizedImagePayload, type NotePropertiesState, OUTLINE_BUTTON_LEFT_OFFSET, OUTLINE_BUTTON_RESERVED_SPACE, OUTLINE_LEFT_OFFSET, OUTLINE_RESERVED_SPACE, type OutlineHeading$1 as OutlineHeading, type OutlineHeadingItem, PageIndicator, type PageIndicatorProps, PageNumberTranslationContext, type PageSetupDialogFields, type PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, type ProvideDocxEditorResult, REVIEW_MARKERS_GUTTER, REVIEW_PANE_GUTTER, RULER_WIDTH, type ReviewGutter, type ReviewGutterInput, ReviewRailContext, type ReviewRailRegistry, SEARCH_DEBOUNCE_MS, SEARCH_MATCH_LIMIT, type ScopedChromeAnchor, Slot, type SlotProps, type TableBorderColorNamespace, type TableBorderStyleNamespace, type TableBorderTargetNamespace, type TableBorderWidthNamespace, type TableCellFillNamespace, type TableChromeItemProps, type TableChromePartComponent, type TableChromePartProps, type TextFormFieldDialogFields, TitleBar, TitleBarRight, Toolbar, type ToolbarActionProps, type ToolbarAlignmentComponent, ToolbarButton, type ToolbarButtonProps$1 as ToolbarButtonProps, ToolbarContext, type ToolbarContextValue, ToolbarGroup, ToolbarImageProperties, type ToolbarPartComponent, type ToolbarPartProps, type ToolbarProps, type ToolbarReviewersProps, type ToolbarSeparatorProps, type ToolbarSlotPartComponent, type ToolbarSlotPartProps, type ToolbarTranslate, type UseContentControlResult, type UseContentControlWidgetResult, type UseDialogReturn, type UseDocumentOutlineResult, type UseDocumentSearchResult, type UseDocxSourceOptions, type UseDocxSourceResult, type UseFontFamilyResult, type UseHistoryGroupReturn, type UseHyperlinkPopupResult, type UseNavigationPaneOptions, type UseNavigationPaneResult, type UsePageSetupDialogReturn, type UsePageSetupReturn, type UseParagraphDialogReturn, type UseParagraphFormatReturn, type UseParagraphIndentReturn, type UseParagraphStyleResult, type UseTextFormFieldDialogReturn, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, definePopup, editorStateActiveSubscriptionCount, isFieldLink, 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, useHistoryGroup, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, usePageSetupDialog, useParagraphDialog, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useTextFormFieldDialog, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };
4508
+ export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, type ContentControlWidgetDayProps, type ContentControlWidgetEntry, type ContentControlWidgetItemProps, type ContentControlWidgetPictureProps, type ContextMenuAnchor, ContextMenuCellVerticalAlignment, type ContextMenuCommandProps, type ContextMenuContextValue, ContextMenuCopy, ContextMenuCopyFormatting, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, type ContextMenuItemProps, ContextMenuPaste, ContextMenuPasteFormatting, ContextMenuPasteWithoutFormatting, ContextMenuRefreshToc, ContextMenuRefreshTocPageNumbers, ContextMenuSelectAll, type ContextMenuTableRowProps, type DialogCustomizationProps, type DialogPartProps, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, type DocxEditorAuthorStyleProps, type DocxEditorChildren, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, DocxEditorContentControlWidget, type DocxEditorContentControlWidgetNamespace, type DocxEditorContentControlWidgetPartProps, type DocxEditorContentControlWidgetProps, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, DocxEditorEquation, DocxEditorExportDialog, type DocxEditorExportDialogProps, DocxEditorFontNotice, type DocxEditorFontNoticeProps, DocxEditorHeaderFooterChrome, type DocxEditorHeaderFooterChromeProps, DocxEditorHorizontalRuler, DocxEditorHyperLink, type DocxEditorHyperLinkNamespace, DocxEditorImageAltTextPopup, type DocxEditorImageAltTextPopupProps, DocxEditorImagePropertiesDialog, type DocxEditorImagePropertiesDialogProps, DocxEditorInvalidTextFormFieldDialog, type DocxEditorInvalidTextFormFieldDialogProps, DocxEditorLoading, type DocxEditorLoadingComponent, type DocxEditorLoadingProps, DocxEditorLoadingSpinner, type DocxEditorLoadingSpinnerProps, DocxEditorMenu, type DocxEditorMenuNamespace, type DocxEditorMenuProps, type DocxEditorNamespace, DocxEditorNavigation, type DocxEditorNavigationNamespace, type DocxEditorNavigationProps, DocxEditorNotePreview, type DocxEditorNotePreviewProps, DocxEditorNotePropertiesDialog, type DocxEditorNotePropertiesDialogProps, DocxEditorNotesChrome, type DocxEditorNotesChromeProps, DocxEditorNotesContextMenu, type DocxEditorNotesContextMenuProps, DocxEditorPageNumber, type DocxEditorPageNumberProps, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, DocxEditorParagraphDialog, type DocxEditorParagraphDialogProps, type DocxEditorPopup, type DocxEditorPopups, DocxEditorPrintDialog, type DocxEditorPrintDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, type DocxEditorRootListeners, type DocxEditorRootProps, type DocxEditorRulerProps, DocxEditorShell, DocxEditorTextFormFieldDialog, type DocxEditorTextFormFieldDialogProps, DocxEditorToolbar, type DocxEditorToolbarNamespace, type DocxEditorToolbarProps, DocxEditorVerticalRuler, DocxEditorViewport, type DocxEditorViewportProps, type DocxFontOrigin, type DocxFontsInput, type DocxFontsSource, type DocxSource, type EditorCaret, type EditorCommandState, type EditorMode, type EditorValueCommandState, type FontFamilyItemProps, type FontFamilyNamespace, type FontFamilyPartProps, type FontFamilyProps, type FontsInput, type HeaderFooterState, HorizontalRuler, type HorizontalRulerProps$1 as HorizontalRulerProps, type HyperLinkActionProps, type HyperLinkPartProps, type HyperLinkProps, type HyperlinkPopupAnchor, type HyperlinkPopupMode, type HyperlinkPopupState, ImageAltText, ImageInsertProvider, ImageInsertTrigger, ImagePropertiesTrigger, type ImagePropertiesTriggerProps, ImageWrap, type IndentUpdate, LocaleProvider, type LocaleProviderProps, Logo, type MaybeRefOrGetter, type MenuActionProps, MenuBar, type MenuGroupProps, type MenuId, type MenuItemProps, type MenuPartComponent, type MenuProps, type MenuReportIssueProps, type MenuReviewersProps, type MenuRowProps, type MenuSeparatorProps, type MenuSubmenuProps, type MenuTableGridProps, NAVIGATION_PANE_GAP, NAVIGATION_PANE_INSET, NAVIGATION_PANE_WIDTH, NavigationClose, NavigationFind, NavigationHeader, NavigationHeadings, type NavigationPartProps, type NavigationShiftInput, NavigationTab, type NavigationTabProps, type NavigationTab$1 as NavigationTabValue, NavigationTabs, NavigationTitle, NavigationToggle, type NormalizedImagePayload, type NotePropertiesState, OUTLINE_BUTTON_LEFT_OFFSET, OUTLINE_BUTTON_RESERVED_SPACE, OUTLINE_LEFT_OFFSET, OUTLINE_RESERVED_SPACE, type OutlineHeading$1 as OutlineHeading, type OutlineHeadingItem, PageIndicator, type PageIndicatorProps, PageNumberTranslationContext, type PageSetupDialogFields, type PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, type ProvideDocxEditorResult, REVIEW_MARKERS_GUTTER, REVIEW_PANE_GUTTER, RULER_WIDTH, type ReviewGutter, type ReviewGutterInput, ReviewRailContext, type ReviewRailRegistry, SEARCH_DEBOUNCE_MS, SEARCH_MATCH_LIMIT, type ScopedChromeAnchor, Slot, type SlotProps, type TableBorderColorNamespace, type TableBorderStyleNamespace, type TableBorderTargetNamespace, type TableBorderWidthNamespace, type TableCellFillNamespace, type TableChromeItemProps, type TableChromePartComponent, type TableChromePartProps, type TextFormFieldDialogFields, TitleBar, TitleBarRight, Toolbar, type ToolbarActionProps, type ToolbarAlignmentComponent, ToolbarButton, type ToolbarButtonProps$1 as ToolbarButtonProps, ToolbarContext, type ToolbarContextValue, ToolbarGroup, ToolbarImageProperties, type ToolbarPartComponent, type ToolbarPartProps, type ToolbarProps, type ToolbarReviewersProps, type ToolbarSeparatorProps, type ToolbarSlotPartComponent, type ToolbarSlotPartProps, type ToolbarTranslate, type UseContentControlResult, type UseContentControlWidgetResult, type UseDialogReturn, type UseDocumentOutlineResult, type UseDocumentSearchResult, type UseDocxSourceOptions, type UseDocxSourceResult, type UseFontFamilyResult, type UseHistoryGroupReturn, type UseHyperlinkPopupResult, type UseNavigationPaneOptions, type UseNavigationPaneResult, type UsePageSetupDialogReturn, type UsePageSetupReturn, type UseParagraphDialogReturn, type UseParagraphFormatReturn, type UseParagraphIndentReturn, type UseParagraphStyleResult, type UseTextFormFieldDialogReturn, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, definePopup, editorStateActiveSubscriptionCount, isFieldLink, 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, useHistoryGroup, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, usePageSetupDialog, useParagraphDialog, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useTextFormFieldDialog, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };