@eigenpal/docx-js-editor 0.0.17 → 0.0.20
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 +83 -0
- package/dist/ClipboardManager-D6dkOFg6.d.ts +436 -0
- package/dist/ClipboardManager-EZ0C6Onq.d.cts +436 -0
- package/dist/DocumentAgent-B0EC8lPC.d.cts +412 -0
- package/dist/DocumentAgent-BcCDg7i2.d.ts +412 -0
- package/dist/{FindReplaceDialog-MMDEJORP.js → FindReplaceDialog-AWQXKEUQ.js} +2 -2
- package/dist/{FindReplaceDialog-MMDEJORP.js.map → FindReplaceDialog-AWQXKEUQ.js.map} +1 -1
- package/dist/{FindReplaceDialog-K4GRE4JB.cjs → FindReplaceDialog-I4SZDSVP.cjs} +2 -2
- package/dist/{FindReplaceDialog-K4GRE4JB.cjs.map → FindReplaceDialog-I4SZDSVP.cjs.map} +1 -1
- package/dist/{FootnotePropertiesDialog-V3YOIJCV.cjs → FootnotePropertiesDialog-73VT2ZVZ.cjs} +2 -2
- package/dist/{FootnotePropertiesDialog-V3YOIJCV.cjs.map → FootnotePropertiesDialog-73VT2ZVZ.cjs.map} +1 -1
- package/dist/{FootnotePropertiesDialog-HG4267LR.js → FootnotePropertiesDialog-ZM3EF3EF.js} +2 -2
- package/dist/{FootnotePropertiesDialog-HG4267LR.js.map → FootnotePropertiesDialog-ZM3EF3EF.js.map} +1 -1
- package/dist/{HyperlinkDialog-SCSX4RP7.js → HyperlinkDialog-BA25XUT5.js} +2 -2
- package/dist/{HyperlinkDialog-SCSX4RP7.js.map → HyperlinkDialog-BA25XUT5.js.map} +1 -1
- package/dist/{HyperlinkDialog-YPKURBZK.cjs → HyperlinkDialog-V63LPOT2.cjs} +2 -2
- package/dist/{HyperlinkDialog-YPKURBZK.cjs.map → HyperlinkDialog-V63LPOT2.cjs.map} +1 -1
- package/dist/{ImagePositionDialog-CJYJ35PI.js → ImagePositionDialog-AIAMKPFK.js} +2 -2
- package/dist/{ImagePositionDialog-CJYJ35PI.js.map → ImagePositionDialog-AIAMKPFK.js.map} +1 -1
- package/dist/{ImagePositionDialog-IMVI7EXA.cjs → ImagePositionDialog-KMK7ROV2.cjs} +2 -2
- package/dist/{ImagePositionDialog-IMVI7EXA.cjs.map → ImagePositionDialog-KMK7ROV2.cjs.map} +1 -1
- package/dist/{ImagePropertiesDialog-P7WN2ALR.js → ImagePropertiesDialog-ERFCUVCW.js} +2 -2
- package/dist/{ImagePropertiesDialog-P7WN2ALR.js.map → ImagePropertiesDialog-ERFCUVCW.js.map} +1 -1
- package/dist/{ImagePropertiesDialog-YS4KJRN7.cjs → ImagePropertiesDialog-USMMRK6X.cjs} +2 -2
- package/dist/{ImagePropertiesDialog-YS4KJRN7.cjs.map → ImagePropertiesDialog-USMMRK6X.cjs.map} +1 -1
- package/dist/{TablePropertiesDialog-CUQXUBQN.cjs → TablePropertiesDialog-72CIUAZT.cjs} +2 -2
- package/dist/{TablePropertiesDialog-CUQXUBQN.cjs.map → TablePropertiesDialog-72CIUAZT.cjs.map} +1 -1
- package/dist/{TablePropertiesDialog-ZHAYVHPZ.js → TablePropertiesDialog-EMUEVYB3.js} +2 -2
- package/dist/{TablePropertiesDialog-ZHAYVHPZ.js.map → TablePropertiesDialog-EMUEVYB3.js.map} +1 -1
- package/dist/agentApi-BFVyKagE.d.cts +2227 -0
- package/dist/agentApi-BFVyKagE.d.ts +2227 -0
- package/dist/chunk-2CHPKB5A.cjs +112 -0
- package/dist/chunk-2CHPKB5A.cjs.map +1 -0
- package/dist/chunk-2QOEHCBX.js +2 -0
- package/dist/chunk-2QOEHCBX.js.map +1 -0
- package/dist/chunk-4QT5LPBA.cjs +24 -0
- package/dist/chunk-4QT5LPBA.cjs.map +1 -0
- package/dist/chunk-5DYSI4O4.cjs +60 -0
- package/dist/chunk-5DYSI4O4.cjs.map +1 -0
- package/dist/chunk-5FJXHXFV.cjs +2 -0
- package/dist/chunk-5FJXHXFV.cjs.map +1 -0
- package/dist/chunk-6FEWNF6B.js +4 -0
- package/dist/chunk-6FEWNF6B.js.map +1 -0
- package/dist/chunk-6LF5HZCV.js +10 -0
- package/dist/chunk-6LF5HZCV.js.map +1 -0
- package/dist/chunk-7JSPKVOW.js +2 -0
- package/dist/chunk-7JSPKVOW.js.map +1 -0
- package/dist/chunk-C33XDRDJ.cjs +28 -0
- package/dist/chunk-C33XDRDJ.cjs.map +1 -0
- package/dist/chunk-CV5WFE7K.js +24 -0
- package/dist/chunk-CV5WFE7K.js.map +1 -0
- package/dist/chunk-CXJRNISO.js +2 -0
- package/dist/chunk-CXJRNISO.js.map +1 -0
- package/dist/chunk-DP6Q75ZD.js +28 -0
- package/dist/chunk-DP6Q75ZD.js.map +1 -0
- package/dist/chunk-FDANI5P4.cjs +2 -0
- package/dist/chunk-FDANI5P4.cjs.map +1 -0
- package/dist/chunk-FGVGZLBL.js +2 -0
- package/dist/chunk-FGVGZLBL.js.map +1 -0
- package/dist/chunk-GJ4GKSDU.cjs +2 -0
- package/dist/chunk-GJ4GKSDU.cjs.map +1 -0
- package/dist/chunk-GWBTKVFD.cjs +2 -0
- package/dist/chunk-GWBTKVFD.cjs.map +1 -0
- package/dist/chunk-JOYPFQW2.js +2 -0
- package/dist/chunk-JOYPFQW2.js.map +1 -0
- package/dist/chunk-L54YNLSE.js +2 -0
- package/dist/chunk-L54YNLSE.js.map +1 -0
- package/dist/chunk-LPGMLJMO.js +259 -0
- package/dist/chunk-LPGMLJMO.js.map +1 -0
- package/dist/chunk-OHG7ROFC.js +11 -0
- package/dist/chunk-OHG7ROFC.js.map +1 -0
- package/dist/chunk-PANKMCFX.cjs +4 -0
- package/dist/chunk-PANKMCFX.cjs.map +1 -0
- package/dist/chunk-QDV75OJ4.js +112 -0
- package/dist/chunk-QDV75OJ4.js.map +1 -0
- package/dist/chunk-QEBO3EQP.cjs +2 -0
- package/dist/{chunk-V3MCDVZE.cjs.map → chunk-QEBO3EQP.cjs.map} +1 -1
- package/dist/chunk-QVIZ775M.cjs +259 -0
- package/dist/chunk-QVIZ775M.cjs.map +1 -0
- package/dist/chunk-RMUMR42R.cjs +10 -0
- package/dist/chunk-RMUMR42R.cjs.map +1 -0
- package/dist/chunk-T2HQYRA7.cjs +2 -0
- package/dist/chunk-T2HQYRA7.cjs.map +1 -0
- package/dist/chunk-ULXNEG66.js +60 -0
- package/dist/chunk-ULXNEG66.js.map +1 -0
- package/dist/chunk-WD2HTKRR.cjs +2 -0
- package/dist/chunk-WD2HTKRR.cjs.map +1 -0
- package/dist/chunk-XZNOV52K.cjs +11 -0
- package/dist/chunk-XZNOV52K.cjs.map +1 -0
- package/dist/chunk-Y6VCTLCJ.js +2 -0
- package/dist/{chunk-AL62KQYJ.js.map → chunk-Y6VCTLCJ.js.map} +1 -1
- package/dist/{TableToolbar-RHX9L4h9.d.ts → clipboard-CqE-UZ2d.d.cts} +125 -2
- package/dist/{TableToolbar-RHX9L4h9.d.cts → clipboard-beGtyabO.d.ts} +125 -2
- package/dist/colorResolver-B5YbO_a4.d.ts +618 -0
- package/dist/colorResolver-Cu46bSKr.d.cts +618 -0
- package/dist/core-plugins-reexport.cjs +1 -1
- package/dist/core-plugins-reexport.cjs.map +1 -1
- package/dist/core-plugins-reexport.d.cts +31 -1
- package/dist/core-plugins-reexport.d.ts +31 -1
- package/dist/core-plugins-reexport.js +1 -1
- package/dist/core-plugins-reexport.js.map +1 -1
- package/dist/core-reexport.cjs +1 -1
- package/dist/core-reexport.cjs.map +1 -1
- package/dist/core-reexport.d.cts +309 -4
- package/dist/core-reexport.d.ts +309 -4
- package/dist/core-reexport.js +1 -1
- package/dist/core-reexport.js.map +1 -1
- package/dist/executor-K5RXUTTR.js +2 -0
- package/dist/executor-K5RXUTTR.js.map +1 -0
- package/dist/executor-XIPIU3H4.cjs +2 -0
- package/dist/executor-XIPIU3H4.cjs.map +1 -0
- package/dist/fontLoader-CFKpg0Ri.d.ts +176 -0
- package/dist/fontLoader-HZYfILUm.d.cts +176 -0
- package/dist/headless-reexport.cjs +4 -1
- package/dist/headless-reexport.cjs.map +1 -1
- package/dist/headless-reexport.d.cts +195 -1
- package/dist/headless-reexport.d.ts +195 -1
- package/dist/headless-reexport.js +4 -1
- package/dist/headless-reexport.js.map +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +261 -30
- package/dist/index.d.ts +261 -30
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/mcp-reexport.cjs +16 -1
- package/dist/mcp-reexport.cjs.map +1 -1
- package/dist/mcp-reexport.d.cts +156 -1
- package/dist/mcp-reexport.d.ts +156 -1
- package/dist/mcp-reexport.js +16 -1
- package/dist/mcp-reexport.js.map +1 -1
- package/dist/processTemplate-G37IM66O.js +2 -0
- package/dist/processTemplate-G37IM66O.js.map +1 -0
- package/dist/processTemplate-RFBGVH7T.cjs +2 -0
- package/dist/processTemplate-RFBGVH7T.cjs.map +1 -0
- package/dist/react-BjOCdeTs.d.ts +1027 -0
- package/dist/react-UzAn4o7l.d.cts +1027 -0
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.css +2 -0
- package/dist/react.css.map +1 -0
- package/dist/react.d.cts +10 -860
- package/dist/react.d.ts +10 -860
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/registry-CV6nYWqP.d.ts +165 -0
- package/dist/registry-DjacfR6Q.d.cts +165 -0
- package/dist/selectionRects-6DU7HN7E.js +2 -0
- package/dist/selectionRects-6DU7HN7E.js.map +1 -0
- package/dist/selectionRects-YZSC24ZP.cjs +2 -0
- package/dist/selectionRects-YZSC24ZP.cjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/types-Bnp8rvJn.d.cts +310 -0
- package/dist/types-DwZ3xysp.d.ts +310 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.cts +3 -5
- package/dist/ui.d.ts +3 -5
- package/dist/ui.js +1 -1
- package/dist/variableDetector-BaDeXz7D.d.ts +173 -0
- package/dist/variableDetector-CMhJtM96.d.cts +173 -0
- package/package.json +11 -3
- package/dist/chunk-7FEY3YWC.cjs +0 -3
- package/dist/chunk-7FEY3YWC.cjs.map +0 -1
- package/dist/chunk-AL62KQYJ.js +0 -2
- package/dist/chunk-MXGYESPA.cjs +0 -178
- package/dist/chunk-MXGYESPA.cjs.map +0 -1
- package/dist/chunk-NMYD4OJZ.js +0 -3
- package/dist/chunk-NMYD4OJZ.js.map +0 -1
- package/dist/chunk-OD33FUTO.js +0 -178
- package/dist/chunk-OD33FUTO.js.map +0 -1
- package/dist/chunk-V3MCDVZE.cjs +0 -2
- package/dist/chunk-VIEW4NAF.js +0 -112
- package/dist/chunk-VIEW4NAF.js.map +0 -1
- package/dist/chunk-ZX4CSEL3.cjs +0 -112
- package/dist/chunk-ZX4CSEL3.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,36 +1,267 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { DocxInput, toArrayBuffer } from '
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { AgentContextOptions, getAgentContext, getDocumentSummary } from '@eigenpal/docx-core/agent/context';
|
|
7
|
-
export { ExtendedSelectionContext, SelectionContextOptions, buildExtendedSelectionContext, buildSelectionContext } from '@eigenpal/docx-core/agent/selectionContext';
|
|
8
|
-
export { parseDocx } from '@eigenpal/docx-core/docx/parser';
|
|
9
|
-
export { serializeDocumentBody, serializeDocument as serializeDocx, serializeSectionProperties } from '@eigenpal/docx-core/docx/serializer/documentSerializer';
|
|
10
|
-
export { ProcessTemplateOptions, ProcessTemplateResult, getTemplateTags, processTemplate, processTemplateAsBlob, processTemplateDetailed, validateTemplate } from '@eigenpal/docx-core/utils/processTemplate';
|
|
11
|
-
export { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from '@eigenpal/docx-core/utils/createDocument';
|
|
12
|
-
export { canRenderFont, getLoadedFonts, isFontLoaded, isLoading as isFontsLoading, loadFont, loadFontFromBuffer, loadFonts, onFontsLoaded, preloadCommonFonts } from '@eigenpal/docx-core/utils/fontLoader';
|
|
1
|
+
import { R as ReactEditorPlugin } from './react-UzAn4o7l.cjs';
|
|
2
|
+
export { D as DEFAULT_SELECTION_STYLE, a as DocxEditor, b as DocxEditorHandle, c as DocxEditorProps, d as DocxEditorRef, E as EditorPlugin, e as ErrorBoundary, f as ErrorBoundaryProps, g as ErrorContextValue, h as ErrorProvider, H as HIGH_CONTRAST_SELECTION_STYLE, i as HighlightRect, P as PLUGIN_HOST_STYLES, j as ParseErrorDisplay, k as ParseErrorDisplayProps, l as PluginContext, m as PluginHost, n as PluginHostProps, o as PluginHostRef, p as RenderAsyncOptions, S as SELECTION_CSS_VARS, q as SelectionHighlightConfig, r as SelectionOverlayProps, s as SelectionRange, T as TableSelectionState, U as UnsupportedFeatureWarning, t as UnsupportedFeatureWarningProps, u as UseAutoSaveOptions, v as UseAutoSaveReturn, w as UseClipboardOptions, x as UseClipboardReturn, y as UseSelectionHighlightOptions, z as UseSelectionHighlightReturn, A as UseTableSelectionOptions, B as UseTableSelectionReturn, C as UseWheelZoomOptions, F as UseWheelZoomReturn, Z as ZOOM_PRESETS, G as areSelectionStylesInjected, I as clampZoom, J as clearSelection, K as createSelectionChangeHandler, L as findNearestZoomPreset, M as formatZoom, N as generateOverlayElements, O as generateSelectionCSS, Q as getHighlightRectStyle, V as getMergedSelectionRects, W as getNextZoomPreset, X as getPreviousZoomPreset, Y as getSelectedText, _ as getSelectionBoundingRect, $ as getSelectionRects, a0 as getUserFriendlyMessage, a1 as getZoomPresets, a2 as hasActiveSelection, a3 as highlightTextRange, a4 as injectSelectionStyles, a5 as isParseError, a6 as isSelectionBackwards, a7 as isSelectionWithin, a8 as isZoomPreset, a9 as mergeAdjacentRects, aa as normalizeSelectionDirection, ab as parseZoom, ac as removeSelectionStyles, ad as renderAsync, ae as selectRange, af as useAutoSave, ag as useClipboard, ah as useErrorNotifications, ai as useSelectionHighlight, aj as useTableSelection, ak as useWheelZoom } from './react-UzAn4o7l.cjs';
|
|
3
|
+
export { D as DocumentAgent, f as DocxInput, t as toArrayBuffer } from './DocumentAgent-B0EC8lPC.cjs';
|
|
4
|
+
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, M as processTemplate, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-Cu46bSKr.cjs';
|
|
5
|
+
export { I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, i as findPageBreaks, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, q as isFontsLoading, r as isLineBreak, s as isPageBreak, t as loadFont, u as loadFontFromBuffer, v as loadFonts, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from './fontLoader-HZYfILUm.cjs';
|
|
13
6
|
export { AlignmentButtons, AlignmentButtonsProps, CellBackgroundPicker, CellBackgroundPickerProps, CellColorOption, ColorOption, ColorPicker, ColorPickerProps, ContextMenu, ContextMenuProps, DEFAULT_CELL_COLORS, DialogKeyboardShortcut, FindMatch, FindOptions, FindReplaceDialog, FindReplaceDialogProps, FindReplaceOptions, FindReplaceState, FindResult, FontOption, FontPicker, FontPickerProps, FontSizePicker, FontSizePickerProps, HighlightOptions, HorizontalRuler, HorizontalRulerProps, HyperlinkData, HyperlinkDialog, HyperlinkDialogProps, ImageData, IndicatorPosition, IndicatorVariant, InsertImageDialog, InsertImageDialogProps, InsertSymbolDialog, InsertSymbolDialogProps, InsertTableDialog, InsertTableDialogProps, KeyboardShortcutsDialog, KeyboardShortcutsDialogProps, LineSpacingOption, LineSpacingPicker, LineSpacingPickerProps, ListButtons, ListButtonsProps, ListState, LoadingIndicator, LoadingIndicatorProps, LoadingOperation, LoadingSize, LoadingVariant, PasteOption, PasteSpecialDialog, PasteSpecialDialogProps, ResponsePreview, ResponsePreviewProps, ResponsePreviewState, ResponsiveToolbar, ResponsiveToolbarGroup, ResponsiveToolbarGroupProps, ResponsiveToolbarProps, SYMBOL_CATEGORIES, ShortcutCategory, StyleOption, StylePicker, StylePickerProps, SymbolCategory, TableBorderColorPicker, TableBorderColorPickerProps, TableBorderPicker, TableBorderPickerProps, TableBorderWidthPicker, TableBorderWidthPickerProps, TableCellFillPicker, TableCellFillPickerProps, TableConfig, TableInsertButtons, TableInsertButtonsProps, TableMergeButton, TableMergeButtonProps, TableMoreDropdown, TableMoreDropdownProps, TextContextAction, TextContextMenu, TextContextMenuItem, TextContextMenuProps, Toolbar, ToolbarButton, ToolbarGroup, ToolbarItem, ToolbarItemPriority, ToolbarProps, ToolbarSeparator, UnsavedIndicator, UnsavedIndicatorProps, UseFindReplaceReturn, UseKeyboardShortcutsDialogOptions, UseKeyboardShortcutsDialogReturn, UseLoadingOptions, UseLoadingReturn, UsePasteSpecialOptions, UsePasteSpecialReturn, UseResponsiveToolbarOptions, UseResponsiveToolbarReturn, UseTextContextMenuOptions, UseTextContextMenuReturn, UseUnsavedChangesOptions, UseUnsavedChangesReturn, ZoomControl, ZoomControlProps, calculateFitDimensions, clampTableConfig, createCellColorOption, createChangeTracker, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createErrorResponse, createMockResponse, createSearchPattern, createShadingFromColor, createToolbarItem, createToolbarItems, dataUrlToBlob, delay, escapeRegexString, findAllMatches, findInDocument, findInParagraph, formatFileSize, formatShortcutKeys, formatTableDimensions, getActionShortcut, getAllActions, getAllCategories, getAllIndicatorPositions, getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getCategoryLabel, getCellColorName, getColorFromShading, getCommonShortcuts, getContrastingTextColor, getDefaultActions, getDefaultCellColors, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultShortcuts, getDefaultTextContextMenuItems, getImageAcceptString, getImageDimensions, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getPasteOption, getRecommendedPriority, getRulerDimensions, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTextActionLabel, getTextActionShortcut, getVariantLabel, isActionAvailable, isDefaultCellColor, isEmptySearch, isPasteSpecialShortcut, isTextActionAvailable, isValidImageFile, isValidTableConfig, parseMarginFromUnits, positionToMargin, replaceAllInContent, replaceFirstInContent, scrollToMatch, searchSymbols, symbolFromCodePoint, useContextMenu, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useTextContextMenu, useUnsavedChanges } from './ui.cjs';
|
|
14
|
-
export { P as PageIndicatorPosition,
|
|
15
|
-
export { BlockContent, BookmarkEnd, BookmarkStart, Document, DocumentBody, DocxPackage, Endnote, Field, FooterReference, Footnote, HeaderFooter, HeaderReference, Hyperlink, Image, ListLevel, NumberingDefinitions, Paragraph, ParagraphFormatting, Relationship, Run, RunContent, SectionProperties, Shape, Style, StyleDefinitions, Table, TableCell, TableRow, TextBox, TextContent, TextFormatting, Theme, ThemeColorScheme, ThemeFont, ThemeFontScheme } from '
|
|
16
|
-
export { AIAction, AIActionRequest, AgentCommand, AgentContext, AgentResponse, ApplyStyleCommand, DeleteTextCommand, FormatTextCommand, InsertHyperlinkCommand, InsertImageCommand, InsertTableCommand, InsertTextCommand, ParagraphContext, Position, Range, ReplaceTextCommand, SelectionContext, SetVariableCommand, SuggestedAction } from '@eigenpal/docx-core/types/agentApi';
|
|
17
|
-
export { emuToPixels, emuToTwips, formatPx, halfPointsToPixels, pixelsToEmu, pixelsToTwips, pointsToPixels, twipsToEmu, twipsToPixels } from '@eigenpal/docx-core/utils/units';
|
|
18
|
-
export { blendColors, colorsEqual, createRgbColor, createThemeColor, darkenColor, getContrastingColor, isBlack, isWhite, lightenColor, parseColorString, resolveColor, resolveHighlightColor, resolveShadingColor } from '@eigenpal/docx-core/utils/colorResolver';
|
|
19
|
-
export { InsertPosition, countPageBreaks, createColumnBreak, createHorizontalRule, createLineBreak, createPageBreak, createPageBreakParagraph, createPageBreakRun, findPageBreaks, hasPageBreakBefore, insertHorizontalRule, insertPageBreak, isBreakContent, isColumnBreak, isLineBreak, isPageBreak, removePageBreak } from '@eigenpal/docx-core/utils/insertOperations';
|
|
20
|
-
export { DEFAULT_SELECTION_STYLE, HIGH_CONTRAST_SELECTION_STYLE, HighlightRect, SELECTION_CSS_VARS, SelectionHighlightConfig, SelectionRange, areSelectionStylesInjected, clearSelection, createSelectionChangeHandler, generateSelectionCSS, getHighlightRectStyle, getMergedSelectionRects, getSelectedText, getSelectionBoundingRect, getSelectionRects, hasActiveSelection, highlightTextRange, injectSelectionStyles, isSelectionBackwards, isSelectionWithin, mergeAdjacentRects, normalizeSelectionDirection, removeSelectionStyles, selectRange } from '@eigenpal/docx-core/utils/selectionHighlight';
|
|
21
|
-
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, isWhitespace, isWordCharacter, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from '@eigenpal/docx-core/utils/textSelection';
|
|
22
|
-
export { KeyboardShortcut, NAVIGATION_SHORTCUTS, NavigationAction, NavigationDirection, NavigationUnit, describeShortcut, expandSelectionToWord, extendSelectionTo, findNextWordStart, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordEnd, findWordStart, getNavigationShortcutDescriptions, getSelectionInfo, getWordAtCursor, handleNavigationKey, isNavigationKey, isPunctuation, isWhitespace as isWhitespaceChar, isWordCharacter as isWordChar, matchesShortcut, moveByWord, moveToLineEdge, parseNavigationAction, setSelectionPosition } from '@eigenpal/docx-core/utils/keyboardNavigation';
|
|
23
|
-
export { CLIPBOARD_TYPES, ClipboardContent, ClipboardOptions, INTERNAL_CLIPBOARD_TYPE, ParsedClipboardContent, cleanWordHtml, copyParagraphs, copyRuns, createClipboardHandlers, handlePasteEvent, htmlToRuns, isEditorHtml, isWordHtml, paragraphsToClipboardContent, parseClipboardHtml, readFromClipboard, runsToClipboardContent, writeToClipboard } from '@eigenpal/docx-core/utils/clipboard';
|
|
7
|
+
export { C as CLIPBOARD_TYPES, a as ClipboardContent, b as ClipboardOptions, I as INTERNAL_CLIPBOARD_TYPE, P as PageIndicatorPosition, c as PageIndicatorVariant, d as PageNavigator, e as PageNavigatorPosition, f as PageNavigatorProps, g as PageNavigatorVariant, h as PageNumberIndicator, i as PageNumberIndicatorProps, j as ParsedClipboardContent, k as PrintButton, l as PrintButtonProps, m as PrintOptions, n as PrintStyles, T as TableAction, o as TableContext, p as TableSelection, q as TableToolbar, r as TableToolbarProps, s as addColumn, t as addRow, u as calculateProgress, v as calculateScrollToPage, w as calculateVisiblePage, x as clampPageNumber, y as cleanWordHtml, z as copyParagraphs, A as copyRuns, B as createClipboardHandlers, D as createPageFormat, E as createTableContext, F as deleteColumn, G as deleteRow, H as formatPageOrdinal, J as formatPageRange, K as formatPrintPageRange, L as getCellAt, M as getColumnCount, N as getDefaultPrintOptions, O as getNavigationShortcuts, Q as getPageProgress, R as handlePasteEvent, S as htmlToRuns, U as isEditorHtml, V as isFirstPage, W as isLastPage, X as isPrintSupported, Y as isValidPageNumber, Z as isWordHtml, _ as mergeCells, $ as openPrintWindow, a0 as paragraphsToClipboardContent, a1 as parseClipboardHtml, a2 as parsePageInput, a3 as parsePageRange, a4 as readFromClipboard, a5 as runsToClipboardContent, a6 as splitCell, a7 as triggerPrint, a8 as writeToClipboard } from './clipboard-CqE-UZ2d.cjs';
|
|
8
|
+
export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, l as BlockContent, a3 as BookmarkEnd, a4 as BookmarkStart, n as DeleteTextCommand, D as Document, d as DocumentBody, o as DocxPackage, E as Endnote, a5 as Field, a6 as FooterReference, F as Footnote, q as FormatTextCommand, a7 as HeaderFooter, a8 as HeaderReference, H as Hyperlink, I as Image, r as InsertHyperlinkCommand, s as InsertImageCommand, t as InsertTableCommand, u as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, a as Paragraph, v as ParagraphContext, w as ParagraphFormatting, P as Position, R as Range, y as Relationship, z as ReplaceTextCommand, b as Run, c as RunContent, C as SectionProperties, G as SelectionContext, J as SetVariableCommand, a9 as Shape, K as Style, M as StyleDefinitions, Q as SuggestedAction, e as Table, U as TableCell, V as TableRow, aa as TextBox, W as TextContent, T as TextFormatting, X as Theme, ab as ThemeColorScheme, ac as ThemeFont, ad as ThemeFontScheme } from './agentApi-BFVyKagE.cjs';
|
|
24
9
|
import * as prosemirror_state from 'prosemirror-state';
|
|
25
10
|
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
26
11
|
import { DecorationSet, EditorView } from 'prosemirror-view';
|
|
27
|
-
export { CorePlugin, McpSession, McpToolDefinition,
|
|
12
|
+
export { C as CorePlugin, e as McpSession, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult } from './types-Bnp8rvJn.cjs';
|
|
13
|
+
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-DjacfR6Q.cjs';
|
|
14
|
+
export { docxtemplaterPlugin } from './core-plugins-reexport.cjs';
|
|
28
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
29
|
-
import { PluginPanelProps } from '
|
|
30
|
-
export {
|
|
16
|
+
import { k as PluginPanelProps } from './ClipboardManager-EZ0C6Onq.cjs';
|
|
17
|
+
export { d as AutoSaveStatus, e as ClipboardSelection, h as ErrorNotification, i as ErrorSeverity, j as PanelConfig, l as PositionCoordinates, R as RenderedDomContext, m as SavedDocumentData, T as TABLE_DATA_ATTRIBUTES, p as createSelectionFromDOM, t as formatLastSaveTime, u as formatStorageSize, v as getAutoSaveStatusLabel, w as getAutoSaveStorageSize, x as getSelectionRuns, z as isAutoSaveSupported } from './ClipboardManager-EZ0C6Onq.cjs';
|
|
31
18
|
import 'react';
|
|
32
|
-
import '
|
|
33
|
-
|
|
19
|
+
import 'prosemirror-model';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Text Selection Utilities
|
|
23
|
+
*
|
|
24
|
+
* Utilities for word-level and paragraph-level text selection.
|
|
25
|
+
* Used for double-click (word) and triple-click (paragraph) selection.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Check if a character is a word character
|
|
29
|
+
*/
|
|
30
|
+
declare function isWordCharacter$1(char: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Check if a character is whitespace
|
|
33
|
+
*/
|
|
34
|
+
declare function isWhitespace$1(char: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Find word boundaries around a position in text
|
|
37
|
+
* Returns [startIndex, endIndex] inclusive start, exclusive end
|
|
38
|
+
*/
|
|
39
|
+
declare function findWordBoundaries(text: string, position: number): [number, number];
|
|
40
|
+
/**
|
|
41
|
+
* Get the word at a position in text
|
|
42
|
+
*/
|
|
43
|
+
declare function getWordAt(text: string, position: number): string;
|
|
44
|
+
/**
|
|
45
|
+
* Word selection result
|
|
46
|
+
*/
|
|
47
|
+
interface WordSelectionResult {
|
|
48
|
+
/** The selected word */
|
|
49
|
+
word: string;
|
|
50
|
+
/** Start index in the text (inclusive) */
|
|
51
|
+
startIndex: number;
|
|
52
|
+
/** End index in the text (exclusive) */
|
|
53
|
+
endIndex: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Find the word at a position and return detailed info
|
|
57
|
+
*/
|
|
58
|
+
declare function findWordAt(text: string, position: number): WordSelectionResult;
|
|
59
|
+
/**
|
|
60
|
+
* Select a word at the current cursor position using the browser's native APIs.
|
|
61
|
+
* This works reliably across different browsers and handles contentEditable well.
|
|
62
|
+
*/
|
|
63
|
+
declare function selectWordAtCursor(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Select a word in a specific text node at the given offset
|
|
66
|
+
*/
|
|
67
|
+
declare function selectWordInTextNode(textNode: Text, offset: number): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Expand the current selection to word boundaries.
|
|
70
|
+
* If there's a collapsed selection (cursor), selects the word at cursor.
|
|
71
|
+
* If there's an existing selection, expands to include complete words.
|
|
72
|
+
*/
|
|
73
|
+
declare function expandSelectionToWordBoundaries(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Select the entire paragraph containing the current selection.
|
|
76
|
+
* Looks for the nearest element with [data-paragraph-index] attribute.
|
|
77
|
+
*/
|
|
78
|
+
declare function selectParagraphAtCursor(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Handle click event for multi-click detection.
|
|
81
|
+
* Call this in your click handler.
|
|
82
|
+
* Returns the click count (1 = single, 2 = double, 3 = triple).
|
|
83
|
+
*/
|
|
84
|
+
declare function handleClickForMultiClick(event: MouseEvent): number;
|
|
85
|
+
/**
|
|
86
|
+
* Create a double-click handler that selects words.
|
|
87
|
+
* Returns a function that should be called on dblclick events.
|
|
88
|
+
*/
|
|
89
|
+
declare function createDoubleClickWordSelector(): (event: MouseEvent) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Create a triple-click handler that selects paragraphs.
|
|
92
|
+
* This uses our custom click counting since browsers have inconsistent triple-click.
|
|
93
|
+
*/
|
|
94
|
+
declare function createTripleClickParagraphSelector(): (event: MouseEvent) => void;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Keyboard Navigation Utilities
|
|
98
|
+
*
|
|
99
|
+
* Provides enhanced keyboard navigation for the editor:
|
|
100
|
+
* - Ctrl+Left/Right: Move by word
|
|
101
|
+
* - Home/End: Move to start/end of line
|
|
102
|
+
* - Ctrl+Home/End: Move to start/end of document
|
|
103
|
+
* - Ctrl+Shift+Left/Right: Select by word
|
|
104
|
+
* - Shift+Home/End: Select to start/end of line
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* Navigation direction
|
|
108
|
+
*/
|
|
109
|
+
type NavigationDirection = 'left' | 'right' | 'up' | 'down';
|
|
110
|
+
/**
|
|
111
|
+
* Navigation unit
|
|
112
|
+
*/
|
|
113
|
+
type NavigationUnit = 'character' | 'word' | 'line' | 'paragraph' | 'document';
|
|
114
|
+
/**
|
|
115
|
+
* Keyboard navigation action
|
|
116
|
+
*/
|
|
117
|
+
interface NavigationAction {
|
|
118
|
+
/** Direction to navigate */
|
|
119
|
+
direction: NavigationDirection;
|
|
120
|
+
/** Unit of movement */
|
|
121
|
+
unit: NavigationUnit;
|
|
122
|
+
/** Whether to extend selection */
|
|
123
|
+
extend: boolean;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Keyboard shortcut definition
|
|
127
|
+
*/
|
|
128
|
+
interface KeyboardShortcut {
|
|
129
|
+
key: string;
|
|
130
|
+
ctrlKey?: boolean;
|
|
131
|
+
metaKey?: boolean;
|
|
132
|
+
shiftKey?: boolean;
|
|
133
|
+
altKey?: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Check if a character is a word character (letter, digit, or underscore)
|
|
137
|
+
*/
|
|
138
|
+
declare function isWordCharacter(char: string): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Check if a character is whitespace
|
|
141
|
+
*/
|
|
142
|
+
declare function isWhitespace(char: string): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Check if a character is a punctuation character
|
|
145
|
+
*/
|
|
146
|
+
declare function isPunctuation(char: string): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Find the start of the current or previous word
|
|
149
|
+
*/
|
|
150
|
+
declare function findWordStart(text: string, position: number): number;
|
|
151
|
+
/**
|
|
152
|
+
* Find the end of the current or next word
|
|
153
|
+
*/
|
|
154
|
+
declare function findWordEnd(text: string, position: number): number;
|
|
155
|
+
/**
|
|
156
|
+
* Find the next word start (for Ctrl+Right navigation)
|
|
157
|
+
*/
|
|
158
|
+
declare function findNextWordStart(text: string, position: number): number;
|
|
159
|
+
/**
|
|
160
|
+
* Find the previous word start (for Ctrl+Left navigation)
|
|
161
|
+
*/
|
|
162
|
+
declare function findPreviousWordStart(text: string, position: number): number;
|
|
163
|
+
/**
|
|
164
|
+
* Find the start of the current line in a text node
|
|
165
|
+
* Uses visual line detection based on bounding rectangles
|
|
166
|
+
*/
|
|
167
|
+
declare function findVisualLineStart(container: Node, offset: number): {
|
|
168
|
+
node: Node;
|
|
169
|
+
offset: number;
|
|
170
|
+
} | null;
|
|
171
|
+
/**
|
|
172
|
+
* Find the end of the current line in a text node
|
|
173
|
+
* Uses visual line detection based on bounding rectangles
|
|
174
|
+
*/
|
|
175
|
+
declare function findVisualLineEnd(container: Node, offset: number): {
|
|
176
|
+
node: Node;
|
|
177
|
+
offset: number;
|
|
178
|
+
} | null;
|
|
179
|
+
/**
|
|
180
|
+
* Get the current selection info
|
|
181
|
+
*/
|
|
182
|
+
declare function getSelectionInfo(): {
|
|
183
|
+
node: Node;
|
|
184
|
+
offset: number;
|
|
185
|
+
anchorNode: Node | null;
|
|
186
|
+
anchorOffset: number;
|
|
187
|
+
focusNode: Node | null;
|
|
188
|
+
focusOffset: number;
|
|
189
|
+
isCollapsed: boolean;
|
|
190
|
+
text: string;
|
|
191
|
+
} | null;
|
|
192
|
+
/**
|
|
193
|
+
* Set the selection to a specific position
|
|
194
|
+
*/
|
|
195
|
+
declare function setSelectionPosition(node: Node, offset: number): void;
|
|
196
|
+
/**
|
|
197
|
+
* Extend selection to a specific position
|
|
198
|
+
*/
|
|
199
|
+
declare function extendSelectionTo(node: Node, offset: number): void;
|
|
200
|
+
/**
|
|
201
|
+
* Move selection by word in a text node
|
|
202
|
+
*/
|
|
203
|
+
declare function moveByWord(direction: 'left' | 'right', extend?: boolean): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Move to start/end of line
|
|
206
|
+
*/
|
|
207
|
+
declare function moveToLineEdge(edge: 'start' | 'end', extend?: boolean): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Parse a keyboard event into a navigation action
|
|
210
|
+
*/
|
|
211
|
+
declare function parseNavigationAction(event: KeyboardEvent): NavigationAction | null;
|
|
212
|
+
/**
|
|
213
|
+
* Handle a keyboard navigation event
|
|
214
|
+
* Returns true if the event was handled
|
|
215
|
+
*/
|
|
216
|
+
declare function handleNavigationKey(event: KeyboardEvent, options?: {
|
|
217
|
+
onDocumentStart?: () => void;
|
|
218
|
+
onDocumentEnd?: () => void;
|
|
219
|
+
}): boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Check if an event is a navigation key event
|
|
222
|
+
*/
|
|
223
|
+
declare function isNavigationKey(event: KeyboardEvent): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Expand selection to word boundaries
|
|
226
|
+
* Used for double-click word selection
|
|
227
|
+
*/
|
|
228
|
+
declare function expandSelectionToWord(): boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Get the word at the current cursor position
|
|
231
|
+
*/
|
|
232
|
+
declare function getWordAtCursor(): string | null;
|
|
233
|
+
/**
|
|
234
|
+
* Check if a keyboard event matches a shortcut definition
|
|
235
|
+
*/
|
|
236
|
+
declare function matchesShortcut(event: KeyboardEvent, shortcut: KeyboardShortcut): boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Common navigation shortcuts
|
|
239
|
+
*/
|
|
240
|
+
declare const NAVIGATION_SHORTCUTS: {
|
|
241
|
+
readonly wordLeft: KeyboardShortcut;
|
|
242
|
+
readonly wordRight: KeyboardShortcut;
|
|
243
|
+
readonly selectWordLeft: KeyboardShortcut;
|
|
244
|
+
readonly selectWordRight: KeyboardShortcut;
|
|
245
|
+
readonly lineStart: KeyboardShortcut;
|
|
246
|
+
readonly lineEnd: KeyboardShortcut;
|
|
247
|
+
readonly selectToLineStart: KeyboardShortcut;
|
|
248
|
+
readonly selectToLineEnd: KeyboardShortcut;
|
|
249
|
+
readonly documentStart: KeyboardShortcut;
|
|
250
|
+
readonly documentEnd: KeyboardShortcut;
|
|
251
|
+
readonly selectToDocumentStart: KeyboardShortcut;
|
|
252
|
+
readonly selectToDocumentEnd: KeyboardShortcut;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Get a human-readable description of a shortcut
|
|
256
|
+
*/
|
|
257
|
+
declare function describeShortcut(shortcut: KeyboardShortcut): string;
|
|
258
|
+
/**
|
|
259
|
+
* Get all navigation shortcuts with descriptions
|
|
260
|
+
*/
|
|
261
|
+
declare function getNavigationShortcutDescriptions(): Array<{
|
|
262
|
+
action: string;
|
|
263
|
+
shortcut: string;
|
|
264
|
+
}>;
|
|
34
265
|
|
|
35
266
|
/**
|
|
36
267
|
* Template tag types
|
|
@@ -140,12 +371,12 @@ declare function createPlugin(options?: {
|
|
|
140
371
|
panelPosition?: 'left' | 'right';
|
|
141
372
|
/** Panel default width */
|
|
142
373
|
panelWidth?: number;
|
|
143
|
-
}):
|
|
374
|
+
}): ReactEditorPlugin<TemplatePluginState>;
|
|
144
375
|
/**
|
|
145
376
|
* Default template plugin instance.
|
|
146
377
|
* Use this for quick setup without custom configuration.
|
|
147
378
|
*/
|
|
148
|
-
declare const templatePlugin:
|
|
379
|
+
declare const templatePlugin: ReactEditorPlugin<TemplatePluginState>;
|
|
149
380
|
|
|
150
381
|
/**
|
|
151
382
|
* @eigenpal/docx-js-editor
|
|
@@ -170,4 +401,4 @@ declare const templatePlugin: EditorPlugin<TemplatePluginState>;
|
|
|
170
401
|
*/
|
|
171
402
|
declare const VERSION = "0.0.2";
|
|
172
403
|
|
|
173
|
-
export { ANNOTATION_PANEL_STYLES, AnnotationPanel,
|
|
404
|
+
export { ANNOTATION_PANEL_STYLES, AnnotationPanel, type KeyboardShortcut, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, PluginPanelProps, TEMPLATE_DECORATION_STYLES, type TagType, type TemplateTag, VERSION, type WordSelectionResult, createDoubleClickWordSelector, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, createTripleClickParagraphSelector, describeShortcut, expandSelectionToWord, expandSelectionToWordBoundaries, extendSelectionTo, findNextWordStart, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordAt, findWordBoundaries, findWordEnd, findWordStart, getNavigationShortcutDescriptions, getSelectionInfo, getTemplateTags as getTemplatePluginTags, getWordAt, getWordAtCursor, handleClickForMultiClick, handleNavigationKey, isNavigationKey, isPunctuation, isWhitespace$1 as isWhitespace, isWhitespace as isWhitespaceChar, isWordCharacter as isWordChar, isWordCharacter$1 as isWordCharacter, matchesShortcut, moveByWord, moveToLineEdge, parseNavigationAction, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode, setHoveredElement, setSelectedElement, setSelectionPosition, templatePlugin, templatePluginKey };
|