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,24 @@
1
+ 'use strict';
2
+
3
+ var chunkTI44I654_cjs = require('./chunk-TI44I654.cjs');
4
+ require('./chunk-TXPLBAH5.cjs');
5
+ require('./chunk-5F6SPYCN.cjs');
6
+ require('./chunk-U3O54IYI.cjs');
7
+ require('./chunk-Q7SFCCGT.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "buildPrintDocument", {
12
+ enumerable: true,
13
+ get: function () { return chunkTI44I654_cjs.buildPrintDocument; }
14
+ });
15
+ Object.defineProperty(exports, "documentToHtml", {
16
+ enumerable: true,
17
+ get: function () { return chunkTI44I654_cjs.documentToHtml; }
18
+ });
19
+ Object.defineProperty(exports, "printStylesheet", {
20
+ enumerable: true,
21
+ get: function () { return chunkTI44I654_cjs.printStylesheet; }
22
+ });
23
+ //# sourceMappingURL=html-KU2KHLRF.cjs.map
24
+ //# sourceMappingURL=html-KU2KHLRF.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"html-KU2KHLRF.cjs"}
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ require('../chunk-EFE6RHDL.cjs');
4
+ var chunkODHABIIC_cjs = require('../chunk-ODHABIIC.cjs');
5
+ require('../chunk-5F6SPYCN.cjs');
6
+ require('../chunk-Q7SFCCGT.cjs');
7
+
8
+
9
+
10
+ Object.defineProperty(exports, "importDocx", {
11
+ enumerable: true,
12
+ get: function () { return chunkODHABIIC_cjs.importDocx; }
13
+ });
14
+ //# sourceMappingURL=index.cjs.map
15
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,37 @@
1
+ import { Schema } from 'prosemirror-model';
2
+ import { D as DocumentJSON } from '../types-B4z0Quvv.cjs';
3
+
4
+ /**
5
+ * Best-effort DOCX import (F-7.2 / F-7.3). External `.docx` files are converted
6
+ * to HTML with `mammoth` (BSD), sanitized (§5.12), then parsed into the editor
7
+ * schema via ProseMirror's DOMParser. Fidelity is best-effort: supported
8
+ * structures (headings, lists, tables, bold/italic/underline, links, images)
9
+ * map across; unsupported Word constructs degrade gracefully. `mammoth` is an
10
+ * optional dependency, lazily imported, so it never bloats the editor bundle.
11
+ *
12
+ * Browser-oriented (needs a DOM to parse HTML). For server-side import, run in
13
+ * an environment that provides `document` (e.g. jsdom).
14
+ */
15
+ interface DocxImportResult {
16
+ /** The imported document as ProseMirror JSON. */
17
+ doc: DocumentJSON;
18
+ /** Non-fatal conversion warnings from mammoth (unsupported features, etc.). */
19
+ warnings: string[];
20
+ /** The sanitized intermediate HTML (useful for debugging/inspection). */
21
+ html: string;
22
+ }
23
+ interface DocxImportOptions {
24
+ /**
25
+ * Additional mammoth style mappings (e.g. `"p[style-name='Quote'] => blockquote"`).
26
+ * Merged with the built-in defaults.
27
+ */
28
+ styleMap?: string[];
29
+ }
30
+ /**
31
+ * Import a `.docx` file into the given schema. Returns the document JSON plus
32
+ * any conversion warnings. Never throws on unsupported content — only on a
33
+ * genuinely unreadable file or a missing DOM/mammoth.
34
+ */
35
+ declare function importDocx(input: ArrayBuffer | Uint8Array | Blob, schema: Schema, options?: DocxImportOptions): Promise<DocxImportResult>;
36
+
37
+ export { type DocxImportOptions, type DocxImportResult, importDocx };
@@ -0,0 +1,37 @@
1
+ import { Schema } from 'prosemirror-model';
2
+ import { D as DocumentJSON } from '../types-B4z0Quvv.js';
3
+
4
+ /**
5
+ * Best-effort DOCX import (F-7.2 / F-7.3). External `.docx` files are converted
6
+ * to HTML with `mammoth` (BSD), sanitized (§5.12), then parsed into the editor
7
+ * schema via ProseMirror's DOMParser. Fidelity is best-effort: supported
8
+ * structures (headings, lists, tables, bold/italic/underline, links, images)
9
+ * map across; unsupported Word constructs degrade gracefully. `mammoth` is an
10
+ * optional dependency, lazily imported, so it never bloats the editor bundle.
11
+ *
12
+ * Browser-oriented (needs a DOM to parse HTML). For server-side import, run in
13
+ * an environment that provides `document` (e.g. jsdom).
14
+ */
15
+ interface DocxImportResult {
16
+ /** The imported document as ProseMirror JSON. */
17
+ doc: DocumentJSON;
18
+ /** Non-fatal conversion warnings from mammoth (unsupported features, etc.). */
19
+ warnings: string[];
20
+ /** The sanitized intermediate HTML (useful for debugging/inspection). */
21
+ html: string;
22
+ }
23
+ interface DocxImportOptions {
24
+ /**
25
+ * Additional mammoth style mappings (e.g. `"p[style-name='Quote'] => blockquote"`).
26
+ * Merged with the built-in defaults.
27
+ */
28
+ styleMap?: string[];
29
+ }
30
+ /**
31
+ * Import a `.docx` file into the given schema. Returns the document JSON plus
32
+ * any conversion warnings. Never throws on unsupported content — only on a
33
+ * genuinely unreadable file or a missing DOM/mammoth.
34
+ */
35
+ declare function importDocx(input: ArrayBuffer | Uint8Array | Blob, schema: Schema, options?: DocxImportOptions): Promise<DocxImportResult>;
36
+
37
+ export { type DocxImportOptions, type DocxImportResult, importDocx };
@@ -0,0 +1,6 @@
1
+ import '../chunk-G6YRIEK4.js';
2
+ export { importDocx } from '../chunk-QIUIYBCZ.js';
3
+ import '../chunk-6NTSXJX4.js';
4
+ import '../chunk-PZ5AY32C.js';
5
+ //# sourceMappingURL=index.js.map
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}