@eigenpal/docx-js-editor 0.0.16 → 0.0.19
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/ClipboardManager-D6dkOFg6.d.ts +436 -0
- package/dist/ClipboardManager-EZ0C6Onq.d.cts +436 -0
- package/dist/{DocumentAgent-Ci6_T-XM.d.ts → DocumentAgent-B0EC8lPC.d.cts} +2 -2
- package/dist/{DocumentAgent-DEGFgYEN.d.cts → DocumentAgent-BcCDg7i2.d.ts} +2 -2
- package/dist/{FindReplaceDialog-UMXCBBST.js → FindReplaceDialog-AWQXKEUQ.js} +2 -1
- package/dist/FindReplaceDialog-AWQXKEUQ.js.map +1 -0
- package/dist/FindReplaceDialog-I4SZDSVP.cjs +2 -0
- package/dist/FindReplaceDialog-I4SZDSVP.cjs.map +1 -0
- package/dist/{FootnotePropertiesDialog-OBQXOBJE.cjs → FootnotePropertiesDialog-73VT2ZVZ.cjs} +2 -1
- package/dist/FootnotePropertiesDialog-73VT2ZVZ.cjs.map +1 -0
- package/dist/{FootnotePropertiesDialog-TYQGPWPX.js → FootnotePropertiesDialog-ZM3EF3EF.js} +2 -1
- package/dist/FootnotePropertiesDialog-ZM3EF3EF.js.map +1 -0
- package/dist/{HyperlinkDialog-UOERZIBM.js → HyperlinkDialog-BA25XUT5.js} +2 -1
- package/dist/HyperlinkDialog-BA25XUT5.js.map +1 -0
- package/dist/HyperlinkDialog-V63LPOT2.cjs +2 -0
- package/dist/HyperlinkDialog-V63LPOT2.cjs.map +1 -0
- package/dist/{ImagePositionDialog-52FDANUK.js → ImagePositionDialog-AIAMKPFK.js} +2 -1
- package/dist/ImagePositionDialog-AIAMKPFK.js.map +1 -0
- package/dist/{ImagePositionDialog-ZK5WFBRC.cjs → ImagePositionDialog-KMK7ROV2.cjs} +2 -1
- package/dist/ImagePositionDialog-KMK7ROV2.cjs.map +1 -0
- package/dist/{ImagePropertiesDialog-YPSLPSF6.js → ImagePropertiesDialog-ERFCUVCW.js} +2 -1
- package/dist/ImagePropertiesDialog-ERFCUVCW.js.map +1 -0
- package/dist/{ImagePropertiesDialog-LU44RDIY.cjs → ImagePropertiesDialog-USMMRK6X.cjs} +2 -1
- package/dist/ImagePropertiesDialog-USMMRK6X.cjs.map +1 -0
- package/dist/{TablePropertiesDialog-KMOYHPGF.cjs → TablePropertiesDialog-72CIUAZT.cjs} +2 -1
- package/dist/TablePropertiesDialog-72CIUAZT.cjs.map +1 -0
- package/dist/{TablePropertiesDialog-OUUJAA7D.js → TablePropertiesDialog-EMUEVYB3.js} +2 -1
- package/dist/TablePropertiesDialog-EMUEVYB3.js.map +1 -0
- package/dist/{agentApi-CbVUCZRu.d.cts → agentApi-BFVyKagE.d.cts} +143 -2
- package/dist/{agentApi-CbVUCZRu.d.ts → agentApi-BFVyKagE.d.ts} +143 -2
- package/dist/{chunk-OEOUMSWH.cjs → chunk-2CHPKB5A.cjs} +8 -7
- package/dist/chunk-2CHPKB5A.cjs.map +1 -0
- package/dist/{chunk-R5SKERM2.js → chunk-2QOEHCBX.js} +2 -1
- package/dist/chunk-2QOEHCBX.js.map +1 -0
- package/dist/chunk-4QT5LPBA.cjs +24 -0
- package/dist/chunk-4QT5LPBA.cjs.map +1 -0
- package/dist/chunk-5DYSI4O4.cjs +60 -0
- package/dist/chunk-5DYSI4O4.cjs.map +1 -0
- package/dist/{chunk-DYQUXFE5.cjs → chunk-5FJXHXFV.cjs} +2 -1
- package/dist/chunk-5FJXHXFV.cjs.map +1 -0
- package/dist/chunk-6FEWNF6B.js +4 -0
- package/dist/chunk-6FEWNF6B.js.map +1 -0
- package/dist/chunk-6LF5HZCV.js +10 -0
- package/dist/chunk-6LF5HZCV.js.map +1 -0
- package/dist/{chunk-EMKABJPH.js → chunk-7JSPKVOW.js} +2 -1
- package/dist/chunk-7JSPKVOW.js.map +1 -0
- package/dist/chunk-C33XDRDJ.cjs +28 -0
- package/dist/chunk-C33XDRDJ.cjs.map +1 -0
- package/dist/chunk-CV5WFE7K.js +24 -0
- package/dist/chunk-CV5WFE7K.js.map +1 -0
- package/dist/{chunk-WFYRA2TH.js → chunk-CXJRNISO.js} +2 -1
- package/dist/chunk-CXJRNISO.js.map +1 -0
- package/dist/{chunk-VTAS7VZ6.cjs → chunk-DJAEBZ33.cjs} +2 -1
- package/dist/chunk-DJAEBZ33.cjs.map +1 -0
- package/dist/chunk-DP6Q75ZD.js +28 -0
- package/dist/chunk-DP6Q75ZD.js.map +1 -0
- package/dist/chunk-FDANI5P4.cjs +2 -0
- package/dist/chunk-FDANI5P4.cjs.map +1 -0
- package/dist/chunk-FGVGZLBL.js +2 -0
- package/dist/chunk-FGVGZLBL.js.map +1 -0
- package/dist/{chunk-SF53KLDZ.cjs → chunk-GJ4GKSDU.cjs} +2 -1
- package/dist/chunk-GJ4GKSDU.cjs.map +1 -0
- package/dist/{chunk-FYAWM7MP.cjs → chunk-GWBTKVFD.cjs} +2 -1
- package/dist/chunk-GWBTKVFD.cjs.map +1 -0
- package/dist/{chunk-WFWLPKQA.js → chunk-JOYPFQW2.js} +2 -1
- package/dist/chunk-JOYPFQW2.js.map +1 -0
- package/dist/{chunk-ZDYHAYN6.js → chunk-L54YNLSE.js} +2 -1
- package/dist/chunk-L54YNLSE.js.map +1 -0
- package/dist/chunk-LPGMLJMO.js +259 -0
- package/dist/chunk-LPGMLJMO.js.map +1 -0
- package/dist/{chunk-CTYOM6BE.js → chunk-M2T6XKT5.js} +2 -1
- package/dist/chunk-M2T6XKT5.js.map +1 -0
- package/dist/chunk-OHG7ROFC.js +11 -0
- package/dist/chunk-OHG7ROFC.js.map +1 -0
- package/dist/chunk-PANKMCFX.cjs +4 -0
- package/dist/chunk-PANKMCFX.cjs.map +1 -0
- package/dist/{chunk-PJVI53AH.js → chunk-Q6HUGWO6.js} +2 -1
- package/dist/chunk-Q6HUGWO6.js.map +1 -0
- package/dist/{chunk-MLSHZVL7.js → chunk-QDV75OJ4.js} +8 -7
- package/dist/chunk-QDV75OJ4.js.map +1 -0
- package/dist/chunk-QEBO3EQP.cjs +2 -0
- package/dist/chunk-QEBO3EQP.cjs.map +1 -0
- package/dist/chunk-QVIZ775M.cjs +259 -0
- package/dist/chunk-QVIZ775M.cjs.map +1 -0
- package/dist/chunk-RMUMR42R.cjs +10 -0
- package/dist/chunk-RMUMR42R.cjs.map +1 -0
- package/dist/{chunk-XS2AQFMF.cjs → chunk-S26DZVRQ.cjs} +2 -1
- package/dist/chunk-S26DZVRQ.cjs.map +1 -0
- package/dist/{chunk-L34XFLQZ.cjs → chunk-T2HQYRA7.cjs} +2 -1
- package/dist/chunk-T2HQYRA7.cjs.map +1 -0
- package/dist/chunk-ULXNEG66.js +60 -0
- package/dist/chunk-ULXNEG66.js.map +1 -0
- package/dist/{chunk-PXC7ARQB.cjs → chunk-WD2HTKRR.cjs} +2 -1
- package/dist/chunk-WD2HTKRR.cjs.map +1 -0
- package/dist/chunk-XZNOV52K.cjs +11 -0
- package/dist/chunk-XZNOV52K.cjs.map +1 -0
- package/dist/chunk-Y6VCTLCJ.js +2 -0
- package/dist/chunk-Y6VCTLCJ.js.map +1 -0
- package/dist/{clipboard-Cx7cb3kX.d.cts → clipboard-CqE-UZ2d.d.cts} +1 -1
- package/dist/{clipboard-BOocwmAM.d.ts → clipboard-beGtyabO.d.ts} +1 -1
- package/dist/{colorResolver-KXbUgzWC.d.ts → colorResolver-B5YbO_a4.d.ts} +170 -170
- package/dist/{colorResolver-CIDiSPWd.d.cts → colorResolver-Cu46bSKr.d.cts} +170 -170
- package/dist/core-plugins-reexport.cjs +2 -0
- package/dist/core-plugins-reexport.cjs.map +1 -0
- package/dist/{core-plugins.d.cts → core-plugins-reexport.d.cts} +4 -4
- package/dist/{core-plugins.d.ts → core-plugins-reexport.d.ts} +4 -4
- package/dist/core-plugins-reexport.js +2 -0
- package/dist/core-plugins-reexport.js.map +1 -0
- package/dist/core-reexport.cjs +2 -0
- package/dist/core-reexport.cjs.map +1 -0
- package/dist/core-reexport.d.cts +309 -0
- package/dist/core-reexport.d.ts +309 -0
- package/dist/core-reexport.js +2 -0
- package/dist/core-reexport.js.map +1 -0
- package/dist/executor-K5RXUTTR.js +2 -0
- package/dist/executor-K5RXUTTR.js.map +1 -0
- package/dist/executor-XIPIU3H4.cjs +2 -0
- package/dist/executor-XIPIU3H4.cjs.map +1 -0
- package/dist/{insertOperations-CzB5b-Of.d.ts → fontLoader-CFKpg0Ri.d.ts} +86 -86
- package/dist/{insertOperations-DKVmCV32.d.cts → fontLoader-HZYfILUm.d.cts} +86 -86
- package/dist/headless-reexport.cjs +5 -0
- package/dist/headless-reexport.cjs.map +1 -0
- package/dist/{headless.d.cts → headless-reexport.d.cts} +7 -7
- package/dist/{headless.d.ts → headless-reexport.d.ts} +7 -7
- package/dist/{headless.js → headless-reexport.js} +3 -2
- package/dist/headless-reexport.js.map +1 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +15 -13
- package/dist/index.d.ts +15 -13
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -0
- package/dist/{mcp.cjs → mcp-reexport.cjs} +11 -10
- package/dist/mcp-reexport.cjs.map +1 -0
- package/dist/{mcp.d.cts → mcp-reexport.d.cts} +2 -2
- package/dist/{mcp.d.ts → mcp-reexport.d.ts} +2 -2
- package/dist/{mcp.js → mcp-reexport.js} +10 -9
- package/dist/mcp-reexport.js.map +1 -0
- package/dist/{processTemplate-RJN6452W.js → processTemplate-G37IM66O.js} +2 -1
- package/dist/processTemplate-G37IM66O.js.map +1 -0
- package/dist/processTemplate-RFBGVH7T.cjs +2 -0
- package/dist/processTemplate-RFBGVH7T.cjs.map +1 -0
- package/dist/{react-BZxD04XV.d.ts → react-BjOCdeTs.d.ts} +43 -366
- package/dist/{react-D8eAYckC.d.cts → react-UzAn4o7l.d.cts} +43 -366
- package/dist/react.cjs +2 -1
- package/dist/react.cjs.map +1 -0
- package/dist/react.css +1 -0
- package/dist/react.css.map +1 -0
- package/dist/react.d.cts +6 -5
- package/dist/react.d.ts +6 -5
- package/dist/react.js +2 -1
- package/dist/react.js.map +1 -0
- package/dist/{registry-D4tvj9f3.d.ts → registry-CV6nYWqP.d.ts} +1 -1
- package/dist/{registry-ngv6Bumt.d.cts → registry-DjacfR6Q.d.cts} +1 -1
- package/dist/selectionRects-6DU7HN7E.js +2 -0
- package/dist/selectionRects-6DU7HN7E.js.map +1 -0
- package/dist/selectionRects-YZSC24ZP.cjs +2 -0
- package/dist/selectionRects-YZSC24ZP.cjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/{types-D96elyJF.d.cts → types-Bnp8rvJn.d.cts} +2 -2
- package/dist/{types-xMzSPT4i.d.ts → types-DwZ3xysp.d.ts} +2 -2
- package/dist/ui.cjs +2 -1
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.cts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +2 -1
- package/dist/ui.js.map +1 -0
- package/dist/{variableDetector-DeM1N-_L.d.ts → variableDetector-BaDeXz7D.d.ts} +1 -1
- package/dist/{variableDetector-CPxKo9jP.d.cts → variableDetector-CMhJtM96.d.cts} +1 -1
- package/package.json +26 -79
- package/LICENSE +0 -21
- package/README.md +0 -171
- package/dist/FindReplaceDialog-46BE7Q2G.cjs +0 -1
- package/dist/HyperlinkDialog-22NH7ZLP.cjs +0 -1
- package/dist/chunk-24N3L4IL.cjs +0 -258
- package/dist/chunk-2ASOEN3V.js +0 -1
- package/dist/chunk-46OFHSPJ.cjs +0 -2
- package/dist/chunk-65OFYOHF.cjs +0 -58
- package/dist/chunk-6YFGCUHU.js +0 -4
- package/dist/chunk-ESI4BSBF.js +0 -1
- package/dist/chunk-GLFFXY2X.js +0 -258
- package/dist/chunk-ITWEFKGQ.cjs +0 -1
- package/dist/chunk-JKN7TNPA.js +0 -12
- package/dist/chunk-KESNGXGO.js +0 -1
- package/dist/chunk-NO7WUK5E.cjs +0 -12
- package/dist/chunk-NT2REEAA.cjs +0 -1
- package/dist/chunk-O7QVCJN6.cjs +0 -4
- package/dist/chunk-OW5H5DNE.cjs +0 -1
- package/dist/chunk-OWMXCVKB.js +0 -1
- package/dist/chunk-RM3ITJ2H.cjs +0 -10
- package/dist/chunk-TOI5W3HK.js +0 -8
- package/dist/chunk-UAVOWAIF.cjs +0 -8
- package/dist/chunk-ULNHBTYA.js +0 -2
- package/dist/chunk-UXXV4GT6.js +0 -10
- package/dist/chunk-VOWKSURW.cjs +0 -1
- package/dist/chunk-YMXKVLTU.js +0 -58
- package/dist/core-plugins.cjs +0 -1
- package/dist/core-plugins.js +0 -1
- package/dist/core.cjs +0 -1
- package/dist/core.d.cts +0 -23
- package/dist/core.d.ts +0 -23
- package/dist/core.js +0 -1
- package/dist/executor-ITYZTNSH.cjs +0 -1
- package/dist/executor-TC7CLATE.js +0 -1
- package/dist/headless.cjs +0 -4
- package/dist/mcp-cli.js +0 -136
- package/dist/processTemplate-525HZL4S.cjs +0 -1
- package/dist/selectionRects-PQEUEW35.cjs +0 -1
- package/dist/selectionRects-QAG5RSHD.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eigenpal/docx-js-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "A browser-based DOCX template editor with variable insertion support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -12,11 +12,6 @@
|
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
|
-
"./core": {
|
|
16
|
-
"types": "./dist/core.d.ts",
|
|
17
|
-
"import": "./dist/core.js",
|
|
18
|
-
"require": "./dist/core.cjs"
|
|
19
|
-
},
|
|
20
15
|
"./react": {
|
|
21
16
|
"types": "./dist/react.d.ts",
|
|
22
17
|
"import": "./dist/react.js",
|
|
@@ -27,48 +22,50 @@
|
|
|
27
22
|
"import": "./dist/ui.js",
|
|
28
23
|
"require": "./dist/ui.cjs"
|
|
29
24
|
},
|
|
25
|
+
"./core": {
|
|
26
|
+
"types": "./dist/core-reexport.d.ts",
|
|
27
|
+
"import": "./dist/core-reexport.js",
|
|
28
|
+
"require": "./dist/core-reexport.cjs"
|
|
29
|
+
},
|
|
30
30
|
"./headless": {
|
|
31
|
-
"types": "./dist/headless.d.ts",
|
|
32
|
-
"import": "./dist/headless.js",
|
|
33
|
-
"require": "./dist/headless.cjs"
|
|
31
|
+
"types": "./dist/headless-reexport.d.ts",
|
|
32
|
+
"import": "./dist/headless-reexport.js",
|
|
33
|
+
"require": "./dist/headless-reexport.cjs"
|
|
34
34
|
},
|
|
35
35
|
"./core-plugins": {
|
|
36
|
-
"types": "./dist/core-plugins.d.ts",
|
|
37
|
-
"import": "./dist/core-plugins.js",
|
|
38
|
-
"require": "./dist/core-plugins.cjs"
|
|
36
|
+
"types": "./dist/core-plugins-reexport.d.ts",
|
|
37
|
+
"import": "./dist/core-plugins-reexport.js",
|
|
38
|
+
"require": "./dist/core-plugins-reexport.cjs"
|
|
39
39
|
},
|
|
40
40
|
"./mcp": {
|
|
41
|
-
"types": "./dist/mcp.d.ts",
|
|
42
|
-
"import": "./dist/mcp.js",
|
|
43
|
-
"require": "./dist/mcp.cjs"
|
|
41
|
+
"types": "./dist/mcp-reexport.d.ts",
|
|
42
|
+
"import": "./dist/mcp-reexport.js",
|
|
43
|
+
"require": "./dist/mcp-reexport.cjs"
|
|
44
44
|
},
|
|
45
45
|
"./styles.css": "./dist/styles.css"
|
|
46
46
|
},
|
|
47
47
|
"typesVersions": {
|
|
48
48
|
"*": {
|
|
49
|
-
"core": [
|
|
50
|
-
"./dist/core.d.ts"
|
|
51
|
-
],
|
|
52
49
|
"react": [
|
|
53
50
|
"./dist/react.d.ts"
|
|
54
51
|
],
|
|
55
52
|
"ui": [
|
|
56
53
|
"./dist/ui.d.ts"
|
|
57
54
|
],
|
|
55
|
+
"core": [
|
|
56
|
+
"./dist/core-reexport.d.ts"
|
|
57
|
+
],
|
|
58
58
|
"headless": [
|
|
59
|
-
"./dist/headless.d.ts"
|
|
59
|
+
"./dist/headless-reexport.d.ts"
|
|
60
60
|
],
|
|
61
61
|
"core-plugins": [
|
|
62
|
-
"./dist/core-plugins.d.ts"
|
|
62
|
+
"./dist/core-plugins-reexport.d.ts"
|
|
63
63
|
],
|
|
64
64
|
"mcp": [
|
|
65
|
-
"./dist/mcp.d.ts"
|
|
65
|
+
"./dist/mcp-reexport.d.ts"
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
"bin": {
|
|
70
|
-
"docx-editor-mcp": "./dist/mcp-cli.js"
|
|
71
|
-
},
|
|
72
69
|
"sideEffects": [
|
|
73
70
|
"*.css"
|
|
74
71
|
],
|
|
@@ -76,27 +73,9 @@
|
|
|
76
73
|
"dist"
|
|
77
74
|
],
|
|
78
75
|
"scripts": {
|
|
79
|
-
"dev": "vite --config examples/vite/vite.config.ts",
|
|
80
|
-
"dev:nextjs": "cd examples/nextjs && npm run dev",
|
|
81
|
-
"dev:remix": "cd examples/remix && npm run dev",
|
|
82
|
-
"dev:astro": "cd examples/astro && npm run dev",
|
|
83
|
-
"dev:demo": "bash examples/dev-all.sh",
|
|
84
76
|
"build": "tsup && bun run build:css",
|
|
85
|
-
"build:css": "tailwindcss -c
|
|
86
|
-
"
|
|
87
|
-
"test": "bun test",
|
|
88
|
-
"test:watch": "bun test --watch",
|
|
89
|
-
"test:e2e": "npx playwright test",
|
|
90
|
-
"test:e2e:ui": "npx playwright test --ui",
|
|
91
|
-
"test:visual": "npx playwright test visual.spec.ts",
|
|
92
|
-
"prepublishOnly": "bun test && NODE_ENV=production bun run build",
|
|
93
|
-
"typecheck": "tsc --noEmit",
|
|
94
|
-
"lint": "eslint src/",
|
|
95
|
-
"lint:fix": "eslint src/ --fix",
|
|
96
|
-
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css}\"",
|
|
97
|
-
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css}\"",
|
|
98
|
-
"size": "size-limit",
|
|
99
|
-
"prepare": "husky"
|
|
77
|
+
"build:css": "tailwindcss -c ../../tailwind.config.lib.js -i ./src/styles/editor.css -o ./dist/styles.css --minify",
|
|
78
|
+
"typecheck": "tsc --noEmit"
|
|
100
79
|
},
|
|
101
80
|
"peerDependencies": {
|
|
102
81
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -113,9 +92,6 @@
|
|
|
113
92
|
"dependencies": {
|
|
114
93
|
"@radix-ui/react-select": "^2.2.6",
|
|
115
94
|
"clsx": "^2.1.0",
|
|
116
|
-
"docxtemplater": "^3.50.0",
|
|
117
|
-
"jszip": "^3.10.1",
|
|
118
|
-
"pizzip": "^3.1.7",
|
|
119
95
|
"prosemirror-commands": "^1.5.2",
|
|
120
96
|
"prosemirror-dropcursor": "^1.8.2",
|
|
121
97
|
"prosemirror-history": "^1.4.0",
|
|
@@ -123,37 +99,7 @@
|
|
|
123
99
|
"prosemirror-model": "^1.19.4",
|
|
124
100
|
"prosemirror-state": "^1.4.3",
|
|
125
101
|
"prosemirror-tables": "^1.8.5",
|
|
126
|
-
"prosemirror-view": "^1.32.7"
|
|
127
|
-
"xml-js": "^1.6.11"
|
|
128
|
-
},
|
|
129
|
-
"devDependencies": {
|
|
130
|
-
"@happy-dom/global-registrator": "^13.3.8",
|
|
131
|
-
"@playwright/test": "^1.58.1",
|
|
132
|
-
"@size-limit/file": "^12.0.0",
|
|
133
|
-
"@testing-library/react": "^16.0.0",
|
|
134
|
-
"@types/bun": "^1.0.0",
|
|
135
|
-
"@types/react": "19.0.8",
|
|
136
|
-
"@types/react-dom": "19.0.3",
|
|
137
|
-
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
138
|
-
"@typescript-eslint/parser": "^8.54.0",
|
|
139
|
-
"@vitejs/plugin-react": "^5.1.2",
|
|
140
|
-
"autoprefixer": "^10.4.17",
|
|
141
|
-
"class-variance-authority": "^0.7.0",
|
|
142
|
-
"eslint": "^9.39.2",
|
|
143
|
-
"eslint-plugin-react": "^7.37.5",
|
|
144
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
145
|
-
"husky": "^9.1.7",
|
|
146
|
-
"lint-staged": "^16.2.7",
|
|
147
|
-
"postcss": "^8.4.33",
|
|
148
|
-
"prettier": "^3.8.1",
|
|
149
|
-
"react": "^19.0.0",
|
|
150
|
-
"react-dom": "^19.0.0",
|
|
151
|
-
"size-limit": "^12.0.0",
|
|
152
|
-
"tailwindcss": "^3.4.1",
|
|
153
|
-
"tailwindcss-animate": "^1.0.7",
|
|
154
|
-
"tsup": "^8.0.1",
|
|
155
|
-
"typescript": "^5.3.3",
|
|
156
|
-
"vite": "^7.3.1"
|
|
102
|
+
"prosemirror-view": "^1.32.7"
|
|
157
103
|
},
|
|
158
104
|
"keywords": [
|
|
159
105
|
"docx",
|
|
@@ -168,7 +114,8 @@
|
|
|
168
114
|
"license": "MIT",
|
|
169
115
|
"repository": {
|
|
170
116
|
"type": "git",
|
|
171
|
-
"url": "https://github.com/eigenpal/docx-js-editor.git"
|
|
117
|
+
"url": "https://github.com/eigenpal/docx-js-editor.git",
|
|
118
|
+
"directory": "packages/react"
|
|
172
119
|
},
|
|
173
120
|
"publishConfig": {
|
|
174
121
|
"access": "public"
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 EigenPal
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://github.com/eigenpal/docx-js-editor">
|
|
3
|
-
<img src="./assets/logo.png" alt="DOCX JS Editor" width="600" />
|
|
4
|
-
</a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<a href="https://www.npmjs.com/package/@eigenpal/docx-js-editor"><img src="https://img.shields.io/npm/v/@eigenpal/docx-js-editor.svg?style=flat-square&color=00C853" alt="npm version" /></a>
|
|
9
|
-
<a href="https://www.npmjs.com/package/@eigenpal/docx-js-editor"><img src="https://img.shields.io/npm/dm/@eigenpal/docx-js-editor.svg?style=flat-square&color=00C853" alt="npm downloads" /></a>
|
|
10
|
-
<a href="https://github.com/eigenpal/docx-js-editor/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&color=00C853" alt="license" /></a>
|
|
11
|
-
<a href="https://docx-js-editor.vercel.app/"><img src="https://img.shields.io/badge/Live_Demo-00C853?style=flat-square&logo=vercel&logoColor=white" alt="Live Demo" /></a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
# @eigenpal/docx-js-editor
|
|
15
|
-
|
|
16
|
-
Open-source WYSIWYG DOCX editor for React. Open, edit, and save `.docx` files entirely in the browser — no server required. [Try the live demo.](https://docx-js-editor.vercel.app/)
|
|
17
|
-
|
|
18
|
-
<p align="center">
|
|
19
|
-
<a href="https://docx-js-editor.vercel.app/">
|
|
20
|
-
<img src="./assets/editor.png" alt="DOCX JS Editor screenshot" width="500" />
|
|
21
|
-
</a>
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
We built it for ourselves in [eigenpal.com](https://eigenpal.com) in order to have an editor for `.docx` files, which serve as AI document workflow output templates for our clients.
|
|
25
|
-
|
|
26
|
-
### Framework Examples
|
|
27
|
-
|
|
28
|
-
| Framework | Example |
|
|
29
|
-
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
|
30
|
-
| <img src="https://vite.dev/logo.svg" width="14" /> Vite + React | [`examples/vite`](examples/vite) ([demo](https://docx-js-editor.vercel.app/)) |
|
|
31
|
-
| <img src="https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_dark_background.png" width="14" /> Next.js | [`examples/nextjs`](examples/nextjs) |
|
|
32
|
-
| <img src="https://remix.run/favicon-192.png" width="14" /> Remix | [`examples/remix`](examples/remix) |
|
|
33
|
-
| <img src="https://astro.build/favicon.svg" width="14" /> Astro | [`examples/astro`](examples/astro) |
|
|
34
|
-
|
|
35
|
-
## Installation
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm install @eigenpal/docx-js-editor
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Quick Start
|
|
42
|
-
|
|
43
|
-
```tsx
|
|
44
|
-
import { useRef } from 'react';
|
|
45
|
-
import { DocxEditor, type DocxEditorRef } from '@eigenpal/docx-js-editor';
|
|
46
|
-
import '@eigenpal/docx-js-editor/styles.css';
|
|
47
|
-
|
|
48
|
-
function Editor({ file }: { file: ArrayBuffer }) {
|
|
49
|
-
const editorRef = useRef<DocxEditorRef>(null);
|
|
50
|
-
|
|
51
|
-
const handleSave = async () => {
|
|
52
|
-
const buffer = await editorRef.current?.save();
|
|
53
|
-
if (buffer) {
|
|
54
|
-
await fetch('/api/documents/1', { method: 'PUT', body: buffer });
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<>
|
|
60
|
-
<button onClick={handleSave}>Save</button>
|
|
61
|
-
<DocxEditor ref={editorRef} documentBuffer={file} onChange={() => {}} />
|
|
62
|
-
</>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
> **Next.js / SSR:** The editor requires the DOM. Use a dynamic import or lazy `useEffect` load to avoid server-side rendering issues.
|
|
68
|
-
|
|
69
|
-
## Props
|
|
70
|
-
|
|
71
|
-
| Prop | Type | Default | Description |
|
|
72
|
-
| ----------------------- | ------------------------------------------- | ----------------- | ------------------------------------------------- |
|
|
73
|
-
| `documentBuffer` | `ArrayBuffer \| Uint8Array \| Blob \| File` | — | `.docx` file contents to load |
|
|
74
|
-
| `document` | `Document` | — | Pre-parsed document (alternative to buffer) |
|
|
75
|
-
| `readOnly` | `boolean` | `false` | Read-only preview (hides toolbar, rulers, panel) |
|
|
76
|
-
| `showToolbar` | `boolean` | `true` | Show formatting toolbar |
|
|
77
|
-
| `showRuler` | `boolean` | `false` | Show horizontal & vertical rulers |
|
|
78
|
-
| `rulerUnit` | `'inch' \| 'cm'` | `'inch'` | Unit for ruler display |
|
|
79
|
-
| `showZoomControl` | `boolean` | `true` | Show zoom controls in toolbar |
|
|
80
|
-
| `showPrintButton` | `boolean` | `true` | Show print button in toolbar |
|
|
81
|
-
| `showPageNumbers` | `boolean` | `true` | Show page number indicator |
|
|
82
|
-
| `enablePageNavigation` | `boolean` | `true` | Enable interactive page navigation |
|
|
83
|
-
| `pageNumberPosition` | `string` | `'bottom-center'` | Position of page number indicator |
|
|
84
|
-
| `showOutline` | `boolean` | `false` | Show document outline sidebar (table of contents) |
|
|
85
|
-
| `showMarginGuides` | `boolean` | `false` | Show page margin guide boundaries |
|
|
86
|
-
| `marginGuideColor` | `string` | `'#c0c0c0'` | Color for margin guides |
|
|
87
|
-
| `initialZoom` | `number` | `1.0` | Initial zoom level |
|
|
88
|
-
| `theme` | `Theme \| null` | — | Theme for styling |
|
|
89
|
-
| `toolbarExtra` | `ReactNode` | — | Custom toolbar items appended to the toolbar |
|
|
90
|
-
| `placeholder` | `ReactNode` | — | Placeholder when no document is loaded |
|
|
91
|
-
| `loadingIndicator` | `ReactNode` | — | Custom loading indicator |
|
|
92
|
-
| `className` | `string` | — | Additional CSS class name |
|
|
93
|
-
| `style` | `CSSProperties` | — | Additional inline styles |
|
|
94
|
-
| `onChange` | `(doc: Document) => void` | — | Called on document change |
|
|
95
|
-
| `onSave` | `(buffer: ArrayBuffer) => void` | — | Called on save |
|
|
96
|
-
| `onError` | `(error: Error) => void` | — | Called on error |
|
|
97
|
-
| `onSelectionChange` | `(state: SelectionState \| null) => void` | — | Called on selection change |
|
|
98
|
-
| `onFontsLoaded` | `() => void` | — | Called when fonts finish loading |
|
|
99
|
-
| `onPrint` | `() => void` | — | Called when print is triggered |
|
|
100
|
-
| `onCopy` | `() => void` | — | Called when content is copied |
|
|
101
|
-
| `onCut` | `() => void` | — | Called when content is cut |
|
|
102
|
-
| `onPaste` | `() => void` | — | Called when content is pasted |
|
|
103
|
-
|
|
104
|
-
## Ref Methods
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
const ref = useRef<DocxEditorRef>(null);
|
|
108
|
-
|
|
109
|
-
await ref.current.save(); // Returns ArrayBuffer of the .docx
|
|
110
|
-
ref.current.getDocument(); // Current document object
|
|
111
|
-
ref.current.setZoom(1.5); // Set zoom to 150%
|
|
112
|
-
ref.current.focus(); // Focus the editor
|
|
113
|
-
ref.current.scrollToPage(3); // Scroll to page 3
|
|
114
|
-
ref.current.print(); // Print the document
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Read-Only Preview
|
|
118
|
-
|
|
119
|
-
Use `readOnly` for a preview-only viewer. This disables editing, caret, and selection UI.
|
|
120
|
-
|
|
121
|
-
```tsx
|
|
122
|
-
<DocxEditor documentBuffer={file} readOnly />
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Plugins
|
|
126
|
-
|
|
127
|
-
Extend the editor with the plugin system. Wrap `DocxEditor` in a `PluginHost` and pass plugins that can contribute ProseMirror plugins, side panels, document overlays, and custom CSS:
|
|
128
|
-
|
|
129
|
-
```tsx
|
|
130
|
-
import { DocxEditor, PluginHost, templatePlugin } from '@eigenpal/docx-js-editor';
|
|
131
|
-
|
|
132
|
-
function Editor({ file }: { file: ArrayBuffer }) {
|
|
133
|
-
return (
|
|
134
|
-
<PluginHost plugins={[templatePlugin]}>
|
|
135
|
-
<DocxEditor documentBuffer={file} />
|
|
136
|
-
</PluginHost>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
| Plugin | Description |
|
|
142
|
-
| -------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
143
|
-
| [Docxtemplater](src/plugins/template/) | Syntax highlighting and annotation panel for [docxtemplater](https://docxtemplater.com) tags |
|
|
144
|
-
|
|
145
|
-
See [docs/PLUGINS.md](docs/PLUGINS.md) for the full plugin API, including how to create custom plugins with panels, overlays, and ProseMirror integrations.
|
|
146
|
-
|
|
147
|
-
## Features
|
|
148
|
-
|
|
149
|
-
- Full WYSIWYG editing with Microsoft Word fidelity
|
|
150
|
-
- Text and paragraph formatting (bold, italic, fonts, colors, alignment, spacing)
|
|
151
|
-
- Tables, images, hyperlinks
|
|
152
|
-
- Extensible plugin architecture
|
|
153
|
-
- Undo/redo, find & replace, keyboard shortcuts
|
|
154
|
-
- Print preview
|
|
155
|
-
- Zero server dependencies
|
|
156
|
-
|
|
157
|
-
## Development
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
bun install
|
|
161
|
-
bun run dev # Vite example on localhost:5173
|
|
162
|
-
bun run dev:nextjs # Next.js example on localhost:3000
|
|
163
|
-
bun run dev:remix # Remix example on localhost:3001
|
|
164
|
-
bun run dev:astro # Astro example on localhost:4321
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Each example is independently deployable. Copy any `examples/<framework>/` directory to start your own project — just `npm install` and go.
|
|
168
|
-
|
|
169
|
-
## License
|
|
170
|
-
|
|
171
|
-
MIT
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkVTAS7VZ6_cjs=require('./chunk-VTAS7VZ6.cjs');require('./chunk-VOWKSURW.cjs');Object.defineProperty(exports,"FindReplaceDialog",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.n}});Object.defineProperty(exports,"createDefaultFindOptions",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.a}});Object.defineProperty(exports,"createSearchPattern",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.c}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.o}});Object.defineProperty(exports,"escapeRegexString",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.b}});Object.defineProperty(exports,"findAllMatches",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.d}});Object.defineProperty(exports,"findInDocument",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.j}});Object.defineProperty(exports,"findInParagraph",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.k}});Object.defineProperty(exports,"getDefaultHighlightOptions",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.i}});Object.defineProperty(exports,"getMatchCountText",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.g}});Object.defineProperty(exports,"isEmptySearch",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.h}});Object.defineProperty(exports,"replaceAllInContent",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.e}});Object.defineProperty(exports,"replaceFirstInContent",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.f}});Object.defineProperty(exports,"scrollToMatch",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.l}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.m}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkXS2AQFMF_cjs=require('./chunk-XS2AQFMF.cjs');require('./chunk-VOWKSURW.cjs');Object.defineProperty(exports,"HyperlinkDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.d}});Object.defineProperty(exports,"createBookmarkLinkData",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.f}});Object.defineProperty(exports,"createHyperlinkData",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.e}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.n}});Object.defineProperty(exports,"emailToMailto",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.j}});Object.defineProperty(exports,"extractBookmarksForDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.l}});Object.defineProperty(exports,"getDisplayText",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.i}});Object.defineProperty(exports,"getUrlType",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.c}});Object.defineProperty(exports,"isBookmarkHyperlinkData",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.h}});Object.defineProperty(exports,"isExternalHyperlinkData",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.g}});Object.defineProperty(exports,"isValidUrl",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.a}});Object.defineProperty(exports,"normalizeUrl",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.b}});Object.defineProperty(exports,"phoneToTel",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.k}});Object.defineProperty(exports,"useHyperlinkDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.m}});
|