textlane 0.5.0 → 0.6.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/build/generated/extensions/mdast-util-definition-list.d.ts +32 -0
- package/build/generated/extensions/mdast-util-definition-list.js +3 -0
- package/build/generated/extensions/mdast-util-directive.d.ts +167 -0
- package/build/generated/extensions/mdast-util-directive.js +3 -0
- package/build/generated/extensions/mdast-util-math.d.ts +53 -0
- package/build/generated/extensions/mdast-util-math.js +3 -0
- package/build/generated/extensions/mdast-util-mdx-expression.d.ts +137 -0
- package/build/generated/extensions/mdast-util-mdx-expression.js +3 -0
- package/build/generated/extensions/mdast-util-mdx-jsx.d.ts +270 -0
- package/build/generated/extensions/mdast-util-mdx-jsx.js +3 -0
- package/build/generated/extensions/mdast-util-mdxjs-esm.d.ts +69 -0
- package/build/generated/extensions/mdast-util-mdxjs-esm.js +3 -0
- package/build/generated/extensions/mdast-util-to-hast.d.ts +69 -0
- package/build/generated/extensions/mdast-util-to-hast.js +3 -0
- package/build/generated/extensions/toml.d.ts +21 -0
- package/build/generated/extensions/toml.js +3 -0
- package/build/generated/html.d.ts +78 -3
- package/build/generated/html.js +25 -1
- package/build/generated/md.d.ts +5 -3
- package/build/generated/md.js +1 -1
- package/build/generated/nl.d.ts +1 -1
- package/build/generated/nl.js +1 -1
- package/build/generated/trees/estree.d.ts +1 -0
- package/build/generated/trees/estree.js +3 -0
- package/build/generated/trees/hast.d.ts +5 -0
- package/build/generated/trees/hast.js +3 -0
- package/build/generated/trees/mdast.d.ts +8 -0
- package/build/generated/trees/mdast.js +3 -0
- package/build/generated/trees/nlcst.d.ts +1 -0
- package/build/generated/trees/nlcst.js +3 -0
- package/build/generated/trees/unist.d.ts +1 -0
- package/build/generated/trees/unist.js +3 -0
- package/build/index.d.ts +10 -0
- package/build/index.js +1 -1
- package/package.json +10 -9
- package/skills/textlane-usage/SKILL.md +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "textlane",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Rust-native text processing pipeline — a unified replacement with native and JavaScript plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"./nl": "./build/generated/nl.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@types/estree-jsx": "^1.0.5",
|
|
35
36
|
"@types/hast": "^3.0.5",
|
|
36
37
|
"@types/mdast": "^4.0.4",
|
|
37
38
|
"@types/nlcst": "^2.0.3",
|
|
@@ -41,13 +42,13 @@
|
|
|
41
42
|
"node": ">=20"
|
|
42
43
|
},
|
|
43
44
|
"optionalDependencies": {
|
|
44
|
-
"@textlane/linux-x64": "0.
|
|
45
|
-
"@textlane/linux-arm64": "0.
|
|
46
|
-
"@textlane/linux-x64-musl": "0.
|
|
47
|
-
"@textlane/linux-arm64-musl": "0.
|
|
48
|
-
"@textlane/darwin-x64": "0.
|
|
49
|
-
"@textlane/darwin-arm64": "0.
|
|
50
|
-
"@textlane/win32-x64": "0.
|
|
51
|
-
"@textlane/win32-arm64": "0.
|
|
45
|
+
"@textlane/linux-x64": "0.6.0",
|
|
46
|
+
"@textlane/linux-arm64": "0.6.0",
|
|
47
|
+
"@textlane/linux-x64-musl": "0.6.0",
|
|
48
|
+
"@textlane/linux-arm64-musl": "0.6.0",
|
|
49
|
+
"@textlane/darwin-x64": "0.6.0",
|
|
50
|
+
"@textlane/darwin-arm64": "0.6.0",
|
|
51
|
+
"@textlane/win32-x64": "0.6.0",
|
|
52
|
+
"@textlane/win32-arm64": "0.6.0"
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -68,7 +68,10 @@ crate. The processor follows unified: `use(plugin | [plugin, options] | preset |
|
|
|
68
68
|
`runSync(tree, file?)`, `stringify(tree)`, `process(text)` (Promise) and `processSync(text)`.
|
|
69
69
|
Trees are plain unist JSON objects: after `use(md.parse())`, `html.parse()` or `nl.parse()`,
|
|
70
70
|
`parse` is typed as `@types/mdast`, `hast` or `nlcst`'s `Root`, and `run` and `stringify` take
|
|
71
|
-
any unist node, so no cast is needed between them and unified utilities.
|
|
71
|
+
any unist node, so no cast is needed between them and unified utilities. Name node types
|
|
72
|
+
through `import type { mdast, hast, nlcst, unist, estree } from "textlane"` rather than
|
|
73
|
+
installing `@types/*`: `mdast.RootContent` there already includes MDX, directive, math,
|
|
74
|
+
definition-list and TOML nodes. Without
|
|
72
75
|
JavaScript plugins, `process` runs off the main thread: process many documents with
|
|
73
76
|
`Promise.all` over one frozen processor, not one by one.
|
|
74
77
|
|
|
@@ -156,5 +159,14 @@ the case: `unknown-plugin`, `invalid-options`, `missing-parser`, `missing-compil
|
|
|
156
159
|
page whose title renders separately needs.
|
|
157
160
|
- Asset and page URLs relative to a Markdown file are `md.pathRewrite({ root, base, pages,
|
|
158
161
|
markdownLinks })`; pass the document as `{ value, path }` so it knows where the file lives.
|
|
162
|
+
`html.pathRewrite({ root, base, pages, attributes })` does the same for HTML attributes
|
|
163
|
+
(`href`, `src`, `srcset`, `poster`).
|
|
164
|
+
- For a site that ends in HTML, not MDX: `md.component` rules may name `component: "x-{name}"`
|
|
165
|
+
(one rule per family of directives) and `unknownDirectives: "error"` fails on a mistyped
|
|
166
|
+
`:::name` while prose like `a:b` stays text; `md.toHtml({ jsxElements: true })` then writes
|
|
167
|
+
the elements `md.component` and `md.packageCommand` make as plain HTML.
|
|
168
|
+
- HTML written by hand gets what Markdown syntax gives: `html.math` (`$…$` in text, for
|
|
169
|
+
`html.katex`), `html.linkify` (bare URLs and emails) and `html.gemoji` (`:rocket:`), each
|
|
170
|
+
leaving links, code and the elements `ignore` names alone.
|
|
159
171
|
- remark-stringify reads `settings` from processor data; textlane's `md.stringify` takes its
|
|
160
172
|
options directly.
|