react-next-editor-js 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +877 -0
  3. package/dist/chunk-3QWXTDLY.cjs +486 -0
  4. package/dist/chunk-3QWXTDLY.cjs.map +1 -0
  5. package/dist/chunk-5F6SPYCN.cjs +180 -0
  6. package/dist/chunk-5F6SPYCN.cjs.map +1 -0
  7. package/dist/chunk-6NTSXJX4.js +174 -0
  8. package/dist/chunk-6NTSXJX4.js.map +1 -0
  9. package/dist/chunk-7VYJDBH7.js +261 -0
  10. package/dist/chunk-7VYJDBH7.js.map +1 -0
  11. package/dist/chunk-DBSFCCBG.cjs +1712 -0
  12. package/dist/chunk-DBSFCCBG.cjs.map +1 -0
  13. package/dist/chunk-EFE6RHDL.cjs +4 -0
  14. package/dist/chunk-EFE6RHDL.cjs.map +1 -0
  15. package/dist/chunk-G6YRIEK4.js +3 -0
  16. package/dist/chunk-G6YRIEK4.js.map +1 -0
  17. package/dist/chunk-GFNFJ3FL.cjs +119 -0
  18. package/dist/chunk-GFNFJ3FL.cjs.map +1 -0
  19. package/dist/chunk-IG2YLUFW.js +114 -0
  20. package/dist/chunk-IG2YLUFW.js.map +1 -0
  21. package/dist/chunk-JQXTWLHL.js +176 -0
  22. package/dist/chunk-JQXTWLHL.js.map +1 -0
  23. package/dist/chunk-NJCEHQV3.cjs +454 -0
  24. package/dist/chunk-NJCEHQV3.cjs.map +1 -0
  25. package/dist/chunk-O4GTLC3T.js +478 -0
  26. package/dist/chunk-O4GTLC3T.js.map +1 -0
  27. package/dist/chunk-ODHABIIC.cjs +82 -0
  28. package/dist/chunk-ODHABIIC.cjs.map +1 -0
  29. package/dist/chunk-PZ5AY32C.js +9 -0
  30. package/dist/chunk-PZ5AY32C.js.map +1 -0
  31. package/dist/chunk-Q7SFCCGT.cjs +11 -0
  32. package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
  33. package/dist/chunk-QIUIYBCZ.js +80 -0
  34. package/dist/chunk-QIUIYBCZ.js.map +1 -0
  35. package/dist/chunk-QROUNVQK.js +450 -0
  36. package/dist/chunk-QROUNVQK.js.map +1 -0
  37. package/dist/chunk-T6FR37IC.js +41 -0
  38. package/dist/chunk-T6FR37IC.js.map +1 -0
  39. package/dist/chunk-TI44I654.cjs +265 -0
  40. package/dist/chunk-TI44I654.cjs.map +1 -0
  41. package/dist/chunk-TXPLBAH5.cjs +47 -0
  42. package/dist/chunk-TXPLBAH5.cjs.map +1 -0
  43. package/dist/chunk-U3O54IYI.cjs +187 -0
  44. package/dist/chunk-U3O54IYI.cjs.map +1 -0
  45. package/dist/chunk-VLC7SZMT.js +1669 -0
  46. package/dist/chunk-VLC7SZMT.js.map +1 -0
  47. package/dist/core/index.cjs +232 -0
  48. package/dist/core/index.cjs.map +1 -0
  49. package/dist/core/index.d.cts +122 -0
  50. package/dist/core/index.d.ts +122 -0
  51. package/dist/core/index.js +7 -0
  52. package/dist/core/index.js.map +1 -0
  53. package/dist/defaults-EQD5QKCU.js +4 -0
  54. package/dist/defaults-EQD5QKCU.js.map +1 -0
  55. package/dist/defaults-MLYXD2BG.cjs +49 -0
  56. package/dist/defaults-MLYXD2BG.cjs.map +1 -0
  57. package/dist/docx-BUrf4PFj.d.ts +49 -0
  58. package/dist/docx-DLfSdvXm.d.cts +49 -0
  59. package/dist/docx-LDETXV3L.js +5 -0
  60. package/dist/docx-LDETXV3L.js.map +1 -0
  61. package/dist/docx-N2LKIOK3.cjs +14 -0
  62. package/dist/docx-N2LKIOK3.cjs.map +1 -0
  63. package/dist/export/index.cjs +54 -0
  64. package/dist/export/index.cjs.map +1 -0
  65. package/dist/export/index.d.cts +60 -0
  66. package/dist/export/index.d.ts +60 -0
  67. package/dist/export/index.js +9 -0
  68. package/dist/export/index.js.map +1 -0
  69. package/dist/html-5BXJPQU3.js +7 -0
  70. package/dist/html-5BXJPQU3.js.map +1 -0
  71. package/dist/html-KU2KHLRF.cjs +24 -0
  72. package/dist/html-KU2KHLRF.cjs.map +1 -0
  73. package/dist/import/index.cjs +15 -0
  74. package/dist/import/index.cjs.map +1 -0
  75. package/dist/import/index.d.cts +37 -0
  76. package/dist/import/index.d.ts +37 -0
  77. package/dist/import/index.js +6 -0
  78. package/dist/import/index.js.map +1 -0
  79. package/dist/index.cjs +1035 -0
  80. package/dist/index.cjs.map +1 -0
  81. package/dist/index.d.cts +248 -0
  82. package/dist/index.d.ts +248 -0
  83. package/dist/index.js +885 -0
  84. package/dist/index.js.map +1 -0
  85. package/dist/persistence/index.cjs +37 -0
  86. package/dist/persistence/index.cjs.map +1 -0
  87. package/dist/persistence/index.d.cts +279 -0
  88. package/dist/persistence/index.d.ts +279 -0
  89. package/dist/persistence/index.js +4 -0
  90. package/dist/persistence/index.js.map +1 -0
  91. package/dist/sanitize-7IZ-SW1f.d.ts +361 -0
  92. package/dist/sanitize-CvmgqbsA.d.cts +361 -0
  93. package/dist/server/index.cjs +400 -0
  94. package/dist/server/index.cjs.map +1 -0
  95. package/dist/server/index.d.cts +229 -0
  96. package/dist/server/index.d.ts +229 -0
  97. package/dist/server/index.js +390 -0
  98. package/dist/server/index.js.map +1 -0
  99. package/dist/styles.css +680 -0
  100. package/dist/types-B4z0Quvv.d.cts +193 -0
  101. package/dist/types-B4z0Quvv.d.ts +193 -0
  102. package/package.json +183 -0
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Public configuration types for the editor.
3
+ *
4
+ * The entire editor is driven by a single, documented configuration object
5
+ * (F-10.1). Every field is optional; sensible defaults are applied by
6
+ * {@link resolveConfig}. Feature flags (F-10.2), page setup, theming (F-10.5),
7
+ * localized strings (F-10.8) and injectable adapters (F-10.12) are all expressed
8
+ * here so an integration can enable only what it needs without forking.
9
+ */
10
+ /** ProseMirror document JSON. Kept structural so consumers don't import PM types. */
11
+ type DocumentJSON = {
12
+ type: string;
13
+ content?: DocumentJSON[];
14
+ attrs?: Record<string, unknown>;
15
+ marks?: Array<{
16
+ type: string;
17
+ attrs?: Record<string, unknown>;
18
+ }>;
19
+ text?: string;
20
+ };
21
+ /** The editing surface mode (F-10.3). `comment`/`suggest` are reserved for future use. */
22
+ type EditorMode = 'edit' | 'readonly';
23
+ /**
24
+ * Individually toggleable features (F-10.2). Omitted flags fall back to
25
+ * {@link DEFAULT_FEATURES}. Disabling a feature removes its schema nodes/marks,
26
+ * commands, input rules and toolbar items together.
27
+ */
28
+ interface FeatureFlags {
29
+ bold: boolean;
30
+ italic: boolean;
31
+ underline: boolean;
32
+ strikethrough: boolean;
33
+ superscript: boolean;
34
+ subscript: boolean;
35
+ code: boolean;
36
+ fontFamily: boolean;
37
+ fontSize: boolean;
38
+ textColor: boolean;
39
+ highlight: boolean;
40
+ clearFormatting: boolean;
41
+ headings: boolean;
42
+ alignment: boolean;
43
+ lineSpacing: boolean;
44
+ indentation: boolean;
45
+ bulletList: boolean;
46
+ orderedList: boolean;
47
+ taskList: boolean;
48
+ blockquote: boolean;
49
+ horizontalRule: boolean;
50
+ table: boolean;
51
+ image: boolean;
52
+ link: boolean;
53
+ pageBreak: boolean;
54
+ history: boolean;
55
+ wordCount: boolean;
56
+ docxImport: boolean;
57
+ }
58
+ /** Standard page sizes plus a custom escape hatch. */
59
+ type PageSize = 'A4' | 'Letter' | 'Legal' | 'A5' | 'custom';
60
+ /** Page geometry, in millimetres unless `size` is `custom` with explicit dimensions. */
61
+ interface PageConfig {
62
+ size: PageSize;
63
+ /** Used only when `size === 'custom'`. Width in mm. */
64
+ widthMm?: number;
65
+ /** Used only when `size === 'custom'`. Height in mm. */
66
+ heightMm?: number;
67
+ orientation: 'portrait' | 'landscape';
68
+ margins: {
69
+ top: number;
70
+ right: number;
71
+ bottom: number;
72
+ left: number;
73
+ };
74
+ /** Show the page as a white sheet on a canvas background (single-flow model). */
75
+ showPageChrome: boolean;
76
+ /**
77
+ * Pagination model (§10.1). `'none'` (default) is the document-styled single
78
+ * flow; `'visual'` splits content across discrete on-screen page sheets with
79
+ * repeating headers/footers and live page numbers (F-5.3–F-5.5).
80
+ */
81
+ pagination?: 'none' | 'visual';
82
+ /** Repeating page header (visual pagination only). */
83
+ header?: PageRunningElement;
84
+ /** Repeating page footer (visual pagination only). */
85
+ footer?: PageFooterElement;
86
+ }
87
+ /** A repeating page header/footer element (visual pagination). */
88
+ interface PageRunningElement {
89
+ show?: boolean;
90
+ /** Static text; `{page}` and `{pages}` are replaced with the live numbers. */
91
+ text?: string;
92
+ align?: 'left' | 'center' | 'right';
93
+ }
94
+ /** A repeating page footer, optionally showing automatic page numbers (F-5.5). */
95
+ interface PageFooterElement extends PageRunningElement {
96
+ /** Show "Page X of Y" automatically when no explicit `text` is given. */
97
+ pageNumbers?: boolean;
98
+ }
99
+ /**
100
+ * Design tokens exposed as CSS custom properties (F-10.5). Any subset can be
101
+ * supplied; unspecified tokens inherit the stylesheet defaults. Consumers theme
102
+ * the editor without editing component source.
103
+ */
104
+ interface ThemeTokens {
105
+ fontFamily?: string;
106
+ fontSize?: string;
107
+ textColor?: string;
108
+ background?: string;
109
+ canvasBackground?: string;
110
+ pageBackground?: string;
111
+ accent?: string;
112
+ toolbarBackground?: string;
113
+ toolbarColor?: string;
114
+ toolbarActiveBackground?: string;
115
+ borderColor?: string;
116
+ borderRadius?: string;
117
+ selectionColor?: string;
118
+ }
119
+ /** Built-in toolbar item identifiers. Consumers may also register custom items. */
120
+ type ToolbarItemId = 'undo' | 'redo' | 'separator' | 'paragraphStyle' | 'fontFamily' | 'fontSize' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'superscript' | 'subscript' | 'code' | 'textColor' | 'highlight' | 'clearFormatting' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'bulletList' | 'orderedList' | 'taskList' | 'indent' | 'outdent' | 'blockquote' | 'horizontalRule' | 'link' | 'image' | 'table' | 'pageBreak' | 'importDocx';
121
+ /**
122
+ * Toolbar configuration (F-10.6). `groups` defines ordered groups of item ids;
123
+ * built-in items can be reordered, removed, or replaced and custom items added.
124
+ */
125
+ interface ToolbarConfig {
126
+ /** When false the toolbar is not rendered at all. */
127
+ enabled?: boolean;
128
+ /**
129
+ * Ordered groups of toolbar items. Each entry is an array of item ids; groups
130
+ * are visually separated. If omitted, a sensible default layout is used,
131
+ * filtered by the enabled {@link FeatureFlags}.
132
+ */
133
+ groups?: ToolbarItemId[][];
134
+ /** Sticky-position the toolbar at the top of the editor. Default true. */
135
+ sticky?: boolean;
136
+ }
137
+ /** Injectable, localizable UI strings (F-10.8, NF-6). */
138
+ interface EditorStrings {
139
+ bold: string;
140
+ italic: string;
141
+ underline: string;
142
+ strikethrough: string;
143
+ superscript: string;
144
+ subscript: string;
145
+ code: string;
146
+ textColor: string;
147
+ highlight: string;
148
+ clearFormatting: string;
149
+ fontFamily: string;
150
+ fontSize: string;
151
+ paragraphStyle: string;
152
+ paragraph: string;
153
+ heading: string;
154
+ alignLeft: string;
155
+ alignCenter: string;
156
+ alignRight: string;
157
+ alignJustify: string;
158
+ bulletList: string;
159
+ orderedList: string;
160
+ taskList: string;
161
+ indent: string;
162
+ outdent: string;
163
+ blockquote: string;
164
+ horizontalRule: string;
165
+ link: string;
166
+ linkPrompt: string;
167
+ removeLink: string;
168
+ image: string;
169
+ imagePrompt: string;
170
+ imageAltPrompt: string;
171
+ table: string;
172
+ insertTable: string;
173
+ addRowBefore: string;
174
+ addRowAfter: string;
175
+ deleteRow: string;
176
+ addColumnBefore: string;
177
+ addColumnAfter: string;
178
+ deleteColumn: string;
179
+ mergeCells: string;
180
+ splitCell: string;
181
+ deleteTable: string;
182
+ pageBreak: string;
183
+ importDocx: string;
184
+ undo: string;
185
+ redo: string;
186
+ words: string;
187
+ characters: string;
188
+ readOnly: string;
189
+ }
190
+ /** Sync/save status surfaced to the host (F-9.4, NF-10). */
191
+ type SaveStatus = 'idle' | 'savingLocal' | 'savedLocal' | 'syncing' | 'synced' | 'syncFailed' | 'offline';
192
+
193
+ export type { DocumentJSON as D, EditorMode as E, FeatureFlags as F, PageConfig as P, SaveStatus as S, ThemeTokens as T, EditorStrings as a, PageSize as b, ToolbarConfig as c, ToolbarItemId as d, PageFooterElement as e, PageRunningElement as f };
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Public configuration types for the editor.
3
+ *
4
+ * The entire editor is driven by a single, documented configuration object
5
+ * (F-10.1). Every field is optional; sensible defaults are applied by
6
+ * {@link resolveConfig}. Feature flags (F-10.2), page setup, theming (F-10.5),
7
+ * localized strings (F-10.8) and injectable adapters (F-10.12) are all expressed
8
+ * here so an integration can enable only what it needs without forking.
9
+ */
10
+ /** ProseMirror document JSON. Kept structural so consumers don't import PM types. */
11
+ type DocumentJSON = {
12
+ type: string;
13
+ content?: DocumentJSON[];
14
+ attrs?: Record<string, unknown>;
15
+ marks?: Array<{
16
+ type: string;
17
+ attrs?: Record<string, unknown>;
18
+ }>;
19
+ text?: string;
20
+ };
21
+ /** The editing surface mode (F-10.3). `comment`/`suggest` are reserved for future use. */
22
+ type EditorMode = 'edit' | 'readonly';
23
+ /**
24
+ * Individually toggleable features (F-10.2). Omitted flags fall back to
25
+ * {@link DEFAULT_FEATURES}. Disabling a feature removes its schema nodes/marks,
26
+ * commands, input rules and toolbar items together.
27
+ */
28
+ interface FeatureFlags {
29
+ bold: boolean;
30
+ italic: boolean;
31
+ underline: boolean;
32
+ strikethrough: boolean;
33
+ superscript: boolean;
34
+ subscript: boolean;
35
+ code: boolean;
36
+ fontFamily: boolean;
37
+ fontSize: boolean;
38
+ textColor: boolean;
39
+ highlight: boolean;
40
+ clearFormatting: boolean;
41
+ headings: boolean;
42
+ alignment: boolean;
43
+ lineSpacing: boolean;
44
+ indentation: boolean;
45
+ bulletList: boolean;
46
+ orderedList: boolean;
47
+ taskList: boolean;
48
+ blockquote: boolean;
49
+ horizontalRule: boolean;
50
+ table: boolean;
51
+ image: boolean;
52
+ link: boolean;
53
+ pageBreak: boolean;
54
+ history: boolean;
55
+ wordCount: boolean;
56
+ docxImport: boolean;
57
+ }
58
+ /** Standard page sizes plus a custom escape hatch. */
59
+ type PageSize = 'A4' | 'Letter' | 'Legal' | 'A5' | 'custom';
60
+ /** Page geometry, in millimetres unless `size` is `custom` with explicit dimensions. */
61
+ interface PageConfig {
62
+ size: PageSize;
63
+ /** Used only when `size === 'custom'`. Width in mm. */
64
+ widthMm?: number;
65
+ /** Used only when `size === 'custom'`. Height in mm. */
66
+ heightMm?: number;
67
+ orientation: 'portrait' | 'landscape';
68
+ margins: {
69
+ top: number;
70
+ right: number;
71
+ bottom: number;
72
+ left: number;
73
+ };
74
+ /** Show the page as a white sheet on a canvas background (single-flow model). */
75
+ showPageChrome: boolean;
76
+ /**
77
+ * Pagination model (§10.1). `'none'` (default) is the document-styled single
78
+ * flow; `'visual'` splits content across discrete on-screen page sheets with
79
+ * repeating headers/footers and live page numbers (F-5.3–F-5.5).
80
+ */
81
+ pagination?: 'none' | 'visual';
82
+ /** Repeating page header (visual pagination only). */
83
+ header?: PageRunningElement;
84
+ /** Repeating page footer (visual pagination only). */
85
+ footer?: PageFooterElement;
86
+ }
87
+ /** A repeating page header/footer element (visual pagination). */
88
+ interface PageRunningElement {
89
+ show?: boolean;
90
+ /** Static text; `{page}` and `{pages}` are replaced with the live numbers. */
91
+ text?: string;
92
+ align?: 'left' | 'center' | 'right';
93
+ }
94
+ /** A repeating page footer, optionally showing automatic page numbers (F-5.5). */
95
+ interface PageFooterElement extends PageRunningElement {
96
+ /** Show "Page X of Y" automatically when no explicit `text` is given. */
97
+ pageNumbers?: boolean;
98
+ }
99
+ /**
100
+ * Design tokens exposed as CSS custom properties (F-10.5). Any subset can be
101
+ * supplied; unspecified tokens inherit the stylesheet defaults. Consumers theme
102
+ * the editor without editing component source.
103
+ */
104
+ interface ThemeTokens {
105
+ fontFamily?: string;
106
+ fontSize?: string;
107
+ textColor?: string;
108
+ background?: string;
109
+ canvasBackground?: string;
110
+ pageBackground?: string;
111
+ accent?: string;
112
+ toolbarBackground?: string;
113
+ toolbarColor?: string;
114
+ toolbarActiveBackground?: string;
115
+ borderColor?: string;
116
+ borderRadius?: string;
117
+ selectionColor?: string;
118
+ }
119
+ /** Built-in toolbar item identifiers. Consumers may also register custom items. */
120
+ type ToolbarItemId = 'undo' | 'redo' | 'separator' | 'paragraphStyle' | 'fontFamily' | 'fontSize' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'superscript' | 'subscript' | 'code' | 'textColor' | 'highlight' | 'clearFormatting' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'bulletList' | 'orderedList' | 'taskList' | 'indent' | 'outdent' | 'blockquote' | 'horizontalRule' | 'link' | 'image' | 'table' | 'pageBreak' | 'importDocx';
121
+ /**
122
+ * Toolbar configuration (F-10.6). `groups` defines ordered groups of item ids;
123
+ * built-in items can be reordered, removed, or replaced and custom items added.
124
+ */
125
+ interface ToolbarConfig {
126
+ /** When false the toolbar is not rendered at all. */
127
+ enabled?: boolean;
128
+ /**
129
+ * Ordered groups of toolbar items. Each entry is an array of item ids; groups
130
+ * are visually separated. If omitted, a sensible default layout is used,
131
+ * filtered by the enabled {@link FeatureFlags}.
132
+ */
133
+ groups?: ToolbarItemId[][];
134
+ /** Sticky-position the toolbar at the top of the editor. Default true. */
135
+ sticky?: boolean;
136
+ }
137
+ /** Injectable, localizable UI strings (F-10.8, NF-6). */
138
+ interface EditorStrings {
139
+ bold: string;
140
+ italic: string;
141
+ underline: string;
142
+ strikethrough: string;
143
+ superscript: string;
144
+ subscript: string;
145
+ code: string;
146
+ textColor: string;
147
+ highlight: string;
148
+ clearFormatting: string;
149
+ fontFamily: string;
150
+ fontSize: string;
151
+ paragraphStyle: string;
152
+ paragraph: string;
153
+ heading: string;
154
+ alignLeft: string;
155
+ alignCenter: string;
156
+ alignRight: string;
157
+ alignJustify: string;
158
+ bulletList: string;
159
+ orderedList: string;
160
+ taskList: string;
161
+ indent: string;
162
+ outdent: string;
163
+ blockquote: string;
164
+ horizontalRule: string;
165
+ link: string;
166
+ linkPrompt: string;
167
+ removeLink: string;
168
+ image: string;
169
+ imagePrompt: string;
170
+ imageAltPrompt: string;
171
+ table: string;
172
+ insertTable: string;
173
+ addRowBefore: string;
174
+ addRowAfter: string;
175
+ deleteRow: string;
176
+ addColumnBefore: string;
177
+ addColumnAfter: string;
178
+ deleteColumn: string;
179
+ mergeCells: string;
180
+ splitCell: string;
181
+ deleteTable: string;
182
+ pageBreak: string;
183
+ importDocx: string;
184
+ undo: string;
185
+ redo: string;
186
+ words: string;
187
+ characters: string;
188
+ readOnly: string;
189
+ }
190
+ /** Sync/save status surfaced to the host (F-9.4, NF-10). */
191
+ type SaveStatus = 'idle' | 'savingLocal' | 'savedLocal' | 'syncing' | 'synced' | 'syncFailed' | 'offline';
192
+
193
+ export type { DocumentJSON as D, EditorMode as E, FeatureFlags as F, PageConfig as P, SaveStatus as S, ThemeTokens as T, EditorStrings as a, PageSize as b, ToolbarConfig as c, ToolbarItemId as d, PageFooterElement as e, PageRunningElement as f };
package/package.json ADDED
@@ -0,0 +1,183 @@
1
+ {
2
+ "name": "react-next-editor-js",
3
+ "version": "0.1.0",
4
+ "description": "A comprehensive, performant, secure, configurable and pluggable Word-style rich document editor for React/Next.js, built directly on ProseMirror, with DOCX/PDF/text export and offline-first persistence.",
5
+ "license": "MIT",
6
+ "author": "stellarx57",
7
+ "homepage": "https://github.com/stellarx57/react-next-editor#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/stellarx57/react-next-editor.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/stellarx57/react-next-editor/issues"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": [
17
+ "*.css"
18
+ ],
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "main": "./dist/index.cjs",
25
+ "module": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "import": {
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist/index.js"
32
+ },
33
+ "require": {
34
+ "types": "./dist/index.d.cts",
35
+ "default": "./dist/index.cjs"
36
+ }
37
+ },
38
+ "./core": {
39
+ "import": {
40
+ "types": "./dist/core/index.d.ts",
41
+ "default": "./dist/core/index.js"
42
+ },
43
+ "require": {
44
+ "types": "./dist/core/index.d.cts",
45
+ "default": "./dist/core/index.cjs"
46
+ }
47
+ },
48
+ "./export": {
49
+ "import": {
50
+ "types": "./dist/export/index.d.ts",
51
+ "default": "./dist/export/index.js"
52
+ },
53
+ "require": {
54
+ "types": "./dist/export/index.d.cts",
55
+ "default": "./dist/export/index.cjs"
56
+ }
57
+ },
58
+ "./persistence": {
59
+ "import": {
60
+ "types": "./dist/persistence/index.d.ts",
61
+ "default": "./dist/persistence/index.js"
62
+ },
63
+ "require": {
64
+ "types": "./dist/persistence/index.d.cts",
65
+ "default": "./dist/persistence/index.cjs"
66
+ }
67
+ },
68
+ "./server": {
69
+ "import": {
70
+ "types": "./dist/server/index.d.ts",
71
+ "default": "./dist/server/index.js"
72
+ },
73
+ "require": {
74
+ "types": "./dist/server/index.d.cts",
75
+ "default": "./dist/server/index.cjs"
76
+ }
77
+ },
78
+ "./import": {
79
+ "import": {
80
+ "types": "./dist/import/index.d.ts",
81
+ "default": "./dist/import/index.js"
82
+ },
83
+ "require": {
84
+ "types": "./dist/import/index.d.cts",
85
+ "default": "./dist/import/index.cjs"
86
+ }
87
+ },
88
+ "./styles.css": "./dist/styles.css",
89
+ "./package.json": "./package.json"
90
+ },
91
+ "scripts": {
92
+ "build": "tsup",
93
+ "dev": "tsup --watch",
94
+ "type-check": "tsc --noEmit",
95
+ "lint": "eslint \"src/**/*.{ts,tsx}\"",
96
+ "lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
97
+ "format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
98
+ "test": "vitest run",
99
+ "test:watch": "vitest",
100
+ "verify": "npm run type-check && npm run lint && npm run test",
101
+ "prepack": "npm run build",
102
+ "prepublishOnly": "npm run verify"
103
+ },
104
+ "publishConfig": {
105
+ "access": "public",
106
+ "provenance": false
107
+ },
108
+ "peerDependencies": {
109
+ "react": "^18.2.0 || ^19.0.0",
110
+ "react-dom": "^18.2.0 || ^19.0.0",
111
+ "docx": "^9.0.0",
112
+ "mammoth": "^1.0.0",
113
+ "playwright": "^1.0.0",
114
+ "puppeteer": "^22.0.0"
115
+ },
116
+ "peerDependenciesMeta": {
117
+ "docx": {
118
+ "optional": true
119
+ },
120
+ "mammoth": {
121
+ "optional": true
122
+ },
123
+ "playwright": {
124
+ "optional": true
125
+ },
126
+ "puppeteer": {
127
+ "optional": true
128
+ }
129
+ },
130
+ "dependencies": {
131
+ "dompurify": "^3.2.4",
132
+ "idb": "^8.0.2",
133
+ "prosemirror-commands": "^1.6.2",
134
+ "prosemirror-dropcursor": "^1.8.1",
135
+ "prosemirror-gapcursor": "^1.3.2",
136
+ "prosemirror-history": "^1.4.1",
137
+ "prosemirror-inputrules": "^1.4.0",
138
+ "prosemirror-keymap": "^1.2.2",
139
+ "prosemirror-model": "^1.24.1",
140
+ "prosemirror-schema-list": "^1.5.0",
141
+ "prosemirror-state": "^1.4.3",
142
+ "prosemirror-tables": "^1.6.4",
143
+ "prosemirror-transform": "^1.10.2",
144
+ "prosemirror-view": "^1.37.1"
145
+ },
146
+ "devDependencies": {
147
+ "@testing-library/dom": "^10.4.0",
148
+ "@testing-library/react": "^16.1.0",
149
+ "@types/dompurify": "^3.0.5",
150
+ "@types/node": "^22.10.2",
151
+ "@types/react": "^19.0.0",
152
+ "@types/react-dom": "^19.0.0",
153
+ "@typescript-eslint/eslint-plugin": "^8.18.0",
154
+ "@typescript-eslint/parser": "^8.18.0",
155
+ "docx": "^9.0.0",
156
+ "eslint": "^8.57.0",
157
+ "eslint-plugin-react": "^7.37.2",
158
+ "eslint-plugin-react-hooks": "^5.1.0",
159
+ "jsdom": "^25.0.1",
160
+ "mammoth": "^1.12.0",
161
+ "prettier": "^3.4.2",
162
+ "react": "^19.0.0",
163
+ "react-dom": "^19.0.0",
164
+ "tsup": "^8.3.5",
165
+ "typescript": "^5.7.2",
166
+ "vitest": "^2.1.8"
167
+ },
168
+ "engines": {
169
+ "node": ">=18.17.0"
170
+ },
171
+ "keywords": [
172
+ "prosemirror",
173
+ "editor",
174
+ "rich-text",
175
+ "word-processor",
176
+ "wysiwyg",
177
+ "docx",
178
+ "pdf",
179
+ "react",
180
+ "nextjs",
181
+ "offline-first"
182
+ ]
183
+ }