@forevka/wordcanvas 0.7.0 → 0.7.2
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/README.md +48 -1
- package/dist-lib/assets/{worker-BsOsK39A.js → worker-4HYrkNrG.js} +12276 -11981
- package/dist-lib/assets/worker-CJpwUzKh.js +2403 -0
- package/dist-lib/blockFactory-B_CLnkUh.js +106 -0
- package/dist-lib/browser-p_rkUcqE.js +1339 -0
- package/dist-lib/builder.js +365 -109
- package/dist-lib/editorApp-mTD0YNv-.js +9863 -0
- package/dist-lib/export.js +4670 -4567
- package/dist-lib/generate-toc.js +5 -5
- package/dist-lib/import.js +4 -1538
- package/dist-lib/{lists-BegzmTmD.js → lists-Sc5I40JO.js} +2 -2
- package/dist-lib/measure.js +2 -2
- package/dist-lib/{measureHost-CMiJKdlk.js → measureHost-B2aKX7lF.js} +1 -1
- package/dist-lib/metrics-BUMIC9Mv.js +164 -0
- package/dist-lib/pipeline-DD0nxAYM.js +1850 -0
- package/dist-lib/recalc-docx.js +2 -2
- package/dist-lib/recalcToc-CFCGCgij.js +3985 -0
- package/dist-lib/styleProps-DhqDEfvc.js +149 -0
- package/dist-lib/stylesheet-B6oczA-L.js +141 -0
- package/dist-lib/toc-Dj57zdz-.js +213 -0
- package/dist-lib/{webmcp-B7Gvd58E.js → webmcp-CXghUon_.js} +2 -2
- package/dist-lib/{wordcanvas-BAxBeErX.js → wordcanvas-D5DI9ZR1.js} +49 -23
- package/dist-lib/wordcanvas.js +1 -1
- package/dist-node/{chunk-GXFDF7UY.js → chunk-57L5XMCL.js} +327 -59
- package/dist-node/chunk-57L5XMCL.js.map +7 -0
- package/dist-node/{chunk-TBSXA2I4.js → chunk-EGSAVPCC.js} +1 -1
- package/dist-node/chunk-EGSAVPCC.js.map +7 -0
- package/dist-node/{chunk-4PDVRJF6.js → chunk-EMY2P524.js} +32 -2
- package/dist-node/chunk-EMY2P524.js.map +7 -0
- package/dist-node/{chunk-2RCPB7UZ.js → chunk-KJV7GJ3H.js} +1 -1
- package/dist-node/chunk-KJV7GJ3H.js.map +7 -0
- package/dist-node/{chunk-XDUDPPJW.js → chunk-PIMVQULL.js} +93 -24
- package/dist-node/chunk-PIMVQULL.js.map +7 -0
- package/dist-node/{chunk-BRAPV465.js → chunk-SA26UVIJ.js} +2 -2
- package/dist-node/{chunk-IJLL6IFJ.js → chunk-T3253N22.js} +202 -13
- package/dist-node/{chunk-IJLL6IFJ.js.map → chunk-T3253N22.js.map} +2 -2
- package/dist-node/{chunk-4ICCHZX4.js → chunk-U27EBKBG.js} +37 -1
- package/dist-node/chunk-U27EBKBG.js.map +7 -0
- package/dist-node/{engine-FRCX7PXF.js → engine-5F7DUU4W.js} +4 -4
- package/dist-node/export.js +178 -52
- package/dist-node/export.js.map +2 -2
- package/dist-node/generate-toc.js +7 -7
- package/dist-node/import.js +3 -3
- package/dist-node/measure.js +2 -2
- package/dist-node/recalc-docx.js +5 -5
- package/dist-node/recalc-docx.js.map +1 -1
- package/package.json +1 -1
- package/types/model.d.ts +277 -225
- package/types/recalc-docx.d.ts +27 -27
- package/types/wordcanvas.d.ts +212 -157
- package/dist-lib/assets/worker-BbFAIxdy.js +0 -2163
- package/dist-lib/blockFactory-Bcy0U40y.js +0 -178
- package/dist-lib/browser-5Sv4CuNy.js +0 -1284
- package/dist-lib/editorApp-DvjFPHiy.js +0 -7582
- package/dist-lib/metrics-CkAo4zh8.js +0 -143
- package/dist-lib/recalcToc-uaLWt59L.js +0 -3835
- package/dist-lib/styleProps-Db5pEkG8.js +0 -127
- package/dist-lib/toc-CZel_Kk3.js +0 -127
- package/dist-node/chunk-2RCPB7UZ.js.map +0 -7
- package/dist-node/chunk-4ICCHZX4.js.map +0 -7
- package/dist-node/chunk-4PDVRJF6.js.map +0 -7
- package/dist-node/chunk-GXFDF7UY.js.map +0 -7
- package/dist-node/chunk-TBSXA2I4.js.map +0 -7
- package/dist-node/chunk-XDUDPPJW.js.map +0 -7
- /package/dist-node/{chunk-BRAPV465.js.map → chunk-SA26UVIJ.js.map} +0 -0
- /package/dist-node/{engine-FRCX7PXF.js.map → engine-5F7DUU4W.js.map} +0 -0
|
@@ -6,20 +6,20 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
runImport
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-57L5XMCL.js";
|
|
10
10
|
import {
|
|
11
11
|
el,
|
|
12
12
|
escapeText,
|
|
13
13
|
paraCoreXml,
|
|
14
14
|
runPropsXml,
|
|
15
15
|
textEl
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EMY2P524.js";
|
|
17
17
|
import {
|
|
18
18
|
findMainDocumentPart
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KJV7GJ3H.js";
|
|
20
20
|
import {
|
|
21
21
|
pageOfBlockMap
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EGSAVPCC.js";
|
|
23
23
|
import {
|
|
24
24
|
strFromU8,
|
|
25
25
|
strToU8,
|
|
@@ -28,15 +28,15 @@ import {
|
|
|
28
28
|
} from "./chunk-5PUCGN47.js";
|
|
29
29
|
import {
|
|
30
30
|
createLayoutEngine
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-T3253N22.js";
|
|
32
32
|
import {
|
|
33
33
|
detectTocHeadings,
|
|
34
34
|
inRange,
|
|
35
35
|
parseTocInstruction,
|
|
36
36
|
textOfRuns,
|
|
37
37
|
tocEntryStyle
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-PIMVQULL.js";
|
|
39
|
+
import "./chunk-U27EBKBG.js";
|
|
40
40
|
import "./chunk-XSRSBST2.js";
|
|
41
41
|
|
|
42
42
|
// src/recalc/generateTocDocx.ts
|
package/dist-node/import.js
CHANGED
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
runImport
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-57L5XMCL.js";
|
|
10
|
+
import "./chunk-KJV7GJ3H.js";
|
|
11
11
|
import "./chunk-5PUCGN47.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-PIMVQULL.js";
|
|
13
13
|
import "./chunk-XSRSBST2.js";
|
|
14
14
|
export {
|
|
15
15
|
runImport
|
package/dist-node/measure.js
CHANGED
|
@@ -6,8 +6,8 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
installMeasureHost
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-SA26UVIJ.js";
|
|
10
|
+
import "./chunk-U27EBKBG.js";
|
|
11
11
|
import "./chunk-XSRSBST2.js";
|
|
12
12
|
export {
|
|
13
13
|
installMeasureHost
|
package/dist-node/recalc-docx.js
CHANGED
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
findMainDocumentPart
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KJV7GJ3H.js";
|
|
10
10
|
import {
|
|
11
11
|
pageOfBlockMap
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EGSAVPCC.js";
|
|
13
13
|
import {
|
|
14
14
|
strFromU8,
|
|
15
15
|
strToU8,
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
} from "./chunk-5PUCGN47.js";
|
|
19
19
|
import {
|
|
20
20
|
createLayoutEngine
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-T3253N22.js";
|
|
22
|
+
import "./chunk-PIMVQULL.js";
|
|
23
|
+
import "./chunk-U27EBKBG.js";
|
|
24
24
|
import "./chunk-XSRSBST2.js";
|
|
25
25
|
|
|
26
26
|
// src/recalc/patchTocDocx.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/recalc/patchTocDocx.ts"],
|
|
4
|
-
"sourcesContent": ["// Patch a .docx's TOC page numbers IN PLACE \u2014 the faithful path for fixing an\n// externally-authored document (e.g. a C# render pipeline that emits a real Word\n// TOC field but can't compute page numbers). We import only to RUN THE LAYOUT and\n// learn each heading's page; we then surgically rewrite the cached PAGEREF result\n// digits in the ORIGINAL document.xml and re-zip. Everything else \u2014 the live TOC\n// field, PAGEREF/HYPERLINK fields, footer PAGE/NUMPAGES, styles, and any OOXML our\n// model doesn't represent \u2014 survives byte-for-byte. Because we never regenerate the\n// file through the export writer, there is no import\u2194export pagination drift.\n//\n// Limitation (documented, intentional): only arabic (\\d+) cached page numbers are\n// recalculated. A roman/alpha cached value is left untouched and counted in\n// `skipped` rather than being overwritten with a wrong arabic number.\n\nimport { strFromU8, strToU8, unzipSync, zipSync, type Unzipped } from \"fflate\";\nimport type { Document } from \"@cw/shared\";\nimport { findMainDocumentPart } from \"../import/docx/contentTypes\";\nimport { createLayoutEngine } from \"../layout/engine\";\nimport type { LayoutTree } from \"../layout/layoutTree\";\nimport { pageOfBlockMap } from \"./recalcToc\";\n\n/** bookmark name \u2192 displayed page number (as a string) of the block it starts at.\n * The PAGEREF instruction in the XML references the same bookmark name, so this is\n * how the layout's per-block page maps onto the document's fields. */\nexport function pageByBookmark(doc: Document, tree: LayoutTree): Record<string, string> {\n const pageOfBlock = pageOfBlockMap(tree);\n const out: Record<string, string> = {};\n for (const [name, range] of Object.entries(doc.bookmarks ?? {})) {\n const page = pageOfBlock.get(range.start.blockId);\n if (page !== undefined) out[name] = String(page);\n }\n return out;\n}\n\nexport interface PatchResult {\n bytes: Uint8Array;\n /** PAGEREF cached numbers rewritten to a new value. */\n changed: number;\n /** PAGEREF results left untouched because the cached value was non-arabic. */\n skipped: number;\n}\n\nconst PAGEREF_RE = /\\bPAGEREF\\s+(\"[^\"]+\"|\\S+)/;\n\n// fldChar (begin|separate|end) | instrText(content) | w:t(open)(content)(close)\nconst TOKEN_RE =\n /<w:fldChar\\b[^>]*?w:fldCharType=\"(begin|separate|end)\"[^>]*?\\/?>|<w:instrText\\b[^>]*?>([\\s\\S]*?)<\\/w:instrText>|(<w:t\\b[^>]*?>)([\\s\\S]*?)(<\\/w:t>)/g;\n\ninterface Frame {\n instr: string;\n anchor?: string; // set when the field is a PAGEREF\n sawSeparate: boolean;\n done: boolean; // first result run handled\n replaced: boolean; // we rewrote the number \u2192 blank any split remainder\n}\n\n/** Rewrite cached PAGEREF result digits in one document-part XML string. */\nfunction patchXml(xml: string, pages: Record<string, string>): { xml: string; changed: number; skipped: number } {\n const stack: Frame[] = [];\n let out = \"\";\n let cursor = 0;\n let changed = 0;\n let skipped = 0;\n TOKEN_RE.lastIndex = 0;\n let m: RegExpExecArray | null;\n while ((m = TOKEN_RE.exec(xml)) !== null) {\n const top = stack[stack.length - 1];\n let replacement: string | null = null; // non-null \u2192 replace this match's slice\n\n if (m[1] !== undefined) {\n // w:fldChar\n if (m[1] === \"begin\") stack.push({ instr: \"\", sawSeparate: false, done: false, replaced: false });\n else if (m[1] === \"separate\") {\n if (top) top.sawSeparate = true;\n } else stack.pop(); // \"end\"\n } else if (m[2] !== undefined) {\n // w:instrText\n if (top) {\n top.instr += m[2];\n const pm = top.instr.match(PAGEREF_RE);\n if (pm) top.anchor = pm[1]!.replace(/^\"|\"$/g, \"\");\n }\n } else {\n // w:t \u2014 group 3 open, 4 content, 5 close\n if (top?.anchor && top.sawSeparate) {\n if (!top.done) {\n top.done = true;\n const num = pages[top.anchor];\n if (num !== undefined && /^\\d+$/.test(m[4]!)) {\n if (m[4] !== num) {\n replacement = m[3]! + num + m[5]!;\n changed++;\n top.replaced = true;\n }\n } else if (num !== undefined && !/^\\d+$/.test(m[4]!.trim()) && m[4]!.trim().length > 0) {\n skipped++; // non-arabic cached value \u2014 leave it (unsupported)\n }\n } else if (top.replaced && m[4] !== \"\") {\n // Split number (\"1\",\"2\"): the full value went into the first run; blank the rest.\n replacement = m[3]! + m[5]!;\n }\n }\n }\n\n if (replacement !== null) {\n out += xml.slice(cursor, m.index) + replacement;\n cursor = m.index + m[0].length;\n }\n }\n out += xml.slice(cursor);\n return { xml: out, changed, skipped };\n}\n\n/** Patch the cached TOC/cross-reference page numbers in a .docx, preserving every\n * field and every other part. `pages` maps bookmark name \u2192 new page number. */\nexport function patchTocPageNumbers(docxBytes: Uint8Array, pages: Record<string, string>): PatchResult {\n const parts: Unzipped = unzipSync(docxBytes);\n const ctXml = parts[\"[Content_Types].xml\"];\n const mainPart =\n (ctXml ? findMainDocumentPart(strFromU8(ctXml)) : undefined) ?? \"word/document.xml\";\n const docPart = parts[mainPart];\n if (!docPart) return { bytes: docxBytes, changed: 0, skipped: 0 };\n\n const { xml, changed, skipped } = patchXml(strFromU8(docPart), pages);\n if (changed === 0) return { bytes: docxBytes, changed: 0, skipped };\n\n parts[mainPart] = strToU8(xml);\n return { bytes: zipSync(parts), changed, skipped };\n}\n\n/** Convenience: lay the doc out and patch the original bytes from it. The caller\n * MUST have awaited installMeasureHost() first (layout measures text). */\nexport function patchTocFromLayout(docxBytes: Uint8Array, doc: Document): PatchResult {\n const tree = createLayoutEngine().layout(doc);\n return patchTocPageNumbers(docxBytes, pageByBookmark(doc, tree));\n}\n"],
|
|
4
|
+
"sourcesContent": ["// Patch a .docx's TOC page numbers IN PLACE \u2014 the faithful path for fixing an\r\n// externally-authored document (e.g. a C# render pipeline that emits a real Word\r\n// TOC field but can't compute page numbers). We import only to RUN THE LAYOUT and\r\n// learn each heading's page; we then surgically rewrite the cached PAGEREF result\r\n// digits in the ORIGINAL document.xml and re-zip. Everything else \u2014 the live TOC\r\n// field, PAGEREF/HYPERLINK fields, footer PAGE/NUMPAGES, styles, and any OOXML our\r\n// model doesn't represent \u2014 survives byte-for-byte. Because we never regenerate the\r\n// file through the export writer, there is no import\u2194export pagination drift.\r\n//\r\n// Limitation (documented, intentional): only arabic (\\d+) cached page numbers are\r\n// recalculated. A roman/alpha cached value is left untouched and counted in\r\n// `skipped` rather than being overwritten with a wrong arabic number.\r\n\r\nimport { strFromU8, strToU8, unzipSync, zipSync, type Unzipped } from \"fflate\";\r\nimport type { Document } from \"@cw/shared\";\r\nimport { findMainDocumentPart } from \"../import/docx/contentTypes\";\r\nimport { createLayoutEngine } from \"../layout/engine\";\r\nimport type { LayoutTree } from \"../layout/layoutTree\";\r\nimport { pageOfBlockMap } from \"./recalcToc\";\r\n\r\n/** bookmark name \u2192 displayed page number (as a string) of the block it starts at.\r\n * The PAGEREF instruction in the XML references the same bookmark name, so this is\r\n * how the layout's per-block page maps onto the document's fields. */\r\nexport function pageByBookmark(doc: Document, tree: LayoutTree): Record<string, string> {\r\n const pageOfBlock = pageOfBlockMap(tree);\r\n const out: Record<string, string> = {};\r\n for (const [name, range] of Object.entries(doc.bookmarks ?? {})) {\r\n const page = pageOfBlock.get(range.start.blockId);\r\n if (page !== undefined) out[name] = String(page);\r\n }\r\n return out;\r\n}\r\n\r\nexport interface PatchResult {\r\n bytes: Uint8Array;\r\n /** PAGEREF cached numbers rewritten to a new value. */\r\n changed: number;\r\n /** PAGEREF results left untouched because the cached value was non-arabic. */\r\n skipped: number;\r\n}\r\n\r\nconst PAGEREF_RE = /\\bPAGEREF\\s+(\"[^\"]+\"|\\S+)/;\r\n\r\n// fldChar (begin|separate|end) | instrText(content) | w:t(open)(content)(close)\r\nconst TOKEN_RE =\r\n /<w:fldChar\\b[^>]*?w:fldCharType=\"(begin|separate|end)\"[^>]*?\\/?>|<w:instrText\\b[^>]*?>([\\s\\S]*?)<\\/w:instrText>|(<w:t\\b[^>]*?>)([\\s\\S]*?)(<\\/w:t>)/g;\r\n\r\ninterface Frame {\r\n instr: string;\r\n anchor?: string; // set when the field is a PAGEREF\r\n sawSeparate: boolean;\r\n done: boolean; // first result run handled\r\n replaced: boolean; // we rewrote the number \u2192 blank any split remainder\r\n}\r\n\r\n/** Rewrite cached PAGEREF result digits in one document-part XML string. */\r\nfunction patchXml(xml: string, pages: Record<string, string>): { xml: string; changed: number; skipped: number } {\r\n const stack: Frame[] = [];\r\n let out = \"\";\r\n let cursor = 0;\r\n let changed = 0;\r\n let skipped = 0;\r\n TOKEN_RE.lastIndex = 0;\r\n let m: RegExpExecArray | null;\r\n while ((m = TOKEN_RE.exec(xml)) !== null) {\r\n const top = stack[stack.length - 1];\r\n let replacement: string | null = null; // non-null \u2192 replace this match's slice\r\n\r\n if (m[1] !== undefined) {\r\n // w:fldChar\r\n if (m[1] === \"begin\") stack.push({ instr: \"\", sawSeparate: false, done: false, replaced: false });\r\n else if (m[1] === \"separate\") {\r\n if (top) top.sawSeparate = true;\r\n } else stack.pop(); // \"end\"\r\n } else if (m[2] !== undefined) {\r\n // w:instrText\r\n if (top) {\r\n top.instr += m[2];\r\n const pm = top.instr.match(PAGEREF_RE);\r\n if (pm) top.anchor = pm[1]!.replace(/^\"|\"$/g, \"\");\r\n }\r\n } else {\r\n // w:t \u2014 group 3 open, 4 content, 5 close\r\n if (top?.anchor && top.sawSeparate) {\r\n if (!top.done) {\r\n top.done = true;\r\n const num = pages[top.anchor];\r\n if (num !== undefined && /^\\d+$/.test(m[4]!)) {\r\n if (m[4] !== num) {\r\n replacement = m[3]! + num + m[5]!;\r\n changed++;\r\n top.replaced = true;\r\n }\r\n } else if (num !== undefined && !/^\\d+$/.test(m[4]!.trim()) && m[4]!.trim().length > 0) {\r\n skipped++; // non-arabic cached value \u2014 leave it (unsupported)\r\n }\r\n } else if (top.replaced && m[4] !== \"\") {\r\n // Split number (\"1\",\"2\"): the full value went into the first run; blank the rest.\r\n replacement = m[3]! + m[5]!;\r\n }\r\n }\r\n }\r\n\r\n if (replacement !== null) {\r\n out += xml.slice(cursor, m.index) + replacement;\r\n cursor = m.index + m[0].length;\r\n }\r\n }\r\n out += xml.slice(cursor);\r\n return { xml: out, changed, skipped };\r\n}\r\n\r\n/** Patch the cached TOC/cross-reference page numbers in a .docx, preserving every\r\n * field and every other part. `pages` maps bookmark name \u2192 new page number. */\r\nexport function patchTocPageNumbers(docxBytes: Uint8Array, pages: Record<string, string>): PatchResult {\r\n const parts: Unzipped = unzipSync(docxBytes);\r\n const ctXml = parts[\"[Content_Types].xml\"];\r\n const mainPart =\r\n (ctXml ? findMainDocumentPart(strFromU8(ctXml)) : undefined) ?? \"word/document.xml\";\r\n const docPart = parts[mainPart];\r\n if (!docPart) return { bytes: docxBytes, changed: 0, skipped: 0 };\r\n\r\n const { xml, changed, skipped } = patchXml(strFromU8(docPart), pages);\r\n if (changed === 0) return { bytes: docxBytes, changed: 0, skipped };\r\n\r\n parts[mainPart] = strToU8(xml);\r\n return { bytes: zipSync(parts), changed, skipped };\r\n}\r\n\r\n/** Convenience: lay the doc out and patch the original bytes from it. The caller\r\n * MUST have awaited installMeasureHost() first (layout measures text). */\r\nexport function patchTocFromLayout(docxBytes: Uint8Array, doc: Document): PatchResult {\r\n const tree = createLayoutEngine().layout(doc);\r\n return patchTocPageNumbers(docxBytes, pageByBookmark(doc, tree));\r\n}\r\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forevka/wordcanvas",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Open-source embeddable Word-style document editor: canvas-rendered, with live collaboration, track changes & comments, and DOCX/PDF import & export. A lightweight alternative to Syncfusion, OnlyOffice, and DevExpress document editors. Self-contained, zero runtime dependencies.",
|
|
6
6
|
"license": "MIT",
|