@illusions-lab/mdi-to-docx 2.0.5 → 2.0.7

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/dist/index.cjs CHANGED
@@ -25,37 +25,168 @@ __export(index_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
27
  var import_docx = require("docx");
28
+ var import_mdi_export_profile = require("@illusions-lab/mdi-export-profile");
28
29
  var MDI_SPEC_VERSION = "2.0";
29
- async function mdiToDocx(tree) {
30
- const children = tree.children.flatMap(block);
31
- const vertical = tree.data?.frontmatter?.writingMode === "vertical";
32
- const document = new import_docx.Document({ sections: [{ children, properties: vertical ? { page: { textDirection: import_docx.PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT } } : void 0 }], title: tree.data?.frontmatter?.title, creator: tree.data?.frontmatter?.author });
30
+ async function mdiToDocx(tree, profile) {
31
+ const options = (0, import_mdi_export_profile.resolvePrintProfile)(
32
+ profile,
33
+ tree.data?.frontmatter?.writingMode
34
+ );
35
+ const children = tree.children.flatMap((node) => block(node, options));
36
+ const dimensions = import_mdi_export_profile.PAGE_DIMENSIONS[options.pagination.pageSize];
37
+ const widthMm = options.pagination.landscape ? dimensions.height : dimensions.width;
38
+ const heightMm = options.pagination.landscape ? dimensions.width : dimensions.height;
39
+ const primary = options.typesetting.writingMode === "vertical" ? heightMm - options.pagination.margins.top - options.pagination.margins.bottom : widthMm - options.pagination.margins.left - options.pagination.margins.right;
40
+ const cross = options.typesetting.writingMode === "vertical" ? widthMm - options.pagination.margins.left - options.pagination.margins.right : heightMm - options.pagination.margins.top - options.pagination.margins.bottom;
41
+ const fontSizeMm = primary / options.pagination.charactersPerLine;
42
+ const fontSizeHalfPoints = Math.round(fontSizeMm / 25.4 * 72 * 2);
43
+ const lineTwips = Math.round(
44
+ cross / options.pagination.linesPerPage / 25.4 * 1440
45
+ );
46
+ const document = new import_docx.Document({
47
+ title: options.metadata.title ?? tree.data?.frontmatter?.title,
48
+ creator: options.metadata.author ?? tree.data?.frontmatter?.author,
49
+ styles: {
50
+ default: {
51
+ document: {
52
+ run: {
53
+ font: options.typesetting.fontFamily,
54
+ size: fontSizeHalfPoints
55
+ },
56
+ paragraph: { spacing: { line: lineTwips } }
57
+ },
58
+ heading1: { run: headingRun(options) },
59
+ heading2: { run: headingRun(options) },
60
+ heading3: { run: headingRun(options) },
61
+ heading4: { run: headingRun(options) },
62
+ heading5: { run: headingRun(options) },
63
+ heading6: { run: headingRun(options) }
64
+ }
65
+ },
66
+ sections: [
67
+ {
68
+ ...pageNumberSection(options, fontSizeHalfPoints),
69
+ properties: {
70
+ page: {
71
+ size: { width: mmToTwips(widthMm), height: mmToTwips(heightMm) },
72
+ margin: Object.fromEntries(
73
+ Object.entries(options.pagination.margins).map(([key, value]) => [
74
+ key,
75
+ mmToTwips(value)
76
+ ])
77
+ ),
78
+ ...options.pagination.pageNumbers.enabled ? { pageNumbers: { start: 1 } } : {},
79
+ ...options.typesetting.writingMode === "vertical" ? {
80
+ textDirection: import_docx.PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT
81
+ } : {}
82
+ }
83
+ },
84
+ children
85
+ }
86
+ ]
87
+ });
33
88
  return import_docx.Packer.toBuffer(document);
34
89
  }
35
- function block(node) {
36
- if (node.type === "heading") return [new import_docx.Paragraph({ heading: [import_docx.HeadingLevel.HEADING_1, import_docx.HeadingLevel.HEADING_2, import_docx.HeadingLevel.HEADING_3, import_docx.HeadingLevel.HEADING_4, import_docx.HeadingLevel.HEADING_5, import_docx.HeadingLevel.HEADING_6][node.depth - 1], children: inline(node.children) })];
37
- if (node.type === "paragraph") return [new import_docx.Paragraph({ children: inline(node.children) })];
38
- if (node.type === "list") return node.children.flatMap((item) => item.children.filter((n) => n.type === "paragraph").map((n) => new import_docx.Paragraph({ children: inline(n.children), bullet: { level: 0 } })));
39
- if (node.type === "mdiPagebreak") return [new import_docx.Paragraph({ children: [new import_docx.PageBreak()] })];
90
+ function headingRun(options) {
91
+ return { font: options.typesetting.fontFamily, color: "000000" };
92
+ }
93
+ function pageNumberSection(options, size) {
94
+ const page = options.pagination.pageNumbers;
95
+ if (!page.enabled) return {};
96
+ const alignment = page.position.endsWith("left") ? import_docx.AlignmentType.LEFT : page.position.endsWith("right") ? import_docx.AlignmentType.RIGHT : import_docx.AlignmentType.CENTER;
97
+ const current = new import_docx.TextRun({ children: [import_docx.PageNumber.CURRENT], size });
98
+ const runs = page.format === "dash" ? [
99
+ new import_docx.TextRun({ text: "\u2014 ", size }),
100
+ current,
101
+ new import_docx.TextRun({ text: " \u2014", size })
102
+ ] : page.format === "fraction" ? [
103
+ current,
104
+ new import_docx.TextRun({ text: " / ", size }),
105
+ new import_docx.TextRun({ children: [import_docx.PageNumber.TOTAL_PAGES], size })
106
+ ] : [current];
107
+ const paragraph2 = new import_docx.Paragraph({ alignment, children: runs });
108
+ return page.position.startsWith("top-") ? { headers: { default: new import_docx.Header({ children: [paragraph2] }) } } : { footers: { default: new import_docx.Footer({ children: [paragraph2] }) } };
109
+ }
110
+ function block(node, options) {
111
+ if (node.type === "heading")
112
+ return [
113
+ new import_docx.Paragraph({
114
+ heading: [
115
+ import_docx.HeadingLevel.HEADING_1,
116
+ import_docx.HeadingLevel.HEADING_2,
117
+ import_docx.HeadingLevel.HEADING_3,
118
+ import_docx.HeadingLevel.HEADING_4,
119
+ import_docx.HeadingLevel.HEADING_5,
120
+ import_docx.HeadingLevel.HEADING_6
121
+ ][node.depth - 1],
122
+ children: inline(node.children)
123
+ })
124
+ ];
125
+ if (node.type === "paragraph") return [paragraph(node.children, options)];
126
+ if (node.type === "list")
127
+ return node.children.flatMap(
128
+ (item) => item.children.filter((n) => n.type === "paragraph").map(
129
+ (n) => new import_docx.Paragraph({
130
+ children: inline(n.children),
131
+ bullet: { level: 0 }
132
+ })
133
+ )
134
+ );
135
+ if (node.type === "mdiPagebreak")
136
+ return [new import_docx.Paragraph({ children: [new import_docx.PageBreak()] })];
40
137
  if (node.type === "mdiBlank") return [new import_docx.Paragraph("")];
41
138
  return [];
42
139
  }
140
+ function paragraph(nodes, options) {
141
+ const fontSizeMm = (() => {
142
+ const dimensions = import_mdi_export_profile.PAGE_DIMENSIONS[options.pagination.pageSize];
143
+ const primary = options.typesetting.writingMode === "vertical" ? (options.pagination.landscape ? dimensions.width : dimensions.height) - options.pagination.margins.top - options.pagination.margins.bottom : (options.pagination.landscape ? dimensions.height : dimensions.width) - options.pagination.margins.left - options.pagination.margins.right;
144
+ return primary / options.pagination.charactersPerLine;
145
+ })();
146
+ const prefix = options.typesetting.fullwidthSpaceIndent ? [new import_docx.TextRun("\u3000".repeat(Math.round(options.typesetting.textIndentEm)))] : [];
147
+ return new import_docx.Paragraph({
148
+ indent: options.typesetting.fullwidthSpaceIndent ? void 0 : {
149
+ firstLine: Math.round(
150
+ options.typesetting.textIndentEm * fontSizeMm / 25.4 * 1440
151
+ )
152
+ },
153
+ children: [...prefix, ...inline(nodes)]
154
+ });
155
+ }
43
156
  function inline(nodes) {
44
157
  return nodes.flatMap((node) => {
45
158
  if (node.type === "text") return [new import_docx.TextRun(node.value)];
46
- if (node.type === "break" || node.type === "mdiBreak") return [new import_docx.TextRun({ break: 1 })];
47
- if (node.type === "emphasis") return [new import_docx.TextRun({ italics: true, children: inline(node.children) })];
48
- if (node.type === "strong") return [new import_docx.TextRun({ bold: true, children: inline(node.children) })];
49
- if (node.type === "delete") return [new import_docx.TextRun({ strike: true, children: inline(node.children) })];
159
+ if (node.type === "break" || node.type === "mdiBreak")
160
+ return [new import_docx.TextRun({ break: 1 })];
161
+ if (node.type === "emphasis")
162
+ return [new import_docx.TextRun({ italics: true, children: inline(node.children) })];
163
+ if (node.type === "strong")
164
+ return [new import_docx.TextRun({ bold: true, children: inline(node.children) })];
165
+ if (node.type === "delete")
166
+ return [new import_docx.TextRun({ strike: true, children: inline(node.children) })];
50
167
  if (node.type === "mdiRuby") return [rawRun(rubyXml(node.base, node.ruby))];
51
- if (node.type === "mdiTcy") return [rawRun(`<w:r><w:rPr><w:eastAsianLayout w:combine="1" w:combineBrackets="none"/></w:rPr><w:t>${xml(node.value)}</w:t></w:r>`)];
168
+ if (node.type === "mdiTcy")
169
+ return [
170
+ rawRun(
171
+ `<w:r><w:rPr><w:eastAsianLayout w:combine="1" w:combineBrackets="none"/></w:rPr><w:t>${xml(
172
+ node.value
173
+ )}</w:t></w:r>`
174
+ )
175
+ ];
52
176
  if ("children" in node) return inline(node.children);
53
177
  return [];
54
178
  });
55
179
  }
180
+ function mmToTwips(mm) {
181
+ return Math.round(mm / 25.4 * 1440);
182
+ }
56
183
  function rubyXml(base, reading) {
57
184
  const text = Array.isArray(reading) ? reading.join(".") : reading;
58
- return `<w:ruby><w:rubyPr><w:rubyAlign w:val="center"/><w:hps w:val="12"/><w:hpsRaise w:val="18"/><w:hpsBaseText w:val="24"/></w:rubyPr><w:rt><w:r><w:t>${xml(text)}</w:t></w:r></w:rt><w:rubyBase><w:r><w:t>${xml(base)}</w:t></w:r></w:rubyBase></w:ruby>`;
185
+ return `<w:ruby><w:rubyPr><w:rubyAlign w:val="center"/><w:hps w:val="12"/><w:hpsRaise w:val="18"/><w:hpsBaseText w:val="24"/></w:rubyPr><w:rt><w:r><w:t>${xml(
186
+ text
187
+ )}</w:t></w:r></w:rt><w:rubyBase><w:r><w:t>${xml(
188
+ base
189
+ )}</w:t></w:r></w:rubyBase></w:ruby>`;
59
190
  }
60
191
  function rawRun(xmlString) {
61
192
  return import_docx.ImportedXmlComponent.fromXmlString(xmlString);
package/dist/index.d.cts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Root } from 'mdast';
2
+ import { ExportProfile } from '@illusions-lab/mdi-export-profile';
2
3
 
3
4
  declare const MDI_SPEC_VERSION = "2.0";
4
- declare function mdiToDocx(tree: Root): Promise<Buffer>;
5
+ /** Creates a DOCX file using the same profile fields as PDF and EPUB exports. */
6
+ declare function mdiToDocx(tree: Root, profile?: ExportProfile): Promise<Buffer>;
5
7
 
6
8
  export { MDI_SPEC_VERSION, mdiToDocx };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Root } from 'mdast';
2
+ import { ExportProfile } from '@illusions-lab/mdi-export-profile';
2
3
 
3
4
  declare const MDI_SPEC_VERSION = "2.0";
4
- declare function mdiToDocx(tree: Root): Promise<Buffer>;
5
+ /** Creates a DOCX file using the same profile fields as PDF and EPUB exports. */
6
+ declare function mdiToDocx(tree: Root, profile?: ExportProfile): Promise<Buffer>;
5
7
 
6
8
  export { MDI_SPEC_VERSION, mdiToDocx };
package/dist/index.js CHANGED
@@ -1,36 +1,183 @@
1
1
  // src/index.ts
2
- import { Document, HeadingLevel, ImportedXmlComponent, Packer, PageBreak, PageTextDirectionType, Paragraph, TextRun } from "docx";
2
+ import {
3
+ AlignmentType,
4
+ Document,
5
+ Footer,
6
+ HeadingLevel,
7
+ Header,
8
+ ImportedXmlComponent,
9
+ Packer,
10
+ PageBreak,
11
+ PageNumber,
12
+ PageTextDirectionType,
13
+ Paragraph,
14
+ TextRun
15
+ } from "docx";
16
+ import {
17
+ PAGE_DIMENSIONS,
18
+ resolvePrintProfile
19
+ } from "@illusions-lab/mdi-export-profile";
3
20
  var MDI_SPEC_VERSION = "2.0";
4
- async function mdiToDocx(tree) {
5
- const children = tree.children.flatMap(block);
6
- const vertical = tree.data?.frontmatter?.writingMode === "vertical";
7
- const document = new Document({ sections: [{ children, properties: vertical ? { page: { textDirection: PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT } } : void 0 }], title: tree.data?.frontmatter?.title, creator: tree.data?.frontmatter?.author });
21
+ async function mdiToDocx(tree, profile) {
22
+ const options = resolvePrintProfile(
23
+ profile,
24
+ tree.data?.frontmatter?.writingMode
25
+ );
26
+ const children = tree.children.flatMap((node) => block(node, options));
27
+ const dimensions = PAGE_DIMENSIONS[options.pagination.pageSize];
28
+ const widthMm = options.pagination.landscape ? dimensions.height : dimensions.width;
29
+ const heightMm = options.pagination.landscape ? dimensions.width : dimensions.height;
30
+ const primary = options.typesetting.writingMode === "vertical" ? heightMm - options.pagination.margins.top - options.pagination.margins.bottom : widthMm - options.pagination.margins.left - options.pagination.margins.right;
31
+ const cross = options.typesetting.writingMode === "vertical" ? widthMm - options.pagination.margins.left - options.pagination.margins.right : heightMm - options.pagination.margins.top - options.pagination.margins.bottom;
32
+ const fontSizeMm = primary / options.pagination.charactersPerLine;
33
+ const fontSizeHalfPoints = Math.round(fontSizeMm / 25.4 * 72 * 2);
34
+ const lineTwips = Math.round(
35
+ cross / options.pagination.linesPerPage / 25.4 * 1440
36
+ );
37
+ const document = new Document({
38
+ title: options.metadata.title ?? tree.data?.frontmatter?.title,
39
+ creator: options.metadata.author ?? tree.data?.frontmatter?.author,
40
+ styles: {
41
+ default: {
42
+ document: {
43
+ run: {
44
+ font: options.typesetting.fontFamily,
45
+ size: fontSizeHalfPoints
46
+ },
47
+ paragraph: { spacing: { line: lineTwips } }
48
+ },
49
+ heading1: { run: headingRun(options) },
50
+ heading2: { run: headingRun(options) },
51
+ heading3: { run: headingRun(options) },
52
+ heading4: { run: headingRun(options) },
53
+ heading5: { run: headingRun(options) },
54
+ heading6: { run: headingRun(options) }
55
+ }
56
+ },
57
+ sections: [
58
+ {
59
+ ...pageNumberSection(options, fontSizeHalfPoints),
60
+ properties: {
61
+ page: {
62
+ size: { width: mmToTwips(widthMm), height: mmToTwips(heightMm) },
63
+ margin: Object.fromEntries(
64
+ Object.entries(options.pagination.margins).map(([key, value]) => [
65
+ key,
66
+ mmToTwips(value)
67
+ ])
68
+ ),
69
+ ...options.pagination.pageNumbers.enabled ? { pageNumbers: { start: 1 } } : {},
70
+ ...options.typesetting.writingMode === "vertical" ? {
71
+ textDirection: PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT
72
+ } : {}
73
+ }
74
+ },
75
+ children
76
+ }
77
+ ]
78
+ });
8
79
  return Packer.toBuffer(document);
9
80
  }
10
- function block(node) {
11
- if (node.type === "heading") return [new Paragraph({ heading: [HeadingLevel.HEADING_1, HeadingLevel.HEADING_2, HeadingLevel.HEADING_3, HeadingLevel.HEADING_4, HeadingLevel.HEADING_5, HeadingLevel.HEADING_6][node.depth - 1], children: inline(node.children) })];
12
- if (node.type === "paragraph") return [new Paragraph({ children: inline(node.children) })];
13
- if (node.type === "list") return node.children.flatMap((item) => item.children.filter((n) => n.type === "paragraph").map((n) => new Paragraph({ children: inline(n.children), bullet: { level: 0 } })));
14
- if (node.type === "mdiPagebreak") return [new Paragraph({ children: [new PageBreak()] })];
81
+ function headingRun(options) {
82
+ return { font: options.typesetting.fontFamily, color: "000000" };
83
+ }
84
+ function pageNumberSection(options, size) {
85
+ const page = options.pagination.pageNumbers;
86
+ if (!page.enabled) return {};
87
+ const alignment = page.position.endsWith("left") ? AlignmentType.LEFT : page.position.endsWith("right") ? AlignmentType.RIGHT : AlignmentType.CENTER;
88
+ const current = new TextRun({ children: [PageNumber.CURRENT], size });
89
+ const runs = page.format === "dash" ? [
90
+ new TextRun({ text: "\u2014 ", size }),
91
+ current,
92
+ new TextRun({ text: " \u2014", size })
93
+ ] : page.format === "fraction" ? [
94
+ current,
95
+ new TextRun({ text: " / ", size }),
96
+ new TextRun({ children: [PageNumber.TOTAL_PAGES], size })
97
+ ] : [current];
98
+ const paragraph2 = new Paragraph({ alignment, children: runs });
99
+ return page.position.startsWith("top-") ? { headers: { default: new Header({ children: [paragraph2] }) } } : { footers: { default: new Footer({ children: [paragraph2] }) } };
100
+ }
101
+ function block(node, options) {
102
+ if (node.type === "heading")
103
+ return [
104
+ new Paragraph({
105
+ heading: [
106
+ HeadingLevel.HEADING_1,
107
+ HeadingLevel.HEADING_2,
108
+ HeadingLevel.HEADING_3,
109
+ HeadingLevel.HEADING_4,
110
+ HeadingLevel.HEADING_5,
111
+ HeadingLevel.HEADING_6
112
+ ][node.depth - 1],
113
+ children: inline(node.children)
114
+ })
115
+ ];
116
+ if (node.type === "paragraph") return [paragraph(node.children, options)];
117
+ if (node.type === "list")
118
+ return node.children.flatMap(
119
+ (item) => item.children.filter((n) => n.type === "paragraph").map(
120
+ (n) => new Paragraph({
121
+ children: inline(n.children),
122
+ bullet: { level: 0 }
123
+ })
124
+ )
125
+ );
126
+ if (node.type === "mdiPagebreak")
127
+ return [new Paragraph({ children: [new PageBreak()] })];
15
128
  if (node.type === "mdiBlank") return [new Paragraph("")];
16
129
  return [];
17
130
  }
131
+ function paragraph(nodes, options) {
132
+ const fontSizeMm = (() => {
133
+ const dimensions = PAGE_DIMENSIONS[options.pagination.pageSize];
134
+ const primary = options.typesetting.writingMode === "vertical" ? (options.pagination.landscape ? dimensions.width : dimensions.height) - options.pagination.margins.top - options.pagination.margins.bottom : (options.pagination.landscape ? dimensions.height : dimensions.width) - options.pagination.margins.left - options.pagination.margins.right;
135
+ return primary / options.pagination.charactersPerLine;
136
+ })();
137
+ const prefix = options.typesetting.fullwidthSpaceIndent ? [new TextRun("\u3000".repeat(Math.round(options.typesetting.textIndentEm)))] : [];
138
+ return new Paragraph({
139
+ indent: options.typesetting.fullwidthSpaceIndent ? void 0 : {
140
+ firstLine: Math.round(
141
+ options.typesetting.textIndentEm * fontSizeMm / 25.4 * 1440
142
+ )
143
+ },
144
+ children: [...prefix, ...inline(nodes)]
145
+ });
146
+ }
18
147
  function inline(nodes) {
19
148
  return nodes.flatMap((node) => {
20
149
  if (node.type === "text") return [new TextRun(node.value)];
21
- if (node.type === "break" || node.type === "mdiBreak") return [new TextRun({ break: 1 })];
22
- if (node.type === "emphasis") return [new TextRun({ italics: true, children: inline(node.children) })];
23
- if (node.type === "strong") return [new TextRun({ bold: true, children: inline(node.children) })];
24
- if (node.type === "delete") return [new TextRun({ strike: true, children: inline(node.children) })];
150
+ if (node.type === "break" || node.type === "mdiBreak")
151
+ return [new TextRun({ break: 1 })];
152
+ if (node.type === "emphasis")
153
+ return [new TextRun({ italics: true, children: inline(node.children) })];
154
+ if (node.type === "strong")
155
+ return [new TextRun({ bold: true, children: inline(node.children) })];
156
+ if (node.type === "delete")
157
+ return [new TextRun({ strike: true, children: inline(node.children) })];
25
158
  if (node.type === "mdiRuby") return [rawRun(rubyXml(node.base, node.ruby))];
26
- if (node.type === "mdiTcy") return [rawRun(`<w:r><w:rPr><w:eastAsianLayout w:combine="1" w:combineBrackets="none"/></w:rPr><w:t>${xml(node.value)}</w:t></w:r>`)];
159
+ if (node.type === "mdiTcy")
160
+ return [
161
+ rawRun(
162
+ `<w:r><w:rPr><w:eastAsianLayout w:combine="1" w:combineBrackets="none"/></w:rPr><w:t>${xml(
163
+ node.value
164
+ )}</w:t></w:r>`
165
+ )
166
+ ];
27
167
  if ("children" in node) return inline(node.children);
28
168
  return [];
29
169
  });
30
170
  }
171
+ function mmToTwips(mm) {
172
+ return Math.round(mm / 25.4 * 1440);
173
+ }
31
174
  function rubyXml(base, reading) {
32
175
  const text = Array.isArray(reading) ? reading.join(".") : reading;
33
- return `<w:ruby><w:rubyPr><w:rubyAlign w:val="center"/><w:hps w:val="12"/><w:hpsRaise w:val="18"/><w:hpsBaseText w:val="24"/></w:rubyPr><w:rt><w:r><w:t>${xml(text)}</w:t></w:r></w:rt><w:rubyBase><w:r><w:t>${xml(base)}</w:t></w:r></w:rubyBase></w:ruby>`;
176
+ return `<w:ruby><w:rubyPr><w:rubyAlign w:val="center"/><w:hps w:val="12"/><w:hpsRaise w:val="18"/><w:hpsBaseText w:val="24"/></w:rubyPr><w:rt><w:r><w:t>${xml(
177
+ text
178
+ )}</w:t></w:r></w:rt><w:rubyBase><w:r><w:t>${xml(
179
+ base
180
+ )}</w:t></w:r></w:rubyBase></w:ruby>`;
34
181
  }
35
182
  function rawRun(xmlString) {
36
183
  return ImportedXmlComponent.fromXmlString(xmlString);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illusions-lab/mdi-to-docx",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "Render MDI (.mdi) documents to DOCX",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,8 @@
25
25
  "dependencies": {
26
26
  "docx": "^9.0.0",
27
27
  "@types/mdast": "^4.0.0",
28
- "mdast-util-mdi": "2.0.4"
28
+ "@illusions-lab/mdi-export-profile": "2.0.2",
29
+ "mdast-util-mdi": "2.0.6"
29
30
  },
30
31
  "devDependencies": {
31
32
  "remark-parse": "^11.0.0",
@@ -35,7 +36,7 @@
35
36
  "typescript": "^5.6.0",
36
37
  "vitest": "^2.1.0",
37
38
  "@types/node": "^20.0.0",
38
- "@illusions-lab/mdi-remark": "2.0.5"
39
+ "@illusions-lab/mdi-remark": "2.0.7"
39
40
  },
40
41
  "scripts": {
41
42
  "build": "tsup src/index.ts --format esm,cjs --dts",