@eigenpal/docx-editor-vue 1.3.0 → 1.3.1

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.
@@ -2,6 +2,7 @@ import { Ref } from 'vue';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Document } from '@eigenpal/docx-editor-core/types/document';
4
4
  import { Comment } from '@eigenpal/docx-editor-core/types/content';
5
+ import { CommentIdAllocator } from '@eigenpal/docx-editor-core/prosemirror/commentIdAllocator';
5
6
  import { TrackedChangeEntry } from '../components/sidebar/sidebarUtils';
6
7
  export interface UseCommentLifecycleOptions {
7
8
  editorView: Ref<EditorView | null>;
@@ -9,6 +10,8 @@ export interface UseCommentLifecycleOptions {
9
10
  comments: Ref<Comment[]>;
10
11
  trackedChanges: Ref<TrackedChangeEntry[]>;
11
12
  resolvedCommentIds: Ref<Set<number>>;
13
+ /** Shared per-instance ID allocator (see useCommentManagement). */
14
+ commentIdAllocator: CommentIdAllocator;
12
15
  activeSidebarItem: Ref<string | null>;
13
16
  showSidebar: Ref<boolean>;
14
17
  isAddingComment: Ref<boolean>;
@@ -1,6 +1,7 @@
1
1
  import { Ref } from 'vue';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Comment, Document } from '@eigenpal/docx-editor-core/types/document';
4
+ import { CommentIdAllocator } from '@eigenpal/docx-editor-core/prosemirror/commentIdAllocator';
4
5
  import { TrackedChangeEntry } from '../components/sidebar/sidebarUtils';
5
6
  export interface UseCommentManagementOptions {
6
7
  editorView: Ref<EditorView | null>;
@@ -16,6 +17,11 @@ export interface UseCommentManagementOptions {
16
17
  contentChangeSubscribers: Set<(document: unknown) => void>;
17
18
  extractCommentsAndChanges: () => void;
18
19
  emit: (event: string, ...args: unknown[]) => void;
20
+ /**
21
+ * Per-editor-instance monotonic ID allocator, shared with
22
+ * `useCommentLifecycle` so comment and tracked-change IDs never collide.
23
+ */
24
+ commentIdAllocator: CommentIdAllocator;
19
25
  }
20
26
  export declare function useCommentManagement(opts: UseCommentManagementOptions): {
21
27
  addComment: (options: {
@@ -1,32 +1,12 @@
1
1
  import { Ref } from 'vue';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Document } from '@eigenpal/docx-editor-core/types/document';
4
+ import { ApplyFormattingOptions } from '@eigenpal/docx-editor-core/prosemirror/applyFormatting';
4
5
  export interface UseFormattingActionsOptions {
5
6
  editorView: Ref<EditorView | null>;
6
7
  getDocument: () => Document | null;
7
8
  }
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
- }
9
+ export type { ApplyFormattingOptions };
30
10
  export declare function useFormattingActions(opts: UseFormattingActionsOptions): {
31
11
  handleClearFormatting: () => void;
32
12
  handleApplyStyle: (styleId: string) => void;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useCommentSidebarItems-CbNvNCd3.cjs`),t=require(`./useTableResize-DBpEiuGQ.cjs`);let n=require(`vue`),r=require(`@eigenpal/docx-editor-core/utils`),i=require(`prosemirror-history`),a=require(`@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges`),o=require(`@eigenpal/docx-editor-core`),s=require(`@eigenpal/docx-editor-core/utils/findVerticalScrollParent`),c=require(`@eigenpal/docx-editor-core/utils/findReplace`),l=require(`@eigenpal/docx-editor-core/managers/TableSelectionManager`),u=require(`@eigenpal/docx-editor-core/prosemirror/utils/visualLineNavigation`);function d(e,t={}){let r=(0,n.ref)(`idle`),i=(0,n.ref)(null),a=(0,n.ref)(!1),s=(0,n.ref)(!0),{storageKey:c,interval:l,enabled:u=!0,maxAge:d,onSave:f,onError:p,onRecoveryAvailable:m,saveOnChange:h,debounceDelay:g}=t;if(!(0,o.isAutoSaveSupported)())return{status:r,lastSaveTime:i,hasRecoveryData:a,isEnabled:s,save:async()=>!1,clearAutoSave:()=>{},getRecoveryData:()=>null,acceptRecovery:()=>null,dismissRecovery:()=>{},enable:()=>{},disable:()=>{}};let _=new o.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,a.value=e.hasRecoveryData,s.value=e.isEnabled},y=_.subscribe(v);u?_.enable():_.disable(),v(),(0,n.watch)(()=>(0,n.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,n.onBeforeUnmount)(()=>{y(),_.destroy()}),{status:r,lastSaveTime:i,hasRecoveryData:a,isEnabled:s,save:b,clearAutoSave:x,getRecoveryData:S,acceptRecovery:C,dismissRecovery:w,enable:T,disable:E}}function f(e={}){let{onCopy:t,onCut:i,onPaste:a,cleanWordFormatting:o=!0,editable:s=!0,onError:c,theme:l}=e,u=(0,n.ref)(!1),d=(0,n.ref)(null);async function f(e){if(u.value)return!1;u.value=!0;try{let n=await(0,r.copyRuns)(e.runs,{onError:c,theme:l});return n&&t?.(e),n}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}}var p=40,m=12;function h({pagesContainer:e,onScrollExtendSelection:t}){let r=null,i=0,a=0,o=!1,c=null;function l(){if(c)return c;let t=e.value;return t?(c=(0,s.findVerticalScrollParent)(t),c):null}function u(){o=!1,r!==null&&(cancelAnimationFrame(r),r=null)}function d(){if(!o)return;let e=l();if(!e)return;let n=e.getBoundingClientRect(),s=0;if(a<n.top+p){let e=Math.max(0,n.top+p-a);s=-Math.min(m,e/p*m)}else if(a>n.bottom-p){let e=Math.max(0,a-(n.bottom-p));s=Math.min(m,e/p*m)}s!==0&&(e.scrollTop+=s,t(i,a)),r=requestAnimationFrame(d)}function f(){o||(o=!0,r=requestAnimationFrame(d))}function h(e,t){if(i=e,a=t,!o){let e=l();if(!e)return;let n=e.getBoundingClientRect();(t<n.top+p||t>n.bottom-p)&&f()}}return(0,n.onBeforeUnmount)(()=>u()),{updateMousePosition:h,stopAutoScroll:u}}function g(e={}){let t=(0,n.reactive)({isOpen:!1,searchText:``,replaceText:``,options:(0,c.createDefaultFindOptions)(),matches:[],currentIndex:0,replaceMode:e.initialReplaceMode??!1});function r(e){t.isOpen=!0,t.replaceMode=!1,e&&(t.searchText=e),t.matches=[],t.currentIndex=0}function i(e){t.isOpen=!0,t.replaceMode=!0,e&&(t.searchText=e),t.matches=[],t.currentIndex=0}function a(){t.isOpen=!1}function o(){t.isOpen=!t.isOpen}function s(e){t.searchText=e}function l(e){t.replaceText=e}function u(e){t.options={...t.options,...e}}function d(n,r=0){let i=Math.max(0,Math.min(r,n.length-1));t.matches=n,t.currentIndex=n.length>0?i:0,e.onMatchesChange?.(n),n.length>0?e.onCurrentMatchChange?.(n[i],i):e.onCurrentMatchChange?.(null,-1)}function f(){return t.matches.length===0?0:(t.currentIndex=(t.currentIndex+1)%t.matches.length,t.currentIndex)}function p(){return t.matches.length===0?0:(t.currentIndex=t.currentIndex===0?t.matches.length-1:t.currentIndex-1,t.currentIndex)}function m(e){t.matches.length===0||e<0||e>=t.matches.length||(t.currentIndex=e)}return{state:t,currentMatch:(0,n.computed)(()=>t.matches.length===0?null:t.matches[t.currentIndex]??null),hasMatches:(0,n.computed)(()=>t.matches.length>0),openFind:r,openReplace:i,close:a,toggle:o,setSearchText:s,setReplaceText:l,setOptions:u,setMatches:d,goToNextMatch:f,goToPreviousMatch:p,goToMatch:m}}function _({isOpen:e,onClose:t,align:r=`left`}){let i=(0,n.ref)(null),a=(0,n.ref)(null),o=(0,n.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 n=e.target;i.value&&!i.value.contains(n)&&a.value&&!a.value.contains(n)&&t()}function l(e){e.key===`Escape`&&t()}function u(){t()}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,n.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,n.onBeforeUnmount)(f);function p(e){e.preventDefault(),e.stopPropagation()}return{containerRef:i,dropdownRef:a,dropdownStyle:o,handleMouseDown:p}}function v(e,t){let r=(0,n.computed)(()=>{t.value;let n=e.value;return n?(0,i.undoDepth)(n.state)>0:!1}),a=(0,n.computed)(()=>{t.value;let n=e.value;return n?(0,i.redoDepth)(n.state)>0:!1});function o(){let t=e.value;return t?(0,i.undo)(t.state,t.dispatch):!1}function s(){let t=e.value;return t?(0,i.redo)(t.state,t.dispatch):!1}return{canUndo:r,canRedo:a,undo:o,redo:s}}function y(e){let{containerRef:t,enabled:i=!0,config:a=r.DEFAULT_SELECTION_STYLE,useOverlay:o=!1,debounceMs:s=16,onSelectionChange:c}=e,l=(0,n.ref)(!1),u=(0,n.ref)(``),d=(0,n.ref)([]),f=(0,n.ref)(!1),p=null,m=0;function h(){let e=t.value,n=(0,r.hasActiveSelection)(),i=(0,r.getSelectedText)(),a=e?(0,r.isSelectionWithin)(e):!1;l.value=n,u.value=i,f.value=a,d.value=o&&a&&e?(0,r.getMergedSelectionRects)(e):[],c?.(n&&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,n.onMounted)(()=>{i&&((0,r.areSelectionStylesInjected)()||(0,r.injectSelectionStyles)(a),document.addEventListener(`selectionchange`,_))}),(0,n.onBeforeUnmount)(()=>{document.removeEventListener(`selectionchange`,_),p&&clearTimeout(p)}),(0,n.watch)(t,()=>h()),{hasSelection:(0,n.computed)(()=>l.value),selectedText:(0,n.computed)(()=>u.value),highlightRects:(0,n.computed)(()=>d.value),isSelectionInContainer:(0,n.computed)(()=>f.value),refresh:g,getOverlayStyle:v}}function b(){let e=new l.TableSelectionManager,t=(0,n.ref)(null),r=()=>{t.value=e.getSnapshot().selectedCell},i=e.subscribe(r);r(),(0,n.onBeforeUnmount)(()=>{i()});function a(t,n,r){e.selectCell({tableIndex:t,rowIndex:n,columnIndex:r})}function o(t,n){let r=(0,l.findTableFromClick)(t,n);r?e.selectCell(r):e.clearSelection()}function s(){e.clearSelection()}function c(t,n,r){return e.isCellSelected(t,n,r)}return{selectedCell:t,handleCellClick:a,handleClickTarget:o,clearSelection:s,isCellSelected:c}}function x(e,t){return(0,n.computed)(()=>(t.value,(0,a.extractTrackedChanges)(e.value?.state??null)))}function S(e){let t=(0,u.createVisualLineState)();function n(t){let n=e.value;return n?(0,u.getCaretClientX)(n,t):null}function r(t){let n=e.value;return n?(0,u.findLineElementAtPosition)(n,t):null}function i(e,t){return(0,u.findPositionOnLineAtClientX)(e,t)}function a(n,r){return(0,u.handleVisualLineKeyDown)(t,n,r,e.value)}return{state:t,getCaretClientX:n,findLineElementAtPosition:r,findPositionOnLineAtClientX:i,handlePMKeyDown:a}}exports.createSelectionFromDOM=o.createSelectionFromDOM,exports.extractTrackedChanges=a.extractTrackedChanges,exports.formatLastSaveTime=o.formatLastSaveTime,exports.formatStorageSize=o.formatStorageSize,exports.getAutoSaveStatusLabel=o.getAutoSaveStatusLabel,exports.getAutoSaveStorageSize=o.getAutoSaveStorageSize,exports.getSelectionRuns=o.getSelectionRuns,exports.isAutoSaveSupported=o.isAutoSaveSupported,exports.runsToClipboardContent=r.runsToClipboardContent,exports.useAutoSave=d,exports.useClipboard=f,exports.useCommentSidebarItems=e.t,exports.useDocxEditor=t.r,exports.useDragAutoScroll=h,exports.useFindReplace=g,exports.useFixedDropdown=_,exports.useHistory=v,exports.useSelectionHighlight=y,exports.useTableResize=t.t,exports.useTableSelection=b,exports.useTrackedChanges=x,exports.useVisualLineNavigation=S,exports.useWheelZoom=t.n,exports.useZoom=t.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useCommentSidebarItems-CbNvNCd3.cjs`),t=require(`./useDragAutoScroll-BT6oPYBj.cjs`);let n=require(`vue`),r=require(`@eigenpal/docx-editor-core/utils`),i=require(`prosemirror-history`),a=require(`@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges`),o=require(`@eigenpal/docx-editor-core`),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,t={}){let r=(0,n.ref)(`idle`),i=(0,n.ref)(null),a=(0,n.ref)(!1),s=(0,n.ref)(!0),{storageKey:c,interval:l,enabled:u=!0,maxAge:d,onSave:f,onError:p,onRecoveryAvailable:m,saveOnChange:h,debounceDelay:g}=t;if(!(0,o.isAutoSaveSupported)())return{status:r,lastSaveTime:i,hasRecoveryData:a,isEnabled:s,save:async()=>!1,clearAutoSave:()=>{},getRecoveryData:()=>null,acceptRecovery:()=>null,dismissRecovery:()=>{},enable:()=>{},disable:()=>{}};let _=new o.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,a.value=e.hasRecoveryData,s.value=e.isEnabled},y=_.subscribe(v);u?_.enable():_.disable(),v(),(0,n.watch)(()=>(0,n.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,n.onBeforeUnmount)(()=>{y(),_.destroy()}),{status:r,lastSaveTime:i,hasRecoveryData:a,isEnabled:s,save:b,clearAutoSave:x,getRecoveryData:S,acceptRecovery:C,dismissRecovery:w,enable:T,disable:E}}function d(e={}){let{onCopy:t,onCut:i,onPaste:a,cleanWordFormatting:o=!0,editable:s=!0,onError:c,theme:l}=e,u=(0,n.ref)(!1),d=(0,n.ref)(null);async function f(e){if(u.value)return!1;u.value=!0;try{let n=await(0,r.copyRuns)(e.runs,{onError:c,theme:l});return n&&t?.(e),n}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(e={}){let t=(0,n.reactive)({isOpen:!1,searchText:``,replaceText:``,options:(0,s.createDefaultFindOptions)(),matches:[],currentIndex:0,replaceMode:e.initialReplaceMode??!1});function r(e){t.isOpen=!0,t.replaceMode=!1,e&&(t.searchText=e),t.matches=[],t.currentIndex=0}function i(e){t.isOpen=!0,t.replaceMode=!0,e&&(t.searchText=e),t.matches=[],t.currentIndex=0}function a(){t.isOpen=!1}function o(){t.isOpen=!t.isOpen}function c(e){t.searchText=e}function l(e){t.replaceText=e}function u(e){t.options={...t.options,...e}}function d(n,r=0){let i=Math.max(0,Math.min(r,n.length-1));t.matches=n,t.currentIndex=n.length>0?i:0,e.onMatchesChange?.(n),n.length>0?e.onCurrentMatchChange?.(n[i],i):e.onCurrentMatchChange?.(null,-1)}function f(){return t.matches.length===0?0:(t.currentIndex=(t.currentIndex+1)%t.matches.length,t.currentIndex)}function p(){return t.matches.length===0?0:(t.currentIndex=t.currentIndex===0?t.matches.length-1:t.currentIndex-1,t.currentIndex)}function m(e){t.matches.length===0||e<0||e>=t.matches.length||(t.currentIndex=e)}return{state:t,currentMatch:(0,n.computed)(()=>t.matches.length===0?null:t.matches[t.currentIndex]??null),hasMatches:(0,n.computed)(()=>t.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 p({isOpen:e,onClose:t,align:r=`left`}){let i=(0,n.ref)(null),a=(0,n.ref)(null),o=(0,n.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 n=e.target;i.value&&!i.value.contains(n)&&a.value&&!a.value.contains(n)&&t()}function l(e){e.key===`Escape`&&t()}function u(){t()}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,n.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,n.onBeforeUnmount)(f);function p(e){e.preventDefault(),e.stopPropagation()}return{containerRef:i,dropdownRef:a,dropdownStyle:o,handleMouseDown:p}}function m(e,t){let r=(0,n.computed)(()=>{t.value;let n=e.value;return n?(0,i.undoDepth)(n.state)>0:!1}),a=(0,n.computed)(()=>{t.value;let n=e.value;return n?(0,i.redoDepth)(n.state)>0:!1});function o(){let t=e.value;return t?(0,i.undo)(t.state,t.dispatch):!1}function s(){let t=e.value;return t?(0,i.redo)(t.state,t.dispatch):!1}return{canUndo:r,canRedo:a,undo:o,redo:s}}function h(e){let{containerRef:t,enabled:i=!0,config:a=r.DEFAULT_SELECTION_STYLE,useOverlay:o=!1,debounceMs:s=16,onSelectionChange:c}=e,l=(0,n.ref)(!1),u=(0,n.ref)(``),d=(0,n.ref)([]),f=(0,n.ref)(!1),p=null,m=0;function h(){let e=t.value,n=(0,r.hasActiveSelection)(),i=(0,r.getSelectedText)(),a=e?(0,r.isSelectionWithin)(e):!1;l.value=n,u.value=i,f.value=a,d.value=o&&a&&e?(0,r.getMergedSelectionRects)(e):[],c?.(n&&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,n.onMounted)(()=>{i&&((0,r.areSelectionStylesInjected)()||(0,r.injectSelectionStyles)(a),document.addEventListener(`selectionchange`,_))}),(0,n.onBeforeUnmount)(()=>{document.removeEventListener(`selectionchange`,_),p&&clearTimeout(p)}),(0,n.watch)(t,()=>h()),{hasSelection:(0,n.computed)(()=>l.value),selectedText:(0,n.computed)(()=>u.value),highlightRects:(0,n.computed)(()=>d.value),isSelectionInContainer:(0,n.computed)(()=>f.value),refresh:g,getOverlayStyle:v}}function g(){let e=new c.TableSelectionManager,t=(0,n.ref)(null),r=()=>{t.value=e.getSnapshot().selectedCell},i=e.subscribe(r);r(),(0,n.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:t,handleCellClick:a,handleClickTarget:o,clearSelection:s,isCellSelected:l}}function _(e,t){return(0,n.computed)(()=>(t.value,(0,a.extractTrackedChanges)(e.value?.state??null)))}function v(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=o.createSelectionFromDOM,exports.extractTrackedChanges=a.extractTrackedChanges,exports.formatLastSaveTime=o.formatLastSaveTime,exports.formatStorageSize=o.formatStorageSize,exports.getAutoSaveStatusLabel=o.getAutoSaveStatusLabel,exports.getAutoSaveStorageSize=o.getAutoSaveStorageSize,exports.getSelectionRuns=o.getSelectionRuns,exports.isAutoSaveSupported=o.isAutoSaveSupported,exports.runsToClipboardContent=r.runsToClipboardContent,exports.useAutoSave=u,exports.useClipboard=d,exports.useCommentSidebarItems=e.t,exports.useDocxEditor=t.i,exports.useDragAutoScroll=t.t,exports.useFindReplace=f,exports.useFixedDropdown=p,exports.useHistory=m,exports.useSelectionHighlight=h,exports.useTableResize=t.n,exports.useTableSelection=g,exports.useTrackedChanges=_,exports.useVisualLineNavigation=v,exports.useWheelZoom=t.r,exports.useZoom=t.r;
@@ -1,22 +1,21 @@
1
1
  import { t as e } from "./useCommentSidebarItems-BHomCzpj.js";
2
- import { n as t, r as n, t as r } from "./useTableResize-uq2ksRDf.js";
3
- import { computed as i, onBeforeUnmount as a, onMounted as o, reactive as s, ref as c, unref as l, watch as u } from "vue";
4
- import { DEFAULT_SELECTION_STYLE as d, areSelectionStylesInjected as f, copyRuns as p, getMergedSelectionRects as m, getSelectedText as h, hasActiveSelection as g, injectSelectionStyles as _, isSelectionWithin as v, parseClipboardHtml as y, runsToClipboardContent as b } from "@eigenpal/docx-editor-core/utils";
5
- import { redo as x, redoDepth as S, undo as C, undoDepth as w } from "prosemirror-history";
6
- import { extractTrackedChanges as T } from "@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges";
7
- import { AutoSaveManager as E, createSelectionFromDOM as D, formatLastSaveTime as O, formatStorageSize as k, getAutoSaveStatusLabel as A, getAutoSaveStorageSize as j, getSelectionRuns as M, isAutoSaveSupported as N } from "@eigenpal/docx-editor-core";
8
- import { findVerticalScrollParent as P } from "@eigenpal/docx-editor-core/utils/findVerticalScrollParent";
2
+ import { i as t, n, r, t as i } from "./useDragAutoScroll-C56F_WS_.js";
3
+ import { computed as a, onBeforeUnmount as o, onMounted as s, reactive as c, ref as l, unref as u, watch as d } from "vue";
4
+ import { DEFAULT_SELECTION_STYLE as f, areSelectionStylesInjected as p, copyRuns as m, getMergedSelectionRects as h, getSelectedText as g, hasActiveSelection as _, injectSelectionStyles as v, isSelectionWithin as y, parseClipboardHtml as b, runsToClipboardContent as x } from "@eigenpal/docx-editor-core/utils";
5
+ import { redo as S, redoDepth as C, undo as w, undoDepth as T } from "prosemirror-history";
6
+ import { extractTrackedChanges as E } from "@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges";
7
+ import { AutoSaveManager as D, createSelectionFromDOM as O, formatLastSaveTime as k, formatStorageSize as A, getAutoSaveStatusLabel as j, getAutoSaveStorageSize as M, getSelectionRuns as N, isAutoSaveSupported as P } from "@eigenpal/docx-editor-core";
9
8
  import { createDefaultFindOptions as F } from "@eigenpal/docx-editor-core/utils/findReplace";
10
9
  import { TableSelectionManager as I, findTableFromClick as L } from "@eigenpal/docx-editor-core/managers/TableSelectionManager";
11
10
  import { createVisualLineState as R, findLineElementAtPosition as z, findPositionOnLineAtClientX as B, getCaretClientX as V, handleVisualLineKeyDown as H } from "@eigenpal/docx-editor-core/prosemirror/utils/visualLineNavigation";
12
11
  //#region src/composables/useAutoSave.ts
13
12
  function U(e, t = {}) {
14
- let n = c("idle"), r = c(null), i = c(!1), o = c(!0), { storageKey: s, interval: d, enabled: f = !0, maxAge: p, onSave: m, onError: h, onRecoveryAvailable: g, saveOnChange: _, debounceDelay: v } = t;
15
- if (!N()) return {
13
+ let n = l("idle"), r = l(null), i = l(!1), a = l(!0), { storageKey: s, interval: c, enabled: f = !0, maxAge: p, onSave: m, onError: h, onRecoveryAvailable: g, saveOnChange: _, debounceDelay: v } = t;
14
+ if (!P()) return {
16
15
  status: n,
17
16
  lastSaveTime: r,
18
17
  hasRecoveryData: i,
19
- isEnabled: o,
18
+ isEnabled: a,
20
19
  save: async () => !1,
21
20
  clearAutoSave: () => {},
22
21
  getRecoveryData: () => null,
@@ -25,9 +24,9 @@ function U(e, t = {}) {
25
24
  enable: () => {},
26
25
  disable: () => {}
27
26
  };
28
- let y = new E({
27
+ let y = new D({
29
28
  storageKey: s,
30
- interval: d,
29
+ interval: c,
31
30
  maxAge: p,
32
31
  saveOnChange: _,
33
32
  debounceDelay: v,
@@ -36,9 +35,9 @@ function U(e, t = {}) {
36
35
  onRecoveryAvailable: g
37
36
  }), b = () => {
38
37
  let e = y.getSnapshot();
39
- n.value = e.status, r.value = e.lastSaveTime, i.value = e.hasRecoveryData, o.value = e.isEnabled;
38
+ n.value = e.status, r.value = e.lastSaveTime, i.value = e.hasRecoveryData, a.value = e.isEnabled;
40
39
  }, x = y.subscribe(b);
41
- f ? y.enable() : y.disable(), b(), u(() => l(e), (e) => y.onDocumentChanged(e ?? null), { immediate: !0 });
40
+ f ? y.enable() : y.disable(), b(), d(() => u(e), (e) => y.onDocumentChanged(e ?? null), { immediate: !0 });
42
41
  function S() {
43
42
  return y.save();
44
43
  }
@@ -51,7 +50,7 @@ function U(e, t = {}) {
51
50
  function T() {
52
51
  return y.acceptRecovery();
53
52
  }
54
- function D() {
53
+ function E() {
55
54
  y.dismissRecovery();
56
55
  }
57
56
  function O() {
@@ -60,18 +59,18 @@ function U(e, t = {}) {
60
59
  function k() {
61
60
  y.disable();
62
61
  }
63
- return a(() => {
62
+ return o(() => {
64
63
  x(), y.destroy();
65
64
  }), {
66
65
  status: n,
67
66
  lastSaveTime: r,
68
67
  hasRecoveryData: i,
69
- isEnabled: o,
68
+ isEnabled: a,
70
69
  save: S,
71
70
  clearAutoSave: C,
72
71
  getRecoveryData: w,
73
72
  acceptRecovery: T,
74
- dismissRecovery: D,
73
+ dismissRecovery: E,
75
74
  enable: O,
76
75
  disable: k
77
76
  };
@@ -79,106 +78,63 @@ function U(e, t = {}) {
79
78
  //#endregion
80
79
  //#region src/composables/useClipboard.ts
81
80
  function W(e = {}) {
82
- let { onCopy: t, onCut: n, onPaste: r, cleanWordFormatting: i = !0, editable: a = !0, onError: o, theme: s } = e, l = c(!1), u = c(null);
81
+ let { onCopy: t, onCut: n, onPaste: r, cleanWordFormatting: i = !0, editable: a = !0, onError: o, theme: s } = e, c = l(!1), u = l(null);
83
82
  async function d(e) {
84
- if (l.value) return !1;
85
- l.value = !0;
83
+ if (c.value) return !1;
84
+ c.value = !0;
86
85
  try {
87
- let n = await p(e.runs, {
86
+ let n = await m(e.runs, {
88
87
  onError: o,
89
88
  theme: s
90
89
  });
91
90
  return n && t?.(e), n;
92
91
  } finally {
93
- l.value = !1;
92
+ c.value = !1;
94
93
  }
95
94
  }
96
95
  async function f(e) {
97
- if (l.value || !a) return !1;
98
- l.value = !0;
96
+ if (c.value || !a) return !1;
97
+ c.value = !0;
99
98
  try {
100
- let t = await p(e.runs, {
99
+ let t = await m(e.runs, {
101
100
  onError: o,
102
101
  theme: s
103
102
  });
104
103
  return t && n?.(e), t;
105
104
  } finally {
106
- l.value = !1;
105
+ c.value = !1;
107
106
  }
108
107
  }
109
- async function m(e = !1) {
110
- if (l.value || !a) return null;
111
- l.value = !0;
108
+ async function p(e = !1) {
109
+ if (c.value || !a) return null;
110
+ c.value = !0;
112
111
  try {
113
112
  if (navigator.clipboard && navigator.clipboard.read) {
114
113
  let t = await navigator.clipboard.read(), n = "", a = "";
115
114
  for (let e of t) e.types.includes("text/html") && (n = await (await e.getType("text/html")).text()), e.types.includes("text/plain") && (a = await (await e.getType("text/plain")).text());
116
115
  e && (n = "");
117
- let o = y(n, a, i);
116
+ let o = b(n, a, i);
118
117
  return u.value = o, r?.(o, e), o;
119
118
  }
120
119
  return null;
121
120
  } catch (e) {
122
121
  return o?.(e instanceof Error ? e : Error(String(e))), null;
123
122
  } finally {
124
- l.value = !1;
123
+ c.value = !1;
125
124
  }
126
125
  }
127
126
  return {
128
127
  copy: d,
129
128
  cut: f,
130
- paste: m,
131
- isProcessing: l,
129
+ paste: p,
130
+ isProcessing: c,
132
131
  lastPastedContent: u
133
132
  };
134
133
  }
135
134
  //#endregion
136
- //#region src/composables/useDragAutoScroll.ts
137
- var G = 40, K = 12;
138
- function q({ pagesContainer: e, onScrollExtendSelection: t }) {
139
- let n = null, r = 0, i = 0, o = !1, s = null;
140
- function c() {
141
- if (s) return s;
142
- let t = e.value;
143
- return t ? (s = P(t), s) : null;
144
- }
145
- function l() {
146
- o = !1, n !== null && (cancelAnimationFrame(n), n = null);
147
- }
148
- function u() {
149
- if (!o) return;
150
- let e = c();
151
- if (!e) return;
152
- let a = e.getBoundingClientRect(), s = 0;
153
- if (i < a.top + G) {
154
- let e = Math.max(0, a.top + G - i);
155
- s = -Math.min(K, e / G * K);
156
- } else if (i > a.bottom - G) {
157
- let e = Math.max(0, i - (a.bottom - G));
158
- s = Math.min(K, e / G * K);
159
- }
160
- s !== 0 && (e.scrollTop += s, t(r, i)), n = requestAnimationFrame(u);
161
- }
162
- function d() {
163
- o || (o = !0, n = requestAnimationFrame(u));
164
- }
165
- function f(e, t) {
166
- if (r = e, i = t, !o) {
167
- let e = c();
168
- if (!e) return;
169
- let n = e.getBoundingClientRect();
170
- (t < n.top + G || t > n.bottom - G) && d();
171
- }
172
- }
173
- return a(() => l()), {
174
- updateMousePosition: f,
175
- stopAutoScroll: l
176
- };
177
- }
178
- //#endregion
179
135
  //#region src/composables/useFindReplace.ts
180
- function J(e = {}) {
181
- let t = s({
136
+ function G(e = {}) {
137
+ let t = c({
182
138
  isOpen: !1,
183
139
  searchText: "",
184
140
  replaceText: "",
@@ -193,13 +149,13 @@ function J(e = {}) {
193
149
  function r(e) {
194
150
  t.isOpen = !0, t.replaceMode = !0, e && (t.searchText = e), t.matches = [], t.currentIndex = 0;
195
151
  }
196
- function a() {
152
+ function i() {
197
153
  t.isOpen = !1;
198
154
  }
199
155
  function o() {
200
156
  t.isOpen = !t.isOpen;
201
157
  }
202
- function c(e) {
158
+ function s(e) {
203
159
  t.searchText = e;
204
160
  }
205
161
  function l(e) {
@@ -226,13 +182,13 @@ function J(e = {}) {
226
182
  }
227
183
  return {
228
184
  state: t,
229
- currentMatch: i(() => t.matches.length === 0 ? null : t.matches[t.currentIndex] ?? null),
230
- hasMatches: i(() => t.matches.length > 0),
185
+ currentMatch: a(() => t.matches.length === 0 ? null : t.matches[t.currentIndex] ?? null),
186
+ hasMatches: a(() => t.matches.length > 0),
231
187
  openFind: n,
232
188
  openReplace: r,
233
- close: a,
189
+ close: i,
234
190
  toggle: o,
235
- setSearchText: c,
191
+ setSearchText: s,
236
192
  setReplaceText: l,
237
193
  setOptions: u,
238
194
  setMatches: d,
@@ -243,38 +199,38 @@ function J(e = {}) {
243
199
  }
244
200
  //#endregion
245
201
  //#region src/composables/useFixedDropdown.ts
246
- function Y({ isOpen: e, onClose: t, align: n = "left" }) {
247
- let r = c(null), i = c(null), o = c({
202
+ function K({ isOpen: e, onClose: t, align: n = "left" }) {
203
+ let r = l(null), i = l(null), a = l({
248
204
  position: "fixed",
249
205
  top: "0px",
250
206
  left: "0px",
251
207
  zIndex: 1e4
252
208
  });
253
209
  function s(e, t) {
254
- o.value = {
210
+ a.value = {
255
211
  position: "fixed",
256
212
  top: e + "px",
257
213
  left: t + "px",
258
214
  zIndex: 1e4
259
215
  };
260
216
  }
261
- function l(e) {
217
+ function c(e) {
262
218
  let n = e.target;
263
219
  r.value && !r.value.contains(n) && i.value && !i.value.contains(n) && t();
264
220
  }
265
- function d(e) {
221
+ function u(e) {
266
222
  e.key === "Escape" && t();
267
223
  }
268
224
  function f() {
269
225
  t();
270
226
  }
271
227
  function p() {
272
- document.addEventListener("mousedown", l), document.addEventListener("keydown", d), window.addEventListener("scroll", f, !0);
228
+ document.addEventListener("mousedown", c), document.addEventListener("keydown", u), window.addEventListener("scroll", f, !0);
273
229
  }
274
230
  function m() {
275
- document.removeEventListener("mousedown", l), document.removeEventListener("keydown", d), window.removeEventListener("scroll", f, !0);
231
+ document.removeEventListener("mousedown", c), document.removeEventListener("keydown", u), window.removeEventListener("scroll", f, !0);
276
232
  }
277
- u(e, (e) => {
233
+ d(e, (e) => {
278
234
  if (!e) {
279
235
  m();
280
236
  return;
@@ -289,61 +245,61 @@ function Y({ isOpen: e, onClose: t, align: n = "left" }) {
289
245
  s(a.bottom + 4, a.right - t.width);
290
246
  } else s(a.bottom + 4, a.left);
291
247
  }) : s(a.bottom + 4, a.left), p();
292
- }), a(m);
248
+ }), o(m);
293
249
  function h(e) {
294
250
  e.preventDefault(), e.stopPropagation();
295
251
  }
296
252
  return {
297
253
  containerRef: r,
298
254
  dropdownRef: i,
299
- dropdownStyle: o,
255
+ dropdownStyle: a,
300
256
  handleMouseDown: h
301
257
  };
302
258
  }
303
259
  //#endregion
304
260
  //#region src/composables/useHistory.ts
305
- function X(e, t) {
306
- let n = i(() => {
261
+ function q(e, t) {
262
+ let n = a(() => {
307
263
  t.value;
308
264
  let n = e.value;
309
- return n ? w(n.state) > 0 : !1;
310
- }), r = i(() => {
265
+ return n ? T(n.state) > 0 : !1;
266
+ }), r = a(() => {
311
267
  t.value;
312
268
  let n = e.value;
313
- return n ? S(n.state) > 0 : !1;
269
+ return n ? C(n.state) > 0 : !1;
314
270
  });
315
- function a() {
271
+ function i() {
316
272
  let t = e.value;
317
- return t ? C(t.state, t.dispatch) : !1;
273
+ return t ? w(t.state, t.dispatch) : !1;
318
274
  }
319
275
  function o() {
320
276
  let t = e.value;
321
- return t ? x(t.state, t.dispatch) : !1;
277
+ return t ? S(t.state, t.dispatch) : !1;
322
278
  }
323
279
  return {
324
280
  canUndo: n,
325
281
  canRedo: r,
326
- undo: a,
282
+ undo: i,
327
283
  redo: o
328
284
  };
329
285
  }
330
286
  //#endregion
331
287
  //#region src/composables/useSelectionHighlight.ts
332
- function Z(e) {
333
- let { containerRef: t, enabled: n = !0, config: r = d, useOverlay: s = !1, debounceMs: l = 16, onSelectionChange: p } = e, y = c(!1), b = c(""), x = c([]), S = c(!1), C = null, w = 0;
288
+ function J(e) {
289
+ let { containerRef: t, enabled: n = !0, config: r = f, useOverlay: i = !1, debounceMs: c = 16, onSelectionChange: u } = e, m = l(!1), b = l(""), x = l([]), S = l(!1), C = null, w = 0;
334
290
  function T() {
335
- let e = t.value, n = g(), r = h(), i = e ? v(e) : !1;
336
- y.value = n, b.value = r, S.value = i, x.value = s && i && e ? m(e) : [], p?.(n && i, r);
291
+ let e = t.value, n = _(), r = g(), a = e ? y(e) : !1;
292
+ m.value = n, b.value = r, S.value = a, x.value = i && a && e ? h(e) : [], u?.(n && a, r);
337
293
  }
338
294
  function E() {
339
295
  T();
340
296
  }
341
297
  function D() {
342
298
  let e = performance.now();
343
- if (e - w < l) {
299
+ if (e - w < c) {
344
300
  C && clearTimeout(C), C = setTimeout(() => {
345
301
  w = performance.now(), T(), C = null;
346
- }, l);
302
+ }, c);
347
303
  return;
348
304
  }
349
305
  w = e, T();
@@ -362,26 +318,26 @@ function Z(e) {
362
318
  pointerEvents: "none"
363
319
  };
364
320
  }
365
- return o(() => {
366
- n && (f() || _(r), document.addEventListener("selectionchange", D));
367
- }), a(() => {
321
+ return s(() => {
322
+ n && (p() || v(r), document.addEventListener("selectionchange", D));
323
+ }), o(() => {
368
324
  document.removeEventListener("selectionchange", D), C && clearTimeout(C);
369
- }), u(t, () => T()), {
370
- hasSelection: i(() => y.value),
371
- selectedText: i(() => b.value),
372
- highlightRects: i(() => x.value),
373
- isSelectionInContainer: i(() => S.value),
325
+ }), d(t, () => T()), {
326
+ hasSelection: a(() => m.value),
327
+ selectedText: a(() => b.value),
328
+ highlightRects: a(() => x.value),
329
+ isSelectionInContainer: a(() => S.value),
374
330
  refresh: E,
375
331
  getOverlayStyle: O
376
332
  };
377
333
  }
378
334
  //#endregion
379
335
  //#region src/composables/useTableSelection.ts
380
- function Q() {
381
- let e = new I(), t = c(null), n = () => {
336
+ function Y() {
337
+ let e = new I(), t = l(null), n = () => {
382
338
  t.value = e.getSnapshot().selectedCell;
383
339
  }, r = e.subscribe(n);
384
- n(), a(() => {
340
+ n(), o(() => {
385
341
  r();
386
342
  });
387
343
  function i(t, n, r) {
@@ -391,32 +347,32 @@ function Q() {
391
347
  columnIndex: r
392
348
  });
393
349
  }
394
- function o(t, n) {
350
+ function a(t, n) {
395
351
  let r = L(t, n);
396
352
  r ? e.selectCell(r) : e.clearSelection();
397
353
  }
398
354
  function s() {
399
355
  e.clearSelection();
400
356
  }
401
- function l(t, n, r) {
357
+ function c(t, n, r) {
402
358
  return e.isCellSelected(t, n, r);
403
359
  }
404
360
  return {
405
361
  selectedCell: t,
406
362
  handleCellClick: i,
407
- handleClickTarget: o,
363
+ handleClickTarget: a,
408
364
  clearSelection: s,
409
- isCellSelected: l
365
+ isCellSelected: c
410
366
  };
411
367
  }
412
368
  //#endregion
413
369
  //#region src/composables/useTrackedChanges.ts
414
- function $(e, t) {
415
- return i(() => (t.value, T(e.value?.state ?? null)));
370
+ function X(e, t) {
371
+ return a(() => (t.value, E(e.value?.state ?? null)));
416
372
  }
417
373
  //#endregion
418
374
  //#region src/composables/useVisualLineNavigation.ts
419
- function ee(e) {
375
+ function Z(e) {
420
376
  let t = R();
421
377
  function n(t) {
422
378
  let n = e.value;
@@ -441,4 +397,4 @@ function ee(e) {
441
397
  };
442
398
  }
443
399
  //#endregion
444
- export { D as createSelectionFromDOM, T as extractTrackedChanges, O as formatLastSaveTime, k as formatStorageSize, A as getAutoSaveStatusLabel, j as getAutoSaveStorageSize, M as getSelectionRuns, N as isAutoSaveSupported, b as runsToClipboardContent, U as useAutoSave, W as useClipboard, e as useCommentSidebarItems, n as useDocxEditor, q as useDragAutoScroll, J as useFindReplace, Y as useFixedDropdown, X as useHistory, Z as useSelectionHighlight, r as useTableResize, Q as useTableSelection, $ as useTrackedChanges, ee as useVisualLineNavigation, t as useWheelZoom, t as useZoom };
400
+ export { O as createSelectionFromDOM, E as extractTrackedChanges, k as formatLastSaveTime, A as formatStorageSize, j as getAutoSaveStatusLabel, M as getAutoSaveStorageSize, N as getSelectionRuns, P as isAutoSaveSupported, x as runsToClipboardContent, U as useAutoSave, W as useClipboard, e as useCommentSidebarItems, t as useDocxEditor, i as useDragAutoScroll, G as useFindReplace, K as useFixedDropdown, q as useHistory, J as useSelectionHighlight, n as useTableResize, Y as useTableSelection, X as useTrackedChanges, Z as useVisualLineNavigation, r as useWheelZoom, r as useZoom };