@teacss/engine 0.9.4 → 0.10.2

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2021-PRESENT Anthony Fu <https://github.com/antfu>
4
+ Copyright (c) 2026-PRESENT Billgo <hi@billgo.me>
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -2,94 +2,28 @@
2
2
 
3
3
  ## What this package is
4
4
 
5
- `@teacss/engine` is the in-process Rust engine for TeaCSS 0.9: a napi-rs binding plus a facade that mirrors the 0.8.x `TeacssGenerator` API, so the TypeScript integrations can hand a build to Rust and get byte-identical CSS back. You do not install it yourself. The teacss-ts 0.9 integration packages (`@teacss/vite`, `@teacss/rsbuild` and the others) depend on it, and npm installs the platform package that matches your machine through `optionalDependencies`. Each `@teacss/engine@0.9.N` is paired with `@teacss/core@0.9.N`.
5
+ `@teacss/engine` is the in-process Rust engine for TeaCSS: a napi-rs binding, the contract types (`contract.d.ts`) and the project helper (`createProject`) that the shells published from this repository (`@teacss/vite`, `@teacss/astro`, `@teacss/rsbuild`, `@teacss/bun`, `@teacss/postcss`, `@teacss/inspector`) and the `teacss` command share. You do not install it yourself. The shells depend on it, and npm installs the platform package that matches your machine through `optionalDependencies`.
6
6
 
7
7
  ## Supported platforms
8
8
 
9
- | Package | os / cpu / libc | Status | Minimum |
10
- | --- | --- | --- | --- |
11
- | @teacss/engine-darwin-arm64 | darwin / arm64 / - | required | macOS 11.0 |
12
- | @teacss/engine-darwin-x64 | darwin / x64 / - | required | macOS 11.0 |
13
- | @teacss/engine-linux-x64-gnu | linux / x64 / glibc | required | glibc 2.17 |
14
- | @teacss/engine-linux-x64-musl | linux / x64 / musl | required | - |
15
- | @teacss/engine-linux-arm64-gnu | linux / arm64 / glibc | required | glibc 2.17 |
16
- | @teacss/engine-linux-arm64-musl | linux / arm64 / musl | optional | - |
17
- | @teacss/engine-win32-x64-msvc | win32 / x64 / - | required | - |
18
- | @teacss/engine-win32-arm64-msvc | win32 / arm64 / - | optional | - |
19
- | @teacss/engine-wasm32-wasi | - / - / - | optional | - |
20
-
21
- Every package needs Node.js 22.12.0 or later; the wasm package needs `>=22.13.0 <23.0.0-0 || >=23.5.0`. A required platform blocks a release when it fails to build or test; an optional one is published later if it fails. The wasm fallback runs on any host, so it is not in `optionalDependencies` and is never installed by default. Install it explicitly with `npm i @teacss/engine-wasm32-wasi` when no native package fits your platform.
22
-
23
- ## Engine selection
24
-
25
- - `TEACSS_ENGINE=auto|rust|ts` overrides the `engine` option. An unrecognized value is ignored, and the selection result carries it as `invalidEnv`.
26
- - Otherwise the integration's `engine` option decides. `selectEngineRequest` with no option returns TypeScript; what an unset `engine` means is the teacss-ts hook's call.
27
- - `package.json#engineCompat.defaultMode` sets what the option `"auto"` means. It is `"auto"`: `engine: "auto"`, which the first-party integrations pass, tries Rust and falls back to TypeScript when the configuration cannot run there. Releases up to 0.9.1 shipped `"opt-in"`, under which the option `"auto"` stayed on TypeScript and only `TEACSS_ENGINE=rust|auto` or `engine: "rust"` tried Rust.
28
- - With `"auto"`, a configuration Rust cannot serve falls back to TypeScript with a machine-readable reason (see [Fallback reasons](#fallback-reasons)); with `"rust"`, the teacss-ts hook prints the same fallback as a warning, and throws instead when `TEACSS_ENGINE_STRICT=1` is set.
29
-
30
- `selectEngineRequest` from `@teacss/engine/select` (which does not load the binding) stays on TypeScript in three cases: `mode: "ts"` (TypeScript chosen explicitly), `resolvedBy: "opt-in"` (the option `"auto"` while `defaultMode` is `"opt-in"`), and `reason: "engine-compat"` (the host `@teacss/core` is outside `engineCompat.core`).
31
-
32
- ## Fallback reasons
33
-
34
- A fallback prints one line per reason and path per process: `[teacss] engine: falling back to the TypeScript engine (<reason> at <path>)`. In teacss-ts, `TEACSS_ENGINE_STATS=1` prints on exit how many generators ran on each engine and which reasons fell back. `TEACSS_ENGINE_DEBUG=1` makes this package print the translated request or the first failure to stderr. The facade stops at the first item it cannot translate, so fixing one reason can reveal the next.
35
-
36
- To keep TypeScript for any configuration, set `TEACSS_ENGINE=ts` (it covers every integration), or write `engine: "ts"` in the configuration or in the host's defaults, for example `pluginTeacss(config, { engine: "ts" })`. A fallback is not an error: the TypeScript engine produces the same CSS it always has.
37
-
38
- `<i>` is the preset's index after nested presets are flattened and ordered by `enforce`.
39
-
40
- | Reason | Path | What it means and why | To run on Rust |
41
- | --- | --- | --- | --- |
42
- | `engine-unavailable` | `@teacss/engine` | Reported by the teacss-ts hook, not by this package: importing the facade failed, usually because no platform package matches the machine or the native binding did not load. | Install the platform package for your machine; see [Troubleshooting](#troubleshooting). `TEACSS_ENGINE=rust` throws with the loader's error instead of falling back. |
43
- | `engine-compat` | `@teacss/core` | The host `@teacss/core` is outside `engineCompat.core`, so the pair was not tested together. `TEACSS_ENGINE=rust` throws `E_ENGINE_COMPAT` instead. | Align `@teacss/core` and `@teacss/engine`; check the lockfile for a second copy of either. |
44
- | `unknown-key` | the key | A top-level config key the facade does not know, such as a typo or an option from a newer core. Rust cannot know what it means. | Remove or correct the key. |
45
- | `rules`, `variants`, `extractors`, `extractorDefault`, `preflights`, `preprocess`, `postprocess`, `extendTheme`, `configResolved`, `autocomplete`, `cli` | the key | The key has a non-empty value. These hold functions or matchers that only JavaScript can run, and Rust does not execute JavaScript. | Remove the key from the configuration the integration loads, or express it statically with `shortcuts`, `theme`, `safelist` or a preset option. |
46
- | `separators` | `separators` | Separators other than the default `[":", "-"]`; Rust parses only the default. | Remove `separators`. |
47
- | `mergeSelectors` | `mergeSelectors` | `mergeSelectors: false`; Rust always merges selectors. | Remove it. |
48
- | `details` | `details` | `details` is set; Rust does not support it. | Remove it. |
49
- | `sortLayers` | `sortLayers` | A `sortLayers` function. | Remove it and order layers with `layers`. |
50
- | `content` | `content` or `content.filesystem` | `content` is not an object, or `content.filesystem` is not an array of strings. | Use an array of glob strings. |
51
- | `content.inline` | `content.inline` | Inline content sources, which only the TypeScript engine reads. | Move the content into files matched by `content.filesystem`. |
52
- | `envMode` | `envMode` | A value other than `"dev"` or `"build"`. | Use one of the two. |
53
- | `unmatched` | `unmatched` | A value other than `"warn"`, `"error"` or `"off"`. | Use one of the three. |
54
- | `outputToCssLayers` | `outputToCssLayers` | Neither a boolean nor an object. | Use `true`, `false` or `{ allLayers }`. |
55
- | `outputToCssLayers.cssLayerName` | `outputToCssLayers.cssLayerName` | A `cssLayerName` value; Rust does not support it. | Remove it. |
56
- | `transformers` | `transformers` or `transformers[<n>]` | A transformer other than `@teacss/transformer-compile-class` and `@teacss/directives`, or a `transformers` value that is not an array. Other transformers run JavaScript over the source. | Remove the transformer, or keep TypeScript. |
57
- | `transformers.compile-class` | `transformers[<n>]` | The config lists its own `transformerCompileClass()` and the last Standard preset does not enable `compileClass`, or there is no Standard preset. Its options live in a closure, and the classes it registers never reach Rust. | Enable compile-class through `presetStandard({ compileClass })`, or keep TypeScript. |
58
- | `shortcuts`, `safelist`, `blocklist`, `theme`, `layers` | the key and the item inside it | A value that is not static data: a shortcut whose expansion is not a string, or that has a regular expression or meta; a `safelist` or `blocklist` item that is not a string; a theme leaf that is not a string or number, the removed `rolePalettes` or `themes` theme key, or a `defaultMode` or mode name that is empty or holds a NUL or a lone surrogate (Standard rejects these; the TypeScript engine raises its error); a layer order that is not a number. | Replace the item with static data. |
59
- | `preset-not-instantiated` | `presets[<n>]` | A preset that is a function, a promise or not an object. | Call the factory (`presetStandard()`, not `presetStandard`) and await it before passing it. |
60
- | `preset-cycle` | `presets[<n>]…` | A preset that contains itself through nested `presets`. | Break the cycle. |
61
- | `accessor` | the key | A getter or setter on the config, the defaults or a preset. Translation would run it once and the TypeScript engine again. | Use plain data properties. |
62
- | `standard.unknown-option` | `presets[<i>].options.<key>` | A Standard option other than `modeSelectors`, `containers`, `preflight`, `variablePrefix` and `compileClass`. | Remove the option. |
63
- | `standard.compileClass.hashFn`, `standard.compileClass.trigger` | `presets[<i>].options.compileClass.…` | A custom hash function or trigger for compiled classes. | Remove it; `classPrefix`, `alwaysHash`, `keepUnknown` and `layer` are supported. |
64
- | `icons.collections` | `presets[<i>].options.collections.<name>` | An icon collection other than the bundled `carbon`, `crypto`, `flagpack`, `logo` and `lucide`. | Use a bundled collection, or keep TypeScript. |
65
- | `icons.customizations`, `icons.processor` | `presets[<i>].options.…` | Icon customizations or a processor, which run JavaScript. | Remove them. |
66
- | `role-palettes-without-entry` | `presets[<i>]` | The `@teacss/config/role-palettes` preset in a configuration that did not come from an entry stylesheet. On Rust the preset needs the entry. | Load the configuration from its entry stylesheet through `@teacss/config`. |
67
- | `preset.name` | `presets[<i>].name` | A preset without a string `name`. | Give the preset a name. |
68
- | `preset.rules`, `preset.variants`, `preset.extractors`, `preset.preflights`, `preset.preprocess`, `preset.postprocess`, `preset.extendTheme`, `preset.configResolved`, `preset.transformers`, `preset.autocomplete`, `preset.extractorDefault` | `presets[<i>].<key>` | A preset that is not one of the built-in presets carries a dynamic field, as for the top-level keys above. | Remove the field from the preset, or keep TypeScript. |
69
- | `preset.content` | `presets[<i>].content` | A preset's `content` holds something other than `pipeline`, such as `filesystem` or `inline`; Rust reads content globs only from the configuration. | Move the globs to the configuration's `content.filesystem`. |
70
- | `preset.shortcuts`, `preset.safelist`, `preset.blocklist`, `preset.theme`, `preset.layers` | `presets[<i>].<key>…` | A preset field that is not static data, as for the top-level keys above. | Replace the item with static data. |
71
- | `preset.enforce`, `preset.layer` | `presets[<i>].<key>` | `enforce` other than `"pre"` or `"post"`, or a `layer` that is not a string. | Correct the value. |
72
- | `declarations-unsaved` | the declaration file | A declaration file whose text came from an unsaved editor buffer. Rust reads declaration files from disk. | Save the file. |
73
- | `declarations-unavailable` | `content.filesystem` | Finding declaration files under `content.filesystem` failed: the `@teacss/config` source scanner could not be loaded, or it threw. | Install `@teacss/config`. |
74
-
75
- `content.pipeline` never falls back, in the configuration or in a preset, whatever it holds (RegExp, functions or `false`). It only decides which modules the integration feeds in, so it stays on the facade's `config.content` and is not sent to Rust.
76
-
77
- ## Compatibility
78
-
79
- | `engineCompat` field | Meaning |
80
- | --- | --- |
81
- | `core` | The `@teacss/core` versions this engine accepts, written as `>=A.B.C <X.Y.Z`; prereleases compare by SemVer, so `0.9.0-alpha.1 < 0.9.0` |
82
- | `defaultMode` | What the option `"auto"` means: `"opt-in"` keeps TypeScript, `"auto"` (the current value) tries Rust |
83
- | `oracle.teacssTs` / `oracle.commit` | The teacss-ts version and commit this release was compared against byte for byte |
84
-
85
- | `@teacss/core` | `@teacss/engine` | `engineCompat.core` | Result |
86
- | --- | --- | --- | --- |
87
- | 0.9.0-alpha.3 | 0.9.0-alpha.3 | `>=0.9.0-alpha.0 <0.10.0` | Paired; selected by `defaultMode` |
88
- | 0.9.1 | 0.9.0 | `>=0.9.0 <0.10.0` | Allowed; the comparison baseline may lag one 0.8.x release, and diagnostics print `oracle.teacssTs` |
89
- | 0.10.0 | 0.9.4 | `>=0.9.0 <0.10.0` | Falls back to TypeScript with `engine-compat` |
90
- | 0.8.2 | any 0.9.x | - | 0.8.2 has no engine hook, so the engine is never loaded |
91
-
92
- The teacss-ts version this release is compared against is `package.json#engineCompat.oracle`.
9
+ | Rust target | Package | os / cpu / libc | Status | Minimum |
10
+ | --- | --- | --- | --- | --- |
11
+ | `aarch64-apple-darwin` | @teacss/engine-darwin-arm64 | darwin / arm64 / - | required | macOS 11.0 |
12
+ | `x86_64-apple-darwin` | @teacss/engine-darwin-x64 | darwin / x64 / - | required | macOS 11.0 |
13
+ | `x86_64-unknown-linux-gnu` | @teacss/engine-linux-x64-gnu | linux / x64 / glibc | required | glibc 2.17 |
14
+ | `x86_64-unknown-linux-musl` | @teacss/engine-linux-x64-musl | linux / x64 / musl | required | - |
15
+ | `aarch64-unknown-linux-gnu` | @teacss/engine-linux-arm64-gnu | linux / arm64 / glibc | required | glibc 2.17 |
16
+ | `aarch64-unknown-linux-musl` | @teacss/engine-linux-arm64-musl | linux / arm64 / musl | optional | - |
17
+ | `x86_64-pc-windows-msvc` | @teacss/engine-win32-x64-msvc | win32 / x64 / - | required | - |
18
+ | `aarch64-pc-windows-msvc` | @teacss/engine-win32-arm64-msvc | win32 / arm64 / - | optional | - |
19
+
20
+ Every package needs Node.js 26 or later. A required platform blocks a release when it fails to build or test; an optional one is published later if it fails.
21
+
22
+ A platform outside this matrix has no fallback: there is no wasm package, and the TypeScript engine is the only alternative. To run the Rust engine there, build it yourself from this repository with `cargo build -p teacss-napi --release`, rename the cdylib in `target/release/` to `teacss-engine.<os>-<cpu>[-<libc>].node` (the name the loader derives for your host, for example `teacss-engine.linux-riscv64-gnu.node`), and place it in `packages/engine/` next to `binding.js`. The loader tries that file before any platform package.
23
+
24
+ ## Configuration
25
+
26
+ Configuration comes only from the CSS entry (`@presets`, `@source`, `@shortcut`, `@safelist`, `@custom` and the role directives such as `@primary`; see [the CSS entry](https://github.com/teacss/teacss-rs/blob/master/skills/teacss/references/setup.md#css-entry)) plus a shell's `ShellOptions`, a small static object (`root`, `entry`, `inline`, `envMode`, `unmatched`, `outputToCssLayers`, `shortcutsLayer`, `presetOptions`, `minify`) that maps onto `LoadProjectFromRootRequest`. [Build integrations](https://github.com/teacss/teacss-rs/blob/master/skills/teacss/references/integrations.md#options) describes each option and the options a shell adds on top. There is no `UserConfig`, no preset object and no translation layer: a key the request does not know is `E_INVALID_ARGUMENT`, and the one remaining unsupported case is an `@presets` name that is not `standard`, `official` or `icons`, which `loadProjectFromRoot` reports as `E_UNSUPPORTED` with `details.reason` `preset-not-builtin` and `details.path` `@presets[<i>]`. A project that needs JavaScript rules, variants or hooks runs on the TypeScript ecosystem (teacss-ts), which this package does not load.
93
27
 
94
28
  ## Direct use of the binding
95
29
 
@@ -97,29 +31,29 @@ The teacss-ts version this release is compared against is `package.json#engineCo
97
31
  import { Engine, version } from "@teacss/engine/binding";
98
32
  ```
99
33
 
100
- The types are in `binding.d.ts`. The binding is a tooling-level API and is not part of the 0.9 stability promise; integrations should go through `@teacss/core`.
34
+ The types are in `binding.d.ts`. The binding is a tooling-level API and is not part of the stability promise; integrations go through the package root (`createProject` and the contract types).
101
35
 
102
36
  ## Troubleshooting
103
37
 
104
38
  | Symptom | Cause | Fix |
105
39
  | --- | --- | --- |
106
40
  | `Failed to load native binding`, and the detail lists `Cannot find module '@teacss/engine-linux-x64-gnu'` | Optional dependencies were skipped at install time (`--omit=optional`, `--no-optional`, or a CI cache holding another platform's `node_modules`) | Run `npm ci` again without the omit, or install `@teacss/engine-<platform>` explicitly; pnpm users check `supportedArchitectures` |
107
- | The same, but on Alpine with the detail trying a `-gnu` package | musl detection failed: gcompat makes `process.report.getReport()` report a glibc version, so the loader picked the gnu package | Remove gcompat, or install `@teacss/engine-linux-x64-musl` explicitly and set `TEACSS_ENGINE=rust` to see the detail; if that does not help, set `NAPI_RS_FORCE_WASI=1` with the wasm package installed and report the detection case to napi-rs |
41
+ | The same, but on Alpine with the detail trying a `-gnu` package | musl detection failed: gcompat makes `process.report.getReport()` report a glibc version, so the loader picked the gnu package | Remove gcompat, or install `@teacss/engine-linux-x64-musl` explicitly; if that does not help, report the detection case to napi-rs |
108
42
  | `Module did not self-register` or a `NODE_MODULE_VERSION` mismatch | Cannot happen with a Node-API binary; it means the loaded `.node` is not this package's (for example an Electron with a Node-API version below 9, or an old Bun) | Upgrade the runtime |
109
- | `dlopen` reports `GLIBC_2.xx not found` | glibc is older than the 2.17 build baseline | Not supported; use the wasm fallback or `TEACSS_ENGINE=ts` |
43
+ | `dlopen` reports `GLIBC_2.xx not found` | glibc is older than the 2.17 build baseline | Not supported; build the binding yourself (see [Supported platforms](#supported-platforms)) |
110
44
  | macOS reports "code signature invalid" | The `.node` was copied from outside npm and carries the quarantine attribute | `xattr -d com.apple.quarantine <file>`; files installed by npm do not carry it |
111
- | `TEACSS_ENGINE=rust` throws instead of falling back | Expected: `rust` never falls back | Use `auto`, or fix the load problem |
112
- | An `engine-compat` fallback | `@teacss/core` and `@teacss/engine` are not a matching pair | Align the two versions; check the lockfile for more than one `@teacss/engine` |
113
- | teacss-ts still uses TypeScript after a local `build:debug` | `bun link` points at an old directory, or `node_modules/@teacss/engine` is a registry copy | Check with `ls -l node_modules/@teacss/engine` that it is a symlink |
45
+ | A shell in this repository does not pick up a local `build:debug` | Its `node_modules/@teacss/engine` is a registry copy instead of the `file:../engine` link | `npm --prefix packages/<shell> ci` and check with `ls -l packages/<shell>/node_modules/@teacss/engine` that it is a symlink |
114
46
 
115
47
  ## Verifying a release
116
48
 
49
+ Every GitHub release carries `SHA256SUMS` over the `.node` files, the `teacss` binaries and the npm tarballs:
50
+
117
51
  ```sh
118
52
  shasum -a 256 -c SHA256SUMS # Linux: sha256sum -c SHA256SUMS
119
- npm view @teacss/engine --json | jq .dist.attestations
120
- gh attestation verify teacss-engine.<platform>.node --owner teacss
121
53
  ```
122
54
 
55
+ Releases carry no npm provenance or GitHub attestation (v02.11 §1.3).
56
+
123
57
  ## Development
124
58
 
125
59
  ```sh
@@ -132,19 +66,4 @@ node -e 'import("./packages/engine/dist/index.js").then(m => console.log(m.versi
132
66
 
133
67
  `build:debug` uses the `dev` profile and rebuilds incrementally in seconds. `npm run build` uses the release profile with `lto = "fat"`; use it only to reproduce the size budget or the import checks locally.
134
68
 
135
- To try a local build inside a teacss-ts checkout (bun 1.4.3 workspaces), link it one of two ways, preferring the first:
136
-
137
- ```sh
138
- # A: bun link (preferred)
139
- cd /path/to/teacss-rs/packages/engine && bun link
140
- cd /path/to/teacss-ts && bun link @teacss/engine
141
- TEACSS_ENGINE=rust bun test packages-engine/core
142
- ```
143
-
144
- ```sh
145
- # B: file: override (temporary; revert with git checkout package.json bun.lock)
146
- cd /path/to/teacss-ts
147
- bun add --dev @teacss/engine@file:../teacss-rs/packages/engine
148
- ```
149
-
150
- Either way the loader finds the `.node` next to `binding.js` first, so no platform package is needed. After a Rust change, run `build:debug` again; there is no need to link again.
69
+ The shells in this repository (`packages/{vite,astro,rsbuild,bun,postcss,inspector}`) depend on `@teacss/engine` through `file:../engine`, so `npm --prefix packages/<shell> ci` links them to this directory and they use the local build; the loader finds the `.node` next to `binding.js` first, so no platform package is needed. After a Rust change, run `build:debug` again.
@@ -10,14 +10,22 @@ import type {
10
10
  GenerateInput,
11
11
  GenerateOptions,
12
12
  GenerateResult,
13
+ IconifyJson,
13
14
  InspectEntryRequest,
14
15
  InspectEntryResult,
16
+ LoadProjectFromRootRequest,
17
+ LoadProjectFromRootResult,
15
18
  LoadProjectRequest,
16
19
  LoadProjectResult,
20
+ MatchedPosition,
17
21
  ModuleUpdateResult,
22
+ OutputToCssLayersOptions,
18
23
  ResolvedConfigView,
19
24
  RuleInfo,
20
25
  StringifiedUtil,
26
+ Suggestion,
27
+ SuggestOptions,
28
+ TokenInfo,
21
29
  TransformResult,
22
30
  UnmatchedDiagnostic,
23
31
  VariantInfo,
package/binding.d.ts CHANGED
@@ -10,14 +10,22 @@ import type {
10
10
  GenerateInput,
11
11
  GenerateOptions,
12
12
  GenerateResult,
13
+ IconifyJson,
13
14
  InspectEntryRequest,
14
15
  InspectEntryResult,
16
+ LoadProjectFromRootRequest,
17
+ LoadProjectFromRootResult,
15
18
  LoadProjectRequest,
16
19
  LoadProjectResult,
20
+ MatchedPosition,
17
21
  ModuleUpdateResult,
22
+ OutputToCssLayersOptions,
18
23
  ResolvedConfigView,
19
24
  RuleInfo,
20
25
  StringifiedUtil,
26
+ Suggestion,
27
+ SuggestOptions,
28
+ TokenInfo,
21
29
  TransformResult,
22
30
  UnmatchedDiagnostic,
23
31
  VariantInfo,
@@ -35,11 +43,13 @@ export declare class Engine {
35
43
  constructor()
36
44
  inspectEntry(request: InspectEntryRequest): InspectEntryResult
37
45
  loadProject(request: LoadProjectRequest): LoadProjectResult
46
+ loadProjectFromRoot(request: LoadProjectFromRootRequest): LoadProjectFromRootResult
38
47
  programKey(): string
39
48
  configView(): ResolvedConfigView
40
49
  rules(): RuleInfo[]
41
50
  variants(): VariantInfo[]
42
51
  configFiles(): string[]
52
+ missingImports(): string[]
43
53
  customThemeKeys(): string[]
44
54
  updateModule(id: string, code: string): ModuleUpdateResult
45
55
  updateModules(ids: string[], codes: string[]): ModuleUpdateResult[]
@@ -60,6 +70,11 @@ export declare class Engine {
60
70
  isTokenBlocked(raw: string): boolean
61
71
  diagnoseUnmatched(tokens: string[]): UnmatchedDiagnostic[]
62
72
  themeValue(path: string): string | null
73
+ suggest(input: string, options?: SuggestOptions | undefined | null): Suggestion[]
74
+ tokenInfo(token: string): TokenInfo | null
75
+ matchedPositions(id: string, code: string): MatchedPosition[]
76
+ equivalentTokens(token: string): string[]
77
+ parentOrders(): Array<[string, number]>
63
78
  stats(): EngineStats
64
79
  dispose(): void
65
80
  }
@@ -72,6 +87,17 @@ export declare function expandClassGroups(code: string): string
72
87
 
73
88
  export declare function hash(input: string): string
74
89
 
90
+ export declare function markers(): Markers
91
+
92
+ /** The scanner's marker strings (v10.2 §2.3), so the shells read them from one place. */
93
+ export interface Markers {
94
+ cssPlaceholder: string
95
+ includeComment: string
96
+ ignoreComment: string
97
+ skipStartComment: string
98
+ skipEndComment: string
99
+ }
100
+
75
101
  export declare function parseEntry(css: string, file?: string | undefined | null): EntryConfig
76
102
 
77
103
  export declare function splitClassTokens(body: string): string[]
package/binding.js CHANGED
@@ -92,8 +92,8 @@ function requireNative() {
92
92
  try {
93
93
  const binding = require('@teacss/engine-android-arm64')
94
94
  const bindingPackageVersion = require('@teacss/engine-android-arm64/package.json').version
95
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
96
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
95
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
96
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
97
97
  }
98
98
  return binding
99
99
  } catch (e) {
@@ -108,8 +108,8 @@ function requireNative() {
108
108
  try {
109
109
  const binding = require('@teacss/engine-android-arm-eabi')
110
110
  const bindingPackageVersion = require('@teacss/engine-android-arm-eabi/package.json').version
111
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
112
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
111
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
112
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
113
113
  }
114
114
  return binding
115
115
  } catch (e) {
@@ -129,8 +129,8 @@ function requireNative() {
129
129
  try {
130
130
  const binding = require('@teacss/engine-win32-x64-gnu')
131
131
  const bindingPackageVersion = require('@teacss/engine-win32-x64-gnu/package.json').version
132
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
133
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
132
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
133
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
134
134
  }
135
135
  return binding
136
136
  } catch (e) {
@@ -145,8 +145,8 @@ function requireNative() {
145
145
  try {
146
146
  const binding = require('@teacss/engine-win32-x64-msvc')
147
147
  const bindingPackageVersion = require('@teacss/engine-win32-x64-msvc/package.json').version
148
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
149
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
148
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
149
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
150
  }
151
151
  return binding
152
152
  } catch (e) {
@@ -162,8 +162,8 @@ function requireNative() {
162
162
  try {
163
163
  const binding = require('@teacss/engine-win32-ia32-msvc')
164
164
  const bindingPackageVersion = require('@teacss/engine-win32-ia32-msvc/package.json').version
165
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
166
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
165
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
166
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
167
167
  }
168
168
  return binding
169
169
  } catch (e) {
@@ -178,8 +178,8 @@ function requireNative() {
178
178
  try {
179
179
  const binding = require('@teacss/engine-win32-arm64-msvc')
180
180
  const bindingPackageVersion = require('@teacss/engine-win32-arm64-msvc/package.json').version
181
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
182
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
181
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
182
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
183
183
  }
184
184
  return binding
185
185
  } catch (e) {
@@ -197,8 +197,8 @@ function requireNative() {
197
197
  try {
198
198
  const binding = require('@teacss/engine-darwin-universal')
199
199
  const bindingPackageVersion = require('@teacss/engine-darwin-universal/package.json').version
200
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
201
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
200
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
201
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
202
202
  }
203
203
  return binding
204
204
  } catch (e) {
@@ -213,8 +213,8 @@ function requireNative() {
213
213
  try {
214
214
  const binding = require('@teacss/engine-darwin-x64')
215
215
  const bindingPackageVersion = require('@teacss/engine-darwin-x64/package.json').version
216
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
217
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
216
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
217
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
218
218
  }
219
219
  return binding
220
220
  } catch (e) {
@@ -229,8 +229,8 @@ function requireNative() {
229
229
  try {
230
230
  const binding = require('@teacss/engine-darwin-arm64')
231
231
  const bindingPackageVersion = require('@teacss/engine-darwin-arm64/package.json').version
232
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
233
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
232
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
233
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
234
234
  }
235
235
  return binding
236
236
  } catch (e) {
@@ -249,8 +249,8 @@ function requireNative() {
249
249
  try {
250
250
  const binding = require('@teacss/engine-freebsd-x64')
251
251
  const bindingPackageVersion = require('@teacss/engine-freebsd-x64/package.json').version
252
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
253
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
252
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
253
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
254
254
  }
255
255
  return binding
256
256
  } catch (e) {
@@ -265,8 +265,8 @@ function requireNative() {
265
265
  try {
266
266
  const binding = require('@teacss/engine-freebsd-arm64')
267
267
  const bindingPackageVersion = require('@teacss/engine-freebsd-arm64/package.json').version
268
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
269
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
268
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
269
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
270
270
  }
271
271
  return binding
272
272
  } catch (e) {
@@ -286,8 +286,8 @@ function requireNative() {
286
286
  try {
287
287
  const binding = require('@teacss/engine-linux-x64-musl')
288
288
  const bindingPackageVersion = require('@teacss/engine-linux-x64-musl/package.json').version
289
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
290
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
289
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
290
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
291
291
  }
292
292
  return binding
293
293
  } catch (e) {
@@ -302,8 +302,8 @@ function requireNative() {
302
302
  try {
303
303
  const binding = require('@teacss/engine-linux-x64-gnu')
304
304
  const bindingPackageVersion = require('@teacss/engine-linux-x64-gnu/package.json').version
305
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
306
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
305
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
306
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
307
307
  }
308
308
  return binding
309
309
  } catch (e) {
@@ -320,8 +320,8 @@ function requireNative() {
320
320
  try {
321
321
  const binding = require('@teacss/engine-linux-arm64-musl')
322
322
  const bindingPackageVersion = require('@teacss/engine-linux-arm64-musl/package.json').version
323
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
323
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
325
325
  }
326
326
  return binding
327
327
  } catch (e) {
@@ -336,8 +336,8 @@ function requireNative() {
336
336
  try {
337
337
  const binding = require('@teacss/engine-linux-arm64-gnu')
338
338
  const bindingPackageVersion = require('@teacss/engine-linux-arm64-gnu/package.json').version
339
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
340
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
339
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
340
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
341
341
  }
342
342
  return binding
343
343
  } catch (e) {
@@ -354,8 +354,8 @@ function requireNative() {
354
354
  try {
355
355
  const binding = require('@teacss/engine-linux-arm-musleabihf')
356
356
  const bindingPackageVersion = require('@teacss/engine-linux-arm-musleabihf/package.json').version
357
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
357
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
359
359
  }
360
360
  return binding
361
361
  } catch (e) {
@@ -370,8 +370,8 @@ function requireNative() {
370
370
  try {
371
371
  const binding = require('@teacss/engine-linux-arm-gnueabihf')
372
372
  const bindingPackageVersion = require('@teacss/engine-linux-arm-gnueabihf/package.json').version
373
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
374
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
373
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
374
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
375
375
  }
376
376
  return binding
377
377
  } catch (e) {
@@ -388,8 +388,8 @@ function requireNative() {
388
388
  try {
389
389
  const binding = require('@teacss/engine-linux-loong64-musl')
390
390
  const bindingPackageVersion = require('@teacss/engine-linux-loong64-musl/package.json').version
391
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
391
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
393
393
  }
394
394
  return binding
395
395
  } catch (e) {
@@ -404,8 +404,8 @@ function requireNative() {
404
404
  try {
405
405
  const binding = require('@teacss/engine-linux-loong64-gnu')
406
406
  const bindingPackageVersion = require('@teacss/engine-linux-loong64-gnu/package.json').version
407
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
408
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
407
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
408
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
409
409
  }
410
410
  return binding
411
411
  } catch (e) {
@@ -422,8 +422,8 @@ function requireNative() {
422
422
  try {
423
423
  const binding = require('@teacss/engine-linux-riscv64-musl')
424
424
  const bindingPackageVersion = require('@teacss/engine-linux-riscv64-musl/package.json').version
425
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
425
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
427
427
  }
428
428
  return binding
429
429
  } catch (e) {
@@ -438,8 +438,8 @@ function requireNative() {
438
438
  try {
439
439
  const binding = require('@teacss/engine-linux-riscv64-gnu')
440
440
  const bindingPackageVersion = require('@teacss/engine-linux-riscv64-gnu/package.json').version
441
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
442
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
441
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
442
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
443
  }
444
444
  return binding
445
445
  } catch (e) {
@@ -455,8 +455,8 @@ function requireNative() {
455
455
  try {
456
456
  const binding = require('@teacss/engine-linux-ppc64-gnu')
457
457
  const bindingPackageVersion = require('@teacss/engine-linux-ppc64-gnu/package.json').version
458
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
459
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
458
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
459
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
460
460
  }
461
461
  return binding
462
462
  } catch (e) {
@@ -471,8 +471,8 @@ function requireNative() {
471
471
  try {
472
472
  const binding = require('@teacss/engine-linux-s390x-gnu')
473
473
  const bindingPackageVersion = require('@teacss/engine-linux-s390x-gnu/package.json').version
474
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
475
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
474
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
475
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
476
476
  }
477
477
  return binding
478
478
  } catch (e) {
@@ -491,8 +491,8 @@ function requireNative() {
491
491
  try {
492
492
  const binding = require('@teacss/engine-openharmony-arm64')
493
493
  const bindingPackageVersion = require('@teacss/engine-openharmony-arm64/package.json').version
494
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
495
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
494
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
495
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
496
496
  }
497
497
  return binding
498
498
  } catch (e) {
@@ -507,8 +507,8 @@ function requireNative() {
507
507
  try {
508
508
  const binding = require('@teacss/engine-openharmony-x64')
509
509
  const bindingPackageVersion = require('@teacss/engine-openharmony-x64/package.json').version
510
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
511
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
510
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
511
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
512
512
  }
513
513
  return binding
514
514
  } catch (e) {
@@ -523,8 +523,8 @@ function requireNative() {
523
523
  try {
524
524
  const binding = require('@teacss/engine-openharmony-arm')
525
525
  const bindingPackageVersion = require('@teacss/engine-openharmony-arm/package.json').version
526
- if (bindingPackageVersion !== '0.9.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
527
- throw new Error(`Native binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
526
+ if (bindingPackageVersion !== '0.10.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
527
+ throw new Error(`Native binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
528
528
  }
529
529
  return binding
530
530
  } catch (e) {
@@ -664,8 +664,8 @@ if (!nativeBinding || forceWasi) {
664
664
  if (!candidateFailed) {
665
665
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
666
666
  const bindingPackageVersion = require('@teacss/engine-wasm32-wasi/package.json').version
667
- if (bindingPackageVersion !== '0.9.4') {
668
- throw new Error(`WASI binding package version mismatch, expected 0.9.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
667
+ if (bindingPackageVersion !== '0.10.2') {
668
+ throw new Error(`WASI binding package version mismatch, expected 0.10.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
669
669
  }
670
670
  }
671
671
  wasiBinding = require('@teacss/engine-wasm32-wasi')
@@ -716,12 +716,13 @@ if (!nativeBinding) {
716
716
  throw new Error(`Failed to load native binding`)
717
717
  }
718
718
 
719
- const { Engine, diagnoseCustom, diagnoseEntry, expandClassGroups, hash, parseEntry, splitClassTokens, version } = nativeBinding
719
+ const { Engine, diagnoseCustom, diagnoseEntry, expandClassGroups, hash, markers, parseEntry, splitClassTokens, version } = nativeBinding
720
720
  export { Engine }
721
721
  export { diagnoseCustom }
722
722
  export { diagnoseEntry }
723
723
  export { expandClassGroups }
724
724
  export { hash }
725
+ export { markers }
725
726
  export { parseEntry }
726
727
  export { splitClassTokens }
727
728
  export { version }