@eigenpal/docx-editor-vue 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +60 -0
  3. package/dist/KeyboardShortcutsDialog-BtJB9UOD.js +2902 -0
  4. package/dist/KeyboardShortcutsDialog-D72k5DXR.cjs +1 -0
  5. package/dist/MenuBar-BrQW4COn.cjs +4 -0
  6. package/dist/MenuBar-D_Dvwb0F.js +3313 -0
  7. package/dist/RenderedDomContext-CHc18N_2.js +2 -0
  8. package/dist/TablePropertiesDialog-Ct5XChwd.cjs +1 -0
  9. package/dist/TablePropertiesDialog-cJx_xxxE.js +987 -0
  10. package/dist/_plugin-vue_export-helper-B52Kst-M.js +8 -0
  11. package/dist/_plugin-vue_export-helper-CX7YVcP6.cjs +1 -0
  12. package/dist/components/DocxEditor/types.d.ts +100 -0
  13. package/dist/components/EditorToolbarContext.d.ts +9 -0
  14. package/dist/components/Toolbar/presets.d.ts +42 -0
  15. package/dist/components/dialogs/index.d.ts +27 -0
  16. package/dist/components/imageContextMenuTypes.d.ts +30 -0
  17. package/dist/components/imageSelectionTypes.d.ts +14 -0
  18. package/dist/components/insertTableState.d.ts +9 -0
  19. package/dist/components/sidebar/cardStyles.d.ts +3 -0
  20. package/dist/components/sidebar/cardUtils.d.ts +1 -0
  21. package/dist/components/sidebar/resolveItemPositions.d.ts +4 -0
  22. package/dist/components/sidebar/sidebarUtils.d.ts +4 -0
  23. package/dist/components/tableStylePresets.d.ts +53 -0
  24. package/dist/components/toolbarUtils.d.ts +1 -0
  25. package/dist/components/ui/Icons.d.ts +1 -0
  26. package/dist/components/ui/hyperlinkPopupTypes.d.ts +20 -0
  27. package/dist/composables/index.d.ts +30 -0
  28. package/dist/composables/useAutoSave.d.ts +40 -0
  29. package/dist/composables/useClipboard.d.ts +22 -0
  30. package/dist/composables/useCommentLifecycle.d.ts +52 -0
  31. package/dist/composables/useCommentManagement.d.ts +41 -0
  32. package/dist/composables/useCommentSidebarItems.d.ts +24 -0
  33. package/dist/composables/useContextMenus.d.ts +39 -0
  34. package/dist/composables/useDocumentLifecycle.d.ts +11 -0
  35. package/dist/composables/useDocxEditor.d.ts +56 -0
  36. package/dist/composables/useDocxEditorRefApi.d.ts +49 -0
  37. package/dist/composables/useDragAutoScroll.d.ts +11 -0
  38. package/dist/composables/useFileIO.d.ts +30 -0
  39. package/dist/composables/useFindReplace.d.ts +34 -0
  40. package/dist/composables/useFixedDropdown.d.ts +14 -0
  41. package/dist/composables/useFormattingActions.d.ts +40 -0
  42. package/dist/composables/useHistory.d.ts +9 -0
  43. package/dist/composables/useHyperlinkManagement.d.ts +38 -0
  44. package/dist/composables/useImageActions.d.ts +30 -0
  45. package/dist/composables/useKeyboardShortcuts.d.ts +17 -0
  46. package/dist/composables/useMenuActions.d.ts +23 -0
  47. package/dist/composables/useOutlineSidebar.d.ts +17 -0
  48. package/dist/composables/usePageSetupControls.d.ts +22 -0
  49. package/dist/composables/usePagesPointer.d.ts +70 -0
  50. package/dist/composables/useSelectionHighlight.d.ts +19 -0
  51. package/dist/composables/useSelectionSync.d.ts +13 -0
  52. package/dist/composables/useTableResize.d.ts +7 -0
  53. package/dist/composables/useTableSelection.d.ts +10 -0
  54. package/dist/composables/useToolbarDropdowns.d.ts +14 -0
  55. package/dist/composables/useTrackedChanges.d.ts +12 -0
  56. package/dist/composables/useVisualLineNavigation.d.ts +11 -0
  57. package/dist/composables/useWheelZoom.d.ts +10 -0
  58. package/dist/composables/useZoom.d.ts +16 -0
  59. package/dist/composables.cjs +1 -0
  60. package/dist/composables.js +485 -0
  61. package/dist/dialogs.cjs +1 -0
  62. package/dist/dialogs.js +3 -0
  63. package/dist/docx-editor-vue.css +2 -0
  64. package/dist/i18n/LocaleContext.d.ts +1 -0
  65. package/dist/i18n/index.d.ts +26 -0
  66. package/dist/index.cjs +20 -0
  67. package/dist/index.d.ts +23 -0
  68. package/dist/index.js +3600 -0
  69. package/dist/lib/utils.d.ts +10 -0
  70. package/dist/plugin-api/RenderedDomContext.d.ts +1 -0
  71. package/dist/plugin-api/index.d.ts +18 -0
  72. package/dist/plugin-api/types.d.ts +28 -0
  73. package/dist/plugin-api.cjs +1 -0
  74. package/dist/plugin-api.js +62 -0
  75. package/dist/renderAsync.d.ts +31 -0
  76. package/dist/styles/index.d.ts +12 -0
  77. package/dist/styles/zIndex.d.ts +24 -0
  78. package/dist/styles.cjs +1 -0
  79. package/dist/styles.js +5 -0
  80. package/dist/ui.cjs +18 -0
  81. package/dist/ui.d.ts +79 -0
  82. package/dist/ui.js +963 -0
  83. package/dist/useTableResize-1oSe9Kjk.js +480 -0
  84. package/dist/useTableResize-lWdIgX9x.cjs +1 -0
  85. package/dist/utils/commentFactories.d.ts +7 -0
  86. package/dist/utils/domQueries.d.ts +28 -0
  87. package/dist/utils/imageClipboard.d.ts +9 -0
  88. package/dist/utils/paraTextHelpers.d.ts +29 -0
  89. package/dist/utils/refApiQueries.d.ts +46 -0
  90. package/dist/zIndex-CH0jZ7U7.cjs +1 -0
  91. package/dist/zIndex-CxELVe_L.js +12 -0
  92. package/package.json +119 -0
@@ -0,0 +1,56 @@
1
+ import { MaybeRef, Ref, ShallowRef } from 'vue';
2
+ import { EditorState, Plugin } from 'prosemirror-state';
3
+ import { EditorView } from 'prosemirror-view';
4
+ import { CommandMap } from '@eigenpal/docx-editor-core/prosemirror/extensions/types';
5
+ import { Layout } from '@eigenpal/docx-editor-core/layout-engine/types';
6
+ import { Document } from '@eigenpal/docx-editor-core/types/document';
7
+ import { LayoutSelectionGate } from '@eigenpal/docx-editor-core/prosemirror';
8
+ export interface UseDocxEditorOptions {
9
+ /** Container element for the hidden ProseMirror editor */
10
+ hiddenContainer: Ref<HTMLElement | null>;
11
+ /** Container element for the visible pages */
12
+ pagesContainer: Ref<HTMLElement | null>;
13
+ /** Whether the editor is read-only */
14
+ readOnly?: MaybeRef<boolean>;
15
+ /** Page gap in pixels */
16
+ pageGap?: number;
17
+ /** Callback on document change */
18
+ onChange?: (doc: Document) => void;
19
+ /** Callback on error */
20
+ onError?: (error: Error) => void;
21
+ /** Callback on selection change */
22
+ onSelectionUpdate?: () => void;
23
+ /** External ProseMirror plugins supplied by the host app. */
24
+ externalPlugins?: Plugin[];
25
+ /** Coordinates layout updates with visible selection/decoration overlays. */
26
+ syncCoordinator?: LayoutSelectionGate;
27
+ }
28
+ export interface UseDocxEditorReturn {
29
+ /** ProseMirror editor view (hidden). */
30
+ editorView: ShallowRef<EditorView | null>;
31
+ /** Latest editor state. Updated on each transaction. */
32
+ editorState: ShallowRef<EditorState | null>;
33
+ /** True once the editor view has mounted and a document is loaded. */
34
+ isReady: Ref<boolean>;
35
+ /** Last parse error message, or null if the most recent load succeeded. */
36
+ parseError: Ref<string | null>;
37
+ /** Computed page layout. */
38
+ layout: ShallowRef<Layout | null>;
39
+ /** Load a DOCX from a binary buffer. */
40
+ loadBuffer: (buffer: ArrayBuffer | Uint8Array | Blob | File) => Promise<void>;
41
+ /** Load a parsed `Document` directly. */
42
+ loadDocument: (doc: Document) => void;
43
+ /** Serialize the current document to a DOCX blob. */
44
+ save: () => Promise<Blob | null>;
45
+ /** Focus the hidden ProseMirror view. */
46
+ focus: () => void;
47
+ /** Destroy the editor view and clean up listeners. */
48
+ destroy: () => void;
49
+ /** Snapshot the current document model. */
50
+ getDocument: () => Document | null;
51
+ /** Access the extension command map for invoking marks/nodes/features. */
52
+ getCommands: () => CommandMap;
53
+ /** Force a re-layout without a doc change (e.g. after page-setup changes). */
54
+ reLayout: () => void;
55
+ }
56
+ export declare function useDocxEditor(options: UseDocxEditorOptions): UseDocxEditorReturn;
@@ -0,0 +1,49 @@
1
+ import { Ref, ShallowRef } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { Document } from '@eigenpal/docx-editor-core/types/document';
4
+ import { Comment } from '@eigenpal/docx-editor-core/types/content';
5
+ import { DocxInput } from '@eigenpal/docx-editor-core/utils';
6
+ import { Layout } from '@eigenpal/docx-editor-core/layout-engine';
7
+ import { DocxEditorRef } from '../components/DocxEditor/types';
8
+ import { ApplyFormattingOptions } from './useFormattingActions';
9
+ export interface UseDocxEditorRefApiOptions {
10
+ editorView: Ref<EditorView | null>;
11
+ layout: Ref<Layout | null>;
12
+ pagesRef: Ref<HTMLElement | null>;
13
+ pagesViewportRef: Ref<HTMLElement | null>;
14
+ zoom: Ref<number>;
15
+ comments: ShallowRef<Comment[]>;
16
+ focus: () => void;
17
+ destroy: () => void;
18
+ getDocument: () => Document | null;
19
+ setZoom: (zoom: number) => void;
20
+ save: () => Promise<ArrayBuffer | null>;
21
+ loadDocument: (doc: Document) => void;
22
+ loadDocumentBuffer: (buffer: DocxInput) => Promise<void>;
23
+ addComment: (options: {
24
+ paraId: string;
25
+ text: string;
26
+ author: string;
27
+ search?: string;
28
+ }) => number | null;
29
+ replyToComment: (commentId: number, text: string, author: string) => number | null;
30
+ resolveComment: (commentId: number) => void;
31
+ proposeChange: (options: {
32
+ paraId: string;
33
+ search: string;
34
+ replaceWith: string;
35
+ author: string;
36
+ }) => boolean;
37
+ applyFormatting: (options: ApplyFormattingOptions) => boolean;
38
+ setParagraphStyle: (options: {
39
+ paraId: string;
40
+ styleId: string;
41
+ }) => boolean;
42
+ scrollVisiblePositionIntoView: (pmPos: number) => void;
43
+ contentChangeSubscribers: Set<(document: unknown) => void>;
44
+ selectionChangeSubscribers: Set<(selection: unknown) => void>;
45
+ onPrint?: () => void;
46
+ }
47
+ export declare function useDocxEditorRefApi(opts: UseDocxEditorRefApiOptions): {
48
+ exposed: DocxEditorRef;
49
+ };
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ export interface DragAutoScrollOptions {
3
+ pagesContainer: Ref<HTMLElement | null>;
4
+ /** Called during auto-scroll to extend the selection at the current mouse position. */
5
+ onScrollExtendSelection: (clientX: number, clientY: number) => void;
6
+ }
7
+ export interface UseDragAutoScrollReturn {
8
+ updateMousePosition: (clientX: number, clientY: number) => void;
9
+ stopAutoScroll: () => void;
10
+ }
11
+ export declare function useDragAutoScroll({ pagesContainer, onScrollExtendSelection, }: DragAutoScrollOptions): UseDragAutoScrollReturn;
@@ -0,0 +1,30 @@
1
+ import { Document } from '@eigenpal/docx-editor-core/types/document';
2
+ export interface UseFileIOOptions {
3
+ /** From useDocxEditor — loads a .docx buffer into the editor. */
4
+ loadBuffer: (buffer: ArrayBuffer | Uint8Array | Blob | File) => Promise<void>;
5
+ /** From useDocxEditor — loads an already-parsed Document model. */
6
+ loadParsedDocument: (doc: Document) => void;
7
+ /** From useDocxEditor — returns the current Document, or null. */
8
+ getDocument: () => Document | null;
9
+ /** From useDocxEditor — serializes the current state to a .docx Blob. */
10
+ saveBlob: () => Promise<Blob | null>;
11
+ /** Fired after load+extract so the next tick sees comments/tracked-changes. */
12
+ extractCommentsAndChanges: () => void;
13
+ /** SFC's emit function — re-emits ready / rename / update:document / error. */
14
+ emit: (event: string, ...args: unknown[]) => void;
15
+ /** Accessor — read freshly inside the handler so prop updates are honored. */
16
+ documentName: () => string | undefined;
17
+ onDocumentNameChange?: (name: string) => void;
18
+ /** Vue's `nextTick` — passed in so the composable doesn't require its own import wiring. */
19
+ nextTick: () => Promise<void>;
20
+ }
21
+ export declare function useFileIO(opts: UseFileIOOptions): {
22
+ docxInputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
23
+ handleDocxFileChange: (event: Event) => Promise<void>;
24
+ handleDocumentNameChange: (name: string) => void;
25
+ downloadCurrentDocument: () => Promise<void>;
26
+ emitReadyAfterSidebarStateRefresh: () => Promise<void>;
27
+ loadDocumentBuffer: (buffer: Parameters<typeof opts.loadBuffer>[0]) => Promise<void>;
28
+ loadDocument: (doc: Document) => void;
29
+ save: () => Promise<ArrayBuffer | null>;
30
+ };
@@ -0,0 +1,34 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { FindMatch, FindOptions } from '@eigenpal/docx-editor-core/utils/findReplace';
3
+ export type { FindMatch, FindOptions };
4
+ export interface FindReplaceOptions {
5
+ initialReplaceMode?: boolean;
6
+ onMatchesChange?: (matches: FindMatch[]) => void;
7
+ onCurrentMatchChange?: (match: FindMatch | null, index: number) => void;
8
+ }
9
+ export interface FindReplaceState {
10
+ isOpen: boolean;
11
+ searchText: string;
12
+ replaceText: string;
13
+ options: FindOptions;
14
+ matches: FindMatch[];
15
+ currentIndex: number;
16
+ replaceMode: boolean;
17
+ }
18
+ export interface UseFindReplaceReturn {
19
+ state: FindReplaceState;
20
+ currentMatch: ComputedRef<FindMatch | null>;
21
+ hasMatches: ComputedRef<boolean>;
22
+ openFind: (selectedText?: string) => void;
23
+ openReplace: (selectedText?: string) => void;
24
+ close: () => void;
25
+ toggle: () => void;
26
+ setSearchText: (text: string) => void;
27
+ setReplaceText: (text: string) => void;
28
+ setOptions: (opts: Partial<FindOptions>) => void;
29
+ setMatches: (matches: FindMatch[], currentIndex?: number) => void;
30
+ goToNextMatch: () => number;
31
+ goToPreviousMatch: () => number;
32
+ goToMatch: (index: number) => void;
33
+ }
34
+ export declare function useFindReplace(hookOptions?: FindReplaceOptions): UseFindReplaceReturn;
@@ -0,0 +1,14 @@
1
+ import { Ref, CSSProperties } from 'vue';
2
+ export interface UseFixedDropdownOptions {
3
+ isOpen: Ref<boolean>;
4
+ onClose: () => void;
5
+ /** 'left' aligns dropdown left edge to trigger, 'right' aligns right edge. */
6
+ align?: 'left' | 'right';
7
+ }
8
+ export interface UseFixedDropdownReturn {
9
+ containerRef: Ref<HTMLElement | null>;
10
+ dropdownRef: Ref<HTMLElement | null>;
11
+ dropdownStyle: Ref<CSSProperties>;
12
+ handleMouseDown: (e: MouseEvent) => void;
13
+ }
14
+ export declare function useFixedDropdown({ isOpen, onClose, align, }: UseFixedDropdownOptions): UseFixedDropdownReturn;
@@ -0,0 +1,40 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { Document } from '@eigenpal/docx-editor-core/types/document';
4
+ export interface UseFormattingActionsOptions {
5
+ editorView: Ref<EditorView | null>;
6
+ getDocument: () => Document | null;
7
+ }
8
+ export interface ApplyFormattingOptions {
9
+ paraId: string;
10
+ search?: string;
11
+ marks: {
12
+ bold?: boolean;
13
+ italic?: boolean;
14
+ underline?: boolean | {
15
+ style?: string;
16
+ };
17
+ strike?: boolean;
18
+ color?: {
19
+ rgb?: string;
20
+ themeColor?: string;
21
+ };
22
+ highlight?: string;
23
+ fontSize?: number;
24
+ fontFamily?: {
25
+ ascii?: string;
26
+ hAnsi?: string;
27
+ };
28
+ };
29
+ }
30
+ export declare function useFormattingActions(opts: UseFormattingActionsOptions): {
31
+ handleClearFormatting: () => void;
32
+ handleApplyStyle: (styleId: string) => void;
33
+ handleInsertPageBreak: () => void;
34
+ handleInsertSymbol: (symbol: string) => void;
35
+ applyFormatting: (options: ApplyFormattingOptions) => boolean;
36
+ setParagraphStyle: (options: {
37
+ paraId: string;
38
+ styleId: string;
39
+ }) => boolean;
40
+ };
@@ -0,0 +1,9 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ export interface UseHistoryReturn {
4
+ canUndo: ComputedRef<boolean>;
5
+ canRedo: ComputedRef<boolean>;
6
+ undo: () => boolean;
7
+ redo: () => boolean;
8
+ }
9
+ export declare function useHistory(view: Ref<EditorView | null>, stateTick: Ref<number>): UseHistoryReturn;
@@ -0,0 +1,38 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { HyperlinkPopupData } from '../components/ui/hyperlinkPopupTypes';
4
+ export type { HyperlinkPopupData };
5
+ type Commands = Record<string, (...args: unknown[]) => unknown>;
6
+ export interface UseHyperlinkManagementOptions {
7
+ editorView: Ref<EditorView | null>;
8
+ getCommands: () => Commands;
9
+ }
10
+ export declare function useHyperlinkManagement(opts: UseHyperlinkManagementOptions): {
11
+ hyperlinkPopupData: Ref<{
12
+ href: string;
13
+ displayText: string;
14
+ tooltip?: string | undefined;
15
+ position: {
16
+ top: number;
17
+ left: number;
18
+ };
19
+ } | null, HyperlinkPopupData | {
20
+ href: string;
21
+ displayText: string;
22
+ tooltip?: string | undefined;
23
+ position: {
24
+ top: number;
25
+ left: number;
26
+ };
27
+ } | null>;
28
+ handleHyperlinkSubmit: (data: {
29
+ url?: string;
30
+ bookmark?: string;
31
+ displayText: string;
32
+ tooltip: string;
33
+ }) => void;
34
+ handleHyperlinkRemove: () => void;
35
+ handleHyperlinkPopupNavigate: (href: string) => void;
36
+ handleHyperlinkPopupEdit: (displayText: string, href: string) => void;
37
+ handleHyperlinkPopupRemove: () => void;
38
+ };
@@ -0,0 +1,30 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { ImageSelectionInfo } from '../components/imageSelectionTypes';
4
+ type Commands = Record<string, ((...args: unknown[]) => unknown) | undefined>;
5
+ export interface UseImageActionsOptions {
6
+ editorView: Ref<EditorView | null>;
7
+ zoom: Ref<number>;
8
+ stateTick: Ref<number>;
9
+ getCommands: () => Commands;
10
+ }
11
+ export interface ImageToolbarContext {
12
+ wrapType: string;
13
+ displayMode: string;
14
+ cssFloat: string | null;
15
+ }
16
+ export interface UseImageActionsReturn {
17
+ selectedImage: import('vue').ShallowRef<ImageSelectionInfo | null>;
18
+ imageInteracting: import('vue').Ref<boolean>;
19
+ imageToolbarContext: import('vue').ComputedRef<ImageToolbarContext | null>;
20
+ handleInsertImage: (data: {
21
+ src: string;
22
+ width: number;
23
+ height: number;
24
+ alt: string;
25
+ }) => void;
26
+ handleToolbarImageWrap: (value: string) => void;
27
+ handleImageTransform: (action: 'rotateCW' | 'rotateCCW' | 'flipH' | 'flipV') => void;
28
+ }
29
+ export declare function useImageActions(opts: UseImageActionsOptions): UseImageActionsReturn;
30
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ export interface UseKeyboardShortcutsOptions {
3
+ showKeyboardShortcuts: Ref<boolean>;
4
+ showFindReplace: Ref<boolean>;
5
+ showHyperlink: Ref<boolean>;
6
+ /** From useZoom — handles Ctrl+= / Ctrl+- / Ctrl+0. */
7
+ handleZoomKeyDown: (e: KeyboardEvent) => void;
8
+ /**
9
+ * Host prop accessor — read freshly inside the handler so a host
10
+ * toggle at runtime is honored. (Capturing the prop value at setup
11
+ * time would freeze it.)
12
+ */
13
+ disableFindReplaceShortcuts?: () => boolean | undefined;
14
+ }
15
+ export declare function useKeyboardShortcuts(opts: UseKeyboardShortcutsOptions): {
16
+ handleKeyDown: (e: KeyboardEvent) => void;
17
+ };
@@ -0,0 +1,23 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ export interface UseMenuActionsOptions {
4
+ editorView: Ref<EditorView | null>;
5
+ getCommands: () => Record<string, (...args: any[]) => any>;
6
+ docxInputRef: Ref<HTMLInputElement | null>;
7
+ showPageSetup: Ref<boolean>;
8
+ showInsertImage: Ref<boolean>;
9
+ showHyperlink: Ref<boolean>;
10
+ showInsertSymbol: Ref<boolean>;
11
+ showKeyboardShortcuts: Ref<boolean>;
12
+ handleClearFormatting: () => void;
13
+ handleInsertPageBreak: () => void;
14
+ handleToggleOutline: () => void;
15
+ handleToggleSidebar: () => void;
16
+ downloadCurrentDocument: () => Promise<void>;
17
+ emit: (event: string, ...args: unknown[]) => void;
18
+ }
19
+ export declare function useMenuActions(opts: UseMenuActionsOptions): {
20
+ handleMenuAction: (action: string) => void;
21
+ handleMenuTableInsert: (rows: number, cols: number) => void;
22
+ execSimpleCommand: (name: string) => void;
23
+ };
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { HeadingInfo } from '@eigenpal/docx-editor-core/utils/headingCollector';
4
+ export interface UseOutlineSidebarOptions {
5
+ editorView: Ref<EditorView | null>;
6
+ showOutline: Ref<boolean>;
7
+ showSidebar: Ref<boolean>;
8
+ outlineHeadings: Ref<HeadingInfo[]>;
9
+ activeSidebarItem: Ref<string | null>;
10
+ extractCommentsAndChanges: () => void;
11
+ }
12
+ export declare function useOutlineSidebar(opts: UseOutlineSidebarOptions): {
13
+ handleToggleOutline: () => void;
14
+ handleOutlineNavigate: (pmPos: number) => void;
15
+ handleToggleSidebar: () => void;
16
+ handleEditorScrollMouseDown: (event: MouseEvent) => void;
17
+ };
@@ -0,0 +1,22 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { Document, SectionProperties } from '@eigenpal/docx-editor-core/types/document';
4
+ export interface UsePageSetupControlsOptions {
5
+ editorView: Ref<EditorView | null>;
6
+ getDocument: () => Document | null;
7
+ readOnly: Ref<boolean>;
8
+ stateTick: Ref<number>;
9
+ reLayout: () => void;
10
+ emit: (event: string, ...args: unknown[]) => void;
11
+ }
12
+ export declare function usePageSetupControls(opts: UsePageSetupControlsOptions): {
13
+ handlePageSetupApply: (sp: Partial<SectionProperties>) => void;
14
+ handleLeftMarginChange: (twips: number) => void;
15
+ handleRightMarginChange: (twips: number) => void;
16
+ handleTopMarginChange: (twips: number) => void;
17
+ handleBottomMarginChange: (twips: number) => void;
18
+ handleIndentLeftChange: (twips: number) => void;
19
+ handleIndentRightChange: (twips: number) => void;
20
+ handleFirstLineIndentChange: (twips: number) => void;
21
+ handleTabStopRemove: (positionTwips: number) => void;
22
+ };
@@ -0,0 +1,70 @@
1
+ import { Ref, ShallowRef } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { HeaderFooter, Paragraph, Table } from '@eigenpal/docx-editor-core/types/content';
4
+ import { Document } from '@eigenpal/docx-editor-core/types/document';
5
+ import { ImageSelectionInfo } from '../components/imageSelectionTypes';
6
+ import { Layout } from '@eigenpal/docx-editor-core/layout-engine';
7
+ import { HyperlinkPopupData } from '../components/ui/hyperlinkPopupTypes';
8
+ type TableResizeApi = {
9
+ tryStartResize: (e: MouseEvent, view: EditorView) => boolean;
10
+ isResizing: Ref<boolean>;
11
+ };
12
+ type Commands = Record<string, ((...args: unknown[]) => unknown) | undefined>;
13
+ export interface TableInsertButton {
14
+ type: 'row' | 'column';
15
+ x: number;
16
+ y: number;
17
+ cellPmPos: number;
18
+ }
19
+ export interface HfEditState {
20
+ position: 'header' | 'footer';
21
+ rId: string | null;
22
+ headerFooter: HeaderFooter | null;
23
+ targetRect: {
24
+ top: number;
25
+ left: number;
26
+ width: number;
27
+ height: number;
28
+ } | null;
29
+ }
30
+ export interface ScrollPageInfo {
31
+ currentPage: number;
32
+ totalPages: number;
33
+ visible: boolean;
34
+ }
35
+ export interface UsePagesPointerOptions {
36
+ editorView: Ref<EditorView | null>;
37
+ pagesRef: Ref<HTMLElement | null>;
38
+ pagesViewportRef: Ref<HTMLElement | null>;
39
+ selectedImage: ShallowRef<ImageSelectionInfo | null>;
40
+ imageInteracting: Ref<boolean>;
41
+ hyperlinkPopupData: Ref<HyperlinkPopupData | null>;
42
+ readOnly: Ref<boolean>;
43
+ zoom: Ref<number>;
44
+ layout: Ref<Layout | null>;
45
+ tableResize: TableResizeApi;
46
+ getCommands: () => Commands;
47
+ getDocument: () => Document | null;
48
+ reLayout: () => void;
49
+ emit: (event: string, ...args: unknown[]) => void;
50
+ clearOverlay: () => void;
51
+ }
52
+ export interface UsePagesPointerReturn {
53
+ tableInsertButton: Ref<TableInsertButton | null>;
54
+ hfEdit: Ref<HfEditState | null>;
55
+ scrollPageInfo: Ref<ScrollPageInfo>;
56
+ resolvePos: (clientX: number, clientY: number) => number | null;
57
+ setPmSelection: (anchor: number, head?: number) => void;
58
+ scrollVisiblePositionIntoView: (pmPos: number) => void;
59
+ navigateToBookmark: (bookmarkName: string) => void;
60
+ handlePagesMouseDown: (event: MouseEvent) => void;
61
+ handlePagesMouseMove: (event: MouseEvent) => void;
62
+ handlePagesClick: (event: MouseEvent) => void;
63
+ handlePagesDoubleClick: (event: MouseEvent) => void;
64
+ handleTableInsertClick: (event: MouseEvent) => void;
65
+ clearTableInsertTimer: () => void;
66
+ handleHfSave: (content: (Paragraph | Table)[]) => void;
67
+ handleHfRemove: () => void;
68
+ }
69
+ export declare function usePagesPointer(opts: UsePagesPointerOptions): UsePagesPointerReturn;
70
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Ref, ComputedRef, CSSProperties } from 'vue';
2
+ import { HighlightRect, SelectionHighlightConfig } from '@eigenpal/docx-editor-core/utils';
3
+ export interface UseSelectionHighlightOptions {
4
+ containerRef: Ref<HTMLElement | null>;
5
+ enabled?: boolean;
6
+ config?: SelectionHighlightConfig;
7
+ useOverlay?: boolean;
8
+ debounceMs?: number;
9
+ onSelectionChange?: (hasSelection: boolean, text: string) => void;
10
+ }
11
+ export interface UseSelectionHighlightReturn {
12
+ hasSelection: ComputedRef<boolean>;
13
+ selectedText: ComputedRef<string>;
14
+ highlightRects: ComputedRef<HighlightRect[]>;
15
+ isSelectionInContainer: ComputedRef<boolean>;
16
+ refresh: () => void;
17
+ getOverlayStyle: (rect: HighlightRect) => CSSProperties;
18
+ }
19
+ export declare function useSelectionHighlight(options: UseSelectionHighlightOptions): UseSelectionHighlightReturn;
@@ -0,0 +1,13 @@
1
+ import { Ref, ShallowRef } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { ImageSelectionInfo } from '../components/imageSelectionTypes';
4
+ export interface UseSelectionSyncOptions {
5
+ editorView: Ref<EditorView | null>;
6
+ pagesRef: Ref<HTMLElement | null>;
7
+ selectedImage: ShallowRef<ImageSelectionInfo | null>;
8
+ }
9
+ export interface UseSelectionSyncReturn {
10
+ clearOverlay: () => void;
11
+ updateSelectionOverlay: () => void;
12
+ }
13
+ export declare function useSelectionSync(opts: UseSelectionSyncOptions): UseSelectionSyncReturn;
@@ -0,0 +1,7 @@
1
+ import { EditorView } from 'prosemirror-view';
2
+ export interface UseTableResizeReturn {
3
+ tryStartResize: (e: MouseEvent, view: EditorView) => boolean;
4
+ install: () => () => void;
5
+ isResizing: () => boolean;
6
+ }
7
+ export declare function useTableResize(): UseTableResizeReturn;
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ import { CellCoordinates } from '@eigenpal/docx-editor-core/managers/types';
3
+ export interface UseTableSelectionReturn {
4
+ selectedCell: Ref<CellCoordinates | null>;
5
+ handleCellClick: (tableIndex: number, rowIndex: number, columnIndex: number) => void;
6
+ handleClickTarget: (target: EventTarget | null, container?: HTMLElement | null) => void;
7
+ clearSelection: () => void;
8
+ isCellSelected: (tableIndex: number, rowIndex: number, columnIndex: number) => boolean;
9
+ }
10
+ export declare function useTableSelection(): UseTableSelectionReturn;
@@ -0,0 +1,14 @@
1
+ import { Ref, CSSProperties } from 'vue';
2
+ export interface UseToolbarDropdownsOptions {
3
+ zoom: Ref<HTMLElement | null>;
4
+ style: Ref<HTMLElement | null>;
5
+ font: Ref<HTMLElement | null>;
6
+ size: Ref<HTMLElement | null>;
7
+ align: Ref<HTMLElement | null>;
8
+ spacing: Ref<HTMLElement | null>;
9
+ }
10
+ export declare function useToolbarDropdowns(refs: UseToolbarDropdownsOptions): {
11
+ openDropdown: Ref<string | null, string | null>;
12
+ dropdownMenuStyle: import('vue').ComputedRef<CSSProperties>;
13
+ toggleDropdown: (name: string) => void;
14
+ };
@@ -0,0 +1,12 @@
1
+ import { Ref } from 'vue';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { extractTrackedChanges, TrackedChangesResult } from '@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges';
4
+ export type { TrackedChangesResult };
5
+ export { extractTrackedChanges };
6
+ export type { TrackedChangeEntry } from '@eigenpal/docx-editor-core/utils/comments';
7
+ /**
8
+ * Pass the editor view ref + a stateTick that bumps on every PM
9
+ * transaction (the same tick the Toolbar listens to). The computed
10
+ * re-runs whenever the tick advances.
11
+ */
12
+ export declare function useTrackedChanges(view: Ref<EditorView | null>, stateTick: Ref<number>): import('vue').ComputedRef<TrackedChangesResult>;
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { createVisualLineState } from '@eigenpal/docx-editor-core/prosemirror/utils/visualLineNavigation';
3
+ import { EditorView } from 'prosemirror-view';
4
+ export interface UseVisualLineNavigationReturn {
5
+ state: ReturnType<typeof createVisualLineState>;
6
+ getCaretClientX: (pmPos: number) => number | null;
7
+ findLineElementAtPosition: (pmPos: number) => HTMLElement | null;
8
+ findPositionOnLineAtClientX: (line: HTMLElement, clientX: number) => number | null;
9
+ handlePMKeyDown: (view: EditorView, event: KeyboardEvent) => boolean;
10
+ }
11
+ export declare function useVisualLineNavigation(pagesContainer: Ref<HTMLElement | null>): UseVisualLineNavigationReturn;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Alias for cross-adapter parity — the React adapter has
3
+ * `useWheelZoom.ts` (Ctrl+wheel zoom + Ctrl+= / Ctrl+- / Ctrl+0
4
+ * shortcuts). Vue rolls the same behaviour into `useZoom`, which
5
+ * already exposes `handleWheel` and `installShortcuts()`. This file
6
+ * re-exports under the React-style name so plugin code can call
7
+ * `useWheelZoom()` either way and get the same composable.
8
+ */
9
+ export { useZoom as useWheelZoom } from './useZoom';
10
+ export type {} from './useZoom';
@@ -0,0 +1,16 @@
1
+ import { Ref, ComputedRef } from 'vue';
2
+ export interface UseZoomReturn {
3
+ zoom: Ref<number>;
4
+ zoomPercent: ComputedRef<number>;
5
+ isMinZoom: ComputedRef<boolean>;
6
+ isMaxZoom: ComputedRef<boolean>;
7
+ setZoom: (level: number) => void;
8
+ zoomIn: () => void;
9
+ zoomOut: () => void;
10
+ resetZoom: () => void;
11
+ handleWheel: (e: WheelEvent) => void;
12
+ handleKeyDown: (e: KeyboardEvent) => void;
13
+ installShortcuts: () => void;
14
+ ZOOM_PRESETS: number[];
15
+ }
16
+ export declare function useZoom(initialZoom?: number): UseZoomReturn;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useTableResize-lWdIgX9x.cjs`);let t=require(`vue`),n=require(`prosemirror-history`),r=require(`@eigenpal/docx-editor-core/utils`),i=require(`@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges`),a=require(`@eigenpal/docx-editor-core`),o=require(`@eigenpal/docx-editor-core/utils/findVerticalScrollParent`),s=require(`@eigenpal/docx-editor-core/utils/findReplace`),c=require(`@eigenpal/docx-editor-core/managers/TableSelectionManager`),l=require(`@eigenpal/docx-editor-core/prosemirror/utils/visualLineNavigation`);function u(e,n={}){let r=(0,t.ref)(`idle`),i=(0,t.ref)(null),o=(0,t.ref)(!1),s=(0,t.ref)(!0),{storageKey:c,interval:l,enabled:u=!0,maxAge:d,onSave:f,onError:p,onRecoveryAvailable:m,saveOnChange:h,debounceDelay:g}=n;if(!(0,a.isAutoSaveSupported)())return{status:r,lastSaveTime:i,hasRecoveryData:o,isEnabled:s,save:async()=>!1,clearAutoSave:()=>{},getRecoveryData:()=>null,acceptRecovery:()=>null,dismissRecovery:()=>{},enable:()=>{},disable:()=>{}};let _=new a.AutoSaveManager({storageKey:c,interval:l,maxAge:d,saveOnChange:h,debounceDelay:g,onSave:f,onError:p,onRecoveryAvailable:m}),v=()=>{let e=_.getSnapshot();r.value=e.status,i.value=e.lastSaveTime,o.value=e.hasRecoveryData,s.value=e.isEnabled},y=_.subscribe(v);u?_.enable():_.disable(),v(),(0,t.watch)(()=>(0,t.unref)(e),e=>_.onDocumentChanged(e??null),{immediate:!0});function b(){return _.save()}function x(){_.clear()}function S(){return _.getRecoveryData()}function C(){return _.acceptRecovery()}function w(){_.dismissRecovery()}function T(){_.enable()}function E(){_.disable()}return(0,t.onBeforeUnmount)(()=>{y(),_.destroy()}),{status:r,lastSaveTime:i,hasRecoveryData:o,isEnabled:s,save:b,clearAutoSave:x,getRecoveryData:S,acceptRecovery:C,dismissRecovery:w,enable:T,disable:E}}function d(e={}){let{onCopy:n,onCut:i,onPaste:a,cleanWordFormatting:o=!0,editable:s=!0,onError:c,theme:l}=e,u=(0,t.ref)(!1),d=(0,t.ref)(null);async function f(e){if(u.value)return!1;u.value=!0;try{let t=await(0,r.copyRuns)(e.runs,{onError:c,theme:l});return t&&n?.(e),t}finally{u.value=!1}}async function p(e){if(u.value||!s)return!1;u.value=!0;try{let t=await(0,r.copyRuns)(e.runs,{onError:c,theme:l});return t&&i?.(e),t}finally{u.value=!1}}async function m(e=!1){if(u.value||!s)return null;u.value=!0;try{if(navigator.clipboard&&navigator.clipboard.read){let t=await navigator.clipboard.read(),n=``,i=``;for(let e of t)e.types.includes(`text/html`)&&(n=await(await e.getType(`text/html`)).text()),e.types.includes(`text/plain`)&&(i=await(await e.getType(`text/plain`)).text());e&&(n=``);let s=(0,r.parseClipboardHtml)(n,i,o);return d.value=s,a?.(s,e),s}return null}catch(e){return c?.(e instanceof Error?e:Error(String(e))),null}finally{u.value=!1}}return{copy:f,cut:p,paste:m,isProcessing:u,lastPastedContent:d}}function f({comments:e,trackedChanges:n,showResolved:r,isAddingComment:i,addCommentYPosition:a}){return(0,t.computed)(()=>{let t=[];i?.value&&a?.value!=null&&t.push({id:`new-comment-input`,anchorPos:0,fixedY:a.value,priority:-1e3,isTemporary:!0,estimatedHeight:120,kind:`add-comment`});let o=new Map;for(let t of e.value)if(t.parentId!=null){let e=o.get(t.parentId);e?e.push(t):o.set(t.parentId,[t])}for(let n of e.value)n.parentId??(n.done&&!r?.value||t.push({id:`comment-${n.id}`,anchorPos:0,anchorKey:`comment-${n.id}`,priority:0,estimatedHeight:n.done?28:80,kind:`comment`,comment:n,replies:o.get(n.id)??[]}));return n.value.forEach((e,n)=>{t.push({id:`tc-${e.revisionId}-${n}`,anchorPos:e.from,anchorKey:`revision-${e.revisionId}`,priority:1,estimatedHeight:80,kind:`tracked-change`,change:e})}),t})}var p=40,m=12;function h({pagesContainer:e,onScrollExtendSelection:n}){let r=null,i=0,a=0,s=!1,c=null;function l(){if(c)return c;let t=e.value;return t?(c=(0,o.findVerticalScrollParent)(t),c):null}function u(){s=!1,r!==null&&(cancelAnimationFrame(r),r=null)}function d(){if(!s)return;let e=l();if(!e)return;let t=e.getBoundingClientRect(),o=0;if(a<t.top+p){let e=Math.max(0,t.top+p-a);o=-Math.min(m,e/p*m)}else if(a>t.bottom-p){let e=Math.max(0,a-(t.bottom-p));o=Math.min(m,e/p*m)}o!==0&&(e.scrollTop+=o,n(i,a)),r=requestAnimationFrame(d)}function f(){s||(s=!0,r=requestAnimationFrame(d))}function h(e,t){if(i=e,a=t,!s){let e=l();if(!e)return;let n=e.getBoundingClientRect();(t<n.top+p||t>n.bottom-p)&&f()}}return(0,t.onBeforeUnmount)(()=>u()),{updateMousePosition:h,stopAutoScroll:u}}function g(e={}){let n=(0,t.reactive)({isOpen:!1,searchText:``,replaceText:``,options:(0,s.createDefaultFindOptions)(),matches:[],currentIndex:0,replaceMode:e.initialReplaceMode??!1});function r(e){n.isOpen=!0,n.replaceMode=!1,e&&(n.searchText=e),n.matches=[],n.currentIndex=0}function i(e){n.isOpen=!0,n.replaceMode=!0,e&&(n.searchText=e),n.matches=[],n.currentIndex=0}function a(){n.isOpen=!1}function o(){n.isOpen=!n.isOpen}function c(e){n.searchText=e}function l(e){n.replaceText=e}function u(e){n.options={...n.options,...e}}function d(t,r=0){let i=Math.max(0,Math.min(r,t.length-1));n.matches=t,n.currentIndex=t.length>0?i:0,e.onMatchesChange?.(t),t.length>0?e.onCurrentMatchChange?.(t[i],i):e.onCurrentMatchChange?.(null,-1)}function f(){return n.matches.length===0?0:(n.currentIndex=(n.currentIndex+1)%n.matches.length,n.currentIndex)}function p(){return n.matches.length===0?0:(n.currentIndex=n.currentIndex===0?n.matches.length-1:n.currentIndex-1,n.currentIndex)}function m(e){n.matches.length===0||e<0||e>=n.matches.length||(n.currentIndex=e)}return{state:n,currentMatch:(0,t.computed)(()=>n.matches.length===0?null:n.matches[n.currentIndex]??null),hasMatches:(0,t.computed)(()=>n.matches.length>0),openFind:r,openReplace:i,close:a,toggle:o,setSearchText:c,setReplaceText:l,setOptions:u,setMatches:d,goToNextMatch:f,goToPreviousMatch:p,goToMatch:m}}function _({isOpen:e,onClose:n,align:r=`left`}){let i=(0,t.ref)(null),a=(0,t.ref)(null),o=(0,t.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:1e4});function s(e,t){o.value={position:`fixed`,top:e+`px`,left:t+`px`,zIndex:1e4}}function c(e){let t=e.target;i.value&&!i.value.contains(t)&&a.value&&!a.value.contains(t)&&n()}function l(e){e.key===`Escape`&&n()}function u(){n()}function d(){document.addEventListener(`mousedown`,c),document.addEventListener(`keydown`,l),window.addEventListener(`scroll`,u,!0)}function f(){document.removeEventListener(`mousedown`,c),document.removeEventListener(`keydown`,l),window.removeEventListener(`scroll`,u,!0)}(0,t.watch)(e,e=>{if(!e){f();return}let t=i.value;if(!t)return;let n=t.getBoundingClientRect();r===`right`?requestAnimationFrame(()=>{let e=a.value;if(e){let t=e.getBoundingClientRect();s(n.bottom+4,n.right-t.width)}else s(n.bottom+4,n.left)}):s(n.bottom+4,n.left),d()}),(0,t.onBeforeUnmount)(f);function p(e){e.preventDefault(),e.stopPropagation()}return{containerRef:i,dropdownRef:a,dropdownStyle:o,handleMouseDown:p}}function v(e,r){let i=(0,t.computed)(()=>{r.value;let t=e.value;return t?(0,n.undoDepth)(t.state)>0:!1}),a=(0,t.computed)(()=>{r.value;let t=e.value;return t?(0,n.redoDepth)(t.state)>0:!1});function o(){let t=e.value;return t?(0,n.undo)(t.state,t.dispatch):!1}function s(){let t=e.value;return t?(0,n.redo)(t.state,t.dispatch):!1}return{canUndo:i,canRedo:a,undo:o,redo:s}}function y(e){let{containerRef:n,enabled:i=!0,config:a=r.DEFAULT_SELECTION_STYLE,useOverlay:o=!1,debounceMs:s=16,onSelectionChange:c}=e,l=(0,t.ref)(!1),u=(0,t.ref)(``),d=(0,t.ref)([]),f=(0,t.ref)(!1),p=null,m=0;function h(){let e=n.value,t=(0,r.hasActiveSelection)(),i=(0,r.getSelectedText)(),a=e?(0,r.isSelectionWithin)(e):!1;l.value=t,u.value=i,f.value=a,d.value=o&&a&&e?(0,r.getMergedSelectionRects)(e):[],c?.(t&&a,i)}function g(){h()}function _(){let e=performance.now();if(e-m<s){p&&clearTimeout(p),p=setTimeout(()=>{m=performance.now(),h(),p=null},s);return}m=e,h()}function v(e){return{position:`absolute`,left:e.left+`px`,top:e.top+`px`,width:e.width+`px`,height:e.height+`px`,backgroundColor:a.backgroundColor,borderRadius:a.borderRadius?a.borderRadius+`px`:void 0,border:a.borderColor?`1px solid ${a.borderColor}`:void 0,zIndex:a.zIndex??0,pointerEvents:`none`}}return(0,t.onMounted)(()=>{i&&((0,r.areSelectionStylesInjected)()||(0,r.injectSelectionStyles)(a),document.addEventListener(`selectionchange`,_))}),(0,t.onBeforeUnmount)(()=>{document.removeEventListener(`selectionchange`,_),p&&clearTimeout(p)}),(0,t.watch)(n,()=>h()),{hasSelection:(0,t.computed)(()=>l.value),selectedText:(0,t.computed)(()=>u.value),highlightRects:(0,t.computed)(()=>d.value),isSelectionInContainer:(0,t.computed)(()=>f.value),refresh:g,getOverlayStyle:v}}function b(){let e=new c.TableSelectionManager,n=(0,t.ref)(null),r=()=>{n.value=e.getSnapshot().selectedCell},i=e.subscribe(r);r(),(0,t.onBeforeUnmount)(()=>{i()});function a(t,n,r){e.selectCell({tableIndex:t,rowIndex:n,columnIndex:r})}function o(t,n){let r=(0,c.findTableFromClick)(t,n);r?e.selectCell(r):e.clearSelection()}function s(){e.clearSelection()}function l(t,n,r){return e.isCellSelected(t,n,r)}return{selectedCell:n,handleCellClick:a,handleClickTarget:o,clearSelection:s,isCellSelected:l}}function x(e,n){return(0,t.computed)(()=>(n.value,(0,i.extractTrackedChanges)(e.value?.state??null)))}function S(e){let t=(0,l.createVisualLineState)();function n(t){let n=e.value;return n?(0,l.getCaretClientX)(n,t):null}function r(t){let n=e.value;return n?(0,l.findLineElementAtPosition)(n,t):null}function i(e,t){return(0,l.findPositionOnLineAtClientX)(e,t)}function a(n,r){return(0,l.handleVisualLineKeyDown)(t,n,r,e.value)}return{state:t,getCaretClientX:n,findLineElementAtPosition:r,findPositionOnLineAtClientX:i,handlePMKeyDown:a}}exports.createSelectionFromDOM=a.createSelectionFromDOM,exports.extractTrackedChanges=i.extractTrackedChanges,exports.formatLastSaveTime=a.formatLastSaveTime,exports.formatStorageSize=a.formatStorageSize,exports.getAutoSaveStatusLabel=a.getAutoSaveStatusLabel,exports.getAutoSaveStorageSize=a.getAutoSaveStorageSize,exports.getSelectionRuns=a.getSelectionRuns,exports.isAutoSaveSupported=a.isAutoSaveSupported,exports.runsToClipboardContent=r.runsToClipboardContent,exports.useAutoSave=u,exports.useClipboard=d,exports.useCommentSidebarItems=f,exports.useDocxEditor=e.r,exports.useDragAutoScroll=h,exports.useFindReplace=g,exports.useFixedDropdown=_,exports.useHistory=v,exports.useSelectionHighlight=y,exports.useTableResize=e.t,exports.useTableSelection=b,exports.useTrackedChanges=x,exports.useVisualLineNavigation=S,exports.useWheelZoom=e.n,exports.useZoom=e.n;