js.documents 1.95.4 → 1.95.6
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 +12 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -602,12 +602,13 @@ Dependency direction among this package's own local modules is downward and chec
|
|
|
602
602
|
## Build, test, and lint
|
|
603
603
|
|
|
604
604
|
```sh
|
|
605
|
-
pnpm build # tsdown -> dist/ (ESM + CJS + .d.ts)
|
|
606
|
-
pnpm typecheck # tsc
|
|
607
|
-
pnpm lint # eslint . --fix --cache --max-warnings 0
|
|
608
|
-
pnpm test # vitest run --project unit
|
|
605
|
+
pnpm build # turbo run _build (tsdown -> dist/ (ESM + CJS + .d.ts))
|
|
606
|
+
pnpm typecheck # turbo run _typecheck _typecheck:node (tsc -p tsconfig.json for the web-only lib, then tsc -p tsconfig.node.json for the Node tsconfig)
|
|
607
|
+
pnpm lint # turbo run _lint (eslint . --fix --cache --max-warnings 0)
|
|
608
|
+
pnpm test # turbo run _test (vitest run --project unit)
|
|
609
|
+
pnpm test:workers # turbo run _test:workers (vitest run --config vitest.workers.config.ts -- exercises the library under the Cloudflare Workers runtime)
|
|
609
610
|
pnpm test:watch # vitest --project unit
|
|
610
|
-
pnpm test:smoke # rebuilds dist/, then verifies ESM/CJS parity, a real docxToPdf/pdfToDocx round trip, real odtToPdf/odpToPdf/odsToPdf/odgToPdf conversions (odgToPdf's own fixture carries a real curved path, proving writePath reaches the built dist/ bundle), a real createOdp/odpToPdf/pdfToOdp round trip, a real odsToPdf/pdfToOds round trip plus a separate createOds/printSettings/buildOdsPackage exercise, a real createOdg/odgToPdf/pdfToOdg round trip (a curved path, a filled rect, and text, built entirely through the odg live-view editor, converted to PDF and reconstructed back to odg via reconstructDrawing), a real odfToPdf conversion (a fraction, rendered via the embedded STIX Two Math font -- checked by confirming the built PDF contains a real /Type0/Identity-H/CIDFontType0C font resource, proving the base64-embedded font asset itself survived the tsdown build), a real odsToPdf conversion of a sheet carrying a cell-anchored formula (the same font-resource check, plus asserting convertSpreadsheetToLayout's own reported position lands at the anchor cell rather than the sheet's origin), a real markdownToPdf/pdfToMarkdown round trip plus a markdownToDocx bridge exercise, and real font resolution in docxToPdf (a Calibri run producing a genuine /Type0/Identity-H/CIDFontType2/FontFile2 Carlito font program, alongside an Arial control run that embeds nothing at all), from the built CJS bundle
|
|
611
|
+
pnpm test:smoke # turbo run _test:smoke (rebuilds dist/, then verifies ESM/CJS parity, a real docxToPdf/pdfToDocx round trip, real odtToPdf/odpToPdf/odsToPdf/odgToPdf conversions (odgToPdf's own fixture carries a real curved path, proving writePath reaches the built dist/ bundle), a real createOdp/odpToPdf/pdfToOdp round trip, a real odsToPdf/pdfToOds round trip plus a separate createOds/printSettings/buildOdsPackage exercise, a real createOdg/odgToPdf/pdfToOdg round trip (a curved path, a filled rect, and text, built entirely through the odg live-view editor, converted to PDF and reconstructed back to odg via reconstructDrawing), a real odfToPdf conversion (a fraction, rendered via the embedded STIX Two Math font -- checked by confirming the built PDF contains a real /Type0/Identity-H/CIDFontType0C font resource, proving the base64-embedded font asset itself survived the tsdown build), a real odsToPdf conversion of a sheet carrying a cell-anchored formula (the same font-resource check, plus asserting convertSpreadsheetToLayout's own reported position lands at the anchor cell rather than the sheet's origin), a real markdownToPdf/pdfToMarkdown round trip plus a markdownToDocx bridge exercise, and real font resolution in docxToPdf (a Calibri run producing a genuine /Type0/Identity-H/CIDFontType2/FontFile2 Carlito font program, alongside an Arial control run that embeds nothing at all), from the built CJS bundle)
|
|
611
612
|
```
|
|
612
613
|
|
|
613
614
|
The optional real-world PDF conformance corpus (`test:corpus` in the family's earlier layout) now lives in `pdf-codec`'s own repository, since it exercises the PDF codec directly rather than anything docx/pptx/odt/odp/ods/odg-specific — see that package's own README.
|
|
@@ -732,15 +733,15 @@ The prose below is authoritative; this table is a quick-reference summary of it,
|
|
|
732
733
|
|
|
733
734
|
| ↓ from \ to → | docx | pptx | xlsx | odt | odp | ods | odg | odf | markdown | pdf |
|
|
734
735
|
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
735
|
-
| **docx** | — |
|
|
736
|
-
| **pptx** |
|
|
737
|
-
| **xlsx** | – | – | — | – | – | ~ | – | – |
|
|
738
|
-
| **odt** | ✓ | – | – | — |
|
|
739
|
-
| **odp** | – | ✓ | – |
|
|
736
|
+
| **docx** | — | ~ | – | ✓ | – | – | – | – | ✗ | ~ |
|
|
737
|
+
| **pptx** | ~ | — | – | – | ✓ | – | – | – | – | ~ |
|
|
738
|
+
| **xlsx** | – | – | — | – | – | ~ | – | – | ✗✗ | ~ |
|
|
739
|
+
| **odt** | ✓ | – | – | — | ~ | – | – | – | ✗ | ~ |
|
|
740
|
+
| **odp** | – | ✓ | – | ~ | — | – | – | – | – | ~ |
|
|
740
741
|
| **ods** | – | – | ~ | – | – | — | – | – | – | ~ |
|
|
741
742
|
| **odg** | – | – | – | – | – | – | — | – | – | ~ |
|
|
742
743
|
| **odf** | – | – | – | – | – | – | – | — | – | → |
|
|
743
|
-
| **markdown** | ~ | – |
|
|
744
|
+
| **markdown** | ~ | – | ✗✗ | ~ | – | – | – | – | — | ~ |
|
|
744
745
|
| **pdf** | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | – | ✗✗ | — |
|
|
745
746
|
|
|
746
747
|
33 of the 90 possible directional pairs have a real, ergonomic conversion function; PDF is the one layout codec every content format but `odf` renders to and reconstructs from (it is not "the hub" — the `ContentDocument` and `LayoutDocument` pivots in `document-schema.js` are, and fourteen of the sixteen cross-format bridge functions already bypass PDF entirely for the seven pairs that share a content variant directly or through a semantic transform). `document-cli` and `document-mcp` add no conversion logic of their own, so this fidelity is identical across all three.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "1.95.
|
|
3
|
+
"version": "1.95.6",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"byte-codec": "^1.0.4",
|
|
62
62
|
"document-schema.js": "^2.5.2",
|
|
63
63
|
"fflate": "^0.8.3",
|
|
64
|
-
"markdown-codec": "^1.2.
|
|
64
|
+
"markdown-codec": "^1.2.4",
|
|
65
65
|
"odf.js": "^2.4.22",
|
|
66
66
|
"ooxml.js": "^2.9.4",
|
|
67
|
-
"pdf-codec": "^2.1.
|
|
67
|
+
"pdf-codec": "^2.1.3",
|
|
68
68
|
"zod": "^4.4.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|