@docx-editor.dev/react 2.12.0 → 2.13.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.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, CSSProperties, ReactElement, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
3
- import { RevisionAuthorStyle, DocxEditorInstance, FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, ChromeSlotId, SupportedImageMime, TableChromeSlotId, ChromeMenuId, ChromeMenuEntry, SurfaceHyperlink, ReviewAuthorInfo, ImageWrapTarget, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent } from '@docx-editor.dev/core/editor';
4
- export { CHROME_GROUPS, CHROME_MENUS, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontResolutionRequest, FontResolver, FontUrlSource, ImageWrapTarget, LOADING_SNAPSHOT, LoadFontsRequest, LoadFontsResult, MAX_RESOLVER_FAMILIES, PX_PER_CM, PX_PER_INCH, ReviewAuthorInfo, RevisionAuthorAssignments, RevisionAuthorStyle, RevisionStyles, RulerTick, RulerUnit, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, createFontSource, generateRulerTicks, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
3
+ import { RevisionAuthorStyle, DocxEditorInstance, FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, ChromeSlotId, SupportedImageMime, TableChromeSlotId, ChromeMenuId, ChromeMenuEntry, SurfaceHyperlink, FontOrigin, MarkedFontResolver, ReviewAuthorInfo, ImageWrapTarget, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent } from '@docx-editor.dev/core/editor';
4
+ 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, 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';
5
5
  import { DocumentSource, FontConfiguration, ZoomMode, Editor, DocumentChange, EditorFontError, TextMatch, ViewScope, DocumentHandle, EditorCommand, EditorScope, ExecResult, EditorSnapshot, EditorEvents, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
6
6
  export { Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, PageSetup } from '@docx-editor.dev/core/contracts/editor';
7
7
  import { TFunction, Translations, LocaleStrings } from '@docx-editor.dev/i18n';
@@ -2683,14 +2683,31 @@ declare function useHyperlinkPopupInstance(active?: boolean): UseHyperlinkPopupR
2683
2683
  /** A complete configuration, or a fragment this hook composes with the defaults. @public */
2684
2684
  type DocxFontsInput = FontConfiguration | FontConfigurationFragment;
2685
2685
  /**
2686
- * How a host supplies fonts: a value, a promise, or a function returning either.
2686
+ * How a host supplies fonts: one origin, or a list of them in precedence order.
2687
2687
  *
2688
- * The function form is the useful one — `{ fonts: defaultFonts }` from
2689
- * `@docx-editor.dev/fonts` — because it defers the work until the hook actually runs it.
2688
+ * `packagedFonts()` and `googleFonts()` are the useful ones — they resolve per document,
2689
+ * loading a family when the file names it or when it is that file's default face, rather
2690
+ * than loading every family they could serve. A list composes them first-wins:
2691
+ * `{ fonts: [packagedFonts(), googleFonts()] }` serves the bundled faces and reaches the
2692
+ * catalog only for what they do not cover.
2693
+ *
2694
+ * The zero-argument loader form (`{ fonts: defaultFonts }`) still works and still loads
2695
+ * everything up front. It is the one form that holds the document back until fonts settle.
2690
2696
  *
2691
2697
  * @public
2692
2698
  */
2693
- type DocxFontsSource = DocxFontsInput | Promise<DocxFontsInput> | (() => DocxFontsInput | Promise<DocxFontsInput>);
2699
+ type DocxFontsSource = DocxFontOrigin | readonly DocxFontOrigin[];
2700
+ /**
2701
+ * One entry of a `fonts` list: any {@link FontOrigin}, or the older zero-argument loader.
2702
+ *
2703
+ * The resolver arm of `FontOrigin` is a MARKED resolver, so handing this a function that
2704
+ * takes a request but never went through `defineFontResolver` is a compile error rather
2705
+ * than a silent total loss of fonts — it matches neither arm, because a one-argument
2706
+ * function is not assignable to the zero-argument loader.
2707
+ *
2708
+ * @public
2709
+ */
2710
+ type DocxFontOrigin = FontOrigin | (() => DocxFontsInput | Promise<DocxFontsInput>);
2694
2711
  /**
2695
2712
  * What the document itself can be: a URL to fetch, or bytes already in hand.
2696
2713
  *
@@ -2712,8 +2729,15 @@ interface UseDocxSourceOptions {
2712
2729
  interface UseDocxSourceResult {
2713
2730
  /** Bytes for `DocxEditor`'s `document` prop; undefined until they arrive. */
2714
2731
  readonly document: Uint8Array | undefined;
2715
- /** Composed configuration for the `fonts` prop; undefined until fonts settle. */
2716
- readonly fonts: FontConfiguration | undefined;
2732
+ /**
2733
+ * What to hand the `fonts` prop; undefined until there is something to hand it.
2734
+ *
2735
+ * A composed `FontConfiguration` on the eager path, and a stable `FontResolver` on the
2736
+ * on-demand one — the prop takes either, so the call site does not change. The resolver
2737
+ * keeps ONE identity for the hook's life, so the editor is never rebuilt on account of
2738
+ * it even when the origins are written inline.
2739
+ */
2740
+ readonly fonts: FontConfiguration | FontResolver | undefined;
2717
2741
  /** Why the DOCUMENT could not be opened. Font failures never land here — see below. */
2718
2742
  readonly error: Error | null;
2719
2743
  /** True until the document either arrives or fails. */
@@ -2723,7 +2747,7 @@ interface UseDocxSourceResult {
2723
2747
  * Load a document (and optionally fonts) for `DocxEditor`.
2724
2748
  *
2725
2749
  * ```tsx
2726
- * const { document, fonts, error } = useDocxSource(url, { fonts: defaultFonts });
2750
+ * const { document, fonts, error } = useDocxSource(url, { fonts: packagedFonts() });
2727
2751
  * if (error) return <p>{error.message}</p>;
2728
2752
  * return <DocxEditor document={document} fonts={fonts} />;
2729
2753
  * ```
@@ -2733,12 +2757,20 @@ interface UseDocxSourceResult {
2733
2757
  * a font failure leaves `error` null and is the loader's to report. A document failure is
2734
2758
  * different: there is nothing to show, so it lands on `error`.
2735
2759
  *
2736
- * THE DOCUMENT WAITS FOR THE FONTS. They fetch concurrently, but `document` stays undefined
2737
- * until fonts have settled — resolved OR failed — because layout MEASURES with them. Handing
2738
- * the editor bytes first paginates the whole document on the fixed fallback and then
2739
- * re-paginates when the real faces arrive, which the reader sees as the text jumping. One
2740
- * slightly longer wait beats a visible reflow. Without a `fonts` option there is nothing to
2741
- * wait for and the bytes go straight through.
2760
+ * THE DOCUMENT WAITS FOR THE FONTS, on the eager path. They fetch concurrently, but
2761
+ * `document` stays undefined until fonts have settled — resolved OR failed — because layout
2762
+ * MEASURES with them. Handing the editor bytes first paginates the whole document on the
2763
+ * fixed fallback and then re-paginates when the real faces arrive, which the reader sees as
2764
+ * the text jumping. One slightly longer wait beats a visible reflow. Without a `fonts`
2765
+ * option there is nothing to wait for and the bytes go straight through.
2766
+ *
2767
+ * AN ON-DEMAND ORIGIN CANNOT BE WAITED FOR, and this hook does not pretend otherwise. A
2768
+ * resolver is answered with the families the file declares, which nothing knows until the
2769
+ * engine has parsed it, so holding the bytes back would wait on work that only the bytes
2770
+ * can start. `document` is released at once, `fonts` is a stable resolver, and the engine
2771
+ * re-paginates when the faces land. That one reflow is what buys loading the faces a
2772
+ * document uses rather than everything an origin would load up front; `{ fonts: defaultFonts }` is
2773
+ * still there when the no-reflow guarantee matters more than the megabytes.
2742
2774
  *
2743
2775
  * A URL is fetched with the browser's own `fetch`, exactly as the caller wrote it. Validate
2744
2776
  * it first if it came from user input: this hook adds no allowlist of its own, and inventing
@@ -2751,7 +2783,13 @@ declare function useDocxSource(source: DocxSource | null | undefined, options?:
2751
2783
  /**
2752
2784
  * Anything that can describe fonts: a resolved configuration, a bare fragment, a promise
2753
2785
  * for either (what a loader like `defaultFonts()` returns), or an on-demand
2754
- * {@link FontResolver}.
2786
+ * {@link FontResolver} (what `packagedFonts()` and `googleFonts()` return).
2787
+ *
2788
+ * The resolver arm is BARE `FontResolver`, unmarked. `FontOrigin` — what a list position
2789
+ * takes — requires the `defineFontResolver` mark, because a list may also hold a
2790
+ * zero-argument loader and only the mark separates the two. There is no such ambiguity in
2791
+ * the first argument of {@link useFonts}, which has never accepted a loader, so it keeps
2792
+ * taking any resolver.
2755
2793
  *
2756
2794
  * @public
2757
2795
  */
@@ -2760,30 +2798,51 @@ type FontsInput = FontConfiguration | FontConfigurationFragment | FontResolver |
2760
2798
  * Merge font origins into one stable value for `DocxEditor.Root`'s `fonts` prop.
2761
2799
  *
2762
2800
  * ```tsx
2763
- * // On demand: only the families this document names are fetched.
2764
- * const fonts = useFonts(googleFonts());
2801
+ * // The bundled substitutes: the families this document names, plus its default face.
2802
+ * const fonts = useFonts(packagedFonts());
2765
2803
  *
2766
- * // On demand, plus brand faces you always want.
2767
- * const fonts = useFonts(googleFonts(), brandFragment);
2804
+ * // The same, plus the Google catalog for everything they do not cover.
2805
+ * const fonts = useFonts(packagedFonts(), googleFonts());
2768
2806
  *
2769
- * // Eager, from the bundled substitutes.
2770
- * const fonts = useFonts(defaultFonts());
2807
+ * // Brand faces first, then whatever is left.
2808
+ * const fonts = useFonts(brandFragment, packagedFonts());
2771
2809
  *
2772
2810
  * return <DocxEditor.Root fonts={fonts}>{children}</DocxEditor.Root>;
2773
2811
  * ```
2774
2812
  *
2775
- * Origins compose first-wins in argument order, exactly like `composeFontConfiguration`:
2776
- * the first argument beats later ones, and any of them beats a substitution for a family
2777
- * some origin supplies directly.
2813
+ * EVERY argument takes the same union, so adding an origin is adding an argument and
2814
+ * never a change of shape. Origins compose first-wins in argument order, exactly like
2815
+ * `composeFontConfiguration`: the first argument beats later ones, and any of them beats
2816
+ * a substitution for a family some origin supplies directly.
2817
+ *
2818
+ * They resolve ONE AFTER ANOTHER, not concurrently, so that each can be told which faces
2819
+ * the ones before it already cover and skip fetching them. That costs one extra origin's
2820
+ * latency on the critical path and saves a duplicate download — and, for a network origin,
2821
+ * a request that would have told a font host which families the document uses for nothing.
2822
+ * Order origins cheapest-first.
2778
2823
  *
2779
2824
  * The returned resolver never changes identity, so the editor is never rebuilt on account
2780
2825
  * of this prop — which also means the arguments are re-read per LOAD rather than per
2781
2826
  * render. Changing them mid-document does not re-resolve fonts; load a document, or
2782
2827
  * remount, for new fonts to take effect.
2783
2828
  *
2829
+ * It is marked (`defineFontResolver`), so it can itself be an origin of another list or
2830
+ * `useDocxSource`'s `fonts` option without being mistaken for a zero-argument loader.
2831
+ *
2832
+ * @public
2833
+ */
2834
+ declare function useFonts(source: FontsInput, ...fragments: readonly (FontConfigurationFragment | undefined)[]): MarkedFontResolver;
2835
+ /**
2836
+ * The uniform form: every position takes the same {@link FontOrigin}, so composing two
2837
+ * resolvers is one extra argument.
2838
+ *
2839
+ * A resolver in any position but the first must carry the `defineFontResolver` mark. The
2840
+ * first position keeps the older, looser type so that every call that compiled before this
2841
+ * overload existed still compiles.
2842
+ *
2784
2843
  * @public
2785
2844
  */
2786
- declare function useFonts(source: FontsInput, ...fragments: readonly (FontConfigurationFragment | undefined)[]): FontResolver;
2845
+ declare function useFonts(...origins: readonly FontOrigin[]): MarkedFontResolver;
2787
2846
 
2788
2847
  /**
2789
2848
  * OOXML content-control lock axis, mirrored from layout boundary records for the
@@ -3981,4 +4040,4 @@ declare function VerticalRuler({ pageSetup, zoom, editable, onTopMarginChange, o
3981
4040
  */
3982
4041
  declare function useEditorSnapshot(editor: Editor | null): number;
3983
4042
 
3984
- export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, 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, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, type DocxEditorAuthorStyleProps, type DocxEditorChildren, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, DocxEditorEquation, DocxEditorFontNotice, type DocxEditorFontNoticeProps, DocxEditorHeaderFooterChrome, type DocxEditorHeaderFooterChromeProps, DocxEditorHorizontalRuler, DocxEditorHyperLink, type DocxEditorHyperLinkNamespace, DocxEditorImagePropertiesDialog, type DocxEditorImagePropertiesDialogProps, DocxEditorLoading, type DocxEditorLoadingComponent, type DocxEditorLoadingProps, DocxEditorLoadingSpinner, type DocxEditorLoadingSpinnerProps, DocxEditorMenu, type DocxEditorMenuNamespace, type DocxEditorMenuProps, type DocxEditorNamespace, DocxEditorNavigation, type DocxEditorNavigationNamespace, type DocxEditorNavigationProps, DocxEditorNotesChrome, type DocxEditorNotesChromeProps, DocxEditorPageNumber, type DocxEditorPageNumberProps, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, DocxEditorParagraphDialog, type DocxEditorParagraphDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, type DocxEditorRootListeners, type DocxEditorRootProps, type DocxEditorRulerProps, DocxEditorShell, DocxEditorToolbar, type DocxEditorToolbarNamespace, type DocxEditorToolbarProps, DocxEditorVerticalRuler, DocxEditorViewport, type DocxEditorViewportProps, 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 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 PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphFlagState, type ParagraphFormatRead, type ParagraphFormatUpdate, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, type ParagraphTabStop, 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, 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 ToolbarSeparatorProps, type ToolbarSlotPartComponent, type ToolbarSlotPartProps, type ToolbarTranslate, type UseContentControlResult, type UseDocumentOutlineResult, type UseDocumentSearchResult, type UseDocxSourceOptions, type UseDocxSourceResult, type UseFontFamilyResult, type UseHyperlinkPopupResult, type UseNavigationPaneOptions, type UseNavigationPaneResult, type UsePageSetupReturn, type UseParagraphFormatReturn, type UseParagraphIndentReturn, type UseParagraphStyleResult, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, editorStateActiveSubscriptionCount, isFieldLink, navigationPaneReservation, navigationShift, normalizeImageBytes, notificationYieldsToTask, useProvidedDocxEditor as provideDocxEditor, reviewGutter, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };
4043
+ export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, 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, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, type DocxEditorAuthorStyleProps, type DocxEditorChildren, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, DocxEditorEquation, DocxEditorFontNotice, type DocxEditorFontNoticeProps, DocxEditorHeaderFooterChrome, type DocxEditorHeaderFooterChromeProps, DocxEditorHorizontalRuler, DocxEditorHyperLink, type DocxEditorHyperLinkNamespace, DocxEditorImagePropertiesDialog, type DocxEditorImagePropertiesDialogProps, DocxEditorLoading, type DocxEditorLoadingComponent, type DocxEditorLoadingProps, DocxEditorLoadingSpinner, type DocxEditorLoadingSpinnerProps, DocxEditorMenu, type DocxEditorMenuNamespace, type DocxEditorMenuProps, type DocxEditorNamespace, DocxEditorNavigation, type DocxEditorNavigationNamespace, type DocxEditorNavigationProps, DocxEditorNotesChrome, type DocxEditorNotesChromeProps, DocxEditorPageNumber, type DocxEditorPageNumberProps, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, DocxEditorParagraphDialog, type DocxEditorParagraphDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, type DocxEditorRootListeners, type DocxEditorRootProps, type DocxEditorRulerProps, DocxEditorShell, 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 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 PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphFlagState, type ParagraphFormatRead, type ParagraphFormatUpdate, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, type ParagraphTabStop, 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, 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 ToolbarSeparatorProps, type ToolbarSlotPartComponent, type ToolbarSlotPartProps, type ToolbarTranslate, type UseContentControlResult, type UseDocumentOutlineResult, type UseDocumentSearchResult, type UseDocxSourceOptions, type UseDocxSourceResult, type UseFontFamilyResult, type UseHyperlinkPopupResult, type UseNavigationPaneOptions, type UseNavigationPaneResult, type UsePageSetupReturn, type UseParagraphFormatReturn, type UseParagraphIndentReturn, type UseParagraphStyleResult, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, editorStateActiveSubscriptionCount, isFieldLink, navigationPaneReservation, navigationShift, normalizeImageBytes, notificationYieldsToTask, useProvidedDocxEditor as provideDocxEditor, reviewGutter, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, CSSProperties, ReactElement, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
3
- import { RevisionAuthorStyle, DocxEditorInstance, FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, ChromeSlotId, SupportedImageMime, TableChromeSlotId, ChromeMenuId, ChromeMenuEntry, SurfaceHyperlink, ReviewAuthorInfo, ImageWrapTarget, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent } from '@docx-editor.dev/core/editor';
4
- export { CHROME_GROUPS, CHROME_MENUS, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontResolutionRequest, FontResolver, FontUrlSource, ImageWrapTarget, LOADING_SNAPSHOT, LoadFontsRequest, LoadFontsResult, MAX_RESOLVER_FAMILIES, PX_PER_CM, PX_PER_INCH, ReviewAuthorInfo, RevisionAuthorAssignments, RevisionAuthorStyle, RevisionStyles, RulerTick, RulerUnit, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, createFontSource, generateRulerTicks, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
3
+ import { RevisionAuthorStyle, DocxEditorInstance, FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, ChromeSlotId, SupportedImageMime, TableChromeSlotId, ChromeMenuId, ChromeMenuEntry, SurfaceHyperlink, FontOrigin, MarkedFontResolver, ReviewAuthorInfo, ImageWrapTarget, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent } from '@docx-editor.dev/core/editor';
4
+ 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, 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';
5
5
  import { DocumentSource, FontConfiguration, ZoomMode, Editor, DocumentChange, EditorFontError, TextMatch, ViewScope, DocumentHandle, EditorCommand, EditorScope, ExecResult, EditorSnapshot, EditorEvents, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
6
6
  export { Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, PageSetup } from '@docx-editor.dev/core/contracts/editor';
7
7
  import { TFunction, Translations, LocaleStrings } from '@docx-editor.dev/i18n';
@@ -2683,14 +2683,31 @@ declare function useHyperlinkPopupInstance(active?: boolean): UseHyperlinkPopupR
2683
2683
  /** A complete configuration, or a fragment this hook composes with the defaults. @public */
2684
2684
  type DocxFontsInput = FontConfiguration | FontConfigurationFragment;
2685
2685
  /**
2686
- * How a host supplies fonts: a value, a promise, or a function returning either.
2686
+ * How a host supplies fonts: one origin, or a list of them in precedence order.
2687
2687
  *
2688
- * The function form is the useful one — `{ fonts: defaultFonts }` from
2689
- * `@docx-editor.dev/fonts` — because it defers the work until the hook actually runs it.
2688
+ * `packagedFonts()` and `googleFonts()` are the useful ones — they resolve per document,
2689
+ * loading a family when the file names it or when it is that file's default face, rather
2690
+ * than loading every family they could serve. A list composes them first-wins:
2691
+ * `{ fonts: [packagedFonts(), googleFonts()] }` serves the bundled faces and reaches the
2692
+ * catalog only for what they do not cover.
2693
+ *
2694
+ * The zero-argument loader form (`{ fonts: defaultFonts }`) still works and still loads
2695
+ * everything up front. It is the one form that holds the document back until fonts settle.
2690
2696
  *
2691
2697
  * @public
2692
2698
  */
2693
- type DocxFontsSource = DocxFontsInput | Promise<DocxFontsInput> | (() => DocxFontsInput | Promise<DocxFontsInput>);
2699
+ type DocxFontsSource = DocxFontOrigin | readonly DocxFontOrigin[];
2700
+ /**
2701
+ * One entry of a `fonts` list: any {@link FontOrigin}, or the older zero-argument loader.
2702
+ *
2703
+ * The resolver arm of `FontOrigin` is a MARKED resolver, so handing this a function that
2704
+ * takes a request but never went through `defineFontResolver` is a compile error rather
2705
+ * than a silent total loss of fonts — it matches neither arm, because a one-argument
2706
+ * function is not assignable to the zero-argument loader.
2707
+ *
2708
+ * @public
2709
+ */
2710
+ type DocxFontOrigin = FontOrigin | (() => DocxFontsInput | Promise<DocxFontsInput>);
2694
2711
  /**
2695
2712
  * What the document itself can be: a URL to fetch, or bytes already in hand.
2696
2713
  *
@@ -2712,8 +2729,15 @@ interface UseDocxSourceOptions {
2712
2729
  interface UseDocxSourceResult {
2713
2730
  /** Bytes for `DocxEditor`'s `document` prop; undefined until they arrive. */
2714
2731
  readonly document: Uint8Array | undefined;
2715
- /** Composed configuration for the `fonts` prop; undefined until fonts settle. */
2716
- readonly fonts: FontConfiguration | undefined;
2732
+ /**
2733
+ * What to hand the `fonts` prop; undefined until there is something to hand it.
2734
+ *
2735
+ * A composed `FontConfiguration` on the eager path, and a stable `FontResolver` on the
2736
+ * on-demand one — the prop takes either, so the call site does not change. The resolver
2737
+ * keeps ONE identity for the hook's life, so the editor is never rebuilt on account of
2738
+ * it even when the origins are written inline.
2739
+ */
2740
+ readonly fonts: FontConfiguration | FontResolver | undefined;
2717
2741
  /** Why the DOCUMENT could not be opened. Font failures never land here — see below. */
2718
2742
  readonly error: Error | null;
2719
2743
  /** True until the document either arrives or fails. */
@@ -2723,7 +2747,7 @@ interface UseDocxSourceResult {
2723
2747
  * Load a document (and optionally fonts) for `DocxEditor`.
2724
2748
  *
2725
2749
  * ```tsx
2726
- * const { document, fonts, error } = useDocxSource(url, { fonts: defaultFonts });
2750
+ * const { document, fonts, error } = useDocxSource(url, { fonts: packagedFonts() });
2727
2751
  * if (error) return <p>{error.message}</p>;
2728
2752
  * return <DocxEditor document={document} fonts={fonts} />;
2729
2753
  * ```
@@ -2733,12 +2757,20 @@ interface UseDocxSourceResult {
2733
2757
  * a font failure leaves `error` null and is the loader's to report. A document failure is
2734
2758
  * different: there is nothing to show, so it lands on `error`.
2735
2759
  *
2736
- * THE DOCUMENT WAITS FOR THE FONTS. They fetch concurrently, but `document` stays undefined
2737
- * until fonts have settled — resolved OR failed — because layout MEASURES with them. Handing
2738
- * the editor bytes first paginates the whole document on the fixed fallback and then
2739
- * re-paginates when the real faces arrive, which the reader sees as the text jumping. One
2740
- * slightly longer wait beats a visible reflow. Without a `fonts` option there is nothing to
2741
- * wait for and the bytes go straight through.
2760
+ * THE DOCUMENT WAITS FOR THE FONTS, on the eager path. They fetch concurrently, but
2761
+ * `document` stays undefined until fonts have settled — resolved OR failed — because layout
2762
+ * MEASURES with them. Handing the editor bytes first paginates the whole document on the
2763
+ * fixed fallback and then re-paginates when the real faces arrive, which the reader sees as
2764
+ * the text jumping. One slightly longer wait beats a visible reflow. Without a `fonts`
2765
+ * option there is nothing to wait for and the bytes go straight through.
2766
+ *
2767
+ * AN ON-DEMAND ORIGIN CANNOT BE WAITED FOR, and this hook does not pretend otherwise. A
2768
+ * resolver is answered with the families the file declares, which nothing knows until the
2769
+ * engine has parsed it, so holding the bytes back would wait on work that only the bytes
2770
+ * can start. `document` is released at once, `fonts` is a stable resolver, and the engine
2771
+ * re-paginates when the faces land. That one reflow is what buys loading the faces a
2772
+ * document uses rather than everything an origin would load up front; `{ fonts: defaultFonts }` is
2773
+ * still there when the no-reflow guarantee matters more than the megabytes.
2742
2774
  *
2743
2775
  * A URL is fetched with the browser's own `fetch`, exactly as the caller wrote it. Validate
2744
2776
  * it first if it came from user input: this hook adds no allowlist of its own, and inventing
@@ -2751,7 +2783,13 @@ declare function useDocxSource(source: DocxSource | null | undefined, options?:
2751
2783
  /**
2752
2784
  * Anything that can describe fonts: a resolved configuration, a bare fragment, a promise
2753
2785
  * for either (what a loader like `defaultFonts()` returns), or an on-demand
2754
- * {@link FontResolver}.
2786
+ * {@link FontResolver} (what `packagedFonts()` and `googleFonts()` return).
2787
+ *
2788
+ * The resolver arm is BARE `FontResolver`, unmarked. `FontOrigin` — what a list position
2789
+ * takes — requires the `defineFontResolver` mark, because a list may also hold a
2790
+ * zero-argument loader and only the mark separates the two. There is no such ambiguity in
2791
+ * the first argument of {@link useFonts}, which has never accepted a loader, so it keeps
2792
+ * taking any resolver.
2755
2793
  *
2756
2794
  * @public
2757
2795
  */
@@ -2760,30 +2798,51 @@ type FontsInput = FontConfiguration | FontConfigurationFragment | FontResolver |
2760
2798
  * Merge font origins into one stable value for `DocxEditor.Root`'s `fonts` prop.
2761
2799
  *
2762
2800
  * ```tsx
2763
- * // On demand: only the families this document names are fetched.
2764
- * const fonts = useFonts(googleFonts());
2801
+ * // The bundled substitutes: the families this document names, plus its default face.
2802
+ * const fonts = useFonts(packagedFonts());
2765
2803
  *
2766
- * // On demand, plus brand faces you always want.
2767
- * const fonts = useFonts(googleFonts(), brandFragment);
2804
+ * // The same, plus the Google catalog for everything they do not cover.
2805
+ * const fonts = useFonts(packagedFonts(), googleFonts());
2768
2806
  *
2769
- * // Eager, from the bundled substitutes.
2770
- * const fonts = useFonts(defaultFonts());
2807
+ * // Brand faces first, then whatever is left.
2808
+ * const fonts = useFonts(brandFragment, packagedFonts());
2771
2809
  *
2772
2810
  * return <DocxEditor.Root fonts={fonts}>{children}</DocxEditor.Root>;
2773
2811
  * ```
2774
2812
  *
2775
- * Origins compose first-wins in argument order, exactly like `composeFontConfiguration`:
2776
- * the first argument beats later ones, and any of them beats a substitution for a family
2777
- * some origin supplies directly.
2813
+ * EVERY argument takes the same union, so adding an origin is adding an argument and
2814
+ * never a change of shape. Origins compose first-wins in argument order, exactly like
2815
+ * `composeFontConfiguration`: the first argument beats later ones, and any of them beats
2816
+ * a substitution for a family some origin supplies directly.
2817
+ *
2818
+ * They resolve ONE AFTER ANOTHER, not concurrently, so that each can be told which faces
2819
+ * the ones before it already cover and skip fetching them. That costs one extra origin's
2820
+ * latency on the critical path and saves a duplicate download — and, for a network origin,
2821
+ * a request that would have told a font host which families the document uses for nothing.
2822
+ * Order origins cheapest-first.
2778
2823
  *
2779
2824
  * The returned resolver never changes identity, so the editor is never rebuilt on account
2780
2825
  * of this prop — which also means the arguments are re-read per LOAD rather than per
2781
2826
  * render. Changing them mid-document does not re-resolve fonts; load a document, or
2782
2827
  * remount, for new fonts to take effect.
2783
2828
  *
2829
+ * It is marked (`defineFontResolver`), so it can itself be an origin of another list or
2830
+ * `useDocxSource`'s `fonts` option without being mistaken for a zero-argument loader.
2831
+ *
2832
+ * @public
2833
+ */
2834
+ declare function useFonts(source: FontsInput, ...fragments: readonly (FontConfigurationFragment | undefined)[]): MarkedFontResolver;
2835
+ /**
2836
+ * The uniform form: every position takes the same {@link FontOrigin}, so composing two
2837
+ * resolvers is one extra argument.
2838
+ *
2839
+ * A resolver in any position but the first must carry the `defineFontResolver` mark. The
2840
+ * first position keeps the older, looser type so that every call that compiled before this
2841
+ * overload existed still compiles.
2842
+ *
2784
2843
  * @public
2785
2844
  */
2786
- declare function useFonts(source: FontsInput, ...fragments: readonly (FontConfigurationFragment | undefined)[]): FontResolver;
2845
+ declare function useFonts(...origins: readonly FontOrigin[]): MarkedFontResolver;
2787
2846
 
2788
2847
  /**
2789
2848
  * OOXML content-control lock axis, mirrored from layout boundary records for the
@@ -3981,4 +4040,4 @@ declare function VerticalRuler({ pageSetup, zoom, editable, onTopMarginChange, o
3981
4040
  */
3982
4041
  declare function useEditorSnapshot(editor: Editor | null): number;
3983
4042
 
3984
- export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, 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, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, type DocxEditorAuthorStyleProps, type DocxEditorChildren, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, DocxEditorEquation, DocxEditorFontNotice, type DocxEditorFontNoticeProps, DocxEditorHeaderFooterChrome, type DocxEditorHeaderFooterChromeProps, DocxEditorHorizontalRuler, DocxEditorHyperLink, type DocxEditorHyperLinkNamespace, DocxEditorImagePropertiesDialog, type DocxEditorImagePropertiesDialogProps, DocxEditorLoading, type DocxEditorLoadingComponent, type DocxEditorLoadingProps, DocxEditorLoadingSpinner, type DocxEditorLoadingSpinnerProps, DocxEditorMenu, type DocxEditorMenuNamespace, type DocxEditorMenuProps, type DocxEditorNamespace, DocxEditorNavigation, type DocxEditorNavigationNamespace, type DocxEditorNavigationProps, DocxEditorNotesChrome, type DocxEditorNotesChromeProps, DocxEditorPageNumber, type DocxEditorPageNumberProps, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, DocxEditorParagraphDialog, type DocxEditorParagraphDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, type DocxEditorRootListeners, type DocxEditorRootProps, type DocxEditorRulerProps, DocxEditorShell, DocxEditorToolbar, type DocxEditorToolbarNamespace, type DocxEditorToolbarProps, DocxEditorVerticalRuler, DocxEditorViewport, type DocxEditorViewportProps, 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 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 PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphFlagState, type ParagraphFormatRead, type ParagraphFormatUpdate, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, type ParagraphTabStop, 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, 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 ToolbarSeparatorProps, type ToolbarSlotPartComponent, type ToolbarSlotPartProps, type ToolbarTranslate, type UseContentControlResult, type UseDocumentOutlineResult, type UseDocumentSearchResult, type UseDocxSourceOptions, type UseDocxSourceResult, type UseFontFamilyResult, type UseHyperlinkPopupResult, type UseNavigationPaneOptions, type UseNavigationPaneResult, type UsePageSetupReturn, type UseParagraphFormatReturn, type UseParagraphIndentReturn, type UseParagraphStyleResult, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, editorStateActiveSubscriptionCount, isFieldLink, navigationPaneReservation, navigationShift, normalizeImageBytes, notificationYieldsToTask, useProvidedDocxEditor as provideDocxEditor, reviewGutter, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };
4043
+ export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, 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, DocumentName, DocumentOutline, DocxEditor, DocxEditorAuthorStyle, type DocxEditorAuthorStyleProps, type DocxEditorChildren, DocxEditorColorByChangeType, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, DocxEditorEquation, DocxEditorFontNotice, type DocxEditorFontNoticeProps, DocxEditorHeaderFooterChrome, type DocxEditorHeaderFooterChromeProps, DocxEditorHorizontalRuler, DocxEditorHyperLink, type DocxEditorHyperLinkNamespace, DocxEditorImagePropertiesDialog, type DocxEditorImagePropertiesDialogProps, DocxEditorLoading, type DocxEditorLoadingComponent, type DocxEditorLoadingProps, DocxEditorLoadingSpinner, type DocxEditorLoadingSpinnerProps, DocxEditorMenu, type DocxEditorMenuNamespace, type DocxEditorMenuProps, type DocxEditorNamespace, DocxEditorNavigation, type DocxEditorNavigationNamespace, type DocxEditorNavigationProps, DocxEditorNotesChrome, type DocxEditorNotesChromeProps, DocxEditorPageNumber, type DocxEditorPageNumberProps, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, DocxEditorParagraphDialog, type DocxEditorParagraphDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, type DocxEditorRootListeners, type DocxEditorRootProps, type DocxEditorRulerProps, DocxEditorShell, 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 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 PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphFlagState, type ParagraphFormatRead, type ParagraphFormatUpdate, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, type ParagraphTabStop, 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, 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 ToolbarSeparatorProps, type ToolbarSlotPartComponent, type ToolbarSlotPartProps, type ToolbarTranslate, type UseContentControlResult, type UseDocumentOutlineResult, type UseDocumentSearchResult, type UseDocxSourceOptions, type UseDocxSourceResult, type UseFontFamilyResult, type UseHyperlinkPopupResult, type UseNavigationPaneOptions, type UseNavigationPaneResult, type UsePageSetupReturn, type UseParagraphFormatReturn, type UseParagraphIndentReturn, type UseParagraphStyleResult, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, editorStateActiveSubscriptionCount, isFieldLink, navigationPaneReservation, navigationShift, normalizeImageBytes, notificationYieldsToTask, useProvidedDocxEditor as provideDocxEditor, reviewGutter, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphFormat, useParagraphIndent, useParagraphStyle, useReviewAuthors, useReviewGutter, useScopeClassName, useScopedChromeAnchor, useTableBorderTargetLabel, useToolbarContext, useToolbarLabel, useToolbarLabelFor, useTranslation, useZoom };