remark-docx 0.3.10 → 0.3.12

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/lib/types.d.ts CHANGED
@@ -7,17 +7,6 @@ type KnownNodeType = mdast.RootContent["type"];
7
7
  type MdastNode<T extends string> = T extends KnownNodeType ? Extract<mdast.RootContent, {
8
8
  type: T;
9
9
  }> : unknown;
10
- type Decoration = Readonly<{
11
- bold?: boolean;
12
- italic?: boolean;
13
- strike?: boolean;
14
- }>;
15
- type ListInfo = Readonly<{
16
- level: number;
17
- ordered: boolean;
18
- reference: string;
19
- checked?: boolean;
20
- }>;
21
10
  export type FootnoteRegistry = {
22
11
  ref: (id: string) => number;
23
12
  def: (id: string, children: Paragraph[]) => void;
@@ -35,13 +24,7 @@ export type NumberingRegistry = {
35
24
  }>;
36
25
  };
37
26
  export type Context = Readonly<{
38
- next: (node: readonly mdast.RootContent[], ctx?: Context) => DocxContent[];
39
- deco: Decoration;
40
- indent: number;
41
- list?: ListInfo;
42
- definition: GetDefinition;
43
- footnote: FootnoteRegistry;
44
- numbering: NumberingRegistry;
27
+ render: (node: readonly mdast.RootContent[], ctx?: Context) => DocxContent[];
45
28
  }>;
46
29
  export type NodeBuilder<T extends string> = (node: MdastNode<T>, ctx: Context) => DocxContent | DocxContent[] | null;
47
30
  export type NodeBuilders = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remark-docx",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "description": "remark plugin to compile markdown to docx (Microsoft Word, Office Open XML).",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",
@@ -33,11 +33,13 @@
33
33
  "prepublishOnly": "npm run typedoc && rimraf lib && npm run build"
34
34
  },
35
35
  "dependencies": {
36
- "@unified-latex/unified-latex-util-parse": "1.8.3",
36
+ "@mathjax/src": "^4.0.0",
37
37
  "docx": "9.5.1",
38
+ "fast-xml-parser": "^5.3.2",
38
39
  "hast-util-from-html": "^2.0.3",
39
40
  "hast-util-to-mdast": "^10.1.2",
40
41
  "image-size": "^2.0.2",
42
+ "mathml2omml": "^0.5.0",
41
43
  "mdast-util-definitions": "^6.0.0",
42
44
  "shiki": "^3.19.0",
43
45
  "unist-util-visit": "^5.0.0"
@@ -92,6 +94,7 @@
92
94
  "word",
93
95
  "office",
94
96
  "openxml",
97
+ "pandoc",
95
98
  "highlight",
96
99
  "latex",
97
100
  "math"
@@ -1 +0,0 @@
1
- export {};