satteri 0.9.5 → 0.10.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/README.md +11 -1
- package/dist/binding.browser.d.ts +1 -1
- package/dist/binding.browser.js +1 -1
- package/dist/binding.d.ts +1 -1
- package/dist/binding.js +1 -1
- package/dist/byte-writer.d.ts +4 -0
- package/dist/byte-writer.js +13 -4
- package/dist/child-stub.d.ts +7 -3
- package/dist/child-stub.js +18 -7
- package/dist/command-buffer.d.ts +36 -50
- package/dist/command-buffer.js +102 -49
- package/dist/compile.d.ts +80 -32
- package/dist/compile.js +293 -69
- package/dist/freeze.d.ts +2 -0
- package/dist/freeze.js +10 -0
- package/dist/generated/wire-constants.d.ts +3 -2
- package/dist/generated/wire-constants.js +4 -2
- package/dist/hast/child-stub.d.ts +2 -3
- package/dist/hast/child-stub.js +18 -11
- package/dist/hast/element-props.d.ts +1 -1
- package/dist/hast/element-props.js +14 -6
- package/dist/hast/hast-materializer.d.ts +6 -2
- package/dist/hast/hast-materializer.js +48 -134
- package/dist/hast/hast-reader.d.ts +7 -13
- package/dist/hast/hast-reader.js +76 -21
- package/dist/hast/hast-visitor.d.ts +48 -4
- package/dist/hast/hast-visitor.js +318 -154
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/lazy-child-resolver.d.ts +20 -13
- package/dist/lazy-child-resolver.js +66 -38
- package/dist/materializer-cache.d.ts +42 -0
- package/dist/materializer-cache.js +192 -0
- package/dist/mdast/child-stub.d.ts +6 -3
- package/dist/mdast/child-stub.js +71 -8
- package/dist/mdast/generated/layout.d.ts +2 -3
- package/dist/mdast/generated/layout.js +24 -28
- package/dist/mdast/generated/node-types.d.ts +4 -0
- package/dist/mdast/generated/node-types.js +25 -0
- package/dist/mdast/mdast-materializer.d.ts +12 -3
- package/dist/mdast/mdast-materializer.js +83 -78
- package/dist/mdast/mdast-reader.d.ts +15 -0
- package/dist/mdast/mdast-reader.js +55 -10
- package/dist/mdast/mdast-visitor.d.ts +73 -32
- package/dist/mdast/mdast-visitor.js +298 -122
- package/dist/op-stream.d.ts +5 -12
- package/dist/op-stream.js +6 -21
- package/dist/plugin.d.ts +36 -10
- package/dist/plugin.js +50 -2
- package/dist/string-pool.d.ts +13 -0
- package/dist/string-pool.js +91 -0
- package/dist/types.d.ts +38 -1
- package/dist/visitor-shared.d.ts +27 -4
- package/dist/visitor-shared.js +36 -10
- package/dist/wire-read.js +3 -1
- package/index.d.ts +130 -7
- package/index.js +89 -68
- package/package.json +23 -15
- package/dist/lazy-props.d.ts +0 -10
- package/dist/lazy-props.js +0 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "satteri",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "High-performance Markdown and MDX processing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@types/estree-jsx": "^1.0.5",
|
|
36
|
-
"@types/hast": "^3.0.
|
|
36
|
+
"@types/hast": "^3.0.5",
|
|
37
37
|
"@types/mdast": "^4.0.4",
|
|
38
38
|
"@types/unist": "^3.0.3"
|
|
39
39
|
},
|
|
@@ -43,17 +43,19 @@
|
|
|
43
43
|
"@emnapi/runtime": "^1.11.1",
|
|
44
44
|
"@mdx-js/mdx": "^3.1.1",
|
|
45
45
|
"@napi-rs/wasm-runtime": "^1.1.5",
|
|
46
|
-
"@types/node": "^
|
|
47
|
-
"@types/react": "^19.2.
|
|
48
|
-
"@types/react-dom": "^19.2.
|
|
46
|
+
"@types/node": "^26.2.0",
|
|
47
|
+
"@types/react": "^19.2.18",
|
|
48
|
+
"@types/react-dom": "^19.2.4",
|
|
49
49
|
"fast-check": "^4.7.0",
|
|
50
50
|
"hastscript": "^9.0.1",
|
|
51
51
|
"mdast-util-mdx": "^3.0.0",
|
|
52
52
|
"mdast-util-to-hast": "^13.2.1",
|
|
53
53
|
"react": "^19.2.5",
|
|
54
54
|
"react-dom": "^19.2.5",
|
|
55
|
+
"rehype-raw": "^7.0.0",
|
|
55
56
|
"rehype-stringify": "^10.0.1",
|
|
56
57
|
"remark": "^15.0.1",
|
|
58
|
+
"remark-definition-list": "^2.0.0",
|
|
57
59
|
"remark-directive": "^4.0.0",
|
|
58
60
|
"remark-frontmatter": "^5.0.0",
|
|
59
61
|
"remark-gfm": "^4.0.1",
|
|
@@ -78,18 +80,23 @@
|
|
|
78
80
|
"x86_64-pc-windows-msvc",
|
|
79
81
|
"aarch64-pc-windows-msvc",
|
|
80
82
|
"wasm32-wasip1-threads"
|
|
81
|
-
]
|
|
83
|
+
],
|
|
84
|
+
"wasm": {
|
|
85
|
+
"browser": {
|
|
86
|
+
"asyncInit": true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
82
89
|
},
|
|
83
90
|
"optionalDependencies": {
|
|
84
|
-
"@bruits/satteri-linux-x64-gnu": "0.
|
|
85
|
-
"@bruits/satteri-linux-arm64-gnu": "0.
|
|
86
|
-
"@bruits/satteri-linux-x64-musl": "0.
|
|
87
|
-
"@bruits/satteri-linux-arm64-musl": "0.
|
|
88
|
-
"@bruits/satteri-darwin-x64": "0.
|
|
89
|
-
"@bruits/satteri-darwin-arm64": "0.
|
|
90
|
-
"@bruits/satteri-win32-x64-msvc": "0.
|
|
91
|
-
"@bruits/satteri-win32-arm64-msvc": "0.
|
|
92
|
-
"@bruits/satteri-wasm32-wasi": "0.
|
|
91
|
+
"@bruits/satteri-linux-x64-gnu": "0.10.0",
|
|
92
|
+
"@bruits/satteri-linux-arm64-gnu": "0.10.0",
|
|
93
|
+
"@bruits/satteri-linux-x64-musl": "0.10.0",
|
|
94
|
+
"@bruits/satteri-linux-arm64-musl": "0.10.0",
|
|
95
|
+
"@bruits/satteri-darwin-x64": "0.10.0",
|
|
96
|
+
"@bruits/satteri-darwin-arm64": "0.10.0",
|
|
97
|
+
"@bruits/satteri-win32-x64-msvc": "0.10.0",
|
|
98
|
+
"@bruits/satteri-win32-arm64-msvc": "0.10.0",
|
|
99
|
+
"@bruits/satteri-wasm32-wasi": "0.10.0"
|
|
93
100
|
},
|
|
94
101
|
"scripts": {
|
|
95
102
|
"build:binary:wasm": "napi build --manifest-path ../../crates/satteri-napi-binding/Cargo.toml --output-dir . --platform --release --esm --strip --target wasm32-wasip1-threads",
|
|
@@ -103,6 +110,7 @@
|
|
|
103
110
|
"build:binary:native:debug": "napi build --manifest-path ../../crates/satteri-napi-binding/Cargo.toml --output-dir . --platform --esm",
|
|
104
111
|
"postbuild:binary:native:debug": "node patch-binding.js",
|
|
105
112
|
"build:ts": "tsc --project tsconfig.build.json",
|
|
113
|
+
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
106
114
|
"build": "pnpm build:ts && pnpm build:binary:native",
|
|
107
115
|
"build:wasm": "pnpm build:ts && pnpm build:binary:wasm",
|
|
108
116
|
"artifacts": "napi create-npm-dirs && napi artifacts",
|
package/dist/lazy-props.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build a lazy getter descriptor that caches the value on first access.
|
|
3
|
-
*/
|
|
4
|
-
export declare function lazyProp<T>(key: string, get: () => T): PropertyDescriptor;
|
|
5
|
-
/**
|
|
6
|
-
* First access to any field in the group resolves all fields from one reader call.
|
|
7
|
-
* Uses a shared resolve-once pattern: the first getter to fire reads all data,
|
|
8
|
-
* defines own properties for every key, then each per-key getter returns its value.
|
|
9
|
-
*/
|
|
10
|
-
export declare function lazyGroup(node: object, keys: readonly string[], resolve: () => Record<string, unknown>): void;
|
package/dist/lazy-props.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build a lazy getter descriptor that caches the value on first access.
|
|
3
|
-
*/
|
|
4
|
-
export function lazyProp(key, get) {
|
|
5
|
-
return {
|
|
6
|
-
get() {
|
|
7
|
-
const value = get();
|
|
8
|
-
Object.defineProperty(this, key, {
|
|
9
|
-
value,
|
|
10
|
-
writable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
enumerable: true,
|
|
13
|
-
});
|
|
14
|
-
return value;
|
|
15
|
-
},
|
|
16
|
-
configurable: true,
|
|
17
|
-
enumerable: true,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* First access to any field in the group resolves all fields from one reader call.
|
|
22
|
-
* Uses a shared resolve-once pattern: the first getter to fire reads all data,
|
|
23
|
-
* defines own properties for every key, then each per-key getter returns its value.
|
|
24
|
-
*/
|
|
25
|
-
export function lazyGroup(node, keys, resolve) {
|
|
26
|
-
let cached;
|
|
27
|
-
const ensureResolved = () => {
|
|
28
|
-
if (cached)
|
|
29
|
-
return cached;
|
|
30
|
-
cached = resolve();
|
|
31
|
-
for (const k of keys) {
|
|
32
|
-
Object.defineProperty(node, k, {
|
|
33
|
-
value: cached[k],
|
|
34
|
-
writable: true,
|
|
35
|
-
configurable: true,
|
|
36
|
-
enumerable: true,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return cached;
|
|
40
|
-
};
|
|
41
|
-
for (const key of keys) {
|
|
42
|
-
Object.defineProperty(node, key, {
|
|
43
|
-
get() {
|
|
44
|
-
return ensureResolved()[key];
|
|
45
|
-
},
|
|
46
|
-
configurable: true,
|
|
47
|
-
enumerable: true,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|