@unified-latex/unified-latex 1.0.12 → 1.2.0

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 CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -29,7 +30,10 @@ var import_unified = require("unified");
29
30
  var import_unified_latex_util_parse = require("@unified-latex/unified-latex-util-parse");
30
31
  var import_unified_latex_util_to_string = require("@unified-latex/unified-latex-util-to-string");
31
32
  var processLatexViaUnified = (options) => {
32
- return (0, import_unified.unified)().use(import_unified_latex_util_parse.unifiedLatexFromString).use(import_unified_latex_util_to_string.unifiedLatexStringCompiler, Object.assign({ pretty: true }, options));
33
+ return (0, import_unified.unified)().use(import_unified_latex_util_parse.unifiedLatexFromString).use(
34
+ import_unified_latex_util_to_string.unifiedLatexStringCompiler,
35
+ Object.assign({ pretty: true }, options)
36
+ );
33
37
  };
34
38
  var processLatexToAstViaUnified = () => {
35
39
  return (0, import_unified.unified)().use(import_unified_latex_util_parse.unifiedLatexFromString).use(import_unified_latex_util_parse.unifiedLatexAstComplier);
package/index.cjs.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../index.ts", "../libs/unified-latex.ts"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAwB;AAExB,sCAGO;AACP,0CAGO;AAIA,IAAM,yBAAyB,CAClC,YACC;AACD,aAAO,wBAAQ,EACV,IAAI,sDAAsB,EAC1B;AAAA,IACG;AAAA,IACA,OAAO,OAAO,EAAE,QAAQ,KAAK,GAAG,OAAO;AAAA,EAC3C;AACR;AAMO,IAAM,8BAA8B,MAAM;AAC7C,aAAO,wBAAQ,EAAE,IAAI,sDAAsB,EAAE,IAAI,uDAAuB;AAC5E;",
6
6
  "names": []
7
7
  }
package/index.js CHANGED
@@ -8,7 +8,10 @@ import {
8
8
  unifiedLatexStringCompiler
9
9
  } from "@unified-latex/unified-latex-util-to-string";
10
10
  var processLatexViaUnified = (options) => {
11
- return unified().use(unifiedLatexFromString).use(unifiedLatexStringCompiler, Object.assign({ pretty: true }, options));
11
+ return unified().use(unifiedLatexFromString).use(
12
+ unifiedLatexStringCompiler,
13
+ Object.assign({ pretty: true }, options)
14
+ );
12
15
  };
13
16
  var processLatexToAstViaUnified = () => {
14
17
  return unified().use(unifiedLatexFromString).use(unifiedLatexAstComplier);
package/index.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../libs/unified-latex.ts"],
4
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;",
5
+ "mappings": ";AAAA,SAAS,eAAe;AAExB;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP;AAAA,EACI;AAAA,OAEG;AAIA,IAAM,yBAAyB,CAClC,YACC;AACD,SAAO,QAAQ,EACV,IAAI,sBAAsB,EAC1B;AAAA,IACG;AAAA,IACA,OAAO,OAAO,EAAE,QAAQ,KAAK,GAAG,OAAO;AAAA,EAC3C;AACR;AAMO,IAAM,8BAA8B,MAAM;AAC7C,SAAO,QAAQ,EAAE,IAAI,sBAAsB,EAAE,IAAI,uBAAuB;AAC5E;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@unified-latex/unified-latex",
3
- "version": "1.0.12",
3
+ "version": "1.2.0",
4
4
  "description": "Process LaTeX to an AST or a string",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@unified-latex/unified-latex-types": "^1.0.12",
9
- "@unified-latex/unified-latex-util-parse": "^1.0.12",
10
- "@unified-latex/unified-latex-util-to-string": "^1.0.12",
8
+ "@unified-latex/unified-latex-types": "^1.2.0",
9
+ "@unified-latex/unified-latex-util-parse": "^1.2.0",
10
+ "@unified-latex/unified-latex-util-to-string": "^1.2.0",
11
11
  "unified": "^10.1.2"
12
12
  },
13
13
  "repository": {