@illusions-lab/mdi-to-docx 2.0.18 → 2.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.
Files changed (2) hide show
  1. package/README.md +29 -6
  2. package/package.json +45 -45
package/README.md CHANGED
@@ -1,10 +1,33 @@
1
1
  # @illusions-lab/mdi-to-docx
2
2
 
3
- Legacy mdast-to-DOCX compatibility adapter for unified ecosystem consumers.
4
- The Rust-first CLI uses `renderDocx()` from `@illusions-lab/mdi` directly.
5
- This package remains available for applications that need its existing
6
- profile-aware mdast integration surface.
3
+ Creates a DOCX file from an MDI-flavoured mdast tree. It is a profile-aware
4
+ compatibility adapter for unified applications and does not parse MDI source.
7
5
 
8
- Part of the [MDI](https://github.com/illusions-lab/MDI) monorepo. See the root README for the full package architecture.
6
+ ## Install
9
7
 
10
- Documentation: https://mdi.illusions.app/
8
+ ```sh
9
+ npm install @illusions-lab/mdi-to-docx
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```ts
15
+ import { writeFile } from "node:fs/promises";
16
+ import { mdiToDocx } from "@illusions-lab/mdi-to-docx";
17
+
18
+ const document = await mdiToDocx(mdastTree, {
19
+ typesetting: { writingMode: "vertical", fontFamily: "Noto Serif JP" },
20
+ });
21
+ await writeFile("book.docx", document);
22
+ ```
23
+
24
+ For complete `.mdi` source, use `renderDocx(source)` from
25
+ [`@illusions-lab/mdi`](https://www.npmjs.com/package/@illusions-lab/mdi).
26
+ The MDI CLI uses that Rust route directly.
27
+
28
+ ## Documentation
29
+
30
+ - [Output model](https://mdi.illusions.app/ecosystem/outputs/)
31
+ - [Export-profile guide](https://mdi.illusions.app/guides/export-profiles/)
32
+ - [API reference](https://mdi.illusions.app/api/to-docx/)
33
+ - [MDI documentation](https://mdi.illusions.app/)
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "name": "@illusions-lab/mdi-to-docx",
3
- "version": "2.0.18",
4
- "description": "Render MDI (.mdi) documents to DOCX",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/illusions-lab/MDI.git",
9
- "directory": "nodejs/packages/to-docx"
10
- },
11
- "homepage": "https://mdi.illusions.app/",
12
- "bugs": "https://github.com/illusions-lab/MDI/issues",
13
- "type": "module",
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
16
- "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "default": "./dist/index.js"
20
- }
21
- },
22
- "files": [
23
- "dist"
24
- ],
25
- "dependencies": {
26
- "docx": "^9.0.0",
27
- "@types/mdast": "^4.0.0",
28
- "@illusions-lab/mdi-export-profile": "2.0.12",
29
- "mdast-util-mdi": "2.0.17"
30
- },
31
- "devDependencies": {
32
- "remark-parse": "^11.0.0",
33
- "unified": "^11.0.0",
34
- "jszip": "^3.10.0",
35
- "tsup": "^8.3.0",
36
- "typescript": "^5.6.0",
37
- "vitest": "^2.1.0",
38
- "@types/node": "^20.0.0",
39
- "@illusions-lab/mdi-remark": "2.0.18"
40
- },
41
- "scripts": {
42
- "build": "tsup src/index.ts --format esm,cjs --dts",
43
- "test": "vitest run --passWithNoTests",
44
- "typecheck": "tsc --noEmit"
45
- }
46
- }
2
+ "name": "@illusions-lab/mdi-to-docx",
3
+ "version": "2.0.19",
4
+ "description": "Render MDI (.mdi) documents to DOCX",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/illusions-lab/MDI.git",
9
+ "directory": "nodejs/packages/to-docx"
10
+ },
11
+ "homepage": "https://mdi.illusions.app/",
12
+ "bugs": "https://github.com/illusions-lab/MDI/issues",
13
+ "type": "module",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ }
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsup src/index.ts --format esm,cjs --dts",
27
+ "test": "vitest run --passWithNoTests",
28
+ "typecheck": "tsc --noEmit"
29
+ },
30
+ "dependencies": {
31
+ "@illusions-lab/mdi-export-profile": "workspace:*",
32
+ "mdast-util-mdi": "workspace:*",
33
+ "docx": "^9.0.0",
34
+ "@types/mdast": "^4.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@illusions-lab/mdi-remark": "workspace:*",
38
+ "remark-parse": "^11.0.0",
39
+ "unified": "^11.0.0",
40
+ "jszip": "^3.10.0",
41
+ "tsup": "^8.3.0",
42
+ "typescript": "^5.6.0",
43
+ "vitest": "^2.1.0",
44
+ "@types/node": "^20.0.0"
45
+ }
46
+ }