@eigenpal/docx-js-editor 0.0.8 → 0.0.10
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 +41 -19
- package/dist/{chunk-FOU7PS3K.cjs → chunk-A7VY2V4X.cjs} +1 -1
- package/dist/{chunk-AZFSFU4G.js → chunk-GQ4JYQWC.js} +1 -1
- package/dist/{chunk-EKU3VR4Y.cjs → chunk-H3JNHCD7.cjs} +4 -4
- package/dist/{chunk-B2GPMRIP.js → chunk-L2UUZRZI.js} +4 -4
- package/dist/{chunk-AQ35GWDV.js → chunk-MMJD2DLL.js} +1 -1
- package/dist/{chunk-CEBRVCHO.js → chunk-PM4Y7OFN.js} +4 -3
- package/dist/{chunk-7O7MPYI7.cjs → chunk-QOIY4Y6N.cjs} +2 -2
- package/dist/{chunk-WWGV3HB2.cjs → chunk-QYKJKSKZ.cjs} +2 -2
- package/dist/{chunk-NZ7XUW4I.cjs → chunk-S6FZ7HL6.js} +1 -1
- package/dist/{chunk-VMT4DN2Q.js → chunk-TPUJJJWA.js} +1 -1
- package/dist/{chunk-CWWSDDRF.cjs → chunk-TRAQI6RX.cjs} +4 -3
- package/dist/chunk-Y37VT37I.cjs +1 -0
- package/dist/{colorResolver-DGxlMbv2.d.ts → colorResolver-BNj-uZ58.d.ts} +1 -1
- package/dist/{colorResolver-CTmPdBGz.d.cts → colorResolver-DiMquGWR.d.cts} +1 -1
- package/dist/core-plugins.cjs +1 -1
- package/dist/core-plugins.d.cts +3 -3
- package/dist/core-plugins.d.ts +3 -3
- package/dist/core-plugins.js +1 -1
- package/dist/executor-44OB3DFD.js +1 -0
- package/dist/executor-U3BZPPGN.cjs +1 -0
- package/dist/headless.cjs +2 -2
- package/dist/headless.d.cts +4 -4
- package/dist/headless.d.ts +4 -4
- package/dist/headless.js +2 -2
- package/dist/index.cjs +25 -25
- package/dist/index.d.cts +32 -51
- package/dist/index.d.ts +32 -51
- package/dist/index.js +25 -25
- package/dist/mcp-cli.js +19 -19
- package/dist/mcp.cjs +12 -12
- package/dist/mcp.d.cts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +12 -12
- package/dist/{registry-C73dM_1E.d.cts → registry-BUTMLqSj.d.cts} +1 -1
- package/dist/{registry-Djkwny4j.d.ts → registry-CzqAPdui.d.ts} +1 -1
- package/dist/selectionRects-I5JVL73G.cjs +1 -0
- package/dist/selectionRects-LO3FJT47.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/{types-Do_Q8vaT.d.cts → types-BALm1KBi.d.cts} +1 -1
- package/dist/{types-Do_Q8vaT.d.ts → types-BALm1KBi.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-W2TDS3UO.js +0 -1
- package/dist/executor-7DZMHPUF.js +0 -1
- package/dist/executor-FSMRGT73.cjs +0 -1
- package/dist/selectionRects-5TGQE33Q.cjs +0 -1
- package/dist/selectionRects-JSPKYXPU.js +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -4,13 +4,13 @@ import * as prosemirror_view from 'prosemirror-view';
|
|
|
4
4
|
import { EditorView, DecorationSet } from 'prosemirror-view';
|
|
5
5
|
import * as prosemirror_state from 'prosemirror-state';
|
|
6
6
|
import { Plugin, EditorState, Transaction, PluginKey } from 'prosemirror-state';
|
|
7
|
-
import { T as TextFormatting, U as ParagraphFormatting, h as Document, ab as Theme, f as Table, a8 as TableCell, an as ParagraphAlignment, a4 as Style, a2 as SelectionContext, A as AIAction, l as AgentResponse, ao as StyleType, a1 as SectionProperties, ap as TabStop, aq as
|
|
8
|
-
export { i as AIActionRequest, j as AgentCommand, k as AgentContext, m as ApplyStyleCommand, B as BlockContent,
|
|
9
|
-
import { a8 as DocxInput, D as DocumentAgent } from './colorResolver-
|
|
10
|
-
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, k as colorsEqual, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, X as processTemplate, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a9 as toArrayBuffer, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-
|
|
7
|
+
import { T as TextFormatting, U as ParagraphFormatting, h as Document, ab as Theme, f as Table, a8 as TableCell, an as ParagraphAlignment, a4 as Style, a2 as SelectionContext, A as AIAction, l as AgentResponse, ao as StyleType, a1 as SectionProperties, ap as TabStop, aq as ShadingProperties, R as Run, e as Paragraph, ar as BreakContent, $ as RunContent } from './types-BALm1KBi.cjs';
|
|
8
|
+
export { i as AIActionRequest, j as AgentCommand, k as AgentContext, m as ApplyStyleCommand, B as BlockContent, as as BookmarkEnd, at as BookmarkStart, C as CorePlugin, q as DeleteTextCommand, D as DocumentBody, r as DocxPackage, E as Endnote, au as Field, av as FooterReference, F as Footnote, t as FormatTextCommand, aw as HeaderFooter, ax as HeaderReference, H as Hyperlink, I as Image, u as InsertHyperlinkCommand, v as InsertImageCommand, w as InsertTableCommand, x as InsertTextCommand, L as ListLevel, d as McpSession, M as McpToolDefinition, N as McpToolHandler, O as McpToolResult, Q as NumberingDefinitions, S as ParagraphContext, g as Position, Y as Range, Z as Relationship, _ as ReplaceTextCommand, a3 as SetVariableCommand, ay as Shape, a5 as StyleDefinitions, a7 as SuggestedAction, a9 as TableRow, az as TextBox, aa as TextContent, aA as ThemeColorScheme, aB as ThemeFont, aC as ThemeFontScheme } from './types-BALm1KBi.cjs';
|
|
9
|
+
import { a8 as DocxInput, D as DocumentAgent } from './colorResolver-DiMquGWR.cjs';
|
|
10
|
+
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, k as colorsEqual, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, X as processTemplate, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a9 as toArrayBuffer, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-DiMquGWR.cjs';
|
|
11
11
|
import { Node as Node$1 } from 'prosemirror-model';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
|
-
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-
|
|
13
|
+
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-BUTMLqSj.cjs';
|
|
14
14
|
export { docxtemplaterPlugin } from './core-plugins.cjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -403,6 +403,10 @@ type Page = {
|
|
|
403
403
|
footerFirst?: string;
|
|
404
404
|
footerEven?: string;
|
|
405
405
|
};
|
|
406
|
+
/** Footnote IDs that appear on this page (for rendering). */
|
|
407
|
+
footnoteIds?: number[];
|
|
408
|
+
/** Height reserved for the footnote area at page bottom (pixels). */
|
|
409
|
+
footnoteReservedHeight?: number;
|
|
406
410
|
};
|
|
407
411
|
/**
|
|
408
412
|
* Column layout configuration.
|
|
@@ -694,6 +698,8 @@ interface PagedEditorRef {
|
|
|
694
698
|
getLayout(): Layout | null;
|
|
695
699
|
/** Force re-layout. */
|
|
696
700
|
relayout(): void;
|
|
701
|
+
/** Scroll the visible pages to bring a PM position into view. */
|
|
702
|
+
scrollToPosition(pmPos: number): void;
|
|
697
703
|
}
|
|
698
704
|
|
|
699
705
|
/**
|
|
@@ -760,6 +766,8 @@ interface DocxEditorProps {
|
|
|
760
766
|
placeholder?: ReactNode;
|
|
761
767
|
/** Loading indicator */
|
|
762
768
|
loadingIndicator?: ReactNode;
|
|
769
|
+
/** Whether to show the document outline sidebar (default: false) */
|
|
770
|
+
showOutline?: boolean;
|
|
763
771
|
/** Whether to show print button in toolbar (default: true) */
|
|
764
772
|
showPrintButton?: boolean;
|
|
765
773
|
/** Print options for print preview */
|
|
@@ -1303,6 +1311,10 @@ interface ToolbarProps {
|
|
|
1303
1311
|
showTableInsert?: boolean;
|
|
1304
1312
|
/** Callback when user wants to insert an image */
|
|
1305
1313
|
onInsertImage?: () => void;
|
|
1314
|
+
/** Callback when user wants to insert a page break */
|
|
1315
|
+
onInsertPageBreak?: () => void;
|
|
1316
|
+
/** Callback when user wants to insert a table of contents */
|
|
1317
|
+
onInsertTOC?: () => void;
|
|
1306
1318
|
/** Callback when user wants to insert a shape */
|
|
1307
1319
|
onInsertShape?: (data: {
|
|
1308
1320
|
shapeType: string;
|
|
@@ -1323,8 +1335,6 @@ interface ToolbarProps {
|
|
|
1323
1335
|
onImageWrapType?: (wrapType: string) => void;
|
|
1324
1336
|
/** Callback for image transform (rotate/flip) */
|
|
1325
1337
|
onImageTransform?: (action: 'rotateCW' | 'rotateCCW' | 'flipH' | 'flipV') => void;
|
|
1326
|
-
/** Callback to open image position dialog */
|
|
1327
|
-
onOpenImagePosition?: () => void;
|
|
1328
1338
|
/** Callback to open image properties dialog (alt text + border) */
|
|
1329
1339
|
onOpenImageProperties?: () => void;
|
|
1330
1340
|
/** Table context when cursor is in a table */
|
|
@@ -1383,7 +1393,7 @@ declare function ToolbarSeparator(): react_jsx_runtime.JSX.Element;
|
|
|
1383
1393
|
/**
|
|
1384
1394
|
* Formatting toolbar with all controls
|
|
1385
1395
|
*/
|
|
1386
|
-
declare function Toolbar({ currentFormatting, onFormat, onUndo, onRedo, canUndo, canRedo, disabled, className, style, enableShortcuts, editorRef, children, showFontPicker, showFontSizePicker, showTextColorPicker, showHighlightColorPicker, showAlignmentButtons, showListButtons, showLineSpacingPicker, showStylePicker, documentStyles, theme, onPrint, showPrintButton, showZoomControl, zoom, onZoomChange, onRefocusEditor, onInsertTable, showTableInsert, onInsertImage,
|
|
1396
|
+
declare function Toolbar({ currentFormatting, onFormat, onUndo, onRedo, canUndo, canRedo, disabled, className, style, enableShortcuts, editorRef, children, showFontPicker, showFontSizePicker, showTextColorPicker, showHighlightColorPicker, showAlignmentButtons, showListButtons, showLineSpacingPicker, showStylePicker, documentStyles, theme, onPrint, showPrintButton, showZoomControl, zoom, onZoomChange, onRefocusEditor, onInsertTable, showTableInsert, onInsertImage, onInsertPageBreak, onInsertTOC, imageContext, onImageWrapType, onImageTransform, onOpenImageProperties, tableContext, onTableAction, }: ToolbarProps): react_jsx_runtime.JSX.Element;
|
|
1387
1397
|
|
|
1388
1398
|
/**
|
|
1389
1399
|
* VariablePanel Component
|
|
@@ -1986,75 +1996,46 @@ interface AlignmentButtonsProps {
|
|
|
1986
1996
|
declare function AlignmentButtons({ value, onChange, disabled, }: AlignmentButtonsProps): react_jsx_runtime.JSX.Element;
|
|
1987
1997
|
|
|
1988
1998
|
/**
|
|
1989
|
-
* HorizontalRuler Component
|
|
1999
|
+
* HorizontalRuler Component — Google Docs style
|
|
1990
2000
|
*
|
|
1991
|
-
*
|
|
1992
|
-
* -
|
|
1993
|
-
* -
|
|
1994
|
-
* - First line indent indicator
|
|
1995
|
-
* - Optional dragging to adjust margins
|
|
1996
|
-
* - Support for zoom levels
|
|
2001
|
+
* 3 handles only:
|
|
2002
|
+
* - Left side: first-line indent (▼ down at top) + left indent (▲ up at bottom)
|
|
2003
|
+
* - Right side: right indent (▼ down at top)
|
|
1997
2004
|
*
|
|
1998
|
-
*
|
|
2005
|
+
* Margins shown as gray zones on the ruler edges.
|
|
2006
|
+
* Drag the boundary between gray/white to adjust page margins.
|
|
2007
|
+
* Drag tooltip shows value during any drag.
|
|
1999
2008
|
*/
|
|
2000
2009
|
|
|
2001
|
-
/**
|
|
2002
|
-
* Props for the HorizontalRuler component
|
|
2003
|
-
*/
|
|
2004
2010
|
interface HorizontalRulerProps {
|
|
2005
|
-
/** Section properties for page layout */
|
|
2006
2011
|
sectionProps?: SectionProperties | null;
|
|
2007
|
-
/** Zoom level (1.0 = 100%) */
|
|
2008
2012
|
zoom?: number;
|
|
2009
|
-
/** Whether margins can be dragged to adjust */
|
|
2010
2013
|
editable?: boolean;
|
|
2011
|
-
/** Callback when left margin changes (in twips) */
|
|
2012
2014
|
onLeftMarginChange?: (marginTwips: number) => void;
|
|
2013
|
-
/** Callback when right margin changes (in twips) */
|
|
2014
2015
|
onRightMarginChange?: (marginTwips: number) => void;
|
|
2015
|
-
/** Callback when first line indent changes (in twips) */
|
|
2016
2016
|
onFirstLineIndentChange?: (indentTwips: number) => void;
|
|
2017
|
-
/** Show first line indent marker */
|
|
2018
2017
|
showFirstLineIndent?: boolean;
|
|
2019
|
-
/** First line indent value (in twips) */
|
|
2020
2018
|
firstLineIndent?: number;
|
|
2021
|
-
|
|
2019
|
+
hangingIndent?: boolean;
|
|
2020
|
+
indentLeft?: number;
|
|
2021
|
+
indentRight?: number;
|
|
2022
|
+
onIndentLeftChange?: (indentTwips: number) => void;
|
|
2023
|
+
onIndentRightChange?: (indentTwips: number) => void;
|
|
2022
2024
|
unit?: 'inch' | 'cm';
|
|
2023
|
-
/** Additional CSS class name */
|
|
2024
2025
|
className?: string;
|
|
2025
|
-
/** Additional inline styles */
|
|
2026
2026
|
style?: CSSProperties;
|
|
2027
|
-
/** Current paragraph tab stops */
|
|
2028
2027
|
tabStops?: TabStop[] | null;
|
|
2029
|
-
/** Callback when a tab stop is added (click on ruler) */
|
|
2030
|
-
onTabStopAdd?: (positionTwips: number, alignment: TabStopAlignment) => void;
|
|
2031
|
-
/** Callback when a tab stop is removed (double-click on marker) */
|
|
2032
2028
|
onTabStopRemove?: (positionTwips: number) => void;
|
|
2033
2029
|
}
|
|
2034
|
-
|
|
2035
|
-
* HorizontalRuler - displays a ruler with margin markers
|
|
2036
|
-
*/
|
|
2037
|
-
declare function HorizontalRuler({ sectionProps, zoom, editable, onLeftMarginChange, onRightMarginChange, onFirstLineIndentChange, showFirstLineIndent, firstLineIndent, unit, className, style, tabStops, onTabStopAdd, onTabStopRemove, }: HorizontalRulerProps): React__default.ReactElement;
|
|
2038
|
-
/**
|
|
2039
|
-
* Convert a ruler position to margin value
|
|
2040
|
-
*/
|
|
2030
|
+
declare function HorizontalRuler({ sectionProps, zoom, editable, onLeftMarginChange, onRightMarginChange, onFirstLineIndentChange, showFirstLineIndent, firstLineIndent, hangingIndent, indentLeft, indentRight, onIndentLeftChange, onIndentRightChange, unit, className, style, tabStops, onTabStopRemove, }: HorizontalRulerProps): React__default.ReactElement;
|
|
2041
2031
|
declare function positionToMargin(positionPx: number, side: 'left' | 'right', pageWidthPx: number, zoom: number): number;
|
|
2042
|
-
/**
|
|
2043
|
-
* Get ruler dimensions based on section properties
|
|
2044
|
-
*/
|
|
2045
2032
|
declare function getRulerDimensions(sectionProps?: SectionProperties | null, zoom?: number): {
|
|
2046
2033
|
width: number;
|
|
2047
2034
|
leftMargin: number;
|
|
2048
2035
|
rightMargin: number;
|
|
2049
2036
|
contentWidth: number;
|
|
2050
2037
|
};
|
|
2051
|
-
/**
|
|
2052
|
-
* Get margin value in display units
|
|
2053
|
-
*/
|
|
2054
2038
|
declare function getMarginInUnits(marginTwips: number, unit: 'inch' | 'cm'): string;
|
|
2055
|
-
/**
|
|
2056
|
-
* Parse a margin value from display units to twips
|
|
2057
|
-
*/
|
|
2058
2039
|
declare function parseMarginFromUnits(value: string, unit: 'inch' | 'cm'): number | null;
|
|
2059
2040
|
|
|
2060
2041
|
interface TableBorderPickerProps {
|
|
@@ -4562,4 +4543,4 @@ declare const templatePlugin: EditorPlugin<TemplatePluginState>;
|
|
|
4562
4543
|
*/
|
|
4563
4544
|
declare const VERSION = "0.0.2";
|
|
4564
4545
|
|
|
4565
|
-
export { AIAction, ANNOTATION_PANEL_STYLES, AgentResponse, AlignmentButtons, type AlignmentButtonsProps, AnnotationPanel, type AutoSaveStatus, CLIPBOARD_TYPES, CellBackgroundPicker, type CellBackgroundPickerProps, type CellColorOption, type ClipboardContent, type ClipboardOptions, type ClipboardSelection, type ColorOption, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuProps, DEFAULT_CELL_COLORS, DEFAULT_SELECTION_STYLE, type KeyboardShortcut$1 as DialogKeyboardShortcut, Document, DocumentAgent, DocxEditor, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, DocxInput, type EditorPlugin, ErrorBoundary, type ErrorBoundaryProps, type ErrorContextValue, type ErrorNotification, ErrorProvider, type ErrorSeverity, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindReplaceOptions, type FindReplaceState, type FindResult, type FontOption, FontPicker, type FontPickerProps, FontSizePicker, type FontSizePickerProps, HIGH_CONTRAST_SELECTION_STYLE, type HighlightOptions, type HighlightRect, HorizontalRuler, type HorizontalRulerProps, type HyperlinkData, HyperlinkDialog, type HyperlinkDialogProps, INTERNAL_CLIPBOARD_TYPE, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, type InsertPosition, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, type KeyboardShortcut, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, PLUGIN_HOST_STYLES, type PageIndicatorPosition, type PageIndicatorVariant, PageNavigator, type PageNavigatorPosition, type PageNavigatorProps, type PageNavigatorVariant, PageNumberIndicator, type PageNumberIndicatorProps, type PanelConfig, Paragraph, ParagraphFormatting, ParseErrorDisplay, type ParseErrorDisplayProps, type ParsedClipboardContent, type PasteOption, PasteSpecialDialog, type PasteSpecialDialogProps, type PluginContext, PluginHost, type PluginHostProps, type PluginHostRef, type PluginPanelProps, PrintButton, type PrintButtonProps, type PrintOptions, PrintStyles, type RenderAsyncOptions, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, Run, RunContent, SELECTION_CSS_VARS, SYMBOL_CATEGORIES, type SavedDocumentData, SectionProperties, SelectionContext, type SelectionHighlightConfig, type SelectionOverlayProps, type SelectionRange, type ShortcutCategory, Style, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TABLE_DATA_ATTRIBUTES, TEMPLATE_DECORATION_STYLES, Table, type TableAction, TableBorderColorPicker, type TableBorderColorPickerProps, TableBorderPicker, type TableBorderPickerProps, TableBorderWidthPicker, type TableBorderWidthPickerProps, TableCell, TableCellFillPicker, type TableCellFillPickerProps, type TableConfig, type TableContext, TableInsertButtons, type TableInsertButtonsProps, TableMergeButton, type TableMergeButtonProps, TableMoreDropdown, type TableMoreDropdownProps, type TableSelection, type TableSelectionState, TableToolbar, type TableToolbarProps, type TagType, type TemplateTag, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, TextFormatting, Theme, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, UnsupportedFeatureWarning, type UnsupportedFeatureWarningProps, type UseAutoSaveOptions, type UseAutoSaveReturn, type UseClipboardOptions, type UseClipboardReturn, type UseFindReplaceReturn, type UseKeyboardShortcutsDialogOptions, type UseKeyboardShortcutsDialogReturn, type UseLoadingOptions, type UseLoadingReturn, type UsePasteSpecialOptions, type UsePasteSpecialReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseSelectionHighlightOptions, type UseSelectionHighlightReturn, type UseTableSelectionOptions, type UseTableSelectionReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, type UseWheelZoomOptions, type UseWheelZoomReturn, VERSION, VariablePanel, type VariablePanelProps, type WordSelectionResult, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, addColumn, addRow, areSelectionStylesInjected, calculateFitDimensions, calculateProgress, calculateScrollToPage, calculateVisiblePage, canRenderFont, clampPageNumber, clampTableConfig, clampZoom, cleanWordHtml, clearSelection, copyParagraphs, copyRuns, countPageBreaks, createCellColorOption, createChangeTracker, createClipboardHandlers, createColumnBreak, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createDoubleClickWordSelector, createErrorResponse, createHorizontalRule, createLineBreak, createMockResponse, createPageBreak, createPageBreakParagraph, createPageBreakRun, createPageFormat, createSearchPattern, createSelectionChangeHandler, createSelectionFromDOM, createShadingFromColor, createTableContext, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, createToolbarItem, createToolbarItems, createTripleClickParagraphSelector, dataUrlToBlob,
|
|
4546
|
+
export { AIAction, ANNOTATION_PANEL_STYLES, AgentResponse, AlignmentButtons, type AlignmentButtonsProps, AnnotationPanel, type AutoSaveStatus, CLIPBOARD_TYPES, CellBackgroundPicker, type CellBackgroundPickerProps, type CellColorOption, type ClipboardContent, type ClipboardOptions, type ClipboardSelection, type ColorOption, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuProps, DEFAULT_CELL_COLORS, DEFAULT_SELECTION_STYLE, type KeyboardShortcut$1 as DialogKeyboardShortcut, Document, DocumentAgent, DocxEditor, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, DocxInput, type EditorPlugin, ErrorBoundary, type ErrorBoundaryProps, type ErrorContextValue, type ErrorNotification, ErrorProvider, type ErrorSeverity, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindReplaceOptions, type FindReplaceState, type FindResult, type FontOption, FontPicker, type FontPickerProps, FontSizePicker, type FontSizePickerProps, HIGH_CONTRAST_SELECTION_STYLE, type HighlightOptions, type HighlightRect, HorizontalRuler, type HorizontalRulerProps, type HyperlinkData, HyperlinkDialog, type HyperlinkDialogProps, INTERNAL_CLIPBOARD_TYPE, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, type InsertPosition, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, type KeyboardShortcut, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, PLUGIN_HOST_STYLES, type PageIndicatorPosition, type PageIndicatorVariant, PageNavigator, type PageNavigatorPosition, type PageNavigatorProps, type PageNavigatorVariant, PageNumberIndicator, type PageNumberIndicatorProps, type PanelConfig, Paragraph, ParagraphFormatting, ParseErrorDisplay, type ParseErrorDisplayProps, type ParsedClipboardContent, type PasteOption, PasteSpecialDialog, type PasteSpecialDialogProps, type PluginContext, PluginHost, type PluginHostProps, type PluginHostRef, type PluginPanelProps, PrintButton, type PrintButtonProps, type PrintOptions, PrintStyles, type RenderAsyncOptions, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, Run, RunContent, SELECTION_CSS_VARS, SYMBOL_CATEGORIES, type SavedDocumentData, SectionProperties, SelectionContext, type SelectionHighlightConfig, type SelectionOverlayProps, type SelectionRange, type ShortcutCategory, Style, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TABLE_DATA_ATTRIBUTES, TEMPLATE_DECORATION_STYLES, Table, type TableAction, TableBorderColorPicker, type TableBorderColorPickerProps, TableBorderPicker, type TableBorderPickerProps, TableBorderWidthPicker, type TableBorderWidthPickerProps, TableCell, TableCellFillPicker, type TableCellFillPickerProps, type TableConfig, type TableContext, TableInsertButtons, type TableInsertButtonsProps, TableMergeButton, type TableMergeButtonProps, TableMoreDropdown, type TableMoreDropdownProps, type TableSelection, type TableSelectionState, TableToolbar, type TableToolbarProps, type TagType, type TemplateTag, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, TextFormatting, Theme, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, UnsupportedFeatureWarning, type UnsupportedFeatureWarningProps, type UseAutoSaveOptions, type UseAutoSaveReturn, type UseClipboardOptions, type UseClipboardReturn, type UseFindReplaceReturn, type UseKeyboardShortcutsDialogOptions, type UseKeyboardShortcutsDialogReturn, type UseLoadingOptions, type UseLoadingReturn, type UsePasteSpecialOptions, type UsePasteSpecialReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseSelectionHighlightOptions, type UseSelectionHighlightReturn, type UseTableSelectionOptions, type UseTableSelectionReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, type UseWheelZoomOptions, type UseWheelZoomReturn, VERSION, VariablePanel, type VariablePanelProps, type WordSelectionResult, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, addColumn, addRow, areSelectionStylesInjected, calculateFitDimensions, calculateProgress, calculateScrollToPage, calculateVisiblePage, canRenderFont, clampPageNumber, clampTableConfig, clampZoom, cleanWordHtml, clearSelection, copyParagraphs, copyRuns, countPageBreaks, createCellColorOption, createChangeTracker, createClipboardHandlers, createColumnBreak, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createDoubleClickWordSelector, createErrorResponse, createHorizontalRule, createLineBreak, createMockResponse, createPageBreak, createPageBreakParagraph, createPageBreakRun, createPageFormat, createSearchPattern, createSelectionChangeHandler, createSelectionFromDOM, createShadingFromColor, createTableContext, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, createToolbarItem, createToolbarItems, createTripleClickParagraphSelector, dataUrlToBlob, delay, deleteColumn, deleteRow, describeShortcut, escapeRegexString, expandSelectionToWord, expandSelectionToWordBoundaries, extendSelectionTo, findAllMatches, findInDocument, findInParagraph, findNearestZoomPreset, findNextWordStart, findPageBreaks, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordAt, findWordBoundaries, findWordEnd, findWordStart, formatFileSize, formatLastSaveTime, formatPageOrdinal, formatPageRange$1 as formatPageRange, formatPageRange as formatPrintPageRange, formatShortcutKeys, formatStorageSize, formatTableDimensions, formatZoom, generateOverlayElements, generateSelectionCSS, getActionShortcut, getAllActions, getAllCategories, getAllPositions as getAllIndicatorPositions, getAllVariants as getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getAutoSaveStatusLabel, getAutoSaveStorageSize, getCategoryLabel, getCellAt, getCellColorName, getColorFromShading, getColumnCount, getCommonShortcuts, getContrastingTextColor, getDefaultActions, getDefaultCellColors, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultPrintOptions, getDefaultShortcuts, getDefaultTextContextMenuItems, getHighlightRectStyle, getImageAcceptString, getImageDimensions, getLoadedFonts, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getMergedSelectionRects, getNavigationShortcutDescriptions, getNavigationShortcuts, getNextZoomPreset, getPageProgress, getPasteOption, getPreviousZoomPreset, getRecommendedPriority, getRulerDimensions, getSelectedText, getSelectionBoundingRect, getSelectionInfo, getSelectionRects, getSelectionRuns, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolInfo as getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTemplateTags as getTemplatePluginTags, getTextActionLabel, getTextActionShortcut, getUserFriendlyMessage, getVariantLabel, getWordAt, getWordAtCursor, getZoomPresets, handleClickForMultiClick, handleNavigationKey, handlePasteEvent, hasActiveSelection, hasPageBreakBefore, highlightTextRange, htmlToRuns, injectSelectionStyles, insertHorizontalRule, insertPageBreak, isActionAvailable, isAutoSaveSupported, isBreakContent, isColumnBreak, isDefaultCellColor, isEditorHtml, isEmptySearch, isFirstPage, isFontLoaded, isLoading as isFontsLoading, isLastPage, isLineBreak, isNavigationKey, isPageBreak, isParseError, isPasteSpecialShortcut, isPrintSupported, isPunctuation, isSelectionBackwards, isSelectionWithin, isTextActionAvailable, isValidImageFile, isValidPageNumber, isValidTableConfig, isWhitespace$1 as isWhitespace, isWhitespace as isWhitespaceChar, isWordCharacter as isWordChar, isWordCharacter$1 as isWordCharacter, isWordHtml, isZoomPreset, loadFont, loadFontFromBuffer, loadFonts, matchesShortcut, mergeAdjacentRects, mergeCells, moveByWord, moveToLineEdge, normalizeSelectionDirection, onFontsLoaded, openPrintWindow, paragraphsToClipboardContent, parseClipboardHtml, parseMarginFromUnits, parseNavigationAction, parsePageInput, parsePageRange, parseZoom, positionToMargin, preloadCommonFonts, readFromClipboard, removePageBreak, removeSelectionStyles, renderAsync, replaceAllInContent, replaceFirstInContent, runsToClipboardContent, scrollToMatch, searchSymbols, selectParagraphAtCursor, selectRange, selectWordAtCursor, selectWordInTextNode, setHoveredElement, setSelectedElement, setSelectionPosition, splitCell, symbolFromCodePoint, templatePlugin, templatePluginKey, triggerPrint, useAutoSave, useClipboard, useContextMenu, useErrorNotifications, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useSelectionHighlight, useTableSelection, useTextContextMenu, useUnsavedChanges, useWheelZoom, writeToClipboard };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import * as prosemirror_view from 'prosemirror-view';
|
|
|
4
4
|
import { EditorView, DecorationSet } from 'prosemirror-view';
|
|
5
5
|
import * as prosemirror_state from 'prosemirror-state';
|
|
6
6
|
import { Plugin, EditorState, Transaction, PluginKey } from 'prosemirror-state';
|
|
7
|
-
import { T as TextFormatting, U as ParagraphFormatting, h as Document, ab as Theme, f as Table, a8 as TableCell, an as ParagraphAlignment, a4 as Style, a2 as SelectionContext, A as AIAction, l as AgentResponse, ao as StyleType, a1 as SectionProperties, ap as TabStop, aq as
|
|
8
|
-
export { i as AIActionRequest, j as AgentCommand, k as AgentContext, m as ApplyStyleCommand, B as BlockContent,
|
|
9
|
-
import { a8 as DocxInput, D as DocumentAgent } from './colorResolver-
|
|
10
|
-
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, k as colorsEqual, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, X as processTemplate, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a9 as toArrayBuffer, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-
|
|
7
|
+
import { T as TextFormatting, U as ParagraphFormatting, h as Document, ab as Theme, f as Table, a8 as TableCell, an as ParagraphAlignment, a4 as Style, a2 as SelectionContext, A as AIAction, l as AgentResponse, ao as StyleType, a1 as SectionProperties, ap as TabStop, aq as ShadingProperties, R as Run, e as Paragraph, ar as BreakContent, $ as RunContent } from './types-BALm1KBi.js';
|
|
8
|
+
export { i as AIActionRequest, j as AgentCommand, k as AgentContext, m as ApplyStyleCommand, B as BlockContent, as as BookmarkEnd, at as BookmarkStart, C as CorePlugin, q as DeleteTextCommand, D as DocumentBody, r as DocxPackage, E as Endnote, au as Field, av as FooterReference, F as Footnote, t as FormatTextCommand, aw as HeaderFooter, ax as HeaderReference, H as Hyperlink, I as Image, u as InsertHyperlinkCommand, v as InsertImageCommand, w as InsertTableCommand, x as InsertTextCommand, L as ListLevel, d as McpSession, M as McpToolDefinition, N as McpToolHandler, O as McpToolResult, Q as NumberingDefinitions, S as ParagraphContext, g as Position, Y as Range, Z as Relationship, _ as ReplaceTextCommand, a3 as SetVariableCommand, ay as Shape, a5 as StyleDefinitions, a7 as SuggestedAction, a9 as TableRow, az as TextBox, aa as TextContent, aA as ThemeColorScheme, aB as ThemeFont, aC as ThemeFontScheme } from './types-BALm1KBi.js';
|
|
9
|
+
import { a8 as DocxInput, D as DocumentAgent } from './colorResolver-BNj-uZ58.js';
|
|
10
|
+
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, k as colorsEqual, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, X as processTemplate, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a9 as toArrayBuffer, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-BNj-uZ58.js';
|
|
11
11
|
import { Node as Node$1 } from 'prosemirror-model';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
|
-
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-
|
|
13
|
+
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-CzqAPdui.js';
|
|
14
14
|
export { docxtemplaterPlugin } from './core-plugins.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -403,6 +403,10 @@ type Page = {
|
|
|
403
403
|
footerFirst?: string;
|
|
404
404
|
footerEven?: string;
|
|
405
405
|
};
|
|
406
|
+
/** Footnote IDs that appear on this page (for rendering). */
|
|
407
|
+
footnoteIds?: number[];
|
|
408
|
+
/** Height reserved for the footnote area at page bottom (pixels). */
|
|
409
|
+
footnoteReservedHeight?: number;
|
|
406
410
|
};
|
|
407
411
|
/**
|
|
408
412
|
* Column layout configuration.
|
|
@@ -694,6 +698,8 @@ interface PagedEditorRef {
|
|
|
694
698
|
getLayout(): Layout | null;
|
|
695
699
|
/** Force re-layout. */
|
|
696
700
|
relayout(): void;
|
|
701
|
+
/** Scroll the visible pages to bring a PM position into view. */
|
|
702
|
+
scrollToPosition(pmPos: number): void;
|
|
697
703
|
}
|
|
698
704
|
|
|
699
705
|
/**
|
|
@@ -760,6 +766,8 @@ interface DocxEditorProps {
|
|
|
760
766
|
placeholder?: ReactNode;
|
|
761
767
|
/** Loading indicator */
|
|
762
768
|
loadingIndicator?: ReactNode;
|
|
769
|
+
/** Whether to show the document outline sidebar (default: false) */
|
|
770
|
+
showOutline?: boolean;
|
|
763
771
|
/** Whether to show print button in toolbar (default: true) */
|
|
764
772
|
showPrintButton?: boolean;
|
|
765
773
|
/** Print options for print preview */
|
|
@@ -1303,6 +1311,10 @@ interface ToolbarProps {
|
|
|
1303
1311
|
showTableInsert?: boolean;
|
|
1304
1312
|
/** Callback when user wants to insert an image */
|
|
1305
1313
|
onInsertImage?: () => void;
|
|
1314
|
+
/** Callback when user wants to insert a page break */
|
|
1315
|
+
onInsertPageBreak?: () => void;
|
|
1316
|
+
/** Callback when user wants to insert a table of contents */
|
|
1317
|
+
onInsertTOC?: () => void;
|
|
1306
1318
|
/** Callback when user wants to insert a shape */
|
|
1307
1319
|
onInsertShape?: (data: {
|
|
1308
1320
|
shapeType: string;
|
|
@@ -1323,8 +1335,6 @@ interface ToolbarProps {
|
|
|
1323
1335
|
onImageWrapType?: (wrapType: string) => void;
|
|
1324
1336
|
/** Callback for image transform (rotate/flip) */
|
|
1325
1337
|
onImageTransform?: (action: 'rotateCW' | 'rotateCCW' | 'flipH' | 'flipV') => void;
|
|
1326
|
-
/** Callback to open image position dialog */
|
|
1327
|
-
onOpenImagePosition?: () => void;
|
|
1328
1338
|
/** Callback to open image properties dialog (alt text + border) */
|
|
1329
1339
|
onOpenImageProperties?: () => void;
|
|
1330
1340
|
/** Table context when cursor is in a table */
|
|
@@ -1383,7 +1393,7 @@ declare function ToolbarSeparator(): react_jsx_runtime.JSX.Element;
|
|
|
1383
1393
|
/**
|
|
1384
1394
|
* Formatting toolbar with all controls
|
|
1385
1395
|
*/
|
|
1386
|
-
declare function Toolbar({ currentFormatting, onFormat, onUndo, onRedo, canUndo, canRedo, disabled, className, style, enableShortcuts, editorRef, children, showFontPicker, showFontSizePicker, showTextColorPicker, showHighlightColorPicker, showAlignmentButtons, showListButtons, showLineSpacingPicker, showStylePicker, documentStyles, theme, onPrint, showPrintButton, showZoomControl, zoom, onZoomChange, onRefocusEditor, onInsertTable, showTableInsert, onInsertImage,
|
|
1396
|
+
declare function Toolbar({ currentFormatting, onFormat, onUndo, onRedo, canUndo, canRedo, disabled, className, style, enableShortcuts, editorRef, children, showFontPicker, showFontSizePicker, showTextColorPicker, showHighlightColorPicker, showAlignmentButtons, showListButtons, showLineSpacingPicker, showStylePicker, documentStyles, theme, onPrint, showPrintButton, showZoomControl, zoom, onZoomChange, onRefocusEditor, onInsertTable, showTableInsert, onInsertImage, onInsertPageBreak, onInsertTOC, imageContext, onImageWrapType, onImageTransform, onOpenImageProperties, tableContext, onTableAction, }: ToolbarProps): react_jsx_runtime.JSX.Element;
|
|
1387
1397
|
|
|
1388
1398
|
/**
|
|
1389
1399
|
* VariablePanel Component
|
|
@@ -1986,75 +1996,46 @@ interface AlignmentButtonsProps {
|
|
|
1986
1996
|
declare function AlignmentButtons({ value, onChange, disabled, }: AlignmentButtonsProps): react_jsx_runtime.JSX.Element;
|
|
1987
1997
|
|
|
1988
1998
|
/**
|
|
1989
|
-
* HorizontalRuler Component
|
|
1999
|
+
* HorizontalRuler Component — Google Docs style
|
|
1990
2000
|
*
|
|
1991
|
-
*
|
|
1992
|
-
* -
|
|
1993
|
-
* -
|
|
1994
|
-
* - First line indent indicator
|
|
1995
|
-
* - Optional dragging to adjust margins
|
|
1996
|
-
* - Support for zoom levels
|
|
2001
|
+
* 3 handles only:
|
|
2002
|
+
* - Left side: first-line indent (▼ down at top) + left indent (▲ up at bottom)
|
|
2003
|
+
* - Right side: right indent (▼ down at top)
|
|
1997
2004
|
*
|
|
1998
|
-
*
|
|
2005
|
+
* Margins shown as gray zones on the ruler edges.
|
|
2006
|
+
* Drag the boundary between gray/white to adjust page margins.
|
|
2007
|
+
* Drag tooltip shows value during any drag.
|
|
1999
2008
|
*/
|
|
2000
2009
|
|
|
2001
|
-
/**
|
|
2002
|
-
* Props for the HorizontalRuler component
|
|
2003
|
-
*/
|
|
2004
2010
|
interface HorizontalRulerProps {
|
|
2005
|
-
/** Section properties for page layout */
|
|
2006
2011
|
sectionProps?: SectionProperties | null;
|
|
2007
|
-
/** Zoom level (1.0 = 100%) */
|
|
2008
2012
|
zoom?: number;
|
|
2009
|
-
/** Whether margins can be dragged to adjust */
|
|
2010
2013
|
editable?: boolean;
|
|
2011
|
-
/** Callback when left margin changes (in twips) */
|
|
2012
2014
|
onLeftMarginChange?: (marginTwips: number) => void;
|
|
2013
|
-
/** Callback when right margin changes (in twips) */
|
|
2014
2015
|
onRightMarginChange?: (marginTwips: number) => void;
|
|
2015
|
-
/** Callback when first line indent changes (in twips) */
|
|
2016
2016
|
onFirstLineIndentChange?: (indentTwips: number) => void;
|
|
2017
|
-
/** Show first line indent marker */
|
|
2018
2017
|
showFirstLineIndent?: boolean;
|
|
2019
|
-
/** First line indent value (in twips) */
|
|
2020
2018
|
firstLineIndent?: number;
|
|
2021
|
-
|
|
2019
|
+
hangingIndent?: boolean;
|
|
2020
|
+
indentLeft?: number;
|
|
2021
|
+
indentRight?: number;
|
|
2022
|
+
onIndentLeftChange?: (indentTwips: number) => void;
|
|
2023
|
+
onIndentRightChange?: (indentTwips: number) => void;
|
|
2022
2024
|
unit?: 'inch' | 'cm';
|
|
2023
|
-
/** Additional CSS class name */
|
|
2024
2025
|
className?: string;
|
|
2025
|
-
/** Additional inline styles */
|
|
2026
2026
|
style?: CSSProperties;
|
|
2027
|
-
/** Current paragraph tab stops */
|
|
2028
2027
|
tabStops?: TabStop[] | null;
|
|
2029
|
-
/** Callback when a tab stop is added (click on ruler) */
|
|
2030
|
-
onTabStopAdd?: (positionTwips: number, alignment: TabStopAlignment) => void;
|
|
2031
|
-
/** Callback when a tab stop is removed (double-click on marker) */
|
|
2032
2028
|
onTabStopRemove?: (positionTwips: number) => void;
|
|
2033
2029
|
}
|
|
2034
|
-
|
|
2035
|
-
* HorizontalRuler - displays a ruler with margin markers
|
|
2036
|
-
*/
|
|
2037
|
-
declare function HorizontalRuler({ sectionProps, zoom, editable, onLeftMarginChange, onRightMarginChange, onFirstLineIndentChange, showFirstLineIndent, firstLineIndent, unit, className, style, tabStops, onTabStopAdd, onTabStopRemove, }: HorizontalRulerProps): React__default.ReactElement;
|
|
2038
|
-
/**
|
|
2039
|
-
* Convert a ruler position to margin value
|
|
2040
|
-
*/
|
|
2030
|
+
declare function HorizontalRuler({ sectionProps, zoom, editable, onLeftMarginChange, onRightMarginChange, onFirstLineIndentChange, showFirstLineIndent, firstLineIndent, hangingIndent, indentLeft, indentRight, onIndentLeftChange, onIndentRightChange, unit, className, style, tabStops, onTabStopRemove, }: HorizontalRulerProps): React__default.ReactElement;
|
|
2041
2031
|
declare function positionToMargin(positionPx: number, side: 'left' | 'right', pageWidthPx: number, zoom: number): number;
|
|
2042
|
-
/**
|
|
2043
|
-
* Get ruler dimensions based on section properties
|
|
2044
|
-
*/
|
|
2045
2032
|
declare function getRulerDimensions(sectionProps?: SectionProperties | null, zoom?: number): {
|
|
2046
2033
|
width: number;
|
|
2047
2034
|
leftMargin: number;
|
|
2048
2035
|
rightMargin: number;
|
|
2049
2036
|
contentWidth: number;
|
|
2050
2037
|
};
|
|
2051
|
-
/**
|
|
2052
|
-
* Get margin value in display units
|
|
2053
|
-
*/
|
|
2054
2038
|
declare function getMarginInUnits(marginTwips: number, unit: 'inch' | 'cm'): string;
|
|
2055
|
-
/**
|
|
2056
|
-
* Parse a margin value from display units to twips
|
|
2057
|
-
*/
|
|
2058
2039
|
declare function parseMarginFromUnits(value: string, unit: 'inch' | 'cm'): number | null;
|
|
2059
2040
|
|
|
2060
2041
|
interface TableBorderPickerProps {
|
|
@@ -4562,4 +4543,4 @@ declare const templatePlugin: EditorPlugin<TemplatePluginState>;
|
|
|
4562
4543
|
*/
|
|
4563
4544
|
declare const VERSION = "0.0.2";
|
|
4564
4545
|
|
|
4565
|
-
export { AIAction, ANNOTATION_PANEL_STYLES, AgentResponse, AlignmentButtons, type AlignmentButtonsProps, AnnotationPanel, type AutoSaveStatus, CLIPBOARD_TYPES, CellBackgroundPicker, type CellBackgroundPickerProps, type CellColorOption, type ClipboardContent, type ClipboardOptions, type ClipboardSelection, type ColorOption, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuProps, DEFAULT_CELL_COLORS, DEFAULT_SELECTION_STYLE, type KeyboardShortcut$1 as DialogKeyboardShortcut, Document, DocumentAgent, DocxEditor, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, DocxInput, type EditorPlugin, ErrorBoundary, type ErrorBoundaryProps, type ErrorContextValue, type ErrorNotification, ErrorProvider, type ErrorSeverity, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindReplaceOptions, type FindReplaceState, type FindResult, type FontOption, FontPicker, type FontPickerProps, FontSizePicker, type FontSizePickerProps, HIGH_CONTRAST_SELECTION_STYLE, type HighlightOptions, type HighlightRect, HorizontalRuler, type HorizontalRulerProps, type HyperlinkData, HyperlinkDialog, type HyperlinkDialogProps, INTERNAL_CLIPBOARD_TYPE, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, type InsertPosition, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, type KeyboardShortcut, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, PLUGIN_HOST_STYLES, type PageIndicatorPosition, type PageIndicatorVariant, PageNavigator, type PageNavigatorPosition, type PageNavigatorProps, type PageNavigatorVariant, PageNumberIndicator, type PageNumberIndicatorProps, type PanelConfig, Paragraph, ParagraphFormatting, ParseErrorDisplay, type ParseErrorDisplayProps, type ParsedClipboardContent, type PasteOption, PasteSpecialDialog, type PasteSpecialDialogProps, type PluginContext, PluginHost, type PluginHostProps, type PluginHostRef, type PluginPanelProps, PrintButton, type PrintButtonProps, type PrintOptions, PrintStyles, type RenderAsyncOptions, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, Run, RunContent, SELECTION_CSS_VARS, SYMBOL_CATEGORIES, type SavedDocumentData, SectionProperties, SelectionContext, type SelectionHighlightConfig, type SelectionOverlayProps, type SelectionRange, type ShortcutCategory, Style, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TABLE_DATA_ATTRIBUTES, TEMPLATE_DECORATION_STYLES, Table, type TableAction, TableBorderColorPicker, type TableBorderColorPickerProps, TableBorderPicker, type TableBorderPickerProps, TableBorderWidthPicker, type TableBorderWidthPickerProps, TableCell, TableCellFillPicker, type TableCellFillPickerProps, type TableConfig, type TableContext, TableInsertButtons, type TableInsertButtonsProps, TableMergeButton, type TableMergeButtonProps, TableMoreDropdown, type TableMoreDropdownProps, type TableSelection, type TableSelectionState, TableToolbar, type TableToolbarProps, type TagType, type TemplateTag, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, TextFormatting, Theme, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, UnsupportedFeatureWarning, type UnsupportedFeatureWarningProps, type UseAutoSaveOptions, type UseAutoSaveReturn, type UseClipboardOptions, type UseClipboardReturn, type UseFindReplaceReturn, type UseKeyboardShortcutsDialogOptions, type UseKeyboardShortcutsDialogReturn, type UseLoadingOptions, type UseLoadingReturn, type UsePasteSpecialOptions, type UsePasteSpecialReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseSelectionHighlightOptions, type UseSelectionHighlightReturn, type UseTableSelectionOptions, type UseTableSelectionReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, type UseWheelZoomOptions, type UseWheelZoomReturn, VERSION, VariablePanel, type VariablePanelProps, type WordSelectionResult, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, addColumn, addRow, areSelectionStylesInjected, calculateFitDimensions, calculateProgress, calculateScrollToPage, calculateVisiblePage, canRenderFont, clampPageNumber, clampTableConfig, clampZoom, cleanWordHtml, clearSelection, copyParagraphs, copyRuns, countPageBreaks, createCellColorOption, createChangeTracker, createClipboardHandlers, createColumnBreak, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createDoubleClickWordSelector, createErrorResponse, createHorizontalRule, createLineBreak, createMockResponse, createPageBreak, createPageBreakParagraph, createPageBreakRun, createPageFormat, createSearchPattern, createSelectionChangeHandler, createSelectionFromDOM, createShadingFromColor, createTableContext, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, createToolbarItem, createToolbarItems, createTripleClickParagraphSelector, dataUrlToBlob,
|
|
4546
|
+
export { AIAction, ANNOTATION_PANEL_STYLES, AgentResponse, AlignmentButtons, type AlignmentButtonsProps, AnnotationPanel, type AutoSaveStatus, CLIPBOARD_TYPES, CellBackgroundPicker, type CellBackgroundPickerProps, type CellColorOption, type ClipboardContent, type ClipboardOptions, type ClipboardSelection, type ColorOption, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuProps, DEFAULT_CELL_COLORS, DEFAULT_SELECTION_STYLE, type KeyboardShortcut$1 as DialogKeyboardShortcut, Document, DocumentAgent, DocxEditor, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, DocxInput, type EditorPlugin, ErrorBoundary, type ErrorBoundaryProps, type ErrorContextValue, type ErrorNotification, ErrorProvider, type ErrorSeverity, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindReplaceOptions, type FindReplaceState, type FindResult, type FontOption, FontPicker, type FontPickerProps, FontSizePicker, type FontSizePickerProps, HIGH_CONTRAST_SELECTION_STYLE, type HighlightOptions, type HighlightRect, HorizontalRuler, type HorizontalRulerProps, type HyperlinkData, HyperlinkDialog, type HyperlinkDialogProps, INTERNAL_CLIPBOARD_TYPE, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, type InsertPosition, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, type KeyboardShortcut, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, PLUGIN_HOST_STYLES, type PageIndicatorPosition, type PageIndicatorVariant, PageNavigator, type PageNavigatorPosition, type PageNavigatorProps, type PageNavigatorVariant, PageNumberIndicator, type PageNumberIndicatorProps, type PanelConfig, Paragraph, ParagraphFormatting, ParseErrorDisplay, type ParseErrorDisplayProps, type ParsedClipboardContent, type PasteOption, PasteSpecialDialog, type PasteSpecialDialogProps, type PluginContext, PluginHost, type PluginHostProps, type PluginHostRef, type PluginPanelProps, PrintButton, type PrintButtonProps, type PrintOptions, PrintStyles, type RenderAsyncOptions, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, Run, RunContent, SELECTION_CSS_VARS, SYMBOL_CATEGORIES, type SavedDocumentData, SectionProperties, SelectionContext, type SelectionHighlightConfig, type SelectionOverlayProps, type SelectionRange, type ShortcutCategory, Style, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TABLE_DATA_ATTRIBUTES, TEMPLATE_DECORATION_STYLES, Table, type TableAction, TableBorderColorPicker, type TableBorderColorPickerProps, TableBorderPicker, type TableBorderPickerProps, TableBorderWidthPicker, type TableBorderWidthPickerProps, TableCell, TableCellFillPicker, type TableCellFillPickerProps, type TableConfig, type TableContext, TableInsertButtons, type TableInsertButtonsProps, TableMergeButton, type TableMergeButtonProps, TableMoreDropdown, type TableMoreDropdownProps, type TableSelection, type TableSelectionState, TableToolbar, type TableToolbarProps, type TagType, type TemplateTag, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, TextFormatting, Theme, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, UnsupportedFeatureWarning, type UnsupportedFeatureWarningProps, type UseAutoSaveOptions, type UseAutoSaveReturn, type UseClipboardOptions, type UseClipboardReturn, type UseFindReplaceReturn, type UseKeyboardShortcutsDialogOptions, type UseKeyboardShortcutsDialogReturn, type UseLoadingOptions, type UseLoadingReturn, type UsePasteSpecialOptions, type UsePasteSpecialReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseSelectionHighlightOptions, type UseSelectionHighlightReturn, type UseTableSelectionOptions, type UseTableSelectionReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, type UseWheelZoomOptions, type UseWheelZoomReturn, VERSION, VariablePanel, type VariablePanelProps, type WordSelectionResult, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, addColumn, addRow, areSelectionStylesInjected, calculateFitDimensions, calculateProgress, calculateScrollToPage, calculateVisiblePage, canRenderFont, clampPageNumber, clampTableConfig, clampZoom, cleanWordHtml, clearSelection, copyParagraphs, copyRuns, countPageBreaks, createCellColorOption, createChangeTracker, createClipboardHandlers, createColumnBreak, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createDoubleClickWordSelector, createErrorResponse, createHorizontalRule, createLineBreak, createMockResponse, createPageBreak, createPageBreakParagraph, createPageBreakRun, createPageFormat, createSearchPattern, createSelectionChangeHandler, createSelectionFromDOM, createShadingFromColor, createTableContext, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, createToolbarItem, createToolbarItems, createTripleClickParagraphSelector, dataUrlToBlob, delay, deleteColumn, deleteRow, describeShortcut, escapeRegexString, expandSelectionToWord, expandSelectionToWordBoundaries, extendSelectionTo, findAllMatches, findInDocument, findInParagraph, findNearestZoomPreset, findNextWordStart, findPageBreaks, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordAt, findWordBoundaries, findWordEnd, findWordStart, formatFileSize, formatLastSaveTime, formatPageOrdinal, formatPageRange$1 as formatPageRange, formatPageRange as formatPrintPageRange, formatShortcutKeys, formatStorageSize, formatTableDimensions, formatZoom, generateOverlayElements, generateSelectionCSS, getActionShortcut, getAllActions, getAllCategories, getAllPositions as getAllIndicatorPositions, getAllVariants as getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getAutoSaveStatusLabel, getAutoSaveStorageSize, getCategoryLabel, getCellAt, getCellColorName, getColorFromShading, getColumnCount, getCommonShortcuts, getContrastingTextColor, getDefaultActions, getDefaultCellColors, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultPrintOptions, getDefaultShortcuts, getDefaultTextContextMenuItems, getHighlightRectStyle, getImageAcceptString, getImageDimensions, getLoadedFonts, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getMergedSelectionRects, getNavigationShortcutDescriptions, getNavigationShortcuts, getNextZoomPreset, getPageProgress, getPasteOption, getPreviousZoomPreset, getRecommendedPriority, getRulerDimensions, getSelectedText, getSelectionBoundingRect, getSelectionInfo, getSelectionRects, getSelectionRuns, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolInfo as getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTemplateTags as getTemplatePluginTags, getTextActionLabel, getTextActionShortcut, getUserFriendlyMessage, getVariantLabel, getWordAt, getWordAtCursor, getZoomPresets, handleClickForMultiClick, handleNavigationKey, handlePasteEvent, hasActiveSelection, hasPageBreakBefore, highlightTextRange, htmlToRuns, injectSelectionStyles, insertHorizontalRule, insertPageBreak, isActionAvailable, isAutoSaveSupported, isBreakContent, isColumnBreak, isDefaultCellColor, isEditorHtml, isEmptySearch, isFirstPage, isFontLoaded, isLoading as isFontsLoading, isLastPage, isLineBreak, isNavigationKey, isPageBreak, isParseError, isPasteSpecialShortcut, isPrintSupported, isPunctuation, isSelectionBackwards, isSelectionWithin, isTextActionAvailable, isValidImageFile, isValidPageNumber, isValidTableConfig, isWhitespace$1 as isWhitespace, isWhitespace as isWhitespaceChar, isWordCharacter as isWordChar, isWordCharacter$1 as isWordCharacter, isWordHtml, isZoomPreset, loadFont, loadFontFromBuffer, loadFonts, matchesShortcut, mergeAdjacentRects, mergeCells, moveByWord, moveToLineEdge, normalizeSelectionDirection, onFontsLoaded, openPrintWindow, paragraphsToClipboardContent, parseClipboardHtml, parseMarginFromUnits, parseNavigationAction, parsePageInput, parsePageRange, parseZoom, positionToMargin, preloadCommonFonts, readFromClipboard, removePageBreak, removeSelectionStyles, renderAsync, replaceAllInContent, replaceFirstInContent, runsToClipboardContent, scrollToMatch, searchSymbols, selectParagraphAtCursor, selectRange, selectWordAtCursor, selectWordInTextNode, setHoveredElement, setSelectedElement, setSelectionPosition, splitCell, symbolFromCodePoint, templatePlugin, templatePluginKey, triggerPrint, useAutoSave, useClipboard, useContextMenu, useErrorNotifications, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useSelectionHighlight, useTableSelection, useTextContextMenu, useUnsavedChanges, useWheelZoom, writeToClipboard };
|