@unified-latex/unified-latex-util-environments 1.0.0 → 1.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.map → index.cjs.map} +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.d.ts.map → index.d.ts.map} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/{dist/index.js.map → index.js.map} +0 -0
- package/{dist/libs → libs}/process-environment.d.ts +0 -0
- package/{dist/libs → libs}/process-environment.d.ts.map +0 -0
- package/{dist/libs → libs}/unified-latex-process-environment.d.ts +0 -0
- package/{dist/libs → libs}/unified-latex-process-environment.d.ts.map +0 -0
- package/package.json +31 -42
- package/README.md +0 -82
|
File without changes
|
|
File without changes
|
|
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,39 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unified-latex/unified-latex-util-environments",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Tools for manipulating unified-latex ASTs",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@unified-latex/unified-latex-types": "
|
|
9
|
-
"@unified-latex/unified-latex-util-
|
|
10
|
-
"@unified-latex/unified-latex-util-
|
|
11
|
-
"@unified-latex/unified-latex-util-
|
|
12
|
-
"@unified-latex/unified-latex-util-
|
|
13
|
-
"@unified-latex/unified-latex-util-visit": "
|
|
14
|
-
|
|
15
|
-
"files": [
|
|
16
|
-
"dist/**/*.ts",
|
|
17
|
-
"dist/**/*.js",
|
|
18
|
-
"dist/**/*.map",
|
|
19
|
-
"dist/**/*.json"
|
|
20
|
-
],
|
|
21
|
-
"exports": {
|
|
22
|
-
".": {
|
|
23
|
-
"import": "./dist/index.js",
|
|
24
|
-
"require": "./dist/index.cjs"
|
|
25
|
-
},
|
|
26
|
-
"./*js": "./dist/*js",
|
|
27
|
-
"./*": {
|
|
28
|
-
"import": "./dist/*.js",
|
|
29
|
-
"require": "./dist/*.cjs"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "npm run clean && mkdirp ./dist && npm run compile",
|
|
34
|
-
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
|
|
35
|
-
"compile": "tsc -b tsconfig.json & node build.js & wait",
|
|
36
|
-
"test": "jest"
|
|
8
|
+
"@unified-latex/unified-latex-types": "^1.0.7",
|
|
9
|
+
"@unified-latex/unified-latex-util-arguments": "^1.0.7",
|
|
10
|
+
"@unified-latex/unified-latex-util-match": "^1.0.7",
|
|
11
|
+
"@unified-latex/unified-latex-util-print-raw": "^1.0.7",
|
|
12
|
+
"@unified-latex/unified-latex-util-render-info": "^1.0.7",
|
|
13
|
+
"@unified-latex/unified-latex-util-visit": "^1.0.7",
|
|
14
|
+
"unified": "^10.1.2"
|
|
37
15
|
},
|
|
38
16
|
"repository": {
|
|
39
17
|
"type": "git",
|
|
@@ -53,15 +31,26 @@
|
|
|
53
31
|
"url": "https://github.com/siefkenj/unified-latex/issues"
|
|
54
32
|
},
|
|
55
33
|
"homepage": "https://github.com/siefkenj/unified-latex#readme",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
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"
|
|
65
48
|
}
|
|
66
|
-
}
|
|
67
|
-
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"**/*.ts",
|
|
52
|
+
"**/*.js",
|
|
53
|
+
"**/*.map",
|
|
54
|
+
"**/*.json"
|
|
55
|
+
]
|
|
56
|
+
}
|
package/README.md
DELETED
|
@@ -1,82 +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
|
-
# Plugins
|
|
17
|
-
|
|
18
|
-
## `unifiedLatexProcessEnvironments`
|
|
19
|
-
|
|
20
|
-
Unified plugin to process environment content and attach arguments.
|
|
21
|
-
|
|
22
|
-
### Usage
|
|
23
|
-
|
|
24
|
-
`unified().use(unifiedLatexProcessEnvironments[, options])`
|
|
25
|
-
|
|
26
|
-
#### options
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
{ environments: Ast.EnvInfoRecord; }
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Type
|
|
33
|
-
|
|
34
|
-
`Plugin<{ environments: Ast.EnvInfoRecord; }[], Ast.Root, Ast.Root>`
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
function unifiedLatexProcessEnvironments(options: {
|
|
38
|
-
environments: Ast.EnvInfoRecord;
|
|
39
|
-
}): (tree: Ast.Root) => void;
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
# Functions
|
|
43
|
-
|
|
44
|
-
## `processEnvironment(envNode, envInfo)`
|
|
45
|
-
|
|
46
|
-
Performs any needed processing on the environment (as specified by `envInfo`)
|
|
47
|
-
include attaching arguments and possibly manipulating the environment's body.
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
function processEnvironment(
|
|
51
|
-
envNode: Ast.Environment,
|
|
52
|
-
envInfo: Ast.EnvInfo
|
|
53
|
-
): void;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**Parameters**
|
|
57
|
-
|
|
58
|
-
| Param | Type |
|
|
59
|
-
| :------ | :---------------- |
|
|
60
|
-
| envNode | `Ast.Environment` |
|
|
61
|
-
| envInfo | `Ast.EnvInfo` |
|
|
62
|
-
|
|
63
|
-
## `processEnvironments(tree, environments)`
|
|
64
|
-
|
|
65
|
-
Recursively search for and process the specified environments. Arguments are
|
|
66
|
-
consumed according to the `signature` specified. The body is processed
|
|
67
|
-
with the specified `processContent` function (if given). Any specified `renderInfo`
|
|
68
|
-
is attached to the environment node.
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
function processEnvironments(
|
|
72
|
-
tree: Ast.Ast,
|
|
73
|
-
environments: Ast.EnvInfoRecord
|
|
74
|
-
): void;
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**Parameters**
|
|
78
|
-
|
|
79
|
-
| Param | Type |
|
|
80
|
-
| :----------- | :------------------ |
|
|
81
|
-
| tree | `Ast.Ast` |
|
|
82
|
-
| environments | `Ast.EnvInfoRecord` |
|