@unified-latex/unified-latex 1.0.8 → 1.0.9

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/index.cjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../index.ts", "../libs/unified-latex.ts"],
4
- "sourcesContent": ["export * from \"./libs/unified-latex\";\n\n// NOTE: The docstring comment must be the last item in the index.ts file!\n/**\n * ## What is this?\n *\n * Functions parse strings to a `unified-latex` Abstract Syntax Tree (AST).\n *\n * ## When should I use this?\n *\n * If you have a string that you would like to parse to a `unified-latex` `Ast.Ast`, or\n * if you are building a plugin for `unified()` that manipulates LaTeX.\n */\n", "import { unified } from \"unified\";\nimport * as Ast from \"@unified-latex/unified-latex-types\";\nimport {\n unifiedLatexAstComplier,\n unifiedLatexFromString,\n} from \"@unified-latex/unified-latex-util-parse\";\nimport { unifiedLatexStringCompiler } from \"@unified-latex/unified-latex-util-to-string\";\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then pretty-print it.\n */\nexport const processLatexViaUnified = () => {\n return unified()\n .use(unifiedLatexFromString)\n .use(unifiedLatexStringCompiler, { pretty: true });\n};\n\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then return it. This function\n * will not print/pretty-print the `Ast.Ast` back to a string.\n */\nexport const processLatexToAstViaUnified = () => {\n return unified().use(unifiedLatexFromString).use(unifiedLatexAstComplier);\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAwB;AAExB,sCAGO;AACP,0CAA2C;AAIpC,IAAM,yBAAyB,MAAM;AACxC,SAAO,4BAAQ,EACV,IAAI,sDAAsB,EAC1B,IAAI,gEAA4B,EAAE,QAAQ,KAAK,CAAC;AACzD;AAMO,IAAM,8BAA8B,MAAM;AAC7C,SAAO,4BAAQ,EAAE,IAAI,sDAAsB,EAAE,IAAI,uDAAuB;AAC5E;",
4
+ "sourcesContent": ["export * from \"./libs/unified-latex\";\n\n// NOTE: The docstring comment must be the last item in the index.ts file!\n/**\n * ## What is this?\n *\n * Functions parse strings to a `unified-latex` Abstract Syntax Tree (AST).\n *\n * ## When should I use this?\n *\n * If you have a string that you would like to parse to a `unified-latex` `Ast.Ast`, or\n * if you are building a plugin for `unified()` that manipulates LaTeX.\n */\n", "import { unified } from \"unified\";\nimport * as Ast from \"@unified-latex/unified-latex-types\";\nimport {\n unifiedLatexAstComplier,\n unifiedLatexFromString,\n} from \"@unified-latex/unified-latex-util-parse\";\nimport {\n unifiedLatexStringCompiler,\n PluginOptions as StringCompilerPluginOptions,\n} from \"@unified-latex/unified-latex-util-to-string\";\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then pretty-print it.\n */\nexport const processLatexViaUnified = (\n options?: StringCompilerPluginOptions\n) => {\n return unified()\n .use(unifiedLatexFromString)\n .use(\n unifiedLatexStringCompiler,\n Object.assign({ pretty: true }, options)\n );\n};\n\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then return it. This function\n * will not print/pretty-print the `Ast.Ast` back to a string.\n */\nexport const processLatexToAstViaUnified = () => {\n return unified().use(unifiedLatexFromString).use(unifiedLatexAstComplier);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAwB;AAExB,sCAGO;AACP,0CAGO;AAIA,IAAM,yBAAyB,CAClC,YACC;AACD,SAAO,4BAAQ,EACV,IAAI,sDAAsB,EAC1B,IACG,gEACA,OAAO,OAAO,EAAE,QAAQ,KAAK,GAAG,OAAO,CAC3C;AACR;AAMO,IAAM,8BAA8B,MAAM;AAC7C,SAAO,4BAAQ,EAAE,IAAI,sDAAsB,EAAE,IAAI,uDAAuB;AAC5E;",
6
6
  "names": []
7
7
  }
package/index.js CHANGED
@@ -4,9 +4,11 @@ import {
4
4
  unifiedLatexAstComplier,
5
5
  unifiedLatexFromString
6
6
  } from "@unified-latex/unified-latex-util-parse";
7
- import { unifiedLatexStringCompiler } from "@unified-latex/unified-latex-util-to-string";
8
- var processLatexViaUnified = () => {
9
- return unified().use(unifiedLatexFromString).use(unifiedLatexStringCompiler, { pretty: true });
7
+ import {
8
+ unifiedLatexStringCompiler
9
+ } from "@unified-latex/unified-latex-util-to-string";
10
+ var processLatexViaUnified = (options) => {
11
+ return unified().use(unifiedLatexFromString).use(unifiedLatexStringCompiler, Object.assign({ pretty: true }, options));
10
12
  };
11
13
  var processLatexToAstViaUnified = () => {
12
14
  return unified().use(unifiedLatexFromString).use(unifiedLatexAstComplier);
package/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../libs/unified-latex.ts"],
4
- "sourcesContent": ["import { unified } from \"unified\";\nimport * as Ast from \"@unified-latex/unified-latex-types\";\nimport {\n unifiedLatexAstComplier,\n unifiedLatexFromString,\n} from \"@unified-latex/unified-latex-util-parse\";\nimport { unifiedLatexStringCompiler } from \"@unified-latex/unified-latex-util-to-string\";\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then pretty-print it.\n */\nexport const processLatexViaUnified = () => {\n return unified()\n .use(unifiedLatexFromString)\n .use(unifiedLatexStringCompiler, { pretty: true });\n};\n\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then return it. This function\n * will not print/pretty-print the `Ast.Ast` back to a string.\n */\nexport const processLatexToAstViaUnified = () => {\n return unified().use(unifiedLatexFromString).use(unifiedLatexAstComplier);\n};\n"],
5
- "mappings": ";AAAA;AAEA;AAAA;AAAA;AAAA;AAIA;AAIO,IAAM,yBAAyB,MAAM;AACxC,SAAO,QAAQ,EACV,IAAI,sBAAsB,EAC1B,IAAI,4BAA4B,EAAE,QAAQ,KAAK,CAAC;AACzD;AAMO,IAAM,8BAA8B,MAAM;AAC7C,SAAO,QAAQ,EAAE,IAAI,sBAAsB,EAAE,IAAI,uBAAuB;AAC5E;",
4
+ "sourcesContent": ["import { unified } from \"unified\";\nimport * as Ast from \"@unified-latex/unified-latex-types\";\nimport {\n unifiedLatexAstComplier,\n unifiedLatexFromString,\n} from \"@unified-latex/unified-latex-util-parse\";\nimport {\n unifiedLatexStringCompiler,\n PluginOptions as StringCompilerPluginOptions,\n} from \"@unified-latex/unified-latex-util-to-string\";\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then pretty-print it.\n */\nexport const processLatexViaUnified = (\n options?: StringCompilerPluginOptions\n) => {\n return unified()\n .use(unifiedLatexFromString)\n .use(\n unifiedLatexStringCompiler,\n Object.assign({ pretty: true }, options)\n );\n};\n\n/**\n * Use `unified()` to a string to an `Ast.Ast` and then return it. This function\n * will not print/pretty-print the `Ast.Ast` back to a string.\n */\nexport const processLatexToAstViaUnified = () => {\n return unified().use(unifiedLatexFromString).use(unifiedLatexAstComplier);\n};\n"],
5
+ "mappings": ";AAAA;AAEA;AAAA;AAAA;AAAA;AAIA;AAAA;AAAA;AAOO,IAAM,yBAAyB,CAClC,YACC;AACD,SAAO,QAAQ,EACV,IAAI,sBAAsB,EAC1B,IACG,4BACA,OAAO,OAAO,EAAE,QAAQ,KAAK,GAAG,OAAO,CAC3C;AACR;AAMO,IAAM,8BAA8B,MAAM;AAC7C,SAAO,QAAQ,EAAE,IAAI,sBAAsB,EAAE,IAAI,uBAAuB;AAC5E;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,9 @@
1
1
  import * as Ast from "@unified-latex/unified-latex-types";
2
+ import { PluginOptions as StringCompilerPluginOptions } from "@unified-latex/unified-latex-util-to-string";
2
3
  /**
3
4
  * Use `unified()` to a string to an `Ast.Ast` and then pretty-print it.
4
5
  */
5
- export declare const processLatexViaUnified: () => import("unified").Processor<Ast.Root, Ast.Root, Ast.Root, string>;
6
+ export declare const processLatexViaUnified: (options?: StringCompilerPluginOptions) => import("unified").Processor<Ast.Root, Ast.Root, Ast.Root, string>;
6
7
  /**
7
8
  * Use `unified()` to a string to an `Ast.Ast` and then return it. This function
8
9
  * will not print/pretty-print the `Ast.Ast` back to a string.
@@ -1 +1 @@
1
- {"version":3,"file":"unified-latex.d.ts","sourceRoot":"","sources":["../../libs/unified-latex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,oCAAoC,CAAC;AAM1D;;GAEG;AACH,eAAO,MAAM,sBAAsB,yEAIlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,uEAEvC,CAAC"}
1
+ {"version":3,"file":"unified-latex.d.ts","sourceRoot":"","sources":["../../libs/unified-latex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,oCAAoC,CAAC;AAK1D,OAAO,EAEH,aAAa,IAAI,2BAA2B,EAC/C,MAAM,6CAA6C,CAAC;AACrD;;GAEG;AACH,eAAO,MAAM,sBAAsB,aACrB,2BAA2B,sEAQxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,uEAEvC,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@unified-latex/unified-latex",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Process LaTeX to an AST or a string",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "dependencies": {
8
8
  "@unified-latex/unified-latex-types": "^1.0.7",
9
- "@unified-latex/unified-latex-util-parse": "^1.0.8",
10
- "@unified-latex/unified-latex-util-to-string": "^1.0.8",
9
+ "@unified-latex/unified-latex-util-parse": "^1.0.9",
10
+ "@unified-latex/unified-latex-util-to-string": "^1.0.9",
11
11
  "unified": "^10.1.2"
12
12
  },
13
13
  "repository": {