@docx-editor.dev/react 2.1.3 → 2.2.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/README.md CHANGED
@@ -18,9 +18,9 @@ WYSIWYG `.docx` editor for React. Opens a Word file in the browser, paints the r
18
18
  layout, edits it in place, and writes a `.docx` back out. No upload service, no conversion
19
19
  backend: parsing and serialization both happen client-side.
20
20
 
21
- Saving is lossless. Everything you do not edit comes back byte for byte, including the parts
22
- the editor does not understand: custom XML, embedded fonts, macros, unknown extensions. Two
23
- oracles gate that in CI, so opening a document here cannot quietly destroy it.
21
+ Saving has a lossless semantic round-trip. Untouched content, unsupported OOXML, and package
22
+ payloads survive editing and save. Two oracles gate that in CI, so opening a document here
23
+ cannot quietly destroy it.
24
24
 
25
25
  ```bash
26
26
  npm install @docx-editor.dev/react
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { CSSProperties, ReactNode, ReactElement, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
3
- import { DocumentSource, FontConfiguration, Editor, DocumentChange, EditorFontError, TextMatch, ViewScope, DocumentHandle, EditorCommand, EditorScope, ExecResult, EditorSnapshot, EditorEvents, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
3
+ 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';
4
4
  export { Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, PageSetup } from '@docx-editor.dev/core/contracts/editor';
5
5
  import { FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, ChromeSlotId, SupportedImageMime, TableChromeSlotId, ChromeMenuId, ChromeMenuEntry, DocxEditorInstance, SurfaceHyperlink, ImageWrapTarget, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent } from '@docx-editor.dev/core/editor';
6
6
  export { CHROME_GROUPS, CHROME_MENUS, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontResolutionRequest, FontResolver, FontUrlSource, ImageWrapTarget, LoadFontsRequest, LoadFontsResult, MAX_RESOLVER_FAMILIES, PX_PER_CM, PX_PER_INCH, RulerTick, RulerUnit, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, createFontSource, generateRulerTicks, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
@@ -139,7 +139,20 @@ interface DocxEditorRootProps {
139
139
  modules?: readonly EditorModule[];
140
140
  /** `'edit'` (default) or `'view'` (read-only). Sampled at mount only. */
141
141
  mode?: 'edit' | 'view';
142
+ /**
143
+ * A fixed scale. Supplying one also means the mode is fixed, unless `zoomMode` says
144
+ * otherwise: an app that pinned 100% keeps 100% on every window size.
145
+ */
142
146
  zoom?: number;
147
+ /**
148
+ * Where the scale comes from. Defaults to `'auto'`: fit the page width, between 50% and
149
+ * 100%, so a window with room for the sheet renders at 100% and a narrower one shrinks
150
+ * rather than growing a horizontal scrollbar — down to the floor, past which it scrolls.
151
+ *
152
+ * A fit tracks the room beside the page, so opening the comments rail or docking the
153
+ * navigation pane shrinks the document by what it took. Pass `{ type: 'fixed' }` to opt out.
154
+ */
155
+ zoomMode?: ZoomMode | 'auto';
143
156
  /** Fired once per instance, after it is published to the tree (and after any
144
157
  * `DocxEditor.Content` in the same commit has attached its mount point). */
145
158
  onReady?: (editor: Editor) => void;
@@ -1370,6 +1383,23 @@ interface NavigationShiftInput {
1370
1383
  readonly reservation: number;
1371
1384
  /** Padding already reserved at the inline end, for example by the review rail. */
1372
1385
  readonly inlineEndReservation?: number;
1386
+ /**
1387
+ * Whether the page's WIDTH follows the padding right now.
1388
+ *
1389
+ * This turns the answer binary, and it has to. The proportional branch below assumes a page
1390
+ * of fixed width sitting in a shrinking box, so padding P moves it by P/2. Where the page is
1391
+ * re-scaled to the padded box instead, a partial shift makes the page narrower, which widens
1392
+ * the gutter, which asks for a smaller shift, which makes the page wider — the pane and the
1393
+ * document chase each other every frame and never settle. Docked or not is a fixed point;
1394
+ * anything in between is not.
1395
+ *
1396
+ * NOT "a fit mode is selected". The default fit is capped at 100%, and on any container with
1397
+ * room for the sheet it sits AT that cap with the page a fixed width — exactly the case the
1398
+ * proportional branch was written for. Reading the mode alone docked those containers too
1399
+ * and pushed the page up to 128px further right than the pane needed. The question is
1400
+ * whether the fit is BINDING, which is `zoom < maxZoom`.
1401
+ */
1402
+ readonly docked?: boolean;
1373
1403
  }
1374
1404
  /**
1375
1405
  * The viewport's left padding, in px, that puts the page's left edge exactly at
@@ -1379,7 +1409,7 @@ interface NavigationShiftInput {
1379
1409
  * document with no page setup) rather than guessing: shifting on a zero measurement would
1380
1410
  * make the pane jump on the first frame and settle on the second.
1381
1411
  */
1382
- declare function navigationShift({ viewportWidth, pageWidthPx, reservation, inlineEndReservation, }: NavigationShiftInput): number;
1412
+ declare function navigationShift({ viewportWidth, pageWidthPx, reservation, inlineEndReservation, docked, }: NavigationShiftInput): number;
1383
1413
 
1384
1414
  /**
1385
1415
  * The px the chrome is currently displaced by an open navigation pane. `0` when no pane
@@ -1854,6 +1884,27 @@ interface DocxEditorProps {
1854
1884
  * them renders the raw placeholders for those labels.
1855
1885
  */
1856
1886
  t?: (key: string, params?: Record<string, string | number>) => string;
1887
+ /**
1888
+ * The chrome's language: a locale from `@docx-editor.dev/i18n` (or your own partial
1889
+ * over English). Keys the locale leaves out fall back to English rather than showing
1890
+ * the key.
1891
+ *
1892
+ * ```tsx
1893
+ * import { de } from '@docx-editor.dev/i18n';
1894
+ * <DocxEditor i18n={de} />
1895
+ * ```
1896
+ *
1897
+ * Equivalent to wrapping this editor in `<LocaleProvider i18n={de}>`, which is still
1898
+ * the way to set one language for several editors at once — this prop overrides such a
1899
+ * provider for this editor only. Unlike `locale`, which tells the ENGINE what language
1900
+ * the document is in, this decides what the buttons say.
1901
+ *
1902
+ * Hold it at a stable identity: a catalogue written inline (`i18n={{ toolbar: … }}`) is
1903
+ * a new object every render, and the merged catalogue behind it is what the chrome
1904
+ * memoizes its labels on — so an inline one re-renders every toolbar control on each
1905
+ * render of the host. Put your overrides in a module constant, or memoize them.
1906
+ */
1907
+ i18n?: Translations;
1857
1908
  /**
1858
1909
  * Renders the packaged chrome — title bar and toolbar — around the document.
1859
1910
  * Default `true`. Set `false` for the painted surface alone when the host supplies
@@ -1938,7 +1989,15 @@ interface DocxEditorProps {
1938
1989
  document?: DocumentSource;
1939
1990
  /** 'edit' (default) or 'view' (read-only). Applied at mount only — not reactive; remount to change. */
1940
1991
  mode?: EditorMode;
1992
+ /** A fixed scale. Supplying one also makes the mode fixed unless `zoomMode` says otherwise. */
1941
1993
  zoom?: number;
1994
+ /**
1995
+ * Where the scale comes from. Defaults to `'auto'`: fit the page width, between 50% and
1996
+ * 100%. A fit tracks the room beside the page, so opening comments shrinks the document
1997
+ * instead of pushing it off screen; past the floor it scrolls sideways instead.
1998
+ * `{ type: 'fixed' }` opts out.
1999
+ */
2000
+ zoomMode?: ZoomMode | 'auto';
1942
2001
  locale?: string;
1943
2002
  author?: string;
1944
2003
  /**
@@ -2119,7 +2178,7 @@ type ChromeTranslate = (key: string, params?: Record<string, string | number>) =
2119
2178
  * English by default), with `overrides` consulted first for key-level renames.
2120
2179
  *
2121
2180
  * ```tsx
2122
- * const MY_LABELS = new Map([['toolbar.bold', 'Heavy']]); // module-level: stable identity
2181
+ * const MY_LABELS = new Map([['formattingBar.bold', 'Heavy']]); // module-level: stable identity
2123
2182
  *
2124
2183
  * const t = useChromeTranslate(MY_LABELS);
2125
2184
  * <DocxEditor.Toolbar t={t} />
@@ -2423,6 +2482,46 @@ interface UseEditorStateOptions {
2423
2482
  */
2424
2483
  declare function useEditorState<T>(selector: (snapshot: EditorSnapshot) => T, isEqual?: (a: T, b: T) => boolean, options?: UseEditorStateOptions): T;
2425
2484
 
2485
+ /** What {@link useZoom} answers. @public */
2486
+ interface UseZoomResult {
2487
+ /** The scale in force, resolved. 1 is 100%. */
2488
+ readonly zoom: number;
2489
+ /** Where {@link UseZoomResult.zoom} came from. Fixed until an implementation says otherwise. */
2490
+ readonly mode: ZoomMode;
2491
+ /** Whether the editor is tracking the viewport rather than holding a number. */
2492
+ readonly isFit: boolean;
2493
+ /** Set a fixed scale. Leaves any fit mode, the same as picking a level in the toolbar. */
2494
+ readonly setZoom: (zoom: number) => void;
2495
+ readonly setMode: (mode: ZoomMode | 'auto') => void;
2496
+ /** Fit the page width and keep fitting: shrink AND grow with the viewport. */
2497
+ readonly fitToWidth: () => void;
2498
+ /** The default: fit the page width, never past 100%. */
2499
+ readonly auto: () => void;
2500
+ /** Back to a plain, untracked 100%. */
2501
+ readonly reset: () => void;
2502
+ readonly zoomIn: () => void;
2503
+ readonly zoomOut: () => void;
2504
+ readonly canZoomIn: boolean;
2505
+ readonly canZoomOut: boolean;
2506
+ /** The ladder the steppers walk, so a custom control shows the same levels. */
2507
+ readonly levels: readonly number[];
2508
+ }
2509
+ /**
2510
+ * Read and drive the document's zoom.
2511
+ *
2512
+ * ```tsx
2513
+ * const { zoom, isFit, auto, zoomIn } = useZoom();
2514
+ * <button onClick={auto} aria-pressed={isFit}>Fit</button>
2515
+ * <span>{Math.round(zoom * 100)}%</span>
2516
+ * ```
2517
+ *
2518
+ * Outside a `DocxEditor.Root` — and before the editor is created — this reports 100% fixed
2519
+ * and every action is a no-op, so a control can render unconditionally.
2520
+ *
2521
+ * @public
2522
+ */
2523
+ declare function useZoom(): UseZoomResult;
2524
+
2426
2525
  /**
2427
2526
  * A caret position: a paragraph and a UTF-16 offset inside it — the shape the write APIs take
2428
2527
  * as their `at`.
@@ -3323,4 +3422,4 @@ declare function useEditorSnapshot(editor: Editor | null): number;
3323
3422
  */
3324
3423
  declare const VERSION = "0.0.2";
3325
3424
 
3326
- export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, type ContextMenuAnchor, ContextMenuCellVerticalAlignment, type ContextMenuCommandProps, ContextMenuCopy, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, type ContextMenuItemProps, ContextMenuPaste, ContextMenuSelectAll, type ContextMenuTableRowProps, DocumentName, DocxEditor, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, 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, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, 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, ImageWrap, type IndentUpdate, LocaleProvider, Logo, 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, type OutlineHeading$1 as OutlineHeading, type OutlineHeadingItem, PageIndicator, type PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorHandle as PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, RULER_WIDTH, ReviewRailContext, type ReviewRailRegistry, SEARCH_DEBOUNCE_MS, SEARCH_MATCH_LIMIT, 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, ToolbarGroup, 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 UseParagraphIndentReturn, type UseParagraphStyleResult, VERSION, VerticalRuler, type VerticalRulerProps, navigationPaneReservation, navigationShift, normalizeImageBytes, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphIndent, useParagraphStyle, useTableBorderTargetLabel, useTranslation };
3425
+ export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, type ContextMenuAnchor, ContextMenuCellVerticalAlignment, type ContextMenuCommandProps, ContextMenuCopy, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, type ContextMenuItemProps, ContextMenuPaste, ContextMenuSelectAll, type ContextMenuTableRowProps, DocumentName, DocxEditor, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, 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, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, 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, ImageWrap, type IndentUpdate, LocaleProvider, Logo, 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, type OutlineHeading$1 as OutlineHeading, type OutlineHeadingItem, PageIndicator, type PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorHandle as PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, RULER_WIDTH, ReviewRailContext, type ReviewRailRegistry, SEARCH_DEBOUNCE_MS, SEARCH_MATCH_LIMIT, 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, ToolbarGroup, 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 UseParagraphIndentReturn, type UseParagraphStyleResult, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, navigationPaneReservation, navigationShift, normalizeImageBytes, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphIndent, useParagraphStyle, useTableBorderTargetLabel, useTranslation, useZoom };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { CSSProperties, ReactNode, ReactElement, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, Ref } from 'react';
3
- import { DocumentSource, FontConfiguration, Editor, DocumentChange, EditorFontError, TextMatch, ViewScope, DocumentHandle, EditorCommand, EditorScope, ExecResult, EditorSnapshot, EditorEvents, PageSetup, IndentFormatting, ColorValue, Theme } from '@docx-editor.dev/core/contracts/editor';
3
+ 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';
4
4
  export { Editor, EditorCommand, EditorFontError, EditorFontErrorCode, EditorQuery, EditorScope, EditorSnapshot, FontConfiguration, FontFaceRequest, FontSource, FontSourceSubstitution, PageSetup } from '@docx-editor.dev/core/contracts/editor';
5
5
  import { FontConfigurationFragment, FontResolver, EditorModule, ImageDecodePort, ChromeSlotId, SupportedImageMime, TableChromeSlotId, ChromeMenuId, ChromeMenuEntry, DocxEditorInstance, SurfaceHyperlink, ImageWrapTarget, TextMeasurer, PaginatedSurfaceState, NavigationCommand, SurfaceFormatting, SectionProperties, RulerIndent } from '@docx-editor.dev/core/editor';
6
6
  export { CHROME_GROUPS, CHROME_MENUS, ChromeMenu, ChromeMenuEntry, ChromeMenuId, ChromeMenuItemEntry, ChromeMenuSeparatorEntry, ChromeMenuSubmenuEntry, ChromeSlotId, FontConfigurationBase, FontConfigurationFragment, FontLoadFailure, FontLoadFailureReason, FontResolutionRequest, FontResolver, FontUrlSource, ImageWrapTarget, LoadFontsRequest, LoadFontsResult, MAX_RESOLVER_FAMILIES, PX_PER_CM, PX_PER_INCH, RulerTick, RulerUnit, ToolbarCommandState, WORD_DEFAULT_FONT, chromeMenuSlots, commandForSlot, composeFontConfiguration, createFontSource, generateRulerTicks, loadFonts, rulerPageBox, runToolbarCommand, toolbarCommandState } from '@docx-editor.dev/core/editor';
@@ -139,7 +139,20 @@ interface DocxEditorRootProps {
139
139
  modules?: readonly EditorModule[];
140
140
  /** `'edit'` (default) or `'view'` (read-only). Sampled at mount only. */
141
141
  mode?: 'edit' | 'view';
142
+ /**
143
+ * A fixed scale. Supplying one also means the mode is fixed, unless `zoomMode` says
144
+ * otherwise: an app that pinned 100% keeps 100% on every window size.
145
+ */
142
146
  zoom?: number;
147
+ /**
148
+ * Where the scale comes from. Defaults to `'auto'`: fit the page width, between 50% and
149
+ * 100%, so a window with room for the sheet renders at 100% and a narrower one shrinks
150
+ * rather than growing a horizontal scrollbar — down to the floor, past which it scrolls.
151
+ *
152
+ * A fit tracks the room beside the page, so opening the comments rail or docking the
153
+ * navigation pane shrinks the document by what it took. Pass `{ type: 'fixed' }` to opt out.
154
+ */
155
+ zoomMode?: ZoomMode | 'auto';
143
156
  /** Fired once per instance, after it is published to the tree (and after any
144
157
  * `DocxEditor.Content` in the same commit has attached its mount point). */
145
158
  onReady?: (editor: Editor) => void;
@@ -1370,6 +1383,23 @@ interface NavigationShiftInput {
1370
1383
  readonly reservation: number;
1371
1384
  /** Padding already reserved at the inline end, for example by the review rail. */
1372
1385
  readonly inlineEndReservation?: number;
1386
+ /**
1387
+ * Whether the page's WIDTH follows the padding right now.
1388
+ *
1389
+ * This turns the answer binary, and it has to. The proportional branch below assumes a page
1390
+ * of fixed width sitting in a shrinking box, so padding P moves it by P/2. Where the page is
1391
+ * re-scaled to the padded box instead, a partial shift makes the page narrower, which widens
1392
+ * the gutter, which asks for a smaller shift, which makes the page wider — the pane and the
1393
+ * document chase each other every frame and never settle. Docked or not is a fixed point;
1394
+ * anything in between is not.
1395
+ *
1396
+ * NOT "a fit mode is selected". The default fit is capped at 100%, and on any container with
1397
+ * room for the sheet it sits AT that cap with the page a fixed width — exactly the case the
1398
+ * proportional branch was written for. Reading the mode alone docked those containers too
1399
+ * and pushed the page up to 128px further right than the pane needed. The question is
1400
+ * whether the fit is BINDING, which is `zoom < maxZoom`.
1401
+ */
1402
+ readonly docked?: boolean;
1373
1403
  }
1374
1404
  /**
1375
1405
  * The viewport's left padding, in px, that puts the page's left edge exactly at
@@ -1379,7 +1409,7 @@ interface NavigationShiftInput {
1379
1409
  * document with no page setup) rather than guessing: shifting on a zero measurement would
1380
1410
  * make the pane jump on the first frame and settle on the second.
1381
1411
  */
1382
- declare function navigationShift({ viewportWidth, pageWidthPx, reservation, inlineEndReservation, }: NavigationShiftInput): number;
1412
+ declare function navigationShift({ viewportWidth, pageWidthPx, reservation, inlineEndReservation, docked, }: NavigationShiftInput): number;
1383
1413
 
1384
1414
  /**
1385
1415
  * The px the chrome is currently displaced by an open navigation pane. `0` when no pane
@@ -1854,6 +1884,27 @@ interface DocxEditorProps {
1854
1884
  * them renders the raw placeholders for those labels.
1855
1885
  */
1856
1886
  t?: (key: string, params?: Record<string, string | number>) => string;
1887
+ /**
1888
+ * The chrome's language: a locale from `@docx-editor.dev/i18n` (or your own partial
1889
+ * over English). Keys the locale leaves out fall back to English rather than showing
1890
+ * the key.
1891
+ *
1892
+ * ```tsx
1893
+ * import { de } from '@docx-editor.dev/i18n';
1894
+ * <DocxEditor i18n={de} />
1895
+ * ```
1896
+ *
1897
+ * Equivalent to wrapping this editor in `<LocaleProvider i18n={de}>`, which is still
1898
+ * the way to set one language for several editors at once — this prop overrides such a
1899
+ * provider for this editor only. Unlike `locale`, which tells the ENGINE what language
1900
+ * the document is in, this decides what the buttons say.
1901
+ *
1902
+ * Hold it at a stable identity: a catalogue written inline (`i18n={{ toolbar: … }}`) is
1903
+ * a new object every render, and the merged catalogue behind it is what the chrome
1904
+ * memoizes its labels on — so an inline one re-renders every toolbar control on each
1905
+ * render of the host. Put your overrides in a module constant, or memoize them.
1906
+ */
1907
+ i18n?: Translations;
1857
1908
  /**
1858
1909
  * Renders the packaged chrome — title bar and toolbar — around the document.
1859
1910
  * Default `true`. Set `false` for the painted surface alone when the host supplies
@@ -1938,7 +1989,15 @@ interface DocxEditorProps {
1938
1989
  document?: DocumentSource;
1939
1990
  /** 'edit' (default) or 'view' (read-only). Applied at mount only — not reactive; remount to change. */
1940
1991
  mode?: EditorMode;
1992
+ /** A fixed scale. Supplying one also makes the mode fixed unless `zoomMode` says otherwise. */
1941
1993
  zoom?: number;
1994
+ /**
1995
+ * Where the scale comes from. Defaults to `'auto'`: fit the page width, between 50% and
1996
+ * 100%. A fit tracks the room beside the page, so opening comments shrinks the document
1997
+ * instead of pushing it off screen; past the floor it scrolls sideways instead.
1998
+ * `{ type: 'fixed' }` opts out.
1999
+ */
2000
+ zoomMode?: ZoomMode | 'auto';
1942
2001
  locale?: string;
1943
2002
  author?: string;
1944
2003
  /**
@@ -2119,7 +2178,7 @@ type ChromeTranslate = (key: string, params?: Record<string, string | number>) =
2119
2178
  * English by default), with `overrides` consulted first for key-level renames.
2120
2179
  *
2121
2180
  * ```tsx
2122
- * const MY_LABELS = new Map([['toolbar.bold', 'Heavy']]); // module-level: stable identity
2181
+ * const MY_LABELS = new Map([['formattingBar.bold', 'Heavy']]); // module-level: stable identity
2123
2182
  *
2124
2183
  * const t = useChromeTranslate(MY_LABELS);
2125
2184
  * <DocxEditor.Toolbar t={t} />
@@ -2423,6 +2482,46 @@ interface UseEditorStateOptions {
2423
2482
  */
2424
2483
  declare function useEditorState<T>(selector: (snapshot: EditorSnapshot) => T, isEqual?: (a: T, b: T) => boolean, options?: UseEditorStateOptions): T;
2425
2484
 
2485
+ /** What {@link useZoom} answers. @public */
2486
+ interface UseZoomResult {
2487
+ /** The scale in force, resolved. 1 is 100%. */
2488
+ readonly zoom: number;
2489
+ /** Where {@link UseZoomResult.zoom} came from. Fixed until an implementation says otherwise. */
2490
+ readonly mode: ZoomMode;
2491
+ /** Whether the editor is tracking the viewport rather than holding a number. */
2492
+ readonly isFit: boolean;
2493
+ /** Set a fixed scale. Leaves any fit mode, the same as picking a level in the toolbar. */
2494
+ readonly setZoom: (zoom: number) => void;
2495
+ readonly setMode: (mode: ZoomMode | 'auto') => void;
2496
+ /** Fit the page width and keep fitting: shrink AND grow with the viewport. */
2497
+ readonly fitToWidth: () => void;
2498
+ /** The default: fit the page width, never past 100%. */
2499
+ readonly auto: () => void;
2500
+ /** Back to a plain, untracked 100%. */
2501
+ readonly reset: () => void;
2502
+ readonly zoomIn: () => void;
2503
+ readonly zoomOut: () => void;
2504
+ readonly canZoomIn: boolean;
2505
+ readonly canZoomOut: boolean;
2506
+ /** The ladder the steppers walk, so a custom control shows the same levels. */
2507
+ readonly levels: readonly number[];
2508
+ }
2509
+ /**
2510
+ * Read and drive the document's zoom.
2511
+ *
2512
+ * ```tsx
2513
+ * const { zoom, isFit, auto, zoomIn } = useZoom();
2514
+ * <button onClick={auto} aria-pressed={isFit}>Fit</button>
2515
+ * <span>{Math.round(zoom * 100)}%</span>
2516
+ * ```
2517
+ *
2518
+ * Outside a `DocxEditor.Root` — and before the editor is created — this reports 100% fixed
2519
+ * and every action is a no-op, so a control can render unconditionally.
2520
+ *
2521
+ * @public
2522
+ */
2523
+ declare function useZoom(): UseZoomResult;
2524
+
2426
2525
  /**
2427
2526
  * A caret position: a paragraph and a UTF-16 offset inside it — the shape the write APIs take
2428
2527
  * as their `at`.
@@ -3323,4 +3422,4 @@ declare function useEditorSnapshot(editor: Editor | null): number;
3323
3422
  */
3324
3423
  declare const VERSION = "0.0.2";
3325
3424
 
3326
- export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, type ContextMenuAnchor, ContextMenuCellVerticalAlignment, type ContextMenuCommandProps, ContextMenuCopy, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, type ContextMenuItemProps, ContextMenuPaste, ContextMenuSelectAll, type ContextMenuTableRowProps, DocumentName, DocxEditor, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, 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, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, 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, ImageWrap, type IndentUpdate, LocaleProvider, Logo, 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, type OutlineHeading$1 as OutlineHeading, type OutlineHeadingItem, PageIndicator, type PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorHandle as PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, RULER_WIDTH, ReviewRailContext, type ReviewRailRegistry, SEARCH_DEBOUNCE_MS, SEARCH_MATCH_LIMIT, 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, ToolbarGroup, 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 UseParagraphIndentReturn, type UseParagraphStyleResult, VERSION, VerticalRuler, type VerticalRulerProps, navigationPaneReservation, navigationShift, normalizeImageBytes, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphIndent, useParagraphStyle, useTableBorderTargetLabel, useTranslation };
3425
+ export { CONTENT_CONTROL_SLOTS, type ChromeTranslate, type ContentControlActionProps, type ContentControlInspectorState, type ContentControlLock, type ContentControlPartProps, type ContentControlProps, type ContentControlSlotId, type ContextMenuAnchor, ContextMenuCellVerticalAlignment, type ContextMenuCommandProps, ContextMenuCopy, ContextMenuCut, ContextMenuDelete, ContextMenuDeleteTable, ContextMenuDeleteTableColumn, ContextMenuDeleteTableRow, ContextMenuInsertColumnLeft, ContextMenuInsertColumnRight, ContextMenuInsertRowAbove, ContextMenuInsertRowBelow, ContextMenuItem, type ContextMenuItemProps, ContextMenuPaste, ContextMenuSelectAll, type ContextMenuTableRowProps, DocumentName, DocxEditor, DocxEditorContent, DocxEditorContentControl, type DocxEditorContentControlNamespace, type DocxEditorContentProps, DocxEditorContextMenu, type DocxEditorContextMenuNamespace, type DocxEditorContextMenuProps, DocxEditorDocumentOutline, type DocxEditorDocumentOutlineProps, 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, DocxEditorPageSetupDialog, type DocxEditorPageSetupDialogProps, type DocxEditorProps, type DocxEditorRef, DocxEditorRoot, 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, ImageWrap, type IndentUpdate, LocaleProvider, Logo, 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, type OutlineHeading$1 as OutlineHeading, type OutlineHeadingItem, PageIndicator, type PageSetupUpdate, PaginatedDocxEditor, type PaginatedDocxEditorHandle as PaginatedDocxEditorExpose, type PaginatedDocxEditorHandle, type PaginatedDocxEditorProps, PaginatedDocxEditorShell, type PaginatedDocxEditorShellProps, type ParagraphStyleItemProps, type ParagraphStyleNamespace, type ParagraphStyleOption, type ParagraphStylePartProps, type ParagraphStyleProps, RULER_WIDTH, ReviewRailContext, type ReviewRailRegistry, SEARCH_DEBOUNCE_MS, SEARCH_MATCH_LIMIT, 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, ToolbarGroup, 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 UseParagraphIndentReturn, type UseParagraphStyleResult, type UseZoomResult, VERSION, VerticalRuler, type VerticalRulerProps, navigationPaneReservation, navigationShift, normalizeImageBytes, useChromeTranslate, useContentControl, useContentControlInstance, useContextMenuTarget, useDocumentOutline, useDocumentSearch, useDocxEditor, useDocxSource, useEditorCaret, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useEditorValueCommand, useFontFamily, useFonts, useHeaderFooterState, useHyperlinkPopup, useHyperlinkPopupInstance, useNavigationPane, useNavigationShift, useNotePropertiesState, useNoteScopeState, usePageSetup, useParagraphIndent, useParagraphStyle, useTableBorderTargetLabel, useTranslation, useZoom };