@unified-latex/unified-latex-util-environments 1.0.5 → 1.0.8

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.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,41 +1,18 @@
1
1
  {
2
2
  "name": "@unified-latex/unified-latex-util-environments",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Tools for manipulating unified-latex ASTs",
5
- "main": "dist/index.js",
5
+ "main": "index.js",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@unified-latex/unified-latex-types": "^1.0.5",
9
- "@unified-latex/unified-latex-util-arguments": "^1.0.5",
10
- "@unified-latex/unified-latex-util-match": "^1.0.5",
11
- "@unified-latex/unified-latex-util-print-raw": "^1.0.5",
12
- "@unified-latex/unified-latex-util-render-info": "^1.0.5",
13
- "@unified-latex/unified-latex-util-visit": "^1.0.5",
8
+ "@unified-latex/unified-latex-types": "^1.0.7",
9
+ "@unified-latex/unified-latex-util-arguments": "^1.0.8",
10
+ "@unified-latex/unified-latex-util-match": "^1.0.8",
11
+ "@unified-latex/unified-latex-util-print-raw": "^1.0.8",
12
+ "@unified-latex/unified-latex-util-render-info": "^1.0.8",
13
+ "@unified-latex/unified-latex-util-visit": "^1.0.8",
14
14
  "unified": "^10.1.2"
15
15
  },
16
- "files": [
17
- "dist/**/*.ts",
18
- "dist/**/*.js",
19
- "dist/**/*.map",
20
- "dist/**/*.json"
21
- ],
22
- "exports": {
23
- ".": {
24
- "import": "./dist/index.js",
25
- "require": "./dist/index.cjs"
26
- },
27
- "./*js": "./dist/*js",
28
- "./*": {
29
- "import": "./dist/*.js",
30
- "require": "./dist/*.cjs"
31
- }
32
- },
33
- "scripts": {
34
- "build": "npm run clean && mkdirp ./dist && npm run compile",
35
- "clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
36
- "compile": "tsc -b tsconfig.json & node build.js & wait",
37
- "test": "jest"
38
- },
39
16
  "repository": {
40
17
  "type": "git",
41
18
  "url": "git+https://github.com/siefkenj/unified-latex.git"
@@ -54,15 +31,26 @@
54
31
  "url": "https://github.com/siefkenj/unified-latex/issues"
55
32
  },
56
33
  "homepage": "https://github.com/siefkenj/unified-latex#readme",
57
- "jest": {
58
- "transformIgnorePatterns": [
59
- "node_modules/(?!unified|bail|is-plain-obj|trough|vfile.*|unist.*|hast.*|property-information|html-void-elements|.*-separated-tokens|.*entities.*|ccount|rehype*|string-width|strip-ansi|ansi-regex|supports-color)"
60
- ],
61
- "transform": {
62
- "\\.m?jsx?$": "esbuild-jest",
63
- "latex.pegjs$": "<rootDir>/../../tests/pegjs-preprocessor-latex.js",
64
- "\\.pegjs$": "<rootDir>/../../tests/pegjs-preprocessor.js",
65
- "^.+\\.tsx?$": "ts-jest"
34
+ "exports": {
35
+ ".": {
36
+ "import": "index.js",
37
+ "require": "index.cjs"
38
+ },
39
+ "./*js": "./*js",
40
+ "./*": {
41
+ "import": "./*/index.js",
42
+ "require": "./*/index.cjs",
43
+ "types": "./*/index.d.ts"
44
+ },
45
+ "./*/index": {
46
+ "import": "./*/index.js",
47
+ "require": "./*/index.cjs"
66
48
  }
67
- }
68
- }
49
+ },
50
+ "files": [
51
+ "**/*.ts",
52
+ "**/*.js",
53
+ "**/*.map",
54
+ "**/*.json"
55
+ ]
56
+ }
package/README.md DELETED
@@ -1,91 +0,0 @@
1
- <!-- DO NOT MODIFY -->
2
- <!-- This file was autogenerated by build-docs.ts -->
3
- <!-- Edit the docstring in index.ts and regenerate -->
4
- <!-- rather than editing this file directly. -->
5
- # unified-latex-util-environments
6
-
7
- ## What is this?
8
-
9
- Functions to report on/manipulate environments in a `unified-latex` Abstract Syntax Tree (AST).
10
-
11
- ## When should I use this?
12
-
13
- If you are working on the internals of `unified-latex-util-parse` or need to make a custom parser
14
- that treats environments differently.
15
-
16
- ## Install
17
-
18
- ```bash
19
- npm install @unified-latex/unified-latex-util-environments
20
- ```
21
-
22
- This package contains both esm and commonjs exports. To explicitly access the esm export,
23
- import the `.js` file. To explicitly access the commonjs export, import the `.cjs` file.
24
-
25
- # Plugins
26
-
27
- ## `unifiedLatexProcessEnvironments`
28
-
29
- Unified plugin to process environment content and attach arguments.
30
-
31
- ### Usage
32
-
33
- `unified().use(unifiedLatexProcessEnvironments[, options])`
34
-
35
- #### options
36
-
37
- ```typescript
38
- { environments: Ast.EnvInfoRecord; }
39
- ```
40
-
41
- ### Type
42
-
43
- `Plugin<{ environments: Ast.EnvInfoRecord; }[], Ast.Root, Ast.Root>`
44
-
45
- ```typescript
46
- function unifiedLatexProcessEnvironments(options: {
47
- environments: Ast.EnvInfoRecord;
48
- }): (tree: Ast.Root) => void;
49
- ```
50
-
51
- # Functions
52
-
53
- ## `processEnvironment(envNode, envInfo)`
54
-
55
- Performs any needed processing on the environment (as specified by `envInfo`)
56
- include attaching arguments and possibly manipulating the environment's body.
57
-
58
- ```typescript
59
- function processEnvironment(
60
- envNode: Ast.Environment,
61
- envInfo: Ast.EnvInfo
62
- ): void;
63
- ```
64
-
65
- **Parameters**
66
-
67
- | Param | Type |
68
- | :------ | :---------------- |
69
- | envNode | `Ast.Environment` |
70
- | envInfo | `Ast.EnvInfo` |
71
-
72
- ## `processEnvironments(tree, environments)`
73
-
74
- Recursively search for and process the specified environments. Arguments are
75
- consumed according to the `signature` specified. The body is processed
76
- with the specified `processContent` function (if given). Any specified `renderInfo`
77
- is attached to the environment node.
78
-
79
- ```typescript
80
- function processEnvironments(
81
- tree: Ast.Ast,
82
- environments: Ast.EnvInfoRecord
83
- ): void;
84
- ```
85
-
86
- **Parameters**
87
-
88
- | Param | Type |
89
- | :----------- | :------------------ |
90
- | tree | `Ast.Ast` |
91
- | environments | `Ast.EnvInfoRecord` |