@bamboocss/types 1.17.2 → 1.18.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/dist/config.d.ts +12 -3
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -289,9 +289,18 @@ interface CssgenOptions {
|
|
|
289
289
|
* It is opt-in because reachability cannot be proven for every reference. `token()` and
|
|
290
290
|
* `token.var()` calls are read out of the source, as is any literal `var(--x)` written
|
|
291
291
|
* by hand. Three things stay invisible: a token named by a path the source does not
|
|
292
|
-
* spell out as a string literal
|
|
293
|
-
*
|
|
294
|
-
*
|
|
292
|
+
* spell out as a string literal, one referenced only from a stylesheet outside
|
|
293
|
+
* `include`, and one used by a separate package consuming the output as design tokens.
|
|
294
|
+
* Use `staticCss` to keep those.
|
|
295
|
+
*
|
|
296
|
+
* Only the *second* form of the first case is a risk. `token(key)` is safe for any path,
|
|
297
|
+
* because javascript receives a literal for a plain token rather than a reference. It is
|
|
298
|
+
* `token.var(key)` — the form that hands back `var(--x)` — that needs the declaration to
|
|
299
|
+
* still be there, so that is the one to hold with `staticCss`.
|
|
300
|
+
*
|
|
301
|
+
* A custom property declared by `globalCss` or `globalVars` is not one of these cases:
|
|
302
|
+
* the declaration ships whether or not anything in the stylesheet reads it, so whatever
|
|
303
|
+
* it references is kept alongside it.
|
|
295
304
|
*
|
|
296
305
|
* Tokens that javascript receives as a `var()` rather than a literal are always kept, so
|
|
297
306
|
* that `token()` answers correctly for any path at runtime. That covers virtual tokens
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "The types for css bamboo",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"ncp": "2.0.0",
|
|
33
33
|
"pkg-types": "2.3.0",
|
|
34
34
|
"ts-morph": "28.0.0",
|
|
35
|
-
"@bamboocss/extractor": "1.
|
|
35
|
+
"@bamboocss/extractor": "1.18.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"dev": "tsx scripts/watch.ts",
|