@sqren/docx-editor-react 1.7.0-fork.0 → 1.7.0-fork.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.
- package/dist/KeyboardShortcutsDialog-B-h3NAat.d.mts +3 -3
- package/dist/KeyboardShortcutsDialog-B-h3NAat.d.ts +3 -3
- package/dist/WatermarkDialog-KRL7WMIS.mjs +1 -1
- package/dist/WatermarkDialog-XGLAH3TK.js +1 -1
- package/dist/chunk-4Y4JFAPY.mjs +1 -1
- package/dist/chunk-74OM4KEH.js +1 -1
- package/dist/chunk-7VWJSV3T.js +1 -1
- package/dist/chunk-BABMU5KA.mjs +1 -1
- package/dist/chunk-BZO4G5M6.js +1 -1
- package/dist/chunk-GNIO6SOS.js +1 -1
- package/dist/chunk-IVFYCMAM.mjs +1 -1
- package/dist/chunk-L4MDZW2J.js +1 -1
- package/dist/chunk-LNONBJQM.js +1 -1
- package/dist/chunk-OHNO4NRQ.mjs +1 -1
- package/dist/chunk-P5ZOUQIK.mjs +1 -1
- package/dist/chunk-P6METJHI.mjs +1 -1
- package/dist/chunk-WFGAQC2B.mjs +1 -1
- package/dist/chunk-WNWY6WX7.js +1 -1
- package/dist/chunk-YY52FSUR.js +1 -1
- package/dist/chunk-ZFZJRL2R.mjs +1 -1
- package/dist/dialogs.d.mts +7 -7
- package/dist/dialogs.d.ts +7 -7
- package/dist/hooks.d.mts +9 -9
- package/dist/hooks.d.ts +9 -9
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugin-api.d.mts +8 -8
- package/dist/plugin-api.d.ts +8 -8
- package/dist/plugin-api.js +1 -1
- package/dist/plugin-api.mjs +1 -1
- package/dist/styles.d.mts +2 -2
- package/dist/styles.d.ts +2 -2
- package/dist/types-D35gNE-_.d.mts +1 -1
- package/dist/types-D35gNE-_.d.ts +1 -1
- package/dist/ui.d.mts +12 -12
- package/dist/ui.d.ts +12 -12
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +1 -1
- package/dist/useFindReplace-Bc2ubEeV.d.mts +2 -2
- package/dist/useFindReplace-Bc2ubEeV.d.ts +2 -2
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react
|
|
3
3
|
*
|
|
4
4
|
* Curated root entry for the documented React editor API. Advanced surfaces
|
|
5
5
|
* stay public through explicit subpaths:
|
|
6
|
-
* - `@
|
|
7
|
-
* - `@
|
|
8
|
-
* - `@
|
|
9
|
-
* - `@
|
|
6
|
+
* - `@sqren/docx-editor-react/ui`
|
|
7
|
+
* - `@sqren/docx-editor-react/dialogs`
|
|
8
|
+
* - `@sqren/docx-editor-react/hooks`
|
|
9
|
+
* - `@sqren/docx-editor-react/plugin-api`
|
|
10
10
|
*
|
|
11
|
-
* Framework-agnostic document utilities live in `@
|
|
12
|
-
* Agent/MCP surfaces live in `@
|
|
11
|
+
* Framework-agnostic document utilities live in `@sqren/docx-editor-core`.
|
|
12
|
+
* Agent/MCP surfaces live in `@sqren/docx-editor-agents`.
|
|
13
13
|
*
|
|
14
14
|
* @packageDocumentation
|
|
15
15
|
* @public
|
|
@@ -20,19 +20,19 @@ import * as prosemirror_view from 'prosemirror-view';
|
|
|
20
20
|
import { EditorView } from 'prosemirror-view';
|
|
21
21
|
import * as prosemirror_state from 'prosemirror-state';
|
|
22
22
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
23
|
-
import { Document, HeaderFooter, Theme } from '@
|
|
24
|
-
import { FontOption } from '@
|
|
23
|
+
import { Document, HeaderFooter, Theme } from '@sqren/docx-editor-core/types/document';
|
|
24
|
+
import { FontOption } from '@sqren/docx-editor-core/utils/fontOptions';
|
|
25
25
|
import { R as ReactSidebarItem } from './types-D35gNE-_.mjs';
|
|
26
|
-
import { Comment } from '@
|
|
27
|
-
import { Translations, TFunction } from '@
|
|
26
|
+
import { Comment } from '@sqren/docx-editor-core/types/content';
|
|
27
|
+
import { Translations, TFunction } from '@sqren/docx-editor-i18n';
|
|
28
28
|
import { P as PrintOptions } from './PrintPreview-DEhwRBC_.mjs';
|
|
29
|
-
import { DocumentAgent, ContentControlFilter, ContentControlValue } from '@
|
|
30
|
-
import { DocxInput, FontDefinition } from '@
|
|
31
|
-
import { SelectionState, PMContentControl } from '@
|
|
32
|
-
import { Layout } from '@
|
|
33
|
-
import { RenderedDomContext } from '@
|
|
34
|
-
import { EditorHandle } from '@
|
|
35
|
-
export { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from '@
|
|
29
|
+
import { DocumentAgent, ContentControlFilter, ContentControlValue } from '@sqren/docx-editor-core/agent';
|
|
30
|
+
import { DocxInput, FontDefinition } from '@sqren/docx-editor-core/utils';
|
|
31
|
+
import { SelectionState, PMContentControl } from '@sqren/docx-editor-core/prosemirror';
|
|
32
|
+
import { Layout } from '@sqren/docx-editor-core/layout-engine';
|
|
33
|
+
import { RenderedDomContext } from '@sqren/docx-editor-core/plugin-api';
|
|
34
|
+
import { EditorHandle } from '@sqren/docx-editor-core';
|
|
35
|
+
export { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from '@sqren/docx-editor-core';
|
|
36
36
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -606,12 +606,12 @@ declare const DocxEditor: React.ForwardRefExoticComponent<DocxEditorProps & Reac
|
|
|
606
606
|
/**
|
|
607
607
|
* Simple imperative API for rendering a DOCX editor into a DOM element.
|
|
608
608
|
*
|
|
609
|
-
* Returns an `EditorHandle` (from @
|
|
609
|
+
* Returns an `EditorHandle` (from @sqren/docx-editor-core) that works with
|
|
610
610
|
* any framework implementation.
|
|
611
611
|
*
|
|
612
612
|
* Usage:
|
|
613
613
|
* ```ts
|
|
614
|
-
* import { renderAsync } from '@
|
|
614
|
+
* import { renderAsync } from '@sqren/docx-editor-react';
|
|
615
615
|
*
|
|
616
616
|
* const editor = await renderAsync(docxBlob, document.getElementById('container'), {
|
|
617
617
|
* readOnly: false,
|
|
@@ -663,17 +663,17 @@ declare function useTranslation(): {
|
|
|
663
663
|
};
|
|
664
664
|
|
|
665
665
|
/**
|
|
666
|
-
* @
|
|
666
|
+
* @sqren/docx-editor-react
|
|
667
667
|
*
|
|
668
668
|
* Curated root entry for the documented React editor API. Advanced surfaces
|
|
669
669
|
* stay public through explicit subpaths:
|
|
670
|
-
* - `@
|
|
671
|
-
* - `@
|
|
672
|
-
* - `@
|
|
673
|
-
* - `@
|
|
670
|
+
* - `@sqren/docx-editor-react/ui`
|
|
671
|
+
* - `@sqren/docx-editor-react/dialogs`
|
|
672
|
+
* - `@sqren/docx-editor-react/hooks`
|
|
673
|
+
* - `@sqren/docx-editor-react/plugin-api`
|
|
674
674
|
*
|
|
675
|
-
* Framework-agnostic document utilities live in `@
|
|
676
|
-
* Agent/MCP surfaces live in `@
|
|
675
|
+
* Framework-agnostic document utilities live in `@sqren/docx-editor-core`.
|
|
676
|
+
* Agent/MCP surfaces live in `@sqren/docx-editor-agents`.
|
|
677
677
|
*
|
|
678
678
|
* @packageDocumentation
|
|
679
679
|
* @public
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react
|
|
3
3
|
*
|
|
4
4
|
* Curated root entry for the documented React editor API. Advanced surfaces
|
|
5
5
|
* stay public through explicit subpaths:
|
|
6
|
-
* - `@
|
|
7
|
-
* - `@
|
|
8
|
-
* - `@
|
|
9
|
-
* - `@
|
|
6
|
+
* - `@sqren/docx-editor-react/ui`
|
|
7
|
+
* - `@sqren/docx-editor-react/dialogs`
|
|
8
|
+
* - `@sqren/docx-editor-react/hooks`
|
|
9
|
+
* - `@sqren/docx-editor-react/plugin-api`
|
|
10
10
|
*
|
|
11
|
-
* Framework-agnostic document utilities live in `@
|
|
12
|
-
* Agent/MCP surfaces live in `@
|
|
11
|
+
* Framework-agnostic document utilities live in `@sqren/docx-editor-core`.
|
|
12
|
+
* Agent/MCP surfaces live in `@sqren/docx-editor-agents`.
|
|
13
13
|
*
|
|
14
14
|
* @packageDocumentation
|
|
15
15
|
* @public
|
|
@@ -20,19 +20,19 @@ import * as prosemirror_view from 'prosemirror-view';
|
|
|
20
20
|
import { EditorView } from 'prosemirror-view';
|
|
21
21
|
import * as prosemirror_state from 'prosemirror-state';
|
|
22
22
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
23
|
-
import { Document, HeaderFooter, Theme } from '@
|
|
24
|
-
import { FontOption } from '@
|
|
23
|
+
import { Document, HeaderFooter, Theme } from '@sqren/docx-editor-core/types/document';
|
|
24
|
+
import { FontOption } from '@sqren/docx-editor-core/utils/fontOptions';
|
|
25
25
|
import { R as ReactSidebarItem } from './types-D35gNE-_.js';
|
|
26
|
-
import { Comment } from '@
|
|
27
|
-
import { Translations, TFunction } from '@
|
|
26
|
+
import { Comment } from '@sqren/docx-editor-core/types/content';
|
|
27
|
+
import { Translations, TFunction } from '@sqren/docx-editor-i18n';
|
|
28
28
|
import { P as PrintOptions } from './PrintPreview-DEhwRBC_.js';
|
|
29
|
-
import { DocumentAgent, ContentControlFilter, ContentControlValue } from '@
|
|
30
|
-
import { DocxInput, FontDefinition } from '@
|
|
31
|
-
import { SelectionState, PMContentControl } from '@
|
|
32
|
-
import { Layout } from '@
|
|
33
|
-
import { RenderedDomContext } from '@
|
|
34
|
-
import { EditorHandle } from '@
|
|
35
|
-
export { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from '@
|
|
29
|
+
import { DocumentAgent, ContentControlFilter, ContentControlValue } from '@sqren/docx-editor-core/agent';
|
|
30
|
+
import { DocxInput, FontDefinition } from '@sqren/docx-editor-core/utils';
|
|
31
|
+
import { SelectionState, PMContentControl } from '@sqren/docx-editor-core/prosemirror';
|
|
32
|
+
import { Layout } from '@sqren/docx-editor-core/layout-engine';
|
|
33
|
+
import { RenderedDomContext } from '@sqren/docx-editor-core/plugin-api';
|
|
34
|
+
import { EditorHandle } from '@sqren/docx-editor-core';
|
|
35
|
+
export { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from '@sqren/docx-editor-core';
|
|
36
36
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -606,12 +606,12 @@ declare const DocxEditor: React.ForwardRefExoticComponent<DocxEditorProps & Reac
|
|
|
606
606
|
/**
|
|
607
607
|
* Simple imperative API for rendering a DOCX editor into a DOM element.
|
|
608
608
|
*
|
|
609
|
-
* Returns an `EditorHandle` (from @
|
|
609
|
+
* Returns an `EditorHandle` (from @sqren/docx-editor-core) that works with
|
|
610
610
|
* any framework implementation.
|
|
611
611
|
*
|
|
612
612
|
* Usage:
|
|
613
613
|
* ```ts
|
|
614
|
-
* import { renderAsync } from '@
|
|
614
|
+
* import { renderAsync } from '@sqren/docx-editor-react';
|
|
615
615
|
*
|
|
616
616
|
* const editor = await renderAsync(docxBlob, document.getElementById('container'), {
|
|
617
617
|
* readOnly: false,
|
|
@@ -663,17 +663,17 @@ declare function useTranslation(): {
|
|
|
663
663
|
};
|
|
664
664
|
|
|
665
665
|
/**
|
|
666
|
-
* @
|
|
666
|
+
* @sqren/docx-editor-react
|
|
667
667
|
*
|
|
668
668
|
* Curated root entry for the documented React editor API. Advanced surfaces
|
|
669
669
|
* stay public through explicit subpaths:
|
|
670
|
-
* - `@
|
|
671
|
-
* - `@
|
|
672
|
-
* - `@
|
|
673
|
-
* - `@
|
|
670
|
+
* - `@sqren/docx-editor-react/ui`
|
|
671
|
+
* - `@sqren/docx-editor-react/dialogs`
|
|
672
|
+
* - `@sqren/docx-editor-react/hooks`
|
|
673
|
+
* - `@sqren/docx-editor-react/plugin-api`
|
|
674
674
|
*
|
|
675
|
-
* Framework-agnostic document utilities live in `@
|
|
676
|
-
* Agent/MCP surfaces live in `@
|
|
675
|
+
* Framework-agnostic document utilities live in `@sqren/docx-editor-core`.
|
|
676
|
+
* Agent/MCP surfaces live in `@sqren/docx-editor-agents`.
|
|
677
677
|
*
|
|
678
678
|
* @packageDocumentation
|
|
679
679
|
* @public
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var chunk7VWJSV3T_js=require('./chunk-7VWJSV3T.js'),chunkPSBO3UDN_js=require('./chunk-PSBO3UDN.js'),chunkLNONBJQM_js=require('./chunk-LNONBJQM.js'),chunkWNWY6WX7_js=require('./chunk-WNWY6WX7.js'),chunkBZO4G5M6_js=require('./chunk-BZO4G5M6.js');require('./chunk-GWXEFL3H.js');var chunkL4MDZW2J_js=require('./chunk-L4MDZW2J.js'),chunkQD7BVJV3_js=require('./chunk-QD7BVJV3.js'),chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),chunkBJ5RZW6Y_js=require('./chunk-BJ5RZW6Y.js'),Bl=require('react'),utils=require('@
|
|
1
|
+
'use strict';var chunk7VWJSV3T_js=require('./chunk-7VWJSV3T.js'),chunkPSBO3UDN_js=require('./chunk-PSBO3UDN.js'),chunkLNONBJQM_js=require('./chunk-LNONBJQM.js'),chunkWNWY6WX7_js=require('./chunk-WNWY6WX7.js'),chunkBZO4G5M6_js=require('./chunk-BZO4G5M6.js');require('./chunk-GWXEFL3H.js');var chunkL4MDZW2J_js=require('./chunk-L4MDZW2J.js'),chunkQD7BVJV3_js=require('./chunk-QD7BVJV3.js'),chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),chunkBJ5RZW6Y_js=require('./chunk-BJ5RZW6Y.js'),Bl=require('react'),utils=require('@sqren/docx-editor-core/utils'),prosemirror=require('@sqren/docx-editor-core/prosemirror'),docx=require('@sqren/docx-editor-core/docx'),extensions=require('@sqren/docx-editor-core/prosemirror/extensions'),commands=require('@sqren/docx-editor-core/prosemirror/commands'),layoutPainter=require('@sqren/docx-editor-core/layout-painter'),sonner=require('sonner'),prosemirrorState=require('prosemirror-state'),queries=require('@sqren/docx-editor-core/prosemirror/queries'),applyFormatting=require('@sqren/docx-editor-core/prosemirror/applyFormatting'),agent=require('@sqren/docx-editor-core/agent'),commentOps=require('@sqren/docx-editor-core/prosemirror/commentOps'),commentIdAllocator=require('@sqren/docx-editor-core/prosemirror/commentIdAllocator'),jsxRuntime=require('react/jsx-runtime'),layoutBridge=require('@sqren/docx-editor-core/layout-bridge'),conversion=require('@sqren/docx-editor-core/prosemirror/conversion'),docxEditorI18n=require('@sqren/docx-editor-i18n'),prosemirrorHistory=require('prosemirror-history'),reactDom=require('react-dom'),prosemirrorTables=require('prosemirror-tables'),prosemirrorView=require('prosemirror-view'),editor=require('@sqren/docx-editor-core/editor');require('prosemirror-view/style/prosemirror.css'),require('@sqren/docx-editor-core/prosemirror/editor.css');var imageCommit=require('@sqren/docx-editor-core/prosemirror/imageCommit'),LayoutSelectionGate=require('@sqren/docx-editor-core/prosemirror/utils/LayoutSelectionGate'),sidebarConstants=require('@sqren/docx-editor-core/utils/sidebarConstants'),findVerticalScrollParent=require('@sqren/docx-editor-core/utils/findVerticalScrollParent'),layoutEngine=require('@sqren/docx-editor-core/layout-engine'),tableResize=require('@sqren/docx-editor-core/prosemirror/tableResize'),cellDragSelection=require('@sqren/docx-editor-core/prosemirror/cellDragSelection'),resolveItemPositions=require('@sqren/docx-editor-core/plugin-api/resolveItemPositions'),docxEditorCore=require('@sqren/docx-editor-core'),react=require('@sqren/docx-editor-agents/react'),comments=require('@sqren/docx-editor-core/utils/comments'),cardStyles=require('@sqren/docx-editor-core/utils/cardStyles'),plugins=require('@sqren/docx-editor-core/prosemirror/plugins'),client=require('react-dom/client');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Bl__default=/*#__PURE__*/_interopDefault(Bl);function fi({showOutlineProp:e,pagedEditorRef:t,scrollContainerRef:o,isLoading:r}){let[n,u]=Bl.useState(e),d=Bl.useRef(false);d.current=n;let[l,m]=Bl.useState([]);Bl.useEffect(()=>{if(u(e),e){let g=t.current?.getView();g&&m(utils.collectHeadings(g.state.doc));}},[e,t]);let s=Bl.useRef(null),a=Bl.useRef(null),[h,f]=Bl.useState(0),b=Bl.useCallback(g=>{if(a.current=g,s.current&&(s.current.disconnect(),s.current=null),!g){f(0);return}f(g.offsetHeight);let S=new ResizeObserver(()=>{f(g.offsetHeight);});S.observe(g),s.current=S;},[]);Bl.useEffect(()=>()=>{s.current?.disconnect();},[]);let[i,p]=Bl.useState(0);return Bl.useEffect(()=>{let g=o.current;if(!g)return;let S=0,y=()=>{S=0,p(g.scrollLeft);},c=()=>{S===0&&(S=requestAnimationFrame(y));};return y(),g.addEventListener("scroll",c,{passive:true}),()=>{g.removeEventListener("scroll",c),S!==0&&cancelAnimationFrame(S);}},[r,o]),{showOutline:n,setShowOutline:u,showOutlineRef:d,outlineHeadings:l,setHeadingInfos:m,toolbarHeight:h,toolbarRefCallback:b,editorScrollLeft:i}}function gi({pagedEditorRef:e,disableFindReplaceShortcuts:t,findReplace:o,hyperlinkDialog:r,tableSelection:n}){Bl.useEffect(()=>{let u=d=>{let m=navigator.platform.toUpperCase().indexOf("MAC")>=0?d.metaKey:d.ctrlKey;if(!m&&!d.shiftKey&&!d.altKey&&(d.key==="Delete"||d.key==="Backspace")){let s=e.current?.getView();if(s){let a=s.state.selection;if("$anchorCell"in a&&typeof a.forEachCell=="function"){let f=prosemirror.getTableContext(s.state);if(f.isInTable&&f.table){let b=0;f.table.descendants(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(b+=1);});let i=0;if(a.forEachCell(()=>{i+=1;}),b>0&&i>=b){d.preventDefault(),prosemirror.deleteTable(s.state,s.dispatch);return}}}}if(n.state.tableIndex!==null){d.preventDefault(),n.handleAction("deleteTable");return}}if(m&&!d.shiftKey&&!d.altKey){if(d.key.toLowerCase()==="f"){if(t)return;d.preventDefault();let s=window.getSelection(),a=s&&!s.isCollapsed?s.toString():"";o.openFind(a);}else if(d.key.toLowerCase()==="h"){if(t)return;d.preventDefault();let s=window.getSelection(),a=s&&!s.isCollapsed?s.toString():"";o.openReplace(a);}else if(d.key.toLowerCase()==="k"){d.preventDefault();let s=e.current?.getView();if(s){let a=prosemirror.getSelectedText(s.state),h=prosemirror.getHyperlinkAttrs(s.state);h?r.openEdit({url:h.href,displayText:a,tooltip:h.tooltip}):r.openInsert(a);}}}};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u);}},[e,t,o,r,n]);}function hi({agentRef:e,pagedEditorRef:t,containerRef:o,comments:r,documentName:n,onSave:u,onError:d,onPrint:l,onDocumentNameChange:m,loadBuffer:s,getActiveEditorView:a,focusActiveEditor:h}){let f=Bl.useRef(null),b=Bl.useRef(null),i=Bl.useCallback(async v=>{if(!e.current)return null;try{let C=e.current.getDocument(),R=t.current?.getDocument();R?.package?.document&&(C.package.document.content=R.package.document.content),C.package.document.comments=r,docx.injectReplyRangeMarkers(C.package.document.content,r),docx.injectTCReplyRangeMarkers(C.package.document.content,r);let P=v?.selective!==!1,k=t.current?.getView(),E;if(P&&k){let w=k.state,D=r.some(H=>H.parentId!=null);E={selective:{changedParaIds:extensions.getChangedParagraphIds(w),structuralChange:extensions.hasStructuralChanges(w)||D,hasUntrackedChanges:extensions.hasUntrackedChanges(w)}};}let I=await e.current.toBuffer(E);return k&&k.dispatch(extensions.clearTrackedChanges(k.state)),u?.(I),I}catch(C){return d?.(C instanceof Error?C:new Error("Failed to save document")),null}},[e,t,r,u,d]),p=Bl.useCallback(()=>{let v=o.current?.querySelector(".paged-editor__pages");if(!v){window.print(),l?.();return}layoutPainter.renderAllPagesNow(v);let C=window.open("","_blank");if(!C){window.print(),l?.();return}let R=[];for(let k of Array.from(document.styleSheets))try{for(let E of Array.from(k.cssRules))E instanceof CSSFontFaceRule&&R.push(E.cssText);}catch{}let P=v.cloneNode(true);P.style.cssText="display: block; margin: 0; padding: 0;";for(let k of Array.from(P.querySelectorAll(".layout-page"))){let E=k;E.style.boxShadow="none",E.style.margin="0";}C.document.write(`<!DOCTYPE html>
|
|
2
2
|
<html><head><title>Print</title>
|
|
3
3
|
<style>
|
|
4
4
|
${R.join(`
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {h,a as a$1,d as d$1,g,F,i as i$1,o,E,C,A}from'./chunk-P6METJHI.mjs';import {a as a$2}from'./chunk-O6M2HAIZ.mjs';import {a,d,i,e,b as b$4}from'./chunk-WFGAQC2B.mjs';import {b as b$1}from'./chunk-BABMU5KA.mjs';import {b as b$3}from'./chunk-IVFYCMAM.mjs';import'./chunk-OCA7BO3G.mjs';import {b as b$2,a as a$4}from'./chunk-OHNO4NRQ.mjs';import {m}from'./chunk-J72K2BOS.mjs';import {b,a as a$3}from'./chunk-ZFZJRL2R.mjs';export{a as LocaleProvider,b as useTranslation}from'./chunk-ZFZJRL2R.mjs';import {b as b$5}from'./chunk-BMBP5UFA.mjs';import Bl,{lazy,forwardRef,useRef,useCallback,useEffect,useImperativeHandle,memo,useMemo,useState,useLayoutEffect,createContext,Suspense,useSyncExternalStore,Component}from'react';import {prefersColorSchemeDark,subscribeSystemDark,resolveIsDark,collectHeadings,findWordBoundaries,pixelsToEmu,loadDocumentFonts,readDocxFileFromInput,loadFontDefinitions,onFontsLoaded,onFontError,resolveColorToHex,twipsToPixels,pixelsToTwips,formatPx}from'@eigenpal/docx-editor-core/utils';import {createStyleResolver,extractSelectionState,schema,createDocumentStylesPlugin,ensureParaIdsInState,findStartPosForParaId,addRowBelow,addColumnRight,getTableContext,setCellFillColor,setTableBorderColor,setTableBorderWidth,setCellBorder,setCellVerticalAlign,setCellMargins,setCellTextDirection,toggleNoWrap,setRowHeight,toggleHeaderRow,distributeColumns,autoFitContents,applyTableStyle,removeTableBorders,setInsideTableBorders,setOutsideTableBorders,setAllTableBorders,mergeCells,selectColumn,selectRow,selectTable,deleteTable,deleteColumn,deleteRow,addColumnLeft,addRowAbove,resolveOccurrence,wrapContentControlByTextTr,setContentControlValueTr,removeContentControlTr,setContentControlContentTr,findContentControlPos,findContentControlsInPM,setContentControlValueAtPosTr,getSelectedText as getSelectedText$1,getHyperlinkAttrs as getHyperlinkAttrs$1,addRepeatingSectionItemTr,removeRepeatingSectionItemTr}from'@eigenpal/docx-editor-core/prosemirror';import {parseDocx,injectReplyRangeMarkers,injectTCReplyRangeMarkers,getCachedNumberingMap}from'@eigenpal/docx-editor-core/docx';import {ExtensionManager,createStarterKit,hasUntrackedChanges,hasStructuralChanges,getChangedParagraphIds,clearTrackedChanges}from'@eigenpal/docx-editor-core/prosemirror/extensions';import {rejectChangeById,acceptChangeById,rejectChange,acceptChange,insertImageFromFile,setImageWrapType,getSplitCellDialogConfig,splitActiveTableCell,toggleBold,toggleItalic,toggleUnderline,toggleStrike,toggleSuperscript,toggleSubscript,toggleBulletList,toggleNumberedList,increaseListLevel,increaseIndent,decreaseListLevel,decreaseIndent,clearFormatting,setRtl,setLtr,getSelectedText,getHyperlinkAttrs,applyStyle,setLineSpacing,setFontFamily,setFontSize,setHighlight,setTextColor,clearTextColor,setAlignment,insertTable,insertPageBreak,insertSectionBreakNextPage,insertSectionBreakContinuous,generateTOC,insertHyperlink,setHyperlink,removeHyperlink,findHyperlinkRangeAt,setIndentLeft,setIndentRight,setIndentFirstLine,removeTabStop,getWatermarkFromState,setWatermark,setTableProperties}from'@eigenpal/docx-editor-core/prosemirror/commands';import {LayoutPainter,buildBlockLookup,renderPages,applySdtFocus,enclosingSdtGroupIds,findImageElement,hitTestImage,captureInlinePositionEmu,renderAllPagesNow,toolbarValueToLayoutTarget,deriveLayoutChoice,IMAGE_LAYOUT_OPTIONS,isImageLayoutOptionEnabled}from'@eigenpal/docx-editor-core/layout-painter';import {toast,Toaster}from'sonner';import {NodeSelection,TextSelection,EditorState}from'prosemirror-state';import {getSelectionInfo,findInDocument,getPageContent,findChangeRange,findCommentRange,clampRangeToDoc}from'@eigenpal/docx-editor-core/prosemirror/queries';import {insertBreak,setParagraphStyle,applyFormatting}from'@eigenpal/docx-editor-core/prosemirror/applyFormatting';import {DocumentAgent,ContentControlNotFoundError}from'@eigenpal/docx-editor-core/agent';import {createComment,applyProposedChange,addCommentToRange}from'@eigenpal/docx-editor-core/prosemirror/commentOps';import {createCommentIdAllocator,PENDING_COMMENT_ID,seedCommentAllocator}from'@eigenpal/docx-editor-core/prosemirror/commentIdAllocator';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {DEFAULT_PAGE_HEIGHT_PX,getPageSize,getMargins,getColumns,applyCellSelectionHighlight,getCaretPosition,selectionToRects,findBodyPmAnchor,clickToPositionDom,hitTestFragment,hitTestTableCell,clickToPosition,detectTableInsertHover,TABLE_INSERT_HIDE_DELAY_MS,resolveHeaderFooter,computeHfCaretRectFromView,computeHfSelectionRectsFromView,invalidateHfDomCache,measureBlocksWithFloats,getCaretPositionFromDom,getSelectionRectsFromDom,findBodyPmSpans,resetCanvasContext,clearAllCaches,findBodyPmAnchors,measureParagraph,measureTableBlock,getCachedParagraphMeasure,setCachedParagraphMeasure,getPageTop}from'@eigenpal/docx-editor-core/layout-bridge';import {proseDocToBlocks,toProseDoc,createEmptyDoc,fromProseDoc,headerFooterToProseDoc}from'@eigenpal/docx-editor-core/prosemirror/conversion';import {en}from'@eigenpal/docx-editor-i18n';import {redo,undo,redoDepth,undoDepth}from'prosemirror-history';import {createPortal}from'react-dom';import {CellSelection}from'prosemirror-tables';import {EditorView}from'prosemirror-view';import {stripScrollFlag,computeLayout,createLayoutScheduler}from'@eigenpal/docx-editor-core/editor';import'prosemirror-view/style/prosemirror.css';import'@eigenpal/docx-editor-core/prosemirror/editor.css';import {commitImageResize,isFloatingImage,commitImageFloatMove,commitImageInlineMove,calculateResizedImageDimensions}from'@eigenpal/docx-editor-core/prosemirror/imageCommit';import {LayoutSelectionGate}from'@eigenpal/docx-editor-core/prosemirror/utils/LayoutSelectionGate';import {SIDEBAR_DOCUMENT_SHIFT,SIDEBAR_WIDTH,SIDEBAR_PAGE_GAP}from'@eigenpal/docx-editor-core/utils/sidebarConstants';import {findVerticalScrollParentOrRoot}from'@eigenpal/docx-editor-core/utils/findVerticalScrollParent';import {findPageIndexContainingPmPos,assertExhaustiveFlowBlock,DEFAULT_TEXTBOX_MARGINS,DEFAULT_TEXTBOX_WIDTH}from'@eigenpal/docx-editor-core/layout-engine';import {readColumnWidths,readRowHeight,TWIPS_PER_PIXEL,readColumnWidthAt,MIN_CELL_WIDTH_TWIPS,MIN_ROW_HEIGHT_TWIPS,commitColumnResize,commitRowResize,commitRightEdgeResize}from'@eigenpal/docx-editor-core/prosemirror/tableResize';import {createCellDragTracker,findCellPosFromPmPos}from'@eigenpal/docx-editor-core/prosemirror/cellDragSelection';import {resolveItemPositions}from'@eigenpal/docx-editor-core/plugin-api/resolveItemPositions';import {ErrorManager}from'@eigenpal/docx-editor-core';export{createDocumentWithText,createEmptyDocument}from'@eigenpal/docx-editor-core';import {AgentPanel}from'@eigenpal/docx-editor-agents/react';import {getInitials,formatDate,getCommentText,truncateText,getAvatarColor}from'@eigenpal/docx-editor-core/utils/comments';import {CARD_STYLE_EXPANDED,CARD_STYLE_COLLAPSED}from'@eigenpal/docx-editor-core/utils/cardStyles';import {createSuggestionModePlugin,setSuggestionMode}from'@eigenpal/docx-editor-core/prosemirror/plugins';import {createRoot}from'react-dom/client';function fi({showOutlineProp:e,pagedEditorRef:t,scrollContainerRef:o,isLoading:r}){let[n,u]=useState(e),d=useRef(false);d.current=n;let[l,m]=useState([]);useEffect(()=>{if(u(e),e){let g=t.current?.getView();g&&m(collectHeadings(g.state.doc));}},[e,t]);let s=useRef(null),a=useRef(null),[h,f]=useState(0),b=useCallback(g=>{if(a.current=g,s.current&&(s.current.disconnect(),s.current=null),!g){f(0);return}f(g.offsetHeight);let S=new ResizeObserver(()=>{f(g.offsetHeight);});S.observe(g),s.current=S;},[]);useEffect(()=>()=>{s.current?.disconnect();},[]);let[i,p]=useState(0);return useEffect(()=>{let g=o.current;if(!g)return;let S=0,y=()=>{S=0,p(g.scrollLeft);},c=()=>{S===0&&(S=requestAnimationFrame(y));};return y(),g.addEventListener("scroll",c,{passive:true}),()=>{g.removeEventListener("scroll",c),S!==0&&cancelAnimationFrame(S);}},[r,o]),{showOutline:n,setShowOutline:u,showOutlineRef:d,outlineHeadings:l,setHeadingInfos:m,toolbarHeight:h,toolbarRefCallback:b,editorScrollLeft:i}}function gi({pagedEditorRef:e,disableFindReplaceShortcuts:t,findReplace:o,hyperlinkDialog:r,tableSelection:n}){useEffect(()=>{let u=d=>{let m=navigator.platform.toUpperCase().indexOf("MAC")>=0?d.metaKey:d.ctrlKey;if(!m&&!d.shiftKey&&!d.altKey&&(d.key==="Delete"||d.key==="Backspace")){let s=e.current?.getView();if(s){let a=s.state.selection;if("$anchorCell"in a&&typeof a.forEachCell=="function"){let f=getTableContext(s.state);if(f.isInTable&&f.table){let b=0;f.table.descendants(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(b+=1);});let i=0;if(a.forEachCell(()=>{i+=1;}),b>0&&i>=b){d.preventDefault(),deleteTable(s.state,s.dispatch);return}}}}if(n.state.tableIndex!==null){d.preventDefault(),n.handleAction("deleteTable");return}}if(m&&!d.shiftKey&&!d.altKey){if(d.key.toLowerCase()==="f"){if(t)return;d.preventDefault();let s=window.getSelection(),a=s&&!s.isCollapsed?s.toString():"";o.openFind(a);}else if(d.key.toLowerCase()==="h"){if(t)return;d.preventDefault();let s=window.getSelection(),a=s&&!s.isCollapsed?s.toString():"";o.openReplace(a);}else if(d.key.toLowerCase()==="k"){d.preventDefault();let s=e.current?.getView();if(s){let a=getSelectedText$1(s.state),h=getHyperlinkAttrs$1(s.state);h?r.openEdit({url:h.href,displayText:a,tooltip:h.tooltip}):r.openInsert(a);}}}};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u);}},[e,t,o,r,n]);}function hi({agentRef:e,pagedEditorRef:t,containerRef:o,comments:r,documentName:n,onSave:u,onError:d,onPrint:l,onDocumentNameChange:m,loadBuffer:s,getActiveEditorView:a,focusActiveEditor:h}){let f=useRef(null),b=useRef(null),i=useCallback(async v=>{if(!e.current)return null;try{let C=e.current.getDocument(),R=t.current?.getDocument();R?.package?.document&&(C.package.document.content=R.package.document.content),C.package.document.comments=r,injectReplyRangeMarkers(C.package.document.content,r),injectTCReplyRangeMarkers(C.package.document.content,r);let P=v?.selective!==!1,k=t.current?.getView(),E;if(P&&k){let w=k.state,D=r.some(H=>H.parentId!=null);E={selective:{changedParaIds:getChangedParagraphIds(w),structuralChange:hasStructuralChanges(w)||D,hasUntrackedChanges:hasUntrackedChanges(w)}};}let I=await e.current.toBuffer(E);return k&&k.dispatch(clearTrackedChanges(k.state)),u?.(I),I}catch(C){return d?.(C instanceof Error?C:new Error("Failed to save document")),null}},[e,t,r,u,d]),p=useCallback(()=>{let v=o.current?.querySelector(".paged-editor__pages");if(!v){window.print(),l?.();return}renderAllPagesNow(v);let C=window.open("","_blank");if(!C){window.print(),l?.();return}let R=[];for(let k of Array.from(document.styleSheets))try{for(let E of Array.from(k.cssRules))E instanceof CSSFontFaceRule&&R.push(E.cssText);}catch{}let P=v.cloneNode(true);P.style.cssText="display: block; margin: 0; padding: 0;";for(let k of Array.from(P.querySelectorAll(".layout-page"))){let E=k;E.style.boxShadow="none",E.style.margin="0";}C.document.write(`<!DOCTYPE html>
|
|
1
|
+
import {h,a as a$1,d as d$1,g,F,i as i$1,o,E,C,A}from'./chunk-P6METJHI.mjs';import {a as a$2}from'./chunk-O6M2HAIZ.mjs';import {a,d,i,e,b as b$4}from'./chunk-WFGAQC2B.mjs';import {b as b$1}from'./chunk-BABMU5KA.mjs';import {b as b$3}from'./chunk-IVFYCMAM.mjs';import'./chunk-OCA7BO3G.mjs';import {b as b$2,a as a$4}from'./chunk-OHNO4NRQ.mjs';import {m}from'./chunk-J72K2BOS.mjs';import {b,a as a$3}from'./chunk-ZFZJRL2R.mjs';export{a as LocaleProvider,b as useTranslation}from'./chunk-ZFZJRL2R.mjs';import {b as b$5}from'./chunk-BMBP5UFA.mjs';import Bl,{lazy,forwardRef,useRef,useCallback,useEffect,useImperativeHandle,memo,useMemo,useState,useLayoutEffect,createContext,Suspense,useSyncExternalStore,Component}from'react';import {prefersColorSchemeDark,subscribeSystemDark,resolveIsDark,collectHeadings,findWordBoundaries,pixelsToEmu,loadDocumentFonts,readDocxFileFromInput,loadFontDefinitions,onFontsLoaded,onFontError,resolveColorToHex,twipsToPixels,pixelsToTwips,formatPx}from'@sqren/docx-editor-core/utils';import {createStyleResolver,extractSelectionState,schema,createDocumentStylesPlugin,ensureParaIdsInState,findStartPosForParaId,addRowBelow,addColumnRight,getTableContext,setCellFillColor,setTableBorderColor,setTableBorderWidth,setCellBorder,setCellVerticalAlign,setCellMargins,setCellTextDirection,toggleNoWrap,setRowHeight,toggleHeaderRow,distributeColumns,autoFitContents,applyTableStyle,removeTableBorders,setInsideTableBorders,setOutsideTableBorders,setAllTableBorders,mergeCells,selectColumn,selectRow,selectTable,deleteTable,deleteColumn,deleteRow,addColumnLeft,addRowAbove,resolveOccurrence,wrapContentControlByTextTr,setContentControlValueTr,removeContentControlTr,setContentControlContentTr,findContentControlPos,findContentControlsInPM,setContentControlValueAtPosTr,getSelectedText as getSelectedText$1,getHyperlinkAttrs as getHyperlinkAttrs$1,addRepeatingSectionItemTr,removeRepeatingSectionItemTr}from'@sqren/docx-editor-core/prosemirror';import {parseDocx,injectReplyRangeMarkers,injectTCReplyRangeMarkers,getCachedNumberingMap}from'@sqren/docx-editor-core/docx';import {ExtensionManager,createStarterKit,hasUntrackedChanges,hasStructuralChanges,getChangedParagraphIds,clearTrackedChanges}from'@sqren/docx-editor-core/prosemirror/extensions';import {rejectChangeById,acceptChangeById,rejectChange,acceptChange,insertImageFromFile,setImageWrapType,getSplitCellDialogConfig,splitActiveTableCell,toggleBold,toggleItalic,toggleUnderline,toggleStrike,toggleSuperscript,toggleSubscript,toggleBulletList,toggleNumberedList,increaseListLevel,increaseIndent,decreaseListLevel,decreaseIndent,clearFormatting,setRtl,setLtr,getSelectedText,getHyperlinkAttrs,applyStyle,setLineSpacing,setFontFamily,setFontSize,setHighlight,setTextColor,clearTextColor,setAlignment,insertTable,insertPageBreak,insertSectionBreakNextPage,insertSectionBreakContinuous,generateTOC,insertHyperlink,setHyperlink,removeHyperlink,findHyperlinkRangeAt,setIndentLeft,setIndentRight,setIndentFirstLine,removeTabStop,getWatermarkFromState,setWatermark,setTableProperties}from'@sqren/docx-editor-core/prosemirror/commands';import {LayoutPainter,buildBlockLookup,renderPages,applySdtFocus,enclosingSdtGroupIds,findImageElement,hitTestImage,captureInlinePositionEmu,renderAllPagesNow,toolbarValueToLayoutTarget,deriveLayoutChoice,IMAGE_LAYOUT_OPTIONS,isImageLayoutOptionEnabled}from'@sqren/docx-editor-core/layout-painter';import {toast,Toaster}from'sonner';import {NodeSelection,TextSelection,EditorState}from'prosemirror-state';import {getSelectionInfo,findInDocument,getPageContent,findChangeRange,findCommentRange,clampRangeToDoc}from'@sqren/docx-editor-core/prosemirror/queries';import {insertBreak,setParagraphStyle,applyFormatting}from'@sqren/docx-editor-core/prosemirror/applyFormatting';import {DocumentAgent,ContentControlNotFoundError}from'@sqren/docx-editor-core/agent';import {createComment,applyProposedChange,addCommentToRange}from'@sqren/docx-editor-core/prosemirror/commentOps';import {createCommentIdAllocator,PENDING_COMMENT_ID,seedCommentAllocator}from'@sqren/docx-editor-core/prosemirror/commentIdAllocator';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {DEFAULT_PAGE_HEIGHT_PX,getPageSize,getMargins,getColumns,applyCellSelectionHighlight,getCaretPosition,selectionToRects,findBodyPmAnchor,clickToPositionDom,hitTestFragment,hitTestTableCell,clickToPosition,detectTableInsertHover,TABLE_INSERT_HIDE_DELAY_MS,resolveHeaderFooter,computeHfCaretRectFromView,computeHfSelectionRectsFromView,invalidateHfDomCache,measureBlocksWithFloats,getCaretPositionFromDom,getSelectionRectsFromDom,findBodyPmSpans,resetCanvasContext,clearAllCaches,findBodyPmAnchors,measureParagraph,measureTableBlock,getCachedParagraphMeasure,setCachedParagraphMeasure,getPageTop}from'@sqren/docx-editor-core/layout-bridge';import {proseDocToBlocks,toProseDoc,createEmptyDoc,fromProseDoc,headerFooterToProseDoc}from'@sqren/docx-editor-core/prosemirror/conversion';import {en}from'@sqren/docx-editor-i18n';import {redo,undo,redoDepth,undoDepth}from'prosemirror-history';import {createPortal}from'react-dom';import {CellSelection}from'prosemirror-tables';import {EditorView}from'prosemirror-view';import {stripScrollFlag,computeLayout,createLayoutScheduler}from'@sqren/docx-editor-core/editor';import'prosemirror-view/style/prosemirror.css';import'@sqren/docx-editor-core/prosemirror/editor.css';import {commitImageResize,isFloatingImage,commitImageFloatMove,commitImageInlineMove,calculateResizedImageDimensions}from'@sqren/docx-editor-core/prosemirror/imageCommit';import {LayoutSelectionGate}from'@sqren/docx-editor-core/prosemirror/utils/LayoutSelectionGate';import {SIDEBAR_DOCUMENT_SHIFT,SIDEBAR_WIDTH,SIDEBAR_PAGE_GAP}from'@sqren/docx-editor-core/utils/sidebarConstants';import {findVerticalScrollParentOrRoot}from'@sqren/docx-editor-core/utils/findVerticalScrollParent';import {findPageIndexContainingPmPos,assertExhaustiveFlowBlock,DEFAULT_TEXTBOX_MARGINS,DEFAULT_TEXTBOX_WIDTH}from'@sqren/docx-editor-core/layout-engine';import {readColumnWidths,readRowHeight,TWIPS_PER_PIXEL,readColumnWidthAt,MIN_CELL_WIDTH_TWIPS,MIN_ROW_HEIGHT_TWIPS,commitColumnResize,commitRowResize,commitRightEdgeResize}from'@sqren/docx-editor-core/prosemirror/tableResize';import {createCellDragTracker,findCellPosFromPmPos}from'@sqren/docx-editor-core/prosemirror/cellDragSelection';import {resolveItemPositions}from'@sqren/docx-editor-core/plugin-api/resolveItemPositions';import {ErrorManager}from'@sqren/docx-editor-core';export{createDocumentWithText,createEmptyDocument}from'@sqren/docx-editor-core';import {AgentPanel}from'@sqren/docx-editor-agents/react';import {getInitials,formatDate,getCommentText,truncateText,getAvatarColor}from'@sqren/docx-editor-core/utils/comments';import {CARD_STYLE_EXPANDED,CARD_STYLE_COLLAPSED}from'@sqren/docx-editor-core/utils/cardStyles';import {createSuggestionModePlugin,setSuggestionMode}from'@sqren/docx-editor-core/prosemirror/plugins';import {createRoot}from'react-dom/client';function fi({showOutlineProp:e,pagedEditorRef:t,scrollContainerRef:o,isLoading:r}){let[n,u]=useState(e),d=useRef(false);d.current=n;let[l,m]=useState([]);useEffect(()=>{if(u(e),e){let g=t.current?.getView();g&&m(collectHeadings(g.state.doc));}},[e,t]);let s=useRef(null),a=useRef(null),[h,f]=useState(0),b=useCallback(g=>{if(a.current=g,s.current&&(s.current.disconnect(),s.current=null),!g){f(0);return}f(g.offsetHeight);let S=new ResizeObserver(()=>{f(g.offsetHeight);});S.observe(g),s.current=S;},[]);useEffect(()=>()=>{s.current?.disconnect();},[]);let[i,p]=useState(0);return useEffect(()=>{let g=o.current;if(!g)return;let S=0,y=()=>{S=0,p(g.scrollLeft);},c=()=>{S===0&&(S=requestAnimationFrame(y));};return y(),g.addEventListener("scroll",c,{passive:true}),()=>{g.removeEventListener("scroll",c),S!==0&&cancelAnimationFrame(S);}},[r,o]),{showOutline:n,setShowOutline:u,showOutlineRef:d,outlineHeadings:l,setHeadingInfos:m,toolbarHeight:h,toolbarRefCallback:b,editorScrollLeft:i}}function gi({pagedEditorRef:e,disableFindReplaceShortcuts:t,findReplace:o,hyperlinkDialog:r,tableSelection:n}){useEffect(()=>{let u=d=>{let m=navigator.platform.toUpperCase().indexOf("MAC")>=0?d.metaKey:d.ctrlKey;if(!m&&!d.shiftKey&&!d.altKey&&(d.key==="Delete"||d.key==="Backspace")){let s=e.current?.getView();if(s){let a=s.state.selection;if("$anchorCell"in a&&typeof a.forEachCell=="function"){let f=getTableContext(s.state);if(f.isInTable&&f.table){let b=0;f.table.descendants(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(b+=1);});let i=0;if(a.forEachCell(()=>{i+=1;}),b>0&&i>=b){d.preventDefault(),deleteTable(s.state,s.dispatch);return}}}}if(n.state.tableIndex!==null){d.preventDefault(),n.handleAction("deleteTable");return}}if(m&&!d.shiftKey&&!d.altKey){if(d.key.toLowerCase()==="f"){if(t)return;d.preventDefault();let s=window.getSelection(),a=s&&!s.isCollapsed?s.toString():"";o.openFind(a);}else if(d.key.toLowerCase()==="h"){if(t)return;d.preventDefault();let s=window.getSelection(),a=s&&!s.isCollapsed?s.toString():"";o.openReplace(a);}else if(d.key.toLowerCase()==="k"){d.preventDefault();let s=e.current?.getView();if(s){let a=getSelectedText$1(s.state),h=getHyperlinkAttrs$1(s.state);h?r.openEdit({url:h.href,displayText:a,tooltip:h.tooltip}):r.openInsert(a);}}}};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u);}},[e,t,o,r,n]);}function hi({agentRef:e,pagedEditorRef:t,containerRef:o,comments:r,documentName:n,onSave:u,onError:d,onPrint:l,onDocumentNameChange:m,loadBuffer:s,getActiveEditorView:a,focusActiveEditor:h}){let f=useRef(null),b=useRef(null),i=useCallback(async v=>{if(!e.current)return null;try{let C=e.current.getDocument(),R=t.current?.getDocument();R?.package?.document&&(C.package.document.content=R.package.document.content),C.package.document.comments=r,injectReplyRangeMarkers(C.package.document.content,r),injectTCReplyRangeMarkers(C.package.document.content,r);let P=v?.selective!==!1,k=t.current?.getView(),E;if(P&&k){let w=k.state,D=r.some(H=>H.parentId!=null);E={selective:{changedParaIds:getChangedParagraphIds(w),structuralChange:hasStructuralChanges(w)||D,hasUntrackedChanges:hasUntrackedChanges(w)}};}let I=await e.current.toBuffer(E);return k&&k.dispatch(clearTrackedChanges(k.state)),u?.(I),I}catch(C){return d?.(C instanceof Error?C:new Error("Failed to save document")),null}},[e,t,r,u,d]),p=useCallback(()=>{let v=o.current?.querySelector(".paged-editor__pages");if(!v){window.print(),l?.();return}renderAllPagesNow(v);let C=window.open("","_blank");if(!C){window.print(),l?.();return}let R=[];for(let k of Array.from(document.styleSheets))try{for(let E of Array.from(k.cssRules))E instanceof CSSFontFaceRule&&R.push(E.cssText);}catch{}let P=v.cloneNode(true);P.style.cssText="display: block; margin: 0; padding: 0;";for(let k of Array.from(P.querySelectorAll(".layout-page"))){let E=k;E.style.boxShadow="none",E.style.margin="0";}C.document.write(`<!DOCTYPE html>
|
|
2
2
|
<html><head><title>Print</title>
|
|
3
3
|
<style>
|
|
4
4
|
${R.join(`
|
package/dist/plugin-api.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/plugin-api
|
|
3
3
|
*
|
|
4
4
|
* Generic plugin interface and host component for integrating external
|
|
5
5
|
* plugins with the editor. Pairs with the framework-agnostic plugin types
|
|
6
|
-
* exported from `@
|
|
6
|
+
* exported from `@sqren/docx-editor-core/plugin-api`.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { PluginHost, templatePlugin, type EditorPlugin } from '@
|
|
10
|
+
* import { PluginHost, templatePlugin, type EditorPlugin } from '@sqren/docx-editor-react/plugin-api';
|
|
11
11
|
*
|
|
12
12
|
* function MyEditor() {
|
|
13
13
|
* return (
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
import { P as PluginHostProps, a as PluginHostRef, b as ReactEditorPlugin } from './types-D35gNE-_.mjs';
|
|
25
25
|
export { E as EditorPlugin, c as PluginContext, R as ReactSidebarItem, S as SidebarItemRenderProps } from './types-D35gNE-_.mjs';
|
|
26
26
|
import * as React from 'react';
|
|
27
|
-
export { RenderedDomContextImpl, createRenderedDomContext } from '@
|
|
28
|
-
import { TemplateTag } from '@
|
|
29
|
-
export { TEMPLATE_DECORATION_STYLES, TagType, TemplateTag, createTemplatePlugin as createTemplateProseMirrorPlugin, getTemplateTags as getTemplatePluginTags, setHoveredElement, setSelectedElement, templatePluginKey } from '@
|
|
30
|
-
export { PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext } from '@
|
|
27
|
+
export { RenderedDomContextImpl, createRenderedDomContext } from '@sqren/docx-editor-core/plugin-api/RenderedDomContext';
|
|
28
|
+
import { TemplateTag } from '@sqren/docx-editor-core/prosemirror/template/prosemirror-plugin';
|
|
29
|
+
export { TEMPLATE_DECORATION_STYLES, TagType, TemplateTag, createTemplatePlugin as createTemplateProseMirrorPlugin, getTemplateTags as getTemplatePluginTags, setHoveredElement, setSelectedElement, templatePluginKey } from '@sqren/docx-editor-core/prosemirror/template/prosemirror-plugin';
|
|
30
|
+
export { PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext } from '@sqren/docx-editor-core/plugin-api';
|
|
31
31
|
import 'prosemirror-view';
|
|
32
32
|
|
|
33
33
|
declare const PLUGIN_HOST_STYLES = "\n.plugin-host {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: visible;\n position: relative;\n}\n\n.plugin-host-editor {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-width: 0;\n overflow: visible;\n}\n\n\n.plugin-panels-left,\n.plugin-panels-right {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n background: #f8f9fa;\n border-color: #e9ecef;\n}\n\n.plugin-panels-left {\n border-right: 1px solid #e9ecef;\n}\n\n.plugin-panels-right {\n border-left: 1px solid #e9ecef;\n}\n\n.plugin-panels-bottom {\n border-top: 1px solid #e9ecef;\n background: #f8f9fa;\n}\n\n.plugin-panel {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n transition: width 0.2s ease, height 0.2s ease;\n}\n\n.plugin-panel.collapsed {\n overflow: visible;\n}\n\n.plugin-panel-toggle {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle {\n writing-mode: vertical-rl;\n text-orientation: mixed;\n flex-direction: column;\n height: 100%;\n padding: 8px 6px;\n}\n\n.plugin-panel-toggle:hover {\n background: #e9ecef;\n color: #495057;\n}\n\n.plugin-panel-toggle-icon {\n font-weight: bold;\n font-size: 14px;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle-icon {\n transform: rotate(90deg);\n}\n\n.plugin-panel-toggle-label {\n font-weight: 500;\n}\n\n.plugin-panel-content {\n flex: 1;\n overflow: auto;\n}\n\n/* Right panel rendered inside viewport - scrolls with content */\n.plugin-panel-in-viewport {\n position: absolute;\n top: 0;\n /* Position is set dynamically via inline styles based on page edge */\n width: 220px;\n pointer-events: auto;\n z-index: 10;\n overflow: visible;\n}\n\n.plugin-panel-in-viewport.collapsed {\n width: 32px;\n}\n\n.plugin-panel-in-viewport .plugin-panel-toggle {\n position: sticky;\n top: 0;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 4px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.plugin-panel-in-viewport-content {\n overflow: visible;\n position: relative;\n}\n\n/* Plugin overlay container for rendering highlights/decorations */\n.plugin-overlays-container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n z-index: 5;\n}\n\n.plugin-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n/* Individual overlay children manage their own pointer-events.\n Do NOT set pointer-events: auto here \u2014 it overrides overlay containers\n that need pointer-events: none to let clicks pass through to the editor. */\n";
|
|
@@ -54,7 +54,7 @@ declare const PluginHost: React.ForwardRefExoticComponent<PluginHostProps & Reac
|
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
56
|
* ```tsx
|
|
57
|
-
* import { PluginHost, templatePlugin } from '@
|
|
57
|
+
* import { PluginHost, templatePlugin } from '@sqren/docx-editor-react/plugin-api';
|
|
58
58
|
*
|
|
59
59
|
* function MyEditor() {
|
|
60
60
|
* return (
|
package/dist/plugin-api.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/plugin-api
|
|
3
3
|
*
|
|
4
4
|
* Generic plugin interface and host component for integrating external
|
|
5
5
|
* plugins with the editor. Pairs with the framework-agnostic plugin types
|
|
6
|
-
* exported from `@
|
|
6
|
+
* exported from `@sqren/docx-editor-core/plugin-api`.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { PluginHost, templatePlugin, type EditorPlugin } from '@
|
|
10
|
+
* import { PluginHost, templatePlugin, type EditorPlugin } from '@sqren/docx-editor-react/plugin-api';
|
|
11
11
|
*
|
|
12
12
|
* function MyEditor() {
|
|
13
13
|
* return (
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
import { P as PluginHostProps, a as PluginHostRef, b as ReactEditorPlugin } from './types-D35gNE-_.js';
|
|
25
25
|
export { E as EditorPlugin, c as PluginContext, R as ReactSidebarItem, S as SidebarItemRenderProps } from './types-D35gNE-_.js';
|
|
26
26
|
import * as React from 'react';
|
|
27
|
-
export { RenderedDomContextImpl, createRenderedDomContext } from '@
|
|
28
|
-
import { TemplateTag } from '@
|
|
29
|
-
export { TEMPLATE_DECORATION_STYLES, TagType, TemplateTag, createTemplatePlugin as createTemplateProseMirrorPlugin, getTemplateTags as getTemplatePluginTags, setHoveredElement, setSelectedElement, templatePluginKey } from '@
|
|
30
|
-
export { PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext } from '@
|
|
27
|
+
export { RenderedDomContextImpl, createRenderedDomContext } from '@sqren/docx-editor-core/plugin-api/RenderedDomContext';
|
|
28
|
+
import { TemplateTag } from '@sqren/docx-editor-core/prosemirror/template/prosemirror-plugin';
|
|
29
|
+
export { TEMPLATE_DECORATION_STYLES, TagType, TemplateTag, createTemplatePlugin as createTemplateProseMirrorPlugin, getTemplateTags as getTemplatePluginTags, setHoveredElement, setSelectedElement, templatePluginKey } from '@sqren/docx-editor-core/prosemirror/template/prosemirror-plugin';
|
|
30
|
+
export { PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext } from '@sqren/docx-editor-core/plugin-api';
|
|
31
31
|
import 'prosemirror-view';
|
|
32
32
|
|
|
33
33
|
declare const PLUGIN_HOST_STYLES = "\n.plugin-host {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: visible;\n position: relative;\n}\n\n.plugin-host-editor {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-width: 0;\n overflow: visible;\n}\n\n\n.plugin-panels-left,\n.plugin-panels-right {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n background: #f8f9fa;\n border-color: #e9ecef;\n}\n\n.plugin-panels-left {\n border-right: 1px solid #e9ecef;\n}\n\n.plugin-panels-right {\n border-left: 1px solid #e9ecef;\n}\n\n.plugin-panels-bottom {\n border-top: 1px solid #e9ecef;\n background: #f8f9fa;\n}\n\n.plugin-panel {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n transition: width 0.2s ease, height 0.2s ease;\n}\n\n.plugin-panel.collapsed {\n overflow: visible;\n}\n\n.plugin-panel-toggle {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle {\n writing-mode: vertical-rl;\n text-orientation: mixed;\n flex-direction: column;\n height: 100%;\n padding: 8px 6px;\n}\n\n.plugin-panel-toggle:hover {\n background: #e9ecef;\n color: #495057;\n}\n\n.plugin-panel-toggle-icon {\n font-weight: bold;\n font-size: 14px;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle-icon {\n transform: rotate(90deg);\n}\n\n.plugin-panel-toggle-label {\n font-weight: 500;\n}\n\n.plugin-panel-content {\n flex: 1;\n overflow: auto;\n}\n\n/* Right panel rendered inside viewport - scrolls with content */\n.plugin-panel-in-viewport {\n position: absolute;\n top: 0;\n /* Position is set dynamically via inline styles based on page edge */\n width: 220px;\n pointer-events: auto;\n z-index: 10;\n overflow: visible;\n}\n\n.plugin-panel-in-viewport.collapsed {\n width: 32px;\n}\n\n.plugin-panel-in-viewport .plugin-panel-toggle {\n position: sticky;\n top: 0;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 4px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.plugin-panel-in-viewport-content {\n overflow: visible;\n position: relative;\n}\n\n/* Plugin overlay container for rendering highlights/decorations */\n.plugin-overlays-container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n z-index: 5;\n}\n\n.plugin-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n/* Individual overlay children manage their own pointer-events.\n Do NOT set pointer-events: auto here \u2014 it overrides overlay containers\n that need pointer-events: none to let clicks pass through to the editor. */\n";
|
|
@@ -54,7 +54,7 @@ declare const PluginHost: React.ForwardRefExoticComponent<PluginHostProps & Reac
|
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
56
|
* ```tsx
|
|
57
|
-
* import { PluginHost, templatePlugin } from '@
|
|
57
|
+
* import { PluginHost, templatePlugin } from '@sqren/docx-editor-react/plugin-api';
|
|
58
58
|
*
|
|
59
59
|
* function MyEditor() {
|
|
60
60
|
* return (
|
package/dist/plugin-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var chunkBZO4G5M6_js=require('./chunk-BZO4G5M6.js'),chunkBJ5RZW6Y_js=require('./chunk-BJ5RZW6Y.js'),ie=require('react'),prosemirrorState=require('prosemirror-state'),docxEditorCore=require('@
|
|
1
|
+
'use strict';var chunkBZO4G5M6_js=require('./chunk-BZO4G5M6.js'),chunkBJ5RZW6Y_js=require('./chunk-BJ5RZW6Y.js'),ie=require('react'),prosemirrorState=require('prosemirror-state'),docxEditorCore=require('@sqren/docx-editor-core'),jsxRuntime=require('react/jsx-runtime'),ke=require('@sqren/docx-editor-core/prosemirror/template/prosemirror-plugin');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var ie__default=/*#__PURE__*/_interopDefault(ie);var ke__namespace=/*#__PURE__*/_interopNamespace(ke);var z={position:"right",defaultSize:280,minSize:200,maxSize:500,resizable:true,collapsible:true,defaultCollapsed:false},j=docxEditorCore.injectStyles,J=`
|
|
2
2
|
.plugin-host {
|
|
3
3
|
display: flex;
|
|
4
4
|
width: 100%;
|
package/dist/plugin-api.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{a as RenderedDomContextImpl,b as createRenderedDomContext}from'./chunk-IVFYCMAM.mjs';import {a}from'./chunk-BMBP5UFA.mjs';import ie,{forwardRef,useState,useRef,useMemo,useSyncExternalStore,useEffect,useCallback,useImperativeHandle,cloneElement}from'react';import {TextSelection}from'prosemirror-state';import {PluginLifecycleManager,injectStyles}from'@
|
|
1
|
+
export{a as RenderedDomContextImpl,b as createRenderedDomContext}from'./chunk-IVFYCMAM.mjs';import {a}from'./chunk-BMBP5UFA.mjs';import ie,{forwardRef,useState,useRef,useMemo,useSyncExternalStore,useEffect,useCallback,useImperativeHandle,cloneElement}from'react';import {TextSelection}from'prosemirror-state';import {PluginLifecycleManager,injectStyles}from'@sqren/docx-editor-core';import {jsx,jsxs}from'react/jsx-runtime';import*as ke from'@sqren/docx-editor-core/prosemirror/template/prosemirror-plugin';var z={position:"right",defaultSize:280,minSize:200,maxSize:500,resizable:true,collapsible:true,defaultCollapsed:false},j=injectStyles,J=`
|
|
2
2
|
.plugin-host {
|
|
3
3
|
display: flex;
|
|
4
4
|
width: 100%;
|
package/dist/styles.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/styles
|
|
3
3
|
*
|
|
4
4
|
* CSS import entry. Bring in the editor's base styles by importing
|
|
5
|
-
* `@
|
|
5
|
+
* `@sqren/docx-editor-react/styles.css` directly; this module exists for
|
|
6
6
|
* tooling that prefers a JS-style import.
|
|
7
7
|
*
|
|
8
8
|
* @packageDocumentation
|
package/dist/styles.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/styles
|
|
3
3
|
*
|
|
4
4
|
* CSS import entry. Bring in the editor's base styles by importing
|
|
5
|
-
* `@
|
|
5
|
+
* `@sqren/docx-editor-react/styles.css` directly; this module exists for
|
|
6
6
|
* tooling that prefers a JS-style import.
|
|
7
7
|
*
|
|
8
8
|
* @packageDocumentation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorView } from 'prosemirror-view';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { SidebarItem, EditorPluginCore, PluginPanelProps, RenderedDomContext, SidebarItemContext } from '@
|
|
3
|
+
import { SidebarItem, EditorPluginCore, PluginPanelProps, RenderedDomContext, SidebarItemContext } from '@sqren/docx-editor-core/plugin-api';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* React Plugin Interface for the DOCX Editor
|
package/dist/types-D35gNE-_.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorView } from 'prosemirror-view';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { SidebarItem, EditorPluginCore, PluginPanelProps, RenderedDomContext, SidebarItemContext } from '@
|
|
3
|
+
import { SidebarItem, EditorPluginCore, PluginPanelProps, RenderedDomContext, SidebarItemContext } from '@sqren/docx-editor-core/plugin-api';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* React Plugin Interface for the DOCX Editor
|
package/dist/ui.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/ui
|
|
3
3
|
*
|
|
4
4
|
* UI entry point — Toolbar, pickers, dialogs, and UI components.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```tsx
|
|
8
|
-
* import { Toolbar, FontPicker, ColorPicker } from '@
|
|
8
|
+
* import { Toolbar, FontPicker, ColorPicker } from '@sqren/docx-editor-react/ui';
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
15
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
|
-
import { Table, TableCell, ParagraphAlignment, ColorValue, Style, Theme, StyleType, SectionProperties, TabStop, Document } from '@
|
|
17
|
-
import { FontOption } from '@
|
|
18
|
-
export { FontOption } from '@
|
|
19
|
-
import { ListState } from '@
|
|
20
|
-
export { ListState, createDefaultListState } from '@
|
|
16
|
+
import { Table, TableCell, ParagraphAlignment, ColorValue, Style, Theme, StyleType, SectionProperties, TabStop, Document } from '@sqren/docx-editor-core/types/document';
|
|
17
|
+
import { FontOption } from '@sqren/docx-editor-core/utils/fontOptions';
|
|
18
|
+
export { FontOption } from '@sqren/docx-editor-core/utils/fontOptions';
|
|
19
|
+
import { ListState } from '@sqren/docx-editor-core/utils/listState';
|
|
20
|
+
export { ListState, createDefaultListState } from '@sqren/docx-editor-core/utils/listState';
|
|
21
21
|
import { T as TableSelection, a as TableContext, b as TableSplitConfig, c as TableAction } from './useFindReplace-Bc2ubEeV.mjs';
|
|
22
22
|
export { F as FindReplaceOptions, d as FindReplaceState, e as TableToolbar, f as TableToolbarProps, U as UseFindReplaceReturn, u as useFindReplace } from './useFindReplace-Bc2ubEeV.mjs';
|
|
23
|
-
import { SelectionContext, AIAction, AgentResponse } from '@
|
|
24
|
-
import { TranslationKey } from '@
|
|
23
|
+
import { SelectionContext, AIAction, AgentResponse } from '@sqren/docx-editor-core/types/agentApi';
|
|
24
|
+
import { TranslationKey } from '@sqren/docx-editor-i18n';
|
|
25
25
|
export { a as PrintButton, b as PrintButtonProps, P as PrintOptions, c as PrintStyles, f as formatPrintPageRange, g as getDefaultPrintOptions, i as isPrintSupported, o as openPrintWindow, p as parsePageRange, t as triggerPrint } from './PrintPreview-DEhwRBC_.mjs';
|
|
26
26
|
export { K as DialogKeyboardShortcut, F as FindReplaceDialog, a as FindReplaceDialogProps, H as HyperlinkData, b as HyperlinkDialog, c as HyperlinkDialogProps, d as KeyboardShortcutsDialog, e as KeyboardShortcutsDialogProps, P as PasteOption, f as PasteSpecialDialog, g as PasteSpecialDialogProps, S as ShortcutCategory, U as UseKeyboardShortcutsDialogOptions, h as UseKeyboardShortcutsDialogReturn, i as UsePasteSpecialOptions, j as UsePasteSpecialReturn, k as formatShortcutKeys, l as getAllCategories, m as getAllPasteOptions, n as getCategoryLabel, o as getCommonShortcuts, p as getDefaultPasteOption, q as getDefaultShortcuts, r as getPasteOption, s as getShortcutsByCategory, t as isPasteSpecialShortcut, u as useHyperlinkDialog, v as useKeyboardShortcutsDialog, w as usePasteSpecial } from './KeyboardShortcutsDialog-B-h3NAat.mjs';
|
|
27
|
-
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch } from '@
|
|
28
|
-
import '@
|
|
27
|
+
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch } from '@sqren/docx-editor-core/utils/findReplace';
|
|
28
|
+
import '@sqren/docx-editor-core/utils';
|
|
29
29
|
|
|
30
30
|
interface FontPickerProps {
|
|
31
31
|
value?: string;
|
|
@@ -76,7 +76,7 @@ declare function ListButtons({ listState, onBulletList, onNumberedList, onIndent
|
|
|
76
76
|
* row/column add+delete, cell merge/split, selection bounds + lookups,
|
|
77
77
|
* grid-anchor calculations for irregular merged tables. Used by
|
|
78
78
|
* TableToolbar.tsx and the React table-selection hook; published from
|
|
79
|
-
* `@
|
|
79
|
+
* `@sqren/docx-editor-react`.
|
|
80
80
|
*/
|
|
81
81
|
|
|
82
82
|
/**
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/ui
|
|
3
3
|
*
|
|
4
4
|
* UI entry point — Toolbar, pickers, dialogs, and UI components.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```tsx
|
|
8
|
-
* import { Toolbar, FontPicker, ColorPicker } from '@
|
|
8
|
+
* import { Toolbar, FontPicker, ColorPicker } from '@sqren/docx-editor-react/ui';
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
15
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
|
-
import { Table, TableCell, ParagraphAlignment, ColorValue, Style, Theme, StyleType, SectionProperties, TabStop, Document } from '@
|
|
17
|
-
import { FontOption } from '@
|
|
18
|
-
export { FontOption } from '@
|
|
19
|
-
import { ListState } from '@
|
|
20
|
-
export { ListState, createDefaultListState } from '@
|
|
16
|
+
import { Table, TableCell, ParagraphAlignment, ColorValue, Style, Theme, StyleType, SectionProperties, TabStop, Document } from '@sqren/docx-editor-core/types/document';
|
|
17
|
+
import { FontOption } from '@sqren/docx-editor-core/utils/fontOptions';
|
|
18
|
+
export { FontOption } from '@sqren/docx-editor-core/utils/fontOptions';
|
|
19
|
+
import { ListState } from '@sqren/docx-editor-core/utils/listState';
|
|
20
|
+
export { ListState, createDefaultListState } from '@sqren/docx-editor-core/utils/listState';
|
|
21
21
|
import { T as TableSelection, a as TableContext, b as TableSplitConfig, c as TableAction } from './useFindReplace-Bc2ubEeV.js';
|
|
22
22
|
export { F as FindReplaceOptions, d as FindReplaceState, e as TableToolbar, f as TableToolbarProps, U as UseFindReplaceReturn, u as useFindReplace } from './useFindReplace-Bc2ubEeV.js';
|
|
23
|
-
import { SelectionContext, AIAction, AgentResponse } from '@
|
|
24
|
-
import { TranslationKey } from '@
|
|
23
|
+
import { SelectionContext, AIAction, AgentResponse } from '@sqren/docx-editor-core/types/agentApi';
|
|
24
|
+
import { TranslationKey } from '@sqren/docx-editor-i18n';
|
|
25
25
|
export { a as PrintButton, b as PrintButtonProps, P as PrintOptions, c as PrintStyles, f as formatPrintPageRange, g as getDefaultPrintOptions, i as isPrintSupported, o as openPrintWindow, p as parsePageRange, t as triggerPrint } from './PrintPreview-DEhwRBC_.js';
|
|
26
26
|
export { K as DialogKeyboardShortcut, F as FindReplaceDialog, a as FindReplaceDialogProps, H as HyperlinkData, b as HyperlinkDialog, c as HyperlinkDialogProps, d as KeyboardShortcutsDialog, e as KeyboardShortcutsDialogProps, P as PasteOption, f as PasteSpecialDialog, g as PasteSpecialDialogProps, S as ShortcutCategory, U as UseKeyboardShortcutsDialogOptions, h as UseKeyboardShortcutsDialogReturn, i as UsePasteSpecialOptions, j as UsePasteSpecialReturn, k as formatShortcutKeys, l as getAllCategories, m as getAllPasteOptions, n as getCategoryLabel, o as getCommonShortcuts, p as getDefaultPasteOption, q as getDefaultShortcuts, r as getPasteOption, s as getShortcutsByCategory, t as isPasteSpecialShortcut, u as useHyperlinkDialog, v as useKeyboardShortcutsDialog, w as usePasteSpecial } from './KeyboardShortcutsDialog-B-h3NAat.js';
|
|
27
|
-
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch } from '@
|
|
28
|
-
import '@
|
|
27
|
+
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch } from '@sqren/docx-editor-core/utils/findReplace';
|
|
28
|
+
import '@sqren/docx-editor-core/utils';
|
|
29
29
|
|
|
30
30
|
interface FontPickerProps {
|
|
31
31
|
value?: string;
|
|
@@ -76,7 +76,7 @@ declare function ListButtons({ listState, onBulletList, onNumberedList, onIndent
|
|
|
76
76
|
* row/column add+delete, cell merge/split, selection bounds + lookups,
|
|
77
77
|
* grid-anchor calculations for irregular merged tables. Used by
|
|
78
78
|
* TableToolbar.tsx and the React table-selection hook; published from
|
|
79
|
-
* `@
|
|
79
|
+
* `@sqren/docx-editor-react`.
|
|
80
80
|
*/
|
|
81
81
|
|
|
82
82
|
/**
|