@bamboocss/types 1.29.0 → 1.30.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 +5 -5
- package/dist/parser.d.ts +2 -2
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -302,18 +302,18 @@ interface CssgenOptions {
|
|
|
302
302
|
* declared through `globalVars` are yours and are never removed.
|
|
303
303
|
*
|
|
304
304
|
* It is opt-in because reachability cannot be proven for every reference. `token()`,
|
|
305
|
-
* `token
|
|
305
|
+
* `token()` and `token.value()` calls are read out of the source, as is any literal
|
|
306
306
|
* `var(--x)` written by hand — and each form is resolved through a constant or a template
|
|
307
307
|
* literal the extractor can follow, not only through a path spelled out at the call. Three
|
|
308
308
|
* things stay invisible: a token named by a path assembled from a value that only exists at
|
|
309
309
|
* runtime, one referenced only from a stylesheet outside `include`, and one used by a
|
|
310
310
|
* separate package consuming the output as design tokens. Use `staticCss` to keep those.
|
|
311
311
|
*
|
|
312
|
-
*
|
|
312
|
+
* Both forms are a risk, which is a change. `token()` used to hand javascript a literal for
|
|
313
313
|
* a plain token, so a path it could not resolve cost nothing; it now returns `var(--x)` for
|
|
314
|
-
* *every* token
|
|
315
|
-
*
|
|
316
|
-
*
|
|
314
|
+
* *every* token. Only `token.value()` returns a literal, and only for a token that has one.
|
|
315
|
+
* So a path this pass cannot read is a declaration that has to survive whichever form asked
|
|
316
|
+
* for it.
|
|
317
317
|
*
|
|
318
318
|
* A custom property declared by `globalCss` or `globalVars` is not one of these cases:
|
|
319
319
|
* the declaration ships whether or not anything in the stylesheet reads it, so whatever
|
package/dist/parser.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export interface ResultItem {
|
|
|
4
4
|
name?: string
|
|
5
5
|
data: Array<Unboxed['raw']>
|
|
6
6
|
/**
|
|
7
|
-
* `token`
|
|
8
|
-
*
|
|
7
|
+
* `token` is `token(path)`, the variable reference. `tokenValue` is `token.value(path)`, the
|
|
8
|
+
* literal — distinct because
|
|
9
9
|
* inlining one as the other swaps a themeable reference for a fixed value.
|
|
10
10
|
*
|
|
11
11
|
* Both live in `ParserResult.token`, since every consumer that reads a token *path* out of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.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.30.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"dev": "tsx scripts/watch.ts",
|