@csszyx/compiler 0.8.0 → 0.9.1
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 +12 -8
- package/dist/color-var.cjs +1 -0
- package/dist/color-var.mjs +1 -0
- package/dist/index.cjs +1109 -44
- package/dist/index.d.cts +184 -38
- package/dist/index.d.mts +184 -38
- package/dist/index.mjs +1107 -47
- package/dist/shared/{compiler.BIUVmI0H.mjs → compiler.CIBwOKUt.mjs} +70 -15
- package/dist/shared/{compiler.C6jT0mcT.cjs → compiler.DItEsgH4.cjs} +70 -15
- package/dist/transform-core.cjs +1 -1
- package/dist/transform-core.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -95,20 +95,24 @@ runtime consumers like `@csszyx/dynamic`.
|
|
|
95
95
|
|
|
96
96
|
Babel-based source transform. Parses TSX/JSX, walks the AST, rewrites
|
|
97
97
|
`sz`/`szRecover`/`_sz` constructs, emits the new source via Babel's
|
|
98
|
-
code generator.
|
|
99
|
-
path in v0.8.0+.
|
|
98
|
+
code generator. Retained as the final compatibility fallback.
|
|
100
99
|
|
|
101
100
|
#### `transformOxc(source: string, filename?: string, options?: TransformSourceCodeOptions): TransformOxcResult` _(since v0.8.0)_
|
|
102
101
|
|
|
103
102
|
oxc-parser + magic-string source transform. Same return shape as
|
|
104
103
|
`transformSourceCode` so consumers (and the parity harness) can diff
|
|
105
|
-
both implementations cleanly.
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
both implementations cleanly. JavaScript fallback when the native Rust
|
|
105
|
+
engine is unavailable (e.g. unsupported platform). Set
|
|
106
|
+
`build.parser: 'oxc'` to use this path.
|
|
108
107
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
#### `transformRust(source: string, filename?: string, options?: TransformSourceCodeOptions): TransformRustResult` _(default since v0.9.0)_
|
|
109
|
+
|
|
110
|
+
Native Rust engine via napi-rs. Fastest parser path. Requires the
|
|
111
|
+
matching optional `@csszyx/core-*` platform package. Missing native
|
|
112
|
+
packages surface `CsszyxNativeUnavailableError`.
|
|
113
|
+
|
|
114
|
+
All three transform paths preserve every byte the user wrote outside the
|
|
115
|
+
touched `sz`/`szRecover` ranges.
|
|
112
116
|
|
|
113
117
|
#### `isValidSzProp(szProp: unknown): boolean`
|
|
114
118
|
|
package/dist/color-var.cjs
CHANGED